GENIEGenerator
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
NormInteractionListGenerator.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  Igor Kakorin <kakorin@jinr.ru>
7  Joint Institute for Nuclear Research
8 */
9 //____________________________________________________________________________
10 
11 #include <TMath.h>
12 
17 
18 using namespace genie;
19 
20 //___________________________________________________________________________
22 InteractionListGeneratorI("genie::NormInteractionListGenerator")
23 {
24 
25 }
26 //___________________________________________________________________________
28 InteractionListGeneratorI("genie::NormInteractionListGenerator", config)
29 {
30 
31 }
32 //___________________________________________________________________________
34 {
35 
36 }
37 //___________________________________________________________________________
39  const InitialState & init_state) const
40 {
41  InteractionList * intlist = new InteractionList;
42  int probe = init_state.ProbePdg();
43 
44  bool isNC = probe == kPdgNuE || probe == kPdgAntiNuE ||
45  probe == kPdgNuMu || probe == kPdgAntiNuMu ||
46  probe == kPdgNuTau || probe == kPdgAntiNuTau;
47 
48  bool isEM = probe == kPdgElectron || probe == kPdgPositron ||
49  probe == kPdgMuon || probe == kPdgAntiMuon ||
50  probe == kPdgTau || probe == kPdgAntiTau;
51 
52  if (!isNC && !isEM)
53  {
54  LOG("IntLst", pWARN)
55  << "Unknown InteractionType! Returning NULL InteractionList "
56  << "for init-state: " << init_state.AsString();
57  return 0;
58  }
59 
60  ProcessInfo proc_info(kScNorm, isNC?kIntWeakNC:kIntEM);
61  Interaction * interaction = new Interaction(init_state, proc_info);
62 
63 
64  intlist->push_back(interaction);
65 
66  return intlist;
67 }
68 //___________________________________________________________________________
70 {
71  Algorithm::Configure(config);
72  this->LoadConfigData();
73 }
74 //____________________________________________________________________________
76 {
77  Algorithm::Configure(config);
78  this->LoadConfigData();
79 }
80 //____________________________________________________________________________
82 {
83 
84 }
85 //____________________________________________________________________________
const int kPdgNuE
Definition: PDGCodes.h:28
Defines the InteractionListGeneratorI interface. Concrete implementations of this interface generate ...
const int kPdgAntiNuE
Definition: PDGCodes.h:29
const int kPdgNuMu
Definition: PDGCodes.h:30
const int kPdgAntiMuon
Definition: PDGCodes.h:38
const int kPdgElectron
Definition: PDGCodes.h:35
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
virtual void Configure(const Registry &config)
Definition: Algorithm.cxx:62
int ProbePdg(void) const
Definition: InitialState.h:64
string AsString(void) const
const int kPdgAntiNuTau
Definition: PDGCodes.h:33
const int kPdgAntiNuMu
Definition: PDGCodes.h:31
#define pWARN
Definition: Messenger.h:60
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
const int kPdgAntiTau
Definition: PDGCodes.h:40
A vector of Interaction objects.
const int kPdgMuon
Definition: PDGCodes.h:37
const int kPdgPositron
Definition: PDGCodes.h:36
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