StRoot  1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
StPidStatus.h
1 #ifndef __StPidStatus_h__
2 #define __StPidStatus_h__
3 #include "StProbPidTraits.h"
4 #include "StBTofPidTraits.h"
5 #include "StETofPidTraits.h"
6 #include "StMtdPidTraits.h"
7 #include "StDedxPidTraits.h"
8 #include "StMuDSTMaker/COMMON/StMuTrack.h"
9 #include "StMuDSTMaker/COMMON/StMuBTofPidTraits.h"
10 #include "StMuDSTMaker/COMMON/StMuETofPidTraits.h"
11 #include "StMuDSTMaker/COMMON/StMuMtdPidTraits.h"
12 #ifdef __TFG__VERSION__
13 #include "StPicoEvent/StPicoTrack.h"
14 #include "StPicoEvent/StPicoBTofPidTraits.h"
15 #include "StPicoEvent/StPicoETofPidTraits.h"
16 #include "StPicoEvent/StPicoMtdPidTraits.h"
17 #endif /* __TFG__VERSION__ */
18 class StGlobalTrack;
19 class StdEdxStatus {
20  public:
21  StdEdxStatus(StDedxPidTraits *pid = 0) : fPiD(pid) {Clear();}
22  virtual ~StdEdxStatus() {}
23  StDedxPidTraits *fPiD;
24  Double_t I() const {return (fPiD) ? fPiD->mean() : 0;}
25  Double_t D() const {return (fPiD) ? fPiD->errorOnMean() : 0;}
26  Double_t TrackLength() const {return (fPiD) ? fPiD->length() : 0;}
27  Double_t log2dX() const {return (fPiD) ? fPiD->log2dX() : 0;}
28  Int_t N() const {return (fPiD) ? fPiD->numberOfPoints() : 0;}
29  void Clear() {memset(mBeg,0,mEnd-mBeg+1);}
30  void Print(Option_t *option = "") const;
31  Char_t mBeg[1];
32  Double_t Pred[KPidParticles];
33  Double_t dev[KPidParticles];
34  Double_t devS[KPidParticles];
35  Char_t mEnd[1];
36 };
37 class StBTofStatus {
38  public:
39  StBTofStatus(StBTofPidTraits *pid ) { fPiD = (TMath::Abs(pid->yLocal()) < 1.8) ? pid : 0;}
40  virtual ~StBTofStatus() {}
41  StBTofPidTraits *fPiD;
42  StBTofPidTraits *PiD() {return fPiD;}
43  Float_t beta() {return fPiD ? fPiD->beta() : -999;}
44  Double_t Sigma(Int_t l) {
45  if (fPiD) {
46  switch (l) {
47  case kPidElectron:
48  return fPiD->sigmaElectron();
49  case kPidProton:
50  return fPiD->sigmaProton();
51  case kPidKaon:
52  return fPiD->sigmaKaon();
53  case kPidPion:
54  return fPiD->sigmaPion();
55  default:
56  return 999.;
57  }
58  }
59  return 999.;
60  }
61 };
62 class StETofStatus {
63  public:
64  StETofStatus(StETofPidTraits *pid = 0) { fPiD = (pid && pid->matchFlag()) ? pid : 0;}
65  virtual ~StETofStatus() {}
66  StETofPidTraits *PiD() {return fPiD;}
67  StETofPidTraits *fPiD;
68  Float_t beta() {return fPiD ? fPiD->beta() : -999;}
69 };
70 class StMtdStatus {
71  public:
72  StMtdStatus(StMtdPidTraits *pid = 0) { fPiD = (pid && pid->matchFlag()) ? pid : 0;}
73  virtual ~StMtdStatus() {}
74  StMtdPidTraits *PiD() {return fPiD;}
75  StMtdPidTraits *fPiD;
76  Float_t beta() {return fPiD ? fPiD->beta() : -999;}
77 };
78 
79 class StPidStatus {
80  public:
81  enum PiDStatusIDs {
82  kI70, kFit, kI70U, kFitU, kdNdx, kdNdxU, kBTof, kETof, kMtd, kTotal
83  };
84  StPidStatus(StGlobalTrack *gTrack = 0, Bool_t Usedx2 = kTRUE);
85  StPidStatus(StMuTrack *muTrack = 0, Bool_t Usedx2 = kTRUE);
86 #ifdef __TFG__VERSION__
87  StPidStatus(StPicoTrack *picoTrack = 0, Bool_t Usedx2 = kFALSE);
88 #endif /* __TFG__VERSION__ */
89  virtual ~StPidStatus() {
90  SafeDelete(fProb);
91  SafeDelete(fI70);
92  SafeDelete(fFit);
93  SafeDelete(fI70U);
94  SafeDelete(fFitU);
95  SafeDelete(fdNdx);
96  SafeDelete(fdNdxU);
97  SafeDelete(fBTof);
98  SafeDelete(fETof);
99  SafeDelete(fMtd);
100  }
101  void Clear() {memset(mBeg,0,mEnd-mBeg+1);}
102  Int_t Status() {return PiDStatus;}
103  StdEdxStatus *dEdxStatus(StDedxMethod k) {return fStatus[k];}
104  StBTofPidTraits SetBTofPidTraits(const StMuBTofPidTraits &pid);
105  StETofPidTraits SetETofPidTraits(const StMuETofPidTraits &pid);
106  StMtdPidTraits SetMtdPidTraits(const StMuMtdPidTraits &pid);
107 #ifdef __TFG__VERSION__
108  StBTofPidTraits SetBTofPidTraits(const StPicoBTofPidTraits &pid);
109  StETofPidTraits SetETofPidTraits(const StPicoETofPidTraits &pid);
110  StMtdPidTraits SetMtdPidTraits(const StPicoMtdPidTraits &pid);
111 #endif /* __TFG__VERSION__ */
112  void Set();
113 
114  Int_t PiDStatus;
115  void Print(Option_t *option="") const;
116  // StGlobalTrack *gTrack; //!
117  StThreeVectorD g3;
118  Bool_t fUsedx2;
119  Char_t mBeg[1];
120  StProbPidTraits *fProb;
121  StdEdxStatus *fStatus[kOtherMethodId2+1];
122  StdEdxStatus *fI70;
123  StdEdxStatus *fFit;
124  StdEdxStatus *fI70U;
125  StdEdxStatus *fFitU;
126  StdEdxStatus *fdNdx;
127  StdEdxStatus *fdNdxU;
128  StBTofStatus *fBTof;
129  StETofStatus *fETof;
130  StMtdStatus *fMtd;
131  Double_t devTof[KPidParticles];
132  Int_t PiDkey;
133  Int_t PiDkeyU;
134  Int_t PiDkeyU3;
135  Int_t lBest;
136  Double_t dNdx[KPidParticles]; // no. of primary clusters per 1cm
137  Double_t PredBMN[2], Pred70BMN[2];
138  Double_t bghyp[KPidParticles];
139  Double_t bgs[KPidParticles];
140  Char_t mEnd[1];
141 };
142 
143 #endif
Holds information about MTD-matched track.
Int_t PiDkeyU
best
Definition: StPidStatus.h:133
Hold information about eTOF-matched tracks.
float sigmaElectron() const
PID functions.
Holds information about track parameters.
Definition: StPicoTrack.h:35
Int_t PiDkeyU3
only one with devZs&lt;3,
Definition: StPidStatus.h:134
Int_t lBest
-"- and devZs &gt; 5 for all others
Definition: StPidStatus.h:135
Char_t mEnd[1]
bg
Definition: StPidStatus.h:140
Double_t bgs[KPidParticles]
log10(bg)
Definition: StPidStatus.h:139