]> git.uio.no Git - u/mrichter/AliRoot.git/blame - PWGGA/PHOSTasks/PHOS_Tagging/AliAnalysisTaskTaggedPhotons.h
Add possibility to work with ESD; add centrality dependence
[u/mrichter/AliRoot.git] / PWGGA / PHOSTasks / PHOS_Tagging / AliAnalysisTaskTaggedPhotons.h
CommitLineData
213dd723 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.
11//
12//*-- Dmitry Peresunko
13//////////////////////////////////////////////////////////////////////////////
14
15#include "AliAnalysisTaskSE.h"
16
17class AliStack ;
18class AliAODEvent ;
19class THashList ;
20class TH2I ;
21class AliPHOSGeometry;
22class AliAODPWG4Particle;
b5f58f9c 23class AliVCluster ;
213dd723 24class AliTriggerAnalysis ;
25class TParticle ;
26
27class AliAnalysisTaskTaggedPhotons : public AliAnalysisTaskSE {
28
29public:
30 AliAnalysisTaskTaggedPhotons() ;
31 AliAnalysisTaskTaggedPhotons(const char *name) ;
32 AliAnalysisTaskTaggedPhotons(const AliAnalysisTaskTaggedPhotons& ap) ;
33 AliAnalysisTaskTaggedPhotons& operator = (const AliAnalysisTaskTaggedPhotons& ap) ;
34 virtual ~AliAnalysisTaskTaggedPhotons() ;
35
36 virtual void UserCreateOutputObjects();
37 virtual void Init() ;
38 virtual void LocalInit() { Init() ; }
39 virtual void UserExec(Option_t * opt = "") ;
40 virtual void Terminate(Option_t * opt = "") ;
41
42 void SetPHOSBadMap(Int_t mod,TH2I * h)
43 {
44 if(fPHOSBadMap[mod]) delete fPHOSBadMap[mod] ;
45 fPHOSBadMap[mod]=new TH2I(*h) ;
46 printf("Set %s \n",fPHOSBadMap[mod]->GetName());
47 }
48
49protected:
50 void FillMCHistos() ;
51 void FillTaggingHistos() ;
52 Int_t GetFiducialArea(const Float_t * pos)const ; //what kind of fiducial area hit the photon
53 Bool_t IsSamePi0(const AliAODPWG4Particle *p1, const AliAODPWG4Particle *p2) const; //Check MC genealogy
54 Bool_t IsInPi0Band(Double_t m, Double_t pt,Int_t type)const; //Check if invariant mass is within pi0 peak
55 Bool_t TestDisp(Double_t l0, Double_t l1, Double_t e)const ;
56 Bool_t TestTOF(Double_t /*t*/,Double_t /*en*/)const{return kTRUE;}
57 Bool_t TestCharged(Double_t dr,Double_t en)const ;
58 void InitGeometry() ; //read reotation matrixes from AOD/AOD
59 Int_t EvalIsolation(TLorentzVector * ph) ;
60 Bool_t TestLambda(Double_t pt,Double_t l1,Double_t l2) ;
61 Bool_t TestPID(Int_t iPID, AliAODPWG4Particle* part) ;
62 Double_t PrimaryParticleWeight(TParticle * particle) ;
b5f58f9c 63 Int_t FindPrimary(AliVCluster*, Bool_t&);
213dd723 64 void FillHistogram(const char * key,Double_t x) const ; //Fill 1D histogram witn name key
65 void FillHistogram(const char * key,Double_t x, Double_t y) const ; //Fill 2D histogram witn name key
66 void FillHistogram(const char * key,Double_t x, Double_t y, Double_t z) const ; //Fill 3D histogram witn name key
67 void FillPIDHistograms(const char * name, const AliAODPWG4Particle * p) const ;
68 void FillPIDHistograms(const char * name, const AliAODPWG4Particle * p ,Double_t y) const ;
69
70private:
71
72 AliPHOSGeometry *fPHOSgeom; //!PHOS geometry
73 THashList * fOutputContainer ; //! List of output histograms
74 AliStack *fStack ; //!Pointer to MC stack
75 TClonesArray * fTrackEvent ; //!List of tracks in the event
76 TClonesArray * fPHOSEvent ; //!List of tracks in the event
77 TList * fPHOSEvents[1][5] ; //!Previous events for mixing
78 TList * fCurrentMixedList; //! list of previous evetns for given centrality
79 AliTriggerAnalysis * fTriggerAnalysis ; //!
80
81 //Fiducial area parameters
82 Float_t fZmax ; //Rectangular
83 Float_t fZmin ; //area
84 Float_t fPhimax ; //covered by
85 Float_t fPhimin ; //full calorimeter
86
87 //
88 Double_t fCentrality;
89 Int_t fCentBin ;
90
91 // Histograms
92 TH2I * fPHOSBadMap[6] ;
93
94 ClassDef(AliAnalysisTaskTaggedPhotons, 2); // a PHOS photon analysis task
95};
96#endif // ALIANALYSISTASKTAGGEDPHOTONS_H