CONEXStructures.h
Go to the documentation of this file.
1 
6 #ifndef _io_CONEXStructures_h_
7 #define _io_CONEXStructures_h_
8 
9 // #if _CONEX2R_VERSION >= 565
10 // #include <ConexDynamicInterface.h>
11 // #endif
12 
13 #include <evt/ShowerSimData.h>
14 #include <evt/GenParticle.h>
15 
16 #include <vector>
17 
18 
19 namespace evt {
20  class ShowerSimData;
21 }
22 
23 namespace io {
24 
35  class CONEXHeader {
36  public:
38  int fLowEnergyModel = 0;
39  float fHighLowEnergy = 0;
40  int fSeed = 0;
41  int fParticleID = 0;
42  float fVersion = 0;
43  float fROOTVersion = 0;
44  // cutoffs for MC part of CONEX
45  float fECutHadrons = 0;
46  float fECutEM = 0;
47  // threshold MC --> cascade equation
48  float fEThrHadrons = 0;
49  float fEThrMuons = 0;
50  float fEThrEM = 0;
51  // cutoffs for longitudinal profiles
53  float fECutLongProfMuons = 0;
56  float fDelX = 0;
57  float fFirstDepth = 0;
58 
59  };
60 
61 
72  class CONEXShower {
73 
74  public:
75  CONEXShower(const int nX);
76  ~CONEXShower();
77 
78  void SetVectorLength(const int n);
79 
80  float fLogE = 0;
81  float fZenith = 0;
82  float fAzimuth = 0;
83  float fXfirst = 0;
84  float fX0 = 0;
85  float fXmax = 0;
86  float fNmax = 0;
87  float fP1 = 0;
88  float fP2 = 0;
89  float fP3 = 0;
90  float fChi2 = 0;
91  float fHfirst = 0;
92  int fNX = 0;
93  float* fX = nullptr; // grammage (starting from outputVersion >= 2.0
94  float* fN = nullptr; // charged particles
95  float* fdEdX = nullptr; // energy deposit
96  float* fNmu = nullptr; // muons
97  float* fNgam = nullptr; // gammas
98  float* fNele = nullptr; // electrons
99  float* fMuProd = nullptr; // muon production rate (X)
100  float fGroundEnergy[3] = { 0 }; // energy deposit at ground
101 
102  private:
103  // implement if needed, but don't use compiler-defaults
105  CONEXShower(const CONEXShower&);
106 
107  };
108 
109 
110  // Data about interactions of leading particles
111 
113 
114  public:
115  int GetParentId() const { return fParentId; }
116  double GetParentEnergy() const { return fParentEnergy; }
117  double GetEnergyCM() const { return fEnergyCM; }
118  double GetKinel() const { return fKinel; }
119  int GetMultiplicity() const { return fMultiplicity; }
120  int GetTargetMass() const { return fTargetMass; }
121  double GetDepth() const { return fDepth; }
122  double GetHeight() const { return fHeight; }
123 
124  std::vector<int> GetParticleIds() const { return fParticleIds; }
125  std::vector<double> GetParticleEnergies() const { return fParticleEnergies; }
126 
127  void SetParentId(const int parentId) { fParentId = parentId; }
128  void SetParentEnergy(const double parentEnergy) { fParentEnergy = parentEnergy; }
129  void SetEnergyCM(const double energyCM) { fEnergyCM = energyCM; }
130  void SetKinel(const double kinel) { fKinel = kinel; }
131  void SetMultiplicity(const int mult) { fMultiplicity = mult; }
132  void SetTargetMass(const int targetMass) { fTargetMass = targetMass; }
133  void SetDepth(const double depth) { fDepth = depth; }
134  void SetHeight(const double height) { fHeight = height; }
135 
136  void AddParticleId(const double pId) { fParticleIds.push_back(pId); }
137  void AddParticleEnergy(const double penergy) { fParticleEnergies.push_back(penergy); }
138  void AddInteractionNumber(const int intnumber) { fInteractionNumber.push_back(intnumber); }
139  void AddParticleMass(const double pmass) { fParticleMass.push_back(pmass); }
140 
141  private:
142  int fParentId; // parent id
143  double fParentEnergy; // parent energy [GeV]
144  double fEnergyCM; // center-of-mass energy [GeV]
145  double fKinel; // inelasticity
146  int fMultiplicity; // multiplicity
147  int fTargetMass; // target nucleus mass
148  double fDepth; // depth
149  double fHeight; // height
150 
151  std::vector<int> fParticleIds; // Ids of particles in the interaction
152  std::vector<double> fParticleEnergies; // Energies of particles in the interaction
153  std::vector<double> fParticleMass; // Masses of particles in the interaction
154  std::vector<int> fInteractionNumber; // Interaction number
155 
156  };
157 
158 
159  // utility function to fill ShowerSimData from CONEXHeader and CONEXShower
160  // (last parameters allows to shift shower by grammage of deltaX (for syst.
161  // FD studies))
162  void FillShowerSimDataFromConex(const CONEXHeader& conexHeader,
163  const CONEXShower& conexShower,
165 
166  void FillShowerProfileDataFromConex(const CONEXHeader& conexHeader,
167  const CONEXShower& conexShower,
168  const std::vector<io::CONEXLeadingParticles> conexLPvector,
169  const float conexFileVersion,
171  const double xShift = 0);
172 
173  void FillInteractionData(evt::GenParticle& interactionTree,
174  const std::vector<io::CONEXLeadingParticles>& lpVector,
175  unsigned counter = 0);
176 
177 }
178 
179 
180 #endif
Wrapper for CONEX header information.
Wrapper for CONEX header shower profile data.
double GetParentEnergy() const
void AddParticleId(const double pId)
void SetTargetMass(const int targetMass)
void SetKinel(const double kinel)
void SetParentEnergy(const double parentEnergy)
Interface class to access Shower Simulated parameters.
Definition: ShowerSimData.h:49
std::vector< int > fParticleIds
float fECutLongProfPhotons
void SetMultiplicity(const int mult)
void SetEnergyCM(const double energyCM)
CONEXShower & operator=(const CONEXShower &)
std::vector< double > fParticleEnergies
void AddInteractionNumber(const int intnumber)
void AddParticleMass(const double pmass)
void FillShowerSimDataFromConex(const CONEXHeader &conexHeader, const CONEXShower &conexShower, evt::ShowerSimData &)
void FillInteractionData(evt::GenParticle &interactionTree, const std::vector< io::CONEXLeadingParticles > &lpVector, unsigned counter=0)
float fECutLongProfHadrons
std::vector< double > GetParticleEnergies() const
void FillShowerProfileDataFromConex(const CONEXHeader &conexHeader, const CONEXShower &conexShower, const std::vector< io::CONEXLeadingParticles > conexLPvector, const float conexFileVersion, evt::ShowerSimData &, const double xShift=0)
void SetHeight(const double height)
void SetVectorLength(const int n)
std::vector< int > GetParticleIds() const
std::vector< double > fParticleMass
std::vector< int > fInteractionNumber
CONEXShower(const int nX)
void SetParentId(const int parentId)
float fGroundEnergy[3]
void AddParticleEnergy(const double penergy)
float fECutLongProfElectrons
void SetDepth(const double depth)

, generated on Tue Sep 26 2023.