/
PndPidCandidate.h
396 lines (323 loc) · 14.6 KB
/
PndPidCandidate.h
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
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
#ifndef PNDPIDCANDIDATE_H
#define PNDPIDCANDIDATE_H
//////////////////////////////////////////////////////////////////////////
// //
// PndPidCandidate //
// //
// Definition of the Panda pid candidate. //
// //
// Author: Klaus Goetzen, GSI, 12.06.08 //
// Copyright (C) 2008, GSI Darmstadt. //
// //
//////////////////////////////////////////////////////////////////////////
#include <iostream>
#include <assert.h>
#include "FairRecoCandidate.h"
#include "TArrayI.h"
#include "TMatrixD.h"
#include "TVector3.h"
#include "TLorentzVector.h"
#include "FairTrackParam.h"
//class VAbsPidInfo;
#include <PndTrack.h>
// ========================================================================
// ===== PndPidCandidate - Class definig the AOD interface ====
// ========================================================================
class PndPidCandidate : public FairRecoCandidate //FairMultiLinkedData
{
public:
PndPidCandidate();
PndPidCandidate(Int_t charge, TVector3 &pos, TLorentzVector &p4, TMatrixD &cov7 );
PndPidCandidate(Int_t charge, TVector3 &pos, TLorentzVector &p4);
~PndPidCandidate();
// ************************
// ACCESSOR METHODS
// ************************
// ************************
// basic properties:
// ************************
Int_t GetCharge() const { return fCharge; }
TVector3 GetPosition() const { return TVector3(fXposition, fYposition, fZposition); }
TVector3 GetMomentum() const { return TVector3(fXmomentum, fYmomentum, fZmomentum); }
Double_t GetEnergy() const { return fEnergy; }
TLorentzVector GetLorentzVector() const{return TLorentzVector(fXmomentum,fYmomentum,fZmomentum,fEnergy);}
TVector3 GetFirstHit() const{return TVector3(fFirstHitX,fFirstHitX,fFirstHitX);}
TVector3 GetLastHit() const{return TVector3(fLastHitX,fLastHitY,fLastHitZ);}
const Float_t* GetErrorP7() const{return fErrP7;}
const Float_t* GetParams() const{return fParams;}
const Float_t* GetCov() const{return fCov;}
TMatrixD& Cov7() const;
TMatrixD& P4Cov() const ;
Int_t GetMcIndex() const{return fMcIndex;}
Int_t GetTrackIndex() const{return fTrackIndex;}
Int_t GetTrackBranch() const{return fTrackBranch;}
// ************************
// detector specific stuff
// ************************
#if _OLD_
// MVD
Float_t GetMvdDEDX() const { return fMvdDEDX; }
Int_t GetMvdHits() const { return fMvdHits; }
//const Int_t* GetMvdHitIndexArray() {return fMvdHitIndexArray.GetArray();}
// STT
Float_t GetSttMeanDEDX() const { return fSttMeanDEDX; }
Int_t GetSttHits() const { return fSttHits; }
//const Int_t* GetSttHitIndexArray() {return fSttHitIndexArray.GetArray();}
// GEM
Int_t GetGemHits() const { return fGemHits; }
// TOF
Float_t GetTofStopTime() const { return fTofStopTime; }
Float_t GetTofM2() const { return fTofM2; }
Float_t GetTofTrackLength() const { return fTofTrackLength; }
Float_t GetTofQuality() const { return fTofQuality; }
Int_t GetTofIndex() const { return fTofIndex; }
Float_t GetTofBeta() const { return (fTofStopTime>0.&&fTofTrackLength>0.) ? fTofTrackLength/(30. * fTofStopTime) : -1.; }
// Barrel DIRC
Float_t GetDrcThetaC() const { return fDrcThetaC;}
Float_t GetDrcThetaCErr() const { return fDrcThetaCErr;}
Float_t GetDrcQuality() const { return fDrcQuality;}
Int_t GetDrcNumberOfPhotons() const { return fDrcNumberOfPhotons;}
Int_t GetDrcIndex() const { return fDrcIndex; }
// Disc DIRC
Float_t GetDiscThetaC() const { return fDiscThetaC;}
Float_t GetDiscThetaCErr() const { return fDiscThetaCErr;}
Float_t GetDiscQuality() const { return fDiscQuality;}
Int_t GetDiscNumberOfPhotons() const { return fDiscNumberOfPhotons;}
Int_t GetDiscIndex() const { return fDiscIndex; }
// RICH
Float_t GetRichThetaC() const { return fRichThetaC;}
Float_t GetRichThetaCErr() const { return fRichThetaCErr;}
Float_t GetRichQuality() const { return fRichQuality;}
Int_t GetRichNumberOfPhotons() const { return fRichNumberOfPhotons;}
Int_t GetRichIndex() const { return fRichIndex; }
// EMC
Float_t GetEmcRawEnergy() const{return fEmcRawEnergy;}
Float_t GetEmcCalEnergy() const{return fEmcCalEnergy;}
Float_t GetEmcQuality() const{return fEmcQuality;}
Int_t GetEmcNumberOfCrystals() const{return fEmcNumberOfCrystals;}
Int_t GetEmcNumberOfBumps() const{return fEmcNumberOfBumps;}
Int_t GetEmcModule() const { return fEmcModule; }
Int_t GetEmcIndex() const { return fEmcIndex; }
// EMC Cluster properties.
Double_t GetEmcClusterZ20() const { return fEmcZ20; }
Double_t GetEmcClusterZ53() const { return fEmcZ53; }
Double_t GetEmcClusterLat() const { return fEmcLat; }
Double_t GetEmcClusterE1() const { return fEmcE1; }
Double_t GetEmcClusterE9() const { return fEmcE9; }
Double_t GetEmcClusterE25() const { return fEmcE25; }
// MUO
Int_t GetMuoNumberOfLayers()const {return fMuoNumberOfLayers;}
Float_t GetMuoProbability() const{return fMuoProbability;}
Float_t GetMuoQuality() const{return fMuoQuality;}
Float_t GetMuoIron() const{return fMuoIron;}
Float_t GetMuoMomentumIn()const{return fMuoMomentumIn;}
Int_t GetMuoModule() const { return fMuoModule; }
Int_t GetMuoHits() const { return fMuoHits; }
Int_t GetMuoIndex() const { return fMuoIndex; }
#endif
// Tracking
Int_t GetDegreesOfFreedom() const{return fDegreesOfFreedom;}
Int_t GetFitStatus() const{return fFitStatus;}
Float_t GetChiSquared() const{return fChiSquared;}
//TODO: PID values workaround
Float_t GetElectronPidLH() const { return -1; }
Float_t GetMuonPidLH() const { return -1; }
Float_t GetPionPidLH() const { return -1; }
Float_t GetKaonPidLH() const { return -1; }
Float_t GetProtonPidLH() const { return -1; }
// ************************
// MODIFIER METHODS
// ************************
void Lock() {fLocked=true;}
void Unlock() {fLocked=false;}
bool IsLocked() {return fLocked;}
// ************************
// basic properties:
// ************************
void SetCharge(Int_t charge) { fCharge=charge;}
void SetPosition(TVector3 &pos) { fXposition=pos.X(); fYposition=pos.Y(); fZposition=pos.Z(); }
void SetMomentum(TVector3 &mom) { fXmomentum=mom.X(); fYmomentum=mom.Y(); fZmomentum=mom.Z(); }
void SetEnergy(Double_t en) { fEnergy=(Float_t) en;}
void SetLorentzVector(TLorentzVector &p4);
void SetFirstHit(TVector3 &pos) { fFirstHitX=pos.X(); fFirstHitY=pos.Y(); fFirstHitZ=pos.Z(); }
void SetLastHit(TVector3 &pos) { fLastHitX =pos.X(); fLastHitY =pos.Y(); fLastHitZ=pos.Z(); }
void SetCov7(const TMatrixD &cov7 );
void SetP4Cov(const TMatrixD &covP4 );
void SetMcIndex(int idx) {fMcIndex=idx; }
void SetTrackIndex(int idx) {fTrackIndex=idx; }
void SetTrackBranch(int idx) {fTrackBranch=idx; }
void SetHelixParams(Double_t *par) {if (par!=0) for (int i=0; i<5;i++) fParams[i] = (Float_t)par[i];}
void SetHelixCov(Double_t* cov){if (cov!=0) for (int i=0; i<15;i++) fCov[i] = (Float_t)cov[i];}
// ************************
// detector specific stuff
// ************************
#if _OLD_
// MVD
void SetMvdDEDX(Double_t val) { fMvdDEDX = (Float_t) val; }
void SetMvdHits(Int_t val) { fMvdHits = val; }
//void SetMvdHitIndexArray(Int_t n, Int_t* arr) { fMvdHits=n; fMvdHitIndexArray.Set(n,arr);}
// STT
void SetSttMeanDEDX(Double_t val) { fSttMeanDEDX = (Float_t) val; }
void SetSttHits(Int_t val) { fSttHits = val; }
//void SetSttHitIndexArray(Int_t n, Int_t* arr) { fSttHits=n; fSttHitIndexArray.Set(n,arr);}
void SetGemHits(Int_t val) {fGemHits = val;}
// TOF
void SetTofStopTime(Double_t val) { fTofStopTime = (Float_t) val;}
void SetTofM2(Double_t val) { fTofM2 = (Float_t) val;}
void SetTofTrackLength(Double_t val) { fTofTrackLength = val; }
void SetTofQuality(Double_t val) { fTofQuality = val; }
void SetTofIndex(Int_t val) { fTofIndex = val;}
// Barrel DIRC
void SetDrcThetaC(Double_t val) { fDrcThetaC= (Float_t) val;}
void SetDrcThetaCErr(Double_t val) { fDrcThetaCErr=(Float_t) val;}
void SetDrcQuality(Double_t val) { fDrcQuality=(Float_t) val;}
void SetDrcNumberOfPhotons(Int_t val) { fDrcNumberOfPhotons = val;}
void SetDrcIndex(Int_t val) { fDrcIndex = val; }
// Disc DIRC
void SetDiscThetaC(Double_t val) { fDiscThetaC=(Float_t) val;}
void SetDiscThetaCErr(Double_t val) { fDiscThetaCErr=(Float_t) val;}
void SetDiscQuality(Double_t val) { fDiscQuality=(Float_t) val;}
void SetDiscNumberOfPhotons(Int_t val) { fDiscNumberOfPhotons=val;}
void SetDiscIndex(Int_t val) { fDiscIndex = val; }
// RICH
void SetRichThetaC(Double_t val) { fRichThetaC=(Float_t) val;}
void SetRichThetaCErr(Double_t val) { fRichThetaCErr=(Float_t) val;}
void SetRichQuality(Double_t val) { fRichQuality=(Float_t) val;}
void SetRichNumberOfPhotons(Int_t val) { fRichNumberOfPhotons= val;}
void SetRichIndex(Int_t val) { fRichIndex = val; }
// EMC
void SetEmcRawEnergy(Double_t val) { fEmcRawEnergy=(Float_t) val;}
void SetEmcCalEnergy(Double_t val) { fEmcCalEnergy=(Float_t) val;}
void SetEmcQuality(Double_t val) { fEmcQuality=(Float_t) val;}
void SetEmcNumberOfCrystals(Int_t val) { fEmcNumberOfCrystals= val;}
void SetEmcNumberOfBumps(Int_t val) { fEmcNumberOfBumps= val;}
void SetEmcModule(Int_t val) { fEmcModule = val; }
void SetEmcIndex(Int_t val) { fEmcIndex = val; }
void SetEmcClusterZ20(Double_t val) { fEmcZ20 = val; }
void SetEmcClusterZ53(Double_t val) { fEmcZ53 = val; }
void SetEmcClusterLat(Double_t val) { fEmcLat = val; }
void SetEmcClusterE1(Double_t val) { fEmcE1 = val; }
void SetEmcClusterE9(Double_t val) { fEmcE9 = val; }
void SetEmcClusterE25(Double_t val) { fEmcE25 = val; }
// MUO
void SetMuoNumberOfLayers(Int_t val) { fMuoNumberOfLayers= val;}
void SetMuoProbability(Double_t val) { fMuoProbability=(Float_t) val;}
void SetMuoQuality(Double_t val) { fMuoQuality=(Float_t) val;}
void SetMuoIron(Double_t val) { fMuoIron=(Float_t) val;}
void SetMuoMomentumIn(Double_t val) { fMuoMomentumIn=(Float_t) val;}
void SetMuoModule(Int_t val) { fMuoModule = val; }
void SetMuoHits(Int_t val) { fMuoHits = val; }
void SetMuoIndex(Int_t val) { fMuoIndex = val; }
#endif
// Tracking
void SetDegreesOfFreedom(Int_t val) { fDegreesOfFreedom=val;}
void SetFitStatus(Int_t val) { fFitStatus= val;}
void SetChiSquared(Double_t val) { fChiSquared=(Float_t) val;}
//TODO: workaround
void SetElectronPidLH(Double_t val) { return; }
void SetMuonPidLH(Double_t val) { return; }
void SetPionPidLH(Double_t val) { return; }
void SetKaonPidLH(Double_t val) { return; }
void SetProtonPidLH(Double_t val) { return; }
// FIXME: not the best style, agreed;
unsigned GetParameterizationCount( void ) const { return mParameterizations.size(); };
const NaiveTrackParameterization *GetParameterization(unsigned ih) const {
return (ih < mParameterizations.size() ? &mParameterizations[ih] : 0);
};
const NaiveTrackParameterization *GetNearestParameterization(const TVector3 &x0, const TVector3 &n0);
const NaiveTrackParameterization *GetNearestParameterization(double r);
std::vector<NaiveTrackParameterization> mParameterizations;
void SetDefault();
protected:
// Candidate lock
Bool_t fLocked;
// the basic params
Char_t fCharge; // The electrical charge
Float_t fXposition, // The origin in x
fYposition, // The origin in y
fZposition; // The origin in z
Double_t
fXmomentum, // The momentum in x
fYmomentum, // The momentum in y
fZmomentum, // The momentum in z
fEnergy; // The total energy
Float_t fFirstHitX,
fFirstHitY,
fFirstHitZ;
Float_t fLastHitX,
fLastHitY,
fLastHitZ;
Int_t fMcIndex; // MC truth index
Int_t fTrackIndex; // PndTrack index
Int_t fTrackBranch;// index of PndTrack TClonesArray
Float_t fErrP7[28]; // The symmetric 7*7 error matrix
Float_t fParams[5]; // The helix fit parameters
Float_t fCov[15]; // The helix error matrix
#if _OLD_
// detector quantities
// MVD
Float_t fMvdDEDX;
Int_t fMvdHits;
//TArrayI fMvdHitIndexArray;
// STT
Float_t fSttMeanDEDX;
Int_t fSttHits;
//TArrayI fSttHitIndexArray;
//GEM
Int_t fGemHits;
// TOF
Float_t fTofStopTime;
Float_t fTofM2;
Float_t fTofTrackLength;
Float_t fTofQuality;
Int_t fTofIndex;
// Barrel DIRC
Float_t fDrcThetaC;
Float_t fDrcThetaCErr;
Float_t fDrcQuality;
Int_t fDrcNumberOfPhotons;
Int_t fDrcIndex;
// Disc DIRC
Float_t fDiscThetaC;
Float_t fDiscThetaCErr;
Float_t fDiscQuality;
Int_t fDiscNumberOfPhotons;
Int_t fDiscIndex;
// RICH
Float_t fRichThetaC;
Float_t fRichThetaCErr;
Float_t fRichQuality;
Int_t fRichNumberOfPhotons;
Int_t fRichIndex;
// EMC
Float_t fEmcRawEnergy;
Float_t fEmcCalEnergy;
Float_t fEmcQuality;
Int_t fEmcNumberOfCrystals;
Int_t fEmcNumberOfBumps;
Int_t fEmcModule;
Int_t fEmcIndex;
Double_t fEmcZ20;
Double_t fEmcZ53;
Double_t fEmcLat;
Double_t fEmcE1;
Double_t fEmcE9;
Double_t fEmcE25;
// MUO
Int_t fMuoNumberOfLayers;
Float_t fMuoProbability;
Float_t fMuoQuality;
Float_t fMuoIron;
Float_t fMuoMomentumIn;
Int_t fMuoModule;
Int_t fMuoHits;
Int_t fMuoIndex;
#endif
// Tracking
Int_t fDegreesOfFreedom;
Int_t fFitStatus;
Float_t fChiSquared;
ClassDef(PndPidCandidate,8) // Abstract base class for MicroDST candidates
};
//std::ostream& operator << (std::ostream& o, const VAbsMicroCandidate&);
#endif