1 #ifndef ALIANALYSISTASKCALOCONV_H
2 #define ALIANALYSISTASKCALOCONV_H
4 /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
5 * See cxx source for full Copyright notice */
7 ////////////////////////////////////////////////
8 //---------------------------------------------
9 // Class used to do analysis on conversion pairs
10 //---------------------------------------------
11 ////////////////////////////////////////////////
13 #include "AliAnalysisTaskSE.h"
16 class AliESDInputHandler;
21 class AliCFContainer ;
24 class AliEMCALGeoUtils ;
25 class AliPHOSGeoUtils ;
26 class AliExternalTrackParam ;
29 class AliAnalysisTaskCaloConv : public AliAnalysisTaskSE
33 AliAnalysisTaskCaloConv();
34 AliAnalysisTaskCaloConv(const char* name);
35 virtual ~AliAnalysisTaskCaloConv() ;// virtual destructor
37 // Implementation of interface methods
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);
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
48 void SetTriggerFlags(Bool_t flag){fTriggerCINT1B=flag;}
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 ;}
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 ;}
68 void InitGeometry() ; //Create PHOS/EMCAL geometry
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
81 AliAnalysisTaskCaloConv(const AliAnalysisTaskCaloConv&); // Not implemented
82 AliAnalysisTaskCaloConv& operator=(const AliAnalysisTaskCaloConv&); // Not implemented
85 kCaloPIDdisp = BIT(14),
86 kCaloPIDtof = BIT(15),
87 kCaloPIDneutral= BIT(16)
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
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
113 Bool_t fTriggerCINT1B; //Flag to select trigger CINT1B
114 Bool_t fToUseCF ; //Switch on/off CF histogram filling
116 Double_t fMinOpeningAngleGhostCut; // minimum angle cut
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
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
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
138 Double_t fnSigmaAboveElectronLine;
139 Double_t fnSigmaBelowElectronLine;
140 Double_t fnSigmaAbovePionLine;
141 Double_t fpnSigmaAbovePionLine;
147 Double_t fchi2CutConversion ;
149 ClassDef(AliAnalysisTaskCaloConv, 1); // Analysis task for conversion + calorimeters
152 #endif //ALIANALYSISTASKCALOCO_H