LArSoft  v10_04_05
Liquid Argon Software toolkit - https://larsoft.org/
DataStructs.h
Go to the documentation of this file.
1 //
3 //
4 // TCAlg data structs
5 //
6 // Bruce Baller
7 //
9 #ifndef TRAJCLUSTERALGDATASTRUCT_H
10 #define TRAJCLUSTERALGDATASTRUCT_H
11 
12 // C/C++ standard libraries
13 #include <array>
14 #include <bitset>
15 #include <vector>
16 
17 // LArSoft libraries
22 
23 namespace TMVA {
24  class Reader;
25 }
26 namespace calo {
27  class CalorimetryAlg;
28 }
29 
30 namespace tca {
31 
32  namespace detail {
33  struct SortEntry {
34  unsigned int index;
35  float val;
36  };
37  }
38 
39  using Point3_t = std::array<double, 3>;
40  using Vector3_t = std::array<double, 3>;
41  using Point2_t = std::array<float, 2>;
42  using Vector2_t = std::array<double, 2>;
43 
44  // some functions to handle the CTP_t type
45  typedef unsigned int CTP_t;
46  constexpr unsigned int Tpad = 10; // alignment for CTP sub-items - TPC
47  constexpr unsigned int Cpad = 10000; // alignment for CTP sub-items - Cryostat
48 
49  inline CTP_t EncodeCTP(unsigned int cryo, unsigned int tpc, unsigned int plane)
50  {
51  return cryo * Cpad + tpc * Tpad + plane;
52  }
53  inline CTP_t EncodeCTP(const geo::PlaneID& planeID)
54  {
55  return EncodeCTP(planeID.Cryostat, planeID.TPC, planeID.Plane);
56  }
57  inline CTP_t EncodeCTP(const geo::WireID& wireID)
58  {
59  return EncodeCTP(wireID.Cryostat, wireID.TPC, wireID.Plane);
60  }
61  geo::PlaneID DecodeCTP(CTP_t CTP);
62 
65 
67  struct VtxStore {
68  Point2_t Pos{{0, 0}};
69  Point2_t PosErr{{2, 1}};
70  unsigned short NTraj{0};
71  unsigned short Pass{0}; // Pass in which this vertex was created
72  float ChiDOF{0};
73  // Topo: 0 = end0-end0, 1 = end0(1)-end1(0), 2 = end1-end1, 3 = CI3DV,
74  // 4 = C3DIVIG, 5 = FHV, 6 = FHV2, 7 = SHCH, 8 = CTBC, 9 = Junk, 10 = HamBragg, 11 = neutral decay (pizero)
75  // 12 = BraggSplit, 13 = Not Used, 14 = Reconcile2VTs
76  short Topo{0};
77  CTP_t CTP{0};
78  int ID{0};
79  int UID{0};
80  int Vx3ID{0};
81  float Score{0};
82  float TjChgFrac{0};
83  std::bitset<16> Stat{0};
84  };
85 
86  typedef enum {
96  } VtxBit_t;
97 
99  struct Vtx3Store {
100  float X{0}; // x position
101  float XErr{0.5}; // x position error
102  float Y{0}; // y position
103  float YErr{0.5}; // y position error
104  float Z{0}; // z position
105  float ZErr{0.5}; // z position error
106  float Score{0};
107  int Wire{-1}; // wire number for an incomplete 3D vertex
109  std::vector<int> Vx2ID; // List of 2D vertex IDs in each plane
110  int ID{0}; // 0 = obsolete vertex
111  int UID{0};
112  bool Primary{false};
113  bool Neutrino{false};
114  };
115 
116  // The (y,z) position of a valid wire intersection of two wires on two planes +
117  // + the (y,z) position variation for a one wire change in pln1 and pln2
119  unsigned short pln1;
120  unsigned short pln2;
121  float wir1;
122  float wir2;
123  double y;
124  double z;
125  double dydw1;
126  double dzdw1;
127  double dydw2;
128  double dzdw2;
129  unsigned int tpc;
130  };
131 
132  // A temporary struct for matching trajectory points; 1 struct for each TP for
133  // each trajectory. These are put into mallTraj which is then sorted by increasing xlo
134  struct Tj2Pt {
135  unsigned int wire;
136  // x range spanned by hits on the TP
137  float xlo;
138  float xhi;
139  unsigned short plane;
140  // the Trajectory ID
141  unsigned short id;
142  unsigned short ipt; // The trajectory point
143  // the number of points in the Tj so that the minimum Tj length cut (MatchCuts[2]) can be made
144  unsigned short npts;
145  };
146 
147  struct TrajPoint {
148  CTP_t CTP{0};
149  Point2_t HitPos{{0, 0}}; // Charge weighted position of hits in wire equivalent units
150  Point2_t Pos{{0, 0}}; // Trajectory position in wire equivalent units
151  Vector2_t Dir{{0, 0}}; // Direction cosines in the StepDir direction
152  double HitPosErr2{0}; // Uncertainty^2 of the hit position perpendiclar to the direction
153  // HitPosErr2 < 0 = HitPos not defined because no hits used
154  double Ang{0}; // Trajectory angle (-pi, +pi)
155  double AngErr{0.1}; // Trajectory angle error
156  float KinkSig{-1}; // kink significance = delta angle / angle error
157  float Chg{0}; // Chargetj2pt
158  float AveChg{-1}; // Average charge of last ~20 TPs
159  float ChgPull{0.1}; // = (Chg - AveChg) / ChgRMS
160  float Delta{0}; // Deviation between trajectory and hits (WSE)
161  float DeltaRMS{0.02}; // RMS of Deviation between trajectory and hits (WSE)
162  float FitChi{0}; // Chi/DOF of the fit
163  int InPFP{0}; // ID of the PFParticle that owns this TP
164  unsigned short NTPsFit{2}; // Number of trajectory points fitted to make this point
165  unsigned short Step{0}; // Step number at which this TP was created
166  unsigned short AngleCode{0}; // 0 = small angle, 1 = large angle, 2 = very large angle
167  std::vector<unsigned int> Hits; // vector of fHits indices
168  std::bitset<16> UseHit{0}; // set true if the hit is used in the fit
169  std::bitset<8> Environment{0}; // TPEnvironment_t bitset that describes the environment
170  };
171 
172  // struct filled by FitPar which fits TP Chg, Delta, etc
173  struct ParFit {
174  Point2_t Pos{{0, 0}}; // position origin of the fit
175  float Par0;
176  float AvePar;
177  float ParErr;
178  float ParSlp; // slope relative to the origin
179  float ParSlpErr;
180  float ChiDOF;
181  unsigned short nPtsFit;
182  };
183 
184  // Global information for the trajectory
185  struct Trajectory {
186  std::vector<TrajPoint> Pts;
187  CTP_t CTP{0};
188  std::bitset<128> AlgMod;
189  int WorkID{0};
190  int ParentID{
191  -1};
192  float AveChg{0};
193  float TotChg{0};
194  float ChgRMS{0.5};
195  short MCSMom{0}; //< Crude 2D estimate to use for shower-like vs track-like discrimination
196  Point2_t dEdx{{0, 0}};
197  std::array<unsigned short, 2> VtxID{{0, 0}};
198  std::array<unsigned short, 2> EndPt{
199  {0, 0}};
200  int ID;
201  int UID;
202  int SSID{0};
203  unsigned short PDGCode{0};
204  unsigned short Pass{0};
205  short StepDir{0};
206  short StartEnd{-1};
207  std::array<std::bitset<8>, 2> EndFlag{}; // Bitset that encodes the reason for stopping
208  std::bitset<8> Strategy{};
209  bool NeedsUpdate{false};
210  bool IsGood{true};
211  bool MaskedLastTP{false};
212  };
213 
214  struct TjForecast {
215  unsigned short nextForecastUpdate{
216  0};
217  float showerLikeFraction{
218  0};
219  float outlook{-1};
220  float chgSlope{0};
221  float chgSlopeErr{0};
222  float chgFitChiDOF{0};
223  float chgRMS{0};
224  short MCSMom{0};
225  bool leavesBeforeEnd{false};
226  bool foundShower{false};
227  bool endBraggPeak{false};
228  };
229 
230  // Temporary 3D trajectory points composed of triplet or doublet wire intersections
231  struct TrajPoint3 {
232  Point3_t Pos{{0.0, 0.0, 0.0}};
233  Vector3_t Dir{{0.0, 0.0, 0.0}};
234  std::vector<Tj2Pt> Tj2Pts; // list of trajectory points
235  };
236 
237  struct SectionFit {
238  Point3_t Pos{{-10.0, 0.0, 0.0}};
239  Vector3_t Dir{{0.0, 0.0, 0.0}};
240  Vector3_t DirErr{{0.0, 0.0, 0.0}};
241  float ChiDOF{-1};
242  unsigned short NPts{0};
243  bool NeedsUpdate{true};
244  };
245 
246  // a 3D trajectory point composed of a 3D point & direction and a single TP
247  struct TP3D {
248  Point3_t Pos{{-10.0, -10.0, -10.0}};
249  Vector3_t Dir{{0.0, 0.0, 0.0}};
250  double TPX{-10};
251  double TPXErr2{1};
252  float Wire{-1};
253  float along{1E6};
254  int TjID{0};
255  CTP_t CTP;
256  unsigned short TPIndex{USHRT_MAX};
257  unsigned short SFIndex{USHRT_MAX};
258  std::bitset<8> Flags; //< see TP3DFlags_t
259  };
260 
261  typedef enum {
262  kTP3DGood, // Is good for fitting and calorimetry
263  kTP3DBad, // Should be removed from the trajectory
264  kTP3DHiDEdx // Has high dE/dx
265  } TP3DFlags_t;
266 
267  // Struct for 3D trajectory matching
268  struct MatchStruct {
269  // IDs of Trajectories that match in all planes
270  std::vector<int> TjIDs;
271  // Count of the number of X-matched hits and de-weight by angle
272  float Count{0}; // Set to 0 if matching failed
273  };
274 
275  constexpr unsigned int pAlgModSize = 6; // alignment for CTP sub-items - TPC
276 
277  struct PFPStruct {
278  std::vector<int> TjIDs; // used to reference Tjs within a slice
279  std::vector<int> TjUIDs; // used to reference Tjs in any slice
280  std::vector<TP3D> TP3Ds; // vector of 3D trajectory points
281  std::vector<SectionFit> SectionFits;
282  // Start is 0, End is 1
283  std::array<std::vector<float>, 2> dEdx;
284  std::array<std::vector<float>, 2> dEdxErr;
285  std::array<int, 2> Vx3ID{{0, 0}};
286  int BestPlane{-1};
287  int PDGCode{-1};
288  std::vector<int> DtrUIDs;
289  size_t ParentUID{0}; // Parent PFP UID (or 0 if no parent exists)
291  float CosmicScore{0};
292  int ID{0};
293  int UID{0}; // unique global ID
294  unsigned short MVI; // matVec index for detailed debugging
295  std::bitset<8> Flags; //< see PFPFlags_t
296  std::array<std::bitset<8>, 2> EndFlag{}; // Uses the same enum as Trajectory EndFlag
297  std::bitset<pAlgModSize> AlgMod; //< Allocate the first set of bits in AlgBit_t for 3D algs
298  };
299 
301 
302  struct ShowerPoint {
303  Point2_t Pos; // Hit Position in the normal coordinate system
304  Point2_t
305  RotPos; // Position rotated into the shower coordinate system (0 = along, 1 = transverse)
306  float Chg{0}; // Charge of this point
307  unsigned int HitIndex; // the hit index
308  unsigned short
309  TID; // The ID of the tj the point (hit) is in. TODO eliminate this redundant variable
310  };
311 
312  // A temporary structure that defines a 2D shower-like cluster of trajectories
313  struct ShowerStruct {
314  CTP_t CTP;
315  int ShowerTjID{0}; // ID of the shower Trajectory composed of many InShower Tjs
316  std::vector<int> TjIDs; // list of InShower Tjs
317  std::vector<int> NearTjIDs; // list of Tjs that are not InShower but satisfy the maxSep cut
318  std::vector<ShowerPoint> ShPts; // Trajectory points inside the shower
319  float Angle{0}; // Angle of the shower axis
320  float AngleErr{3}; // Error
321  float AspectRatio{1}; // The ratio of charge weighted transverse/longitudinal positions
322  float DirectionFOM{1};
323  std::vector<Point2_t> Envelope; // Vertices of a polygon that encompasses the shower
324  float EnvelopeArea{0};
325  float ChgDensity{0}; // Charge density inside the Envelope
326  float Energy{0};
327  float ParentFOM{10};
328  int ID{0};
329  int UID{0};
330  int ParentID{0}; // The ID of a parent Tj - the one at the start of the shower
331  int TruParentID{0};
332  int SS3ID{0}; // ID of a ShowerStruct3D to which this 2D shower is matched
333  bool NeedsUpdate{true}; // Needs to be updated (e.g. after adding a tj, defining a parent, etc)
334  };
335 
336  // Shower variables filled in MakeShowers. These are in cm and radians
337  struct ShowerStruct3D {
339  Vector3_t
340  DirErr; // DirErr is hijacked to store the shower rms at the start, center and end sections
342  Point3_t StartErr; // PosErr is hijacked to temporarily store the charge in the three sections
343  Point3_t ChgPos; // position of the center of charge
344  Point3_t End; // end position
345  double Len{1};
346  double OpenAngle{0.12};
347  std::vector<double> Energy;
348  std::vector<double> EnergyErr;
349  std::vector<double> MIPEnergy;
350  std::vector<double> MIPEnergyErr;
351  std::vector<double> dEdx;
352  std::vector<double> dEdxErr;
354  std::vector<int> CotIDs; // list of indices of 2D showers in tjs.cots
355  std::vector<unsigned int> Hits;
357  int ID;
358  int UID{0};
359  int ParentID{0}; // The ID of a track-like pfp at the start of the shower, e.g. an electron
360  float MatchFOM;
361  unsigned short PFPIndex{USHRT_MAX}; // The index of the pfp for this shower
362  int Vx3ID{0};
363  bool NeedsUpdate{true}; // This is set true whenever the shower needs to be updated
364  bool Cheat{false};
365  };
366 
368  std::array<int, 2>
369  TjIDs; // pairs of Tjs that shouldn't be clustered in shower reconstruction because...
370  int Vx2ID; // they share a 2D vertex that may be matched to...
371  int Vx3ID; // a high-score 3D vertex
372  };
373 
374  struct ShowerTreeVars {
375  // run, subrun, and event are also saved to this tree
376 
377  std::vector<float> BeginWir; // begin wire
378  std::vector<float> BeginTim; // begin tick
379  std::vector<float> BeginAng; // begin angle
380  std::vector<float> BeginChg; // beginning average charge
381  std::vector<short> BeginVtx; // ID of begin vertex
382  std::vector<float> EndWir; // end wire
383  std::vector<float> EndTim; // end tick
384  std::vector<float> EndAng; // end angle
385  std::vector<float> EndChg; // ending average charge
386  std::vector<short> EndVtx; //ID of end vertex
387 
388  std::vector<short> MCSMom;
389 
390  std::vector<short> PlaneNum;
391 
392  std::vector<int> TjID;
393  std::vector<int> IsShowerTj; // indicates tj is an shower trajectory
394  std::vector<int> ShowerID; // shower ID associated w/ trajectory. -1 = no shower
395  std::vector<int> IsShowerParent; // this tj was chosen as a parent tj
396  std::vector<int> StageNum; // stage of reconstruction
397  std::vector<std::string> StageName; // stage name
398 
399  // envelope information
400  std::vector<float> Envelope;
401  std::vector<int> EnvPlane;
402  std::vector<int> EnvStage;
403  std::vector<int> EnvShowerID;
404 
405  int nStages{0};
406  unsigned short nPlanes{0};
407  };
408 
409  struct CRTreeVars {
410  std::vector<int> cr_origin;
411  std::vector<float> cr_pfpxmin;
412  std::vector<float> cr_pfpxmax;
413  std::vector<float> cr_pfpyzmindis;
414  };
415 
416  // Algorithm modification bits
417  typedef enum {
418  kFillGaps3D, // 3D algorithms for PFPs (bitset size limited to 8 bits)
423  kMat3D, // 2D algorithms for Tjs here and below
488  } AlgBit_t;
489 
490  typedef enum {
495  } Strategy_t;
496 
497  // Stop flag bits
498  typedef enum {
507  } EndFlag_t;
508 
509  // Environment near a trajectory point
510  typedef enum {
518  } TPEnvironment_t;
519 
520  // TrajClusterAlg configuration bits
521  typedef enum {
532  } TCModes_t;
533 
534  extern const std::vector<std::string> AlgBitNames;
535  extern const std::vector<std::string> EndFlagNames;
536  extern const std::vector<std::string> VtxBitNames;
537  extern const std::vector<std::string> StrategyBitNames;
538 
539  // struct for configuration - used in all slices
540  struct TCConfig {
541  std::vector<float> vtx2DCuts;
542  std::vector<float> vtx3DCuts;
543  std::vector<float> vtxScoreWeights;
544  std::vector<float> neutralVxCuts;
545  std::vector<short> deltaRayTag;
546  std::vector<short> muonTag;
547  std::vector<float> electronTag;
548  std::vector<float> chkStopCuts;
549  std::vector<float> showerTag;
550  std::vector<float> kinkCuts;
551  std::vector<float> match3DCuts;
552  // std::vector<float> matchTruth; ///< Match to MC truth
553  std::vector<float> chargeCuts;
554  std::vector<float> qualityCuts;
555  std::vector<float> pfpStitchCuts;
556  std::vector<unsigned short> minPtsFit;
557  std::vector<unsigned short> minPts;
558  std::vector<unsigned short> maxAngleCode;
559  std::vector<short> minMCSMom;
560  std::vector<float> angleRanges;
561  float wirePitch;
562  float unitsPerTick;
563  std::vector<float> maxPos0;
564  std::vector<float> maxPos1;
565  float multHitSep;
566  float maxChi;
570  TMVA::Reader* showerParentReader;
571  std::vector<float> showerParentVars;
572  float hitErrFac;
576  float VLAStepSize;
577  float JTMaxHitSep2;
578  std::bitset<128> useAlg;
579  std::bitset<128> dbgAlg;
580  short recoSlice{0};
581  short recoTPC{-1};
582  bool dbgSlc{true};
583  bool dbgStp{false};
584  bool dbgMrg{false};
585  bool dbg2V{false};
586  bool dbgVxNeutral{false};
587  bool dbgVxMerge{false};
588  bool dbgVxJunk{false};
589  bool dbg3V{false};
590  bool dbgPFP{false};
591  bool dbgDeltaRayTag{false};
592  bool dbgMuonTag{false};
593  bool dbg2S{false};
594  bool dbg3S{false};
595  bool dbgStitch{false};
596  bool dbgSummary{false};
597  bool dbgDump{false};
598  short nPtsAve;
599  std::bitset<16> modes;
600  bool doForecast{true};
601  bool useChannelStatus{true};
602  };
603 
604  struct TCHit {
605  unsigned int allHitsIndex; // index into fHits
606  int InTraj{
607  0}; // ID of the trajectory this hit is used in, 0 = none, < 0 = Tj under construction
608  };
609 
610  // hit collection for all slices, TPCs and cryostats + event information
611  // Note: Ideally this hit collection would be the FULL hit collection before cosmic removal
612  struct TCEvent {
614  std::vector<recob::Hit> const* allHits = nullptr;
615  std::vector<recob::Hit> const* srcHits = nullptr;
616  // hit Range for the allHits collection in the current TPCID
617  // plane wire firstHit, lastHit
618  std::vector<std::vector<std::pair<unsigned int, unsigned int>>> wireHitRange;
619  // hit range for the srcHits collection
620  std::vector<std::pair<unsigned int, unsigned int>> tpcSrcHitRange;
621  // list of good wires in the current TPCID
622  std::vector<std::vector<bool>> goodWire;
623  std::vector<recob::SpacePoint> const* sptHandle =
624  nullptr;
625  std::vector<std::array<unsigned int, 3>> sptHits;
626  unsigned int event;
627  unsigned int run;
628  unsigned int subRun;
629  unsigned int eventsProcessed;
630  std::vector<float> aveHitRMS;
631  std::vector<TCWireIntersection> wireIntersections;
632  int WorkID;
639  bool aveHitRMSValid{false};
640  bool expectSlicedHits{
641  false};
642  };
643 
644  struct TCSlice {
645  std::vector<unsigned int> nWires;
646  std::vector<unsigned int> firstWire;
647  std::vector<unsigned int> lastWire;
648  float xLo; // fiducial volume of the current tpc
649  float xHi;
650  float yLo;
651  float yHi;
652  float zLo;
653  float zHi;
655  unsigned short nPlanes;
656  int ID;
657  // The variables below do change in size from event to event
658 
659  // Save histograms to develop cosmic removal tools
661  std::vector<TCHit> slHits;
662  std::vector<Trajectory> tjs;
663  std::vector<Tj2Pt> mallTraj;
664  // vector of pairs of first (.first) and last+1 (.second) hit on each wire
665  // in the range fFirstWire to fLastWire. A value of UINT_MAX indicates that there
666  // are no hits on the wire.
667  std::vector<std::vector<std::pair<unsigned int, unsigned int>>> wireHitRange;
668  std::vector<VtxStore> vtxs;
669  std::vector<Vtx3Store> vtx3s;
670  std::vector<PFPStruct> pfps;
671  std::vector<ShowerStruct> cots; // Clusters of Trajectories that define 2D showers
672  std::vector<DontClusterStruct>
673  dontCluster; // pairs of Tjs that shouldn't clustered in one shower
674  std::vector<ShowerStruct3D> showers; // 3D showers
675  bool isValid{false}; // set false if this slice failed reconstruction
676  };
677 
678  extern TCEvent evt;
679  extern TCConfig tcc;
680  extern ShowerTreeVars stv;
681  extern std::vector<TjForecast> tjfs;
682 
683  // vector of hits, tjs, etc in each slice
684  extern std::vector<TCSlice> slices;
685  // vector of seed TPs
686  extern std::vector<TrajPoint> seeds;
687 
688 } // namespace tca
689 
690 #endif // ifndef TRAJCLUSTERALGDATASTRUCT_H
Expect tracks entering from the front face. Don&#39;t create neutrino PFParticles.
Definition: DataStructs.h:523
calo::CalorimetryAlg * caloAlg
Definition: DataStructs.h:569
std::vector< int > EnvStage
Definition: DataStructs.h:402
short MCSMom(const TCSlice &slc, const std::vector< int > &tjIDs)
Definition: Utils.cxx:3381
std::vector< int > IsShowerParent
Definition: DataStructs.h:395
std::vector< Trajectory > tjs
vector of all trajectories in each plane
Definition: DataStructs.h:662
std::vector< float > cr_pfpyzmindis
Definition: DataStructs.h:413
std::array< std::vector< float >, 2 > dEdxErr
Definition: DataStructs.h:284
std::vector< float > kinkCuts
kink finder algorithm
Definition: DataStructs.h:550
unsigned int event
Definition: DataStructs.h:626
geo::TPCID TPCID
Definition: DataStructs.h:613
float ParSlpErr
Definition: DataStructs.h:179
std::vector< float > EndWir
Definition: DataStructs.h:382
struct of temporary 2D vertices (end points)
Definition: DataStructs.h:67
FindVtxTraj algorithm tried.
Definition: DataStructs.h:87
std::vector< float > EndAng
Definition: DataStructs.h:384
const std::vector< std::string > AlgBitNames
Definition: DataStructs.cxx:16
std::vector< ShowerStruct > cots
Definition: DataStructs.h:671
unsigned int run
Definition: DataStructs.h:627
std::vector< double > dEdxErr
Definition: DataStructs.h:352
std::vector< float > maxPos0
Definition: DataStructs.h:563
std::vector< unsigned short > minPtsFit
Reconstruct in several passes.
Definition: DataStructs.h:556
std::vector< float > cr_pfpxmax
Definition: DataStructs.h:412
const geo::WireReadoutGeom * wireReadoutGeom
Definition: DataStructs.h:568
std::vector< int > NearTjIDs
Definition: DataStructs.h:317
std::array< double, 3 > Point3_t
Definition: DataStructs.h:39
std::vector< ShowerStruct3D > showers
Definition: DataStructs.h:674
std::vector< float > vtx3DCuts
2D vtx -> 3D vtx matching cuts
Definition: DataStructs.h:542
std::vector< float > qualityCuts
Min points/wire, min consecutive pts after a gap.
Definition: DataStructs.h:554
std::vector< float > BeginTim
Definition: DataStructs.h:378
std::array< int, 2 > TjIDs
Definition: DataStructs.h:369
std::vector< Point2_t > Envelope
Definition: DataStructs.h:323
tagged as a vertex between Tjs that are matched to MC truth neutrino interaction particles ...
Definition: DataStructs.h:91
TCConfig tcc
Definition: DataStructs.cxx:9
unsigned short id
Definition: DataStructs.h:141
vertex position fixed manually - no fitting done
Definition: DataStructs.h:88
std::vector< int > TjIDs
Definition: DataStructs.h:270
Declaration of signal hit object.
std::vector< float > BeginAng
Definition: DataStructs.h:379
std::bitset< pAlgModSize > AlgMod
Definition: DataStructs.h:297
Float_t Y
Definition: plot.C:37
std::vector< std::vector< std::pair< unsigned int, unsigned int > > > wireHitRange
Definition: DataStructs.h:667
std::vector< int > Vx2ID
Definition: DataStructs.h:109
The data type to uniquely identify a Plane.
Definition: geo_types.h:364
matched to a high-score 3D vertex
Definition: DataStructs.h:90
std::vector< unsigned int > Hits
Definition: DataStructs.h:167
std::vector< double > MIPEnergy
Definition: DataStructs.h:349
step from US -> DS (true) or DS -> US (false)
Definition: DataStructs.h:522
std::vector< int > TjIDs
Definition: DataStructs.h:316
VtxBit_t
Definition: DataStructs.h:86
TP3DFlags_t
Definition: DataStructs.h:261
float maxWireSkipWithSignal
max number of wires to skip with a signal on them
Definition: DataStructs.h:574
call study functions to develop cuts, etc
Definition: DataStructs.h:527
CryostatID_t Cryostat
Index of cryostat.
Definition: geo_types.h:195
std::vector< std::pair< unsigned int, unsigned int > > tpcSrcHitRange
Definition: DataStructs.h:620
std::vector< Tj2Pt > Tj2Pts
Definition: DataStructs.h:234
std::vector< float > electronTag
Definition: DataStructs.h:547
a general purpose flag bit used in 3D matching
Definition: DataStructs.h:517
std::vector< unsigned int > lastWire
the last wire with a hit
Definition: DataStructs.h:647
float AvePar
Definition: DataStructs.h:176
unsigned int eventsProcessed
Definition: DataStructs.h:629
std::vector< int > CotIDs
Definition: DataStructs.h:354
std::vector< std::array< unsigned int, 3 > > sptHits
SpacePoint -> Hits assns by plane.
Definition: DataStructs.h:625
std::vector< ShowerPoint > ShPts
Definition: DataStructs.h:318
Strategy_t
Definition: DataStructs.h:490
AlgBit_t
Definition: DataStructs.h:417
CRTreeVars crt
Definition: DataStructs.h:660
std::vector< float > angleRanges
list of max angles for each angle range
Definition: DataStructs.h:560
const std::vector< std::string > EndFlagNames
Definition: DataStructs.cxx:87
std::vector< float > showerTag
shower-like trajectory tagging + shower reconstruction
Definition: DataStructs.h:549
don&#39;t mess with this line
Definition: DataStructs.h:95
Float_t Z
Definition: plot.C:37
std::vector< float > EndTim
Definition: DataStructs.h:383
unsigned short plane
Definition: DataStructs.h:139
std::vector< int > ShowerID
Definition: DataStructs.h:394
ShowerTreeVars stv
Definition: DataStructs.cxx:11
unsigned short npts
Definition: DataStructs.h:144
unsigned short TID
Definition: DataStructs.h:309
std::vector< unsigned short > maxAngleCode
max allowed angle code for each pass
Definition: DataStructs.h:558
std::bitset< 8 > Flags
Definition: DataStructs.h:295
float projectionErrFactor
Definition: DataStructs.h:575
std::vector< int > TjUIDs
Definition: DataStructs.h:279
save shower tree
Definition: DataStructs.h:531
constexpr unsigned int Tpad
Definition: DataStructs.h:46
unsigned short ipt
Definition: DataStructs.h:142
std::vector< DontClusterStruct > dontCluster
Definition: DataStructs.h:673
const std::vector< std::string > StrategyBitNames
Definition: DataStructs.cxx:98
std::vector< std::string > StageName
Definition: DataStructs.h:397
CTP_t CTP
Definition: DataStructs.h:255
struct of temporary 3D vertices
Definition: DataStructs.h:99
geo::TPCID TPCID
Definition: DataStructs.h:290
short nPtsAve
dump trajectory points
Definition: DataStructs.h:598
std::vector< int > TjID
Definition: DataStructs.h:392
std::vector< Tj2Pt > mallTraj
vector of trajectory points ordered by increasing X
Definition: DataStructs.h:663
std::array< float, 2 > Point2_t
Definition: DataStructs.h:41
std::vector< float > maxPos1
Definition: DataStructs.h:564
don&#39;t mess with this line
Definition: DataStructs.h:506
float unitsPerTick
scale factor from Tick to WSE equivalent units
Definition: DataStructs.h:562
use the slowing-down strategy
Definition: DataStructs.h:494
std::vector< short > minMCSMom
Min MCSMom for each pass.
Definition: DataStructs.h:559
std::vector< short > BeginVtx
Definition: DataStructs.h:381
geo::TPCID TPCID
Definition: DataStructs.h:108
TP is near a hit in the srcHit collection but no allHit hit exists (DUNE disambiguation error) ...
Definition: DataStructs.h:516
Interface for a class providing readout channel mapping to geometry.
unsigned int wire
Definition: DataStructs.h:135
the environment near the vertex was checked - See UpdateVxEnvironment
Definition: DataStructs.h:94
std::vector< float > aveHitRMS
average RMS of an isolated hit
Definition: DataStructs.h:630
std::vector< TrajPoint > Pts
Trajectory points.
Definition: DataStructs.h:186
TMVA::Reader * showerParentReader
Definition: DataStructs.h:570
std::vector< std::vector< bool > > goodWire
Definition: DataStructs.h:622
std::vector< float > showerParentVars
Definition: DataStructs.h:571
std::vector< float > neutralVxCuts
Definition: DataStructs.h:544
std::vector< short > EndVtx
Definition: DataStructs.h:386
unsigned short pln2
Definition: DataStructs.h:120
std::bitset< 8 > Flags
Definition: DataStructs.h:258
std::vector< VtxStore > vtxs
2D vertices
Definition: DataStructs.h:668
std::vector< int > cr_origin
Definition: DataStructs.h:410
std::vector< float > match3DCuts
3D matching cuts
Definition: DataStructs.h:551
std::vector< SectionFit > SectionFits
Definition: DataStructs.h:281
std::vector< float > Envelope
Definition: DataStructs.h:400
call study functions to develop cuts, etc
Definition: DataStructs.h:528
const geo::GeometryCore * geom
Definition: DataStructs.h:567
std::vector< unsigned short > minPts
min number of Pts required to make a trajectory
Definition: DataStructs.h:557
int UID
a unique ID for all slices
Definition: DataStructs.h:201
The data type to uniquely identify a TPC.
Definition: geo_types.h:306
PlaneID_t Plane
Index of the plane within its TPC.
Definition: geo_types.h:373
Description of the physical geometry of one entire detector.
Definition: GeometryCore.h:91
constexpr unsigned int pAlgModSize
Definition: DataStructs.h:275
std::array< double, 2 > Vector2_t
Definition: DataStructs.h:42
Definition of data types for geometry description.
std::vector< unsigned int > Hits
Definition: DataStructs.h:355
float dEdx(detinfo::DetectorClocksData const &clockData, detinfo::DetectorPropertiesData const &detProp, const TCSlice &slc, TP3D &tp3d)
Definition: PFPUtils.cxx:2671
std::vector< unsigned int > firstWire
the first wire with a hit
Definition: DataStructs.h:646
float ChiDOF
Definition: DataStructs.h:180
std::vector< float > BeginChg
Definition: DataStructs.h:380
int ID
ID that is local to one slice.
Definition: DataStructs.h:200
std::vector< TCSlice > slices
Definition: DataStructs.cxx:13
float ParentFOM(std::string inFcnLabel, TCSlice &slc, PFPStruct &pfp, ShowerStruct3D &ss3, bool prt)
Definition: TCShower.cxx:2051
vertex quality is suspect - No requirement made on chg btw it and the Tj
Definition: DataStructs.h:93
std::bitset< 16 > modes
number of points to find AveChg
Definition: DataStructs.h:599
std::vector< TCHit > slHits
Definition: DataStructs.h:661
std::vector< float > chargeCuts
Definition: DataStructs.h:553
EndFlag_t
Definition: DataStructs.h:498
std::vector< int > EnvPlane
Definition: DataStructs.h:401
std::vector< TrajPoint > seeds
Definition: DataStructs.cxx:14
float ParSlp
Definition: DataStructs.h:178
float maxWireSkipNoSignal
max number of wires to skip w/o a signal on them
Definition: DataStructs.h:573
std::vector< short > MCSMom
Definition: DataStructs.h:388
const std::vector< std::string > VtxBitNames
Definition: DataStructs.cxx:89
std::vector< double > EnergyErr
Definition: DataStructs.h:348
std::vector< double > MIPEnergyErr
Definition: DataStructs.h:350
std::vector< float > vtxScoreWeights
Definition: DataStructs.h:543
unsigned int CTP_t
Definition: DataStructs.h:45
std::vector< Vtx3Store > vtx3s
3D vertices
Definition: DataStructs.h:669
geo::TPCID TPCID
Definition: DataStructs.h:654
TCModes_t
Definition: DataStructs.h:521
std::vector< int > StageNum
Definition: DataStructs.h:396
std::vector< TjForecast > tjfs
Definition: DataStructs.cxx:10
std::bitset< 128 > useAlg
Max hit separation for making junk trajectories. < 0 to turn off.
Definition: DataStructs.h:578
CTP_t EncodeCTP(const geo::WireID &wireID)
Definition: DataStructs.h:57
std::vector< float > pfpStitchCuts
cuts for stitching between TPCs
Definition: DataStructs.h:555
std::vector< short > deltaRayTag
Definition: DataStructs.h:545
save cosmic ray tree
Definition: DataStructs.h:529
float ParErr
Definition: DataStructs.h:177
float VLAStepSize
Definition: DataStructs.h:576
std::bitset< 128 > AlgMod
Bit set if algorithm AlgBit_t modifed the trajectory.
Definition: DataStructs.h:188
call study functions to develop cuts, etc
Definition: DataStructs.h:526
std::vector< double > Energy
Definition: DataStructs.h:347
std::vector< short > muonTag
Definition: DataStructs.h:546
std::vector< float > BeginWir
Definition: DataStructs.h:377
geo::PlaneID DecodeCTP(CTP_t CTP)
std::vector< float > EndChg
Definition: DataStructs.h:385
std::vector< int > TjIDs
Definition: DataStructs.h:278
PFPFlags_t
Definition: DataStructs.h:300
std::bitset< 128 > dbgAlg
Allow user to turn on debug printing in algorithms (that print...)
Definition: DataStructs.h:579
std::vector< TCWireIntersection > wireIntersections
Definition: DataStructs.h:631
unsigned int HitIndex
Definition: DataStructs.h:307
std::vector< unsigned int > nWires
Definition: DataStructs.h:645
use the stiff electron strategy
Definition: DataStructs.h:492
std::array< double, 3 > Vector3_t
Definition: DataStructs.h:40
std::vector< float > chkStopCuts
Bragg peak finder configuration.
Definition: DataStructs.h:548
std::vector< TP3D > TP3Ds
Definition: DataStructs.h:280
int ID
ID of the recob::Slice (not the sub-slice)
Definition: DataStructs.h:656
std::array< std::vector< float >, 2 > dEdx
Definition: DataStructs.h:283
std::vector< float > cr_pfpxmin
Definition: DataStructs.h:411
unsigned int subRun
Definition: DataStructs.h:628
std::vector< float > vtx2DCuts
Max position pull, max Position error rms.
Definition: DataStructs.h:541
unsigned short pln1
Definition: DataStructs.h:119
unsigned short nPlanes
Definition: DataStructs.h:655
std::vector< PFPStruct > pfps
Definition: DataStructs.h:670
float multHitSep
preferentially "merge" hits with < this separation
Definition: DataStructs.h:565
float JTMaxHitSep2
Definition: DataStructs.h:577
std::vector< int > EnvShowerID
Definition: DataStructs.h:403
TPEnvironment_t
Definition: DataStructs.h:510
TCEvent evt
Definition: DataStructs.cxx:8
call study functions to develop cuts, etc (see TCTruth.cxx)
Definition: DataStructs.h:525
unsigned int allHitsIndex
Definition: DataStructs.h:605
unsigned short MVI
Definition: DataStructs.h:294
TPCID_t TPC
Index of the TPC within its cryostat.
Definition: geo_types.h:315
std::vector< int > IsShowerTj
Definition: DataStructs.h:393
constexpr unsigned int Cpad
Definition: DataStructs.h:47
unsigned short nPtsFit
Definition: DataStructs.h:181
std::vector< double > dEdx
Definition: DataStructs.h:351
Float_t X
Definition: plot.C:37
std::vector< short > PlaneNum
Definition: DataStructs.h:390
std::vector< std::vector< std::pair< unsigned int, unsigned int > > > wireHitRange
Definition: DataStructs.h:618
master switch for turning on debug mode
Definition: DataStructs.h:524
Definition: Step.hh:40
tag cosmic rays
Definition: DataStructs.h:530
don&#39;t mess with this line
Definition: DataStructs.h:487
std::vector< int > DtrUIDs
Definition: DataStructs.h:288
calorimetry
use the stiff muon strategy
Definition: DataStructs.h:493
unsigned int index
Definition: DataStructs.h:34