GENIEGenerator
Loading...
Searching...
No Matches
genie::SecondNucleonEmissionI Class Reference

Interface to drive the a second nucleon emission from a nucleus Specfic impelmentations will have different physics. More...

#include <SecondNucleonEmissionI.h>

Inheritance diagram for genie::SecondNucleonEmissionI:
[legend]
Collaboration diagram for genie::SecondNucleonEmissionI:
[legend]

Public Member Functions

virtual ~SecondNucleonEmissionI ()
Public Member Functions inherited from genie::EventRecordVisitorI
virtual ~EventRecordVisitorI ()
virtual void ProcessEventRecord (GHepRecord *event_rec) const =0
Public Member Functions inherited from genie::Algorithm
virtual ~Algorithm ()
virtual void Configure (const Registry &config)
virtual void Configure (string config)
virtual void FindConfig (void)
virtual const RegistryGetConfig (void) const
RegistryGetOwnedConfig (void)
virtual const AlgIdId (void) const
 Get algorithm ID.
virtual AlgStatus_t GetStatus (void) const
 Get algorithm status.
virtual bool AllowReconfig (void) const
virtual AlgCmp_t Compare (const Algorithm *alg) const
 Compare with input algorithm.
virtual void SetId (const AlgId &id)
 Set algorithm ID.
virtual void SetId (string name, string config)
const AlgorithmSubAlg (const RgKey &registry_key) const
void AdoptConfig (void)
void AdoptSubstructure (void)
virtual void Print (ostream &stream) const
 Print algorithm info.

Protected Member Functions

virtual bool EmitSecondNucleon (GHepRecord *evrec, const int eject_nucleon_pdg) const
 SecondNucleonEmissionI (string name)
 SecondNucleonEmissionI (string name, string config)
void LoadConfig (void)
Protected Member Functions inherited from genie::EventRecordVisitorI
 EventRecordVisitorI ()
 EventRecordVisitorI (string name)
 EventRecordVisitorI (string name, string config)
Protected Member Functions inherited from genie::Algorithm
 Algorithm ()
 Algorithm (string name)
 Algorithm (string name, string config)
void Initialize (void)
void DeleteConfig (void)
void DeleteSubstructure (void)
RegistryExtractLocalConfig (const Registry &in) const
RegistryExtractLowerConfig (const Registry &in, const string &alg_key) const
 Split an incoming configuration Registry into a block valid for the sub-algo identified by alg_key.
template<class T>
bool GetParam (const RgKey &name, T &p, bool is_top_call=true) const
template<class T>
bool GetParamDef (const RgKey &name, T &p, const T &def) const
template<class T>
int GetParamVect (const std::string &comm_name, std::vector< T > &v, bool is_top_call=true) const
 Handle to load vectors of parameters.
int GetParamVectKeys (const std::string &comm_name, std::vector< RgKey > &k, bool is_top_call=true) const
template<class T>
int GetParamMat (const std::string &comm_name, TMatrixT< T > &mat, bool is_top_call=true) const
 Handle to load matrix of parameters.
template<class T>
int GetParamMatSym (const std::string &comm_name, TMatrixTSym< T > &mat, bool is_top_call=true) const
int GetParamMatKeys (const std::string &comm_name, std::vector< RgKey > &k, bool is_top_call=true) const
int AddTopRegistry (Registry *rp, bool owns=true)
 add registry with top priority, also update ownership
int AddLowRegistry (Registry *rp, bool owns=true)
 add registry with lowest priority, also update ownership
int MergeTopRegistry (const Registry &r)
int AddTopRegisties (const vector< Registry * > &rs, bool owns=false)
 Add registries with top priority, also udated Ownerships.

Protected Attributes

const NuclearModelIfNuclModel
 nuclear model
Protected Attributes inherited from genie::Algorithm
bool fAllowReconfig
bool fOwnsSubstruc
 true if it owns its substructure (sub-algs,...)
AlgId fID
 algorithm name and configuration set
vector< Registry * > fConfVect
vector< bool > fOwnerships
 ownership for every registry in fConfVect
AlgStatus_t fStatus
 algorithm execution status
AlgMapfOwnedSubAlgMp
 local pool for owned sub-algs (taken out of the factory pool)

Additional Inherited Members

Static Public Member Functions inherited from genie::Algorithm
static string BuildParamVectKey (const std::string &comm_name, unsigned int i)
static string BuildParamVectSizeKey (const std::string &comm_name)
static string BuildParamMatKey (const std::string &comm_name, unsigned int i, unsigned int j)
static string BuildParamMatRowSizeKey (const std::string &comm_name)
static string BuildParamMatColSizeKey (const std::string &comm_name)

Detailed Description

Interface to drive the a second nucleon emission from a nucleus Specfic impelmentations will have different physics.

Author
Afroditi Papadopoulou <apapadop \at mit.edu> Massachusetts Institute of Technology - October 04, 2019 Marco Roda <mroda \at liverpool.ac.uk> University of Liverpool
Created:\n October 04, 2019
License:\n Copyright (c) 2003-2025, The GENIE Collaboration
For the full text of the license visit http://copyright.genie-mc.org or see $GENIE/LICENSE

Definition at line 33 of file SecondNucleonEmissionI.h.

Constructor & Destructor Documentation

◆ ~SecondNucleonEmissionI()

SecondNucleonEmissionI::~SecondNucleonEmissionI ( )
virtual

Definition at line 62 of file SecondNucleonEmissionI.cxx.

63{
64
65}

◆ SecondNucleonEmissionI() [1/2]

◆ SecondNucleonEmissionI() [2/2]

SecondNucleonEmissionI::SecondNucleonEmissionI ( string name,
string config )
protected

Definition at line 56 of file SecondNucleonEmissionI.cxx.

56 :
57EventRecordVisitorI( name, config)
58{
59
60}

References genie::EventRecordVisitorI::EventRecordVisitorI().

Member Function Documentation

◆ EmitSecondNucleon()

bool SecondNucleonEmissionI::EmitSecondNucleon ( GHepRecord * evrec,
const int eject_nucleon_pdg ) const
protectedvirtual

Definition at line 68 of file SecondNucleonEmissionI.cxx.

68 {
69
70 LOG("SecondNucleonEmissionI", pINFO) << "Adding a recoil nucleon with PDG " << eject_nucleon_pdg ;
71
72 GHepParticle * nucleon = evrec->HitNucleon();
73
75 int imom = evrec->TargetNucleusPosition();
76
77 //-- Has opposite momentum from the struck nucleon
78 double vx = nucleon->Vx();
79 double vy = nucleon->Vy();
80 double vz = nucleon->Vz();
81 double px = -1.* nucleon->Px();
82 double py = -1.* nucleon->Py();
83 double pz = -1.* nucleon->Pz();
84 double M = PDGLibrary::Instance()->Find(eject_nucleon_pdg)->Mass();
85 double E = TMath::Sqrt(px*px+py*py+pz*pz+M*M);
86
87 evrec->AddParticle( eject_nucleon_pdg, status, imom, -1, -1, -1, px, py, pz, E, vx, vy, vz, 0 );
88
89 return true ;
90}
#define pINFO
Definition Messenger.h:62
#define LOG(stream, priority)
A macro that returns the requested log4cpp::Category appending a string (using the FILE,...
Definition Messenger.h:96
double Vy(void) const
Get production y.
double Px(void) const
Get Px.
double Pz(void) const
Get Pz.
double Py(void) const
Get Py.
double Vz(void) const
Get production z.
double Vx(void) const
Get production x.
virtual void AddParticle(const GHepParticle &p)
virtual int TargetNucleusPosition(void) const
virtual GHepParticle * HitNucleon(void) const
static PDGLibrary * Instance(void)
TParticlePDG * Find(int pdgc, bool must_exist=true)
@ kIStHadronInTheNucleus
Definition GHepStatus.h:37
enum genie::EGHepStatus GHepStatus_t

References genie::GHepRecord::AddParticle(), genie::PDGLibrary::Find(), genie::GHepRecord::HitNucleon(), genie::PDGLibrary::Instance(), genie::kIStHadronInTheNucleus, LOG, pINFO, genie::GHepParticle::Px(), genie::GHepParticle::Py(), genie::GHepParticle::Pz(), genie::GHepRecord::TargetNucleusPosition(), genie::GHepParticle::Vx(), genie::GHepParticle::Vy(), and genie::GHepParticle::Vz().

Referenced by genie::SpectralFunction2p2h::ProcessEventRecord(), and genie::SRCNuclearRecoil::ProcessEventRecord().

◆ LoadConfig()

void SecondNucleonEmissionI::LoadConfig ( void )
protected

Definition at line 92 of file SecondNucleonEmissionI.cxx.

93{
94
95 RgKey nuclkey = "NuclearModel";
96 fNuclModel = 0;
97 fNuclModel = dynamic_cast<const NuclearModelI *> (this->SubAlg(nuclkey));
98 assert(fNuclModel);
99
100}
string RgKey
const Algorithm * SubAlg(const RgKey &registry_key) const
const NuclearModelI * fNuclModel
nuclear model

References fNuclModel, and genie::Algorithm::SubAlg().

Referenced by genie::SpectralFunction2p2h::LoadConfig(), and genie::SRCNuclearRecoil::LoadConfig().

Member Data Documentation

◆ fNuclModel

const NuclearModelI* genie::SecondNucleonEmissionI::fNuclModel
protected

The documentation for this class was generated from the following files: