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