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