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