]>
Commit | Line | Data |
---|---|---|
bcf7a476 | 1 | #ifndef ALIANALYSISTASKJETHBOM_H |
2 | #define ALIANALYSISTASKJETHBOM_H | |
3 | ||
4 | /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. * | |
5 | * See cxx source for full Copyright notice */ | |
6 | ||
7 | // ************************************** | |
8 | // Task used for the correction of detector effects for background fluctuations in jet spectra by the HBOM method | |
9 | // ******************************************* | |
10 | ||
11 | #include "AliAnalysisTaskSE.h" | |
12 | #include "THnSparse.h" // cannot forward declare ThnSparseF | |
13 | #include "fastjet/ClusterSequenceArea.hh" | |
14 | #include "fastjet/AreaDefinition.hh" | |
15 | #include "fastjet/JetDefinition.hh" | |
16 | #include "fastjet/PseudoJet.hh" | |
792cf46b | 17 | #include "TH1F.h" |
18 | #include "TH2D.h" | |
bcf7a476 | 19 | |
20 | ||
21 | //////////////// | |
22 | class AliJetHeader; | |
23 | class AliESDEvent; | |
24 | class AliAODEvent; | |
25 | class AliAODExtension; | |
26 | class AliAODJet; | |
27 | class AliGenPythiaEventHeader; | |
28 | class AliCFManager; | |
29 | class AliAODJetEventBackground; | |
30 | class AliJetFinder; | |
31 | class TList; | |
32 | class TChain; | |
bcf7a476 | 33 | class TH3F; |
34 | class TProfile; | |
35 | class TRandom3; | |
36 | class TRefArray; | |
37 | class TClonesArray; | |
38 | class TF1; | |
39 | ||
40 | class AliAnalysisTaskJetHBOM : public AliAnalysisTaskSE | |
41 | { | |
42 | public: | |
43 | AliAnalysisTaskJetHBOM(); | |
44 | AliAnalysisTaskJetHBOM(const char* name); | |
45 | virtual ~AliAnalysisTaskJetHBOM(); | |
46 | // Implementation of interface methods | |
47 | virtual void UserCreateOutputObjects(); | |
48 | virtual void Init(); | |
49 | virtual void LocalInit() { Init(); } | |
50 | virtual void UserExec(Option_t *option); | |
51 | virtual void Terminate(Option_t *option); | |
52 | virtual Bool_t Notify(); | |
53 | ||
54 | ||
55 | ||
56 | virtual void SetAODTrackInput(Bool_t b){fUseAODTrackInput = b;} | |
57 | virtual void SetAODMCInput(Bool_t b){fUseAODMCInput = b;} | |
58 | virtual void SetEventSelection(Bool_t b){fEventSelection = b;} | |
59 | virtual void SetTrackEtaWindow(Float_t f){fTrackEtaWindow = f;} | |
60 | virtual void SetTrackTypeGen(Int_t i){fTrackTypeGen = i;} | |
61 | virtual void SetTrackTypeRec(Int_t i){fTrackTypeRec = i;} | |
62 | virtual void SetTrackPtCut(Float_t x){fTrackPtCut = x;} | |
63 | virtual void SetCentralityCut(Float_t xLo,Float_t xUp){fCentCutLo = xLo; fCentCutUp = xUp;} | |
64 | virtual void SetFilterMask(UInt_t i,Int_t iType = 0){fFilterMask = i; | |
65 | fFilterType = iType;} | |
66 | virtual void SetJetTypes(UInt_t i){fJetTypes = i;} | |
67 | virtual void SetVtxCuts(Float_t z,Float_t r = 1){fVtxZCut = z; fVtxR2Cut = r *r;} | |
68 | virtual void SetBackgroundBranch(const char* c){fBackgroundBranch = c;} | |
69 | virtual const char* GetBackgroundBranch(){return fBackgroundBranch.Data();} | |
70 | virtual void SetNSkipLeadingRan(Int_t x){fNSkipLeadingRan = x;} | |
71 | virtual void SetNSkipLeadingCone(Int_t x){fNSkipLeadingCone = x;} | |
72 | virtual void SetNRandomCones(Int_t x){fNRandomCones = x;} | |
cfcde656 | 73 | virtual void SetRandConePos(Double_t eta, Double_t phi){randCone_pos=1;randCone_Eta=eta;randCone_Phi=phi;} |
bcf7a476 | 74 | |
75 | virtual void SetfNHBOM(Int_t x){fNHBOM = x;}; | |
792cf46b | 76 | virtual void SetEfficiencyPt(TH1F *h){fh1efficiencyPt = (TH1F*)h->Clone("h1efficiencyPt");} |
77 | virtual void SetEfficiencyPhi(TH2D *h){fh2efficiencyPhi = (TH2D*)h->Clone("h2efficiencyPhi");} | |
bcf7a476 | 78 | |
79 | virtual void SetJetOutputBranch(const char *c){fNonStdBranch = c;} | |
80 | virtual const char* GetJetOutputBranch(){return fNonStdBranch.Data();} | |
81 | virtual void SetJetOutputFile(const char *c){fNonStdFile = c;} | |
82 | virtual const char* GetJetOutputFile(){return fNonStdFile.Data();} | |
83 | virtual void SetMaxTrackPtInJet(Float_t x){fMaxTrackPtInJet = x;} | |
84 | virtual void SetJetOutputMinPt(Float_t x){fJetOutputMinPt = x;} | |
85 | ||
86 | //Setters for detector level effects | |
87 | virtual void SetSmearResolution(Bool_t b){fUseTrMomentumSmearing = b;} | |
88 | virtual void SetDiceEfficiency(Bool_t b){fUseDiceEfficiency = b;} | |
89 | virtual void SetMomentumResolutionHybrid(TProfile *p1, TProfile *p2, TProfile *p3); | |
90 | virtual void SetEfficiencyHybrid(TH1 *h1, TH1 *h2, TH1 *h3); | |
91 | ||
92 | Double_t GetMomentumSmearing(Int_t cat, Double_t pt); | |
93 | void FitMomentumResolution(); | |
94 | ||
95 | ||
96 | // for Fast Jet | |
97 | fastjet::JetAlgorithm GetAlgorithm() const {return fAlgorithm;} | |
98 | fastjet::Strategy GetStrategy() const {return fStrategy;} | |
99 | fastjet::RecombinationScheme GetRecombScheme() const {return fRecombScheme;} | |
100 | fastjet::AreaType GetAreaType() const {return fAreaType;} | |
101 | // Setters | |
102 | void SetRparam(Double_t f) {fRparam = f;} | |
103 | void SetAlgorithm(fastjet::JetAlgorithm f) {fAlgorithm = f;} | |
104 | void SetStrategy(fastjet::Strategy f) {fStrategy = f;} | |
105 | void SetRecombScheme(fastjet::RecombinationScheme f) {fRecombScheme = f;} | |
106 | void SetAreaType(fastjet::AreaType f) {fAreaType = f;} | |
107 | void SetGhostArea(Double_t f) {fGhostArea = f;} | |
108 | void SetActiveAreaRepeats(Int_t f) {fActiveAreaRepeats = f;} | |
109 | void SetGhostEtamax(Double_t f) {fGhostEtamax = f;} | |
110 | ||
111 | ||
112 | ||
113 | // Helper | |
114 | // | |
115 | ||
116 | // we have different cases | |
117 | // AOD reading -> MC from AOD | |
118 | // ESD reading -> MC from Kinematics | |
119 | // this has to match with our selection of input events | |
120 | enum {kTrackUndef = 0, kTrackAOD, kTrackKineAll,kTrackKineCharged, kTrackAODMCAll, kTrackAODMCCharged, kTrackAODMCChargedAcceptance, kTrackAODextra, kTrackAODextraonly}; | |
121 | enum {kMaxJets = 4}; | |
122 | enum {kMaxCorrelation = 3}; | |
123 | enum {kMaxRadius = 5}; | |
124 | enum {kMaxCent = 4}; | |
125 | enum {kJet = 1<<0, | |
126 | kJetRan = 1<<1, | |
127 | kRC = 1<<2, | |
128 | kRCRan = 1<<3 | |
129 | }; | |
130 | ||
131 | ||
132 | private: | |
133 | ||
134 | AliAnalysisTaskJetHBOM(const AliAnalysisTaskJetHBOM&); | |
135 | AliAnalysisTaskJetHBOM& operator=(const AliAnalysisTaskJetHBOM&); | |
136 | ||
137 | Int_t GetListOfTracks(TList *list,Int_t type); | |
138 | ||
139 | AliAODEvent *fAOD; // ! where we take the jets from can be input or output AOD | |
140 | AliAODExtension *fAODExtension; // ! AOD extension in case we write a non-sdt branch to a separate file and the aod is standard | |
141 | TRefArray *fRef; // ! trefarray for track references within the jet | |
142 | Bool_t fUseAODTrackInput; // take track from input AOD not from ouptu AOD | |
143 | Bool_t fUseAODMCInput; // take MC from input AOD not from ouptu AOD | |
144 | Bool_t fEventSelection; // use the event selection of this task, otherwise analyse all | |
145 | UInt_t fFilterMask; // filter bit for slecected tracks | |
146 | UInt_t fFilterMaskBestPt; // filter bit to mark jets with high quality leading tracks | |
147 | ||
148 | UInt_t fFilterType; // filter type 0 = all, 1 = ITSTPC, 2 = TPC | |
149 | UInt_t fJetTypes; // 1<<0 regular jets, 1<<1 << randomized event 1<<2 random cones 1<<3 random cones randomiuzed event | |
150 | Int_t fTrackTypeRec; // type of tracks used for FF | |
151 | Int_t fTrackTypeGen; // type of tracks used for FF | |
152 | Int_t fNSkipLeadingRan; // number of leading tracks to be skipped in the randomized event | |
153 | Int_t fNSkipLeadingCone; // number of leading jets to be for the random cones | |
154 | Int_t fNRandomCones; // number of generated random cones | |
cfcde656 | 155 | Bool_t randCone_pos; // use fixed position for random cones |
156 | Double_t randCone_Eta; // eta for random Cone at fixed position | |
157 | Double_t randCone_Phi; // phi for random Cone at fixed position | |
bcf7a476 | 158 | Int_t fNHBOM; // number of detector runs |
159 | Float_t fTrackEtaWindow; // eta window used for corraltion plots between rec and gen | |
160 | // Float_t fRecEtaWindow; // eta window used for corraltion plots between rec and gen | |
161 | Float_t fTrackPtCut; // minimum track pt to be accepted | |
162 | Float_t fJetOutputMinPt; // minimum p_t for jets to be written out | |
163 | Float_t fMaxTrackPtInJet; // maximum track pt within a jet for flagging... | |
164 | // Float_t fJetTriggerPtCut; // minimum jwt pT for AOD to be written | |
165 | Float_t fVtxZCut; // zvtx cut | |
166 | Float_t fVtxR2Cut; // R vtx cut (squared) | |
167 | Float_t fCentCutUp; // upper limit on centrality | |
168 | Float_t fCentCutLo; // lower limit on centrality | |
169 | // output configurartion | |
170 | TString fNonStdBranch; // the name of the non-std branch name, if empty no branch is filled | |
171 | TString fBackgroundBranch; // name of the branch used for background subtraction | |
172 | TString fNonStdFile; // The optional name of the output file the non-std branch is written to | |
173 | ||
174 | //Detector level effects | |
175 | TProfile *fMomResH1; // Momentum resolution from TrackQA Hybrid Category 1 | |
176 | TProfile *fMomResH2; // Momentum resolution from TrackQA Hybrid Category 2 | |
177 | TProfile *fMomResH3; // Momentum resolution from TrackQA Hybrid Category 3 | |
178 | TF1 *fMomResH1Fit; //fit | |
179 | TF1 *fMomResH2Fit; //fit | |
180 | TF1 *fMomResH3Fit; //fit | |
181 | ||
182 | TH1 *fhEffH1; // Efficiency for Spectra Hybrid Category 1 | |
183 | TH1 *fhEffH2; // Efficiency for Spectra Hybrid Category 2 | |
184 | TH1 *fhEffH3; // Efficiency for Spectra Hybrid Category 3 | |
185 | Bool_t fUseTrMomentumSmearing; // Apply momentum smearing on track level | |
186 | Bool_t fUseDiceEfficiency; // Apply efficiency on track level by dicing | |
187 | ||
188 | // Fast jet | |
189 | Double_t fRparam; // fastjet distance parameter | |
190 | fastjet::JetAlgorithm fAlgorithm; //fastjet::kt_algorithm | |
191 | fastjet::Strategy fStrategy; //= fastjet::Best; | |
192 | fastjet::RecombinationScheme fRecombScheme; // = fastjet::BIpt_scheme; | |
193 | fastjet::AreaType fAreaType; // fastjet area type | |
194 | Double_t fGhostArea; // fasjet ghost area | |
195 | Int_t fActiveAreaRepeats; // fast jet active area repeats | |
196 | Double_t fGhostEtamax; // fast jet ghost area | |
197 | ||
198 | Double_t background; //background rho in the event | |
199 | ||
200 | TClonesArray *fTCARandomConesOut; //! TCA of output jets in randomized event | |
54ec7947 | 201 | TClonesArray *fTCARandomConesOutRan; //! TCA of output jets in randomized event |
bcf7a476 | 202 | |
203 | TRandom3* fRandom; //! random number generator | |
204 | TProfile* fh1Xsec; //! pythia cross section and trials | |
205 | TH1F* fh1Trials; //! trials are added | |
206 | TH1F* fh1PtHard; //! Pt har of the event... | |
207 | TH1F* fh1PtHardNoW; //! Pt har of the event without weigt | |
208 | TH1F* fh1PtHardTrials; //! Number of trials | |
209 | ||
210 | TH1F* fh1Nch; //! charged particle mult | |
211 | TH1F* fh1CentralityPhySel; // ! centrality of anaylsed events | |
212 | TH1F* fh1Centrality; // ! centrality of selected events | |
213 | TH1F* fh1DeltapT; // pT of random Cone - background energy | |
214 | TH1F* fh1Rho; //background rho | |
215 | TH1F* fh1PtRandCone; //pT of random Cone | |
54ec7947 | 216 | TH1F* fh1Area; //area of random jet |
bcf7a476 | 217 | |
218 | TH1F* fh1efficiencyPt; //here efficiency is stored | |
219 | TH2D* fh2efficiencyPhi; //here efficiency is stored | |
220 | ||
221 | TH1F* fh1ZPhySel; // ! zvtx of anaylsed events | |
222 | TH1F* fh1Z; // ! zvtx of selected events | |
223 | ||
224 | ||
225 | TList *fHistList; //!leading tracks to be skipped in the randomized event Output list | |
226 | ||
227 | ||
228 | ClassDef(AliAnalysisTaskJetHBOM, 1) | |
229 | }; | |
230 | ||
231 | #endif |