New book-keeping class
[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; }
45
623ed0a0 46 // Setters for MC
47 void SetUseMCBranch(){fUseMCParticleBranch = kTRUE;}
48 void SetConstrainDistance(Bool_t val1, Double_t val2){ fMinDistance = val2; fConstrainDistance = val1;}
49 void SetSimulateChJetPt(){fSimulateChJetPt = kTRUE;}
50 void SetUseAODMCParticle(){fUseAliStack = kFALSE;}
6ef5bfa4 51
52 void SetAnaTopology( Int_t val ) { fAnaType = val; }
53 void SetRegionType( Int_t val ) { fRegionType = val; }
54 void SetUseChPartJet( Int_t val ) { fUseChPartJet = val; }
55 void SetPtSumOrdering( Bool_t val ) { fOrdering = val; }
56 void SetFilterBit( UInt_t val ) { fFilterBit = val; }
57 void SetJetsOnFly( Bool_t val ) { fJetsOnFly = val; }
58 void SetConeRadius( Double_t val ) { fConeRadius = val; }
623ed0a0 59 void SetConePosition(Int_t val) { fConePosition= val; }
6ef5bfa4 60 void SetUseSingleCharge() { fUseSingleCharge = kTRUE; }
61 void SetUseNegativeChargeType() { fUsePositiveCharge = kFALSE; }
62 // Jet cuts
623ed0a0 63 void SetPtMinChPartJet( Double_t val ) { fChJetPtMin = val; }
6ef5bfa4 64 void SetJet1EtaCut( Double_t val ) { fJet1EtaCut = val; }
65 void SetJet2DeltaPhiCut( Double_t val ) { fJet2DeltaPhiCut = val; }
66 void SetJet2RatioPtCut( Double_t val ) { fJet2RatioPtCut = val; }
67 void SetJet3PtCut( Double_t val ) { fJet3PtCut = val; }
68 // track cuts
69 void SetTrackPtCut( Double_t val ) { fTrackPtCut = val; }
70 void SetTrackEtaCut( Double_t val ) { fTrackEtaCut = val; }
71
72 private:
73 AliAnalysisTaskUE(const AliAnalysisTaskUE &det);
74 AliAnalysisTaskUE& operator=(const AliAnalysisTaskUE &det);
75
76 void AnalyseUE();
77 Int_t IsTrackInsideRegion(TVector3 *jetVect, TVector3 *partVect);
78 void CreateHistos();
79 void SetRegionArea(TVector3 *jetVect);
80 void FillSumPtRegion( Double_t leadingE, Double_t ptMax, Double_t ptMin );
81 void FillAvePartPtRegion( Double_t leadingE, Double_t ptMax, Double_t ptMin );
82 void FillMultRegion( Double_t leadingE, Double_t nTrackPtmax, Double_t nTrackPtmin, Double_t ptMin );
83 TObjArray* FindChargedParticleJets();
84 void QSortTracks(TObjArray &a, Int_t first, Int_t last);
85 void WriteSettings();
86
7fa8b2da 87 Int_t fTrigger; //Trigger flag as defined in AliAnalysisHelperJetTasks.h
c4396fd4 88 Int_t fDebug; // Debug flag
89 Bool_t fDeltaAOD; // Read jets from delta AOD
90 TString fDeltaAODBranch; // Jet branch name from delta AOD
91 TClonesArray* fArrayJets; // Array of Jets from delta AOD
92
6ef5bfa4 93 AliAODEvent* fAOD; //! AOD Event
94 AliAODEvent* fAODjets; //! AOD Event for reconstructed on the fly (see ConnectInputData()
95 TList* fListOfHistos; // Output list of histograms
96
97 // Config
98 Int_t fBinsPtInHist; // # bins for Pt histos range
99 Double_t fMinJetPtInHist; // min Jet Pt value for histo range
100 Double_t fMaxJetPtInHist; // max Jet Pt value for histo range
101
623ed0a0 102 // For MC
103 Bool_t fUseMCParticleBranch; // Run Over mcparticles branch in AOD
104 Bool_t fConstrainDistance; // Constrain Distance between rec jet and pyth
105 Double_t fMinDistance; // Minimum distance between rec jet and pyth
106 Bool_t fSimulateChJetPt; // Naive simulation of charged jet Pt from original Jet in MC Header
107 Bool_t fUseAliStack; // Use AliSatck for particle info otherwise "mcparticles" branch in AOD
108
6ef5bfa4 109 // Cuts
110 Int_t fAnaType; // Analysis type on jet topology:
111 // 1=inclusive (default)
112 // 2=back to back inclusive
113 // 3=back to back exclusive
114 // 4=gama jet (back to back) ???
115 // Minimum bias
116 // 31 = Semi jet (charged leading particle jets)
117 // 32 = Random jetcone ?
118 // 33 = Swiss chees ?
119
120 // UE analysis is conducted in different type of regions
121 // Transverse are those like defined in: R. Field Acta Physica Polonica B. Vol 36 No. 2 pg 167 (2005)
122 // Cone regions like defined in: Phys. Rev. D 70, 072002 (2004)
123 Int_t fRegionType; // 1 = transverse regions (default)
124 // 2 = cone regions
125 Double_t fConeRadius; // if selected Cone-like region type, set Radius (=0.7 default)
623ed0a0 126 Int_t fConePosition; // This parameter set how will cone center in transversal zone will be set
127 // 1 : To be used in any jet topology (default value)
128 // eta_cone = eta_leadingjet
129 // phi_cone = phi_leadingjet + - 90
130 // 2 : To be used in multiple jet topology (code will cry otherwise)
131 // eta_cone = (eta_leadingjet + eta_subleadingjet)/2
132 // phi_cone = phi_leadingjet + - 90
6ef5bfa4 133 Double_t fAreaReg; // Area of the region To be used as normalization factor when filling histograms
134 // if fRegionType = 2 not always it is included within eta range
135 Bool_t fUseChPartJet; // Use "Charged Particle Jet" instead of jets from AOD
136 // see FindChargedParticleJets()
137
138 // Theoreticians ask for tools charge-aware
139 // especially those which are related to multiplicity and MC-tunings
140 // see arXiv:hep-ph/0507008v3
141 Bool_t fUseSingleCharge; //Make analysis for a single type of charge (=kFALSE default)
142 Bool_t fUsePositiveCharge; //If Single type of charge used then set which one (=kTRUE default positive)
143
144 Int_t fOrdering; // Pt and multiplicity summation ordering:
145 // 1=CDF-like -independent sorting according quantity to be scored: Double sorting- (default)
146 // if Pt summation will be scored take Pt minimum between both zones and
147 // fill Pt Max. and Min. histog. accordingly
148 // if Multiplicity summation will be scored take Mult. minimum between both zones and
149 // fill Mult Max and Min histog. accordingly
150 // Bib:
151 // 2=Marchesini-like (Only Pt sorting: Single sorting)
152 // sort only according Pt summation scored, find minimum between both zones and
153 // fill Pt and Multiplicity Max and Min summation histog. following only this criterium
154 // Bib: Phys. Rev. D 38, 3419 (1988)
155 // 3=User Selection sorting (NOTE: USER must implement it within cxx)
156
157 UInt_t fFilterBit; // Select tracks from an specific track cut (default 0xFF all track selected)
158 Bool_t fJetsOnFly; // if jets are reconstructed on the fly from AOD tracks (see ConnectInputData() )
159
623ed0a0 160 // Jet cuts
161 Double_t fChJetPtMin; // Min Pt for charged Particle Jet
6ef5bfa4 162 Double_t fJet1EtaCut; // |jet1 eta| < fJet1EtaCut (fAnaType = 1,2,3)
163 Double_t fJet2DeltaPhiCut; // |Jet1.Phi - Jet2.Phi| < fJet2DeltaPhiCut (fAnaType = 2,3)
164 Double_t fJet2RatioPtCut; // Jet2.Pt/Jet1Pt > fJet2RatioPtCut (fAnaType = 2,3)
165 Double_t fJet3PtCut; // Jet3.Pt < fJet3PtCut (fAnaType = 3)
166 // track cuts
167 Double_t fTrackPtCut; // Pt cut of tracks in the regions
168 Double_t fTrackEtaCut; // Eta cut on tracks in the regions (fRegionType=1)
519378fb 169 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 170
6ef5bfa4 171 // Histograms ( are owned by fListOfHistos TList )
172 TH1F* fhNJets; //!
173 TH1F* fhEleadingPt; //!
174
175 TH1F* fhMinRegPtDist; //!
176 TH1F* fhRegionMultMin; //!
177 TH1F* fhMinRegAvePt; //!
178 TH1F* fhMinRegSumPt; //!
179 TH1F* fhMinRegMaxPtPart; //!
180 TH1F* fhMinRegSumPtvsMult; //!
181
de6f8090 182 TH1F* fhdNdEtaPhiDist; //!
6ef5bfa4 183 TH2F* fhFullRegPartPtDistVsEt; //!
184 TH2F* fhTransRegPartPtDistVsEt; //!
185
186 TH1F* fhRegionSumPtMaxVsEt; //!
187 TH1I* fhRegionMultMax; //!
188 TH1F* fhRegionMultMaxVsEt; //!
189 TH1F* fhRegionSumPtMinVsEt; //!
190 TH1F* fhRegionMultMinVsEt; //!
191 TH1F* fhRegionAveSumPtVsEt; //!
192 TH1F* fhRegionDiffSumPtVsEt; //!
193
194 TH1F* fhRegionAvePartPtMaxVsEt; //!
195 TH1F* fhRegionAvePartPtMinVsEt; //!
196 TH1F* fhRegionMaxPartPtMaxVsEt; //!
197
623ed0a0 198 // TH2F* fhValidRegion; //! test to be canceled
199
200 TProfile* fh1Xsec; //!
201 TH1F* fh1Trials; //!
202
6ef5bfa4 203 TTree* fSettingsTree; //! Fast Settings saving
204
623ed0a0 205
6ef5bfa4 206
c4396fd4 207 ClassDef( AliAnalysisTaskUE, 3); // Analysis task for Underlying Event analysis
6ef5bfa4 208 };
f3050824 209
f3050824 210#endif
6ef5bfa4 211
212