]>
Commit | Line | Data |
---|---|---|
c630aafd | 1 | #ifndef ALITOFPIDESD_H |
2 | #define ALITOFPIDESD_H | |
3 | /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. * | |
4 | * See cxx source for full Copyright notice */ | |
5 | ||
6 | //------------------------------------------------------- | |
7 | // TOF PID class | |
8 | // A very naive design... Should be made better by the detector experts... | |
9 | // Origin: Iouri Belikov, CERN, Jouri.Belikov@cern.ch | |
10 | //------------------------------------------------------- | |
11 | ||
12 | #include <TObject.h> | |
596a855f | 13 | #include <TMath.h> |
c630aafd | 14 | |
8c29135e | 15 | class AliTOFGeometry; |
c630aafd | 16 | class AliESD; |
17 | class TFile; | |
18 | class TTree; | |
19 | ||
c630aafd | 20 | class AliTOFpidESD : public TObject { |
3f83f224 | 21 | enum {kMaxCluster=77777}; //maximal number of the TOF clusters |
c630aafd | 22 | public: |
23 | AliTOFpidESD(){fR=376.; fDy=2.5; fDz=3.5; fN=0; fEventN=0;} | |
8c29135e | 24 | AliTOFpidESD(Double_t *param); |
c630aafd | 25 | ~AliTOFpidESD(){UnloadClusters();} |
26 | ||
27 | Int_t MakePID(AliESD *event); | |
8c29135e | 28 | Int_t LoadClusters(TTree *f, AliTOFGeometry *geom); |
c630aafd | 29 | void UnloadClusters(); |
30 | void SetEventNumber(Int_t n) {fEventN=n;} | |
31 | ||
32 | Int_t GetEventNumber() const {return fEventN;} | |
33 | ||
34 | public: | |
35 | class AliTOFcluster { | |
36 | public: | |
3f83f224 | 37 | AliTOFcluster(Double_t *h, Int_t *l,Int_t idx) { |
c630aafd | 38 | fR=h[0]; fPhi=h[1]; fZ=h[2]; fTDC=h[3]; fADC=h[4]; |
39 | fLab[0]=l[0]; fLab[1]=l[1]; fLab[2]=l[2]; | |
3f83f224 | 40 | fIdx=idx; |
c630aafd | 41 | } |
42 | void Use() {fADC=-fADC;} | |
43 | ||
44 | Double_t GetR() const {return fR;} | |
45 | Double_t GetPhi() const {return fPhi;} | |
46 | Double_t GetZ() const {return fZ;} | |
47 | Double_t GetTDC() const {return fTDC;} | |
48 | Double_t GetADC() const {return TMath::Abs(fADC);} | |
49 | Int_t IsUsed() const {return (fADC<0) ? 1 : 0;} | |
50 | Int_t GetLabel(Int_t n) const {return fLab[n];} | |
3f83f224 | 51 | Int_t GetIndex() const {return fIdx;} |
c630aafd | 52 | private: |
3f83f224 | 53 | Int_t fLab[3]; //track labels |
54 | Double_t fR; //r-coordinate | |
55 | Double_t fPhi; //phi-coordinate | |
56 | Double_t fZ; //z-coordinate | |
57 | Double_t fTDC; //TDC count | |
58 | Double_t fADC; //ADC count | |
59 | Int_t fIdx; //index of this cluster | |
c630aafd | 60 | }; |
61 | ||
62 | private: | |
3f83f224 | 63 | Int_t InsertCluster(AliTOFcluster *c); |
c630aafd | 64 | Int_t FindClusterIndex(Double_t z) const; |
65 | ||
66 | Int_t fEventN; //event number | |
67 | ||
68 | Double_t fR; // mean readius of the TOF barrel | |
69 | Double_t fDy; // size of the TOF cell in R*Phi | |
70 | Double_t fDz; // size of the TOF cell in Z | |
71 | ||
72 | Double_t fSigma; // intrinsic TOF resolution | |
73 | Double_t fRange; // one particle type PID range (in sigmas) | |
74 | ||
75 | Int_t fN; // number of the TOF clusters | |
76 | AliTOFcluster *fClusters[kMaxCluster]; // pointers to the TOF clusters | |
77 | ||
78 | ClassDef(AliTOFpidESD,1) // TOF PID class | |
79 | }; | |
80 | ||
81 | #endif | |
82 | ||
83 |