GLRESInteractionListGenerator.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::GLRESInteractionListGenerator")
23 {
24 
25 }
26 //___________________________________________________________________________
28 InteractionListGeneratorI("genie::GLRESInteractionListGenerator", config)
29 {
30 
31 }
32 //___________________________________________________________________________
34 {
35 
36 }
37 //___________________________________________________________________________
40  const InitialState & init_state) const
41 {
42 // channels:
43 // nuebar + e- -> W- -> nuebar + e-
44 // nuebar + e- -> W- -> nuebar + mu-
45 // nuebar + e- -> W- -> nuebar + tau-
46 // nuebar + e- -> W- -> hadrons
47 
48  if(init_state.ProbePdg() != kPdgAntiNuE) {
49  LOG("IntLst", pDEBUG)
50  << "Return *null* interaction list";
51  return 0;
52  }
53 
54  InitialState init(init_state);
55  init_state.TgtPtr()->SetHitNucPdg(0);
56 
58 
59  InteractionList * intlist = new InteractionList;
60 
61  if (fIsMu) {
62  Interaction * interaction = new Interaction(init_state, proc_info);
63  XclsTag exclusive_tag;
64  exclusive_tag.SetFinalLepton(kPdgMuon);
65  interaction->SetExclTag(exclusive_tag);
66  intlist->push_back(interaction);
67  }
68  else if (fIsTau) {
69  Interaction * interaction = new Interaction(init_state, proc_info);
70  XclsTag exclusive_tag;
71  exclusive_tag.SetFinalLepton(kPdgTau);
72  interaction->SetExclTag(exclusive_tag);
73  intlist->push_back(interaction);
74  }
75  else if (fIsEle) {
76  Interaction * interaction = new Interaction(init_state, proc_info);
77  XclsTag exclusive_tag;
78  exclusive_tag.SetFinalLepton(kPdgElectron);
79  interaction->SetExclTag(exclusive_tag);
80  intlist->push_back(interaction);
81  }
82  else if (fIsHad) {
83  Interaction * interaction = new Interaction(init_state, proc_info);
84  XclsTag exclusive_tag;
85  exclusive_tag.SetFinalLepton(kPdgPiP);
86  interaction->SetExclTag(exclusive_tag);
87  intlist->push_back(interaction);
88  }
89 
90  if(intlist->size() == 0) {
91  LOG("IntLst", pERROR)
92  << "Returning NULL InteractionList for init-state: "
93  << init_state.AsString();
94  delete intlist;
95  return 0;
96  }
97 
98  return intlist;
99 }
100 //___________________________________________________________________________
102 {
103  Algorithm::Configure(config);
104  this->LoadConfigData();
105 }
106 //____________________________________________________________________________
108 {
109  Algorithm::Configure(config);
110  this->LoadConfigData();
111 }
112 //____________________________________________________________________________
114 {
115 
116  GetParamDef("is-Mu", fIsMu, false ) ;
117  GetParamDef("is-Tau", fIsTau, false ) ;
118  GetParamDef("is-Ele", fIsEle, false ) ;
119  GetParamDef("is-Had", fIsHad, false ) ;
120 
121 }
THE MAIN GENIE PROJECT NAMESPACE
Definition: AlgCmp.h:25
#define pERROR
Definition: Messenger.h:59
Defines the InteractionListGeneratorI interface. Concrete implementations of this interface generate ...
const int kPdgAntiNuE
Definition: PDGCodes.h:29
const int kPdgElectron
Definition: PDGCodes.h:35
init
Definition: train.py:42
Contains minimal information for tagging exclusive processes.
Definition: XclsTag.h:39
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
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
void SetFinalLepton(int finallepton_pdgc=0)
Definition: XclsTag.cxx:144
InteractionList * CreateInteractionList(const InitialState &init) const
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
void SetExclTag(const XclsTag &xcls)
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.
bool GetParamDef(const RgKey &name, T &p, const T &def) const
const int kPdgMuon
Definition: PDGCodes.h:37
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