GENIEGenerator
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Public Member Functions | Private Member Functions | Private Attributes | List of all members
genie::NuEInteractionListGenerator Class Reference

Concrete implementations of the InteractionListGeneratorI interface. Generates a list of all the Interaction (= event summary) objects that can be generated by the NUE EventGenerator. More...

#include <NuEInteractionListGenerator.h>

Inheritance diagram for genie::NuEInteractionListGenerator:
Inheritance graph
[legend]
Collaboration diagram for genie::NuEInteractionListGenerator:
Collaboration graph
[legend]

Public Member Functions

 NuEInteractionListGenerator ()
 
 NuEInteractionListGenerator (string config)
 
 ~NuEInteractionListGenerator ()
 
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. More...
 
virtual AlgStatus_t GetStatus (void) const
 Get algorithm status. More...
 
virtual bool AllowReconfig (void) const
 
virtual AlgCmp_t Compare (const Algorithm *alg) const
 Compare with input algorithm. More...
 
virtual void SetId (const AlgId &id)
 Set algorithm ID. More...
 
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. More...
 

Private Member Functions

InteractionListIMDInteractionList (const InitialState &init_state) const
 
InteractionListIMDAnnihilationInteractionList (const InitialState &init_state) const
 
InteractionListNuEELInteractionList (const InitialState &init_state) const
 
void LoadConfig (void)
 

Private Attributes

bool fIsIMD
 
bool fIsIMDAnh
 

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. More...
 
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. More...
 
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. More...
 
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 More...
 
int AddLowRegistry (Registry *rp, bool owns=true)
 add registry with lowest priority, also update ownership More...
 
int MergeTopRegistry (const Registry &r)
 
int AddTopRegisties (const vector< Registry * > &rs, bool owns=false)
 Add registries with top priority, also udated Ownerships. More...
 
- Protected Attributes inherited from genie::Algorithm
bool fAllowReconfig
 
bool fOwnsSubstruc
 true if it owns its substructure (sub-algs,...) More...
 
AlgId fID
 algorithm name and configuration set More...
 
vector< Registry * > fConfVect
 
vector< bool > fOwnerships
 ownership for every registry in fConfVect More...
 
AlgStatus_t fStatus
 algorithm execution status More...
 
AlgMapfOwnedSubAlgMp
 local pool for owned sub-algs (taken out of the factory pool) More...
 

Detailed Description

Concrete implementations of the InteractionListGeneratorI interface. Generates a list of all the Interaction (= event summary) objects that can be generated by the NUE EventGenerator.

Author
Costas Andreopoulos <c.andreopoulos cern.ch> University of Liverpool
Created:
July 13, 2005
License:
Copyright (c) 2003-2024, The GENIE Collaboration For the full text of the license visit http://copyright.genie-mc.org

Definition at line 27 of file NuEInteractionListGenerator.h.

Constructor & Destructor Documentation

NuEInteractionListGenerator::NuEInteractionListGenerator ( )

Definition at line 21 of file NuEInteractionListGenerator.cxx.

21  :
22 InteractionListGeneratorI("genie::NuEInteractionListGenerator")
23 {
24 
25 }
NuEInteractionListGenerator::NuEInteractionListGenerator ( string  config)

Definition at line 27 of file NuEInteractionListGenerator.cxx.

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

Definition at line 33 of file NuEInteractionListGenerator.cxx.

34 {
35 
36 }

Member Function Documentation

void NuEInteractionListGenerator::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 138 of file NuEInteractionListGenerator.cxx.

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

139 {
140  Algorithm::Configure(config);
141  this->LoadConfig();
142 }
virtual void Configure(const Registry &config)
Definition: Algorithm.cxx:62
void NuEInteractionListGenerator::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 144 of file NuEInteractionListGenerator.cxx.

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

145 {
146  Algorithm::Configure(config);
147  this->LoadConfig();
148 }
virtual void Configure(const Registry &config)
Definition: Algorithm.cxx:62
InteractionList * NuEInteractionListGenerator::CreateInteractionList ( const InitialState init) const
virtual

Implements genie::InteractionListGeneratorI.

Definition at line 38 of file NuEInteractionListGenerator.cxx.

References genie::InitialState::AsString(), fIsIMD, fIsIMDAnh, IMDAnnihilationInteractionList(), IMDInteractionList(), LOG, NuEELInteractionList(), and pINFO.

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 }
InteractionList * IMDAnnihilationInteractionList(const InitialState &init_state) const
InteractionList * IMDInteractionList(const InitialState &init_state) const
#define LOG(stream, priority)
A macro that returns the requested log4cpp::Category appending a string (using the FILE...
Definition: Messenger.h:96
#define pINFO
Definition: Messenger.h:62
InteractionList * NuEELInteractionList(const InitialState &init_state) const
InteractionList * NuEInteractionListGenerator::IMDAnnihilationInteractionList ( const InitialState init_state) const
private

Definition at line 74 of file NuEInteractionListGenerator.cxx.

References genie::kIntWeakCC, genie::kPdgAntiNuE, genie::kScIMDAnnihilation, LOG, pDEBUG, genie::InitialState::ProbePdg(), genie::Target::SetHitNucPdg(), and genie::InitialState::TgtPtr().

Referenced by CreateInteractionList().

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 }
const int kPdgAntiNuE
Definition: PDGCodes.h:29
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
A class encapsulating an enumeration of interaction types (EM, Weak-CC, Weak-NC) and scattering types...
Definition: ProcessInfo.h:46
int ProbePdg(void) const
Definition: InitialState.h:64
void SetHitNucPdg(int pdgc)
Definition: Target.cxx:171
Target * TgtPtr(void) const
Definition: InitialState.h:67
A vector of Interaction objects.
Initial State information.
Definition: InitialState.h:48
#define pDEBUG
Definition: Messenger.h:63
InteractionList * NuEInteractionListGenerator::IMDInteractionList ( const InitialState init_state) const
private

Definition at line 48 of file NuEInteractionListGenerator.cxx.

References genie::kIntWeakCC, genie::kPdgNuMu, genie::kScInverseMuDecay, LOG, pDEBUG, genie::InitialState::ProbePdg(), genie::Target::SetHitNucPdg(), and genie::InitialState::TgtPtr().

Referenced by CreateInteractionList().

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 }
const int kPdgNuMu
Definition: PDGCodes.h:30
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
A class encapsulating an enumeration of interaction types (EM, Weak-CC, Weak-NC) and scattering types...
Definition: ProcessInfo.h:46
int ProbePdg(void) const
Definition: InitialState.h:64
void SetHitNucPdg(int pdgc)
Definition: Target.cxx:171
Target * TgtPtr(void) const
Definition: InitialState.h:67
A vector of Interaction objects.
Initial State information.
Definition: InitialState.h:48
#define pDEBUG
Definition: Messenger.h:63
void NuEInteractionListGenerator::LoadConfig ( void  )
private

Definition at line 150 of file NuEInteractionListGenerator.cxx.

References fIsIMD, fIsIMDAnh, and genie::Algorithm::GetParamDef().

Referenced by Configure().

151 {
152  GetParamDef( "is-IMD", fIsIMD, false ) ;
153  GetParamDef( "is-IMD-ANH", fIsIMDAnh, false ) ;
154 }
bool GetParamDef(const RgKey &name, T &p, const T &def) const
InteractionList * NuEInteractionListGenerator::NuEELInteractionList ( const InitialState init_state) const
private

Definition at line 100 of file NuEInteractionListGenerator.cxx.

References genie::kIntWeakMix, genie::kIntWeakNC, genie::kPdgAntiNuE, genie::kPdgAntiNuMu, genie::kPdgAntiNuTau, genie::kPdgNuE, genie::kPdgNuMu, genie::kPdgNuTau, genie::kScNuElectronElastic, genie::InitialState::ProbePdg(), genie::Target::SetHitNucPdg(), and genie::InitialState::TgtPtr().

Referenced by CreateInteractionList().

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 }
const int kPdgNuE
Definition: PDGCodes.h:28
const int kPdgAntiNuE
Definition: PDGCodes.h:29
const int kPdgNuMu
Definition: PDGCodes.h:30
Summary information for an interaction.
Definition: Interaction.h:56
A class encapsulating an enumeration of interaction types (EM, Weak-CC, Weak-NC) and scattering types...
Definition: ProcessInfo.h:46
int ProbePdg(void) const
Definition: InitialState.h:64
const int kPdgAntiNuTau
Definition: PDGCodes.h:33
const int kPdgAntiNuMu
Definition: PDGCodes.h:31
const int kPdgNuTau
Definition: PDGCodes.h:32
void SetHitNucPdg(int pdgc)
Definition: Target.cxx:171
Target * TgtPtr(void) const
Definition: InitialState.h:67
A vector of Interaction objects.
Initial State information.
Definition: InitialState.h:48

Member Data Documentation

bool genie::NuEInteractionListGenerator::fIsIMD
private

Definition at line 49 of file NuEInteractionListGenerator.h.

Referenced by CreateInteractionList(), and LoadConfig().

bool genie::NuEInteractionListGenerator::fIsIMDAnh
private

Definition at line 50 of file NuEInteractionListGenerator.h.

Referenced by CreateInteractionList(), and LoadConfig().


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