]> git.uio.no Git - u/mrichter/AliRoot.git/blob - PWG4/GammaConv/AliAnalysisTaskCaloConv.h
few coverity corrections
[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 #include "TH2.h"
15
16 class AliESDInputHandler;
17 class AliESDEvent;
18 class AliAODEvent;
19 class AliMCEvent;
20 class TList;
21 class AliCFContainer ;
22 class AliStack;
23 class AliESDpid ;
24 class AliEMCALGeoUtils ;
25 class AliPHOSGeoUtils ;
26 class AliExternalTrackParam ;
27
28
29 class AliAnalysisTaskCaloConv : public AliAnalysisTaskSE
30 {
31         
32  public:
33   AliAnalysisTaskCaloConv();
34   AliAnalysisTaskCaloConv(const char* name);
35   virtual ~AliAnalysisTaskCaloConv() ;// virtual destructor
36                 
37   // Implementation of interface methods
38   virtual void Init();
39   virtual void LocalInit() {Init();}
40   virtual void UserCreateOutputObjects();
41   virtual void UserExec(Option_t *option);
42   virtual void Terminate(Option_t * /*option*/){}
43   virtual void ConnectInputData(Option_t * option);
44                 
45   void SetPi0Threshold1(Double_t thrs=0.5){fPi0Thresh1=thrs ; } //Threshold 1 for Calo photon
46   void SetPi0Threshold2(Double_t thrs=1.){fPi0Thresh2=thrs ; }  //Threshold 2 for Calo Photon
47                 
48   void SetTriggerFlags(Bool_t flag){fTriggerCINT1B=flag;}
49
50   //PID setters
51   void SetDEdxCuts(Double_t sEUp=5., Double_t sEDn=-3., Double_t sPiUp=0., Double_t sPiDn=1.){
52      fnSigmaAboveElectronLine= sEUp; fnSigmaBelowElectronLine=sEDn;
53      fnSigmaAbovePionLine=sPiUp; fpnSigmaAbovePionLine=sPiDn;}
54   void SetConvProbCut(Double_t prob=0.){ fprobCut=prob;}
55   void SetConvMaxRCut(Double_t maxR=180.){fmaxR=maxR ;} 
56   void SetConvMaxZCut(Double_t maxZ=240.){fmaxZ=maxZ ;}
57   void SetConvMaxEtaCut(Double_t eta=0.9){fetaCut=eta ;}
58   void SetConvMinPtCut(Double_t minPt=0.02){fptCut=minPt ;}
59   void SetConvMaxChi2Cut(Double_t chi2=30.){fchi2CutConversion=chi2 ;}
60
61   void SetPHOSBadMap(Int_t mod,TH2I * h){if(fPHOSBadMap[mod]) delete fPHOSBadMap[mod] ;
62                                          fPHOSBadMap[mod]=new TH2I(*h) ; printf("Set %s \n",fPHOSBadMap[mod]->GetName()); }
63   void SetEMCALBadMap(Int_t mod,TH2I * h){if(fEMCALBadMap[mod]) delete fEMCALBadMap[mod] ;
64                                          fEMCALBadMap[mod]=new TH2I(*h) ; printf("Set %s \n",fEMCALBadMap[mod]->GetName()); }
65   void UseCF(Bool_t use=kTRUE){fToUseCF=use ;}
66
67  protected:
68    void InitGeometry() ; //Create PHOS/EMCAL geometry
69    void ProcessMC();
70    void SelectConvPhotons() ; //collects V0s in event
71    void SelectPHOSPhotons(); //collects PHOS photons in event
72    void SelectEMCALPhotons(); //collects EMCAL photons in event
73    void FillRealMixed() ;     //Fills Real and Mixed inv.mass distributions
74    void FillHistogram(const char * key,Double_t x) const ; //Fill 1D histogram witn name key
75    void FillHistogram(const char * key,Double_t x, Double_t y) const ; //Fill 2D histogram witn name key
76    void FillHistogram(const char * key,Double_t x, Double_t y, Double_t z) const ; //Fill 3D histogram witn name key
77    Double_t PlanarityAngle(const AliExternalTrackParam * pos, const AliExternalTrackParam * neg)const ;
78    Bool_t IsGoodChannel(const char * det="PHOS", Int_t mod=1, Int_t ix=1,Int_t iz=1) ; //Checks bad map
79
80  private:
81   AliAnalysisTaskCaloConv(const AliAnalysisTaskCaloConv&); // Not implemented
82   AliAnalysisTaskCaloConv& operator=(const AliAnalysisTaskCaloConv&); // Not implemented
83                 
84   enum{
85     kCaloPIDdisp = BIT(14),
86     kCaloPIDtof  = BIT(15),
87     kCaloPIDneutral= BIT(16)
88   };
89   enum{
90     kConvOnFly= BIT(14),
91     kConvKink = BIT(15),
92     kConvdEdx = BIT(16),
93     kConvProb = BIT(17),
94     kConvR    = BIT(18),
95     kConvZR   = BIT(19),
96     kConvNDF  = BIT(20),
97     kConvEta  = BIT(21),
98     kConvPlan = BIT(22)
99   };
100   
101                 
102   AliESDEvent* fESDEvent; //!pointer to the ESDEvent
103   AliESDpid * fESDpid ;   //class for Track PID calculation
104   AliStack * fStack;      //! pointer to the MC particle stack
105   TList * fOutputContainer; //final histogram container
106   TList * fCFOutputContainer; //Correction Fremework conntainer
107
108   AliCFContainer * fConvCFCont ;  //Container for Conv. photons correction calculation
109   AliCFContainer * fPHOSCFCont ;  //Container for Conv. photons correction calculation
110   AliCFContainer * fEMCALCFCont ; //Container for Conv. photons correction calculation
111   AliCFContainer * fPi0CFCont ;   //Container for Conv. photons correction calculation
112                 
113   Bool_t fTriggerCINT1B; //Flag to select trigger CINT1B
114   Bool_t fToUseCF ;      //Switch on/off CF histogram filling
115                 
116   Double_t fMinOpeningAngleGhostCut; // minimum angle cut
117                 
118   AliPHOSGeoUtils  *fPHOSgeom;      //!PHOS geometry
119   AliEMCALGeoUtils *fEMCALgeom;     //!EMCAL geometry
120   Double_t fPi0Thresh1 ;    //Threshold 1 for pi0 calibration
121   Double_t fPi0Thresh2 ;    //Threshold 2 for pi0 calibration
122   TH2I * fPHOSBadMap[6] ;   //Container for PHOS bad channels map
123   TH2I * fEMCALBadMap[10] ; //Container for EMCAL Bad channels map
124
125   //Containers for storing previous events
126   // 10 bins for vtx class 
127   TList * fPHOSEvents[10] ;      //Container for PHOS photons
128   TList * fEMCALEvents[10] ;     //Container for EMCAL photons
129   TList * fConvEvents[10] ;      //Container for conversion photons
130
131   Int_t fGammaV0s[100] ;         //correspondence between final conv photon and V0
132   Int_t fGammaPHOS[100] ;        //correspondence between final conv photon and V0
133   Int_t fGammaEMCAL[100] ;       //correspondence between final conv photon and V0
134   TClonesArray * fConvEvent ;    //Conversion photons in current event
135   TClonesArray * fPHOSEvent ;    //PHOS photons in current event
136   TClonesArray * fEMCALEvent ;   //EMCAL  photons in current event
137
138   Double_t fnSigmaAboveElectronLine;
139   Double_t fnSigmaBelowElectronLine;
140   Double_t fnSigmaAbovePionLine;
141   Double_t fpnSigmaAbovePionLine;
142   Double_t fprobCut;
143   Double_t fmaxR ;
144   Double_t fmaxZ ;
145   Double_t fetaCut ;
146   Double_t fptCut ;
147   Double_t fchi2CutConversion ;
148
149   ClassDef(AliAnalysisTaskCaloConv, 1); // Analysis task for conversion + calorimeters
150 };
151
152 #endif //ALIANALYSISTASKCALOCO_H