TENDER becomes Tender, removing .so
[u/mrichter/AliRoot.git] / PWGGA / GammaConv / AliAnalysisTaskCaloConv.h
CommitLineData
a8d74d4a 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"
1c0ffc7f 14#include "TH2.h"
a8d74d4a 15
b9295e41 16
a8d74d4a 17class AliESDInputHandler;
18class AliESDEvent;
19class AliAODEvent;
20class AliMCEvent;
21class TList;
1be770bf 22class TLorentzVector;
a8d74d4a 23class AliCFContainer ;
24class AliStack;
25class AliESDpid ;
1be770bf 26class AliESDtrackCuts ;
2ef5608f 27class AliEMCALGeometry ;
a8d74d4a 28class AliPHOSGeoUtils ;
29class AliExternalTrackParam ;
1be770bf 30class AliKFParticle ;
a8d74d4a 31
a8d74d4a 32class AliAnalysisTaskCaloConv : public AliAnalysisTaskSE
33{
34
35 public:
36 AliAnalysisTaskCaloConv();
37 AliAnalysisTaskCaloConv(const char* name);
38 virtual ~AliAnalysisTaskCaloConv() ;// virtual destructor
39
40 // Implementation of interface methods
41 virtual void Init();
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);
47
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
50
51 void SetTriggerFlags(Bool_t flag){fTriggerCINT1B=flag;}
52
53 //PID setters
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 ;}
63
1c0ffc7f 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 ;}
69
a8d74d4a 70 protected:
71 void InitGeometry() ; //Create PHOS/EMCAL geometry
72 void ProcessMC();
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 ;
1c0ffc7f 81 Bool_t IsGoodChannel(const char * det="PHOS", Int_t mod=1, Int_t ix=1,Int_t iz=1) ; //Checks bad map
1be770bf 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] ) ;
a8d74d4a 87
88 private:
89 AliAnalysisTaskCaloConv(const AliAnalysisTaskCaloConv&); // Not implemented
90 AliAnalysisTaskCaloConv& operator=(const AliAnalysisTaskCaloConv&); // Not implemented
91
1be770bf 92 protected:
a8d74d4a 93 enum{
94 kCaloPIDdisp = BIT(14),
95 kCaloPIDtof = BIT(15),
1be770bf 96 kCaloPIDneutral= BIT(16),
97 kCaloDistBad = BIT(17)
a8d74d4a 98 };
99 enum{
100 kConvOnFly= BIT(14),
1be770bf 101 kConvArmQt= BIT(15),
a8d74d4a 102 kConvdEdx = BIT(16),
103 kConvProb = BIT(17),
104 kConvR = BIT(18),
105 kConvZR = BIT(19),
106 kConvNDF = BIT(20),
107 kConvEta = BIT(21),
108 kConvPlan = BIT(22)
109 };
110
111
112 AliESDEvent* fESDEvent; //!pointer to the ESDEvent
113 AliESDpid * fESDpid ; //class for Track PID calculation
1be770bf 114 AliESDtrackCuts * fESDtrackCuts; //class for charged multiplicity estimation
a8d74d4a 115 AliStack * fStack; //! pointer to the MC particle stack
116 TList * fOutputContainer; //final histogram container
117 TList * fCFOutputContainer; //Correction Fremework conntainer
118
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
1be770bf 123
124 Double_t fCentr ;
a8d74d4a 125
126 Bool_t fTriggerCINT1B; //Flag to select trigger CINT1B
1c0ffc7f 127 Bool_t fToUseCF ; //Switch on/off CF histogram filling
a8d74d4a 128
129 Double_t fMinOpeningAngleGhostCut; // minimum angle cut
130
131 AliPHOSGeoUtils *fPHOSgeom; //!PHOS geometry
2ef5608f 132 AliEMCALGeometry *fEMCALgeom; //!EMCAL geometry
1c0ffc7f 133 Double_t fPi0Thresh1 ; //Threshold 1 for pi0 calibration
134 Double_t fPi0Thresh2 ; //Threshold 2 for pi0 calibration
1be770bf 135 Double_t fBadDistCutPHOS ; //Cut on distance to bad channel
136 Double_t fBadDistCutEMCAL ; //Cut on distance to bad channel
1c0ffc7f 137 TH2I * fPHOSBadMap[6] ; //Container for PHOS bad channels map
138 TH2I * fEMCALBadMap[10] ; //Container for EMCAL Bad channels map
a8d74d4a 139
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
145
1c0ffc7f 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
a8d74d4a 149 TClonesArray * fConvEvent ; //Conversion photons in current event
150 TClonesArray * fPHOSEvent ; //PHOS photons in current event
151 TClonesArray * fEMCALEvent ; //EMCAL photons in current event
152
b9295e41 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
a8d74d4a 163
1be770bf 164 ClassDef(AliAnalysisTaskCaloConv, 2); // Analysis task for conversion + calorimeters
a8d74d4a 165};
166
167#endif //ALIANALYSISTASKCALOCO_H