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