HighLAND
P0DDataClasses.hxx
1 #ifndef P0DDataClasses_hxx
2 #define P0DDataClasses_hxx
3 
4 
5 #include "DataClasses.hxx"
6 
7 const UInt_t NMAXVERTEXGROUPS = 20;
8 
9 class AnaP0DHit{
10 public :
11 
12  AnaP0DHit();
13  virtual ~AnaP0DHit(){}
14 
15  /// Clone this object.
16  virtual AnaP0DHit* Clone() {
17  return new AnaP0DHit(*this);
18  }
19 
20 protected:
21 
22  /// Copy constructor is protected, as Clone() should be used to copy this object.
23  AnaP0DHit(const AnaP0DHit& hit);
24 
25 public:
26 
27  enum TypeEnum{
28  kXHit=0,
29  kYHit,
30  kUnassigned
31  };
32 
33  UInt_t GeomID; // Geometry ID
34  // UInt_t ChanID; // Channel ID
35  Float_t Time; // Hit time as reported by hit->GetTime()
36 
37  // TypeEnum Type; // Hit type (x or y)
38  Float_t Charge; // Hit charge without attenuation correction
39  // Float_t Position[4]; // 3D-Position and time of the hit. 3D pos from geomID
40 };
41 
42 
44 public :
45 
46  AnaP0DCluster();
47  virtual ~AnaP0DCluster();
48 
49  /// Clone this object.
50  virtual AnaP0DCluster* Clone() {
51  return new AnaP0DCluster(*this);
52  }
53 
54 protected:
55 
56  /// Copy constructor is protected, as Clone() should be used to copy this object.
57  AnaP0DCluster(const AnaP0DCluster& cluster);
58 
59 public:
60 
61  AnaP0DHit** Hits; // Is it really needed ?
62  Int_t nHits;
63 
64  Float_t Position [4];
65  Float_t PosVariance[4]; // Is it really needed ?
66  Short_t ValidDimensions;
67 
68  std::string AlgorithmName; // --> enum
69  unsigned int UniqueID;
70  // Short_t NFiducialHits; // Clark has to tell me what it means
71  Float_t EDeposit;
72  Float_t Moments[9]; ///< Moments of the Cluster
73 
74  AnaTrueParticleB* TrueParticle;
75 };
76 
77 
79 public :
80 
82  virtual ~AnaP0DParticle();
83 
84  /// Clone this object.
85  virtual AnaP0DParticle* Clone() {
86  return new AnaP0DParticle(*this);
87  }
88 
89  /// Dump the object to screen.
90  void Print() const;
91 
92 protected:
93 
94  /// Copy constructor is protected, as Clone() should be used to copy this object.
95  AnaP0DParticle(const AnaP0DParticle& particle);
96 
97 public:
98 
99  enum ParticleTypeEnum{
100  kTrack=0,
101  kShower,
102  kUnknown
103  };
104 
105 
106  ParticleTypeEnum Type;
107 
108  AnaP0DCluster** Clusters; //!
109  Int_t nClusters; //!
110 
111  Short_t ValidDimensions;
112  std::string AlgorithmName; // --> enum
113  Float_t SideDeposit;
114  Float_t EndDeposit;
115  Float_t EDeposit;
116  std::vector<Short_t> PID;
117  std::vector<Float_t> PID_weight;
118 
119  // --------- Only for systematics -------------------
120  std::vector<std::string> realPIDNames;
121  std::vector<std::vector<Float_t> > realPIDValues;
122  std::vector<std::string> integerPIDNames;
123  std::vector<std::vector<Short_t> > integerPIDValues;
124 
125 #if VERSION_HAS_P0D_AVERAGED_TIME
126  /// Average Time: using results from time vs distance fit
127  Float_t AvgTime;
128 #endif
129 
130 };
131 
132 class AnaP0DVertex: public AnaVertexB{
133 public :
134 
135  AnaP0DVertex();
136  virtual ~AnaP0DVertex();
137 
138  /// Clone this object.
139  virtual AnaP0DVertex* Clone() {
140  return new AnaP0DVertex(*this);
141  }
142 
143 protected:
144 
145  /// Copy constructor is protected, as Clone() should be used to copy this object.
146  AnaP0DVertex(const AnaP0DVertex& vertex);
147 
148 public:
149 
150  AnaP0DCluster** Clusters;
151  Int_t nClusters;
152 
153  Float_t PosVariance[4]; // Is it really needed ?
154  Short_t ValidDimensions;
155  std::string AlgorithmName; // --> enum
156  Short_t NHits;
157  // unsigned int UniqueID; // not needed for the moment
158  Float_t Fiducial;
159 };
160 
161 class AnaP0DBunch: public AnaBunch{ // TODO. Should inherit from AnaBunchB
162 public :
163 
164  AnaP0DBunch();
165  virtual ~AnaP0DBunch();
166 
167  /// Clone this object.
168  virtual AnaP0DBunch* Clone() {
169  return new AnaP0DBunch(*this);
170  }
171 
172 protected:
173 
174  /// Copy constructor is protected, as Clone() should be used to copy this object.
175  AnaP0DBunch(const AnaP0DBunch& bunch);
176 
177 public:
178 
179  Bool_t P0DWaterStatus;
180 
181  AnaP0DCluster** Clusters;
182  Int_t nClusters;
183 
184  std::vector<AnaP0DBunch*> AlternateBunches;
185 
186  std::string FullName;
187 };
188 
189 
190 class AnaP0DEvent: public AnaEventB{
191 public :
192 
193  AnaP0DEvent();
194  virtual ~AnaP0DEvent();
195 
196  /// Clone this object.
197  virtual AnaP0DEvent* Clone() {
198  return new AnaP0DEvent(*this);
199  }
200 
201  /// Create AnaP0dEvent from a Spill and a bunch in that spill
202  AnaP0DEvent(const AnaSpillB& spill, const AnaP0DBunch& p0dBunch);
203 
204 protected:
205 
206  /// Copy constructor is protected, as Clone() should be used to copy this object.
207  AnaP0DEvent(const AnaP0DEvent& event);
208 
209 public:
210 
211  Bool_t P0DWaterStatus;
212 
213  AnaP0DCluster** Clusters;
214  Int_t nClusters;
215 
216  std::vector<AnaP0DEvent*> AlternateEvents;
217 
218  std::string FullName;
219 };
220 
221 
222 class EventBoxP0D2:public EventBoxB{
223  public :
224 
225  enum VertexGroupEnum{
226  kVertexUnassigned=0,
227  kVerticesInP0DFinal
228  };
229 
230  enum PaticleGroupEnum{
231  kParticleUnassigned=0,
232  kAllP0DParticles,
233  kP0DTracks,
234  kP0DShowers
235  };
236 
237 
238  EventBoxP0D2();
239  virtual ~EventBoxP0D2();
240 
241  /// Different groups of tracks used for selection and systematics
242  Int_t nVerticesInGroup[NMAXVERTEXGROUPS];
243  AnaP0DVertex** VerticesInGroup[NMAXVERTEXGROUPS];
244 };
245 
246 
247 namespace anaUtils{
248  void CreateArray(AnaP0DCluster** &tgtArr, int nObj);
249  void CopyArray( AnaP0DCluster** const &src, AnaP0DCluster** &dest, int n);
250  void CreateArray(AnaP0DHit** &tgtArr, int nObj);
251  void CopyArray( AnaP0DHit** const &src, AnaP0DHit** &dest, int n);
252 }
253 
254 #endif
Float_t AvgTime
Average Time: using results from time vs distance fit.
virtual AnaP0DEvent * Clone()
Clone this object.
Extension to AnaParticleB containing momentum and charge info, to be used by aggregation.
virtual AnaP0DParticle * Clone()
Clone this object.
virtual AnaP0DBunch * Clone()
Clone this object.
Representation of a true Monte Carlo trajectory/particle.
Representation of a global vertex.
virtual AnaP0DHit * Clone()
Clone this object.
virtual AnaP0DCluster * Clone()
Clone this object.
Representation of a P0D segment of a global track.
This namespace contains useful functions for analyses related to kinematics.
virtual AnaP0DVertex * Clone()
Clone this object.