DUNE StandardRecord
Base object for DUNE analysis files (CAFs)
Loading...
Searching...
No Matches
SREnums.h
1
2// \file SREnums.h
3// \brief Consolidated headers so that they can be included by Proxy
4// \author J. Wolcott <jwolcott@fnal.gov>
5// \date Mar. 2023
7
8#ifndef DUNEANAOBJ_SRENUMS_H
9#define DUNEANAOBJ_SRENUMS_H
10
11#include <cstddef>
12#include <limits>
13
14namespace caf
15{
17 enum Detector : std::size_t
18 {
19 kUnknownDet = 0,
20
21 // full NDs in Phase I or Phase II
22 kND_LAr = 1,
23 kND_TMS = 2,
25 kND_GAr = 4,
26
27 // ND prototypes (more to add?)
28 k2x2 = 5,
30
31 // leaving some space for expansion ...
32
33 // full FDs (Phase II modules TBD...)
34 kFD_HD = 10,
35 kFD_VD = 11,
36
37 // space for modules 3 and 4...
38
39 // FD prototypes (we don't have any ProtoDUNE-VD data that will be CAFfed?)
41
42 _kLastDetector = 24
43 };
44
45
48 {
49 kUnknownGenerator = 0,
50 kGENIE = 1,
51 kGIBUU = 2,
52 kNEUT = 3,
53 kCRY = 4,
54 kNuWro = 5,
55 kMARLEY = 6,
56 kCORSIKA = 7,
57 kGEANT = 8
58
59 };
60
63 {
64 kUnknownMethod,
69 };
70
75 {
76 kUnknownMode = -100,
77 kQE = 1,
78 kSingleKaon = 2,
79 kDIS = 3,
80 kRes = 4,
81 kCoh = 5,
82 kDiffractive = 6,
83 kNuElectronElastic = 7,
84 kInvMuonDecay = 8,
85 kAMNuGamma = 9,
86 kMEC = 10,
87 kCohElastic = 11,
88 kInverseBetaDecay = 12,
89 kGlashowResonance = 13,
90 kIMDAnnihilation = 14,
91 kPhotonCoh = 15,
92 kPhotonRes = 16,
93 kDarkMatterElastic = 101,
94 kDarkMatterDIS = 102,
95 kDarkMatterElectron = 103,
96 };
97
98 // ----------------------------------------------------------------------
99 // now some enums that are used internally so one branch can easily refer to another
100
102 {
103 public:
104
105 enum PartType { kUnknown, kPrimary, kPrimaryBeforeFSI, kSecondary };
106
107 int ixn = -1;
108 PartType type = kUnknown;
109 int part = -1;
110 };
111
113 {
114 private:
115
116 static constexpr float NaN = std::numeric_limits<float>::signaling_NaN();
117
118 public:
119
120 int id = -1;
121 float time = NaN;
122 float total_pe = NaN;
123 float hypothesis_pe = NaN;
124 };
125
130 {
131 public:
132 enum SRRecoParticleCollectionType
133 {
134 kUnknown,
135 kSPINE,
136 kPandora,
137 kPida,
138 kSandreco
139 };
140
141 int ixn = -1;
142 SRRecoParticleCollectionType type = SRRecoParticleCollectionType::kUnknown;
143 int ipart = -1;
144
145 inline operator bool() const { return !(type == SRRecoParticleCollectionType::kUnknown || ixn < 0 || ipart < 0); };
146 };
147
152 {
153 public:
159 kUnknown = 0,
160 // FD
161 kFDHDPandoraTrack = 1,
162 KFDHDPandoraShower = 2,
163 KFDHDPandoraPFP = 3,
164 kFDVDPandoraTrack = 4,
165 KFDVDPandoraShower = 5,
166 KFDVDPandoraPFP = 6,
167 kFDPDHDPandoraTrack = 7,
168 KFDPDHDPandoraShower = 8,
169 KFDPDHDPandoraPFP = 9,
170 kFDPDVDPandoraTrack = 10,
171 KFDPDVDPandoraShower = 11,
172 KFDPDVDPandoraPFP = 12,
173 // NDLAr
174 kNDLArDLPTrack = 13,
175 kNDLArDLPShower = 14,
176 kNDLArPandoraTrack = 15,
177 kNDLARPandoraShower = 16,
178 // TMS
179 kTMSTrack = 17,
180 // SAND
181 // NB: a new SAND subdetector collection must also be added to SRSANDObjID::operator bool()
182 kSANDGRAINTrack = 18,
183 kSANDGRAINShower = 19,
184 kSANDTrackerTrack = 20,
185 kSANDTrackerShower = 21,
186 kSANDECalCluster = 22,
188 // GAr
189 kGArTrack = 23,
190 kGArEcalCluster = 24
191 };
192
193 int ixn = -1;
194 SRRecoBaseCollectionType type = SRRecoBaseCollectionType::kUnknown;
195 int irecoobj = -1;
196
197 inline operator bool() const { return !(type == SRRecoBaseCollectionType::kUnknown || ixn < 0 || irecoobj < 0); };
198 };
199
204 {
205 public:
207 int idx = -1;
208
210 inline operator bool() const
211 {
212 bool isSANDSubdet = type == SRRecoBaseID::kSANDGRAINTrack || type == SRRecoBaseID::kSANDGRAINShower
213 || type == SRRecoBaseID::kSANDTrackerTrack || type == SRRecoBaseID::kSANDTrackerShower
214 || type == SRRecoBaseID::kSANDECalCluster;
215 return isSANDSubdet && idx >= 0;
216 }
217 };
218
221 {
222 kUnknownFDReco,
223 kPandoraFD
224 };
225
228 {
229 kUnknownNDLArReco,
230 kDeepLearnPhys,
231 kPandoraNDLAr
232 };
233
234
236 {
240 kUniqueWithTime = 3
241 };
242
247 {
249 kTrack = 1,
252 };
253
254}
255
256
257#endif //DUNEANAOBJ_SRENUMS_H
Definition: SREnums.h:113
float time
time of the matched flash
Definition: SREnums.h:121
float total_pe
total pe of the matched flash
Definition: SREnums.h:122
float hypothesis_pe
hypothesis pe from reconstruction for this interaction
Definition: SREnums.h:123
Identifies a reconstructed object by the interaction it belongs to, which collection of reconstructed...
Definition: SREnums.h:152
SRRecoBaseCollectionType
Which collection of low-level reco objects an object lives in. NB: these values are serialized into C...
Definition: SREnums.h:158
@ kSANDAssn
cross-subdetector association; see SRSANDAssn
Definition: SREnums.h:187
SRRecoBaseCollectionType type
Which of the low-level reco objects collections this object lives in.
Definition: SREnums.h:194
int irecoobj
Index of SRRecoObjBase in the specified reco objects collection of the SRInteraction.
Definition: SREnums.h:195
int ixn
Index of SRInteraction in the SRInteractionBranch.
Definition: SREnums.h:193
Identifies a reconstructed particle by the interaction it belongs to, which collection of reconstruct...
Definition: SREnums.h:130
int ipart
Index of SRRecoParticle in the specified SRRecoParticlesBranch collection of the SRInteraction.
Definition: SREnums.h:143
int ixn
Index of SRInteraction in the SRInteractionBranch.
Definition: SREnums.h:141
SRRecoParticleCollectionType type
Which of the SRRecoParticle collections in SRRecoParticlesBranch this particle lives in.
Definition: SREnums.h:142
Identifies one of SAND's subdetector reco objects by which collection it lives in and its index withi...
Definition: SREnums.h:204
SRRecoBaseID::SRRecoBaseCollectionType type
SAND subdetector collection (kSANDGRAINTrack ... kSANDECalCluster)
Definition: SREnums.h:206
int idx
Index of the object in the collection named by type
Definition: SREnums.h:207
Definition: SREnums.h:102
PartType type
Which of the particle collections this particle lives in.
Definition: SREnums.h:108
int ixn
Index of SRInteraction in the SRTruthBranch.
Definition: SREnums.h:107
int part
Index of SRParticle in the SRInteraction.
Definition: SREnums.h:109
Common Analysis Files.
Definition: Navigate.cxx:8
NDRecoMatchType
Definition: SREnums.h:236
@ kUniqueNoTime
match performed using Quinton Weyrich's NDLArTMSUniqueMatchRecoFiller.cxx, without time
Definition: SREnums.h:239
@ kUndeclared
default value
Definition: SREnums.h:237
@ kUniqueWithTime
match performed using Quinton Weyrich's NDLArTMSUniqueMatchRecoFiller.cxx, with time
Definition: SREnums.h:240
@ kSimple
match performed using Kate Hildebrandt's "simple" matching algorithm
Definition: SREnums.h:238
RecoObjType
What is the type of the reconstructed object? This is used to help with the association of reconstruc...
Definition: SREnums.h:247
@ kUnknownRecoObj
default value
Definition: SREnums.h:248
@ kTrack
track
Definition: SREnums.h:249
@ kHitCollection
hit collection (mostly used to garbage collect all remaining hits)
Definition: SREnums.h:251
@ kShower
shower
Definition: SREnums.h:250
PartEMethod
Methods for reconstructing particle energies.
Definition: SREnums.h:63
@ kMCS
Multiple scattering.
Definition: SREnums.h:66
@ kVisibleEnergy
Computed from the number of photons collected with an appropriate calibration for the conversion.
Definition: SREnums.h:68
@ kCalorimetry
Computed from energy deposited in active volumes, possibly with corrections for invisible energy.
Definition: SREnums.h:67
@ kRange
Amount of material traversed by particle.
Definition: SREnums.h:65
Generator
Known generators of neutrino interactions (extend as other generators are used)
Definition: SREnums.h:48
FD_RECO_STACK
Which reconstruction toolkit was used to reconstruct this FD event?
Definition: SREnums.h:221
Detector
Known detectors in CAFs.
Definition: SREnums.h:18
@ kFD_HD
Horizontal drift (a.k.a. module 1)
Definition: SREnums.h:34
@ kND_TMS
magnetized spectrometer/calorimeter (forms part of movable PRISM detector concept in Phase I)
Definition: SREnums.h:23
@ kND_SAND
scintillator tracker and calorimeter, fixed on-axis in beam
Definition: SREnums.h:24
@ kND_GAr
high-pressure gaseous argon TPC (forms part of movable PRISM detector concept in Phase II)
Definition: SREnums.h:25
@ kND_LAr
35-module liquid argon TPC (forms part of movable PRISM detector concept)
Definition: SREnums.h:22
@ kFD_VD
Vertical drift (a.k.a. module 2)
Definition: SREnums.h:35
@ kProtoDUNE
Horizontal drift prototype.
Definition: SREnums.h:40
@ k2x2
ND-LAr prototype.
Definition: SREnums.h:28
@ _kLastDetector
to use in bitset sizing. make it big enough that we'll never have to expand it —> future-proof CAFs
Definition: SREnums.h:42
@ kMINERvA
tracker & muon veto for 2x2; repurposed former MINERvA detector components
Definition: SREnums.h:29
ScatteringMode
Neutrino interaction categories. Periodically synchronized to GENIE (last update: GENIE 3....
Definition: SREnums.h:75
NDLAR_RECO_STACK
Which reconstruction toolkit was used to reconstruct this ND event?
Definition: SREnums.h:228