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