NuEInteractionListGenerator.cxx
Go to the documentation of this file.
1 //____________________________________________________________________________
2 /*
3  Copyright (c) 2003-2019, The GENIE Collaboration
4  For the full text of the license visit http://copyright.genie-mc.org
5  or see $GENIE/LICENSE
6 
7  Author: Costas Andreopoulos <costas.andreopoulos \at stfc.ac.uk>
8  University of Liverpool & STFC Rutherford Appleton Lab
9 
10  For the class documentation see the corresponding header file.
11 
12  Important revisions after version 2.0.0 :
13  @ Feb 09, 2009 - CA
14  Moved into the NuE package from its previous location (EVGModules package)
15  @ Feb 12, 2013 - CA (code from Rosen Matev)
16  Handle the IMD annihilation channel.
17 
18 */
19 //____________________________________________________________________________
20 
27 
28 using namespace genie;
29 
30 //___________________________________________________________________________
32 InteractionListGeneratorI("genie::NuEInteractionListGenerator")
33 {
34 
35 }
36 //___________________________________________________________________________
38 InteractionListGeneratorI("genie::NuEInteractionListGenerator", config)
39 {
40 
41 }
42 //___________________________________________________________________________
44 {
45 
46 }
47 //___________________________________________________________________________
49  const InitialState & init_state) const
50 {
51  LOG("IntLst", pINFO) << "InitialState = " << init_state.AsString();
52 
53  if(fIsIMD) return this -> IMDInteractionList (init_state);
54  else if(fIsIMDAnh) return this -> IMDAnnihilationInteractionList (init_state);
55  else return this -> NuEELInteractionList (init_state);
56 }
57 //___________________________________________________________________________
59  const InitialState & init_state) const
60 {
61 // channels:
62 // numu + e- -> mu- + nu_e [CC] -- 'inverse muon decay'
63 
64  if(init_state.ProbePdg() != kPdgNuMu) {
65  LOG("IntLst", pDEBUG)
66  << "Return *null* interaction list (non nu_mu probe in IMD thread)";
67  return 0;
68  }
69 
70  InteractionList * intlist = new InteractionList;
71 
72  // clone init state and de-activate the struck nucleon info
73  InitialState init(init_state);
74  init_state.TgtPtr()->SetHitNucPdg(0);
75 
77  Interaction * interaction = new Interaction(init, proc_info);
78 
79  intlist->push_back(interaction);
80 
81  return intlist;
82 }
83 //___________________________________________________________________________
85  const InitialState & init_state) const
86 {
87 // channels:
88 // nuebar + e- -> mu- + nu_e [CC] -- 'inverse muon decay annihilation channel'
89 
90  if(init_state.ProbePdg() != kPdgAntiNuE) {
91  LOG("IntLst", pDEBUG)
92  << "Return *null* interaction list (non anti_nu_e probe in IMDAnnihilation thread)";
93  return 0;
94  }
95 
96  InteractionList * intlist = new InteractionList;
97 
98  // clone init state and de-activate the struck nucleon info
99  InitialState init(init_state);
100  init_state.TgtPtr()->SetHitNucPdg(0);
101 
103  Interaction * interaction = new Interaction(init, proc_info);
104 
105  intlist->push_back(interaction);
106 
107  return intlist;
108 }
109 //___________________________________________________________________________
111  const InitialState & init_state) const
112 {
113 // channels:
114 // nue + e- -> nue + e- [CC + NC + interference]
115 // nuebar + e- -> nuebar + e- [CC + NC + interference]
116 // numu + e- -> numu + e- [NC]
117 // numu + e- -> mu- + nu_e [CC] -- handled by the IMD thread
118 // nutau + e- -> nutau + e- [NC]
119 // nutau + e- -> tau - + nu_e [CC] -- neglected
120 // numubar + e- -> numubar + e- [NC]
121 // nutaubar + e- -> nutaubar + e- [NC]
122 
123  int nupdg = init_state.ProbePdg();
124  InteractionList * intlist = new InteractionList;
125 
126  // clone init state and de-activate the struck nucleon info
127  InitialState init(init_state);
128  init_state.TgtPtr()->SetHitNucPdg(0);
129 
130  // NC
131  if(nupdg == kPdgNuMu || nupdg == kPdgAntiNuMu ||
132  nupdg == kPdgNuTau || nupdg == kPdgAntiNuTau) {
134  Interaction * interaction = new Interaction(init, proc_info);
135  intlist->push_back(interaction);
136  }
137 
138  // CC+NC+interference
139  if(nupdg == kPdgNuE || nupdg == kPdgAntiNuE) {
141  Interaction * interaction = new Interaction(init, proc_info);
142  intlist->push_back(interaction);
143  }
144 
145  return intlist;
146 }
147 //___________________________________________________________________________
149 {
150  Algorithm::Configure(config);
151  this->LoadConfig();
152 }
153 //____________________________________________________________________________
155 {
156  Algorithm::Configure(config);
157  this->LoadConfig();
158 }
159 //____________________________________________________________________________
161 {
162  GetParamDef( "is-IMD", fIsIMD, false ) ;
163  GetParamDef( "is-IMD-ANH", fIsIMDAnh, false ) ;
164 }
165 //____________________________________________________________________________
166 
const int kPdgNuE
Definition: PDGCodes.h:28
THE MAIN GENIE PROJECT NAMESPACE
Definition: GeneratorBase.h:8
InteractionList * IMDAnnihilationInteractionList(const InitialState &init_state) const
Defines the InteractionListGeneratorI interface. Concrete implementations of this interface generate ...
InteractionList * IMDInteractionList(const InitialState &init_state) const
const int kPdgAntiNuE
Definition: PDGCodes.h:29
const int kPdgNuMu
Definition: PDGCodes.h:30
Definition: config.py:1
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:97
A class encapsulating an enumeration of interaction types (EM, Weak-CC, Weak-NC) and scattering types...
Definition: ProcessInfo.h:44
virtual void Configure(const Registry &config)
Definition: Algorithm.cxx:70
int ProbePdg(void) const
Definition: InitialState.h:65
string AsString(void) const
#define pINFO
Definition: Messenger.h:63
const int kPdgAntiNuTau
Definition: PDGCodes.h:33
const int kPdgAntiNuMu
Definition: PDGCodes.h:31
InteractionList * CreateInteractionList(const InitialState &init) const
const int kPdgNuTau
Definition: PDGCodes.h:32
A registry. Provides the container for algorithm configuration parameters.
Definition: Registry.h:66
void SetHitNucPdg(int pdgc)
Definition: Target.cxx:188
Target * TgtPtr(void) const
Definition: InitialState.h:68
A vector of Interaction objects.
InteractionList * NuEELInteractionList(const InitialState &init_state) const
bool GetParamDef(const RgKey &name, T &p, const T &def) const
Most commonly used PDG codes. A set of utility functions to handle PDG codes is provided in PDGUtils...
Initial State information.
Definition: InitialState.h:49
#define pDEBUG
Definition: Messenger.h:64