FairRoot/PandaRoot
PndPidCandidate.h
Go to the documentation of this file.
1 #ifndef PNDPIDCANDIDATE_H
2 #define PNDPIDCANDIDATE_H
3 // //
5 // PndPidCandidate //
6 // //
7 // Definition of the Panda pid candidate. //
8 // //
9 // Author: Klaus Goetzen, GSI, 12.06.08 //
10 // Copyright (C) 2008, GSI Darmstadt. //
11 // //
13 
14 #include <iostream>
15 
16 #include <assert.h>
17 
18 #include "FairTimeStamp.h"
19 #include "TArrayI.h"
20 #include "TMatrixD.h"
21 #include "TVector3.h"
22 #include "TLorentzVector.h"
23 
24 //class VAbsPidInfo;
25 
26 // ========================================================================
27 // ===== PndPidCandidate - Class definig the AOD interface ====
28 // ========================================================================
29 
30 class PndPidCandidate : public FairTimeStamp
31 {
32 
33  public:
34 
36  PndPidCandidate(Int_t charge, TVector3 &pos, TLorentzVector &p4, TMatrixD &cov7 );
37  PndPidCandidate(Int_t charge, TVector3 &pos, TLorentzVector &p4);
38 
40 
41  // ************************
42  // ACCESSOR METHODS
43  // ************************
44 
45  // ************************
46  // basic properties:
47  // ************************
48 
49  Int_t GetCharge() const {
50  return fCharge;
51  }
52  TVector3 GetPosition() const {
53  return TVector3(fXposition, fYposition, fZposition);
54  }
55  TVector3 GetMomentum() const {
56  return TVector3(fXmomentum, fYmomentum, fZmomentum);
57  }
58  Double_t GetEnergy() const {
59  return fEnergy;
60  }
61  TLorentzVector GetLorentzVector() const {
62  return TLorentzVector(fXmomentum,fYmomentum,fZmomentum,fEnergy);
63  }
64 
65  TVector3 GetFirstHit() const {
66  return TVector3(fFirstHitX,fFirstHitX,fFirstHitX);
67  }
68  TVector3 GetLastHit() const {
69  return TVector3(fLastHitX,fLastHitY,fLastHitZ);
70  }
71 
72  const Float_t* GetErrorP7() const {
73  return fErrP7;
74  }
75  const Float_t* GetParams() const {
76  return fParams;
77  }
78  const Float_t* GetCov() const {
79  return fCov;
80  }
81  TMatrixD& Cov7() const;
82  TMatrixD& P4Cov() const ;
83  Int_t GetMcIndex() const {
84  return fMcIndex;
85  }
86  Int_t GetTrackIndex() const {
87  return fTrackIndex;
88  }
89  Int_t GetTrackBranch() const {
90  return fTrackBranch;
91  }
92 
93  // ************************
94  // detector specific stuff
95  // ************************
96 
97  // MVD
98  Float_t GetMvdDEDX() const {
99  return fMvdDEDX;
100  }
101  Int_t GetMvdHits() const {
102  return fMvdHits;
103  }
104  //const Int_t* GetMvdHitIndexArray() {return fMvdHitIndexArray.GetArray();}
105 
106  // STT
107  Float_t GetSttMeanDEDX() const {
108  return fSttMeanDEDX;
109  }
110  Int_t GetSttHits() const {
111  return fSttHits;
112  }
113  //const Int_t* GetSttHitIndexArray() {return fSttHitIndexArray.GetArray();}
114 
115  // GEM
116  Int_t GetGemHits() const {
117  return fGemHits;
118  }
119 
120  // TOF
121  Float_t GetTofStopTime() const {
122  return fTofStopTime;
123  }
124  Float_t GetTofM2() const {
125  return fTofM2;
126  }
127  Float_t GetTofTrackLength() const {
128  return fTofTrackLength;
129  }
130  Float_t GetTofQuality() const {
131  return fTofQuality;
132  }
133  Int_t GetTofIndex() const {
134  return fTofIndex;
135  }
136  Float_t GetTofBeta() const {
137  return (fTofStopTime>0.&&fTofTrackLength>0.) ? fTofTrackLength/(30. * fTofStopTime) : -1.;
138  }
139 
140  // Barrel DIRC
141  Float_t GetDrcThetaC() const {
142  return fDrcThetaC;
143  }
144  Float_t GetDrcThetaCErr() const {
145  return fDrcThetaCErr;
146  }
147  Float_t GetDrcQuality() const {
148  return fDrcQuality;
149  }
150  Int_t GetDrcNumberOfPhotons() const {
151  return fDrcNumberOfPhotons;
152  }
153  Int_t GetDrcIndex() const {
154  return fDrcIndex;
155  }
156 
157  // Disc DIRC
158  Float_t GetDiscThetaC() const {
159  return fDiscThetaC;
160  }
161  Float_t GetDiscThetaCErr() const {
162  return fDiscThetaCErr;
163  }
164  Float_t GetDiscQuality() const {
165  return fDiscQuality;
166  }
167  Int_t GetDiscNumberOfPhotons() const {
168  return fDiscNumberOfPhotons;
169  }
170  Int_t GetDiscIndex() const {
171  return fDiscIndex;
172  }
173 
174  // RICH
175  Float_t GetRichThetaC() const {
176  return fRichThetaC;
177  }
178  Float_t GetRichThetaCErr() const {
179  return fRichThetaCErr;
180  }
181  Float_t GetRichQuality() const {
182  return fRichQuality;
183  }
184  Int_t GetRichNumberOfPhotons() const {
185  return fRichNumberOfPhotons;
186  }
187  Int_t GetRichIndex() const {
188  return fRichIndex;
189  }
190 
191  // EMC
192  Float_t GetEmcRawEnergy() const {
193  return fEmcRawEnergy;
194  }
195  Float_t GetEmcCalEnergy() const {
196  return fEmcCalEnergy;
197  }
198  Float_t GetEmcQuality() const {
199  return fEmcQuality;
200  }
201  Int_t GetEmcNumberOfCrystals() const {
202  return fEmcNumberOfCrystals;
203  }
204  Int_t GetEmcNumberOfBumps() const {
205  return fEmcNumberOfBumps;
206  }
207  Int_t GetEmcModule() const {
208  return fEmcModule;
209  }
210  Int_t GetEmcIndex() const {
211  return fEmcIndex;
212  }
213  // EMC Cluster properties.
215  return fEmcZ20;
216  }
218  return fEmcZ53;
219  }
221  return fEmcLat;
222  }
224  return fEmcE1;
225  }
227  return fEmcE9;
228  }
230  return fEmcE25;
231  }
232 
233  // MUO
234  Int_t GetMuoNumberOfLayers()const {
235  return fMuoNumberOfLayers;
236  }
237  Float_t GetMuoProbability() const {
238  return fMuoProbability;
239  }
240  Float_t GetMuoQuality() const {
241  return fMuoQuality;
242  }
243  Float_t GetMuoIron() const {
244  return fMuoIron;
245  }
246  Float_t GetMuoMomentumIn()const {
247  return fMuoMomentumIn;
248  }
249  Int_t GetMuoModule() const {
250  return fMuoModule;
251  }
252  Int_t GetMuoHits() const {
253  return fMuoHits;
254  }
255  Int_t GetMuoIndex() const {
256  return fMuoIndex;
257  }
258 
259  // Tracking
260 
261  Int_t GetDegreesOfFreedom() const {
262  return fDegreesOfFreedom;
263  }
264  Int_t GetFitStatus() const {
265  return fFitStatus;
266  }
267  Float_t GetChiSquared() const {
268  return fChiSquared;
269  }
270  Int_t GetPidHypo() const {
271  return fPidHyp;
272  }
273 
274  // ************************
275  // MODIFIER METHODS
276  // ************************
277 
278  void Lock() {
279  fLocked=true;
280  }
281  void Unlock() {
282  fLocked=false;
283  }
284  bool IsLocked() {
285  return fLocked;
286  }
287 
288  // ************************
289  // basic properties:
290  // ************************
291 
292  void SetCharge(Int_t charge) {
293  fCharge=charge;
294  }
295  void SetPosition(TVector3 &pos) {
296  fXposition=pos.X();
297  fYposition=pos.Y();
298  fZposition=pos.Z();
299  }
300  void SetMomentum(TVector3 &mom) {
301  fXmomentum=mom.X();
302  fYmomentum=mom.Y();
303  fZmomentum=mom.Z();
304  }
305  void SetEnergy(Double_t en) {
306  fEnergy=(Float_t) en;
307  }
308  void SetLorentzVector(TLorentzVector &p4);
309 
310  void SetFirstHit(TVector3 &pos) {
311  fFirstHitX=pos.X();
312  fFirstHitY=pos.Y();
313  fFirstHitZ=pos.Z();
314  }
315  void SetLastHit(TVector3 &pos) {
316  fLastHitX =pos.X();
317  fLastHitY =pos.Y();
318  fLastHitZ=pos.Z();
319  }
320 
321  void SetCov7(const TMatrixD &cov7 );
322  void SetP4Cov(const TMatrixD &covP4 );
323  void SetMcIndex(int idx) {
324  fMcIndex=idx;
325  }
326  void SetTrackIndex(int idx) {
328  }
329  void SetTrackBranch(int idx) {
331  }
332 
334  if (par!=0) for (int i=0; i<5; i++) fParams[i] = (Float_t)par[i];
335  }
336  void SetHelixCov(Double_t* cov) {
337  if (cov!=0) for (int i=0; i<15; i++) fCov[i] = (Float_t)cov[i];
338  }
339 
340 
341  // ************************
342  // detector specific stuff
343  // ************************
344 
345  // MVD
347  fMvdDEDX = (Float_t) val;
348  }
349  void SetMvdHits(Int_t val) {
350  fMvdHits = val;
351  }
352  //void SetMvdHitIndexArray(Int_t n, Int_t* arr) { fMvdHits=n; fMvdHitIndexArray.Set(n,arr);}
353 
354  // STT
356  fSttMeanDEDX = (Float_t) val;
357  }
358  void SetSttHits(Int_t val) {
359  fSttHits = val;
360  }
361  //void SetSttHitIndexArray(Int_t n, Int_t* arr) { fSttHits=n; fSttHitIndexArray.Set(n,arr);}
362 
363  void SetGemHits(Int_t val) {
364  fGemHits = val;
365  }
366  // TOF
368  fTofStopTime = (Float_t) val;
369  }
371  fTofM2 = (Float_t) val;
372  }
375  }
377  fTofQuality = val;
378  }
379  void SetTofIndex(Int_t val) {
380  fTofIndex = val;
381  }
382 
383  // Barrel DIRC
385  fDrcThetaC= (Float_t) val;
386  }
388  fDrcThetaCErr=(Float_t) val;
389  }
391  fDrcQuality=(Float_t) val;
392  }
395  }
396  void SetDrcIndex(Int_t val) {
397  fDrcIndex = val;
398  }
399 
400  // Disc DIRC
402  fDiscThetaC=(Float_t) val;
403  }
405  fDiscThetaCErr=(Float_t) val;
406  }
408  fDiscQuality=(Float_t) val;
409  }
412  }
413  void SetDiscIndex(Int_t val) {
414  fDiscIndex = val;
415  }
416 
417  // RICH
419  fRichThetaC=(Float_t) val;
420  }
422  fRichThetaCErr=(Float_t) val;
423  }
425  fRichQuality=(Float_t) val;
426  }
429  }
430  void SetRichIndex(Int_t val) {
431  fRichIndex = val;
432  }
433 
434  // EMC
436  fEmcRawEnergy=(Float_t) val;
437  }
439  fEmcCalEnergy=(Float_t) val;
440  }
442  fEmcQuality=(Float_t) val;
443  }
446  }
447  void SetEmcNumberOfBumps(Int_t val) {
449  }
450  void SetEmcModule(Int_t val) {
451  fEmcModule = val;
452  }
453  void SetEmcIndex(Int_t val) {
454  fEmcIndex = val;
455  }
456 
458  fEmcZ20 = val;
459  }
461  fEmcZ53 = val;
462  }
464  fEmcLat = val;
465  }
467  fEmcE1 = val;
468  }
470  fEmcE9 = val;
471  }
473  fEmcE25 = val;
474  }
475 
477  fEmcTimeStamp = val;
478  }
479 
480  // MUO
481  void SetMuoNumberOfLayers(Int_t val) {
483  }
485  fMuoProbability=(Float_t) val;
486  }
488  fMuoQuality=(Float_t) val;
489  }
491  fMuoIron=(Float_t) val;
492  }
494  fMuoMomentumIn=(Float_t) val;
495  }
496  void SetMuoModule(Int_t val) {
497  fMuoModule = val;
498  }
499  void SetMuoHits(Int_t val) {
500  fMuoHits = val;
501  }
502  void SetMuoIndex(Int_t val) {
503  fMuoIndex = val;
504  }
505 
506  // Tracking
507  void SetDegreesOfFreedom(Int_t val) {
509  }
510  void SetFitStatus(Int_t val) {
511  fFitStatus= val;
512  }
514  fChiSquared=(Float_t) val;
515  }
516  void SetPidHypo(int hyp) {
517  fPidHyp=hyp;
518  }
519  void SetDefault();
520  void PrintOn(std::ostream &o) const;
521  protected:
522  // Candidate lock
524 
525  // the basic params
526  Char_t fCharge; // The electrical charge
527  Float_t fXposition, // The origin in x
528  fYposition, // The origin in y
529  fZposition; // The origin in z
530  Double_t fXmomentum, // The momentum in x
531  fYmomentum, // The momentum in y
532  fZmomentum, // The momentum in z
533  fEnergy; // The total energy
534 
535  Float_t fFirstHitX,
536  fFirstHitY,
537  fFirstHitZ;
538 
539  Float_t fLastHitX,
540  fLastHitY,
541  fLastHitZ;
542 
543  Int_t fMcIndex; // MC truth index
544  Int_t fTrackIndex; // PndTrack index
545  Int_t fTrackBranch;// index of PndTrack TClonesArray
546  Float_t fErrP7[28]; // The symmetric 7*7 error matrix
547  Float_t fParams[5]; // The helix fit parameters
548  Float_t fCov[15]; // The helix error matrix
549 
550  // detector quantities
551  // MVD
552  Float_t fMvdDEDX;
553  Int_t fMvdHits;
554  //TArrayI fMvdHitIndexArray;
555 
556  // STT
557  Float_t fSttMeanDEDX;
558  Int_t fSttHits;
559  //TArrayI fSttHitIndexArray;
560 
561  //GEM
562  Int_t fGemHits;
563 
564  // TOF
565  Float_t fTofStopTime;
566  Float_t fTofM2;
568  Float_t fTofQuality;
569  Int_t fTofIndex;
570 
571  // Barrel DIRC
572  Float_t fDrcThetaC;
573  Float_t fDrcThetaCErr;
574  Float_t fDrcQuality;
576  Int_t fDrcIndex;
577 
578  // Disc DIRC
579  Float_t fDiscThetaC;
580  Float_t fDiscThetaCErr;
581  Float_t fDiscQuality;
583  Int_t fDiscIndex;
584 
585  // RICH
586  Float_t fRichThetaC;
587  Float_t fRichThetaCErr;
588  Float_t fRichQuality;
590  Int_t fRichIndex;
591 
592  // EMC
593  Float_t fEmcRawEnergy;
594  Float_t fEmcCalEnergy;
595  Float_t fEmcQuality;
596  Float_t fEmcTimeStamp;
599  Int_t fEmcModule;
600  Int_t fEmcIndex;
607 
608  // MUO
611  Float_t fMuoQuality;
612  Float_t fMuoIron;
613  Float_t fMuoMomentumIn;
614  Int_t fMuoModule;
615  Int_t fMuoHits;
616  Int_t fMuoIndex;
617 
618  // Tracking
620  Int_t fFitStatus;
621  Float_t fChiSquared;
622  Int_t fPidHyp;
623 
624  ClassDef(PndPidCandidate,5) // Abstract base class for MicroDST candidates
625 };
626 
628 
629 #endif
630 
631 
632 
Double_t GetEmcClusterE25() const
TVector3 pos
void SetRichQuality(Double_t val)
Int_t GetTrackIndex() const
void SetMomentum(TVector3 &mom)
Float_t GetTofQuality() const
void SetTrackIndex(int idx)
Float_t GetRichThetaCErr() const
void SetEmcNumberOfCrystals(Int_t val)
Int_t GetRichIndex() const
void SetGemHits(Int_t val)
Float_t GetMuoQuality() const
void SetP4Cov(const TMatrixD &covP4)
TMatrixD & P4Cov() const
Int_t GetCharge() const
Float_t GetTofStopTime() const
Float_t GetMuoProbability() const
void SetTofStopTime(Double_t val)
Float_t GetEmcQuality() const
Int_t GetDegreesOfFreedom() const
void SetEmcNumberOfBumps(Int_t val)
Int_t i
Definition: run_full.C:25
Float_t GetEmcRawEnergy() const
void SetEmcModule(Int_t val)
Int_t GetDiscIndex() const
Float_t GetDrcThetaCErr() const
void SetMuoProbability(Double_t val)
Float_t GetSttMeanDEDX() const
Int_t GetTrackBranch() const
Double_t val[nBoxes][nFEBox]
Definition: createCalib.C:11
void SetEmcClusterE1(Double_t val)
Float_t GetEmcCalEnergy() const
Int_t GetEmcNumberOfCrystals() const
TLorentzVector GetLorentzVector() const
void SetPosition(TVector3 &pos)
void SetEmcCalEnergy(Double_t val)
void SetCov7(const TMatrixD &cov7)
Double_t par[3]
Float_t GetMuoIron() const
Float_t fErrP7[28]
void SetMcIndex(int idx)
void SetDiscQuality(Double_t val)
void SetEmcQuality(Double_t val)
Int_t GetDiscNumberOfPhotons() const
Double_t GetEnergy() const
void SetHelixCov(Double_t *cov)
Double_t GetEmcClusterE9() const
void SetTofM2(Double_t val)
Float_t GetMuoMomentumIn() const
void SetMvdHits(Int_t val)
Double_t mom
Definition: plot_dirc.C:14
void SetDiscThetaC(Double_t val)
void SetMuoNumberOfLayers(Int_t val)
Float_t GetRichThetaC() const
void SetFirstHit(TVector3 &pos)
Int_t GetRichNumberOfPhotons() const
Int_t GetMuoIndex() const
const Float_t * GetErrorP7() const
Float_t GetDrcThetaC() const
Float_t fParams[5]
void SetTofTrackLength(Double_t val)
TVector3 GetFirstHit() const
Int_t GetMcIndex() const
Float_t GetDiscQuality() const
void SetTrackBranch(int idx)
Int_t GetEmcIndex() const
void PrintOn(std::ostream &o) const
void SetRichIndex(Int_t val)
void SetEnergy(Double_t en)
Float_t GetDiscThetaC() const
Int_t GetMuoNumberOfLayers() const
void SetDrcThetaCErr(Double_t val)
Float_t GetTofTrackLength() const
Int_t GetDrcNumberOfPhotons() const
Double_t GetEmcClusterE1() const
int idx[MAX]
Definition: autocutx.C:38
Float_t GetChiSquared() const
void SetMuoQuality(Double_t val)
void SetHelixParams(Double_t *par)
Int_t GetTofIndex() const
Double_t
std::ostream & operator<<(std::ostream &o, const PndPidCandidate &)
void SetMuoIron(Double_t val)
Double_t GetEmcClusterZ53() const
void SetEmcClusterE9(Double_t val)
void SetEmcIndex(Int_t val)
Float_t fEmcTimeStamp
TimeStamp at the cluster or bump position no track length correction done at this stage...
void SetDrcNumberOfPhotons(Int_t val)
void SetRichNumberOfPhotons(Int_t val)
Double_t GetEmcClusterLat() const
void SetLorentzVector(TLorentzVector &p4)
void SetChiSquared(Double_t val)
TVector3 GetLastHit() const
Float_t GetMvdDEDX() const
const Float_t * GetCov() const
Int_t GetEmcNumberOfBumps() const
Double_t GetEmcClusterZ20() const
void SetDiscIndex(Int_t val)
Int_t GetMuoHits() const
Int_t GetSttHits() const
Float_t GetDiscThetaCErr() const
TMatrixD & Cov7() const
Int_t GetMvdHits() const
void SetEmcClusterE25(Double_t val)
void SetDrcQuality(Double_t val)
void SetMuoMomentumIn(Double_t val)
void SetCharge(Int_t charge)
void SetDrcIndex(Int_t val)
Float_t GetRichQuality() const
void SetSttMeanDEDX(Double_t val)
void SetFitStatus(Int_t val)
void SetEmcClusterLat(Double_t val)
TVector3 GetPosition() const
void SetTofQuality(Double_t val)
void SetRichThetaC(Double_t val)
void SetDrcThetaC(Double_t val)
void SetDiscNumberOfPhotons(Int_t val)
void SetMuoModule(Int_t val)
void SetEmcTimeStamp(Double_t val)
void SetLastHit(TVector3 &pos)
Int_t GetGemHits() const
Int_t GetMuoModule() const
Int_t GetDrcIndex() const
void SetTofIndex(Int_t val)
void SetEmcClusterZ20(Double_t val)
Float_t fCov[15]
void SetPidHypo(int hyp)
TVector3 GetMomentum() const
Float_t GetDrcQuality() const
void SetEmcClusterZ53(Double_t val)
void SetDegreesOfFreedom(Int_t val)
Int_t GetEmcModule() const
const Float_t * GetParams() const
void SetDiscThetaCErr(Double_t val)
void SetMuoIndex(Int_t val)
void SetEmcRawEnergy(Double_t val)
Float_t GetTofM2() const
TMatrixT< double > TMatrixD
Definition: PndLmdDim.h:52
Int_t GetFitStatus() const
void SetMvdDEDX(Double_t val)
void SetSttHits(Int_t val)
void SetRichThetaCErr(Double_t val)
Int_t GetPidHypo() const
Float_t GetTofBeta() const
void SetMuoHits(Int_t val)