GENIEGenerator
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
SPPEventGenerator.h
Go to the documentation of this file.
1 //____________________________________________________________________________
2 /*!
3 
4 \class genie::SPPEventGenerator
5 
6 \brief Generates resonance single pion production event for the following channels:
7 
8 for the following channels:
9 
10  1 nu + p -> l + p + pi+
11  2 nu + n -> l + p + pi0
12  3 nu + n -> l + n + pi+
13  4 antinu + n -> l+ + n + pi-
14  5 antinu + p -> l+ + n + pi0
15  6 antinu + p -> l+ + p + pi-
16  7 nu + p -> nu + p + pi0
17  8 nu + p -> nu + n + pi+
18  9 nu + n -> nu + n + pi0
19  10 nu + n -> nu + p + pi-
20  11 antinu + p -> antinu + p + pi0
21  12 antinu + p -> antinu + n + pi+
22  13 antinu + n -> antinu + n + pi0
23  14 antinu + n -> antinu + p + pi-
24 
25 Is a concrete implementation of the EventRecordVisitorI interface.
26 
27 \authors Igor Kakorin <kakorin@jinr.ru>, Joint Institute for Nuclear Research \n
28  Vadim Naumov <vnaumov@theor.jinr.ru>, Joint Institute for Nuclear Research \n
29 
30 \created May 9, 2020
31 
32 \cpright Copyright (c) 2003-2024, The GENIE Collaboration
33  For the full text of the license visit http://copyright.genie-mc.org
34  or see $GENIE/LICENSE
35 */
36 //____________________________________________________________________________
37 
38 #ifndef _SPP_EVENT_GENERATOR_H_
39 #define _SPP_EVENT_GENERATOR_H_
40 
41 #include <Math/IFunction.h>
42 #include <Math/IntegratorMultiDim.h>
43 
44 #include "Framework/Utils/Range1.h"
46 
47 
48 namespace genie {
49 
51 
52 public :
54  SPPEventGenerator(string config);
56 
57  // implement the EventRecordVisitorI interface
58  void ProcessEventRecord(GHepRecord * event_rec) const;
59 
60  // overload the Algorithm::Configure() methods to load private data
61  // members from configuration options
62  void Configure(const Registry & config);
63  void Configure(string config);
64 
65 private:
66  void LoadConfig (void);
67  double ComputeMaxXSec (const Interaction * interaction) const;
68  int GetRecoilNucleonPdgCode(Interaction * interaction) const;
69  int GetFinalPionPdgCode(Interaction * interaction) const;
70  double fWcut;
71  struct Vertex
72  {
73  Vertex () : Vertex (0., 0., 0., 0.)
74  {};
75  Vertex (double px1, double px2, double px3, double px4) : x1(px1), x2(px2), x3(px3), x4(px4)
76  {};
77  ~Vertex(){};
78  double x1, x2, x3, x4;
79  void Print (std::ostream& os)
80  {
81  os << "(" << x1 << "," << x2 << "," << x3 << "," << x4 << ")";
82  };
83  bool operator == (const Vertex &v) const
84  {
85  double epsilon = 1e-5;
86  return (TMath::Abs(this->x1 - v.x1) < epsilon || TMath::Abs(this->x2 - v.x2) < epsilon || TMath::Abs(this->x3 - v.x3) < epsilon || TMath::Abs(this->x4 - v.x4) < epsilon);
87  };
88 
89  };
90 
91  struct Cell
92  {
93  Cell(){};
94  ~Cell(){};
97  void Print (std::ostream& os)
98  {
99  os << std::endl;
100  os << "vertex1 = ";
101  Vertex1.Print(os);
102  os << std::endl;
103  os << "vertex2 = ";
104  Vertex2.Print(os);
105  os << std::endl;
106  };
107  };
108 
109  int fMaxDepth; ///< Maximum depth of dividing parent cell
110 
111 };
112 
113 
114 
115 class XSecAlgorithmI;
116 class Interaction;
117 
118 namespace utils {
119 namespace gsl {
120 
121 
122 
123 //.....................................................................................
124 //
125 // genie::utils::gsl::d4XSecMK_dWQ2CosThetaPhi_E
126 // A 4-D cross section function: d4XSecMK_dWQ2CosThetaPhi_E = f(W, Q2, CosTheta, Phi)|(fixed E)
127 //
128 class d4XSecMK_dWQ2CosThetaPhi_E: public ROOT::Math::IBaseFunctionMultiDim
129 {
130 public:
131  d4XSecMK_dWQ2CosThetaPhi_E(const XSecAlgorithmI * m, const Interaction * i, double wcut);
133 
134  // ROOT::Math::IBaseFunctionMultiDim interface
135  unsigned int NDim (void) const;
136  double DoEval (const double * xin) const;
137  ROOT::Math::IBaseFunctionMultiDim * Clone (void) const;
138 
139 private:
143  double fWcut;
144  bool isZero;
146 };
147 
148 
149 } // gsl namespace
150 } // utils namespace
151 
152 } // genie namespace
153 #endif // _SPP_EVENT_GENERATOR_H_
Cross Section Calculation Interface.
Vertex(double px1, double px2, double px3, double px4)
int GetRecoilNucleonPdgCode(Interaction *interaction) const
bool operator==(const Vertex &v) const
A simple [min,max] interval for doubles.
Definition: Range1.h:42
Abstract class. Provides a data caching mechanism for for concrete implementations of the EventRecord...
void ProcessEventRecord(GHepRecord *event_rec) const
const double epsilon
ROOT::Math::IBaseFunctionMultiDim * Clone(void) const
Summary information for an interaction.
Definition: Interaction.h:56
const double e
Kinematical phase space.
Definition: KPhaseSpace.h:33
Generates resonance single pion production event for the following channels:
void Configure(const Registry &config)
A registry. Provides the container for algorithm configuration parameters.
Definition: Registry.h:65
void Print(std::ostream &os)
d4XSecMK_dWQ2CosThetaPhi_E(const XSecAlgorithmI *m, const Interaction *i, double wcut)
int fMaxDepth
Maximum depth of dividing parent cell.
int GetFinalPionPdgCode(Interaction *interaction) const
GENIE&#39;s GHEP MC event record.
Definition: GHepRecord.h:45
static constexpr double m
Definition: Units.h:71
double ComputeMaxXSec(const Interaction *interaction) const