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