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

Interaction list generator in HELepton. More...

#include <HELeptonInteractionListGenerator.h>

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

Public Member Functions

 HELeptonInteractionListGenerator ()
 HELeptonInteractionListGenerator (string config)
 ~HELeptonInteractionListGenerator ()
InteractionListCreateInteractionList (const InitialState &init) const
void Configure (const Registry &config)
void Configure (string config)
Public Member Functions inherited from genie::Algorithm
virtual ~Algorithm ()
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.

Private Member Functions

InteractionListGLRESInteraction (const InitialState &init_state) const
InteractionListHENuElectronInteraction (const InitialState &init_state) const
InteractionListPhotonRESInteraction (const InitialState &init_state) const
InteractionListPhotonCOHInteraction (const InitialState &init_state) const
void LoadConfigData (void)

Private Attributes

bool fIsGLRESMu
bool fIsGLRESTau
bool fIsGLRESEle
bool fIsGLRESHad
bool fIsHENuElCC
bool fIsHENuElNC
bool fIsPhotonRESMu
bool fIsPhotonRESEle
bool fIsPhotonRESTau
bool fIsPhotonRESHad
bool fIsPhotonCOH

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)
Protected Member Functions inherited from genie::InteractionListGeneratorI
 InteractionListGeneratorI ()
 InteractionListGeneratorI (string name)
 InteractionListGeneratorI (string name, string config)
 ~InteractionListGeneratorI ()
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 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)

Detailed Description

Interaction list generator in HELepton.

Author
Alfonso Garcia <aagarciasoto \at km3net.de> IFIC & Harvard University
Created:\n Dec 8, 2021
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 26 of file HELeptonInteractionListGenerator.h.

Constructor & Destructor Documentation

◆ HELeptonInteractionListGenerator() [1/2]

HELeptonInteractionListGenerator::HELeptonInteractionListGenerator ( )

Definition at line 21 of file HELeptonInteractionListGenerator.cxx.

21 :
22InteractionListGeneratorI("genie::HELeptonInteractionListGenerator")
23{
24
25}

References genie::InteractionListGeneratorI::InteractionListGeneratorI().

◆ HELeptonInteractionListGenerator() [2/2]

HELeptonInteractionListGenerator::HELeptonInteractionListGenerator ( string config)

Definition at line 27 of file HELeptonInteractionListGenerator.cxx.

27 :
28InteractionListGeneratorI("genie::HELeptonInteractionListGenerator", config)
29{
30
31}

References genie::InteractionListGeneratorI::InteractionListGeneratorI().

◆ ~HELeptonInteractionListGenerator()

HELeptonInteractionListGenerator::~HELeptonInteractionListGenerator ( )

Definition at line 33 of file HELeptonInteractionListGenerator.cxx.

34{
35
36}

Member Function Documentation

◆ Configure() [1/2]

void HELeptonInteractionListGenerator::Configure ( const Registry & config)
virtual

Configure the algorithm with an external registry The registry is merged with the top level registry if it is owned, Otherwise a copy of it is added with the highest priority

Reimplemented from genie::Algorithm.

Definition at line 202 of file HELeptonInteractionListGenerator.cxx.

203{
204 Algorithm::Configure(config);
205 this->LoadConfigData();
206}
virtual void Configure(const Registry &config)
Definition Algorithm.cxx:62

References genie::Algorithm::Configure(), and LoadConfigData().

◆ Configure() [2/2]

void HELeptonInteractionListGenerator::Configure ( string config)
virtual

Configure the algorithm from the AlgoConfigPool based on param_set string given in input An algorithm contains a vector of registries coming from different xml configuration files, which are loaded according a very precise prioriy This methods will load a number registries in order of priority: 1) "Tunable" parameter set from CommonParametes. This is loaded with the highest prioriry and it is designed to be used for tuning procedure Usage not expected from the user. 2) For every string defined in "CommonParame" the corresponding parameter set will be loaded from CommonParameter.xml 3) parameter set specified by the config string and defined in the xml file of the algorithm 4) if config is not "Default" also the Default parameter set from the same xml file will be loaded Effectively this avoids the repetion of a parameter when it is not changed in the requested configuration

Reimplemented from genie::Algorithm.

Definition at line 208 of file HELeptonInteractionListGenerator.cxx.

209{
210 Algorithm::Configure(config);
211 this->LoadConfigData();
212}

References genie::Algorithm::Configure(), and LoadConfigData().

◆ CreateInteractionList()

InteractionList * HELeptonInteractionListGenerator::CreateInteractionList ( const InitialState & init) const
virtual

Implements genie::InteractionListGeneratorI.

Definition at line 157 of file HELeptonInteractionListGenerator.cxx.

159{
160// channels:
161// nuebar + e- -> W- -> nuebar + e- [CC+NC]
162// nuebar + e- -> W- -> nuebar + mu- [CC]
163// nuebar + e- -> W- -> nuebar + tau- [CC]
164// nuebar + e- -> W- -> hadrons [CC]
165// nue + e- -> e + nue [CC+NC]
166// numu + e- -> mu + nue [CC]
167// nutau + e- -> tau + nue [CC]
168// numu + e- -> numu + e [NC]
169// nutau + e- -> nutau + e [NC]
170// numubar + e- -> numubar + e [NC]
171// nutaubar + e- -> nutaubar + e [NC]
172// nu + gamma* -> l- + W+ (coherent & resonant)
173// nubar + gamma* -> l+ + W- (coherent & resonant)
174
175 int ppdg = init_state.ProbePdg();
176 if( !pdg::IsNeutralLepton(ppdg) ) {
177 LOG("IntLst", pWARN)
178 << "Can not handle probe! Returning NULL InteractionList "
179 << "for init-state: " << init_state.AsString();
180 return 0;
181 }
182
183 if (fIsGLRESMu) return GLRESInteraction(init_state);
184 else if (fIsGLRESTau) return GLRESInteraction(init_state);
185 else if (fIsGLRESEle) return GLRESInteraction(init_state);
186 else if (fIsGLRESHad) return GLRESInteraction(init_state);
187 else if (fIsHENuElCC) return HENuElectronInteraction(init_state);
188 else if (fIsHENuElNC) return HENuElectronInteraction(init_state);
189 else if (fIsPhotonRESMu) return PhotonRESInteraction(init_state);
190 else if (fIsPhotonRESTau) return PhotonRESInteraction(init_state);
191 else if (fIsPhotonRESEle) return PhotonRESInteraction(init_state);
192 else if (fIsPhotonRESHad) return PhotonRESInteraction(init_state);
193 else if (fIsPhotonCOH) return PhotonCOHInteraction(init_state);
194 else {
195 LOG("IntLst", pERROR)
196 << "Returning NULL InteractionList for init-state: " << init_state.AsString();
197 return 0;
198 }
199
200}
#define pERROR
Definition Messenger.h:59
#define LOG(stream, priority)
A macro that returns the requested log4cpp::Category appending a string (using the FILE,...
Definition Messenger.h:96
#define pWARN
Definition Messenger.h:60
InteractionList * PhotonCOHInteraction(const InitialState &init_state) const
InteractionList * HENuElectronInteraction(const InitialState &init_state) const
InteractionList * PhotonRESInteraction(const InitialState &init_state) const
InteractionList * GLRESInteraction(const InitialState &init_state) const
bool IsNeutralLepton(int pdgc)
Definition PDGUtils.cxx:95

References genie::InitialState::AsString(), fIsGLRESEle, fIsGLRESHad, fIsGLRESMu, fIsGLRESTau, fIsHENuElCC, fIsHENuElNC, fIsPhotonCOH, fIsPhotonRESEle, fIsPhotonRESHad, fIsPhotonRESMu, fIsPhotonRESTau, GLRESInteraction(), HENuElectronInteraction(), genie::pdg::IsNeutralLepton(), LOG, pERROR, PhotonCOHInteraction(), PhotonRESInteraction(), genie::InitialState::ProbePdg(), and pWARN.

◆ GLRESInteraction()

InteractionList * HELeptonInteractionListGenerator::GLRESInteraction ( const InitialState & init_state) const
private

Definition at line 39 of file HELeptonInteractionListGenerator.cxx.

41{
42
43
44 InteractionList * intlist = new InteractionList;
45
46 ProcessInfo proc_info(kScGlashowResonance, kIntWeakCC);
47
48 int probepdg = init_state.ProbePdg();
49
50 if(probepdg == kPdgAntiNuE) {
51 InitialState init(init_state);
52 init_state.TgtPtr()->SetHitNucPdg(0);
53 Interaction * interaction = new Interaction(init_state, proc_info);
54 XclsTag exclusive_tag;
55 if (fIsGLRESMu) exclusive_tag.SetFinalLepton(kPdgMuon);
56 else if (fIsGLRESTau) exclusive_tag.SetFinalLepton(kPdgTau);
57 else if (fIsGLRESEle) exclusive_tag.SetFinalLepton(kPdgElectron);
58 else if (fIsGLRESHad) exclusive_tag.SetFinalLepton(kPdgPiP);
59 interaction->SetExclTag(exclusive_tag);
60 intlist->push_back(interaction);
61 }
62
63 return intlist;
64
65}
int ProbePdg(void) const
Target * TgtPtr(void) const
void SetExclTag(const XclsTag &xcls)
void SetHitNucPdg(int pdgc)
Definition Target.cxx:171
void SetFinalLepton(int finallepton_pdgc=0)
Definition XclsTag.cxx:144
const int kPdgTau
Definition PDGCodes.h:39
const int kPdgAntiNuE
Definition PDGCodes.h:29
@ kScGlashowResonance
const int kPdgPiP
Definition PDGCodes.h:158
const int kPdgMuon
Definition PDGCodes.h:37
const int kPdgElectron
Definition PDGCodes.h:35

References fIsGLRESEle, fIsGLRESHad, fIsGLRESMu, fIsGLRESTau, genie::kIntWeakCC, genie::kPdgAntiNuE, genie::kPdgElectron, genie::kPdgMuon, genie::kPdgPiP, genie::kPdgTau, genie::kScGlashowResonance, genie::InitialState::ProbePdg(), genie::Interaction::SetExclTag(), genie::XclsTag::SetFinalLepton(), genie::Target::SetHitNucPdg(), and genie::InitialState::TgtPtr().

Referenced by CreateInteractionList().

◆ HENuElectronInteraction()

InteractionList * HELeptonInteractionListGenerator::HENuElectronInteraction ( const InitialState & init_state) const
private

Definition at line 68 of file HELeptonInteractionListGenerator.cxx.

70{
71
72
73 InteractionList * intlist = new InteractionList;
74
75 int probepdg = init_state.ProbePdg();
76
77 if (fIsHENuElCC) {
78 ProcessInfo proc_info(kScGlashowResonance, kIntWeakCC);
79 InitialState init(init_state);
80 init_state.TgtPtr()->SetHitNucPdg(0);
81 Interaction * interaction = new Interaction(init_state, proc_info);
82 XclsTag exclusive_tag; //charged lepton
83 if ( pdg::IsNuMu(probepdg) ) exclusive_tag.SetFinalLepton(kPdgMuon);
84 else if ( pdg::IsNuTau(probepdg) ) exclusive_tag.SetFinalLepton(kPdgTau);
85 else if ( pdg::IsNuE(probepdg) ) exclusive_tag.SetFinalLepton(kPdgElectron);
86 else return intlist;
87 interaction->SetExclTag(exclusive_tag);
88 intlist->push_back(interaction);
89 }
90 else if (fIsHENuElNC) {
91 ProcessInfo proc_info(kScGlashowResonance, kIntWeakNC);
92 InitialState init(init_state);
93 init_state.TgtPtr()->SetHitNucPdg(0);
94 Interaction * interaction = new Interaction(init_state, proc_info);
95 XclsTag exclusive_tag; //charged lepton
96 if ( pdg::IsNuMu(probepdg) ) exclusive_tag.SetFinalLepton(kPdgElectron);
97 else if ( pdg::IsNuTau(probepdg) ) exclusive_tag.SetFinalLepton(kPdgElectron);
98 else if ( pdg::IsAntiNuMu(probepdg) ) exclusive_tag.SetFinalLepton(kPdgElectron);
99 else if ( pdg::IsAntiNuTau(probepdg) ) exclusive_tag.SetFinalLepton(kPdgElectron);
100 else return intlist;
101 interaction->SetExclTag(exclusive_tag);
102 intlist->push_back(interaction);
103 }
104
105 return intlist;
106
107}
bool IsAntiNuTau(int pdgc)
Definition PDGUtils.cxx:183
bool IsNuE(int pdgc)
Definition PDGUtils.cxx:158
bool IsAntiNuMu(int pdgc)
Definition PDGUtils.cxx:178
bool IsNuMu(int pdgc)
Definition PDGUtils.cxx:163
bool IsNuTau(int pdgc)
Definition PDGUtils.cxx:168

References fIsHENuElCC, fIsHENuElNC, genie::pdg::IsAntiNuMu(), genie::pdg::IsAntiNuTau(), genie::pdg::IsNuE(), genie::pdg::IsNuMu(), genie::pdg::IsNuTau(), genie::kIntWeakCC, genie::kIntWeakNC, genie::kPdgElectron, genie::kPdgMuon, genie::kPdgTau, genie::kScGlashowResonance, genie::InitialState::ProbePdg(), genie::Interaction::SetExclTag(), genie::XclsTag::SetFinalLepton(), genie::Target::SetHitNucPdg(), and genie::InitialState::TgtPtr().

Referenced by CreateInteractionList().

◆ LoadConfigData()

void HELeptonInteractionListGenerator::LoadConfigData ( void )
private

Definition at line 214 of file HELeptonInteractionListGenerator.cxx.

215{
216
217 GetParamDef("is-GLRES-Mu", fIsGLRESMu, false ) ;
218 GetParamDef("is-GLRES-Tau", fIsGLRESTau, false ) ;
219 GetParamDef("is-GLRES-Ele", fIsGLRESEle, false ) ;
220 GetParamDef("is-GLRES-Had", fIsGLRESHad, false ) ;
221 GetParamDef("is-HENuEl-CC", fIsHENuElCC, false ) ;
222 GetParamDef("is-HENuEl-NC", fIsHENuElNC, false ) ;
223 GetParamDef("is-PhotonRES-Mu", fIsPhotonRESMu, false ) ;
224 GetParamDef("is-PhotonRES-Tau", fIsPhotonRESTau, false ) ;
225 GetParamDef("is-PhotonRES-Ele", fIsPhotonRESEle, false ) ;
226 GetParamDef("is-PhotonRES-Had", fIsPhotonRESHad, false ) ;
227 GetParamDef("is-PhotonCOH", fIsPhotonCOH, false ) ;
228
229}
bool GetParamDef(const RgKey &name, T &p, const T &def) const

References fIsGLRESEle, fIsGLRESHad, fIsGLRESMu, fIsGLRESTau, fIsHENuElCC, fIsHENuElNC, fIsPhotonCOH, fIsPhotonRESEle, fIsPhotonRESHad, fIsPhotonRESMu, fIsPhotonRESTau, and genie::Algorithm::GetParamDef().

Referenced by Configure(), and Configure().

◆ PhotonCOHInteraction()

InteractionList * HELeptonInteractionListGenerator::PhotonCOHInteraction ( const InitialState & init_state) const
private

Definition at line 144 of file HELeptonInteractionListGenerator.cxx.

146{
147
148 InteractionList * intlist = new InteractionList;
149 ProcessInfo proc_info(kScPhotonCoherent, kIntWeakCC);
150 Interaction * interaction = new Interaction(init_state, proc_info);
151 intlist->push_back(interaction);
152 return intlist;
153
154}
@ kScPhotonCoherent

References genie::kIntWeakCC, and genie::kScPhotonCoherent.

Referenced by CreateInteractionList().

◆ PhotonRESInteraction()

InteractionList * HELeptonInteractionListGenerator::PhotonRESInteraction ( const InitialState & init_state) const
private

Definition at line 110 of file HELeptonInteractionListGenerator.cxx.

112{
113
114 InteractionList * intlist = new InteractionList;
115
116 ProcessInfo proc_info(kScPhotonResonance, kIntWeakCC);
117
118 int probepdg = init_state.ProbePdg();
119 bool hasP = (init_state.Tgt().Z() > 0);
120 bool hasN = (init_state.Tgt().N() > 0);
121
122 int nuclpdg[2] = { kPdgProton, kPdgNeutron };
123 for(int inucl=0; inucl<2; inucl++) {
124 int struck_nucleon = nuclpdg[inucl];
125 if( (struck_nucleon == kPdgProton && hasP) || (struck_nucleon == kPdgNeutron && hasN) ) {
126 Interaction * interaction = new Interaction(init_state, proc_info);
127 Target * target = interaction->InitStatePtr()->TgtPtr();
128 target->SetHitNucPdg(struck_nucleon);
129 XclsTag exclusive_tag;
130 if (fIsPhotonRESMu) exclusive_tag.SetFinalLepton( (probepdg>0) ? kPdgAntiMuon : kPdgMuon );
131 else if (fIsPhotonRESTau) exclusive_tag.SetFinalLepton( (probepdg>0) ? kPdgAntiTau : kPdgTau );
132 else if (fIsPhotonRESEle) exclusive_tag.SetFinalLepton( (probepdg>0) ? kPdgPositron : kPdgElectron );
133 else if (fIsPhotonRESHad) exclusive_tag.SetFinalLepton( (probepdg>0) ? kPdgPiP : kPdgPiM );
134 interaction->SetExclTag(exclusive_tag);
135 intlist->push_back(interaction);
136 }
137 }
138
139 return intlist;
140
141}
const Target & Tgt(void) const
InitialState * InitStatePtr(void) const
Definition Interaction.h:74
const int kPdgPiM
Definition PDGCodes.h:159
const int kPdgAntiMuon
Definition PDGCodes.h:38
const int kPdgProton
Definition PDGCodes.h:81
const int kPdgNeutron
Definition PDGCodes.h:83
@ kScPhotonResonance
const int kPdgPositron
Definition PDGCodes.h:36
const int kPdgAntiTau
Definition PDGCodes.h:40

References fIsPhotonRESEle, fIsPhotonRESHad, fIsPhotonRESMu, fIsPhotonRESTau, genie::Interaction::InitStatePtr(), genie::kIntWeakCC, genie::kPdgAntiMuon, genie::kPdgAntiTau, genie::kPdgElectron, genie::kPdgMuon, genie::kPdgNeutron, genie::kPdgPiM, genie::kPdgPiP, genie::kPdgPositron, genie::kPdgProton, genie::kPdgTau, genie::kScPhotonResonance, genie::InitialState::ProbePdg(), genie::Interaction::SetExclTag(), genie::XclsTag::SetFinalLepton(), genie::Target::SetHitNucPdg(), genie::InitialState::Tgt(), and genie::InitialState::TgtPtr().

Referenced by CreateInteractionList().

Member Data Documentation

◆ fIsGLRESEle

bool genie::HELeptonInteractionListGenerator::fIsGLRESEle
private

◆ fIsGLRESHad

bool genie::HELeptonInteractionListGenerator::fIsGLRESHad
private

◆ fIsGLRESMu

bool genie::HELeptonInteractionListGenerator::fIsGLRESMu
private

◆ fIsGLRESTau

bool genie::HELeptonInteractionListGenerator::fIsGLRESTau
private

◆ fIsHENuElCC

bool genie::HELeptonInteractionListGenerator::fIsHENuElCC
private

◆ fIsHENuElNC

bool genie::HELeptonInteractionListGenerator::fIsHENuElNC
private

◆ fIsPhotonCOH

bool genie::HELeptonInteractionListGenerator::fIsPhotonCOH
private

Definition at line 60 of file HELeptonInteractionListGenerator.h.

Referenced by CreateInteractionList(), and LoadConfigData().

◆ fIsPhotonRESEle

bool genie::HELeptonInteractionListGenerator::fIsPhotonRESEle
private

◆ fIsPhotonRESHad

bool genie::HELeptonInteractionListGenerator::fIsPhotonRESHad
private

◆ fIsPhotonRESMu

bool genie::HELeptonInteractionListGenerator::fIsPhotonRESMu
private

◆ fIsPhotonRESTau

bool genie::HELeptonInteractionListGenerator::fIsPhotonRESTau
private

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