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