NuEInteractionListGenerator.cxx
Go to the documentation of this file.
1 //____________________________________________________________________________
2 /*
3  Copyright (c) 2003-2020, The GENIE Collaboration
4  For the full text of the license visit http://copyright.genie-mc.org
5 
6  Costas Andreopoulos <constantinos.andreopoulos \at cern.ch>
7  University of Liverpool & STFC Rutherford Appleton Laboratory
8 */
9 //____________________________________________________________________________
10 
17 
18 using namespace genie;
19 
20 //___________________________________________________________________________
22 InteractionListGeneratorI("genie::NuEInteractionListGenerator")
23 {
24 
25 }
26 //___________________________________________________________________________
28 InteractionListGeneratorI("genie::NuEInteractionListGenerator", config)
29 {
30 
31 }
32 //___________________________________________________________________________
34 {
35 
36 }
37 //___________________________________________________________________________
39  const InitialState & init_state) const
40 {
41  LOG("IntLst", pINFO) << "InitialState = " << init_state.AsString();
42 
43  if(fIsIMD) return this -> IMDInteractionList (init_state);
44  else if(fIsIMDAnh) return this -> IMDAnnihilationInteractionList (init_state);
45  else return this -> NuEELInteractionList (init_state);
46 }
47 //___________________________________________________________________________
49  const InitialState & init_state) const
50 {
51 // channels:
52 // numu + e- -> mu- + nu_e [CC] -- 'inverse muon decay'
53 
54  if(init_state.ProbePdg() != kPdgNuMu) {
55  LOG("IntLst", pDEBUG)
56  << "Return *null* interaction list (non nu_mu probe in IMD thread)";
57  return 0;
58  }
59 
60  InteractionList * intlist = new InteractionList;
61 
62  // clone init state and de-activate the struck nucleon info
63  InitialState init(init_state);
64  init_state.TgtPtr()->SetHitNucPdg(0);
65 
67  Interaction * interaction = new Interaction(init, proc_info);
68 
69  intlist->push_back(interaction);
70 
71  return intlist;
72 }
73 //___________________________________________________________________________
75  const InitialState & init_state) const
76 {
77 // channels:
78 // nuebar + e- -> mu- + nu_e [CC] -- 'inverse muon decay annihilation channel'
79 
80  if(init_state.ProbePdg() != kPdgAntiNuE) {
81  LOG("IntLst", pDEBUG)
82  << "Return *null* interaction list (non anti_nu_e probe in IMDAnnihilation thread)";
83  return 0;
84  }
85 
86  InteractionList * intlist = new InteractionList;
87 
88  // clone init state and de-activate the struck nucleon info
89  InitialState init(init_state);
90  init_state.TgtPtr()->SetHitNucPdg(0);
91 
93  Interaction * interaction = new Interaction(init, proc_info);
94 
95  intlist->push_back(interaction);
96 
97  return intlist;
98 }
99 //___________________________________________________________________________
101  const InitialState & init_state) const
102 {
103 // channels:
104 // nue + e- -> nue + e- [CC + NC + interference]
105 // nuebar + e- -> nuebar + e- [CC + NC + interference]
106 // numu + e- -> numu + e- [NC]
107 // numu + e- -> mu- + nu_e [CC] -- handled by the IMD thread
108 // nutau + e- -> nutau + e- [NC]
109 // nutau + e- -> tau - + nu_e [CC] -- neglected
110 // numubar + e- -> numubar + e- [NC]
111 // nutaubar + e- -> nutaubar + e- [NC]
112 
113  int nupdg = init_state.ProbePdg();
114  InteractionList * intlist = new InteractionList;
115 
116  // clone init state and de-activate the struck nucleon info
117  InitialState init(init_state);
118  init_state.TgtPtr()->SetHitNucPdg(0);
119 
120  // NC
121  if(nupdg == kPdgNuMu || nupdg == kPdgAntiNuMu ||
122  nupdg == kPdgNuTau || nupdg == kPdgAntiNuTau) {
124  Interaction * interaction = new Interaction(init, proc_info);
125  intlist->push_back(interaction);
126  }
127 
128  // CC+NC+interference
129  if(nupdg == kPdgNuE || nupdg == kPdgAntiNuE) {
131  Interaction * interaction = new Interaction(init, proc_info);
132  intlist->push_back(interaction);
133  }
134 
135  return intlist;
136 }
137 //___________________________________________________________________________
139 {
140  Algorithm::Configure(config);
141  this->LoadConfig();
142 }
143 //____________________________________________________________________________
145 {
146  Algorithm::Configure(config);
147  this->LoadConfig();
148 }
149 //____________________________________________________________________________
151 {
152  GetParamDef( "is-IMD", fIsIMD, false ) ;
153  GetParamDef( "is-IMD-ANH", fIsIMDAnh, false ) ;
154 }
155 //____________________________________________________________________________
const int kPdgNuE
Definition: PDGCodes.h:28
THE MAIN GENIE PROJECT NAMESPACE
Definition: AlgCmp.h:25
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
init
Definition: train.py:42
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
static Config * config
Definition: config.cpp:1054
A class encapsulating an enumeration of interaction types (EM, Weak-CC, Weak-NC) and scattering types...
Definition: ProcessInfo.h:46
virtual void Configure(const Registry &config)
Definition: Algorithm.cxx:62
int ProbePdg(void) const
Definition: InitialState.h:64
string AsString(void) const
#define pINFO
Definition: Messenger.h:62
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:65
void SetHitNucPdg(int pdgc)
Definition: Target.cxx:171
Target * TgtPtr(void) const
Definition: InitialState.h:67
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:48
#define pDEBUG
Definition: Messenger.h:63