GENIEGenerator
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
HELeptonInteractionListGenerator.cxx
Go to the documentation of this file.
1 //____________________________________________________________________________
2 /*
3  Copyright (c) 2003-2024, The GENIE Collaboration
4  For the full text of the license visit http://copyright.genie-mc.org
5 
6  Alfonso Garcia <aagarciasoto \at km3net.de>
7  IFIC & Harvard University
8 */
9 //____________________________________________________________________________
10 
17 
18 using namespace genie;
19 
20 //___________________________________________________________________________
22 InteractionListGeneratorI("genie::HELeptonInteractionListGenerator")
23 {
24 
25 }
26 //___________________________________________________________________________
28 InteractionListGeneratorI("genie::HELeptonInteractionListGenerator", config)
29 {
30 
31 }
32 //___________________________________________________________________________
34 {
35 
36 }
37 //___________________________________________________________________________
40  const InitialState & init_state) const
41 {
42 
43 
44  InteractionList * intlist = new InteractionList;
45 
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 }
66 //___________________________________________________________________________
69  const InitialState & init_state) const
70 {
71 
72 
73  InteractionList * intlist = new InteractionList;
74 
75  int probepdg = init_state.ProbePdg();
76 
77  if (fIsHENuElCC) {
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) {
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 }
108 //___________________________________________________________________________
111  const InitialState & init_state) const
112 {
113 
114  InteractionList * intlist = new InteractionList;
115 
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 }
142 //___________________________________________________________________________
145  const InitialState & init_state) const
146 {
147 
148  InteractionList * intlist = new InteractionList;
150  Interaction * interaction = new Interaction(init_state, proc_info);
151  intlist->push_back(interaction);
152  return intlist;
153 
154 }
155 //___________________________________________________________________________
158  const InitialState & init_state) const
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 }
201 //___________________________________________________________________________
203 {
204  Algorithm::Configure(config);
205  this->LoadConfigData();
206 }
207 //____________________________________________________________________________
209 {
210  Algorithm::Configure(config);
211  this->LoadConfigData();
212 }
213 //____________________________________________________________________________
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 IsNuTau(int pdgc)
Definition: PDGUtils.cxx:168
#define pERROR
Definition: Messenger.h:59
Defines the InteractionListGeneratorI interface. Concrete implementations of this interface generate ...
const int kPdgAntiNuE
Definition: PDGCodes.h:29
InteractionList * GLRESInteraction(const InitialState &init_state) const
bool IsAntiNuTau(int pdgc)
Definition: PDGUtils.cxx:183
bool IsNuE(int pdgc)
Definition: PDGUtils.cxx:158
const int kPdgAntiMuon
Definition: PDGCodes.h:38
const int kPdgElectron
Definition: PDGCodes.h:35
InteractionList * CreateInteractionList(const InitialState &init) const
Contains minimal information for tagging exclusive processes.
Definition: XclsTag.h:39
bool IsNuMu(int pdgc)
Definition: PDGUtils.cxx:163
Summary information for an interaction.
Definition: Interaction.h:56
#define LOG(stream, priority)
A macro that returns the requested log4cpp::Category appending a string (using the FILE...
Definition: Messenger.h:96
const int kPdgTau
Definition: PDGCodes.h:39
A class encapsulating an enumeration of interaction types (EM, Weak-CC, Weak-NC) and scattering types...
Definition: ProcessInfo.h:46
void SetFinalLepton(int finallepton_pdgc=0)
Definition: XclsTag.cxx:144
A Neutrino Interaction Target. Is a transparent encapsulation of quite different physical systems suc...
Definition: Target.h:40
virtual void Configure(const Registry &config)
Definition: Algorithm.cxx:62
int ProbePdg(void) const
Definition: InitialState.h:64
const int kPdgPiP
Definition: PDGCodes.h:158
string AsString(void) const
int Z(void) const
Definition: Target.h:68
bool IsAntiNuMu(int pdgc)
Definition: PDGUtils.cxx:178
#define pWARN
Definition: Messenger.h:60
bool IsNeutralLepton(int pdgc)
Definition: PDGUtils.cxx:95
void SetExclTag(const XclsTag &xcls)
int N(void) const
Definition: Target.h:69
A registry. Provides the container for algorithm configuration parameters.
Definition: Registry.h:65
void SetHitNucPdg(int pdgc)
Definition: Target.cxx:171
Target * TgtPtr(void) const
Definition: InitialState.h:67
InteractionList * PhotonRESInteraction(const InitialState &init_state) const
const int kPdgPiM
Definition: PDGCodes.h:159
const int kPdgAntiTau
Definition: PDGCodes.h:40
A vector of Interaction objects.
InitialState * InitStatePtr(void) const
Definition: Interaction.h:74
InteractionList * HENuElectronInteraction(const InitialState &init_state) const
const int kPdgProton
Definition: PDGCodes.h:81
bool GetParamDef(const RgKey &name, T &p, const T &def) const
const Target & Tgt(void) const
Definition: InitialState.h:66
const int kPdgMuon
Definition: PDGCodes.h:37
InteractionList * PhotonCOHInteraction(const InitialState &init_state) const
const int kPdgPositron
Definition: PDGCodes.h:36
const int kPdgNeutron
Definition: PDGCodes.h:83
Most commonly used PDG codes. A set of utility functions to handle PDG codes is provided in PDGUtils...
Initial State information.
Definition: InitialState.h:48