forked from bquilain/WCSim
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathTNRooTrackerVtx.hh
195 lines (149 loc) · 8.23 KB
/
TNRooTrackerVtx.hh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
//
//
#ifndef NRooTrackerVtx_hh_seen
#define NRooTrackerVtx_hh_seen
#include <iostream>
#include <vector>
#include "TObject.h"
#include "TBits.h"
#include "TObjString.h"
#include "TJNuBeamFlux.hh"
using std::ostream;
///
/// This is a simple event class which is essentially an objectified version
/// of the NEUT nRooTracker output format. Because the nRooTracker is forcing
/// NEUT event into a GENIE defined storage care needs to be taken when
/// interpreting the meaning of various data members. For example the StdHepStatus
/// does not have a one to one mapping to GENIE StdHep status. Using this class
/// with GENIE based utils or the GENIE ReWeighting tools can (and most likely
/// will result in false results!
///
/// Therefore, the native NEUT particle information common blocks (VCWORK, FSIHIST)
/// are included. Analysis tools under development...
/// DBrailsford 10-2013: All 1D arrays are now in a dynamic format (rather than fixed length).
/// Due to the class structure of the oaAnalysis NRooTracker object being used to extract the
/// information from the numc file, two versions of the 1D arrays are initialised.
/// Each array has a dynamic version, and a 'Temp' fixed length version. The 'Temp' version
/// extracts the info from the numc object and feeds the information in the dynamic version.
/// The 'Temp' version of each data member is NOT saved to the rooTracker tree, only the dynamic version is.
/// Note that for each new event, only the 'Temp' version of the data member is reset to a default value.
/// This current implementation reduces the NRooTracker tree by ~10Mb.
const int kNStdHepNPmax = 100;
const int kNStdHepIdxPx = 0;
const int kNStdHepIdxPy = 1;
const int kNStdHepIdxPz = 2;
const int kNStdHepIdxE = 3;
const int kNStdHepIdxX = 0;
const int kNStdHepIdxY = 1;
const int kNStdHepIdxZ = 2;
const int kNStdHepIdxT = 3;
const int kNEmaxvc = 100;
const int kNEmaxvert = 100;
const int kNEmaxvertp = 300;
class NRooTrackerVtx : public JNuBeamFlux {
public:
NRooTrackerVtx();
~NRooTrackerVtx();
void Reset (void);
void Init (void);
// Using methods from TObject to remove 'hidden' compiler warnings
using TObject::Copy;
using TObject::Print;
void Copy (const NRooTrackerVtx * event);
void Print (const Option_t* = "") const;
// Define the output rootracker tree branches
TObjString* EvtCode; ///< generator-specific string with 'event code'
int EvtNum; ///< event num.
double EvtXSec; ///< cross section for selected event (1E-38 cm2) CORRECT
double EvtDXSec; ///< cross section for selected event kinematics (1E-38 cm2 /{K^n}) CORRECT
double EvtWght; ///< weight for that event CORRECT
double EvtProb; ///< probability for that event (given cross section, path lengths, etc) CORRECT
double EvtVtx[4]; ///< event vertex position in detector coord syst (SI) CORRECT
int StdHepN; ///< number of particles in particle array
//
// stdhep-like particle array
//
int* StdHepPdg; //[StdHepN] ///< pdg codes (& generator specific codes for pseudoparticles)
int StdHepPdgTemp [kNStdHepNPmax]; //!
int* StdHepStatus; //[StdHepN] ///< generator-specific status code
int StdHepStatusTemp[kNStdHepNPmax]; //!
double StdHepX4 [kNStdHepNPmax][4]; ///< 4-x (x, y, z, t) of particle in hit nucleus frame (fm) CORRECT
double StdHepP4 [kNStdHepNPmax][4]; ///< 4-p (px,py,pz,E) of particle in LAB frame (GeV) CORRECT
double StdHepPolz [kNStdHepNPmax][3]; ///< polarization vector CORRECT
int StdHepFdTemp [kNStdHepNPmax]; //!
int StdHepLdTemp [kNStdHepNPmax]; //!
int StdHepFmTemp [kNStdHepNPmax]; //!
int StdHepLmTemp [kNStdHepNPmax]; //!
int* StdHepFd; //[StdHepN] ///< first daughter
int* StdHepLd; //[StdHepN] ///< last daughter
int* StdHepFm; //[StdHepN] ///< first mother
int* StdHepLm; //[StdHepN] ///< last mother
// NEUT native VCWORK information
int NEnvc; ///< Number of particles
int NEipvcTemp[kNEmaxvc]; //! PDG particle code
int* NEipvc; //[NEnvc] ///< PDG particle code
float NEpvc[kNEmaxvc][3]; ///< 3-momentum (MeV/c) CORRECT
int NEiorgvcTemp[kNEmaxvc]; //!
int* NEiorgvc; //[NEnvc] ///< Index of parent (Fortran convention: starting at 1)
/// Flag of final state:
/// 0 : DETERMINED LATER PROCEDURE
/// 1 : DECAY TO OTHER PARTICLE
/// 2 : ESCAPE FROM DETECTOR
/// 3 : ABSORPTION
/// 4 : CHARGE EXCHANGE
/// 5 : STOP A NOT CONSIDER IN M.C.
/// 6 : E.M. SHOWER
/// 7 : HADRON PRODUCTION
/// 8 : QUASI-ELASTIC SCATTER
/// 9 : FORWARD (ELASTIC-LIKE) SCATTER
int NEiflgvcTemp[kNEmaxvc]; //!
int NEicrnvcTemp[kNEmaxvc]; //!
int* NEiflgvc; //[NEnvc] ///< Flag of final state
int* NEicrnvc; //[NEnvc] ///< Escaped nucleus (1) or not (0)
// Rest of the NEUT variables below are mainly for internal reweighting routines
float NEcrsx; ///< Cross section calculation variables (currently used for coherent interactions) CORRECT
float NEcrsy; ///< Cross section calculation variables (currently used for coherent interactions) CORRECT
float NEcrsz; ///< Cross section calculation variables (currently used for coherent interactions) CORRECT
float NEcrsphi; ///< Cross section calculation variables (currently used for coherent interactions) CORRECT
// NEUT FSIHIST pion interaction history
int NEnvert; ///< Number of vertices (including production and exit points)
float NEposvert[kNEmaxvert][3]; ///< Position of vertex within nucleus (fm) CORRECT
///< Interaction type
///< (*10 FOR HI-NRG interaction, >~400 MeV/c)
///< -1 : ESCAPE
///< 0 : INITIAL (or unmatched parent vertex if I>1)
///< 3 : ABSORPTION
///< 4 : CHARGE EXCHANGE
///< 7 : HADRON PRODUCTION (hi-nrg only, i.e. 70)
///< 8 : QUASI-ELASTIC SCATTER
///< 9 : FORWARD (ELASTIC-LIKE) SCATTER
int NEiflgvertTemp[kNEmaxvert]; //!
int* NEiflgvert; //[NEnvert] ///< Interaction type
int NEnvcvert; ///< Number of intermediate particles (including initial and final)
float NEdirvert[kNEmaxvertp][3]; ///< Direction of particle CORRECT
float NEabspvertTemp[kNEmaxvertp]; //!
float NEabstpvertTemp[kNEmaxvertp]; //!
int NEipvertTemp[kNEmaxvertp]; //!
int NEivertiTemp[kNEmaxvertp]; //!
int NEivertfTemp[kNEmaxvertp]; //!
float* NEabspvert; //[NEnvcvert] ///< Absolute momentum in the lab frame (MeV/c) CORRECT
float* NEabstpvert; //[NEnvcvert] ///< Absolute momentum in the nucleon rest frame (MeV/c) CORRECT
int* NEipvert; //[NEnvcvert] ///< PDG particle code
int* NEiverti; //[NEnvcvert] ///< Index of initial vertex (pointing to nvert array above)
int* NEivertf; //[NEnvcvert] ///< Index of final vertex (pointing to nvert array above)
//
// etc
//
TObjString* GeomPath; //
// Some pass through info
TObjString* GeneratorName; //
TObjString* OrigFileName; //
TObjString* OrigTreeName; //
int OrigEvtNum;
int OrigTreeEntries;
double OrigTreePOT;
double TimeInSpill;
int TruthVertexID;
ClassDef(NRooTrackerVtx, 1);
};
#endif