Enable TouchFile for empty SHUTTLE_DONE AliEn dir too.
[u/mrichter/AliRoot.git] / PWGLF / STRANGENESS / LambdaK0PbPb / AliAnalysisTaskV0ForRAA.h
CommitLineData
9c758b88 1//-----------------------------------------------------------------
2// AliAnalysisTaskV0ForRAA class
3// This task is for analysing Lambda and K0s pt spectra in PbPb and
4// pp as well as with MC. The flag for pp and MC must be set
5// accordingly, default is PbPb data.
6// It works with ESD files only.
7//-----------------------------------------------------------------
8
9#ifndef ALIANALYSISTASKV0FORRAA_H
10#define ALIANALYSISTASKV0FORRAA_H
11
692dbad9 12class TH1F;
13class TH2F;
5842a526 14class TH3F;
aa3d4e29 15
9c758b88 16class Tlist;
aa3d4e29 17
9c758b88 18class AliESDv0;
692dbad9 19class AliESDtrack;
9c758b88 20class AliESDtrackCuts;
21class AliESDpid;
22class AliESDEvent;
23class AliMCEvent;
692dbad9 24class AliPIDResponse;
25
26#ifndef ALIANALYSISTASKSE_H
27#include "AliAnalysisTaskSE.h"
28#endif
29
9c758b88 30
31class AliAnalysisTaskV0ForRAA : public AliAnalysisTaskSE {
6cdc2a74 32 public:
76a4d7a7 33
34 AliAnalysisTaskV0ForRAA();
35 AliAnalysisTaskV0ForRAA(const char *name);
6cdc2a74 36 virtual ~AliAnalysisTaskV0ForRAA();
9c758b88 37
6cdc2a74 38 virtual void UserCreateOutputObjects();
39 virtual void UserExec(Option_t *option);
40 virtual void Terminate(Option_t *);
41
42
43
44 //-- MC truth/reco --//
11e769d9 45 void SetMCMode(Bool_t mcmode) {fMCMode = mcmode; if(fMCMode) Printf("AliAnalysisTaskV0ForRAA::running mc mode: histos of MC reco");}
46 void SetMCTruthMode(Bool_t mcmode) {fMCTruthMode = mcmode; if(fMCTruthMode) Printf("AliAnalysisTaskV0ForRAA::running mc mode: histos of MC truth");}
47 void SelectInjected(Bool_t injected) {fSelectInjected = injected;if(fSelectInjected) Printf("AliAnalysisTaskV0ForRAA::only injected MC particles");}
48 void SelectMBMotherMC(Bool_t mbmother) {fSelectMBMotherMC = mbmother;if(mbmother) Printf("AliAnalysisTaskV0ForRAA::only MB mother MC for sec lambdas selected");}
aa3d4e29 49 void SelectOnlyPosLabelMC(Bool_t poslabel) {fCheckNegLabelReco = poslabel;if(poslabel) Printf("AliAnalysisTaskV0ForRAA::Select only MC truth and reco with pos label reco");}
11e769d9 50 void SelectOnlyFoundRecoV0MC(Bool_t found) {fOnlyFoundRecoV0 = found; if(found) Printf("AliAnalysisTaskV0ForRAA::Select only MC truth with found reco V0");}
aa3d4e29 51
6cdc2a74 52
53 //-- Centrality --//
54 // use centrality - if yes, which one
11e769d9 55 void SetUseCentrality(Int_t cent) {fUseCentrality = cent; Printf("AliAnalysisTaskV0ForRAA::centrality selected for detector %i (0=off, 1=VZERO, 2=SPD)",cent);}
6cdc2a74 56 // set range
57 void SetUseCentralityRange(Int_t range) {fUseCentralityRange = range;if(fUseCentrality) Printf("AliAnalysisTaskV0::centrality range %i",fUseCentralityRange);}
58 // centrality bin to be used
11e769d9 59 void SetUseCentralityBin(Int_t bin) {fUseCentralityBin = bin; if(fUseCentrality) Printf("AliAnalysisTaskV0ForRAA::centrality selected for bin %i",fUseCentralityBin); }
6cdc2a74 60
61
62 //-- event cuts --//
63 void SetPrimVertexZCut(Double_t vtxcut,Bool_t status) {fVertexZCut = vtxcut;fVtxStatus = status; Printf("AliAnalysisTaskV0ForRAA::SetPrimVertexZCut %3.2f",vtxcut);}
64 void SetAnapp(Bool_t anapp) {fAnapp = anapp ;if(fAnapp) Printf("AliAnalysisTaskV0ForRAA::analysing pp!!!");}
5842a526 65 void SetRejectPileUpSPD(Bool_t rejectPU = kFALSE) {fRejectPileUpSPD = rejectPU;if(fRejectPileUpSPD) Printf("AliAnalysisTaskV0ForRAA::reject pileup events from SDP in pp");}
6cdc2a74 66 void SelectWithSDD(Bool_t sdd) {fSelSDD =sdd; if(sdd) Printf("AliAnalysisTaskV0ForRAA:: only events with SDD selected!");}
5842a526 67 void SelectWithNoSDD(Bool_t sdd) {fSelNoSDD =sdd; if(sdd) Printf("AliAnalysisTaskV0ForRAA:: only events with NO SDD selected!");}
6cdc2a74 68
69 //-- track cuts --//
11e769d9 70 void SetESDTrackCuts(Int_t ncr, Double_t chi2=4, Bool_t tpcrefit=kTRUE) {fNcr=ncr;fChi2cls=chi2,fTPCrefit=tpcrefit;Printf("AliAnalysisTaskV0ForRAA::AliESDtrackCuts for V0s set ncr %i, chi2 %1.2f, TPC refit %i",ncr,chi2,tpcrefit);}
71 void SetESDTrackCutsCharged(Int_t ncr, Double_t chi2=4, Bool_t tpcrefit=kTRUE) {fNcrCh=ncr;fChi2clsCh=chi2,fTPCrefitCh=tpcrefit;Printf("AliAnalysisTaskV0ForRAA::AliESDtrackCuts for charged particles setncr %i, chi2 %1.2f, TPC refit %i",ncr,chi2,tpcrefit);}
72 void SetESDTrackCutsLowPt(Int_t ncr, Double_t chi2=4, Bool_t tpcrefit=kTRUE) {fNcrLpt=ncr;fChi2clsLpt=chi2,fTPCrefitLpt=tpcrefit;Printf("AliAnalysisTaskV0ForRAA::AliESDtrackCuts for low pt particles set ncr %i, chi2 %1.2f, TPC refit %i",ncr,chi2,tpcrefit);}
6cdc2a74 73 void SetUseOnthefly(Bool_t useonthefly) {fOntheFly = useonthefly; if(!fOntheFly) Printf("AliAnalysisTaskV0ForRAA::offline V0s");}
5842a526 74 void SetUsePID(Bool_t usepid,Double_t nsigma=100.0,Double_t pcut=100.0,Bool_t pidpion=kFALSE,Double_t nsigma2=100.0) {fUsePID = usepid;fNSigma = nsigma;fPPIDcut = pcut; fUsePIDPion = pidpion;fNSigma2 = nsigma2; if(fUsePID) Printf("AliAnalysisTaskV0ForRAA::proton PID! of %4.2f for p: %4.2f, also pion? %i nsig2=%4.2f",fNSigma,pcut,pidpion,fNSigma2);}
aa3d4e29 75 void SetCutMoreNclsThanRows(Bool_t cut) {fMoreNclsThanRows=cut; if(cut) Printf("AliAnalysisTaskV0ForRAA::cut on more ncls than crossed rows");}
6cdc2a74 76 void SetCutMoreNclsThanFindable(Bool_t cut) {fMoreNclsThanFindable=cut; if(cut) Printf("AliAnalysisTaskV0ForRAA::cut on more ncls than ncls findable");}
aa3d4e29 77 void SetCutMoreNclsThanFindableMax(Bool_t cut) {fMoreNclsThanFindableMax = cut; if(cut) Printf("AliAnalysisTaskV0ForRAA::cut on more ncls than ncls findable max");}
78
5842a526 79 void SetRatioFoundOverFindable(Double_t cut) {fRatioFoundOverFindable = cut; Printf("AliAnalysisTaskV0ForRAA::cut on found over finable clusters %f",cut);}
80 void SetRatioMaxCRowsOverFindable(Double_t cut) {fRatioMaxCRowsOverFindable = cut; Printf("AliAnalysisTaskV0ForRAA::cut on max crossed rows over finable clusters %f",cut);}
aa3d4e29 81
82 void SetLowPtTPCCutAliESDTrackCut(Double_t pt) {fPtTPCCut=pt;Printf("AliAnalysisTaskV0ForRAA::SetLowPtTPCCutAliESDTrackCut pt=%2.2f",pt);}
83
6cdc2a74 84 void SetMaxChi2PerITSCluster(Double_t chi2) {fChi2PerClusterITS = chi2; Printf("AliAnalysisTaskV0ForRAA::max chi2 per ITS cluster %3.2f",chi2);}
85 void SetRapidityCutMother(Bool_t cut,Double_t val=5.0) {fRapCutV0 = cut; fRap = val; if(cut) Printf("AliAnalysisTaskV0ForRAA::cut on mother rapidity %2.2f",val);}
86 void SetMinPt(Double_t minPt=0.0) {fMinPt = minPt; if(minPt>0.0) Printf("AliAnalysisTaskV0ForRAA::cut on min pt %2.2f",minPt);}
87 /* void SetPtShift(const Double_t shiftVal) {
88 //user defined shift in charge/pt
89 if(shiftVal) { fShift=kTRUE; fDeltaInvP = shiftVal; Printf("AliAnalysisTaskV0::WARNING!!!!!!!!!!!!!! pt shift introduced!");}
90 }
91 */
11e769d9 92 void SetDCAV0ToVertexK0(Double_t dcaTovertex) {fDCAToVertexK0 = dcaTovertex; Printf("AliAnalysisTaskV0ForRAA::dca to vertex K0s %2.3f",dcaTovertex);}
93 void SetDCAV0ToVertexL(Double_t dcaTovertex) {fDCAToVertexL = dcaTovertex; Printf("AliAnalysisTaskV0ForRAA::dca to vertex L/AL %2.3f",dcaTovertex);}
94 void SetDCADaughtersL(Double_t dcaDaughters) {fDCADaughtersL = dcaDaughters; Printf("AliAnalysisTaskV0:ForRAA:dca daughters L %2.3f",dcaDaughters);}
6cdc2a74 95 void SetDCADaughtersAL(Double_t dcaDaughters) {fDCADaughtersAL = dcaDaughters; Printf("AliAnalysisTaskV0ForRAA::dca daughters AL %2.3f",dcaDaughters);}
96 void SetDCADaughtersK0(Double_t dcaDaughters) {fDCADaughtersK0 = dcaDaughters; Printf("AliAnalysisTaskV0ForRAA::dca daughters K0s %2.3f",dcaDaughters);}
97 void SetDCADaughtersLargeToVertex(Double_t dcaDaughtersVtx) {fDCADaughtersToVtxLarge = dcaDaughtersVtx; Printf("AliAnalysisTaskV0ForRAA::dca daughters to vertex large %2.3f",dcaDaughtersVtx);}
98 void SetDCADaughtersSmallToVertex(Double_t dcaDaughtersVtx) {fDCADaughtersToVtxSmall = dcaDaughtersVtx; Printf("AliAnalysisTaskV0ForRAA::dca daughters to vertex small %2.3f",dcaDaughtersVtx);}
11e769d9 99 void SetDecayRadiusXYMinMax(Double_t decMin,Double_t decMax){fDecayRadXYMin = decMin;fDecayRadXYMax = decMax; Printf("AliAnalysisTaskV0ForRAA::min xy decay radius %2.3f max %2.3f",decMin,decMax);}
100 void SetCosOfPointingAngleL(Double_t pointAng,Double_t ptMaxCut=100.0) {fCosPointAngL = pointAng;fCPAPtCutL = ptMaxCut;Printf("AliAnalysisTaskV0ForRAA::SetCosOfPointingAngleL %1.5f and pt max %2.2f",pointAng,ptMaxCut);}
101 void SetCosOfPointingAngleK(Double_t pointAng,Double_t ptMaxCut=100.0) {fCosPointAngK = pointAng;fCPAPtCutK0 = ptMaxCut; Printf("AliAnalysisTaskV0ForRAA::SetCosOfPointingAngleK %1.5f and pt max %2.2f",pointAng,ptMaxCut);}
102 void SetOpeningAngleCut(Double_t opang, Double_t maxpt) {fOpengAngleDaughters=opang; fOpAngPtCut = maxpt,Printf("AliAnalysisTaskV0::cut on opening angle %1.3f up to pt= %2.2f",opang,maxpt);}
6cdc2a74 103
104 void SetMaxDecayLength(Double_t decLength) {fDecayLengthMax = decLength; Printf("AliAnalysisTaskV0ForRAA::SetMaxDecayLength %2.3f",decLength);}
105 void SetMinDecayLength(Double_t decLength) {fDecayLengthMin = decLength; Printf("AliAnalysisTaskV0ForRAA::SetMinDecayLength %2.3f",decLength);}
106 void SetDCAXK0(Double_t dcaXK) {fDCAXK = dcaXK; Printf("AliAnalysisTaskV0ForRAA::SetDCAXK0 %2.3f",dcaXK);}
107 void SetDCAYK0(Double_t dcaYK) {fDCAYK = dcaYK; Printf("AliAnalysisTaskV0ForRAA::SetDCAYK0 %2.3f",dcaYK);}
108 void SetDCAXLambda(Double_t dcaXL) {fDCAXL = dcaXL; Printf("AliAnalysisTaskV0ForRAA::SetDCAXLambda %2.3f",dcaXL);}
109 void SetDCAYLambda(Double_t dcaYL) {fDCAXL = dcaYL; Printf("AliAnalysisTaskV0ForRAA::SetDCAYLambda %2.3f",dcaYL);}
11e769d9 110 void SetDCAZ(Double_t dcaZ) {fDCAZ = dcaZ; Printf("AliAnalysisTaskV0ForRAA::SetDCAZ %2.3f",dcaZ);}
6cdc2a74 111 void SetChi2CutKf(Bool_t chi2){ fChiCutKf = chi2; Printf("AliAnalysisTaskV0ForRAA::SetChi2CutKf %i",chi2);}
112 //Double_t chi2) {fChiCutKf = chi2; Printf("AliAnalysisTaskV0ForRAA::SetChi2CutKf %3.2f",chi2);}
11e769d9 113 void SetArmenterosCutAlpha(Double_t alfaMin) {fAlfaCut = alfaMin;Printf("AliAnalysisTaskV0ForRAA::SetArmenterosCut a=%1.3f",alfaMin);}
114 void SetArmenterosCutQt(Double_t ptmin,Double_t ptmax,Bool_t k0s,Bool_t la,Double_t slope=0.2,Double_t qtLinear=0.0){fQtCutPt = ptmax;fQtCutPtLow = ptmin, fArmQtSlope = slope,fArmCutK0 = k0s;fArmCutL = la;fQtCut = qtLinear;Printf("AliAnalysisTaskV0ForRAA::SetArmenterosCut ptmin = %3.2f ptmax = %3.2f. slope: %1.2f. Is K0s? %i La? %i, qt linear: %3.2f",ptmin,ptmax,slope,k0s,la,qtLinear);}
115 void SetMinMassDiffLK0s(Double_t diffK,Double_t diffL) {fExcludeLambdaFromK0s = diffK;fExcludeK0sFromLambda = diffL; Printf("AliAnalysisTaskV0ForRAA::SetMaxMassDifferenceL for K0s %1.3f K0s for L %1.3f",diffK,diffL);}
aa3d4e29 116
11e769d9 117 void SetCtauCut(Double_t ctK0s, Double_t ctL,Double_t ptK0=100.0,Double_t ptL=100.0) {fCtauK0s = ctK0s*2.6842; fCtauL = ctL*7.89;fCtauPtCutK0 = ptK0; fCtauPtCutL = ptL;
6cdc2a74 118 Printf("AliAnalysisTaskV0ForRAA::SetCtauCut ctK=%2.2f, ctL = %2.2f for ptK= %5.2f ptL=%5.2f",ctK0s,ctL,ptK0,ptL);}
11e769d9 119 void SetDoEtaOfMCDaughtersCut(Bool_t doCut,Double_t eta=5.0){fEtaCutMCDaughters = doCut; fEtaCutMCDaughtersVal=eta; Printf("AliAnalysisTaskV0ForRAA::eta cut on V0 (MC truth ? %i) daughters %1.3f !",doCut,eta);}
aa3d4e29 120 // void SetEtaSignCut(Double_t etasign) {fEtaSignCut = etasign;Printf("AliAnalysisTaskV0ForRAA::eta cut sign on daughters %2.2f !",etasign);}
5842a526 121 void SetLowHighMassCut(Double_t lowK=0.25,Double_t highK=0.75,Double_t lowL=1.05,Double_t highL=1.25){fK0sLowMassCut = lowK; fK0sHighMassCut = highK; fLLowMassCut = lowL; fLHighMassCut = highL; Printf("AliAnalysisTaskV0ForRAA::SetLowHighMassCut K0s: low = %1.3f high = %1.3f Lambda: low = %1.3f high = %1.3f",lowK,highK,lowL,highL);}
122 void SetMinMaxNCLSITS(Int_t minP,Int_t maxP,Int_t minN,Int_t maxN,Bool_t switchCase=kFALSE,Double_t radmin=0.0000,Double_t radmax=10000.0){fMinNCLSITSPos = minP; fMaxNCLSITSPos = maxP;fMinNCLSITSNeg = minN; fMaxNCLSITSNeg = maxN;fSwitchCaseITSCls = switchCase;fDecRadCutITSMin=radmin;fDecRadCutITSMax=radmax;Printf("AliAnalysisTaskV0ForRAA::SetMinMaxNCLSITS for V0 daughters minPos %i, maxPos %i, minNeg %i, maxNeg %i switch case %i for 2D decay rad. min: %3.2f max: %3.2f",minP,maxP,minN,maxN,switchCase,radmin,radmax);}
9c758b88 123
5842a526 124 void SetTPCTrackCutsMI(Bool_t tlength=kFALSE, Bool_t crows=kFALSE, Bool_t ncls=kFALSE,Double_t lf1=1.0,Double_t lf2=0.85){fCutMITrackLength = tlength; fCutMICrossedR=crows; fCutMITPCncls=ncls; fCutMITrackLengthLengthF=lf1;fCutMICrossedRLengthF=lf2;Printf("AliAnalysisTaskV0ForRAA::SetTPCTrackCutsMI track length %i crossed rows %i ncls %i factor length %1.2f factor ncr %1.2f",fCutMITrackLength, fCutMICrossedR,fCutMITPCncls,lf1,lf2);}
125
11e769d9 126 void SetFillDetHistoAL(Bool_t fillAL = kFALSE) {fSetFillDetAL = fillAL; if(fillAL) Printf("AliAnalysisTaskV0ForRAA::SetFillDetHistoAL fill detetctor histos with AL instead L");}
127 void SetFillPt(Bool_t fillpt = kFALSE) {fSetPtDepHist = fillpt; if(fillpt) Printf("AliAnalysisTaskV0ForRAA::SetFillPt fill pt instead of mass");}
128 void SetMinDistTPCInner(Double_t dist = 1000000.0) {fDistanceTPCInner = dist; Printf("AliAnalysisTaskV0ForRAA::SetMinDistTPCInner set dist min to %2.2f",dist); }
5842a526 129
6cdc2a74 130 private:
9c758b88 131
6cdc2a74 132 //----------------------------functions --------------------------------------------//
9c758b88 133
5842a526 134 void Process(); // process event
aa3d4e29 135 void V0RecoLoop(Int_t id0,Int_t id1,Int_t isSecd,Int_t what,Double_t ptV0MC,Int_t pdgMother,Double_t ptXiMother,Double_t decaylengthMCV0); // loop over reconstructed V0 (data or MC)
5842a526 136 void V0MCTruthLoop(); // loop over MC truth V0s
137 Int_t CalculateCentralityBin(); // get the centrality bin from multiplicity
138 Bool_t GetMCTruthPartner(AliESDtrack *pos,AliESDtrack *neg,Int_t id0,Int_t id1);// find MC truth partner for reconstructed track
9c758b88 139
140
141
6cdc2a74 142 //----------------------------- objects ----------------------------------------------//
9c758b88 143
6cdc2a74 144 //event
5842a526 145 AliESDEvent *fESD; //ESD event object
146 AliMCEvent *fMCev; //MC event object
aa3d4e29 147
148
6cdc2a74 149 //PID and track cuts
5842a526 150 AliPIDResponse *fESDpid; //pid object
151 AliESDtrackCuts *fESDTrackCuts; //esd track cuts for daughters
152 AliESDtrackCuts *fESDTrackCutsCharged;//esd track cuts for all charged particles
153 AliESDtrackCuts *fESDTrackCutsLowPt; //esd track cuts for daughters at low pt
9c758b88 154
5842a526 155 TList *fOutputContainer; // output data container
9c758b88 156
6cdc2a74 157 //----------------------------histograms --------------------------------------------//
5842a526 158 //-------------------event histos -------------------//
6cdc2a74 159 TH1F *fHistITSLayerHits; // pp 2.76 TeV analysis: check hist on div. ITS layer
160 TH1F *fHistOneHitWithSDD; // pp 2.76 TeV analysis: check hist on at least one ITS layer
aa3d4e29 161 TH1F *fHistNEvents; // count number of events for each event cut
162 TH2F *fHistPrimVtxZESDVSNContributors; // count contributors to ESD vertex
6cdc2a74 163 TH2F *fHistPrimVtxZESDTPCVSNContributors; // count contributors to TPC vertex
164 TH2F *fHistPrimVtxZESDSPDVSNContributors; // count contributors to SPD vertex
aa3d4e29 165
aa3d4e29 166 TH1F *fHistPrimVtxZESD; // primary ESD vertex position z after cuts and processing
167 TH1F *fHistPrimVtxZESDTPC; // primary TPC vertex position z after cuts and processing
168 TH1F *fHistPrimVtxZESDSPD; // primary SPD vertex position z after cuts and processing
6cdc2a74 169
aa3d4e29 170 TH1F *fHistESDVertexZ; // primary TPC vertex position z before cuts
5842a526 171
aa3d4e29 172 TH1F *fHistMuliplicity; // number of particles from centrality selection
173 TH1F *fHistMuliplicityRaw; // number of particles from centrality selection before processing
174 TH1F *fHistCentBinRaw; // events per centralitybin before centrality selection
175 TH1F *fHistCentBin; // events per centralitybin
176 TH1F *fHistMultiplicityPrimary; // number of charged particles
aa3d4e29 177 TH1F *fHistNPrim; // number of contributors to the prim vertex
6cdc2a74 178
5842a526 179 //------------------------ single V0 histos --------------------------//
180 // TH3F *fHistPiPiPhiPosVsPtPosVsMass;//xxx
181 // TH3F *fHistPiPPhiPosVsPtPosVsMass;//xxx
182 TH2F *fHistPiPiK0sVsLambdaMass; // K0s mass vs Lamba mass for all pt for K0s
183 TH2F *fHistPiPiK0sVsALambdaMass; // K0s mass vs ALamba mass for all pt for K0s
184 TH2F *fHistPiPK0sVsLambdaMass; // K0s mass vs Lamba mass for all pt for Lambda
185 TH2F *fHistPiAPK0sVsALambdaMass; // K0s mass vs ALamba mass for all pt for ALambda
186 TH2F *fHistPiPALambdaVsLambdaMass; // ALambda mass vs Lambda for Lambda
187 TH2F *fHistPiAPLambdaVsALambdaMass; // Lambda mass vs ALambda for ALambda
188
189 //----------------------- K0 ----------------------------------------//
190 TH1F *fHistPiPiMass; // pi+pi- InvMass spectrum
191 TH2F *fHistPiPiMassVSPt; // pi+pi- InvMass spectrum vs pt
192 TH2F *fHistPiPiMassVSPtMCTruth; // pi+pi- InvMass spectrum vs pt MC truth
193 TH2F *fHistPiPiMassVSY; // pi+pi- InvMass spectrum vs rapidity
194 TH2F *fHistPiPiPtVSY; // pi+pi- pt vs rapidity
195
196 // TH2F *fHistPiPiMassVSAlpha; // pi+pi- InvMass spectrum vs armenteros alpha
197 TH2F *fHistPiPiRadiusXY; // pi+pi- opening angle vs mass
198 TH2F *fHistPiPiCosPointAng; // pi+pi- cosine of pointing angle vs pt or dca to vertex
199 TH2F *fHistPiPiDCADaughterPosToPrimVtxVSMass; // dca of pos. K0s daughter to prim vtx vs mass
200 TH2F *fHistPiPiDecayLengthVsPt; // pi+pi- decay lenght vs pt
201 TH2F *fHistPiPiDecayLengthVsMass; // pi+pi- decay lenght vs pt
202 TH2F *fHistPiPiDecayLengthVsCtau; // pi+pi- decay lenght vs pt
203 //TH2F *fHistPiPiMassVSPtK0L; // K0L InvMass vs pt distribution
204 TH2F *fHistPiPiDCADaughters; // pi+pi- dca between daughters
205 // TH2F *fHistPiPiPtDaughters; // pi+pi- daughters pt pos vs pt neg
206 TH2F *fHistPiPiDCAVSMass; // pi+pi- dca to prim vtx vs mass
207 TH2F *fHistPiPiDCAZPos; // dca z component of pos K0s daughter
208 TH2F *fHistPiPiDCAZNeg; // dca z component of neg K0s daughter
209 TH2F *fHistPiPiTrackLengthPosVsMass; // track length of pos K0s daughter in TPC
210 TH2F *fHistPiPiTrackLengthNegVsMass; // track length of neg K0s daughter in TPC
211 TH1F *fHistPiPiMonitorCuts; // pi+pi- cut monitor
212 TH1F *fHistPiPiMonitorMCCuts; // pi+pi- cut monitor mc
213 TH2F *fHistPiPiDecayLengthResolution; // pi+pi- decay length resolution: mcreco vs mctruth
214 //detectors
215 TH2F *fHistNclsITSPosK0; // number of clusters from ITS of positive K0s daughters
216 TH2F *fHistNclsITSNegK0; // number of clusters from ITS of negative K0s daughters
217 TH2F *fHistNclsTPCPosK0; // number of clusters from TPC of positive K0s daughters
218 TH2F *fHistNclsTPCNegK0; // number of clusters from TPC of negative K0s daughters
219 TH2F *fHistChi2PerNclsITSPosK0; // chi^2 per number of clusters ITS of positive K0s daughters
220 TH2F *fHistChi2PerNclsITSNegK0; // chi^2 per number of clusters ITS of negative K0s daughters
221 TH2F *fHistNCRowsTPCPosK0; // no of crossed rows for K0s pos daughter
222 TH2F *fHistNCRowsTPCNegK0; // no of crossed rows for K0s neg daughter
223 TH2F *fHistRatioFoundOverFinableTPCK0Pos; // ratio of ncls findable over found TPC K0s daughters
224 TH2F *fHistRatioFoundOverFinableTPCK0Neg; // ratio of ncls findable over found TPC K0s daughters
225
226 //------------------------- MC only histos ---------------------------------------------------//
227 TH2F *fHistPrimVtxZESDVSNContributorsMC; // count contributors to ESD vertex MC
228 TH2F *fHistPrimVtxZESDTPCVSNContributorsMC; // count contributors to TPC vertex MC
229 TH2F *fHistPrimVtxZESDSPDVSNContributorsMC; // count contributors to SPD vertex MC
230 TH1F *fHistMCVertexZ; // primary MC vertex position z
aa3d4e29 231 TH1F *fHistPiPiPDGCode; // PDG code of K0 mothers
5842a526 232 TH1F *fHistPiPPDGCode; // PDG code of Lambda mothers
233 TH1F *fHistPiAPPDGCode; // PDG code of Lambda mothers
234
235 TH2F *fHistPiPCosPointAngXiVsPt; // cosine of pointing angle of xis vs pt
236 TH2F *fHistPiAPCosPointAngXiVsPt; // cosine of pointing angle of xis vs pt
237 TH2F *fHistPiPMassVSPtSecXiMCTruth;
238 TH2F *fHistPiPMassVSPtSecOmegaMCTruth;
239 TH2F *fHistPiAPMassVSPtSecXiMCTruth;
240 TH2F *fHistPiAPMassVSPtSecOmegaMCTruth;
241
242 //--------------------------------- histos with secondaries' histo------------------------------//
243 TH2F *fHistV0RadiusZ[2]; // V0 decay radius z
244 TH2F *fHistV0RadiusZVSPt[2]; // V0 decay radius z vs pt
245 TH2F *fHistV0RadiusXY[2]; // V0 decay radius x vs y
246 TH2F *fHistV0RadiusXYVSY[2]; // V0 decay radius xy vs rapidity
9c758b88 247
5842a526 248 TH2F *fHistArmenteros[2]; // armenteros
249
250 //------------------------------------- Lambda -------------------------------------------------//
aa3d4e29 251 TH1F *fHistPiPMass[2]; // p+pi- InvMass spectrum
aa3d4e29 252 TH2F *fHistPiPMassVSPt[2]; // p+pi- InvMass spectrum vs pt
253 TH2F *fHistPiPMassVSPtMCTruth[2]; // p+pi- InvMass spectrum vs pt MC truth
5842a526 254 TH2F *fHistPiPMassVSY[2]; // p+pi- InvMass spectrum vs rapidity
255 TH2F *fHistPiPPtVSY[2]; // p+pi- pt vs rapidity
aa3d4e29 256 TH2F *fHistPiPRadiusXY[2]; // p+pi- opening angle vs mass
257 TH2F *fHistPiPCosPointAng[2]; // p+pi- cosine of pointing angle vs pt or dca to vertex
258 TH2F *fHistPiPDCADaughterPosToPrimVtxVSMass[2]; // dca of pos. Lambda daughter to prim vtx vs mass
5842a526 259 TH2F *fHistPiPDCADaughterNegToPrimVtxVSMass[2]; // dca of neg. Lambda daughter to prim vtx vs mass
aa3d4e29 260 TH2F *fHistPiPDecayLengthVsPt[2]; // p+pi- decay lenght vs pt
261 TH2F *fHistPiPDecayLengthVsMass[2]; // p+pi- decay lenght vs pt
262 TH2F *fHistPiPDecayLengthVsCtau[2]; // p+pi- decay lenght vs pt
263 TH2F *fHistPiPDCADaughters[2]; // p+pi- dca between daughters
5842a526 264 //TH2F *fHistPiPPtDaughters[2]; // p+pi- daughters pt pos vs pt neg
aa3d4e29 265 TH2F *fHistPiPDCAVSMass[2]; // p+pi- dca to prim vtx vs mass
266 TH1F *fHistPiPMonitorCuts[2]; // p+pi- cut monitor
267 TH1F *fHistPiPMonitorMCCuts[2]; // p+pi- cut monitor mc
268 TH2F *fHistPiPMassVSPtSecSigma[2]; // InvMass distribution vs pt of secondary lambdas from sigma truth(0) reco(1)
269 TH2F *fHistPiPMassVSPtSecXi[2]; // InvMass distribution vs pt of secondary lambdas from xi MC truth(0) reco(1)
270 TH2F *fHistPiPMassVSPtSecOmega[2]; // InvMass distribution vs pt of secondary lambdas from omega MC truth(0) reco(1)
271 TH2F *fHistPiPMassVSYSecXi[2]; // InvMass distribution vs rapidity of secondary lambdas from xi MC truth(0) reco(1)
272 TH2F *fHistPiPXi0PtVSLambdaPt[2] ; // pt of xi0 vs pt lambda truth(0) reco(1)
273 TH2F *fHistPiPXiMinusPtVSLambdaPt[2]; // pt of ximinus vs pt lambda truth(0) reco(1)
274 TH2F *fHistPiPOmegaPtVSLambdaPt[2]; // pt of omega plus vs pt alambda truth(0) reco(1)
5842a526 275 TH2F *fHistPiPDecayLengthResolution[2]; // Lambda decay length resolution MCreco vs MC truth
276 // TH2F *fHistPiPDCAZPos[2]; // dca z component of pos Lambda daughter
277 // TH2F *fHistPiPDCAZNeg[2]; // dca z component of neg Lambda daughter
278 TH2F *fHistPiPTrackLengthPosVsMass[2]; // track length of pos Lambda daughter in TPC
279 TH2F *fHistPiPTrackLengthNegVsMass[2]; // track length of neg Lambda daughter in TPC
aa3d4e29 280
5842a526 281 //---------------------------------------- Antilambda --------------------------------------------------------------//
6cdc2a74 282 TH1F *fHistPiAPMass[2]; // pi+p- InvMass spectrum
283 TH2F *fHistPiAPMassVSPt[2]; // pi+p- InvMass spectrum vs pt
284 TH2F *fHistPiAPMassVSPtMCTruth[2]; // pi+p- InvMass spectrum vs pt MC Truth
5842a526 285 TH2F *fHistPiAPMassVSY[2]; // pi+p- InvMass spectrum vs rapidity
286 TH2F *fHistPiAPPtVSY[2]; // pi+p- pt vs rapidity
6cdc2a74 287 TH2F *fHistPiAPRadiusXY[2]; // pi+p- opening angle vs mass
288 TH2F *fHistPiAPCosPointAng[2]; // pi+p- cosine of pointing angle vs pt or dca to vertex
5842a526 289 TH2F *fHistPiAPDCADaughterPosToPrimVtxVSMass[2];// dca of pos ALambda daughter to prim vtx vs mass
290 TH2F *fHistPiAPDCADaughterNegToPrimVtxVSMass[2];// dca of neg ALambda daughter to prim vtx vs mass
aa3d4e29 291 TH2F *fHistPiAPDecayLengthVsPt[2]; // pi+p- decay lenght vs pt
6cdc2a74 292 TH2F *fHistPiAPDecayLengthVsMass[2]; // pi+p- decay lenght vs pt
aa3d4e29 293 TH2F *fHistPiAPDecayLengthVsCtau[2]; // pi+p- decay lenght vs pt
6cdc2a74 294 TH2F *fHistPiAPDCADaughters[2]; // pi+p- dca between daughters
5842a526 295 // TH2F *fHistPiAPPtDaughters[2]; // pi+p- daughters pt pos vs pt neg
6cdc2a74 296 TH2F *fHistPiAPDCAVSMass[2]; // pi+p- dca to prim vtx vs mass
297 TH1F *fHistPiAPMonitorCuts[2]; // pi+p- cut monitor
aa3d4e29 298 TH1F *fHistPiAPMonitorMCCuts[2]; // pi+p- cut monitor mc
6cdc2a74 299 TH2F *fHistPiAPMassVSPtSecSigma[2]; // InvMass distribution vs pt of secondary alambdas from sigma truth(0) reco(1)
300 TH2F *fHistPiAPMassVSPtSecXi[2]; // InvMass distribution vs pt of secondary alambdas from xi MC truth(0) reco(1)
aa3d4e29 301 TH2F *fHistPiAPMassVSPtSecOmega[2]; // InvMass distribution vs pt of secondary alambdas from omega MC truth(0) reco(1)
6cdc2a74 302 TH2F *fHistPiAPMassVSYSecXi[2]; // InvMass distribution vs rapidity of secondary alambdas from xi MC truth(0) reco(1)
303 TH2F *fHistPiAPXi0PtVSLambdaPt[2] ; // pt of xi0 vs pt alambda truth(0) reco(1)
304 TH2F *fHistPiAPXiMinusPtVSLambdaPt[2]; // pt of ximinus vs pt alambda truth(0) reco(1)
aa3d4e29 305 TH2F *fHistPiAPOmegaPtVSLambdaPt[2]; // pt of omega plus vs pt alambda truth(0) reco(1)
5842a526 306 TH2F *fHistPiAPDecayLengthResolution[2]; // ALambda decay length resolution MCreco vs MC truth
307 // TH2F *fHistPiAPDCAZPos[2]; // dca z component of pos ALambda daughter
308 //TH2F *fHistPiAPDCAZNeg[2]; // dca z component of neg ALambda daughter
309 TH2F *fHistPiAPTrackLengthPosVsMass[2]; // track length of pos ALambda daughter in TPC
310 TH2F *fHistPiAPTrackLengthNegVsMass[2]; // track length of neg ALambda daughter in TPC
aa3d4e29 311
5842a526 312
313 //-------------------------------------------------------- others --------------------------------------------------//
6cdc2a74 314 //dEdx
315 TH2F *fHistDedxSecProt[2]; // dedx from proton cadidates vs pt
316 TH2F *fHistDedxSecAProt[2]; // dedx from antiproton candidates vs pt
317 TH2F *fHistDedxSecPiMinus[2]; // dedx from pi minus candidates vs pt
318 TH2F *fHistDedxSecPiPlus[2]; // dedx from pi plus candidates vs pt
aa3d4e29 319 TH2F *fHistDedxProt[2]; // dedx from proton cadidates vs pt before pidcut
320 TH2F *fHistDedxAProt[2]; // dedx from antiproton candidates vs pt before pidcut
321 TH2F *fHistDedxPiMinus[2]; // dedx from pi minus candidates vs pt before pidcut
322 TH2F *fHistDedxPiPlus[2]; // dedx from pi plus candidates vs pt before pidcut
323
5842a526 324 //clusters
6cdc2a74 325 TH2F *fHistNclsITS[2]; // number of clusters ITS pos vs neg daughters
326 TH2F *fHistNclsTPC[2]; // number of clusters TPC neg daughters vs number of crossed rows
5842a526 327 TH2F *fHistNclsITSPosL[2]; // number of clusters from ITS of positive lambda daughters
328 TH2F *fHistNclsITSNegL[2]; // number of clusters from ITS of negative lambda daughters
329 TH2F *fHistNclsTPCPosL[2]; // number of clusters from TPC of positive lambda daughters
330 TH2F *fHistNclsTPCNegL[2]; // number of clusters from TPC of negative lambda daughters
331 TH2F *fHistChi2PerNclsITSPosL[2]; // chi^2 per number of clusters ITS of positive lambda daughters
332 TH2F *fHistChi2PerNclsITSNegL[2]; // chi^2 per number of clusters ITS of negative lambda daughters
333 TH2F *fHistNCRowsTPCPosL[2]; // number of crossed rows for Lambda pos daughter
334 TH2F *fHistNCRowsTPCNegL[2]; // number of crossed rows for Lambda neg daughter
335 TH2F *fHistRatioFoundOverFinableTPCLPos[2]; // ratio of ncls findable over found TPC L daughters
336 TH2F *fHistRatioFoundOverFinableTPCLNeg[2]; // ratio of ncls findable over found TPC L daughters
6cdc2a74 337 TH2F *fHistPiPiEtaDMC[2]; // eta of daughters vs pt K0s MC truth raw(0) after cuts(1)
338 TH2F *fHistPiPEtaDMC[2]; // eta of daughters vs pt lambda MC truth raw(0) after cuts(1)
339 TH2F *fHistPiPiEtaDReco[2]; // eta of daughters ESD track vs eta AliESDv0 or vs pt K0s raw(0) after cuts(1)
340 TH2F *fHistPiPEtaDReco[2]; // eta of daughters ESD track vs eta AliESDv0 or vs pt (a)lambda raw(0) after cuts(1)
341
342 /*
343 //user shift
344 TH1F *fHistUserPtShift;//monitor user defined charge/pt shift
345 */
9c758b88 346
347
348
6cdc2a74 349 //---------------------------------- Variables--------------------------------------------//
350
351 //--cut options --//
352 //MC only
aa3d4e29 353 Bool_t fMCMode; // run over MC general yes/no
354 Bool_t fMCTruthMode; // MC truth selection yes/no
355 Bool_t fSelectInjected; // for MC with injected signals, select only injected
356 Bool_t fSelectMBMotherMC; // for MC with injected signals, select only MB MC mother for sec. Lambdas
357 Bool_t fCheckNegLabelReco; // reject MC truth and reco for neg labels in reco
358 Bool_t fOnlyFoundRecoV0; // reject MC truth if reco V0 not found
6cdc2a74 359
360 // Calculate centrality
aa3d4e29 361 Int_t fUseCentrality; // use centrality (0=off(default),1=VZERO,2=SPD)
362 Int_t fUseCentralityBin; // centrality bin to be used
363 Int_t fUseCentralityRange; // use centrality (0=off(default),1=VZERO,2=SPD)
6cdc2a74 364
365 //pp analysis
aa3d4e29 366 Bool_t fAnapp; // flag for pp analysis
5842a526 367 Bool_t fRejectPileUpSPD; // reject pileup events from SPD
aa3d4e29 368 Bool_t fSelSDD; // select pp events with SDD (for pp 2.76TeV LHC11a)
369 Bool_t fSelNoSDD; // select pp events with no SDD (for pp 2.76TeV LHC11a)
6cdc2a74 370 //onthefly
aa3d4e29 371 Bool_t fOntheFly; // true if onfly finder shall be used
6cdc2a74 372
373 //vertex
aa3d4e29 374 Double_t fVertexZCut; // z vertex cut value
375 Bool_t fVtxStatus; // vertex cut on/off
6cdc2a74 376
11e769d9 377 //esdtrackcuts
378 Int_t fNcr; // esd track cuts: number of crossed rows TPC for V0 daughters
379 Double_t fChi2cls; // esd track cuts: chi2 per cluster TPC for V0 daughters
380 Bool_t fTPCrefit; // esd track cuts: tpc refit for V0 daughters
381 Int_t fNcrCh; // esd track cuts: number of crossed rows TPC for charged
382 Double_t fChi2clsCh; // esd track cuts: chi2 per cluster TPC for charged
383 Bool_t fTPCrefitCh; // esd track cuts: tpc refit for charged
384 Int_t fNcrLpt; // esd track cuts: number of crossed rows TPC for low pt
385 Double_t fChi2clsLpt; // esd track cuts: chi2 per cluster TPC for low pt
386 Bool_t fTPCrefitLpt; // esd track cuts: tpc refit for low pt
387
6cdc2a74 388 //PID
5842a526 389 Bool_t fUsePID; // use proton pid yes/no
390 Bool_t fUsePIDPion; // use pion pid yes/no
aa3d4e29 391 Double_t fNSigma; // set nsigma value
5842a526 392 Double_t fNSigma2; // set nsigma 2 value
aa3d4e29 393 Double_t fPPIDcut; // set max momentum for pid cut usage
394 Double_t fPtTPCCut; // low pt limit cut for TPC cluster cuts from AliESDtrackCuts
395 Bool_t fMoreNclsThanRows; // cut on ncls>ncrossed rows yes/no
396 Bool_t fMoreNclsThanFindable; // cut on ncls>nfindable cls yes/no
397 Bool_t fMoreNclsThanFindableMax; // cut on ncls>nfindable max cls yes/no
398 Double_t fRatioFoundOverFindable; // cut on found over findable clusters TPC
399 Double_t fRatioMaxCRowsOverFindable;// cut on crossed rows over finable max
400 Double_t fChi2PerClusterITS; // cut on chi2 per ITS cluster
11e769d9 401 Double_t fDistanceTPCInner; // cut on distance of daughters at TPC entrance
5842a526 402 Int_t fMinNCLSITSPos; // min ncls ITS of pos daugter cut
403 Int_t fMinNCLSITSNeg; // min ncls ITS of neg daugter cut
404 Int_t fMaxNCLSITSPos; // max ncls ITS of pos daugter cut
405 Int_t fMaxNCLSITSNeg; // max ncls ITS of neg daugter cut
406 Bool_t fSwitchCaseITSCls; // apply pos and neg ITS cls cluster cut with
407 // or for both daughters for at least one of the daughters shall have ...
408 Bool_t fCutMITrackLength; // cut on geom track length in TPC as Marian Ivanov sugg.
409 Bool_t fCutMICrossedR; // cut on crossed rows in TPC as Marian Ivanov sugg.
410 Bool_t fCutMITPCncls; // cut on ncls in TPC as Marian Ivanov sugg.
411 Double_t fCutMITrackLengthLengthF; // cut on track length in TPC as Marian Ivanov sugg. length factor
412 Double_t fCutMICrossedRLengthF; // cut on crossed rows in TPC as Marian Ivanov sugg. length factor
413
6cdc2a74 414 //rapidity
aa3d4e29 415 Bool_t fRapCutV0; // use rapidity cut for V0 yes/no
416 Double_t fRap; // user defined value for rapidity cut
6cdc2a74 417
418 //eta and pt
aa3d4e29 419 Double_t fEtaCutMCDaughters; // eta cut for MC daughters on/off
420 Double_t fEtaCutMCDaughtersVal; // eta cut value for MC daughters
421 // Double_t fEtaSignCut; // eta cutsign daughters
422 Double_t fMinPt; // pt min cut value
6cdc2a74 423
424 //armenteros
aa3d4e29 425 Double_t fAlfaCut; // set alpha armenteros cut value
426 Double_t fQtCut; // set ptmax for qt armenteros cut
5842a526 427 Double_t fQtCutPt; // set ptmax for qt armenteros cut
aa3d4e29 428 Double_t fQtCutPtLow; // set ptmin for qt armenteros cut
429 Bool_t fArmCutK0; // set armenteros cut on/off for K0s
430 Bool_t fArmCutL; // set armenteros cut on/off for Lambda
431 Double_t fArmQtSlope; // slope for armenteros K0s cut: qt = alpha*slope
6cdc2a74 432 //others
aa3d4e29 433 Double_t fExcludeLambdaFromK0s; // exlude Lambda mass from K0s throuh mass difference below this value
434 Double_t fExcludeK0sFromLambda; // exlude K0s mass from Lambda throuh mass difference below this value
435 Double_t fDCAToVertexK0; // dca of V0 to vertex cut value K0s
436 Double_t fDCAToVertexL; // dca of V0 to vertex cut value L/AL
437 Double_t fDCAXK; // dca in x of K0s to vertex cut value
438 Double_t fDCAYK; // dca in y of K0s to vertex cut value
439 Double_t fDCAXL; // dca in x of Lambda to vertex cut value
440 Double_t fDCAYL; // dca in y of Lambda to vertex cut value
441 Double_t fDCAZ; // dca in z of V0 to vertex cut value
9c758b88 442
aa3d4e29 443 Double_t fDCADaughtersL; // dca between Lambda daughters cut value
444 Double_t fDCADaughtersAL; // dca between ALambda daughters cut value
445 Double_t fDCADaughtersK0; // dca between K0s daughters cut value
9c758b88 446
aa3d4e29 447 Double_t fDCADaughtersToVtxLarge; // dca large between V0 daughters and vertex cut value
448 Double_t fDCADaughtersToVtxSmall; // dca small between V0 daughters and vertex cut value
9c758b88 449
aa3d4e29 450 Double_t fDecayRadXYMin; // minmal decay radius in x-y cut value
451 Double_t fDecayRadXYMax; // maximal decay radius in x-y cut value
9c758b88 452
aa3d4e29 453 Double_t fCosPointAngL; // cosine of pointing angle cut value for Lambda and ALambda
454 Double_t fCosPointAngK; // cosine of pointing angle cut value for K0s
455 Double_t fCPAPtCutK0; // pt max for cosine of pointing angle cut K0s
456 Double_t fCPAPtCutL; // pt max for cosine of pointing angle cut Lambda
457 Double_t fOpengAngleDaughters; // cut on opening angle between V0 daughters
458 Double_t fOpAngPtCut; // max pt for using the opening angle between V0 daughters cut
5117e418 459
aa3d4e29 460 Double_t fDecayLengthMax; // maximal decay length in x-y-z cut value
461 Double_t fDecayLengthMin; // minimal decay length in x-y-z cut value
9c758b88 462
5842a526 463 Double_t fDecRadCutITSMin; // radius min for ITS cluster cut
464 Double_t fDecRadCutITSMax; // radius max for ITS cluster cut
465
6cdc2a74 466 //ctau
aa3d4e29 467 Double_t fCtauK0s; // multiple of ctau cut value for K0s
468 Double_t fCtauL; // multiple of ctau cut value for Lambda
469 Double_t fCtauPtCutK0; // pt max for ctau cut usage for K0s
470 Double_t fCtauPtCutL; // pt max for ctau cut usage for Lambda
9c758b88 471
6cdc2a74 472 //KF particle chi cut
5842a526 473 // Double_t fChiCutKf; //cut value of chi2 of AliKFParticle
474 Bool_t fChiCutKf; //cut value of chi2 of AliKFParticle
9c758b88 475
5842a526 476 Double_t fK0sLowMassCut; //lower cut on K0s mass
477 Double_t fK0sHighMassCut; //higher cut on K0s mass
478
479 Double_t fLLowMassCut; //lower cut on Lambda mass
480 Double_t fLHighMassCut; //higher cut on lambda mass
481
482
483 Bool_t fSetFillDetAL; // fill det histo with AL instead of Lambda
484 Bool_t fSetPtDepHist; // fill pt instead of mass
6cdc2a74 485 /*
486 // option for user defined charge/pt shift
487 Bool_t fShift;// shift yes/no
488 Double_t fDeltaInvP;//define shift value
489 */
9c758b88 490
491
6cdc2a74 492 AliAnalysisTaskV0ForRAA(const AliAnalysisTaskV0ForRAA&);
493 AliAnalysisTaskV0ForRAA&operator=(const AliAnalysisTaskV0ForRAA&);
9c758b88 494
76a4d7a7 495 ClassDef(AliAnalysisTaskV0ForRAA,1);
9c758b88 496};
497#endif