]> git.uio.no Git - u/mrichter/AliRoot.git/blob - PWG4/JCORRAN/AliJPhoton.h
setting the eta range for clustered tracks, adding the correct signature for backgrou...
[u/mrichter/AliRoot.git] / PWG4 / JCORRAN / AliJPhoton.h
1 // $Id: AliJPhoton.h,v 1.1 2008/05/02 20:28:14 djkim Exp $
2
3 ////////////////////////////////////////////////////
4 /*!
5   \file AliJPhoton.h
6   \author J. Rak, D.J.Kim, R.Diaz (University of Jyvaskyla)
7   \email: djkim@jyu.fi
8   \version $Revision: 1.1 $
9   \date $Date: 2008/05/02 11:56:39 $
10 */
11 ////////////////////////////////////////////////////
12
13 #ifndef ALIJPHOTON_H
14 #define ALIJPHOTON_H
15
16 /*
17 #ifndef ROOT_TObject
18 #include <TObject.h>
19 #endif
20 */
21 #include <iostream>
22 #include <fstream>
23 #include <stdlib.h>
24 #include <stdio.h>
25 #include "TMath.h"
26
27 #include "JConst.h"
28 //#include "AliPhJBaseTrack.h"
29 //#include "AliPhJPhoton.h"
30
31 class  TObject;
32 class  AliPhJBaseTrack;
33 class  AliPhJPhoton;
34
35 class AliJPhoton : public AliPhJPhoton {
36
37 public:
38   
39   enum AliJCaloType {
40          kUndef = -1, 
41                  kPHOSCalo,  
42                  kEMCALCalo
43   };
44   
45   enum AliJCaloPID{
46     kElectronAli = 0,
47     kMuonAli = 1,
48     kPionAli = 2,
49     kKaonAli = 3,
50     kProtonAli = 4,
51     kPhotonAli = 5,
52     kPi0Ali = 6,
53     kNeutronAli = 7,
54     kKaon0Ali = 8,
55     kEleConAli = 9,
56     kUnknownAli = 10
57   };
58
59
60   AliJPhoton();              // default constructor
61   AliJPhoton(const AliJPhoton& a);
62   ~AliJPhoton(){   //destructor  
63     if(fCellsAbsId)       delete [] fCellsAbsId; 
64     if(fCellsAmpFraction) delete [] fCellsAmpFraction;
65   }              
66   
67   Bool_t InPHOS()  const {return fCaloType==kPHOSCalo ? kTRUE:kFALSE ;}
68   Bool_t InEMCAL() const {return fCaloType==kEMCALCalo ? kTRUE:kFALSE ;}
69   // getters
70   void GetPID(Double_t *pid) const {
71     for(Int_t i=0; i<kUnknownAli+1; ++i) pid[i]=fCaloPID[i];
72   }
73   Double_t  GetDistToBadChannel() const {return fDistToBadChannel;}
74   Double_t  GetDispersion()       const {return fDispersion;}
75   Double_t  GetM20()              const {return fM20;}
76   Double_t  GetM02()              const {return fM02;}
77   Double_t  GetEmcCpvDist()       const {return fEmcCpvDist;}
78   Double_t  GetNCells() const   { return fNCells;}
79   UShort_t  *GetCellsAbsId() const {return  fCellsAbsId;}
80   Int_t     GetCellAbsId(Int_t i) const {  
81          if (fCellsAbsId && i >=0 && i < fNCells ) return fCellsAbsId[i];    
82         else return -1;}
83   Double32_t *GetCellsAmplitudeFraction() const {return  fCellsAmpFraction;}
84   Double_t    GetCellAmplitudeFraction(Int_t i) const {  
85               if (fCellsAmpFraction && i >=0 && i < fNCells ) return fCellsAmpFraction[i];    
86               else return -1;}
87   particleType GetParticleType();
88  
89   
90   //setters
91   void  SetCaloType(AliJCaloType calo) {fCaloType = calo;}
92   void  SetDistToBadChannel(Double_t dist) {fDistToBadChannel = dist;}
93   void  SetDispersion(Double_t disp) {fDispersion = disp;}
94   void  SetM20(Double_t m20) {fM20 = m20;}
95   void  SetM02(Double_t m02) {fM02 = m02;}
96   void  SetEmcCpvDist(Double_t dist) {fEmcCpvDist = dist;} 
97   void  SetPID(const Double_t *pid);
98   void  SetNCells(Int_t n) { fNCells = n;}
99   void  SetCellsAbsId(const UShort_t *array);
100   void  SetCellsAmplitudeFraction(const Double32_t *array) ;
101
102   Int_t    GetMCid() const { return fMCid; }
103   void     SetMCid(Int_t id) { fMCid = id; }
104   Int_t    GetSuperModuleID() const { return fSuperModuleId; }
105   void     SetSuperModuleID(Int_t id) { fSuperModuleId = id; }
106
107   
108   AliJPhoton&  operator=(const  AliJPhoton& photon); 
109   
110 private:
111
112   AliJCaloType   fCaloType;              // PHOS or EMCAL photon
113   Double_t       fCaloPID[kUnknownAli+1];          // [0.,1.,8] pointer to PID object
114   Double_t       fDistToBadChannel;      // Distance to nearest bad channel
115   Double_t       fDispersion;            // cluster dispersion, for shape analysis
116   Double_t       fM20;                   // 2-nd moment along the main eigen axis
117   Double_t       fM02;                   // 2-nd moment along the second eigen axis
118   Double_t       fEmcCpvDist;            // the distance from PHOS EMC rec.point to the closest CPV rec.point
119  
120   Int_t          fNCells ;                 //number of cells
121   Int_t          fSuperModuleId ;          //super module id
122   UShort_t      *fCellsAbsId;            //[fNCells] array of cell absId numbers
123   Double32_t    *fCellsAmpFraction;    //[fNCells][0.,1.,16] array with cell amplitudes fraction.
124
125   Int_t      fMCid;                 // track label, points back to MC track
126
127   
128    
129  ClassDef(AliJPhoton,1)
130  
131 };
132
133 #endif
134