]>
Commit | Line | Data |
---|---|---|
59bf0a70 | 1 | #ifndef ALITWOPARTICLEPIDCORR_H |
2 | #define ALITWOPARTICLEPIDCORR_H | |
3 | ||
4 | #include "THn.h" // in cxx file causes .../THn.h:257: error: conflicting declaration ‘typedef class THnT<float> THnF’ | |
5 | ||
2542e3ae | 6 | |
59bf0a70 | 7 | class TH1F; |
8 | class TH2F; | |
9 | class TH3F; | |
10 | class THnSparse; | |
11 | class TString; | |
12 | class TList; | |
13 | //class AliESDtrackCuts; | |
14 | class TSeqCollection; | |
15 | class AliPIDResponse; | |
d8eb80a9 | 16 | class AliPIDCombined; |
59bf0a70 | 17 | class AliAODEvent; |
18 | class AliAODTrack; | |
19 | class AliAODVertex; | |
20 | class AliEventPoolManager; | |
21 | class TFormula; | |
e09e26cf | 22 | class AliAnalysisUtils; |
59bf0a70 | 23 | class LRCParticlePID; |
24 | class AliVParticle; | |
83cdcf92 | 25 | class AliCFContainer; |
26 | class AliCFGridSparse; | |
27 | class THnBase; | |
28 | class AliTHn; | |
919b40de | 29 | class TProfile; |
59bf0a70 | 30 | |
31 | ||
32 | #include <TObject.h> //LRCParticlePID is a derived class from"TObject" | |
33 | #include "TMath.h" | |
34 | #include "TNamed.h" | |
35 | #include "AliUEHist.h" | |
36 | #include "AliPID.h" | |
37 | #include "AliAnalysisTask.h" | |
38 | #include "AliUEHist.h" | |
39 | #include "TString.h" | |
40 | #include "AliVParticle.h" | |
41 | #include "TParticle.h" | |
42 | #include "AliLog.h" | |
83cdcf92 | 43 | #include "AliTHn.h" |
44 | ||
59bf0a70 | 45 | |
46 | ||
47 | #ifndef ALIANALYSISTASKSE_H | |
48 | #include "AliAnalysisTaskSE.h" | |
49 | #endif | |
50 | ||
51 | namespace AliPIDNameSpace { | |
52 | ||
53 | enum PIDType | |
54 | { | |
55 | NSigmaTPC = 0, | |
56 | NSigmaTOF, | |
57 | NSigmaTPCTOF, // squared sum | |
d8eb80a9 | 58 | Bayes |
59bf0a70 | 59 | }; |
d8eb80a9 | 60 | const Int_t NSigmaPIDType=NSigmaTPCTOF;//number of Nsigma PID types |
59bf0a70 | 61 | |
62 | enum AliDetectorType | |
63 | { | |
83cdcf92 | 64 | fITS = 0, |
65 | fTPC, | |
66 | fTOF, | |
67 | fNDetectors | |
59bf0a70 | 68 | }; |
69 | ||
70 | ||
71 | enum AliParticleSpecies | |
72 | { | |
73 | SpPion = 0, | |
74 | SpKaon, | |
75 | SpProton, | |
f2fc55fd | 76 | unidentified, |
77 | NSpecies=unidentified, | |
59bf0a70 | 78 | SpUndefined=999 |
79 | }; // Particle species used in plotting | |
80 | ||
81 | ||
82 | enum AliCharge | |
83 | { | |
84 | Posch = 0, | |
85 | Negch, | |
86 | NCharge | |
87 | }; | |
88 | } | |
89 | ||
90 | ||
91 | using namespace AliPIDNameSpace; | |
92 | ||
93 | class AliTwoParticlePIDCorr : public AliAnalysisTaskSE { | |
94 | public: | |
95 | AliTwoParticlePIDCorr(); | |
96 | AliTwoParticlePIDCorr(const char *name); | |
97 | virtual ~AliTwoParticlePIDCorr(); | |
98 | ||
99 | virtual void UserCreateOutputObjects(); | |
100 | virtual void UserExec(Option_t *option); | |
101 | virtual void doAODevent(); | |
102 | virtual void doMCAODevent(); | |
103 | virtual void Terminate(Option_t *); | |
2542e3ae | 104 | void SetSharedClusterCut(Double_t value) { fSharedClusterCut = value; } |
ef349d3c | 105 | |
2542e3ae | 106 | void SettwoTrackEfficiencyCutDataReco(Bool_t twoTrackEfficiencyCutDataReco,Float_t twoTrackEfficiencyCutValue1) |
107 | { | |
108 | ftwoTrackEfficiencyCutDataReco=twoTrackEfficiencyCutDataReco; | |
109 | twoTrackEfficiencyCutValue=twoTrackEfficiencyCutValue1; | |
110 | } | |
bb0bbd58 | 111 | void SetVertextype(Int_t Vertextype){fVertextype=Vertextype;} //Check it every time |
ef349d3c | 112 | void SetZvtxcut(Double_t zvtxcut) {fzvtxcut=zvtxcut;} |
f2fc55fd | 113 | void SetCustomBinning(TString receivedCustomBinning) { fCustomBinning = receivedCustomBinning; } |
bb0bbd58 | 114 | void SetMaxNofMixingTracks(Int_t MaxNofMixingTracks) {fMaxNofMixingTracks=MaxNofMixingTracks;} //Check it every time |
f2fc55fd | 115 | void SetCentralityEstimator(TString CentralityMethod) { fCentralityMethod = CentralityMethod;} |
116 | void SetSampleType(TString SampleType) {fSampleType=SampleType;} | |
919b40de | 117 | void SetRequestEventPlane(Bool_t RequestEventPlane,Bool_t V2,Bool_t V3,TString EPdetector,Bool_t IsAfter2011){ |
118 | fRequestEventPlane=RequestEventPlane; | |
119 | fV2=V2; | |
120 | fV3=V3; | |
121 | fEPdet=EPdetector; | |
122 | fIsAfter2011=IsAfter2011; | |
123 | } | |
f2fc55fd | 124 | void SetAnalysisType(TString AnalysisType){fAnalysisType=AnalysisType;} |
125 | void SetFilterBit(Int_t FilterBit) {fFilterBit=FilterBit;} | |
e09e26cf | 126 | void SetTrackStatus(UInt_t status) { fTrackStatus = status; } |
f2fc55fd | 127 | void SetfilltrigassoUNID(Bool_t filltrigassoUNID){ffilltrigassoUNID=filltrigassoUNID;} |
128 | void SetfilltrigUNIDassoID(Bool_t filltrigUNIDassoID){ffilltrigUNIDassoID=filltrigUNIDassoID;} | |
129 | void SetfilltrigIDassoUNID(Bool_t filltrigIDassoUNID){ffilltrigIDassoUNID=filltrigIDassoUNID;} | |
130 | void SetfilltrigIDassoID(Bool_t filltrigIDassoID){ ffilltrigIDassoID=filltrigIDassoID;} | |
131 | void SetfilltrigIDassoIDMCTRUTH(Bool_t filltrigIDassoIDMCTRUTH){ffilltrigIDassoIDMCTRUTH=filltrigIDassoIDMCTRUTH;} | |
ef349d3c | 132 | void SetSelectHighestPtTrig(Bool_t SelectHighestPtTrig){fSelectHighestPtTrig=SelectHighestPtTrig;} |
f2fc55fd | 133 | void SetTriggerSpeciesSelection(Bool_t TriggerSpeciesSelection,Int_t TriggerSpecies,Bool_t containPIDtrig){ |
134 | fTriggerSpeciesSelection=TriggerSpeciesSelection;//if it is KTRUE then Set containPIDtrig=kFALSE | |
135 | fTriggerSpecies=TriggerSpecies; | |
136 | fcontainPIDtrig=containPIDtrig; | |
137 | } | |
138 | void SetAssociatedSpeciesSelection(Bool_t AssociatedSpeciesSelection,Int_t AssociatedSpecies, Bool_t containPIDasso) | |
139 | { | |
140 | fAssociatedSpeciesSelection=AssociatedSpeciesSelection;//if it is KTRUE then Set containPIDasso=kFALSE | |
141 | fAssociatedSpecies=AssociatedSpecies; | |
142 | fcontainPIDasso=containPIDasso; | |
143 | } | |
83cdcf92 | 144 | |
877e0fc2 | 145 | void SettingChargeCounting(Int_t val) {SetChargeAxis=val;} |
146 | ||
83cdcf92 | 147 | void SetFIllPIDQAHistos(Bool_t FIllPIDQAHistos){fFIllPIDQAHistos=FIllPIDQAHistos;} |
e09e26cf | 148 | void SetRejectPileUp(Bool_t rejectPileUp) {frejectPileUp=rejectPileUp;} |
d8eb80a9 | 149 | void SetCheckFirstEventInChunk(Bool_t CheckFirstEventInChunk) {fCheckFirstEventInChunk=CheckFirstEventInChunk;} |
150 | ||
f2fc55fd | 151 | void SetKinematicCuts(Float_t minPt, Float_t maxPt,Float_t mineta,Float_t maxeta) |
152 | { | |
153 | fminPt=minPt; | |
154 | fmaxPt=maxPt; | |
155 | fmineta=mineta; | |
156 | fmaxeta=maxeta; | |
157 | } | |
f2fc55fd | 158 | void SetDcaCut(Bool_t dcacut,Double_t dcacutvalue) |
159 | { | |
160 | fdcacut=dcacut; | |
161 | fdcacutvalue=dcacutvalue; | |
162 | } | |
63818f52 MW |
163 | void SetfillHistQA(Bool_t fillhistQAReco,Bool_t fillhistQATruth) |
164 | { | |
165 | ffillhistQAReco=fillhistQAReco; | |
166 | ffillhistQATruth=fillhistQATruth; | |
167 | } | |
0684fc6a | 168 | void SetPtordering(Bool_t PtOrderDataReco,Bool_t PtOrderMCTruth) |
169 | { | |
170 | fPtOrderDataReco=PtOrderDataReco; | |
171 | fPtOrderMCTruth=PtOrderMCTruth; | |
172 | } | |
e09e26cf | 173 | void SetWeightPerEvent(Bool_t flag) { fWeightPerEvent = flag;} |
c2c6819a MW |
174 | void Setselectprimarydatareco(Bool_t onlyprimarydatareco) {fonlyprimarydatareco=onlyprimarydatareco;} |
175 | void SetselectprimaryTruth(Bool_t selectprimaryTruth) {fselectprimaryTruth=selectprimaryTruth;} | |
f2fc55fd | 176 | void SetCombinedNSigmaCut(Double_t NSigmaPID) {fNSigmaPID=NSigmaPID;} |
2542e3ae | 177 | void SetHighPtKaonNSigmaPID(Float_t HighPtKaonSigma,Float_t HighPtKaonNSigmaPID) |
178 | { | |
179 | fHighPtKaonSigma=HighPtKaonSigma; | |
180 | fHighPtKaonNSigmaPID=HighPtKaonNSigmaPID; | |
181 | } | |
f2fc55fd | 182 | void IgnoreoverlappedTracks(Bool_t UseExclusiveNSigma){fUseExclusiveNSigma=UseExclusiveNSigma;} |
183 | void SetRemoveTracksT0Fill( Bool_t RemoveTracksT0Fill){fRemoveTracksT0Fill=RemoveTracksT0Fill;} | |
184 | void SetPairSelectCharge(Int_t SelectCharge){fSelectCharge=SelectCharge;} | |
185 | void SetTrigAssoSelectcharge( Int_t TriggerSelectCharge,Int_t AssociatedSelectCharge) | |
186 | { | |
187 | fTriggerSelectCharge=TriggerSelectCharge; | |
188 | fAssociatedSelectCharge=AssociatedSelectCharge; | |
189 | } | |
190 | void SetEtaOrdering(Bool_t EtaOrdering){fEtaOrdering=EtaOrdering;} | |
191 | void SetCutConversionsResonances( Bool_t CutConversions,Bool_t CutResonances) | |
192 | { | |
193 | fCutConversions=CutConversions; | |
194 | fCutResonances=CutResonances; | |
195 | } | |
196 | void SetCleanUp(Bool_t InjectedSignals,Bool_t RemoveWeakDecays,Bool_t RemoveDuplicates) | |
197 | { | |
198 | fInjectedSignals=InjectedSignals; | |
199 | fRemoveWeakDecays=RemoveWeakDecays; | |
200 | fRemoveDuplicates=RemoveDuplicates; | |
201 | } | |
c2c6819a | 202 | void SetEfficiency(Bool_t fillefficiency,Bool_t applyTrigefficiency,Bool_t applyAssoefficiency) |
f2fc55fd | 203 | { |
204 | ffillefficiency=fillefficiency; | |
c2c6819a MW |
205 | fapplyTrigefficiency=applyTrigefficiency; |
206 | fapplyAssoefficiency=applyAssoefficiency; | |
207 | ||
f2fc55fd | 208 | } |
c2c6819a MW |
209 | void SetComboeffPtRange(Double_t minPtComboeff,Double_t maxPtComboeff) { |
210 | fminPtComboeff=minPtComboeff; | |
211 | fmaxPtComboeff=maxPtComboeff;} | |
212 | //only one can be kTRUE at a time(for the next two Setters) | |
213 | void Setmesoneffrequired(Bool_t mesoneffrequired) {fmesoneffrequired=mesoneffrequired;} | |
214 | void Setkaonprotoneffrequired(Bool_t kaonprotoneffrequired){fkaonprotoneffrequired=kaonprotoneffrequired;} | |
f2fc55fd | 215 | void SetOnlyOneEtaSide(Int_t OnlyOneEtaSide){fOnlyOneEtaSide=OnlyOneEtaSide;} |
216 | void SetRejectResonanceDaughters(Int_t RejectResonanceDaughters){fRejectResonanceDaughters=RejectResonanceDaughters;} | |
217 | ||
218 | void SetTOFPIDVal(Bool_t RequestTOFPID,Float_t PtTOFPIDmin,Float_t PtTOFPIDmax) | |
219 | { | |
220 | fRequestTOFPID=RequestTOFPID; | |
221 | fPtTOFPIDmin=PtTOFPIDmin; | |
222 | fPtTOFPIDmax=PtTOFPIDmax; | |
223 | } | |
59bf0a70 | 224 | |
970080e0 | 225 | void SetEffcorectionfilePathName(TString efffilename) {fefffilename=efffilename;} |
226 | ||
919b40de | 227 | |
8fbae00a | 228 | //PID Type |
229 | void SetPIDType(PIDType PIDmethod) { fPIDType = PIDmethod; } | |
230 | PIDType GetPIDType() {return fPIDType; } | |
231 | //NSigma cut | |
919b40de | 232 | //set cut on beyesian probability |
233 | void SetBayesCut(Double_t cut){fBayesCut=cut;} | |
234 | void SetdiffPIDcutvalues(Bool_t diffPIDcutvalues,Double_t PIDCutval1, Double_t PIDCutval2, Double_t PIDCutval3,Double_t PIDCutval4){ | |
235 | fdiffPIDcutvalues=diffPIDcutvalues; | |
236 | fPIDCutval1=PIDCutval1; | |
237 | fPIDCutval2=PIDCutval2; | |
238 | fPIDCutval3=PIDCutval3; | |
239 | fPIDCutval4=PIDCutval4; | |
240 | } | |
241 | void SetRandomizeReactionPlane(Bool_t RandomizeReactionPlane){fRandomizeReactionPlane=RandomizeReactionPlane;} | |
242 | ||
243 | //****************************************************************************************EP related part | |
244 | void OpenInfoCalbration(Int_t run); | |
245 | void SetTPCclusterN(Int_t ncl){fNcluster=ncl;}; | |
246 | //****************************************************************************************EP related part | |
247 | ||
248 | ||
249 | private: | |
59bf0a70 | 250 | //histograms |
251 | TList *fOutput; //! Output list | |
83cdcf92 | 252 | TList *fOutputList; //! Output list |
919b40de | 253 | TList *fList; //! List for output objects |
254 | ||
83cdcf92 | 255 | |
f2fc55fd | 256 | TString fCentralityMethod; // Method to determine centrality |
257 | TString fSampleType; // pp,p-Pb,Pb-Pb | |
d8eb80a9 | 258 | Bool_t fRequestEventPlane; //only for PbPb |
f2fc55fd | 259 | Int_t fnTracksVertex; // QA tracks pointing to principal vertex |
91a5dc10 | 260 | AliAODVertex* trkVtx;//! |
f2fc55fd | 261 | Float_t zvtx; |
262 | Int_t fFilterBit; // track selection cuts | |
e09e26cf | 263 | UInt_t fTrackStatus; // if non-0, the bits set in this variable are required for each track |
ef349d3c | 264 | Double_t fSharedClusterCut; // cut on shared clusters (only for AOD) |
265 | Int_t fVertextype; | |
d8eb80a9 | 266 | Int_t skipParticlesAbove; |
f2fc55fd | 267 | Double_t fzvtxcut; |
268 | Bool_t ffilltrigassoUNID; | |
269 | Bool_t ffilltrigUNIDassoID; | |
270 | Bool_t ffilltrigIDassoUNID; | |
271 | Bool_t ffilltrigIDassoID; | |
272 | Bool_t ffilltrigIDassoIDMCTRUTH; | |
ef349d3c | 273 | Int_t fMaxNofMixingTracks; |
f2fc55fd | 274 | Bool_t fPtOrderMCTruth; |
0684fc6a | 275 | Bool_t fPtOrderDataReco; |
e09e26cf | 276 | Bool_t fWeightPerEvent; |
f2fc55fd | 277 | Bool_t fTriggerSpeciesSelection; |
278 | Bool_t fAssociatedSpeciesSelection; | |
d8eb80a9 | 279 | Bool_t fRandomizeReactionPlane; |
f2fc55fd | 280 | Int_t fTriggerSpecies; |
281 | Int_t fAssociatedSpecies; | |
c2c6819a MW |
282 | TString fCustomBinning;//for setting customized binning |
283 | TString fBinningString;//final binning string | |
ef349d3c | 284 | Bool_t fSelectHighestPtTrig; |
c2c6819a MW |
285 | Bool_t fcontainPIDtrig; |
286 | Bool_t fcontainPIDasso; | |
877e0fc2 | 287 | Int_t SetChargeAxis; |
e09e26cf | 288 | Bool_t frejectPileUp; |
d8eb80a9 | 289 | Bool_t fCheckFirstEventInChunk; |
f2fc55fd | 290 | Float_t fminPt; |
291 | Float_t fmaxPt; | |
292 | Float_t fmineta; | |
293 | Float_t fmaxeta; | |
f2fc55fd | 294 | Bool_t fselectprimaryTruth; |
c2c6819a | 295 | Bool_t fonlyprimarydatareco; |
f2fc55fd | 296 | Bool_t fdcacut; |
297 | Double_t fdcacutvalue; | |
63818f52 MW |
298 | Bool_t ffillhistQAReco; |
299 | Bool_t ffillhistQATruth; | |
f2fc55fd | 300 | Int_t kTrackVariablesPair ; |
301 | Double_t fminPtTrig; | |
302 | Double_t fmaxPtTrig; | |
c2c6819a MW |
303 | Double_t fminPtComboeff; |
304 | Double_t fmaxPtComboeff; | |
f2fc55fd | 305 | Double_t fminPtAsso; |
306 | Double_t fmaxPtAsso; | |
d8eb80a9 | 307 | Double_t fmincentmult; |
308 | Double_t fmaxcentmult; | |
59bf0a70 | 309 | TH1F *fhistcentrality;//! |
310 | TH1F *fEventCounter; //! | |
311 | TH2F *fEtaSpectrasso;//! | |
312 | TH2F *fphiSpectraasso;//! | |
f2fc55fd | 313 | TH1F *MCtruthpt;//! |
314 | TH1F *MCtrutheta;//! | |
315 | TH1F *MCtruthphi;//! | |
316 | TH1F *MCtruthpionpt;//! | |
317 | TH1F *MCtruthpioneta;//! | |
318 | TH1F *MCtruthpionphi;//! | |
319 | TH1F *MCtruthkaonpt;//! | |
320 | TH1F *MCtruthkaoneta;//! | |
321 | TH1F *MCtruthkaonphi;//! | |
322 | TH1F *MCtruthprotonpt;//! | |
323 | TH1F *MCtruthprotoneta;//! | |
324 | TH1F *MCtruthprotonphi;//! | |
325 | TH2F *fPioncont;//! | |
326 | TH2F *fKaoncont;//! | |
327 | TH2F *fProtoncont;//! | |
644edbed | 328 | TH2F *fUNIDcont;//! |
83cdcf92 | 329 | TH2F *fEventno;//! |
330 | TH2F *fEventnobaryon;//! | |
331 | TH2F *fEventnomeson;//! | |
0684fc6a | 332 | TH2F *fhistJetTrigestimate;//! |
8fbae00a | 333 | TH3F* fTwoTrackDistancePtdip;//! |
334 | TH3F* fTwoTrackDistancePtdipmix;//! | |
335 | TH3F* fTwoTrackDistancePt[2]; //! control histograms for two-track efficiency study: dphi*_min vs deta (0 = before cut, 1 = after cut) | |
336 | TH3F* fTwoTrackDistancePtmix[2]; //! control histograms for two-track efficiency study: dphi*_min vs deta (0 = before cut, 1 = after cut) | |
f2fc55fd | 337 | |
d8eb80a9 | 338 | TH2D* fCentralityCorrelation; //! centrality vs Tracks multiplicity |
339 | //VZERO calibration | |
340 | TH1F *fHistVZEROAGainEqualizationMap;//VZERO calibration map | |
341 | TH1F *fHistVZEROCGainEqualizationMap;//VZERO calibration map | |
342 | TH2F *fHistVZEROChannelGainEqualizationMap; //VZERO calibration map | |
343 | TH1* fCentralityWeights; // for centrality flattening | |
344 | ||
345 | TH2F *fHistCentStats; //!centrality stats | |
346 | TH2F *fHistRefmult;//! | |
347 | TH2F *fHistEQVZEROvsTPCmultiplicity;//! | |
348 | TH2F *fHistEQVZEROAvsTPCmultiplicity;//! | |
349 | TH2F *fHistEQVZEROCvsTPCmultiplicity;//! | |
350 | TH2F *fHistVZEROCvsEQVZEROCmultiplicity;//! | |
351 | TH2F *fHistVZEROAvsEQVZEROAmultiplicity;//! | |
352 | TH2F *fHistVZEROCvsVZEROAmultiplicity;//! | |
353 | TH2F *fHistEQVZEROCvsEQVZEROAmultiplicity;//! | |
354 | TH2F *fHistVZEROSignal;//! | |
d8eb80a9 | 355 | TH2F *fHistEventPlaneTruth;//! |
356 | TH2D *fHistPsiMinusPhi;//! psi - phi QA histogram | |
919b40de | 357 | TH3F *fEventPlanePID;//! |
358 | //****************************************************************************************EP related part | |
359 | ||
360 | Float_t evplaneMC,fgPsi2v0a,fgPsi2v0c,fgPsi2tpc; // current Psi2 | |
361 | Float_t fgPsi3v0a,fgPsi3v0c,fgPsi3tpc; // current Psi3 | |
362 | Float_t fgPsi2v0aMC,fgPsi2v0cMC,fgPsi2tpcMC; // current Psi2 | |
363 | Float_t fgPsi3v0aMC,fgPsi3v0cMC,fgPsi3tpcMC,gReactionPlane; // current Psi3 | |
364 | Bool_t fV2; // switch to set the harmonics | |
365 | Bool_t fV3; // switch to set the harmonics | |
366 | Bool_t fIsAfter2011; // switch for 2011 and later runs | |
367 | ||
368 | // Int_t nCentrBin = 9; // cenrality bins | |
369 | ||
370 | // | |
371 | // Cuts and options | |
372 | // | |
373 | ||
374 | Int_t fRun; // current run checked to load VZERO calibrations | |
375 | ||
376 | Int_t fNcluster; // Numer of TPC cluster required | |
377 | ||
378 | TString fEPdet; //Set the name of the event plane to be used to reconstruct the event plane | |
379 | ||
380 | // Output objects | |
381 | TProfile *fMultV0; //! object containing VZERO calibration information | |
382 | Float_t fV0Cpol; //! loaded by OADB | |
383 | Float_t fV0Apol; //! loaded by OADB | |
384 | Float_t fMeanQ[9][2][2]; // and recentering | |
385 | Float_t fWidthQ[9][2][2]; // ... | |
386 | Float_t fMeanQv3[9][2][2]; // also for v3 | |
387 | Float_t fWidthQv3[9][2][2]; // ... | |
388 | ||
389 | TProfile *fHResTPCv0A2; //! TProfile for subevent resolution (output) | |
390 | TProfile *fHResTPCv0C2; //! TProfile for subevent resolution (output) | |
391 | TProfile *fHResv0Cv0A2; //! TProfile for subevent resolution (output) | |
392 | TProfile *fHResTPCv0A3; //! also for v3 | |
393 | TProfile *fHResTPCv0C3; //! also for v3 | |
394 | TProfile *fHResv0Cv0A3; //! also for v3 | |
395 | ||
396 | TProfile *fHResMA2; //! TProfile for subevent resolution (output) | |
397 | TProfile *fHResMC2; //! TProfile for subevent resolution (output) | |
398 | TProfile *fHResAC2; //! TProfile for subevent resolution (output) | |
399 | TProfile *fHResMA3; //! also for v3 | |
400 | TProfile *fHResMC3; //! also for v3 | |
401 | TProfile *fHResAC3; //! also for v3 | |
402 | ||
403 | TH2F *fPhiRPTPC; //! EP distribution vs. centrality (v2) | |
404 | TH2F *fPhiRPTPCv3; //! EP distribution vs. centrality (v2) | |
405 | TH2F *fPhiRPv0A; //! EP distribution vs. centrality (v2) | |
406 | TH2F *fPhiRPv0C; //! EP distribution vs. centrality (v2) | |
407 | TH2F *fPhiRPv0Av3; //! EP distribution vs. centrality (v3) | |
408 | TH2F *fPhiRPv0Cv3; //! EP distribution vs. centrality (v3) | |
409 | //****************************************************************************************EP related part | |
d8eb80a9 | 410 | |
2542e3ae | 411 | TH2F* fControlConvResoncances; //! control histograms for cuts on conversions and resonances |
59bf0a70 | 412 | |
413 | TH2F *fHistoTPCdEdx;//! | |
414 | TH2F *fHistoTOFbeta;//! | |
c2c6819a MW |
415 | TH3F *fTPCTOFPion3d;//! |
416 | TH3F *fTPCTOFKaon3d;//! | |
417 | TH3F *fTPCTOFProton3d;//! | |
91a5dc10 LM |
418 | TH1F *fPionPt;//! |
419 | TH1F *fPionEta;//! | |
420 | TH1F *fPionPhi;//! | |
421 | TH1F *fKaonPt;//! | |
422 | TH1F *fKaonEta;//! | |
423 | TH1F *fKaonPhi;//! | |
424 | TH1F *fProtonPt;//! | |
425 | TH1F *fProtonEta;//! | |
426 | TH1F *fProtonPhi;//! | |
59bf0a70 | 427 | // TH3F *fHistocentNSigmaTPC;//! nsigma TPC |
428 | // TH3F *fHistocentNSigmaTOF;//! nsigma TOF | |
919b40de | 429 | |
83cdcf92 | 430 | AliTHn *fCorrelatonTruthPrimary;//! |
431 | AliTHn *fCorrelatonTruthPrimarymix;//! | |
432 | AliTHn *fTHnCorrUNID;//! | |
433 | AliTHn *fTHnCorrUNIDmix;//! | |
434 | AliTHn *fTHnCorrID;//! | |
435 | AliTHn *fTHnCorrIDmix;//! | |
436 | AliTHn *fTHnCorrIDUNID;//! | |
437 | AliTHn *fTHnCorrIDUNIDmix;//! | |
438 | AliTHn *fTHnTrigcount;//! | |
439 | AliTHn *fTHnTrigcountMCTruthPrim;//! | |
e09e26cf | 440 | AliTHn* fTrackHistEfficiency[6]; //! container for tracking efficiency and contamination (all particles filled including leading one): axes: eta, pT, particle species:::::::::0 pion, 1 kaon,2 proton,3 mesons,4 kaons+protons,5 all |
441 | ||
59bf0a70 | 442 | |
919b40de | 443 | TH1F *fHistQA[16]; //! |
f2fc55fd | 444 | |
e09e26cf | 445 | |
91a5dc10 | 446 | THnSparse *effcorection[6];//! |
f2fc55fd | 447 | // THnF *effmap[6]; |
59bf0a70 | 448 | |
d8eb80a9 | 449 | Int_t ClassifyTrack(AliAODTrack* track,AliAODVertex* vertex,Float_t magfield,Bool_t fill); |
f2fc55fd | 450 | Double_t* GetBinning(const char* configuration, const char* tag, Int_t& nBins); |
59bf0a70 | 451 | |
59bf0a70 | 452 | |
919b40de | 453 | void Fillcorrelation(Float_t ReactionPlane,TObjArray *trackstrig,TObjArray *tracksasso,Double_t cent,Float_t vtx,Float_t weight,Bool_t firstTime,Float_t bSign,Bool_t fPtOrder,Bool_t twoTrackEfficiencyCut,Bool_t mixcase,TString fillup);//mixcase=kTRUE in case of mixing; |
c2c6819a | 454 | Float_t GetTrackbyTrackeffvalue(AliAODTrack* track,Double_t cent,Float_t evzvtx, Int_t parpid); |
59bf0a70 | 455 | |
919b40de | 456 | //Fill PID and Event planes |
457 | void FillPIDEventPlane(Double_t centrality,Int_t par,Float_t trigphi,Float_t fReactionPlane); | |
458 | ||
59bf0a70 | 459 | //Mixing functions |
919b40de | 460 | // void DefineEventPool(); |
59bf0a70 | 461 | AliEventPoolManager *fPoolMgr;//! |
462 | TClonesArray *fArrayMC;//! | |
91a5dc10 LM |
463 | TString fAnalysisType; // "MC", "ESD", "AOD" |
464 | TString fefffilename; | |
59bf0a70 | 465 | //PID part histograms |
466 | ||
467 | //PID functions | |
468 | Bool_t HasTPCPID(AliAODTrack *track) const; // has TPC PID | |
469 | Bool_t HasTOFPID(AliAODTrack *track) const; // has TOF PID | |
bb0bbd58 | 470 | Double_t GetBeta(AliAODTrack *track); |
83cdcf92 | 471 | void CalculateNSigmas(AliAODTrack *track, Bool_t FIllQAHistos); |
472 | Int_t FindMinNSigma(AliAODTrack *track, Bool_t FIllQAHistos); | |
473 | Bool_t* GetDoubleCounting(AliAODTrack * trk, Bool_t FIllQAHistos); | |
474 | Int_t GetParticle(AliAODTrack * trk, Bool_t FIllQAHistos); | |
475 | ||
476 | TH2F* GetHistogram2D(const char * name);//return histogram "name" from fOutputList | |
477 | ||
2542e3ae | 478 | Bool_t ftwoTrackEfficiencyCutDataReco; |
59bf0a70 | 479 | Float_t twoTrackEfficiencyCutValue; |
480 | //Pid objects | |
481 | AliPIDResponse *fPID; //! PID | |
d8eb80a9 | 482 | AliPIDCombined *fPIDCombined; //! PIDCombined |
483 | ||
484 | //set PID Combined | |
485 | void SetPIDCombined(AliPIDCombined *obj){fPIDCombined=obj;} | |
486 | AliPIDCombined *GetPIDCombined(){return fPIDCombined;} | |
919b40de | 487 | |
d8eb80a9 | 488 | Double_t GetBayesCut(){return fBayesCut;} |
489 | Int_t GetIDBayes(AliAODTrack *trk, Bool_t FIllQAHistos);//calculate the PID according to bayesian PID | |
490 | UInt_t CalcPIDCombined(AliAODTrack *track,Int_t detMask, Double_t* prob) const; | |
491 | Bool_t* GetAllCompatibleIdentitiesNSigma(AliAODTrack * trk, Bool_t FIllQAHistos);//All the identities are true | |
492 | ||
493 | ||
59bf0a70 | 494 | Int_t eventno; |
f2fc55fd | 495 | Float_t fPtTOFPIDmin; //lower pt bound for the TOCTOF combined circular pid |
496 | Float_t fPtTOFPIDmax; //uper pt bound for the TOCTOF combined circular pid | |
59bf0a70 | 497 | Bool_t fRequestTOFPID;//if true returns kSpUndefined if the TOF signal is missing |
498 | PIDType fPIDType; // PID type Double_t fNSigmaPID; // number of sigma for PID cut | |
83cdcf92 | 499 | Bool_t fFIllPIDQAHistos; //Switch for filling the nSigma histos |
59bf0a70 | 500 | Double_t fNSigmaPID; // number of sigma for PID cut |
d8eb80a9 | 501 | Double_t fBayesCut; // Cut on Bayesian probability |
502 | Bool_t fdiffPIDcutvalues; | |
503 | Double_t fPIDCutval1; | |
504 | Double_t fPIDCutval2; | |
505 | Double_t fPIDCutval3; | |
506 | Double_t fPIDCutval4; | |
507 | ||
2542e3ae | 508 | Float_t fHighPtKaonNSigmaPID;// number of sigma for PID cut for Kaons above fHighPtKaonSigma(-1 default, no cut applied) |
509 | Float_t fHighPtKaonSigma;//lower pt bound for the fHighPtKaonNSigmaPID to be set >0(i.e. to make it applicable) | |
59bf0a70 | 510 | Bool_t fUseExclusiveNSigma;//if true returns the identity only if no double counting(i.e not in the overlap area) |
511 | Bool_t fRemoveTracksT0Fill;//if true remove tracks for which only StartTime from To-Fill is available (worst resolution) | |
512 | Int_t fSelectCharge; // (un)like sign selection when building correlations: 0: no selection; 1: unlike sign; 2: like sign | |
513 | Int_t fTriggerSelectCharge; // select charge of trigger particle: 1: positive; -1 negative | |
514 | Int_t fAssociatedSelectCharge; // select charge of associated particle: 1: positive; -1 negative | |
515 | Float_t fTriggerRestrictEta; // restrict eta range for trigger particle (default: -1 [off]) | |
516 | Bool_t fEtaOrdering; // eta ordering, see AliUEHistograms.h for documentation | |
517 | Bool_t fCutConversions; // cut on conversions (inv mass) | |
518 | Bool_t fCutResonances; // cut on resonances (inv mass) | |
519 | Int_t fRejectResonanceDaughters; // reject all daughters of all resonance candidates (1: test method (cut at m_inv=0.9); 2: k0; 3: lambda) | |
f2fc55fd | 520 | Int_t fOnlyOneEtaSide; // decides that only trigger particle from one eta side are considered (0 = all; -1 = negative, 1 = positive) |
521 | Bool_t fInjectedSignals; // check header to skip injected signals in MC | |
59bf0a70 | 522 | Bool_t fRemoveWeakDecays; // remove secondaries from weak decays from tracks and particles |
523 | Bool_t fRemoveDuplicates;// remove particles with the same label (double reconstruction) | |
c2c6819a MW |
524 | Bool_t fapplyTrigefficiency;//if kTRUE then eff correction calculation starts |
525 | Bool_t fapplyAssoefficiency;//if kTRUE then eff correction calculation starts | |
0684fc6a | 526 | Bool_t ffillefficiency; //if kTRUE then THNsparses used for eff. calculation are filled up |
c2c6819a MW |
527 | Bool_t fmesoneffrequired; |
528 | Bool_t fkaonprotoneffrequired; | |
e09e26cf | 529 | AliAnalysisUtils* fAnalysisUtils; // points to class with common analysis utilities |
59bf0a70 | 530 | TFormula* fDCAXYCut; // additional pt dependent cut on DCA XY (only for AOD) |
531 | ||
532 | ||
533 | Float_t fnsigmas[NSpecies][NSigmaPIDType+1]; //nsigma values | |
534 | Bool_t fHasDoubleCounting[NSpecies];//array with compatible identities | |
535 | ||
536 | //Int_t fPIDMethod; // PID method | |
537 | ||
538 | //functions | |
e09e26cf | 539 | Bool_t CheckTrack(AliAODTrack * part); |
59bf0a70 | 540 | Float_t PhiRange(Float_t DPhi); |
541 | Float_t GetInvMassSquared(Float_t pt1, Float_t eta1, Float_t phi1, Float_t pt2, Float_t eta2, Float_t phi2, Float_t m0_1, Float_t m0_2); | |
542 | Float_t GetInvMassSquaredCheap(Float_t pt1, Float_t eta1, Float_t phi1, Float_t pt2, Float_t eta2, Float_t phi2, Float_t m0_1, Float_t m0_2); | |
543 | Float_t GetDPhiStar(Float_t phi1, Float_t pt1, Float_t charge1, Float_t phi2, Float_t pt2, Float_t charge2, Float_t radius, Float_t bSign); | |
f2fc55fd | 544 | TObjArray* CloneAndReduceTrackList(TObjArray* tracks); |
d8eb80a9 | 545 | |
546 | ||
547 | void ShiftTracks(TObjArray* tracks, Double_t angle); | |
548 | Bool_t AcceptEventCentralityWeight(Double_t centrality); | |
549 | ||
550 | //get event plane | |
919b40de | 551 | Float_t GetEventPlane(AliAODEvent *event,Bool_t truth,Double_t v0Centr); |
d8eb80a9 | 552 | Double_t GetAcceptedEventMultiplicity(AliAODEvent *aod,Bool_t truth);//returns centrality after event(mainly vertex) selection IsEventAccepted GetAcceptedEventMultiplicity |
553 | ||
554 | //get vzero equalization | |
555 | Double_t GetEqualizationFactor(Int_t run, const char* side); | |
556 | Double_t GetChannelEqualizationFactor(Int_t run,Int_t channel); | |
557 | void SetVZEROCalibrationFile(const char* filename,const char* lhcPeriod); | |
558 | void SetCentralityWeights(TH1* hist) { fCentralityWeights = hist; } | |
559 | ||
560 | Double_t GetRefMultiOrCentrality(AliAODEvent *event, Bool_t truth); | |
561 | Double_t GetReferenceMultiplicityVZEROFromAOD(AliAODEvent *event);//mainly important for pp 7 TeV | |
562 | ||
563 | ||
564 | ||
565 | ||
59bf0a70 | 566 | |
567 | AliTwoParticlePIDCorr(const AliTwoParticlePIDCorr&); // not implemented | |
568 | AliTwoParticlePIDCorr& operator=(const AliTwoParticlePIDCorr&); // not implemented | |
569 | ||
570 | ClassDef(AliTwoParticlePIDCorr, 1); // example of analysis | |
571 | }; | |
572 | class LRCParticlePID : public TObject { | |
573 | public: | |
f2fc55fd | 574 | LRCParticlePID(Int_t par,Short_t icharge,Float_t pt,Float_t eta, Float_t phi,Float_t effcorrectionval) |
575 | :fparticle(par),fcharge(icharge),fPt(pt), fEta(eta), fPhi(phi),feffcorrectionval(effcorrectionval) {} | |
59bf0a70 | 576 | virtual ~LRCParticlePID() {} |
577 | ||
578 | ||
579 | virtual Float_t Eta() const { return fEta; } | |
580 | virtual Float_t Phi() const { return fPhi; } | |
59bf0a70 | 581 | virtual Float_t Pt() const { return fPt; } |
582 | Int_t getparticle() const {return fparticle;} | |
583 | virtual Short_t Charge() const { return fcharge; } | |
584 | Float_t geteffcorrectionval() const {return feffcorrectionval;} | |
585 | virtual Bool_t IsEqual(const TObject* obj) const { return (obj->GetUniqueID() == GetUniqueID()); } | |
d8eb80a9 | 586 | virtual void SetPhi(Double_t phiv) { fPhi = phiv; } |
59bf0a70 | 587 | |
588 | ||
589 | private: | |
590 | LRCParticlePID(const LRCParticlePID&); // not implemented | |
591 | LRCParticlePID& operator=(const LRCParticlePID&); // not implemented | |
f2fc55fd | 592 | |
59bf0a70 | 593 | Int_t fparticle; |
594 | Short_t fcharge; | |
595 | Float_t fPt; | |
596 | Float_t fEta; | |
597 | Float_t fPhi; | |
59bf0a70 | 598 | Float_t feffcorrectionval; |
599 | ClassDef(LRCParticlePID, 1); | |
600 | } ; | |
601 | ||
602 | #endif | |
603 |