]> git.uio.no Git - u/mrichter/AliRoot.git/blame - PWG4/JetTasks/AliAnalysisTaskCorrectionsUE.h
New analysis devoted to shower shape studies
[u/mrichter/AliRoot.git] / PWG4 / JetTasks / AliAnalysisTaskCorrectionsUE.h
CommitLineData
3a9d4bcf 1#ifndef ALIANALYSISTASKCORRECTIONSUE_H
2#define ALIANALYSISTASKCORRECTIONSUE_H
3
4/* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
5 * See cxx source for full Copyright notice */
6
7////////////////////////////////////////////////////////////////////////
8//
9// Analysis class to Correct Underlying Event studies
10//
11// This class needs as input AOD with track and Jets.
12// The output is a list of histograms
13//
14// AOD can be either connected to the InputEventHandler
15// for a chain of AOD files
16// or
17// to the OutputEventHandler
18// for a chain of ESD files, so this case class should be
19// in the train after the Jet finder
20//
21//
22// vallero@physi.uni-heidelberg.de
23////////////////////////////////////////////////////////////////////////
24
25#include "AliAnalysisTask.h"
26
27class AliAnalyseUE;
28class AliCFManager;
29class AliHistogramsUE;
30class AliInputEventHandler;
31class AliAODEvent;
32class AliESDEvent;
33class AliAODInputHandler;
34class AliESDEventHandler;
35class AliMCEventHandler;
36class AliMCEvent;
37class TH1F;
38class TH2F;
39class TH1I;
40class TProfile;
41class TTree;
42class TVector3;
43
44class AliAnalysisTaskCorrectionsUE : public AliAnalysisTask
45 {
46 public:
47
48 enum {
49 kCFStepTriggered = 0,
50 kCFStepPhysSelect = 1,
51 kCFStepVertexSelect = 2,
52 kCFStepAnaTopology = 3,
53 kCFStepLtPtCut1 = 4,
54 kCFStepLtCorrect = 5
55 };
56
57
58
59 AliAnalysisTaskCorrectionsUE(const char* name="AliAnalysisTaskCorrectionsUE");
60 virtual ~AliAnalysisTaskCorrectionsUE() {if ( fListOfHistos ) delete fListOfHistos; }
61 AliAnalysisTaskCorrectionsUE(const AliAnalysisTaskCorrectionsUE &det);
62 AliAnalysisTaskCorrectionsUE& operator=(const AliAnalysisTaskCorrectionsUE &det);
63
64 // return instance of the singleton
65 static AliAnalysisTaskCorrectionsUE* Instance();
66
67 // Implementation of interace methods
68 virtual Bool_t Notify();
69 virtual void ConnectInputData(Option_t *);
70 virtual void CreateOutputObjects();
71 virtual void Exec(Option_t *option);
72 virtual void Terminate(Option_t *);
73
74 // Setters/Getters
75 virtual void SetDebugLevel( Int_t level ) { fDebug = level; }
76 virtual Int_t GetDebugLevel() const { return fDebug; }
77
78 void SetPtRangeInHist( Int_t bin, Double_t min, Double_t max ) {
79 fBinsPtInHist = bin;
80 fMinJetPtInHist = min;
81 fMaxJetPtInHist = max;
82 }
83
84 // Read AODs
85 void SelectAODBranch(const char* val) { fAODBranch = val; }
86 virtual TString GetAODBranch() const { return fAODBranch; }
87 virtual AliAODEvent* GetAOD() const { return fAOD; }
88
89 // Setters/Getters for MC
90 void SetConstrainDistance(Bool_t val1, Double_t val2){ fMinDistance = val2; fConstrainDistance = val1;}
91 void SetSimulateChJetPt(){fSimulateChJetPt = kTRUE;}
92 void SetUseAODMCParticle(){fUseAliStack = kFALSE;}
93 void SetUseMCBranch(){fUseMCParticleBranch = kTRUE;}
94
95 virtual Bool_t GetConstrainDistance() const {return fConstrainDistance;}
96 virtual Double_t GetMinDistance() const {return fMinDistance;}
97 virtual Bool_t GetSimulateChJetPt() const {return fSimulateChJetPt;}
98 virtual Bool_t GetUseAODMCParticle() const {return fUseAliStack;}
99 virtual Bool_t GetUseMCParticleBranch() const {return fUseMCParticleBranch;}
100
101 //Event QA
102 void SetZVertex( Double_t val ) { fZVertex = val; }
103 void SetTracksInVertex( Int_t val ){ fnTracksVertex = val; }
104 void SetCFManager(AliCFManager* cfm){ fCFManager = cfm; }
105 AliCFManager* GetCFManager() const {return fCFManager;}
106
107 // Setters/Getters for UE Analysis
108 void SetAnaTopology( Int_t val ) { fAnaType = val; }
109 void SetConePosition(Int_t val) { fConePosition= val; }
110 void SetConeRadius( Double_t val ) { fConeRadius = val; }
111 void SetDoNotNormalizeQuantities() { fIsNorm2Area = kFALSE; }
112 void SetFilterBit( UInt_t val ) { fFilterBit = val; }
113 void SetJetsOnFly( Bool_t val ) { fJetsOnFly = val; }
114 void SetPtSumOrdering( Int_t val ) { fOrdering = val; }
115 void SetRegionType( Int_t val ) { fRegionType = val; }
116 void SetUseChargeHadrons( Bool_t val ) { fUseChargeHadrons = val; }
117 void SetUseChPartJet( Int_t val ) { fUseChPartJet = val; }
118 void SetUseNegativeChargeType() { fUsePositiveCharge = kFALSE; }
119 void SetUseSingleCharge() { fUseSingleCharge = kTRUE; }
120
121 virtual Int_t GetAnaTopology() const { return fAnaType; }
122 virtual Int_t GetConePosition() const { return fConePosition; }
123 virtual Double_t GetConeRadius() const { return fConeRadius; }
124 virtual Bool_t GetDoNotNormalizeQuantities() const { return fIsNorm2Area; }
125 virtual UInt_t GetFilterBit() const { return fFilterBit; }
126 virtual Bool_t GetJetsOnFly() const { return fJetsOnFly; }
127 virtual Int_t GetPtSumOrdering() const { return fOrdering; }
128 virtual Int_t GetRegionType() const { return fRegionType; }
129 virtual Bool_t GetUseChargeHadrons() const { return fUseChargeHadrons; }
130 virtual Int_t GetUseChPartJet() const { return fUseChPartJet; }
131 virtual Bool_t GetUseNegativeChargeType() const { return fUsePositiveCharge; }
132 virtual Bool_t GetUseSingleCharge() const { return fUseSingleCharge; }
133
134 // Jet cuts
135 void SetJet1EtaCut( Double_t val ) { fJet1EtaCut = val; }
136 void SetJet2DeltaPhiCut( Double_t val ) { fJet2DeltaPhiCut = val; }
137 void SetJet2RatioPtCut( Double_t val ) { fJet2RatioPtCut = val; }
138 void SetJet3PtCut( Double_t val ) { fJet3PtCut = val; }
139 void SetPtMinChPartJet( Double_t val ) { fChJetPtMin = val; }
140
141 virtual Double_t GetJet1EtaCut() const { return fJet1EtaCut; }
142 virtual Double_t GetJet2DeltaPhiCut() const { return fJet2DeltaPhiCut; }
143 virtual Double_t GetJet2RatioPtCut() const { return fJet2RatioPtCut; }
144 virtual Double_t GetJet3PtCut() const { return fJet3PtCut; }
145 virtual Double_t GetPtMinChPartJet() const { return fChJetPtMin; }
146
147 // track cuts
148 void SetTrackEtaCut( Double_t val ) { fTrackEtaCut = val; }
149 void SetTrackPtCut( Double_t val ) { fTrackPtCut = val; }
150
151 virtual Double_t GetTrackEtaCut() const { return fTrackEtaCut; }
152 virtual Double_t GetTrackPtCut() const { return fTrackPtCut; }
153
154
155 protected:
156 static AliAnalysisTaskCorrectionsUE* fgTaskCorrectionsUE; // Pointer to single instance
157 private:
158 void AddSettingsTree();
159 Bool_t EvaluateCorrections();
160 void FillAvePartPtRegion( Double_t leadingE, Double_t ptMax, Double_t ptMin );
161 void FillMultRegion( Double_t leadingE, Double_t nTrackPtmax, Double_t nTrackPtmin, Double_t ptMin );
162 void FillSumPtRegion( Double_t leadingE, Double_t ptMax, Double_t ptMin );
163 TObjArray* FindChargedParticleJets();
164 Int_t IsTrackInsideRegion(TVector3 *jetVect, TVector3 *partVect);
165 void WriteSettings();
166
167 AliAnalyseUE* fAnaUE; //! points to AliAnalyseUE class
168 AliAODEvent* fAOD; //! AOD Event
169 AliESDEventHandler* fESDHandler; //! ESD Event
170 TString fAODBranch; // Jet branch name from standard AOD
171 AliCFManager* fCFManager; // pointer to CORRECTION FRAMEWORK manager
172 Int_t fDebug; // Debug flag
173 AliHistogramsUE* fHistosUE; // Points to UE histograms class
174 AliInputEventHandler* fInputHandler; // Input event handler
175 TList* fListOfHistos; // Output list of histograms
176 AliMCEventHandler* fMcHandler; // pointer to MC handler
177 AliMCEvent* fMcEvent; // pointer to MC event
178
179 // Config
180 Int_t fBinsPtInHist; // # bins for Pt histos range
181 Bool_t fIsNorm2Area; // Apply Area Normalization to collected observables
182 Double_t fMaxJetPtInHist; // max Jet Pt value for histo range
183 Double_t fMinJetPtInHist; // min Jet Pt value for histo range
184
185 // For MC
186 Bool_t fConstrainDistance; // Constrain Distance between rec jet and pyth
187 Double_t fMinDistance; // Minimum distance between rec jet and pyth
188 Bool_t fSimulateChJetPt; // Naive simulation of charged jet Pt from original Jet in MC Header
189 Bool_t fUseAliStack; // Use AliSatck for particle info otherwise "mcparticles" branch in AOD
190 Bool_t fUseMCParticleBranch; // Run Over mcparticles branch in AOD
191
192 // Cuts Events type
193 Int_t fnTracksVertex; // QA tracks pointing to principal vertex (= 3 default)
194 Double_t fZVertex; // Position of Vertex in Z direction
195
196 // Cuts UE analysis
197 Int_t fAnaType; // Analysis type on jet topology:
198 // 1=inclusive (default)
199 // 2=back to back inclusive
200 // 3=back to back exclusive
201 // 4=Pt max (max Pt track in region)
202 // 5=gama jet (back to back) ???
203 // Minimum bias
204 // 31 = Semi jet (charged leading particle jets)
205 // 32 = Random jetcone ?
206 // 33 = Swiss chees ?
207
208
209 Int_t fConePosition; // This parameter set how will cone center in transversal zone will be set
210 // 1 : To be used in any jet topology (default value)
211 // eta_cone = eta_leadingjet
212 // phi_cone = phi_leadingjet + - 90
213 // 2 : To be used in multiple jet topology (code will cry otherwise)
214 // eta_cone = (eta_leadingjet + eta_subleadingjet)/2
215 // phi_cone = phi_leadingjet + - 90
216
217 Double_t fConeRadius; // if selected Cone-like region type, set Radius (=0.7 default)
218
219 UInt_t fFilterBit; // Select tracks from an specific track cut (default 0xFF all track selected)
220
221 Bool_t fJetsOnFly; // if jets are reconstructed on the fly from AOD tracks (see ConnectInputData() )
222
223 // UE analysis is conducted in different type of regions
224 // Transverse are those like defined in: R. Field Acta Physica Polonica B. Vol 36 No. 2 pg 167 (2005)
225 // Cone regions like defined in: Phys. Rev. D 70, 072002 (2004)
226 Int_t fRegionType; // 1 = transverse regions (default)
227 // 2 = cone regions
228
229
230
231 Bool_t fUseChargeHadrons; // Only use charge hadrons
232 Bool_t fUseChPartJet; // Use "Charged Particle Jet" instead of jets from AOD see FindChargedParticleJets()
233
234 // Theoreticians ask for tools charge-aware
235 // especially those which are related to multiplicity and MC-tunings
236 // see arXiv:hep-ph/0507008v3
237 Bool_t fUsePositiveCharge; //If Single type of charge used then set which one (=kTRUE default positive)
238 Bool_t fUseSingleCharge; //Make analysis for a single type of charge (=kFALSE default)
239
240 Int_t fOrdering; // Pt and multiplicity summation ordering:
241 // 1=CDF-like -independent sorting according quantity to be scored: Double sorting- (default)
242 // if Pt summation will be scored take Pt minimum between both zones and
243 // fill Pt Max. and Min. histog. accordingly
244 // if Multiplicity summation will be scored take Mult. minimum between both zones and
245 // fill Mult Max and Min histog. accordingly
246 // Bib:
247 // 2=Marchesini-like (Only Pt sorting: Single sorting)
248 // sort only according Pt summation scored, find minimum between both zones and
249 // fill Pt and Multiplicity Max and Min summation histog. following only this criterium
250 // Bib: Phys. Rev. D 38, 3419 (1988)
251 // 3=Nameless pt per track single sorting
252 // sort according to pt per track scored in each transverse zone
253 // lowest values indicates minimum zone.
254 // 4=User Selection sorting (NOTE: USER must implement it within cxx)
255
256
257 // Jet cuts
258 Double_t fChJetPtMin; // Min Pt for charged Particle Jet
259 Double_t fJet1EtaCut; // |jet1 eta| < fJet1EtaCut (fAnaType = 1,2,3)
260 Double_t fJet2DeltaPhiCut; // |Jet1.Phi - Jet2.Phi| < fJet2DeltaPhiCut (fAnaType = 2,3)
261 Double_t fJet2RatioPtCut; // Jet2.Pt/Jet1Pt > fJet2RatioPtCut (fAnaType = 2,3)
262 Double_t fJet3PtCut; // Jet3.Pt < fJet3PtCut (fAnaType = 3)
263
264 // track cuts
265 Double_t fTrackEtaCut; // Eta cut on tracks in the regions (fRegionType=1)
266 Double_t fTrackPtCut; // Pt cut of tracks in the regions
267
268 // MC cross-section
269 Double_t fAvgTrials; // average trials used to fill the fh1Trials histogram in case we do not have trials on a event by event basis
270 //TProfile* fh1Xsec; //!
271 //TH1F* fh1Trials; //!
272
273
274 ClassDef( AliAnalysisTaskCorrectionsUE, 5); // Analysis task for Underlying Event analysis
275 };
276
277#endif
278
279