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"
17 class AliESDInputHandler;
23 class AliCFContainer ;
26 class AliESDtrackCuts ;
27 class AliEMCALGeometry ;
28 class AliPHOSGeoUtils ;
29 class AliExternalTrackParam ;
32 class AliAnalysisTaskCaloConv : public AliAnalysisTaskSE
36 AliAnalysisTaskCaloConv();
37 AliAnalysisTaskCaloConv(const char* name);
38 virtual ~AliAnalysisTaskCaloConv() ;// virtual destructor
40 // Implementation of interface methods
42 virtual void LocalInit() {Init();}
43 virtual void UserCreateOutputObjects();
44 virtual void UserExec(Option_t *option);
45 virtual void Terminate(Option_t * /*option*/){}
46 virtual void ConnectInputData(Option_t * option);
48 void SetPi0Threshold1(Double_t thrs=0.5){fPi0Thresh1=thrs ; } //Threshold 1 for Calo photon
49 void SetPi0Threshold2(Double_t thrs=1.){fPi0Thresh2=thrs ; } //Threshold 2 for Calo Photon
51 void SetTriggerFlags(Bool_t flag){fTriggerCINT1B=flag;}
54 void SetDEdxCuts(Double_t sEUp=5., Double_t sEDn=-3., Double_t sPiUp=0., Double_t sPiDn=1.){
55 fnSigmaAboveElectronLine= sEUp; fnSigmaBelowElectronLine=sEDn;
56 fnSigmaAbovePionLine=sPiUp; fpnSigmaAbovePionLine=sPiDn;}
57 void SetConvProbCut(Double_t prob=0.){ fprobCut=prob;}
58 void SetConvMaxRCut(Double_t maxR=180.){fmaxR=maxR ;}
59 void SetConvMaxZCut(Double_t maxZ=240.){fmaxZ=maxZ ;}
60 void SetConvMaxEtaCut(Double_t eta=0.9){fetaCut=eta ;}
61 void SetConvMinPtCut(Double_t minPt=0.02){fptCut=minPt ;}
62 void SetConvMaxChi2Cut(Double_t chi2=30.){fchi2CutConversion=chi2 ;}
64 void SetPHOSBadMap(Int_t mod,TH2I * h){if(fPHOSBadMap[mod]) delete fPHOSBadMap[mod] ;
65 fPHOSBadMap[mod]=new TH2I(*h) ; printf("Set %s \n",fPHOSBadMap[mod]->GetName()); }
66 void SetEMCALBadMap(Int_t mod,TH2I * h){if(fEMCALBadMap[mod]) delete fEMCALBadMap[mod] ;
67 fEMCALBadMap[mod]=new TH2I(*h) ; printf("Set %s \n",fEMCALBadMap[mod]->GetName()); }
68 void UseCF(Bool_t use=kTRUE){fToUseCF=use ;}
71 void InitGeometry() ; //Create PHOS/EMCAL geometry
73 void SelectConvPhotons() ; //collects V0s in event
74 void SelectPHOSPhotons(); //collects PHOS photons in event
75 void SelectEMCALPhotons(); //collects EMCAL photons in event
76 void FillRealMixed() ; //Fills Real and Mixed inv.mass distributions
77 void FillHistogram(const char * key,Double_t x) const ; //Fill 1D histogram witn name key
78 void FillHistogram(const char * key,Double_t x, Double_t y) const ; //Fill 2D histogram witn name key
79 void FillHistogram(const char * key,Double_t x, Double_t y, Double_t z) const ; //Fill 3D histogram witn name key
80 Double_t PlanarityAngle(const AliExternalTrackParam * pos, const AliExternalTrackParam * neg)const ;
81 Bool_t IsGoodChannel(const char * det="PHOS", Int_t mod=1, Int_t ix=1,Int_t iz=1) ; //Checks bad map
82 void Recalibrate(Double_t &m, Double_t &pt, const TLorentzVector *calo, const TLorentzVector * conv, Int_t iw, Int_t in) ;
83 void RecalibrateConvPHOS(Double_t &m, Double_t &pt, const TLorentzVector *calo, const TLorentzVector * conv, Int_t iw, Int_t in) ;
84 void RecalibrateEMCAL(Double_t &m, Double_t &pt, const TLorentzVector *calo, const TLorentzVector * conv, Int_t iw, Int_t in) ;
85 void GetArmenterosQtAlfa(AliKFParticle* positiveKFParticle, AliKFParticle * negativeKFParticle,
86 AliKFParticle * gammaKFCandidate, Double_t armenterosQtAlfa[2] ) ;
89 AliAnalysisTaskCaloConv(const AliAnalysisTaskCaloConv&); // Not implemented
90 AliAnalysisTaskCaloConv& operator=(const AliAnalysisTaskCaloConv&); // Not implemented
94 kCaloPIDdisp = BIT(14),
95 kCaloPIDtof = BIT(15),
96 kCaloPIDneutral= BIT(16),
97 kCaloDistBad = BIT(17)
112 AliESDEvent* fESDEvent; //!pointer to the ESDEvent
113 AliESDpid * fESDpid ; //class for Track PID calculation
114 AliESDtrackCuts * fESDtrackCuts; //class for charged multiplicity estimation
115 AliStack * fStack; //! pointer to the MC particle stack
116 TList * fOutputContainer; //final histogram container
117 TList * fCFOutputContainer; //Correction Fremework conntainer
119 AliCFContainer * fConvCFCont ; //Container for Conv. photons correction calculation
120 AliCFContainer * fPHOSCFCont ; //Container for Conv. photons correction calculation
121 AliCFContainer * fEMCALCFCont ; //Container for Conv. photons correction calculation
122 AliCFContainer * fPi0CFCont ; //Container for Conv. photons correction calculation
126 Bool_t fTriggerCINT1B; //Flag to select trigger CINT1B
127 Bool_t fToUseCF ; //Switch on/off CF histogram filling
129 Double_t fMinOpeningAngleGhostCut; // minimum angle cut
131 AliPHOSGeoUtils *fPHOSgeom; //!PHOS geometry
132 AliEMCALGeometry *fEMCALgeom; //!EMCAL geometry
133 Double_t fPi0Thresh1 ; //Threshold 1 for pi0 calibration
134 Double_t fPi0Thresh2 ; //Threshold 2 for pi0 calibration
135 Double_t fBadDistCutPHOS ; //Cut on distance to bad channel
136 Double_t fBadDistCutEMCAL ; //Cut on distance to bad channel
137 TH2I * fPHOSBadMap[6] ; //Container for PHOS bad channels map
138 TH2I * fEMCALBadMap[10] ; //Container for EMCAL Bad channels map
140 //Containers for storing previous events
141 // 10 bins for vtx class
142 TList * fPHOSEvents[10] ; //Container for PHOS photons
143 TList * fEMCALEvents[10] ; //Container for EMCAL photons
144 TList * fConvEvents[10] ; //Container for conversion photons
146 Int_t fGammaV0s[100] ; //correspondence between final conv photon and V0
147 Int_t fGammaPHOS[100] ; //correspondence between final conv photon and V0
148 Int_t fGammaEMCAL[100] ; //correspondence between final conv photon and V0
149 TClonesArray * fConvEvent ; //Conversion photons in current event
150 TClonesArray * fPHOSEvent ; //PHOS photons in current event
151 TClonesArray * fEMCALEvent ; //EMCAL photons in current event
153 Double_t fnSigmaAboveElectronLine; //fnSigmaAboveElectronLine
154 Double_t fnSigmaBelowElectronLine; //fnSigmaBelowElectronLine
155 Double_t fnSigmaAbovePionLine; //fnSigmaAbovePionLine
156 Double_t fpnSigmaAbovePionLine; //fpnSigmaAbovePionLine
157 Double_t fprobCut; //fprobCut
158 Double_t fmaxR ; //fmaxR
159 Double_t fmaxZ ; //fmaxZ
160 Double_t fetaCut ; //fetaCut
161 Double_t fptCut ; //fptCut
162 Double_t fchi2CutConversion ; //fchi2CutConversion
164 ClassDef(AliAnalysisTaskCaloConv, 2); // Analysis task for conversion + calorimeters
167 #endif //ALIANALYSISTASKCALOCO_H