1 #ifndef ALIANALYSISTASKTAGGEDPHOTONS_H
2 #define ALIANALYSISTASKTAGGEDPHOTONS_H
3 /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
4 * See cxx source for full Copyright notice */
5 //______________________________________________________________________________
6 // Analysis for PHOS Tagged Photons
7 // marks photons making pi0 with any other photon
8 // and calculates necessary corrections for fake pairs and
9 // decay partners escaped acceptance. If MC info is present
10 // fills set of controll histograms.
12 //*-- Dmitry Peresunko
13 //////////////////////////////////////////////////////////////////////////////
15 #include "AliAnalysisTaskSE.h"
16 class AliAnalysisUtils ;
20 class AliPHOSGeometry;
22 class AliAODMCParticle ;
24 class AliTriggerAnalysis ;
26 class AliPHOSTriggerUtils ;
28 class AliAnalysisTaskTaggedPhotons : public AliAnalysisTaskSE {
31 AliAnalysisTaskTaggedPhotons() ;
32 AliAnalysisTaskTaggedPhotons(const char *name) ;
33 AliAnalysisTaskTaggedPhotons(const AliAnalysisTaskTaggedPhotons& ap) ;
34 AliAnalysisTaskTaggedPhotons& operator = (const AliAnalysisTaskTaggedPhotons& ap) ;
35 virtual ~AliAnalysisTaskTaggedPhotons() ;
37 virtual void UserCreateOutputObjects();
39 virtual void LocalInit() { Init() ; }
40 virtual void UserExec(Option_t * opt = "") ;
41 virtual void Terminate(Option_t * opt = "") ;
43 void SetTrigger(Bool_t isPHOSTrig){fIsMB=isPHOSTrig;}
44 void SetMC(Bool_t isMC=kTRUE){fIsMC=isMC;}
45 void SetFastMC(void){fIsFastMC=kTRUE;fIsMC=kTRUE; } //same as MC, but bypass event checks
46 void SetPi0WeightParameters(TArrayD * ar) ;
47 void SetDustanceToBad(Float_t cut=2.5){fMinBCDistance=cut;}
51 void FillTaggingHistos() ;
52 Int_t GetFiducialArea(const Float_t * pos)const ; //what kind of fiducial area hit the photon
53 Int_t IsSameParent(const AliCaloPhoton *p1, const AliCaloPhoton *p2) const; //Check MC genealogy; return PDG of parent
54 Bool_t IsGoodChannel(Int_t mod, Int_t ix, Int_t iz) ;
55 Double_t InPi0Band(Double_t m, Double_t pt)const; //Check if invariant mass is within pi0 peak
56 Bool_t TestDisp(Double_t l0, Double_t l1, Double_t e)const ;
57 Bool_t TestTOF(Double_t /*t*/,Double_t /*en*/)const{return kTRUE;}
58 Bool_t TestCharged(Double_t dr,Double_t en)const ;
59 void InitGeometry() ; //read reotation matrixes from AOD/AOD
60 Int_t EvalIsolation(TLorentzVector * ph,Bool_t isPhoton) ;
61 Bool_t TestLambda(Double_t pt,Double_t l1,Double_t l2) ;
62 Bool_t TestPID(Int_t iPID, AliCaloPhoton* part) ;
63 Double_t PrimaryParticleWeight(AliAODMCParticle * particle) ;
64 Int_t FindPrimary(AliVCluster*, Bool_t&);
65 void FillHistogram(const char * key,Double_t x) const ; //Fill 1D histogram witn name key
66 void FillHistogram(const char * key,Double_t x, Double_t y) const ; //Fill 2D histogram witn name key
67 void FillHistogram(const char * key,Double_t x, Double_t y, Double_t z) const ; //Fill 3D histogram witn name key
68 void FillPIDHistograms(const char * name, const AliCaloPhoton * p) const ;
69 void FillPIDHistograms(const char * name, const AliCaloPhoton * p ,Double_t y) const ;
70 void FillPIDHistograms(const char * name, const AliCaloPhoton * p , const AliCaloPhoton * p2,Double_t y, Bool_t isReal) const ;
74 AliPHOSGeometry *fPHOSgeom; //!PHOS geometry
75 THashList * fOutputContainer ; //!List of output histograms
76 TClonesArray *fStack ; //!Pointer to MC stack (AOD)
77 TClonesArray * fTrackEvent ; //!List of tracks in the event
78 TClonesArray * fPHOSEvent ; //!List of tracks in the event
79 TList * fPHOSEvents[10][5] ; //!Previous events for mixing
80 TList * fCurrentMixedList; //! list of previous evetns for given centrality
81 AliTriggerAnalysis * fTriggerAnalysis ; //!
82 AliAnalysisUtils * fUtils ;
83 AliPHOSTriggerUtils * fPHOSTrigUtils ; //! utils to analyze PHOS trigger
85 //Fiducial area parameters
86 Float_t fZmax ; //Rectangular
87 Float_t fZmin ; //area
88 Float_t fPhimax ; //covered by
89 Float_t fPhimin ; //full calorimeter
90 Float_t fMinBCDistance; //minimal distance to bad channel
91 Double_t fWeightParamPi0[7] ; //Parameters to calculate weights
95 Bool_t fIsMB ; //which trigger to use
96 Bool_t fIsMC ; //Is this is MC
97 Bool_t fIsFastMC; //This is fast MC, bypass event checks
98 TH2I * fPHOSBadMap[6] ;
100 ClassDef(AliAnalysisTaskTaggedPhotons, 4); // a PHOS photon analysis task
102 #endif // ALIANALYSISTASKTAGGEDPHOTONS_H