]>
Commit | Line | Data |
---|---|---|
1c28d174 | 1 | #ifndef AliAODPid_H |
2 | #define AliAODPid_H | |
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> | |
14 | ||
15 | class AliAODPid : public TObject { | |
16 | ||
17 | public: | |
1c28d174 | 18 | AliAODPid(); |
19 | virtual ~AliAODPid(); | |
20 | AliAODPid(const AliAODPid& pid); | |
21 | AliAODPid& operator=(const AliAODPid& pid); | |
d7bdc804 | 22 | |
23 | enum{kSPECIES=5, kTRDnPlanes=6}; | |
24 | ||
373fc041 | 25 | //setters |
26 | void SetITSsignal(Double_t its) {fITSsignal=its;} | |
6d354ed1 | 27 | void SetITSdEdxSamples(const Double_t s[4]); |
373fc041 | 28 | void SetTPCsignal(Double_t tpc) {fTPCsignal=tpc;} |
597b16d8 | 29 | void SetTPCsignalN(UShort_t tpcN) {fTPCsignalN=tpcN;} |
febefa51 | 30 | void SetTPCmomentum(Double_t tpcMom) {fTPCmomentum=tpcMom;} |
59a8e853 | 31 | inline void SetTRDsignal(Int_t nslices, const Double_t * const trdslices); |
febefa51 | 32 | void SetTRDmomentum(Int_t nplane, Float_t trdMom) {fTRDmomentum[nplane]=trdMom;} |
59a8e853 | 33 | inline void SetTRDncls(UChar_t ncls, Int_t layer = -1); |
34 | void SetTRDntrackletsPID(UChar_t ntls) {fTRDntls = ntls;} | |
373fc041 | 35 | void SetTOFsignal(Double_t tof) {fTOFesdsignal=tof;} |
b13bcc35 | 36 | void SetTOFpidResolution(Double_t tofPIDres[5]); |
373fc041 | 37 | void SetIntegratedTimes(Double_t timeint[5]); |
38 | void SetHMPIDsignal(Double_t hmpid) {fHMPIDsignal=hmpid;} | |
028c7a2c | 39 | void SetHMPIDprobs(Double_t hmpPid[5]); |
a401ba0b | 40 | void SetEMCALPosition(Double_t emcalpos[3]); |
41 | void SetEMCALMomentum(Double_t emcalmom[3]); | |
d7bdc804 | 42 | |
febefa51 | 43 | Double_t GetITSsignal() const {return fITSsignal;} |
6d354ed1 | 44 | void GetITSdEdxSamples(Double_t *s) const; |
45 | Double_t GetITSdEdxSample(Int_t i) const { | |
46 | if(i>=0 && i<4) return fITSdEdxSamples[i]; | |
47 | else return 0.; | |
48 | } | |
febefa51 | 49 | Double_t GetTPCsignal() const {return fTPCsignal;} |
597b16d8 | 50 | UShort_t GetTPCsignalN() const {return fTPCsignalN;} |
febefa51 | 51 | Double_t GetTPCmomentum() const {return fTPCmomentum;} |
52 | Int_t GetTRDnSlices() const {return fTRDnSlices;} | |
53 | Double_t* GetTRDsignal() const {return fTRDslices;} | |
59a8e853 | 54 | const Float_t* GetTRDmomentum() const {return fTRDmomentum;} |
55 | UChar_t GetTRDncls(UChar_t layer) const { if(layer > 5) return 0; return fTRDncls[layer];} | |
56 | inline UChar_t GetTRDncls() const; | |
57 | UChar_t GetTRDntrackletsPID() const {return fTRDntls;} | |
febefa51 | 58 | Double_t GetTOFsignal() const {return fTOFesdsignal;} |
59 | Double_t GetHMPIDsignal() const {return fHMPIDsignal;} | |
ea235c90 | 60 | void GetHMPIDprobs(Double_t *p) const; |
febefa51 | 61 | |
62 | void GetIntegratedTimes(Double_t timeint[5]) const; | |
63 | void GetEMCALPosition (Double_t emcalpos[3]) const; | |
64 | void GetEMCALMomentum (Double_t emcalmom[3]) const; | |
b13bcc35 | 65 | void GetTOFpidResolution (Double_t tofRes[5]) const; |
1c28d174 | 66 | |
67 | private : | |
febefa51 | 68 | Double32_t fITSsignal; //[0.,0.,10] detector raw signal |
6d354ed1 | 69 | Double32_t fITSdEdxSamples[4];//[0.,0.,10] ITS dE/dx samples |
febefa51 | 70 | Double32_t fTPCsignal; //[0.,0.,10] detector raw signal |
597b16d8 | 71 | UShort_t fTPCsignalN; // number of points used for TPC dE/dx |
febefa51 | 72 | Double_t fTPCmomentum; // momentum at the inner wall of TPC; |
73 | Int_t fTRDnSlices; // N slices used for PID in the TRD | |
59a8e853 | 74 | UChar_t fTRDntls; // number of tracklets used for PID calculation |
75 | UChar_t fTRDncls[6]; // number of clusters used for dE/dx calculation | |
febefa51 | 76 | Double32_t* fTRDslices; //[fTRDnSlices] |
77 | Float_t fTRDmomentum[6]; // momentum at the TRD layers | |
78 | Double32_t fTOFesdsignal; // TOF signal - t0 (T0 interaction time) | |
b13bcc35 | 79 | Double32_t fTOFpidResolution[5]; // TOF pid resolution for each mass hypotesys |
febefa51 | 80 | Double32_t fIntTime[5]; // track time hypothesis |
81 | Double32_t fHMPIDsignal; // detector raw signal | |
028c7a2c | 82 | Double32_t fHMPIDprobs[5]; // detector pid probabilities |
febefa51 | 83 | Double32_t fEMCALPosition[3]; // global position of track |
84 | // extrapolated to EMCAL surface | |
85 | Double32_t fEMCALMomentum[3]; // momentum of track | |
86 | // extrapolated to EMCAL surface | |
87 | ||
59a8e853 | 88 | ClassDef(AliAODPid, 8); |
1c28d174 | 89 | }; |
90 | ||
59a8e853 | 91 | //_____________________________________________________________ |
92 | void AliAODPid::SetTRDsignal(Int_t nslices, const Double_t * const trdslices) { | |
93 | // | |
94 | // Set TRD dE/dx slices and the number of dE/dx slices per track | |
95 | // | |
96 | if(fTRDslices && fTRDnSlices != nslices) { | |
97 | delete [] fTRDslices; fTRDslices = NULL; | |
98 | }; | |
99 | if(!fTRDslices) fTRDslices = new Double32_t[nslices]; | |
100 | fTRDnSlices = nslices; | |
101 | for(Int_t is = 0; is < fTRDnSlices; is++) fTRDslices[is] = trdslices[is]; | |
102 | } | |
103 | ||
104 | //_____________________________________________________________ | |
105 | void AliAODPid::SetTRDncls(UChar_t ncls, Int_t layer) { | |
106 | // | |
107 | // Set the number of clusters / tracklet | |
108 | // If no layer is specified the full number of clusters will be put in layer 0 | |
109 | // | |
110 | if(layer > 5) return; | |
111 | if(layer < 0) fTRDncls[0] = ncls; | |
112 | else fTRDncls[layer] = ncls; | |
113 | } | |
114 | ||
115 | //_____________________________________________________________ | |
116 | UChar_t AliAODPid::GetTRDncls() const{ | |
117 | // | |
118 | // Get number of clusters per track | |
119 | // Calculated as sum of the number of clusters per tracklet | |
120 | // | |
121 | UChar_t ncls = 0; | |
122 | for(Int_t ily = 0; ily < 6; ily++) ncls += fTRDncls[ily]; | |
123 | return ncls; | |
124 | } | |
1c28d174 | 125 | #endif |