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 ////////////////////////////////////////////////////////////////////////
9 // Analysis class for Underlying Event studies
11 // Look for correlations on the tranverse regions to
12 // the leading charged jet
14 // This class needs as input AOD with track and Jets.
15 // The output is a list of histograms
17 // AOD can be either connected to the InputEventHandler
18 // for a chain of AOD files
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
24 // Arian.Abrahantes.Quintana@cern.ch
25 // Ernesto.Lopez.Torres@cern.ch
27 ////////////////////////////////////////////////////////////////////////
29 #include "AliAnalysisTask.h"
33 //class AliAODHandler;
34 class AliAODInputHandler;
45 class AliAnalysisTaskUE : public AliAnalysisTask
48 AliAnalysisTaskUE(const char* name="AliAnalysisTaskUE");
49 virtual ~AliAnalysisTaskUE() {if ( fListOfHistos ) delete fListOfHistos; }
50 AliAnalysisTaskUE(const AliAnalysisTaskUE &det);
51 AliAnalysisTaskUE& operator=(const AliAnalysisTaskUE &det);
53 // return instance of the singleton
54 static AliAnalysisTaskUE* Instance();
56 // Implementation of interace methods
57 virtual Bool_t Notify();
58 virtual void ConnectInputData(Option_t *);
59 virtual void CreateOutputObjects();
60 virtual void Exec(Option_t *option);
61 virtual void Terminate(Option_t *);
64 virtual void SetDebugLevel( Int_t level ) { fDebug = level; }
65 virtual const Int_t GetDebugLevel() { return fDebug; }
67 void SetPtRangeInHist( Int_t bin, Double_t min, Double_t max ) {
69 fMinJetPtInHist = min;
70 fMaxJetPtInHist = max;
74 void SelectAODBranch(const char* val) { fAODBranch = val; }
75 virtual const TString GetAODBranch() { return fAODBranch; }
76 virtual const AliAODEvent* GetAOD() { return fAOD; }
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;}
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;}
90 //Setters for Events QA
91 void SetZVertex( Double_t val ) { fZVertex = val; }
92 void SetTracksInVertex( Int_t val ){ fnTracksVertex = val; }
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; }
105 void SetUseNegativeChargeType() { fUsePositiveCharge = kFALSE; }
106 void SetUseSingleCharge() { fUseSingleCharge = kTRUE; }
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; }
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; }
126 void SetPtMinChPartJet( Double_t val ) { fChJetPtMin = val; }
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; }
135 void SetTrackEtaCut( Double_t val ) { fTrackEtaCut = val; }
136 void SetTrackPtCut( Double_t val ) { fTrackPtCut = val; }
138 virtual const Double_t GetTrackEtaCut() { return fTrackEtaCut; }
139 virtual const Double_t GetTrackPtCut() { return fTrackPtCut; }
142 static AliAnalysisTaskUE* fgTaskUE; // Pointer to single instance
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();
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
162 TList* fListOfHistos; // Output list of histograms
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
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
178 Int_t fnTracksVertex; // QA tracks pointing to principal vertex (= 3 default)
179 Double_t fZVertex; // Position of Vertex in Z direction
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) ???
189 // 31 = Semi jet (charged leading particle jets)
190 // 32 = Random jetcone ?
191 // 33 = Swiss chees ?
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
202 Double_t fConeRadius; // if selected Cone-like region type, set Radius (=0.7 default)
204 UInt_t fFilterBit; // Select tracks from an specific track cut (default 0xFF all track selected)
206 Bool_t fJetsOnFly; // if jets are reconstructed on the fly from AOD tracks (see ConnectInputData() )
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)
211 Int_t fRegionType; // 1 = transverse regions (default)
216 Bool_t fUseChargeHadrons; // Only use charge hadrons
217 Bool_t fUseChPartJet; // Use "Charged Particle Jet" instead of jets from AOD see FindChargedParticleJets()
219 // Theoreticians ask for tools charge-aware
220 // especially those which are related to multiplicity and MC-tunings
221 // see arXiv:hep-ph/0507008v3
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)
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
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)
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)
250 Double_t fTrackEtaCut; // Eta cut on tracks in the regions (fRegionType=1)
251 Double_t fTrackPtCut; // Pt cut of tracks in the regions
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; //!
258 ClassDef( AliAnalysisTaskUE, 5); // Analysis task for Underlying Event analysis