]>
Commit | Line | Data |
---|---|---|
b99018c6 | 1 | |
3b7ffecf | 2 | #ifndef ALIANALYSISTASKJETSPECTRUM2_H |
3 | #define ALIANALYSISTASKJETSPECTRUM2_H | |
4 | ||
5 | /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. * | |
6 | * See cxx source for full Copyright notice */ | |
7 | ||
8 | // ************************************** | |
9 | // Task used for the correction of determiantion of reconstructed jet spectra | |
10 | // Compares input (gen) and output (rec) jets | |
11 | // ******************************************* | |
12 | ||
13 | #include "AliAnalysisTaskSE.h" | |
14 | #include "THnSparse.h" // cannot forward declare ThnSparseF | |
15 | ||
16 | //////////////// | |
17 | class AliJetHeader; | |
18 | class AliESDEvent; | |
19 | class AliAODEvent; | |
a31b8a87 | 20 | class AliAODExtension; |
3b7ffecf | 21 | class AliAODJet; |
d7117cbd | 22 | class AliVParticle; |
c2785065 | 23 | class AliAODJetEventBackground; |
3b7ffecf | 24 | class AliGenPythiaEventHeader; |
25 | class AliCFManager; | |
b99018c6 | 26 | class AliTHn; |
3b7ffecf | 27 | |
28 | class TList; | |
29 | class TChain; | |
c2785065 | 30 | class TH1F; |
3b7ffecf | 31 | class TH2F; |
32 | class TH3F; | |
742ee86c | 33 | class TRandom3; |
3b7ffecf | 34 | class TProfile; |
b1cd90b5 | 35 | class TSTring; |
3b7ffecf | 36 | |
37 | ||
38 | class AliAnalysisTaskJetSpectrum2 : public AliAnalysisTaskSE | |
39 | { | |
40 | public: | |
41 | AliAnalysisTaskJetSpectrum2(); | |
42 | AliAnalysisTaskJetSpectrum2(const char* name); | |
43 | virtual ~AliAnalysisTaskJetSpectrum2() {;} | |
44 | // Implementation of interface methods | |
45 | virtual void UserCreateOutputObjects(); | |
46 | virtual void Init(); | |
47 | virtual void LocalInit() { Init(); } | |
48 | virtual void UserExec(Option_t *option); | |
49 | virtual void Terminate(Option_t *option); | |
50 | virtual Bool_t Notify(); | |
51 | ||
b5cc0c6d | 52 | virtual void SetUseGlobalSelection(Bool_t b){fUseGlobalSelection = b;} |
f4132e7d | 53 | virtual void SetEventClass(Int_t i){fEventClass = i;} |
3b7ffecf | 54 | virtual void SetExternalWeight(Float_t f){fExternalWeight = f;} |
55 | virtual void SetUseExternalWeightOnly(Bool_t b){fUseExternalWeightOnly = b;} | |
565584e8 | 56 | virtual void SetAODJetInput(Bool_t b){fUseAODJetInput = b;} |
57 | virtual void SetAODTrackInput(Bool_t b){fUseAODTrackInput = b;} | |
58 | virtual void SetAODMCInput(Bool_t b){fUseAODMCInput = b;} | |
3b7ffecf | 59 | virtual void SetLimitGenJetEta(Bool_t b){fLimitGenJetEta = b;} |
a31b8a87 | 60 | virtual void SetJetEtaWindow(Float_t f){fJetRecEtaWindow = f;} |
61 | virtual void SetTrackEtaWindow(Float_t f){fTrackRecEtaWindow = f;} | |
62 | virtual void SetNMatchJets(Short_t f){fNMatchJets = f;} | |
9280dfa6 | 63 | virtual void SetMinJetPt(Float_t f){fMinJetPt = f;} |
7b822bc5 | 64 | virtual void SetNRPBins(Short_t i){fNRPBins = i;} |
742ee86c | 65 | virtual void SetFlagJetType(Int_t iType,Int_t iF){fFlagJetType[iType] = iF;} |
a31b8a87 | 66 | virtual void SetMinTrackPt(Float_t f){fMinTrackPt = f;} |
9280dfa6 | 67 | virtual void SetDeltaPhiWindow(Float_t f){fDeltaPhiWindow = f;} |
3b7ffecf | 68 | virtual void SetAnalysisType(Int_t i){fAnalysisType = i;} |
69 | virtual void SetBranchGen(const char* c){fBranchGen = c;} | |
70 | virtual void SetBranchRec(const char* c){fBranchRec = c;} | |
37eb26ea | 71 | virtual void SetBranchBkgRec(const char* c){fBranchBkgRec = c;} |
72 | virtual void SetBranchBkgGen(const char* c){fBranchBkgGen = c;} | |
3b7ffecf | 73 | virtual void SetTrackTypeGen(Int_t i){fTrackTypeGen = i;} |
74 | virtual void SetTrackTypeRec(Int_t i){fTrackTypeRec = i;} | |
75 | virtual void SetFilterMask(UInt_t i){fFilterMask = i;} | |
f2dd0695 | 76 | virtual void SetEventSelectionMask(UInt_t i){fEventSelectionMask = i;} |
c08c3ad2 | 77 | virtual void SetPhiWeights(TH3F *phiw){fh3PhiWeights = phiw;} |
c17f867b | 78 | virtual void SetFlatteningCoeff(Float_t *fA,Float_t *fB){ |
79 | fFlatA[0] = fA[0];fFlatA[1] = fA[1]; | |
80 | fFlatA[0] = fB[0];fFlatB[1] = fB[1]; | |
81 | } | |
82 | virtual void SetDeltaQxy(Float_t *fD){ | |
83 | fDeltaQxy[0] = fD[0]; | |
84 | fDeltaQxy[1] = fD[1]; | |
85 | } | |
a31b8a87 | 86 | virtual void SetNonStdFile(char* c){fNonStdFile = c;} |
3b7ffecf | 87 | |
88 | ||
89 | // Helper | |
90 | // | |
91 | ||
92 | // we have different cases | |
93 | // AOD reading -> MC from AOD | |
94 | // ESD reading -> MC from Kinematics | |
95 | // this has to match with our selection of input events | |
565584e8 | 96 | enum {kTrackUndef = 0, kTrackAOD, kTrackKineAll,kTrackKineCharged, kTrackAODMCAll, kTrackAODMCCharged, kTrackAODMCChargedAcceptance}; |
3b7ffecf | 97 | enum {kAnaMC = 0x1, kAnaMCESD = 0x2}; |
3170a3f8 | 98 | enum {kMaxJets = 2}; |
a2522483 | 99 | enum {kJetRec = 0, kJetGen, kJetRecFull, kJetGenFull, kJetTypes}; // |
3b7ffecf | 100 | enum {kMaxCorrelation = 3}; |
101 | ||
102 | // | |
103 | // 0 all jets | |
104 | // 1 all jet in eta window | |
105 | // 2 all jets with partner | |
106 | // 3 all jets in eta window with partner | |
107 | // 4 all jets with partner in eta window | |
108 | enum {kStep0 = 0, kStep1, kStep2, kStep3, kStep4,kMaxStep}; | |
109 | ||
110 | ||
111 | private: | |
112 | ||
113 | AliAnalysisTaskJetSpectrum2(const AliAnalysisTaskJetSpectrum2&); | |
114 | AliAnalysisTaskJetSpectrum2& operator=(const AliAnalysisTaskJetSpectrum2&); | |
115 | ||
a31b8a87 | 116 | void MakeJetContainer(); |
117 | Int_t GetListOfTracks(TList *list,Int_t type); | |
118 | void FillTrackHistos(TList &particlesList,int iType); | |
742ee86c | 119 | Float_t GetCentrality(); |
120 | Bool_t CalculateReactionPlaneAngle(const TList *trackList); | |
121 | Int_t GetPhiBin(Double_t phi); | |
c08c3ad2 | 122 | Double_t GetPhiWeight(Double_t phi,Double_t signedpt); |
a31b8a87 | 123 | Int_t GetListOfJets(TList *list,TClonesArray* jarray,Int_t type); |
124 | void FillJetHistos(TList &jetsList,TList &particlesList,Int_t iType); | |
125 | ||
126 | void FillMatchHistos(TList &recJetsList,TList &genJetsList); | |
127 | ||
128 | Bool_t JetSelected(AliAODJet *jet); | |
37eb26ea | 129 | Int_t MultFromJetRefs(TClonesArray *jets); |
d7117cbd | 130 | AliVParticle *LeadingTrackFromJetRefs(AliAODJet* jet); |
131 | AliVParticle *LeadingTrackInCone(AliAODJet* jet,TList *list,Float_t r = 0.4); | |
132 | ||
37eb26ea | 133 | |
3493c3a9 | 134 | AliJetHeader *fJetHeaderRec;//! The jet header that can be fetched from the userinfo |
135 | AliJetHeader *fJetHeaderGen;//! The jet header that can fetched from the userinfo | |
a31b8a87 | 136 | AliAODEvent *fAODIn; //! where we take the jets from |
137 | AliAODEvent *fAODOut; //! where we take the jets from | |
138 | AliAODExtension *fAODExtension; //! where we take the jets from can be input or output AOD | |
b99018c6 | 139 | AliTHn *fhnJetContainer; //! like particle container in corrfw with different steps need AliCFContainer with Scale(), and clone() to do the same |
140 | AliTHn *fhnCorrelation; //! response matrix for unfolding | |
141 | THnSparseF *fhnEvent; //! event counts | |
142 | TF1 *f1PtScale; //! correction function to correct to the average true jet energy depending on p_T,rec | |
3b7ffecf | 143 | |
144 | TString fBranchRec; // AOD branch name for reconstructed | |
145 | TString fBranchGen; // AOD brnach for genereated | |
37eb26ea | 146 | TString fBranchBkgRec; //AOD branch for background |
147 | TString fBranchBkgGen; //AOD branch for background | |
a31b8a87 | 148 | TString fNonStdFile; // name of delta aod file to catch the extension |
3b7ffecf | 149 | |
742ee86c | 150 | TRandom3* fRandomizer; //! randomizer |
151 | ||
565584e8 | 152 | Bool_t fUseAODJetInput; // take jet from input AOD not from ouptu AOD |
153 | Bool_t fUseAODTrackInput; // take track from input AOD not from ouptu AOD | |
154 | Bool_t fUseAODMCInput; // take MC from input AOD not from ouptu AOD | |
b5cc0c6d | 155 | Bool_t fUseGlobalSelection; // Limit the eta of the generated jets |
3b7ffecf | 156 | Bool_t fUseExternalWeightOnly; // use only external weight |
157 | Bool_t fLimitGenJetEta; // Limit the eta of the generated jets | |
b99018c6 | 158 | Bool_t fDoMatching; // switch on the matching between rec and gen |
a31b8a87 | 159 | Short_t fNMatchJets; // number of leading jets considered from the list |
7b822bc5 | 160 | Short_t fNRPBins; // number of bins with respect to RP |
f2dd0695 | 161 | UInt_t fFilterMask; // filter bit for slecected tracks |
162 | UInt_t fEventSelectionMask; // Selection information used to filter events | |
3b7ffecf | 163 | Int_t fAnalysisType; // Analysis type |
164 | Int_t fTrackTypeRec; // type of tracks used for FF | |
165 | Int_t fTrackTypeGen; // type of tracks used for FF | |
742ee86c | 166 | Int_t fFlagJetType[kJetTypes]; // disable the filling and booking of certain JetType histos |
f4132e7d | 167 | Int_t fEventClass; // event class to be looked at for this instance of the task |
742ee86c | 168 | Int_t fRPSubeventMethod; // method for subevent calculation |
3b7ffecf | 169 | Float_t fAvgTrials; // Average nimber of trials |
170 | Float_t fExternalWeight; // external weight | |
a31b8a87 | 171 | Float_t fJetRecEtaWindow; // eta window for rec jets |
172 | Float_t fTrackRecEtaWindow; // eta window for rec tracks | |
9280dfa6 | 173 | Float_t fMinJetPt; // limits the jet p_T in addition to what already is done in the jet finder, this is important for jet matching for JF with lo threshold |
a31b8a87 | 174 | Float_t fMinTrackPt; // limits the track p_T |
26fa06fb | 175 | Float_t fDeltaPhiWindow; // minium angle between dijets |
742ee86c | 176 | Float_t fCentrality; // ! centrality |
177 | Float_t fRPAngle; // ! RP angle of the reaction plane | |
c17f867b | 178 | Float_t fFlatA[2]; // flattening for RP |
179 | Float_t fFlatB[2]; // flattening for RP | |
180 | Float_t fDeltaQxy[2]; // centering of QX QY | |
37eb26ea | 181 | Int_t fMultRec; // ! reconstructed track multiplicity |
182 | Int_t fMultGen; // ! generated track multiplicity | |
7b822bc5 | 183 | |
3b7ffecf | 184 | |
3493c3a9 | 185 | TProfile* fh1Xsec; //! pythia cross section and trials |
186 | TH1F* fh1Trials; //! trials are added | |
187 | TH1F* fh1PtHard; //! Pt har of the event... | |
188 | TH1F* fh1PtHardNoW; //! Pt har of the event without weigt | |
189 | TH1F* fh1PtHardTrials; //! Number of trials | |
57ca1193 | 190 | TH1F* fh1ZVtx; //! z-vtx distribution |
7b822bc5 | 191 | TH1F* fh1RP; //! RP distribution |
742ee86c | 192 | TH1F* fh1Centrality; //! centrality distribution |
37eb26ea | 193 | TH1F* fh1TmpRho; //! just temporary histo for calculation |
194 | TH2F* fh2MultRec; //! reconstructed track multiplicity | |
195 | TH2F* fh2MultGen; //! generated track multiplicity | |
742ee86c | 196 | TH2F* fh2RPSubevents; //! subevent RP |
197 | TH2F* fh2RPCentrality; //! RP vs centrality | |
198 | TH2F* fh2RPDeltaRP; //! centrality vs. RP dela | |
199 | TH2F* fh2RPQxQy; //! QX QY moments | |
200 | TH2F* fh2RPCosDeltaRP; //! RP resolution | |
37eb26ea | 201 | |
a31b8a87 | 202 | TH2F* fh2PtFGen; //! found vs generated |
3493c3a9 | 203 | TH2F* fh2RelPtFGen; //! relative difference between generated and found |
742ee86c | 204 | |
c08c3ad2 | 205 | TH3F* fh3PhiWeights; // RP phi weights, need to be set externally |
742ee86c | 206 | TH3F* fh3RPPhiTracks; //! RP angle |
37eb26ea | 207 | |
9a83d4af | 208 | |
a31b8a87 | 209 | // Jet histos second go |
210 | ||
211 | TH1F* fh1NJets[kJetTypes]; //! nr of gen jets | |
212 | TH1F* fh1SumPtTrack[kJetTypes]; //! sum over all track pT | |
213 | ||
37eb26ea | 214 | TH1F* fh1PtIn[kJetTypes][kMaxJets+1]; //! Jet pt |
3170a3f8 | 215 | TH1F* fh1PtJetsIn[kJetTypes]; //! Jet pt for all jets |
216 | TH1F* fh1PtTracksIn[kJetTypes]; //! track pt for all tracks | |
cb883243 | 217 | TH1F* fh1PtTracksInLow[kJetTypes]; //! track pt for all tracks |
a31b8a87 | 218 | |
219 | TH2F* fh2NJetsPt[kJetTypes]; //! Number of found jets above threshold | |
a2522483 | 220 | TH2F* fh2NTracksPt[kJetTypes]; //! Number of tracks above threshold |
3170a3f8 | 221 | |
90a006c2 | 222 | THnSparseF *fhnJetPt[kJetTypes]; //! jet pt information for analysis |
223 | THnSparseF *fhnJetPtQA[kJetTypes]; //! jet pt information for QA | |
224 | THnSparseF *fhnTrackPt[kJetTypes]; //! track pt information for analysis | |
225 | THnSparseF *fhnTrackPtQA[kJetTypes]; //! track pt information for analysis | |
7b822bc5 | 226 | |
d7117cbd | 227 | TH2F* fh2LTrackPtJetPt[kJetTypes][kMaxJets+1]; //! leading track within the jet vs jet pt |
a31b8a87 | 228 | |
229 | TH1F* fh1DijetMinv[kJetTypes]; //! dijet inv mass | |
230 | TH2F* fh2DijetDeltaPhiPt[kJetTypes]; //! dijet delta phi vs pt | |
231 | TH2F* fh2DijetAsymPt[kJetTypes]; //! dijet asym vs pt after delta phi cut | |
232 | TH2F* fh2DijetPt2vsPt1[kJetTypes]; //! dijet pt2 vs pt1 | |
233 | TH2F* fh2DijetDifvsSum[kJetTypes]; //! dijet dif vs sum | |
234 | ||
7b822bc5 | 235 | |
f4132e7d | 236 | TList *fHistList; //! Output list |
3b7ffecf | 237 | |
238 | ||
b99018c6 | 239 | ClassDef(AliAnalysisTaskJetSpectrum2, 16) // Analysis task for standard jet analysis |
3b7ffecf | 240 | }; |
241 | ||
242 | #endif |