]> git.uio.no Git - u/mrichter/AliRoot.git/blob - PWGGA/EMCALTasks/AliAnalysisTaskEMCALPhotonIsolation.h
changes from Alexis
[u/mrichter/AliRoot.git] / PWGGA / EMCALTasks / AliAnalysisTaskEMCALPhotonIsolation.h
1 #ifndef ALIANALYSISTASKEMCALPHOTONISOLATION_H
2 #define ALIANALYSISTASKEMCALPHOTONISOLATION_H
3 /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
4  * See cxx source for full Copyright notice                               */
5
6     //////////////////////////////////////////////////////////////////////////
7     //                                                                      //
8     //  Task for Isolated Gamma in p-p,p-Pb and eventually g-h Correlation  //
9     //                                                                      //
10     //  Author: Davide Francesco Lodato (Utrecht University)                //
11     //          Lucile Ronflette (Subatech, Nantes)                         //
12     //          Marco Marquard   (University Frankfurt am Main)             //
13     //////////////////////////////////////////////////////////////////////////
14
15     //ROOT System
16
17 class TH1;
18 class TH2;
19 class TH3;
20 class THnSparse;
21 class TList;
22 class TObjArray;
23 class AliEMCALGeometry;
24 class AliESDCaloCells;
25 class AliESDEvent;
26 class AliESDtrack;
27 class TClonesArray;
28 class TList;
29 class TString;
30 class AliVCluster;
31 class AliVParticle;
32 class AliESDtrackCuts;
33 class AliAODEvent;
34 class AliAODCaloCells;
35 class AliVCluster;
36 class AliMCEvent;
37 class AliStack;
38 class TParticle;
39 class AliClusterContainer;
40 class AliParticleContainer;
41 class AliEmcalParticle;
42     //AliRoot System
43 class AliEMCALTrack;
44     //class AliMagF;
45 class AliEMCALRecoUtils;
46     //class AliAnalysisFilter;
47 class AliAODTrack;
48 class AliAODCaloCluster;
49 class AliESDCaloCluster;
50 class AliVCaloCells;
51     //class AliEventPoolManager;
52
53 #include "AliAnalysisTaskEmcal.h"
54
55 class AliAnalysisTaskEMCALPhotonIsolation : public AliAnalysisTaskEmcal {
56 public:
57     AliAnalysisTaskEMCALPhotonIsolation();
58     AliAnalysisTaskEMCALPhotonIsolation(const char *name, Bool_t histo=kFALSE);
59     virtual ~AliAnalysisTaskEMCALPhotonIsolation();
60     
61     void                     UserCreateOutputObjects();
62                     
63     void                     SetIsoConeRadius(Float_t r)                                     { fIsoConeRadius = r ;}
64     void                     SetCTMdeltaEta (Float_t r)                                      { fdetacut = r ;}
65     void                     SetCTMdeltaPhi (Float_t r)                                      { fdphicut = r ;}
66     void                     SetIsoMethod (Int_t r )                                         { fIsoMethod = r ;}
67     void                     SetUEMethod (Int_t UE)                                          { fUEMethod = UE;}
68     void                     SetOutputFormat (Int_t iOut)                                    { fWho = iOut;}
69     void                     SetQA (Bool_t QA)                                               { fQA = QA;}
70     void                     SetMC (Bool_t MC)                                               { fIsMC = MC;}
71     void                     SetUSEofTPC (Bool_t TPC)                                        { fTPC4Iso = TPC;}
72     void                     SetLCAnalysis (Bool_t LC)                                       { fisLCAnalysis = LC;}
73
74 protected:
75     
76     void                     EtIsoCellPhiBand(TLorentzVector c, Float_t &etIso, Float_t &phiBand);    //EIsoCone via Cells UE via PhiBand EMCAL
77     void                     EtIsoCellEtaBand(TLorentzVector c, Float_t &etIso, Float_t &etaBand);    //EIsoCone via Cells UE via EtaBand EMCAL
78     void                     EtIsoClusPhiBand(TLorentzVector c, Float_t &etIso, Float_t &etaBand, Int_t index);    //EIsoCone via Clusters UE via EtaBand EMCAL
79     void                     EtIsoClusEtaBand(TLorentzVector c, Float_t &etIso, Float_t &etaBand, Int_t index);    //EIsoCone via Clusters UE via EtaBand EMCAL
80     void                     PtIsoTrackPhiBand(TLorentzVector c, Float_t &ptIso, Float_t &phiBand);   //PIsoCone via Track UE via PhiBand TPC
81     void                     PtIsoTrackEtaBand(TLorentzVector c, Float_t &ptIso, Float_t &etaBand);   //PIsoCone via Track UE via EtaBand TPC
82   //  void                     PtIsoTraClusPhiBand(TLorentzVector c, Float_t &ptIso, Float_t &phiBand); //(P+E)IsoCone via Track/Clus UE via PhiBand TPC+EMCAL
83   //  void                     PtIsoTraClusEtaBand(TLorentzVector c, Float_t &ptIso, Float_t &etaBand); //(P+E)IsoCone via Track/Clus UE via EtaBand TPC+EMCAL
84     void                     PtIsoTrackOrthCones(TLorentzVector c, Float_t &ptIso, Float_t &cones);   //PIsoCone via Tracks UE via Orthogonal Cones in Phi
85     void                     PtIsoTrackFullTPC(TLorentzVector c, Float_t &ptIso, Float_t &full);      //PIsoCone via Tracks UE via FullTPC - IsoCone - B2BEtaBand
86     Bool_t                   ClustTrackMatching(AliVCluster *cluster);
87     Bool_t                   CheckBoundaries(TLorentzVector vecCOI);
88    // void                     FillNCOutput(AliVCluster *COI, TLorentzVector vecCOI, Int_t index);
89     
90     Float_t*                 GenerateFixedBinArray(Int_t n, Float_t min, Float_t max) const;
91     void                     ExecOnce();   
92     Bool_t                   Run();
93      
94     using AliAnalysisTaskEmcal::FillGeneralHistograms;
95     Bool_t FillGeneralHistograms(AliVCluster *COI, TLorentzVector VecCOI, Int_t index);
96     //Bool_t                   FillGeneralHistograms(AliVCluster *COI, TLorentzVector VecCOI, Int_t index);
97     
98   
99   //    TObjArray                   fParticleCollArray;              // Neutral Clusters collection array
100     TClonesArray               *fNCluster;                       // Neutral clusters
101     
102     Int_t       fWho;           // MODE for the Output Object (TTree or THnSparse)
103   
104   
105                 //IMPLEMENT ALL THE HISTOGRAMS AND ALL THE OUTPUT OBJECTS WE WANT!!!
106    //    TList       *fOutputList; //! Output list
107 //    TGeoHMatrix *fGeomMatrix[12];//! Geometry misalignment matrices for EMCal
108     
109     
110     TH1        *fTrackMult;                      //!Track Multiplicity ---QA
111     TH1        *fTrackMultEMCAL;                 //!Track Multiplicity EMCAL ---QA
112     TH1        *fClustMult;                      //!Cluster Multiplicity EMCAL ---QA
113     TH1        *fPVZBefore;                      //!Z Vertex distribution before cuts. ---QA
114     TH2        *fEtaPhiCell;                     //!EMCAL Active Cells Distribution EtaPhi ---QA
115     TH2        *fEtaPhiClus;                     //!EMCAL Cluster Distribution EtaPhi ---QA
116     TH2        *fClusEvsClusT;                   //!Cluster Energy vs Cluster Time ---QA
117     TH1        *fGoodEventsOnPVZ;                //!Number of selected events After the Cut on Primary Vertex
118     TH1        *fPT;                             //!Pt distribution
119     TH2        *fM02;                            //!Squared_Lambda0 distribution
120     TH1        *fNLM;                            //!NLM distribution
121     TH2        *fDeltaETAClusTrackVSpT;          //!dEta Cluster-Track VS pT!
122     TH2        *fDeltaPHIClusTrackVSpT;          //!dPhi Cluster-Track VS pT!
123     TH1        *fEtIsoCells;                     //!Isolation Energy with EMCAL Cells
124     TH1        *fEtIsoClust;                     //!Isolation Energy with EMCAL Clusters
125     TH1        *fPtIsoTrack;                     //!Isolation Pt with Tracks
126     TH1        *fPtEtIsoTC;                      //!Isolation with Pt from Tracks and Et from NON-Matched Clusters
127     TH2        *fPhiBandUEClust;                 //!UE with Phi Band (Clusters)
128     TH2        *fEtaBandUEClust;                 //!UE with Eta Band (Clusters)
129     TH2        *fPhiBandUECells;                 //!UE with Phi Band (Cells)
130     TH2        *fEtaBandUECells;                 //!UE with Eta Band (Cells)
131     TH2        *fPhiBandUETracks;                //!UE with Phi Band (Tracks)
132     TH2        *fEtaBandUETracks;                //!UE with Eta Band (Tracks)
133     TH2        *fPerpConesUETracks;              //!UE with Cones (Tracks ONLY)
134     TH2        *fTPCWithoutIsoConeB2BbandUE;     //!UE with Full TPC except IsoCone and EtaBand in Back2Back
135     TH1        *fNTotClus10GeV;                  //!number of TOTAL clusters with Energy bigger than 10 GeV 
136     TH1        *fRecoPV;                         //! primary vertex reconstruction
137     TH1        *fEtIsolatedCells;                //! Isolated photons, isolation with cells
138     TH1        *fEtIsolatedClust;                //! Isolated photons, isolation with clusters
139     TH1        *fEtIsolatedTracks;                //! Isolated photons, isolation with tracks
140     TH1        *fTest;                                                   //! Test
141     
142     THnSparse   *fOutputTHnS;                    //! 1st Method 4 Output
143     THnSparse   *fOutPTMAX;                      //! 1st Method 4 Isolation on pTMax
144     
145     TTree       *fOutputTree;                    //! 2nd Method 4 Output
146     
147     Float_t     fIsoConeRadius;                  // Radius for the Isolation Cont
148     Int_t       fEtIsoMethod;                    // Isolation definition 0=SumEt<EtThr, 1=SumEt<%Ephoton, 2=Etmax<EtThr
149     Double_t    fEtIsoThreshold;                 // Et isolation threshold, supposed to be % if method one is choosed
150     Double_t    fdetacut;                        // cut on deta between track and cluster
151     Double_t    fdphicut;                        // cut on dphi between track and cluster
152     Double_t    fM02mincut;                      // lambda0^2 minimum cut
153     Double_t    fM02maxcut;                      // lambda0^2 maximum cut
154     Bool_t      fQA;                             // Flag for few further QA plots wrt the ones already done in the EMCALTask
155     Bool_t      fIsMC;                           // Flag for MC Truth Analysis
156     Bool_t      fTPC4Iso;                        //0=EMCAL_ONLY; 1=EMCAL+TPC
157     Int_t       fIsoMethod;                      //0=Cells, 1=Clusters (EMCAL_ONLY),  2=Tracks (EMCAL w/o TPC)
158     Int_t       fUEMethod;                       //0=PhiBand, 1=EtaBand, (EMCAL or TPC) 2= Ort Cones, 3=FullTPC (only with TPC)
159     Double_t    *fVertex;                        //!event vertex
160     Int_t       fNDimensions;                    //!number of Dimensions for the THnSPARSE
161     Bool_t      fisLCAnalysis;                   // Flag to pass from Leading Clusters Analysis to a NC One
162
163 // Initialization for TTree variables
164     Int_t       fevents;                         // N events
165     Double_t    flambda0T;                       // M02
166     Double_t    fEtT;                            // Et
167     Double_t    fPtT;                            // Pt
168     Double_t    fEtisoT;                         // Iso Et
169     Double_t    fPtisoT;                         // Iso Pt
170     Double_t    fetaT;                           // Eta
171     Double_t    fphiT;                           // Phi
172     Double_t    fsumEtisoconeT;                  // Iso sum cone
173     Double_t    fsumEtUE;                        // sum UE
174   
175     //  AliParticleContainer       *fTracksCont;     //!Tracks
176     //  AliParticleContainer       *fclusters;                       //!Container for Particle container 4 clusters
177
178 private:
179    AliAnalysisTaskEMCALPhotonIsolation(const AliAnalysisTaskEMCALPhotonIsolation&);            // not implemented
180    AliAnalysisTaskEMCALPhotonIsolation &operator=(const AliAnalysisTaskEMCALPhotonIsolation&); // not implemented
181     
182   
183     ClassDef(AliAnalysisTaskEMCALPhotonIsolation, 1)    //EMCAL Neutrals base analysis task
184 };
185 #endif