]> git.uio.no Git - u/mrichter/AliRoot.git/blob - STEER/AOD/AliAODHMPIDrings.h
Proper treatment of roundoff error for 0-length step
[u/mrichter/AliRoot.git] / STEER / AOD / AliAODHMPIDrings.h
1 #ifndef ALIAODHMPIDRINGS_H
2 #define ALIAODHMPIDRINGS_H
3
4
5 //
6 // Class to handle the AOD tracks with good HMPID rings 
7 // Author: Levente Molnar
8 // levente.molnar@cern.ch , March 2012
9 // 
10
11
12
13 //___ROOT includes
14 #include <TMath.h>
15 //___AliRoot includes
16 #include "AliPID.h"
17
18
19 class AliAODHMPIDrings : public TObject {
20   
21  public:
22   
23   AliAODHMPIDrings();
24   AliAODHMPIDrings(
25                     Int_t trkId,
26                     Int_t qn, 
27                     Int_t cluIdx,
28                     Double_t  trkTheta,
29                     Double_t trkPhi,
30                     Double_t signal,
31                     Double_t occ,
32                     Double_t chi2,
33                     Double_t trkX,
34                     Double_t trkY,
35                     Double_t mipX,
36                     Double_t mipY,
37                     Double_t *pid,
38                     Double_t *p                  );      //              
39       
40       
41   AliAODHMPIDrings(const AliAODHMPIDrings& hmpidAOD);//
42   AliAODHMPIDrings &operator=(const AliAODHMPIDrings& hmpidAOD);//
43   virtual ~AliAODHMPIDrings() {};
44     
45   //___ Getters
46   Int_t GetHmpTrkID()                const { return fHmpidAODtrkId; }
47   
48   Double32_t GetHmpMipCharge()            const { return fHmpidAODqn%1000000; }
49   Double32_t GetHmpNumOfPhotonClusters()  const { return fHmpidAODqn/1000000;}
50  
51   Int_t      GetHmpChamber()              const { return fHmpidAODcluIdx/1000000; }
52   
53   Int_t      GetHmpCluIdx()               const { return fHmpidAODcluIdx; }
54   
55   Double_t GetHmpTrackTheta()           const { return fHmpidAODtrkTheta;}
56   Double_t GetHmpTrackPhi()             const { return fHmpidAODtrkPhi;}
57   
58   Double_t GetHmpSignal()               const { return fHmpidAODsignal;}
59   Double_t GetHmpOccupancy()            const { return fHmpidAODocc;}
60   
61   Double_t GetHmpChi2()                 const { return fHmpidAODchi2;}
62
63   Double_t GetHmpTrackX()               const { return fHmpidAODtrkX;}
64   Double_t GetHmpTrackY()               const { return fHmpidAODtrkY;}
65
66   Double_t GetHmpMipX()                 const { return fHmpidAODmipX;}
67   Double_t GetHmpMipY()                 const { return fHmpidAODmipY;}
68
69   Double_t GetHmpDX()                   const { return fHmpidAODmipX - fHmpidAODtrkX;}
70   Double_t GetHmpDY()                   const { return fHmpidAODmipY - fHmpidAODtrkY;}
71   Double_t GetHmpDist()                 const { return TMath::Sqrt((fHmpidAODmipX - fHmpidAODtrkX)*(fHmpidAODmipX - fHmpidAODtrkX) + (fHmpidAODmipY - fHmpidAODtrkY)*(fHmpidAODmipY - fHmpidAODtrkY));}
72   
73   
74   void GetHmpPidProbs(Double32_t *pid) const;   //defined in cxx
75   void GetHmpMom(Double32_t *mom)      const;   //defined in cxx
76   
77   //___ Setters
78   
79   void SetHmpMipCharge(Int_t q)               { fHmpidAODqn = q; }
80   void SetHmpCluIdx(Int_t ch,Int_t idx)       { fHmpidAODcluIdx=ch*1000000+idx;}
81   
82   void SetHmpNumOfPhotonClusters(Int_t nph)   { fHmpidAODqn = 1000000 * nph;}
83   
84   void SetHmpTrackTheta(Double_t trkTheta)  { fHmpidAODtrkTheta = trkTheta;}
85   void SetHmpTrackPhi(Double_t trkPhi)      { fHmpidAODtrkPhi = trkPhi;}
86   
87   void SetHmpSignal(Double_t thetaC)        { fHmpidAODsignal = thetaC;}
88   void SetHmpOccupancy(Double_t occ)        { fHmpidAODocc =  occ;}
89   
90   void SetHmpChi2(Double_t chi2)            { fHmpidAODchi2 = chi2;}
91
92   void SetHmpTrackX(Double_t trkX)          { fHmpidAODtrkX = trkX;}
93   void SetHmpTrackY(Double_t trkY)          { fHmpidAODtrkY = trkY;}
94
95   void SetHmpMipX(Double_t mipX)            { fHmpidAODmipX = mipX;}
96   void SetHmpMipY(Double_t mipY)            { fHmpidAODmipY = mipY;}
97  
98   void SetHmpPidProbs(Double_t *pid);       
99   void SetHmpMom(Double_t *mom);        
100   
101   
102   
103  protected:
104   
105   Int_t       fHmpidAODtrkId;                      // Unique track id as in ESD
106   Int_t       fHmpidAODqn;                         // 1000000*number of photon clusters + QDC
107   Int_t       fHmpidAODcluIdx;                     // 1000000*chamber id + cluster idx of the assigned MIP cluster
108   
109   Double32_t  fHmpidAODtrkTheta;                   // [-2*pi,2*pi,16] theta of the track extrapolated to the HMPID, LORS
110   Double32_t  fHmpidAODtrkPhi;                     // [-2*pi,2*pi,16] theta of the track extrapolated to the HMPID, LORS
111   Double32_t  fHmpidAODsignal;                     // HMPID signal (Theta ckov, rad)
112   Double32_t  fHmpidAODocc;                        // chamber occupancy where the track passed through: number of pads
113   Double32_t  fHmpidAODchi2;                       // [0.,0.,8] chi2 in the HMPID  
114   Double32_t  fHmpidAODtrkX;                       // x of the track impact, LORS 
115   Double32_t  fHmpidAODtrkY;                       // y of the track impact, LORS 
116   Double32_t  fHmpidAODmipX;                       // x of the MIP in LORS
117   Double32_t  fHmpidAODmipY;                       // y of the MIP in LORS
118   Double32_t  fHmpidAODpid[AliPID::kSPECIES];      // [0.,0.,8] "detector response probabilities" (for the PID)
119   Double32_t  fHMPIDmom[3];                        // track momentum at the HMPID ring reconstruction
120   
121   ClassDef(AliAODHMPIDrings,2)  
122         
123 };
124 #endif