]>
Commit | Line | Data |
---|---|---|
5d8eaff6 | 1 | #ifndef AliAODPID_H |
2 | #define AliAODPID_H | |
1c28d174 | 3 | /* Copyright(c) 1998-2007, ALICE Experiment at CERN, All rights reserved. * |
4 | * See cxx source for full Copyright notice */ | |
5 | ||
6 | /* $Id$ */ | |
7 | ||
8 | //------------------------------------------------------------------------- | |
9 | // AOD Pid object for additional pid information | |
d7bdc804 | 10 | // Author: Annalisa Mastroserio, CERN |
1c28d174 | 11 | //------------------------------------------------------------------------- |
12 | ||
13 | #include <TObject.h> | |
fc9b31a7 | 14 | #include "AliPID.h" |
1c28d174 | 15 | |
af48efa8 | 16 | class AliTPCdEdxInfo; |
17 | ||
1c28d174 | 18 | class AliAODPid : public TObject { |
19 | ||
20 | public: | |
1c28d174 | 21 | AliAODPid(); |
22 | virtual ~AliAODPid(); | |
23 | AliAODPid(const AliAODPid& pid); | |
24 | AliAODPid& operator=(const AliAODPid& pid); | |
d7bdc804 | 25 | |
00a38d07 | 26 | enum{kTRDnPlanes=6}; |
d7bdc804 | 27 | |
373fc041 | 28 | //setters |
29 | void SetITSsignal(Double_t its) {fITSsignal=its;} | |
6d354ed1 | 30 | void SetITSdEdxSamples(const Double_t s[4]); |
373fc041 | 31 | void SetTPCsignal(Double_t tpc) {fTPCsignal=tpc;} |
c997f0f9 | 32 | void SetTPCsignalN(UShort_t tpcN) {fTPCsignalN=(UChar_t)((tpcN<160)?tpcN:160);} |
febefa51 | 33 | void SetTPCmomentum(Double_t tpcMom) {fTPCmomentum=tpcMom;} |
ef7661fd | 34 | void SetTPCTgl(Double_t tpcTgl) {fTPCTgl=tpcTgl;} |
c997f0f9 | 35 | void SetTPCdEdxInfo(AliTPCdEdxInfo * dEdxInfo); |
6736efd5 | 36 | void SetTRDslices(Int_t nslices, const Double_t * const trdslices); |
37 | void SetTRDsignal(Double_t sig) {fTRDsignal = sig;} | |
febefa51 | 38 | void SetTRDmomentum(Int_t nplane, Float_t trdMom) {fTRDmomentum[nplane]=trdMom;} |
6c52f2f2 | 39 | void SetTRDncls(UChar_t ncls, Int_t layer = -1); |
59a8e853 | 40 | void SetTRDntrackletsPID(UChar_t ntls) {fTRDntls = ntls;} |
820214a7 | 41 | void SetTRDChi2(Double_t chi2) {fTRDChi2 = chi2;} |
373fc041 | 42 | void SetTOFsignal(Double_t tof) {fTOFesdsignal=tof;} |
b13bcc35 | 43 | void SetTOFpidResolution(Double_t tofPIDres[5]); |
373fc041 | 44 | void SetIntegratedTimes(Double_t timeint[5]); |
d7bdc804 | 45 | |
febefa51 | 46 | Double_t GetITSsignal() const {return fITSsignal;} |
6d354ed1 | 47 | void GetITSdEdxSamples(Double_t *s) const; |
48 | Double_t GetITSdEdxSample(Int_t i) const { | |
49 | if(i>=0 && i<4) return fITSdEdxSamples[i]; | |
50 | else return 0.; | |
51 | } | |
febefa51 | 52 | Double_t GetTPCsignal() const {return fTPCsignal;} |
c997f0f9 | 53 | UShort_t GetTPCsignalN() const {return (UShort_t)fTPCsignalN;} |
af48efa8 | 54 | AliTPCdEdxInfo * GetTPCdEdxInfo()const{return fTPCdEdxInfo;} |
55 | ||
febefa51 | 56 | Double_t GetTPCmomentum() const {return fTPCmomentum;} |
ef7661fd | 57 | Double_t GetTPCTgl() const {return fTPCTgl;} |
de8b2440 | 58 | Int_t GetTRDnSlices() const {return fTRDnSlices/6;} |
6736efd5 | 59 | Double_t GetTRDsignal() const {return fTRDsignal;} |
60 | Double_t* GetTRDslices() const {return fTRDslices;} | |
820214a7 | 61 | Double_t GetTRDChi2() const {return fTRDChi2;} |
c997f0f9 | 62 | const Double_t* GetTRDmomentum() const {return fTRDmomentum;} |
59a8e853 | 63 | UChar_t GetTRDncls(UChar_t layer) const { if(layer > 5) return 0; return fTRDncls[layer];} |
6c52f2f2 | 64 | UChar_t GetTRDncls() const; |
59a8e853 | 65 | UChar_t GetTRDntrackletsPID() const {return fTRDntls;} |
febefa51 | 66 | Double_t GetTOFsignal() const {return fTOFesdsignal;} |
febefa51 | 67 | |
fc9b31a7 | 68 | void GetIntegratedTimes(Double_t *timeint, Int_t nspec=AliPID::kSPECIES) const; |
b13bcc35 | 69 | void GetTOFpidResolution (Double_t tofRes[5]) const; |
1c28d174 | 70 | |
71 | private : | |
febefa51 | 72 | Double32_t fITSsignal; //[0.,0.,10] detector raw signal |
6d354ed1 | 73 | Double32_t fITSdEdxSamples[4];//[0.,0.,10] ITS dE/dx samples |
c997f0f9 | 74 | |
febefa51 | 75 | Double32_t fTPCsignal; //[0.,0.,10] detector raw signal |
c997f0f9 | 76 | UChar_t fTPCsignalN; // number of points used for TPC dE/dx |
77 | Double32_t fTPCmomentum; //[0.,0.,20] momentum at the inner wall of TPC; | |
ef7661fd | 78 | Double32_t fTPCTgl; //[0.,0.,10] track momentum dip angle at the inner wall of TPC; |
79 | ||
de8b2440 | 80 | Int_t fTRDnSlices; // N slices used for PID in the TRD (as number of slices per tracklet * number of layers) |
59a8e853 | 81 | UChar_t fTRDntls; // number of tracklets used for PID calculation |
82 | UChar_t fTRDncls[6]; // number of clusters used for dE/dx calculation | |
c997f0f9 | 83 | Double32_t* fTRDslices; //[fTRDnSlices][0.,0.,10] |
6736efd5 | 84 | Double32_t fTRDsignal; //[0.,0.,10] TRD signal |
c997f0f9 | 85 | Double32_t fTRDmomentum[6]; //[0.,0.,10] momentum at the TRD layers |
7b7338b4 | 86 | Double32_t fTRDChi2; //[0.,0.,10] TRD chi2 |
c997f0f9 | 87 | |
88 | Double32_t fTOFesdsignal; //[0.,0.,20] TOF signal - t0 (T0 interaction time) | |
89 | Double32_t fTOFpidResolution[5]; //[0.,0.,20] TOF pid resolution for each mass hypotesys | |
90 | Double32_t fIntTime[5]; //[0.,0.,20] track time hypothesis | |
996918c5 | 91 | |
771ec43e | 92 | AliTPCdEdxInfo * fTPCdEdxInfo; // object containing dE/dx information for different pad regions |
febefa51 | 93 | |
ef7661fd | 94 | ClassDef(AliAODPid, 15); |
1c28d174 | 95 | }; |
96 | ||
59a8e853 | 97 | //_____________________________________________________________ |
6736efd5 | 98 | inline void AliAODPid::SetTRDslices(Int_t nslices, const Double_t * const trdslices) { |
59a8e853 | 99 | // |
100 | // Set TRD dE/dx slices and the number of dE/dx slices per track | |
101 | // | |
102 | if(fTRDslices && fTRDnSlices != nslices) { | |
103 | delete [] fTRDslices; fTRDslices = NULL; | |
104 | }; | |
105 | if(!fTRDslices) fTRDslices = new Double32_t[nslices]; | |
106 | fTRDnSlices = nslices; | |
107 | for(Int_t is = 0; is < fTRDnSlices; is++) fTRDslices[is] = trdslices[is]; | |
108 | } | |
109 | ||
110 | //_____________________________________________________________ | |
6c52f2f2 | 111 | inline void AliAODPid::SetTRDncls(UChar_t ncls, Int_t layer) { |
59a8e853 | 112 | // |
113 | // Set the number of clusters / tracklet | |
114 | // If no layer is specified the full number of clusters will be put in layer 0 | |
115 | // | |
116 | if(layer > 5) return; | |
117 | if(layer < 0) fTRDncls[0] = ncls; | |
118 | else fTRDncls[layer] = ncls; | |
119 | } | |
120 | ||
121 | //_____________________________________________________________ | |
6c52f2f2 | 122 | inline UChar_t AliAODPid::GetTRDncls() const { |
59a8e853 | 123 | // |
124 | // Get number of clusters per track | |
125 | // Calculated as sum of the number of clusters per tracklet | |
126 | // | |
127 | UChar_t ncls = 0; | |
128 | for(Int_t ily = 0; ily < 6; ily++) ncls += fTRDncls[ily]; | |
129 | return ncls; | |
130 | } | |
1c28d174 | 131 | #endif |