]> git.uio.no Git - u/mrichter/AliRoot.git/blob - PWGCF/Correlations/JCORRAN/AliJPhoton.h
JCORRAN code update from DongJo
[u/mrichter/AliRoot.git] / PWGCF / Correlations / JCORRAN / AliJPhoton.h
1 /* Copyright(c) 1998-2014, ALICE Experiment at CERN, All rights reserved. *
2  * See cxx source for full Copyright notice */
3
4 // Short comment describing what this class does needed!
5
6 // $Id: AliJPhoton.h,v 1.5 2008/05/08 15:19:52 djkim Exp $
7
8 ////////////////////////////////////////////////////
9 /*!
10   \file AliJPhoton.h
11   \brief
12   \author J. Rak, D.J.Kim, R.Diaz (University of Jyvaskyla)
13   \email: djkim@jyu.fi
14   \version $Revision: 1.5 $
15   \date $Date: 2008/05/08 15:19:52 $
16   */
17 ////////////////////////////////////////////////////
18
19 #ifndef ALIJPHOTON_H
20 #define ALIJPHOTON_H
21
22 #ifndef ROOT_TObject
23 #include <TObject.h>
24 #endif
25
26 #include "AliJBaseTrack.h"
27
28 class AliJPhoton : public AliJBaseTrack {
29
30  public:
31   enum AliJCaloType {
32          kUndef = -1, 
33      kPHOSCalo,  
34      kEMCALCalo
35   };
36   
37   enum AliJCaloPID{
38     kElectronAli = 0,
39     kMuonAli = 1,
40     kPionAli = 2,
41     kKaonAli = 3,
42     kProtonAli = 4,
43                 kDeuteronAli = 5,
44                 kTritonAli = 6,
45                 kHe3Ali = 7,
46                 kAlpha = 8,
47                 kPhotonAli = 9,
48     kPi0Ali = 10,
49     kNeutronAli = 11,
50     kKaon0Ali = 12,
51     kEleConAli = 13,
52     kUnknownAli = 14
53   };
54
55   enum { kIsConversion=AliJBaseTrack::kNFlag, kNFlag };
56
57
58   AliJPhoton();      //default constructor
59   AliJPhoton(const AliJPhoton& a); //copy constructor
60   virtual ~AliJPhoton();    //destructor    
61
62   void Clear( Option_t * /* option */ ); // cleaner  
63
64   Double32_t  GetChi2() const {return fChi2;}
65   Double32_t  GetTof() const {return fTof;}                   
66   Double32_t  GetX() const {return fX;}            
67   Double32_t  GetY() const {return fY;}          
68   Double32_t  GetZ() const {return fZ;}
69   Double32_t  GetProbPhot() const {return fProbPhot;}
70
71   void  SetChi2(Double32_t chi2) {fChi2=chi2;}
72   void  SetTof(Double32_t tof) {fTof=tof;}
73   void  SetPositionX(Double32_t x) {fX=x;}
74   void  SetPositionY(Double32_t y) {fY=y;}
75   void  SetPositionZ(Double32_t z) {fZ=z;}
76   void  SetProbPhot(Double32_t prob) {fProbPhot=prob;}
77
78   AliJPhoton& operator=(const AliJPhoton& photon);
79
80   //TODO
81   Bool_t IsPHOS()  const {return fCaloType==kPHOSCalo ? kTRUE:kFALSE ;}
82   Bool_t IsEMCAL() const {return fCaloType==kEMCALCalo ? kTRUE:kFALSE ;}
83   // getters
84   void GetPID(Double_t *pid) const {
85     for(Int_t i=0; i<kUnknownAli+1; ++i) pid[i]=fCaloPID[i];
86   }
87   Double32_t  GetDistToBadChannel() const {return fDistToBadChannel;}
88   Double32_t  GetDispersion()       const {return fDispersion;}
89   Double32_t  GetM20()              const {return fM20;}
90   Double32_t  GetM02()              const {return fM02;}
91   Double32_t  GetEmcCpvDist()       const {return fEmcCpvDist;}
92   Int_t       GetNCells() const   { return fNCells;}
93   Int_t       GetNTracksMatched() const   { return fNTracksMatched;}
94   UShort_t  *GetCellsAbsId() const {return  fCellsAbsId;}
95   UShort_t   GetCellAbsId(Int_t i) const {  
96          if (fCellsAbsId && i >=0 && i < fNCells ) return fCellsAbsId[i];    
97         else return -1;}
98   Double32_t *GetCellsAmplitudeFraction() const {return  fCellsAmpFraction;}
99   Double32_t  GetCellAmplitudeFraction(Int_t i) const {  
100               if (fCellsAmpFraction && i >=0 && i < fNCells ) return fCellsAmpFraction[i];    
101               else return -1;}
102   Int_t       GetNEMCLabel() const {return fNEMCLabel;}
103   Int_t       GetEMCLabel( Int_t pos = 0 ) const { 
104               if( fEMCLabel && pos >= 0 && pos < fNEMCLabel ) return fEMCLabel[pos];
105               else return -1;}
106 //   Double32_t  *GetCellsAmplitude() const {return  fCellsAmp;}
107 //   Double32_t   GetCellAmplitude(Int_t i) const {  
108 //               if (fCellsAmp && i >=0 && i < fNCells ) return fCellsAmp[i];    
109 //               else return -1;}
110   particleType GetParticleType();
111   Int_t    GetSuperModuleID() const { return fSuperModuleId; }
112   void     SetSuperModuleID(Int_t id) { fSuperModuleId = id; }
113   Double32_t  GetTrackDx() const {return fTrackDx;}
114   Double32_t  GetTrackDz() const {return fTrackDz;}
115   Double32_t GetEMax() const {return fEMax;}
116   Double32_t GetECross() const {return fECross;}
117   Double32_t GetECore() const {return fECore;}
118   Int_t      GetNLM() const {return fNLM;}
119   Int_t  *GetCellsIndex() const {return  fCellsIndex; }
120   Int_t   GetCellIndex(Int_t i) const {  
121          if (fCellsIndex && i >=0 && i < fNCells ) return fCellsIndex[i];    
122         else return -1;}
123
124   //setters
125   void  SetCaloType(AliJCaloType calo) {fCaloType = calo;}
126   void  SetDistToBadChannel(Double32_t dist) {fDistToBadChannel = dist;}
127   void  SetDispersion(Double32_t disp) {fDispersion = disp;}
128   void  SetM20(Double32_t m20) {fM20 = m20;}
129   void  SetM02(Double32_t m02) {fM02 = m02;}
130   void  SetEmcCpvDist(Double32_t dist) {fEmcCpvDist = dist;} 
131   void  SetPID(const Double32_t *pid);
132   void  SetNCells(Int_t n) { fNCells = n;}
133   void  SetNTracksMatched( Int_t n ) { fNTracksMatched = n;}
134   void  SetCellsAbsId(const UShort_t *array);
135   void  SetCellsAmplitudeFraction(const Double32_t *array);
136   void  SetNEMCLabel(Int_t n) { fNEMCLabel = n;}
137   void  SetEMCLabel(const Int_t *array);
138   void  SetEMCLabel(const Int_t pos, const Int_t lab) {
139         if( fEMCLabel && pos >= 0 && pos < fNEMCLabel )
140           fEMCLabel[pos] = lab; }
141 //   void  SetCellsAmplitude(const Double32_t *array);
142   void  SetTrackDx(Double32_t trackDx) {fTrackDx = trackDx;}
143   void  SetTrackDz(Double32_t trackDz) {fTrackDz = trackDz;}
144   void  SetEMax(Double32_t e) {fEMax = e; }
145   void  SetECross(Double32_t e) {fECross = e; }
146   void  SetECore(Double32_t e) {fECore = e; }
147   void  SetNLM( Int_t n ) {fNLM = n;}
148   void  SetCellIndex( const Int_t pos, const Int_t ind );
149   void  SetCellsIndex(const Int_t *array);
150   
151   void  ClearCellsIndex();
152
153  private:
154
155   Double32_t  fChi2;      //chi2             
156   Double32_t  fTof;       //time of flight                
157   Double32_t  fX, fY, fZ; // x,y,z coordinates              
158   Double32_t  fProbPhot;  //probability to be a photon
159   Double32_t  fTrackDx, fTrackDz; // Distance to closest track in phi and z
160
161  //TODO
162   AliJCaloType   fCaloType;              // PHOS or EMCAL photon
163   Double32_t     fCaloPID[kUnknownAli+1];          // [0.,1.,8] pointer to PID object
164   Double32_t     fDistToBadChannel;      // Distance to nearest bad channel
165   Double32_t     fDispersion;            // cluster dispersion, for shape analysis
166   Double32_t     fM20;                   // 2-nd moment along the main eigen axis
167   Double32_t     fM02;                   // 2-nd moment along the second eigen axis
168   Double32_t     fEmcCpvDist;            // the distance from PHOS EMC rec.point to the closest CPV rec.point
169  
170   Int_t          fNCells ;                 //number of cells
171   Int_t          fNTracksMatched;          // number of tracks matched
172   Int_t          fSuperModuleId ;          //super module id
173   UShort_t      *fCellsAbsId;            //[fNCells] array of cell absId numbers
174   Double32_t    *fCellsAmpFraction;    //[fNCells][0.,1.,16] array with cell amplitudes fraction (elements are 0 if unfolding off)
175 //  Double32_t    *fCellsAmp;            //[fNCells] array amplitudes of cluster cellsz
176   Int_t          fNEMCLabel;            // number of MC labels
177   Int_t         *fEMCLabel;             //[fNEMCLabel] MC labels
178
179   // analysis time variables
180   Double32_t     fEMax;  //! maximum cell energy
181   Double32_t     fECross; //! energy of cells in cross around max
182   Double32_t     fECore; //! central cells energies
183   Int_t          fNLM;  //! number of local maxima
184   Int_t         *fCellsIndex; //! cell indices in cell list
185
186   ClassDef(AliJPhoton,2)
187
188 };
189
190 #endif
191