]> git.uio.no Git - u/mrichter/AliRoot.git/blame - PWG4/JetTasks/AliAnalysisTaskUE.h
1- Transverse quantities as a function of pt of highest track in the event instead...
[u/mrichter/AliRoot.git] / PWG4 / JetTasks / AliAnalysisTaskUE.h
CommitLineData
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
c4396fd4 7#include "AliAnalysisTask.h"
f3050824 8
9class AliESDEvent;
10class AliAODEvent;
11class TH1F;
12class TH2F;
13class TH1I;
623ed0a0 14class TProfile;
f3050824 15class TVector3;
6ef5bfa4 16class TTree;
f3050824 17
6ef5bfa4 18class AliAnalysisTaskUE : public AliAnalysisTask
19 {
20 public:
21 AliAnalysisTaskUE(const char* name="AliAnalysisTaskUE");
22 virtual ~AliAnalysisTaskUE() {;}
23
1e996f55 24 // Implementation of interace methods
623ed0a0 25 virtual Bool_t Notify();
6ef5bfa4 26 virtual void ConnectInputData(Option_t *);
27 virtual void CreateOutputObjects();
28 virtual void Exec(Option_t *option);
29 virtual void Terminate(Option_t *);
7fa8b2da 30
31 //Select the trigger
32 void SelectTrigger(Int_t trig) { fTrigger = trig; }
33
6ef5bfa4 34 // Setters
35 virtual void SetDebugLevel( Int_t level ) { fDebug = level; }
36 void SetPtRangeInHist( Int_t bin, Double_t min, Double_t max ) {
37 fBinsPtInHist = bin;
38 fMinJetPtInHist = min;
39 fMaxJetPtInHist = max;
40 }
c4396fd4 41
42 // Read deltaAODs
43 void ReadDeltaAOD() { fDeltaAOD = kTRUE; }
44 void SelectDeltaAODBranch(const char* val) { fDeltaAODBranch = val; }
e1060f2b 45 void SelectAODBranch(const char* val) { fAODBranch = val; }
c4396fd4 46
623ed0a0 47 // Setters for MC
48 void SetUseMCBranch(){fUseMCParticleBranch = kTRUE;}
49 void SetConstrainDistance(Bool_t val1, Double_t val2){ fMinDistance = val2; fConstrainDistance = val1;}
50 void SetSimulateChJetPt(){fSimulateChJetPt = kTRUE;}
51 void SetUseAODMCParticle(){fUseAliStack = kFALSE;}
6ef5bfa4 52
53 void SetAnaTopology( Int_t val ) { fAnaType = val; }
54 void SetRegionType( Int_t val ) { fRegionType = val; }
55 void SetUseChPartJet( Int_t val ) { fUseChPartJet = val; }
9d9a3c85 56 void SetUseChargeHadrons( Bool_t val ){ fUseChargeHadrons = val; }
e1060f2b 57 void SetPtSumOrdering( Int_t val ) { fOrdering = val; }
6ef5bfa4 58 void SetFilterBit( UInt_t val ) { fFilterBit = val; }
59 void SetJetsOnFly( Bool_t val ) { fJetsOnFly = val; }
60 void SetConeRadius( Double_t val ) { fConeRadius = val; }
623ed0a0 61 void SetConePosition(Int_t val) { fConePosition= val; }
6ef5bfa4 62 void SetUseSingleCharge() { fUseSingleCharge = kTRUE; }
63 void SetUseNegativeChargeType() { fUsePositiveCharge = kFALSE; }
baf36668 64 void SetDoNotNormalizeQuantities() { fIsNorm2Area = kFALSE; }
6ef5bfa4 65 // Jet cuts
623ed0a0 66 void SetPtMinChPartJet( Double_t val ) { fChJetPtMin = val; }
6ef5bfa4 67 void SetJet1EtaCut( Double_t val ) { fJet1EtaCut = val; }
68 void SetJet2DeltaPhiCut( Double_t val ) { fJet2DeltaPhiCut = val; }
69 void SetJet2RatioPtCut( Double_t val ) { fJet2RatioPtCut = val; }
70 void SetJet3PtCut( Double_t val ) { fJet3PtCut = val; }
71 // track cuts
72 void SetTrackPtCut( Double_t val ) { fTrackPtCut = val; }
73 void SetTrackEtaCut( Double_t val ) { fTrackEtaCut = val; }
74
75 private:
76 AliAnalysisTaskUE(const AliAnalysisTaskUE &det);
77 AliAnalysisTaskUE& operator=(const AliAnalysisTaskUE &det);
6ef5bfa4 78 void AnalyseUE();
79 Int_t IsTrackInsideRegion(TVector3 *jetVect, TVector3 *partVect);
80 void CreateHistos();
81 void SetRegionArea(TVector3 *jetVect);
82 void FillSumPtRegion( Double_t leadingE, Double_t ptMax, Double_t ptMin );
83 void FillAvePartPtRegion( Double_t leadingE, Double_t ptMax, Double_t ptMin );
84 void FillMultRegion( Double_t leadingE, Double_t nTrackPtmax, Double_t nTrackPtmin, Double_t ptMin );
85 TObjArray* FindChargedParticleJets();
02480db2 86 TObjArray* SortChargedParticles();
6ef5bfa4 87 void QSortTracks(TObjArray &a, Int_t first, Int_t last);
88 void WriteSettings();
89
7fa8b2da 90 Int_t fTrigger; //Trigger flag as defined in AliAnalysisHelperJetTasks.h
c4396fd4 91 Int_t fDebug; // Debug flag
92 Bool_t fDeltaAOD; // Read jets from delta AOD
93 TString fDeltaAODBranch; // Jet branch name from delta AOD
e1060f2b 94 TString fAODBranch; // Jet branch name from standard AOD
c4396fd4 95 TClonesArray* fArrayJets; // Array of Jets from delta AOD
96
6ef5bfa4 97 AliAODEvent* fAOD; //! AOD Event
98 AliAODEvent* fAODjets; //! AOD Event for reconstructed on the fly (see ConnectInputData()
99 TList* fListOfHistos; // Output list of histograms
100
101 // Config
102 Int_t fBinsPtInHist; // # bins for Pt histos range
103 Double_t fMinJetPtInHist; // min Jet Pt value for histo range
104 Double_t fMaxJetPtInHist; // max Jet Pt value for histo range
baf36668 105 Bool_t fIsNorm2Area; // Apply Area Normalization to collected observables
6ef5bfa4 106
623ed0a0 107 // For MC
108 Bool_t fUseMCParticleBranch; // Run Over mcparticles branch in AOD
109 Bool_t fConstrainDistance; // Constrain Distance between rec jet and pyth
110 Double_t fMinDistance; // Minimum distance between rec jet and pyth
111 Bool_t fSimulateChJetPt; // Naive simulation of charged jet Pt from original Jet in MC Header
112 Bool_t fUseAliStack; // Use AliSatck for particle info otherwise "mcparticles" branch in AOD
113
6ef5bfa4 114 // Cuts
115 Int_t fAnaType; // Analysis type on jet topology:
116 // 1=inclusive (default)
117 // 2=back to back inclusive
118 // 3=back to back exclusive
02480db2 119 // 4=Pt max (max Pt track in region)
120 // 5=gama jet (back to back) ???
6ef5bfa4 121 // Minimum bias
122 // 31 = Semi jet (charged leading particle jets)
123 // 32 = Random jetcone ?
124 // 33 = Swiss chees ?
125
126 // UE analysis is conducted in different type of regions
127 // Transverse are those like defined in: R. Field Acta Physica Polonica B. Vol 36 No. 2 pg 167 (2005)
128 // Cone regions like defined in: Phys. Rev. D 70, 072002 (2004)
129 Int_t fRegionType; // 1 = transverse regions (default)
02480db2 130 // 2 = cone regions
6ef5bfa4 131 Double_t fConeRadius; // if selected Cone-like region type, set Radius (=0.7 default)
623ed0a0 132 Int_t fConePosition; // This parameter set how will cone center in transversal zone will be set
02480db2 133 // 1 : To be used in any jet topology (default value)
134 // eta_cone = eta_leadingjet
135 // phi_cone = phi_leadingjet + - 90
136 // 2 : To be used in multiple jet topology (code will cry otherwise)
137 // eta_cone = (eta_leadingjet + eta_subleadingjet)/2
138 // phi_cone = phi_leadingjet + - 90
6ef5bfa4 139 Double_t fAreaReg; // Area of the region To be used as normalization factor when filling histograms
02480db2 140 // if fRegionType = 2 not always it is included within eta range
141 Bool_t fUseChPartJet; // Use "Charged Particle Jet" instead of jets from AOD see FindChargedParticleJets()
142 Bool_t fUseChPartMaxPt; // Use "Charged Particle with max Pt" instead of any jets to define forward region
143
144 Bool_t fUseChargeHadrons; // Only use charge hadrons
6ef5bfa4 145
146 // Theoreticians ask for tools charge-aware
147 // especially those which are related to multiplicity and MC-tunings
148 // see arXiv:hep-ph/0507008v3
149 Bool_t fUseSingleCharge; //Make analysis for a single type of charge (=kFALSE default)
150 Bool_t fUsePositiveCharge; //If Single type of charge used then set which one (=kTRUE default positive)
6ef5bfa4 151 Int_t fOrdering; // Pt and multiplicity summation ordering:
152 // 1=CDF-like -independent sorting according quantity to be scored: Double sorting- (default)
153 // if Pt summation will be scored take Pt minimum between both zones and
154 // fill Pt Max. and Min. histog. accordingly
155 // if Multiplicity summation will be scored take Mult. minimum between both zones and
156 // fill Mult Max and Min histog. accordingly
157 // Bib:
158 // 2=Marchesini-like (Only Pt sorting: Single sorting)
159 // sort only according Pt summation scored, find minimum between both zones and
160 // fill Pt and Multiplicity Max and Min summation histog. following only this criterium
161 // Bib: Phys. Rev. D 38, 3419 (1988)
02480db2 162 // 3=Nameless pt per track single sorting
163 // sort according to pt per track scored in each transverse zone
164 // lowest values indicates minimum zone.
165 // 4=User Selection sorting (NOTE: USER must implement it within cxx)
6ef5bfa4 166
167 UInt_t fFilterBit; // Select tracks from an specific track cut (default 0xFF all track selected)
168 Bool_t fJetsOnFly; // if jets are reconstructed on the fly from AOD tracks (see ConnectInputData() )
169
623ed0a0 170 // Jet cuts
171 Double_t fChJetPtMin; // Min Pt for charged Particle Jet
6ef5bfa4 172 Double_t fJet1EtaCut; // |jet1 eta| < fJet1EtaCut (fAnaType = 1,2,3)
173 Double_t fJet2DeltaPhiCut; // |Jet1.Phi - Jet2.Phi| < fJet2DeltaPhiCut (fAnaType = 2,3)
174 Double_t fJet2RatioPtCut; // Jet2.Pt/Jet1Pt > fJet2RatioPtCut (fAnaType = 2,3)
175 Double_t fJet3PtCut; // Jet3.Pt < fJet3PtCut (fAnaType = 3)
176 // track cuts
177 Double_t fTrackPtCut; // Pt cut of tracks in the regions
178 Double_t fTrackEtaCut; // Eta cut on tracks in the regions (fRegionType=1)
519378fb 179 Double_t fAvgTrials; // average trials used to fill the fh1Triasl histogram in case we do not have trials on a event by event basis
c4396fd4 180
6ef5bfa4 181 // Histograms ( are owned by fListOfHistos TList )
182 TH1F* fhNJets; //!
183 TH1F* fhEleadingPt; //!
184
185 TH1F* fhMinRegPtDist; //!
186 TH1F* fhRegionMultMin; //!
187 TH1F* fhMinRegAvePt; //!
188 TH1F* fhMinRegSumPt; //!
189 TH1F* fhMinRegMaxPtPart; //!
190 TH1F* fhMinRegSumPtvsMult; //!
191
9d9a3c85 192 TH2F* fhdNdEtaPhiDist; //!
6ef5bfa4 193 TH2F* fhFullRegPartPtDistVsEt; //!
194 TH2F* fhTransRegPartPtDistVsEt; //!
195
196 TH1F* fhRegionSumPtMaxVsEt; //!
197 TH1I* fhRegionMultMax; //!
198 TH1F* fhRegionMultMaxVsEt; //!
199 TH1F* fhRegionSumPtMinVsEt; //!
200 TH1F* fhRegionMultMinVsEt; //!
201 TH1F* fhRegionAveSumPtVsEt; //!
202 TH1F* fhRegionDiffSumPtVsEt; //!
203
204 TH1F* fhRegionAvePartPtMaxVsEt; //!
205 TH1F* fhRegionAvePartPtMinVsEt; //!
206 TH1F* fhRegionMaxPartPtMaxVsEt; //!
207
baf36668 208 TH1F* fhRegForwardSumPtVsEt; //!
209 TH1F* fhRegForwardMultVsEt; //!
210 TH1F* fhRegBackwardSumPtVsEt; //!
211 TH1F* fhRegBackwardMultVsEt; //!
212 TH2F* fhRegForwardMult; //!
213 TH2F* fhRegForwardSumPtvsMult; //!
214 TH2F* fhRegBackwardMult; //!
215 TH2F* fhRegBackwardSumPtvsMult; //!
216 TH2F* fhRegForwardPartPtDistVsEt; //!
217 TH2F* fhRegBackwardPartPtDistVsEt; //!
218 TH2F* fhRegTransMult; //!
219 TH2F* fhRegTransSumPtVsMult; //!
5713f021 220 TH2F* fhMinRegSumPtJetPtBin; //!,
221 TH2F* fhMaxRegSumPtJetPtBin; //!
baf36668 222
623ed0a0 223 // TH2F* fhValidRegion; //! test to be canceled
224
225 TProfile* fh1Xsec; //!
226 TH1F* fh1Trials; //!
227
6ef5bfa4 228 TTree* fSettingsTree; //! Fast Settings saving
02480db2 229
9d9a3c85 230 ClassDef( AliAnalysisTaskUE, 4); // Analysis task for Underlying Event analysis
6ef5bfa4 231 };
f3050824 232
f3050824 233#endif
6ef5bfa4 234
235