CalibTreeRecord.h
Go to the documentation of this file.
1 ////////////////////////////////////////////////////////////////////////
2 //
3 // File: CalibTreeRecord.h
4 // Author: Jason Stock (jason.stock@mines.sdsmt.edu)
5 // This file is a set of classes for writeout of data relative to calibration sources.
6 // The main purpose of this class is to allow easy fast analysis of calibration
7 // simulations.
8 //
9 ////////////////////////////////////////////////////////////////////////
10 
11 //includes
12 #ifndef DUNE_DUNEOBJ_CALIBTREERECORD_H
13 #define DUNE_DUNEOBJ_CALIBTREERECORD_H
14 #include <vector>
15 #include <TObject.h>
16 #include <iostream>
17 
18 namespace CalibTreeRecord {
19 // typedef int64_t eve_number_t ;
20 // typedef int64_t particle_number_t ;
21  typedef Long64_t eve_number_t ;
22  typedef Long64_t particle_number_t ;
23  //class OpHit : public TObject{
24 
25  class HCRec{
26  /*ClassDef(CalibTreeRecord::HCRec,10);*/
27  public:
28  int eve_index;
30  int hit_index;
31  HCRec(int e, int p, int h)
32  :eve_index(e),part_index(p),hit_index(h)
33  {}
35  :eve_index(0), part_index(0), hit_index(0)
36  {}
37  };
38 
40  /*ClassDef(CalibTreeRecord::HitContributor,10);*/
41  public:
42  int index; //The internal hit index of the hit this record is describing.
43  std::vector<HCRec> locations; //eve index, part index, hits index (vector position).
45  :index(i), locations()
46  {}
48  :index(), locations()
49  {}
50  };
51 
53  public:
54  Double_t pes;
55  Double_t num_photons;
56  Double_t time;
57  Double_t width;
58  Double_t energy;
59  Double_t split;//fraction of hit energy in this partial.
60  UInt_t opdet;
61  Long64_t index;
62  //int64_t index;
63  };
64 
65  class PartialOpHit : public PartialPDOpHit {
66  /*ClassDef(CalibTreeRecord::PartialOpHit,10);*/
67  public:
68  UInt_t opchan;
69  };
70 
71  //class Hit : public TObject{
72  class PartialHit {
73  /*ClassDef(CalibTreeRecord::PartialHit,10);*/
74  public:
75  Double_t charge;
76  Double_t num_electrons;
77  Double_t energy;
78  Double_t time;
79  Double_t width;
80  Double_t split;//fraction of track energy in this hit.
81  UInt_t wire;
82  Long64_t index;
83  //int64_t index;
85  };
86 
87 /* class TrackRecord {
88  bool isEve;
89  Int_t trackId;
90  Double_t x_pos;
91  Double_t y_pos;
92  Double_t z_pos;
93  std::vector<PartialHit> partial_hits;
94  std::vector<PartialOpHit> partial_ophits;
95  }*/ //without useful rescattering information this is not possible.
96 
97  //class ParticleRecord :public TObject {
99  /*ClassDef(CalibTreeRecord::ParticleRecord,10);*/
100  public:
101  bool isEve;
102  //particle_number_t number;
103  Int_t trackId;
104  UInt_t pdgid;
105  Double_t dP;
106  Double_t dE;
107  Double_t x_pos;
108  Double_t y_pos;
109  Double_t z_pos;
110  Double_t t_pos;
111  std::vector<PartialHit> partial_hits;
112  std::vector<PartialOpHit> partial_ophits;
113  };
114 
115  class EveRecord{
116  /*ClassDef(CalibTreeRecord::EveRecord,10);*/
117  public:
118  //eve_number_t number;
119  Int_t trackId;
120  UInt_t pdgid;
121  Double_t x_pos;
122  Double_t y_pos;
123  Double_t z_pos;
124  Double_t t_pos;
125  std::vector<ParticleRecord> particles;
127 
128  };
129 
130  //class CalibTreeRecord :public TObject {
132  /*ClassDef(CalibTreeRecord::CalibTreeRecord,10);*/
133  public:
135  UInt_t run;
136  UInt_t subrun;
137  UInt_t event;
138  std::vector<EveRecord> eves;
139  std::vector<HitContributor> hits;
140  std::vector<HitContributor> ophits;
141 
142  void Clear();
143  void stdout_dump();
144  };
145 
146 
147 
148 }
149 
150 #endif
std::vector< HitContributor > hits
std::string string
Definition: nybbler.cc:12
std::vector< HCRec > locations
Long64_t particle_number_t
const double e
HCRec(int e, int p, int h)
p
Definition: test.py:223
generator
Definition: train.py:468
std::vector< HitContributor > ophits
std::vector< PartialHit > partial_hits
std::vector< PartialOpHit > partial_ophits
std::vector< EveRecord > eves
std::vector< ParticleRecord > particles
Long64_t eve_number_t