]> git.uio.no Git - u/mrichter/AliRoot.git/blob - PWGCF/Correlations/JCORRAN/AliJPhoton.h
Changes to compile with Root6 on macosx64
[u/mrichter/AliRoot.git] / PWGCF / Correlations / JCORRAN / AliJPhoton.h
1 // $Id: AliJPhoton.h,v 1.5 2008/05/08 15:19:52 djkim Exp $
2
3 ////////////////////////////////////////////////////
4 /*!
5   \file AliJPhoton.h
6   \brief
7   \author J. Rak, D.J.Kim, R.Diaz (University of Jyvaskyla)
8   \email: djkim@jyu.fi
9   \version $Revision: 1.5 $
10   \date $Date: 2008/05/08 15:19:52 $
11   */
12 ////////////////////////////////////////////////////
13
14 #ifndef ALIJPHOTON_H
15 #define ALIJPHOTON_H
16
17 #ifndef ROOT_TObject
18 #include <TObject.h>
19 #endif
20
21 #include "AliJBaseTrack.h"
22
23 class AliJPhoton : public AliJBaseTrack {
24
25  public:
26   enum AliJCaloType {
27          kUndef = -1, 
28                  kPHOSCalo,  
29                  kEMCALCalo
30   };
31   
32   enum AliJCaloPID{
33     kElectronAli = 0,
34     kMuonAli = 1,
35     kPionAli = 2,
36     kKaonAli = 3,
37     kProtonAli = 4,
38     kPhotonAli = 5,
39     kPi0Ali = 6,
40     kNeutronAli = 7,
41     kKaon0Ali = 8,
42     kEleConAli = 9,
43     kUnknownAli = 10
44   };
45
46
47
48   AliJPhoton();     //default constructor
49   AliJPhoton(const AliJPhoton& a); //copy constructor
50   virtual ~AliJPhoton(){                //destructor    
51     if(fCellsAbsId)       delete [] fCellsAbsId; 
52     if(fCellsAmpFraction) delete [] fCellsAmpFraction;
53   }
54
55   float  GetChi2() const {return fChi2;}
56   float  GetTof() const {return fTof;}                   
57   float  GetX() const {return fX;}            
58   float  GetY() const {return fY;}          
59   float  GetZ() const {return fZ;}
60   float  GetProbPhot() const {return fProbPhot;}
61
62   void  SetChi2(float chi2) {fChi2=chi2;}
63   void  SetTof(float tof) {fTof=tof;}
64   void  SetPositionX(float x) {fX=x;}
65   void  SetPositionY(float y) {fY=y;}
66   void  SetPositionZ(float z) {fZ=z;}
67   void  SetProbPhot(float prob) {fProbPhot=prob;}
68
69   AliJPhoton& operator=(const AliJPhoton& photon);
70
71   //TODO
72   Bool_t InPHOS()  const {return fCaloType==kPHOSCalo ? kTRUE:kFALSE ;}
73   Bool_t InEMCAL() const {return fCaloType==kEMCALCalo ? kTRUE:kFALSE ;}
74   // getters
75   void GetPID(Double_t *pid) const {
76     for(Int_t i=0; i<kUnknownAli+1; ++i) pid[i]=fCaloPID[i];
77   }
78   Double_t  GetDistToBadChannel() const {return fDistToBadChannel;}
79   Double_t  GetDispersion()       const {return fDispersion;}
80   Double_t  GetM20()              const {return fM20;}
81   Double_t  GetM02()              const {return fM02;}
82   Double_t  GetEmcCpvDist()       const {return fEmcCpvDist;}
83   Double_t  GetNCells() const   { return fNCells;}
84   UShort_t  *GetCellsAbsId() const {return  fCellsAbsId;}
85   Int_t     GetCellAbsId(Int_t i) const {  
86          if (fCellsAbsId && i >=0 && i < fNCells ) return fCellsAbsId[i];    
87         else return -1;}
88   Double32_t *GetCellsAmplitudeFraction() const {return  fCellsAmpFraction;}
89   Double_t    GetCellAmplitudeFraction(Int_t i) const {  
90               if (fCellsAmpFraction && i >=0 && i < fNCells ) return fCellsAmpFraction[i];    
91               else return -1;}
92   AliJConst::particleType GetParticleType();
93   Int_t    GetSuperModuleID() const { return fSuperModuleId; }
94   void     SetSuperModuleID(Int_t id) { fSuperModuleId = id; }
95   Double32_t  GetTrackDx() const {return fTrackDx;}
96   Double32_t  GetTrackDz() const {return fTrackDz;}
97
98   //setters
99   void  SetCaloType(AliJCaloType calo) {fCaloType = calo;}
100   void  SetDistToBadChannel(Double_t dist) {fDistToBadChannel = dist;}
101   void  SetDispersion(Double_t disp) {fDispersion = disp;}
102   void  SetM20(Double_t m20) {fM20 = m20;}
103   void  SetM02(Double_t m02) {fM02 = m02;}
104   void  SetEmcCpvDist(Double_t dist) {fEmcCpvDist = dist;} 
105   void  SetPID(const Double_t *pid);
106   void  SetNCells(Int_t n) { fNCells = n;}
107   void  SetCellsAbsId(const UShort_t *array);
108   void  SetCellsAmplitudeFraction(const Double32_t *array);
109   void  SetTrackDx(Double_t trackDx) {fTrackDx = trackDx;}
110   void  SetTrackDz(Double_t trackDz) {fTrackDz = trackDz;}
111
112  private:
113
114   Double32_t  fChi2;      //chi2             
115   Double32_t  fTof;       //time of flight                
116   Double32_t  fX, fY, fZ; // x,y,z coordinates              
117   Double32_t  fProbPhot;  //probability to be a photon
118   Double32_t  fTrackDx, fTrackDz; // Distance to closest track in phi and z
119
120  //TODO
121   AliJCaloType   fCaloType;              // PHOS or EMCAL photon
122   Double_t       fCaloPID[kUnknownAli+1];          // [0.,1.,8] pointer to PID object
123   Double_t       fDistToBadChannel;      // Distance to nearest bad channel
124   Double_t       fDispersion;            // cluster dispersion, for shape analysis
125   Double_t       fM20;                   // 2-nd moment along the main eigen axis
126   Double_t       fM02;                   // 2-nd moment along the second eigen axis
127   Double_t       fEmcCpvDist;            // the distance from PHOS EMC rec.point to the closest CPV rec.point
128  
129   Int_t          fNCells ;                 //number of cells
130   Int_t          fSuperModuleId ;          //super module id
131   UShort_t      *fCellsAbsId;            //[fNCells] array of cell absId numbers
132   Double32_t    *fCellsAmpFraction;    //[fNCells][0.,1.,16] array with cell amplitudes fraction.
133
134   ClassDef(AliJPhoton,1)
135
136 };
137
138 #endif
139