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