Removing AliITSgeom dependencies from the old ITS clusterer V2 and the corresponding...
[u/mrichter/AliRoot.git] / PWG4 / AliAnaGammaJet.h
CommitLineData
f9cea31c 1#ifndef ALIANAGAMMAJET_H
2#define ALIANAGAMMAJET_H
3/* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
4 * See cxx source for full Copyright notice */
5/* $Id$ */
6
7/* History of cvs commits:
8 *
9 * $Log$
2a1d8a29 10 * Revision 1.1 2007/01/23 17:17:29 schutz
11 * New Gamma package
12 *
f9cea31c 13 *
14 */
15
16//_________________________________________________________________________
17// Class for the analysis of gamma-jet correlations.
18// Basically it seaches for a prompt photon in the Calorimeters acceptance,
19// if so we construct a jet around the highest pt particle in the opposite
20// side in azimuth. This jet has to fullfill several conditions to be
21// accepted. Then the fragmentation function of this jet is constructed
22// Class created from old AliPHOSGammaJet
23
24//*-- Author: Gustavo Conesa (INFN-LNF)
25
26// --- ROOT system ---
27#include <TROOT.h>
28#include <TChain.h>
29#include "TTask.h"
30#include "TArrayD.h"
31#include "TChain.h"
32#include <TH2F.h>
33#include <TTree.h>
34#include "AliAnaGammaDirect.h"
35
36class AliESD ;
37
38class AliAnaGammaJet : public AliAnaGammaDirect {
39
40public:
41
42 AliAnaGammaJet(const char *name) ; // default ctor
43 AliAnaGammaJet(const AliAnaGammaJet & gj) ; // cpy ctor
44 virtual ~AliAnaGammaJet() ; //virtual dtor
45 virtual void Exec(Option_t * opt = "") ;
2a1d8a29 46 virtual void ConnectInputData(Option_t *);
47 virtual void CreateOutputObjects();
f9cea31c 48 virtual void Terminate(Option_t * opt = "");
49
2a1d8a29 50 void InitParameters();
f9cea31c 51 Bool_t AreJetOnlyInCTS() const {return fJetsOnlyInCTS ; }
52 Double_t GetAngleMaxParam(Int_t i) const {return fAngleMaxParam.At(i) ; }
53 Double_t GetEtaEMCALCut() const {return fEtaEMCALCut;}
54 Double_t GetPhiEMCALCut(Int_t i) const {return fPhiEMCALCut[i];}
55 Double_t GetInvMassMaxCut() const {return fInvMassMaxCut ; }
56 Double_t GetInvMassMinCut() const {return fInvMassMinCut ; }
57 Double_t GetPhiMaxCut() const {return fPhiMaxCut ; }
58 Double_t GetPhiMinCut() const {return fPhiMinCut ; }
59 Double_t GetPtJetSelectionCut() const {return fPtJetSelectionCut ; }
60 Double_t GetJetRatioMaxCut() const {return fJetRatioMaxCut ; }
61 Double_t GetJetRatioMinCut() const {return fJetRatioMinCut ; }
62 Double_t GetRatioMaxCut() const {return fRatioMaxCut ; }
63 Double_t GetRatioMinCut() const {return fRatioMinCut ; }
64 Int_t GetNCones() const {return fNCone ; }
65 Int_t GetNPtThres() const {return fNPt ; }
66 Float_t GetCone() const {return fCone ; }
67 Float_t GetPtThreshold() const {return fPtThreshold ; }
68 Float_t GetCones(Int_t i) const {return fCones[i] ; }
69 Float_t GetPtThreshold(Int_t i) const {return fPtThres[i] ; }
70 TString GetConeName(Int_t i) const {return fNameCones[i] ; }
71 TString GetPtThresName(Int_t i) const {return fNamePtThres[i] ; }
72
73 Bool_t AreSeveralConeAndPtCuts() const {return fSeveralConeAndPtCuts ; }
74 Bool_t IsPbPb() const {return fPbPb ; }
75
76
77 void Print(const Option_t * opt)const;
78
79 void SetAngleMaxParam(Int_t i, Double_t par)
80 {fAngleMaxParam.AddAt(par,i) ; }
81 void SetSeveralConeAndPtCuts(Bool_t several){fSeveralConeAndPtCuts = several ;}
82 void SetEtaEMCALCut(Double_t etacut) {fEtaEMCALCut = etacut ; }
83 void SetPhiEMCALCut(Double_t phi, Int_t i){fPhiEMCALCut[i] = phi; }
84 void SetPbPb(Bool_t opt){fPbPb = opt; }
85 void SetNCones(Int_t n){fNCone = n ; }
86 void SetNPtThresholds(Int_t n){fNPt = n ; }
87 void SetCones(Int_t i, Float_t cone, TString sc)
88 {fCones[i] = cone ; fNameCones[i] = sc; };
89 void SetCone(Float_t cone)
90 {fCone = cone; }
91 void SetPtThreshold(Float_t pt){fPtThreshold = pt; };
92 void SetPtThresholds(Int_t i,Float_t pt, TString spt){fPtThres[i] = pt ;
93 fNamePtThres[i] = spt; };
94 void SetInvMassCutRange(Double_t invmassmin, Double_t invmassmax)
95 {fInvMassMaxCut =invmassmax; fInvMassMinCut =invmassmin;}
96 void SetJetRatioCutRange(Double_t ratiomin, Double_t ratiomax)
97 {fJetRatioMaxCut =ratiomax; fJetRatioMinCut = ratiomin ; }
98 void SetJetsOnlyInCTS(Bool_t opt){fJetsOnlyInCTS = opt; }
99 void SetJetCTSRatioCutRange(Double_t ratiomin, Double_t ratiomax)
100 {fJetCTSRatioMaxCut =ratiomax; fJetCTSRatioMinCut = ratiomin ; }
101 void SetPhiCutRange(Double_t phimin, Double_t phimax)
102 {fPhiMaxCut =phimax; fPhiMinCut =phimin;}
103 void SetPtJetSelectionCut(Double_t cut){fPtJetSelectionCut = cut; }
104 void SetJetSelection(UInt_t select){ fSelect= select ; }
105 void SetRatioCutRange(Double_t ratiomin, Double_t ratiomax)
106 {fRatioMaxCut = ratiomax; fRatioMinCut = ratiomin;}
107
108
109 private:
110
111 Double_t CalculateJetRatioLimit(const Double_t ptg, const Double_t *param,
112 const Double_t *x);
113
114 void FillJetHistos(TClonesArray * pl, Double_t ptg, Double_t ptl,TString type, TString lastname);
115
116 Bool_t IsAngleInWindow(const Float_t angle, const Float_t e);
117 Bool_t IsJetSelected(const Double_t ptg, const Double_t ptjet);
118
119 void MakeJet(TClonesArray * particleList, TParticle * pGamma, TParticle* pLeading, TString lastname);
120
121 void GetLeadingCharge(TClonesArray * pl, TParticle *pGamma, TParticle * pLeading) const ;
122 void GetLeadingPi0 (TClonesArray * pl, TParticle *pGamma, TParticle * pLeading) ;
123 Bool_t GetLeadingParticle(TClonesArray * plCTS, TClonesArray * plNe, TParticle *pGamma, TParticle * pLeading) ;
124 void MakeHistos() ;
125
126 void SetJet(TParticle * part, Bool_t & b, Float_t cone, Double_t eta,
127 Double_t phi);
128
129 private:
130
131 // TTree *fChain ; //!pointer to the analyzed TTree or TChain
132 //AliESD *fESD ; //! Declaration of leave types
133
134 Bool_t fSeveralConeAndPtCuts; // To play with the jet cone size and pt th.
135 //Bool_t fPrintInfo ; //Print most interesting information on screen
136 // and give interesting information
137
138 Bool_t fPbPb; // PbPb event
139 Bool_t fJetsOnlyInCTS ; // Jets measured only in TPC+ITS.
140 Double_t fEtaEMCALCut ; // Eta EMCAL acceptance
141 Double_t fPhiEMCALCut[2] ; // Phi cut maximum
142 Double_t fPhiMaxCut ; // Phi EMCAL maximum acceptance
143 Double_t fPhiMinCut ; // Phi EMCAL minimum acceptance
144 // Double_t fGammaPtCut ; // Min pt in Calorimeter
145 Double_t fInvMassMaxCut ; // Invariant Mass cut maximum
146 Double_t fInvMassMinCut ; // Invariant Masscut minimun
147 Double_t fRatioMaxCut ; // Leading particle/gamma Ratio cut maximum
148 Double_t fRatioMinCut ; // Leading particle/gamma Ratio cut minimum
149
150 //Jet selection parameters
151 //Fixed cuts (old)
152 Double_t fJetCTSRatioMaxCut ; // Leading particle/gamma Ratio cut maximum
153 Double_t fJetCTSRatioMinCut ; // Leading particle/gamma Ratio cut minimum
154 Double_t fJetRatioMaxCut ; // Jet/gamma Ratio cut maximum
155 Double_t fJetRatioMinCut ; // Jet/gamma Ratio cut minimum
156
157 //Cuts depending on jet pt
158 Double_t fJetE1[2]; //Rec. jet energy parameters
159 Double_t fJetE2[2]; //Rec. jet energy parameters
160 Double_t fJetSigma1[2];//Rec. sigma of jet energy parameters
161 Double_t fJetSigma2[2];//Rec. sigma of jet energy parameters
162 Double_t fBkgMean[6]; //Background mean energy
163 Double_t fBkgRMS[6]; //Background RMS
164 Double_t fJetXMin1[6]; //X Factor to set jet min limit for pp
165 Double_t fJetXMin2[6]; //X Factor to set jet min limit for PbPb
166 Double_t fJetXMax1[6]; //X Factor to set jet max limit for pp
167 Double_t fJetXMax2[6]; //X Factor to set jet max limit for PbPb
168
169 Int_t fNCone ; // Number of jet cones sizes
170 Int_t fNPt ; // Number of jet particle pT threshold
171 Double_t fCone ; // Jet cone sizes under study (!fSeveralConeAndPtCuts)
172 Double_t fCones[10]; // Jet cone sizes under study (fSeveralConeAndPtCuts)
173 TString fNameCones[10]; // String name of cone to append to histos
174 Double_t fPtThreshold; // Jet pT threshold under study(!fSeveralConeAndPtCuts)
175 Double_t fPtThres[10]; // Jet pT threshold under study(fSeveralConeAndPtCuts)
176 Double_t fPtJetSelectionCut; // Jet pt to change to low pt jets analysis
177 TObjArray *fOutputContainer ; //! output data container
178 TString fNamePtThres[10]; // String name of pt th to append to histos
179 TArrayD fAngleMaxParam ; //Max opening angle selection parameters
180 UInt_t fSelect ; //kTRUE: Selects all jets, no limits.
181 //TString fCalorimeter ; //PHOS or EMCAL detects Gamma
182 //Bool_t fEMCALPID ; //Fill EMCAL particle lists with particles with corresponding pid
183 //Bool_t fPHOSPID; //Fill PHOS particle lists with particles with corresponding pid
184
185 //Histograms
186
187 TH2F * fhChargeRatio ;
188 TH2F * fhPi0Ratio ;
189 TH2F * fhDeltaPhiCharge ;
190 TH2F * fhDeltaPhiPi0 ;
191 TH2F * fhDeltaEtaCharge ;
192 TH2F * fhDeltaEtaPi0 ;
193 TH2F * fhAnglePair ;
194 TH2F * fhAnglePairAccepted ;
195 TH2F * fhAnglePairNoCut ;
196 TH2F * fhAnglePairLeadingCut ;
197 TH2F * fhAnglePairAngleCut ;
198 TH2F * fhAnglePairAllCut ;
199 TH2F * fhAnglePairLeading ;
200 TH2F * fhInvMassPairNoCut ;
201 TH2F * fhInvMassPairLeadingCut ;
202 TH2F * fhInvMassPairAngleCut ;
203 TH2F * fhInvMassPairAllCut ;
204 TH2F * fhInvMassPairLeading ;
205 TH1F * fhNBkg ;
206 TH2F * fhNLeading ;
207 TH1F * fhNJet ;
208 TH2F * fhJetRatio ;
209 TH2F * fhJetPt ;
210 TH2F * fhBkgRatio ;
211 TH2F * fhBkgPt ;
212 TH2F * fhJetFragment ;
213 TH2F * fhBkgFragment ;
214 TH2F * fhJetPtDist ;
215 TH2F * fhBkgPtDist ;
216
217 TH2F * fhJetRatios[5][5];
218 TH2F * fhJetPts[5][5];
219 TH2F * fhBkgRatios[5][5];
220 TH2F * fhBkgPts[5][5];
221
222 TH2F * fhNLeadings[5][5];
223 TH1F * fhNJets[5][5];
224 TH1F * fhNBkgs[5][5];
225
226 TH2F * fhJetFragments[5][5];
227 TH2F * fhBkgFragments[5][5];
228 TH2F * fhJetPtDists[5][5];
229 TH2F * fhBkgPtDists[5][5];
230
231 ClassDef(AliAnaGammaJet,0)
232} ;
233
234
235#endif //ALIANAGAMMAJET_H
236
237
238