]> git.uio.no Git - u/mrichter/AliRoot.git/blob - PWG4/GammaConv/AliAnalysisTaskCaloConv.h
fd5d214a7e6aa772e296f954bbc929ccc480a901
[u/mrichter/AliRoot.git] / PWG4 / GammaConv / AliAnalysisTaskCaloConv.h
1 #ifndef ALIANALYSISTASKCALOCONV_H
2 #define ALIANALYSISTASKCALOCONV_H
3
4 /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
5  * See cxx source for full Copyright notice                               */
6
7 ////////////////////////////////////////////////
8 //--------------------------------------------- 
9 // Class used to do analysis on conversion pairs
10 //---------------------------------------------
11 ////////////////////////////////////////////////
12
13 #include "AliAnalysisTaskSE.h"
14
15 class AliESDInputHandler;
16 class AliESDEvent;
17 class AliAODEvent;
18 class AliMCEvent;
19 class TList;
20 class AliCFContainer ;
21 class AliStack;
22 class AliESDpid ;
23 class AliEMCALGeoUtils ;
24 class AliPHOSGeoUtils ;
25 class AliExternalTrackParam ;
26
27
28 class AliAnalysisTaskCaloConv : public AliAnalysisTaskSE
29 {
30         
31  public:
32   AliAnalysisTaskCaloConv();
33   AliAnalysisTaskCaloConv(const char* name);
34   virtual ~AliAnalysisTaskCaloConv() ;// virtual destructor
35                 
36   // Implementation of interface methods
37   virtual void Init();
38   virtual void LocalInit() {Init();}
39   virtual void UserCreateOutputObjects();
40   virtual void UserExec(Option_t *option);
41   virtual void Terminate(Option_t * /*option*/){}
42   virtual void ConnectInputData(Option_t * option);
43                 
44   void SetPi0Threshold1(Double_t thrs=0.5){fPi0Thresh1=thrs ; } //Threshold 1 for Calo photon
45   void SetPi0Threshold2(Double_t thrs=1.){fPi0Thresh2=thrs ; }  //Threshold 2 for Calo Photon
46                 
47   void SetTriggerFlags(Bool_t flag){fTriggerCINT1B=flag;}
48
49   //PID setters
50   void SetDEdxCuts(Double_t sEUp=5., Double_t sEDn=-3., Double_t sPiUp=0., Double_t sPiDn=1.){
51      fnSigmaAboveElectronLine= sEUp; fnSigmaBelowElectronLine=sEDn;
52      fnSigmaAbovePionLine=sPiUp; fpnSigmaAbovePionLine=sPiDn;}
53   void SetConvProbCut(Double_t prob=0.){ fprobCut=prob;}
54   void SetConvMaxRCut(Double_t maxR=180.){fmaxR=maxR ;} 
55   void SetConvMaxZCut(Double_t maxZ=240.){fmaxZ=maxZ ;}
56   void SetConvMaxEtaCut(Double_t eta=0.9){fetaCut=eta ;}
57   void SetConvMinPtCut(Double_t minPt=0.02){fptCut=minPt ;}
58   void SetConvMaxChi2Cut(Double_t chi2=30.){fchi2CutConversion=chi2 ;}
59
60  protected:
61    void InitGeometry() ; //Create PHOS/EMCAL geometry
62    void ProcessMC();
63    void SelectConvPhotons() ; //collects V0s in event
64    void SelectPHOSPhotons(); //collects PHOS photons in event
65    void SelectEMCALPhotons(); //collects EMCAL photons in event
66    void FillRealMixed() ;     //Fills Real and Mixed inv.mass distributions
67    void FillHistogram(const char * key,Double_t x) const ; //Fill 1D histogram witn name key
68    void FillHistogram(const char * key,Double_t x, Double_t y) const ; //Fill 2D histogram witn name key
69    void FillHistogram(const char * key,Double_t x, Double_t y, Double_t z) const ; //Fill 3D histogram witn name key
70    Double_t PlanarityAngle(const AliExternalTrackParam * pos, const AliExternalTrackParam * neg)const ;
71
72
73  private:
74   AliAnalysisTaskCaloConv(const AliAnalysisTaskCaloConv&); // Not implemented
75   AliAnalysisTaskCaloConv& operator=(const AliAnalysisTaskCaloConv&); // Not implemented
76                 
77   enum{
78     kCaloPIDdisp = BIT(14),
79     kCaloPIDtof  = BIT(15),
80     kCaloPIDneutral= BIT(16)
81   };
82   enum{
83     kConvOnFly= BIT(14),
84     kConvKink = BIT(15),
85     kConvdEdx = BIT(16),
86     kConvProb = BIT(17),
87     kConvR    = BIT(18),
88     kConvZR   = BIT(19),
89     kConvNDF  = BIT(20),
90     kConvEta  = BIT(21),
91     kConvPlan = BIT(22)
92   };
93   
94                 
95   AliESDEvent* fESDEvent; //!pointer to the ESDEvent
96   AliESDpid * fESDpid ;   //class for Track PID calculation
97   AliStack * fStack;      //! pointer to the MC particle stack
98   TList * fOutputContainer; //final histogram container
99   TList * fCFOutputContainer; //Correction Fremework conntainer
100
101   AliCFContainer * fConvCFCont ;  //Container for Conv. photons correction calculation
102   AliCFContainer * fPHOSCFCont ;  //Container for Conv. photons correction calculation
103   AliCFContainer * fEMCALCFCont ; //Container for Conv. photons correction calculation
104   AliCFContainer * fPi0CFCont ;   //Container for Conv. photons correction calculation
105                 
106   Bool_t fTriggerCINT1B; //Flag to select trigger CINT1B
107                 
108   Double_t fMinOpeningAngleGhostCut; // minimum angle cut
109                 
110   AliPHOSGeoUtils  *fPHOSgeom;      //!PHOS geometry
111   AliEMCALGeoUtils *fEMCALgeom;     //!EMCAL geometry
112   Double_t fPi0Thresh1 ; //Threshold 1 for pi0 calibration
113   Double_t fPi0Thresh2 ; //Threshold 2 for pi0 calibration
114
115   //Containers for storing previous events
116   // 10 bins for vtx class 
117   TList * fPHOSEvents[10] ;      //Container for PHOS photons
118   TList * fEMCALEvents[10] ;     //Container for EMCAL photons
119   TList * fConvEvents[10] ;      //Container for conversion photons
120
121   TClonesArray * fConvEvent ;    //Conversion photons in current event
122   TClonesArray * fPHOSEvent ;    //PHOS photons in current event
123   TClonesArray * fEMCALEvent ;   //EMCAL  photons in current event
124
125   Double_t fnSigmaAboveElectronLine;
126   Double_t fnSigmaBelowElectronLine;
127   Double_t fnSigmaAbovePionLine;
128   Double_t fpnSigmaAbovePionLine;
129   Double_t fprobCut;
130   Double_t fmaxR ;
131   Double_t fmaxZ ;
132   Double_t fetaCut ;
133   Double_t fptCut ;
134   Double_t fchi2CutConversion ;
135
136   ClassDef(AliAnalysisTaskCaloConv, 1); // Analysis task for conversion + calorimeters
137 };
138
139 #endif //ALIANALYSISTASKCALOCO_H