42 #include "TMCProcess.h"
43 #include "TParticle.h"
48 #include "AliMCEvent.h"
49 #include "AliESDEvent.h"
50 #include "AliAODEvent.h"
51 #include "AliVParticle.h"
52 #include "AliVVZERO.h"
53 #include "AliMCParticle.h"
54 #include "AliESDkink.h"
56 #include "AliESDtrack.h"
57 #include "AliESDMuonTrack.h"
58 #include "AliMultiplicity.h"
59 #include "AliMultSelection.h"
60 #include "AliAODTrack.h"
61 #include "AliAODTracklets.h"
66 #include "AliESDpid.h"
67 #include "AliESDPmdTrack.h"
68 #include "AliESDUtils.h"
71 #include "AliKFParticle.h"
72 #include "AliESDVZERO.h"
74 #include "AliAnalysisManager.h"
75 #include "AliPIDResponse.h"
87 fAliESDtrackCuts(NULL),
91 fCutMChasTrackReferences(kFALSE),
92 fCutMCprocessType(kFALSE),
93 fMCprocessType(kPNoProcess),
96 fCutMCfirstMotherPID(kFALSE),
98 fIgnoreSignInMCPID(kFALSE),
99 fCutMCisPrimary(kFALSE),
100 fRequireTransportBitForPrimaries(kTRUE),
101 fMCisPrimary(kFALSE),
102 fRequireCharge(kFALSE),
104 fCutSPDtrackletDeltaPhi(kFALSE),
105 fSPDtrackletDeltaPhiMax(FLT_MAX),
106 fSPDtrackletDeltaPhiMin(-FLT_MAX),
107 fIgnoreTPCzRange(kFALSE),
108 fIgnoreTPCzRangeMax(FLT_MAX),
109 fIgnoreTPCzRangeMin(-FLT_MAX),
110 fCutChi2PerClusterTPC(kFALSE),
111 fMaxChi2PerClusterTPC(FLT_MAX),
112 fMinChi2PerClusterTPC(-FLT_MAX),
113 fCutNClustersTPC(kFALSE),
114 fNClustersTPCMax(INT_MAX),
115 fNClustersTPCMin(INT_MIN),
116 fCutNClustersITS(kFALSE),
117 fNClustersITSMax(INT_MAX),
118 fNClustersITSMin(INT_MIN),
119 fUseAODFilterBit(kTRUE),
121 fCutDCAToVertexXY(kFALSE),
122 fCutDCAToVertexZ(kFALSE),
123 fCutMinimalTPCdedx(kFALSE),
125 fCutTPCSecbound(kFALSE),
126 fLinearizeVZEROresponse(kFALSE),
127 fCentralityPercentileMin(0.),
128 fCentralityPercentileMax(5.),
134 fCutPmdNcell(kFALSE),
136 fMinKinkAngle(TMath::DegToRad()*2.),
137 fMinKinkRadius(130.),
138 fMaxKinkRadius(200.),
141 fMinKinkInvMassKmu(0.),
142 fMaxKinkInvMassKmu(0.6),
143 fForceTPCstandalone(kFALSE),
144 fRequireKinkDaughters(kFALSE),
155 fTrackLabel(INT_MIN),
161 fBayesianResponse(NULL),
165 fParticleID(AliPID::kUnknown),
166 fParticleProbability(.9),
167 fAllowTOFmismatchFlag(kFALSE),
168 fRequireStrictTOFTPCagreement(kFALSE),
169 fCutRejectElectronsWithTPCpid(kFALSE),
173 fVZEROgainEqualization(NULL),
174 fVZEROgainEqualizationCen(NULL),
175 fApplyRecentering(kFALSE),
176 fVZEROgainEqualizationPerRing(kFALSE),
184 fPurityFunctionsFile(0),
185 fPurityFunctionsList(0),
186 fCutITSclusterShared(kFALSE),
187 fMaxITSclusterShared(0),
199 fBayesianResponse->SetNewTrackParam();
200 for(
Int_t i(0); i < 4; i++) {
204 for(
Int_t i(0); i < 8; i++) fUseVZERORing[i] = kTRUE;
206 for(
Int_t i(0) ; i < 180; i++) {
207 fPurityFunction[i]=NULL;
215 fAliESDtrackCuts(NULL),
216 fMuonTrackCuts(NULL),
219 fCutMChasTrackReferences(kFALSE),
220 fCutMCprocessType(kFALSE),
221 fMCprocessType(kPNoProcess),
224 fCutMCfirstMotherPID(kFALSE),
225 fMCfirstMotherPID(0),
226 fIgnoreSignInMCPID(kFALSE),
227 fCutMCisPrimary(kFALSE),
228 fRequireTransportBitForPrimaries(kTRUE),
229 fMCisPrimary(kFALSE),
230 fRequireCharge(kFALSE),
232 fCutSPDtrackletDeltaPhi(kFALSE),
233 fSPDtrackletDeltaPhiMax(FLT_MAX),
234 fSPDtrackletDeltaPhiMin(-FLT_MAX),
235 fIgnoreTPCzRange(kFALSE),
236 fIgnoreTPCzRangeMax(FLT_MAX),
237 fIgnoreTPCzRangeMin(-FLT_MAX),
238 fCutChi2PerClusterTPC(kFALSE),
239 fMaxChi2PerClusterTPC(FLT_MAX),
240 fMinChi2PerClusterTPC(-FLT_MAX),
241 fCutNClustersTPC(kFALSE),
242 fNClustersTPCMax(INT_MAX),
243 fNClustersTPCMin(INT_MIN),
244 fCutNClustersITS(kFALSE),
245 fNClustersITSMax(INT_MAX),
246 fNClustersITSMin(INT_MIN),
247 fUseAODFilterBit(kTRUE),
249 fCutDCAToVertexXY(kFALSE),
250 fCutDCAToVertexZ(kFALSE),
251 fCutMinimalTPCdedx(kFALSE),
253 fCutTPCSecbound(kFALSE),
254 fLinearizeVZEROresponse(kFALSE),
255 fCentralityPercentileMin(0.),
256 fCentralityPercentileMax(5.),
262 fCutPmdNcell(kFALSE),
264 fMinKinkAngle(TMath::DegToRad()*2.),
265 fMinKinkRadius(130.),
266 fMaxKinkRadius(200.),
269 fMinKinkInvMassKmu(0.0),
270 fMaxKinkInvMassKmu(0.6),
271 fForceTPCstandalone(kFALSE),
272 fRequireKinkDaughters(kFALSE),
283 fTrackLabel(INT_MIN),
289 fBayesianResponse(NULL),
293 fParticleID(AliPID::kUnknown),
294 fParticleProbability(.9),
295 fAllowTOFmismatchFlag(kFALSE),
296 fRequireStrictTOFTPCagreement(kFALSE),
297 fCutRejectElectronsWithTPCpid(kFALSE),
301 fVZEROgainEqualization(NULL),
302 fVZEROgainEqualizationCen(NULL),
303 fApplyRecentering(kFALSE),
304 fVZEROgainEqualizationPerRing(kFALSE),
312 fPurityFunctionsFile(0),
313 fPurityFunctionsList(0),
314 fCutITSclusterShared(kFALSE),
315 fMaxITSclusterShared(0),
321 SetTitle(
"AliFlowTrackCuts");
322 fESDpid.GetTPCResponse().SetBetheBlochParameters( 0.0283086,
331 for(
Int_t i(0); i < 4; i++) {
337 for(
int i=0;i<180;i++){
346 fAliESDtrackCuts(NULL),
347 fMuonTrackCuts(NULL),
350 fCutMChasTrackReferences(that.fCutMChasTrackReferences),
351 fCutMCprocessType(that.fCutMCprocessType),
352 fMCprocessType(that.fMCprocessType),
353 fCutMCPID(that.fCutMCPID),
355 fCutMCfirstMotherPID(that.fCutMCfirstMotherPID),
356 fMCfirstMotherPID(that.fMCfirstMotherPID),
357 fIgnoreSignInMCPID(that.fIgnoreSignInMCPID),
358 fCutMCisPrimary(that.fCutMCisPrimary),
359 fRequireTransportBitForPrimaries(that.fRequireTransportBitForPrimaries),
360 fMCisPrimary(that.fMCisPrimary),
361 fRequireCharge(that.fRequireCharge),
362 fFakesAreOK(that.fFakesAreOK),
363 fCutSPDtrackletDeltaPhi(that.fCutSPDtrackletDeltaPhi),
364 fSPDtrackletDeltaPhiMax(that.fSPDtrackletDeltaPhiMax),
365 fSPDtrackletDeltaPhiMin(that.fSPDtrackletDeltaPhiMin),
366 fIgnoreTPCzRange(that.fIgnoreTPCzRange),
367 fIgnoreTPCzRangeMax(that.fIgnoreTPCzRangeMax),
368 fIgnoreTPCzRangeMin(that.fIgnoreTPCzRangeMin),
369 fCutChi2PerClusterTPC(that.fCutChi2PerClusterTPC),
370 fMaxChi2PerClusterTPC(that.fMaxChi2PerClusterTPC),
371 fMinChi2PerClusterTPC(that.fMinChi2PerClusterTPC),
372 fCutNClustersTPC(that.fCutNClustersTPC),
373 fNClustersTPCMax(that.fNClustersTPCMax),
374 fNClustersTPCMin(that.fNClustersTPCMin),
375 fCutNClustersITS(that.fCutNClustersITS),
376 fNClustersITSMax(that.fNClustersITSMax),
377 fNClustersITSMin(that.fNClustersITSMin),
378 fUseAODFilterBit(that.fUseAODFilterBit),
379 fAODFilterBit(that.fAODFilterBit),
380 fCutDCAToVertexXY(that.fCutDCAToVertexXY),
381 fCutDCAToVertexZ(that.fCutDCAToVertexZ),
382 fCutMinimalTPCdedx(that.fCutMinimalTPCdedx),
383 fMinimalTPCdedx(that.fMinimalTPCdedx),
384 fCutTPCSecbound(that.fCutTPCSecbound),
385 fLinearizeVZEROresponse(that.fLinearizeVZEROresponse),
386 fCentralityPercentileMin(that.fCentralityPercentileMin),
387 fCentralityPercentileMax(that.fCentralityPercentileMax),
388 fPurityLevel(that.fPurityLevel),
389 fCutPmdDet(that.fCutPmdDet),
390 fPmdDet(that.fPmdDet),
391 fCutPmdAdc(that.fCutPmdAdc),
392 fPmdAdc(that.fPmdAdc),
393 fCutPmdNcell(that.fCutPmdNcell),
394 fPmdNcell(that.fPmdNcell),
395 fMinKinkAngle(that.fMinKinkAngle),
396 fMinKinkRadius(that.fMinKinkRadius),
397 fMaxKinkRadius(that.fMaxKinkRadius),
398 fMinKinkQt(that.fMinKinkQt),
399 fMaxKinkQt(that.fMaxKinkQt),
400 fMinKinkInvMassKmu(that.fMinKinkInvMassKmu),
401 fMaxKinkInvMassKmu(that.fMaxKinkInvMassKmu),
402 fForceTPCstandalone(that.fForceTPCstandalone),
403 fRequireKinkDaughters(that.fRequireKinkDaughters),
404 fParamType(that.fParamType),
405 fParamMix(that.fParamMix),
414 fTrackLabel(INT_MIN),
419 fESDpid(that.fESDpid),
420 fBayesianResponse(NULL),
421 fPIDsource(that.fPIDsource),
424 fParticleID(that.fParticleID),
425 fParticleProbability(that.fParticleProbability),
426 fAllowTOFmismatchFlag(that.fAllowTOFmismatchFlag),
427 fRequireStrictTOFTPCagreement(that.fRequireStrictTOFTPCagreement),
428 fCutRejectElectronsWithTPCpid(that.fCutRejectElectronsWithTPCpid),
431 fPtTOFPIDoff(that.fPtTOFPIDoff),
432 fVZEROgainEqualization(NULL),
433 fVZEROgainEqualizationCen(NULL),
434 fApplyRecentering(that.fApplyRecentering),
435 fVZEROgainEqualizationPerRing(that.fVZEROgainEqualizationPerRing),
436 fDivSigma(that.fDivSigma),
441 fPIDResponse(that.fPIDResponse),
442 fNsigmaCut2(that.fNsigmaCut2),
443 fPurityFunctionsFile(that.fPurityFunctionsFile),
444 fPurityFunctionsList(that.fPurityFunctionsList),
445 fCutITSclusterShared(kFALSE),
446 fMaxITSclusterShared(0),
465 fBayesianResponse->SetNewTrackParam();
471 for(
Int_t i(0); i < 4; i++) {
477 for(
Int_t i(0); i < 180; i++) {
487 if (
this==&that)
return *
this;
594 #if ROOT_VERSION_CODE < ROOT_VERSION(5,99,0)
603 for(
Int_t i(0); i < 4; i++) {
630 if (
fQA) {
fQA->SetOwner();
fQA->Delete();
delete fQA; }
659 for(
int i=0;i<180;i++){
683 AliInputEventHandler* inputHandler = (AliInputEventHandler*) (man->GetInputEventHandler());
684 if(inputHandler)
fPIDResponse=inputHandler->GetPIDResponse();
698 fESDpid.SetTOFResponse(myESD,AliESDpid::kTOF_T0);
703 if(myAOD->GetTOFHeader()){
704 fESDpid.SetTOFResponse(myAOD,AliESDpid::kTOF_T0);
725 fESDpid.GetTPCResponse().SetBetheBlochParameters( 2.15898e+00/50.,
737 AliVParticle* vparticle =
dynamic_cast<AliVParticle*
>(obj);
746 AliMultiplicity* tracklets =
dynamic_cast<AliMultiplicity*
>(obj);
747 if (tracklets)
return PassesCuts(tracklets,
id);
748 AliAODTracklets* trkletAOD =
dynamic_cast<AliAODTracklets*
>(obj);
749 if (trkletAOD)
return PassesCuts(trkletAOD,
id);
750 AliESDPmdTrack* pmdtrack =
dynamic_cast<AliESDPmdTrack*
>(obj);
752 AliVVZERO* vvzero =
dynamic_cast<AliVVZERO*
>(obj);
754 AliESDkink* kink =
dynamic_cast<AliESDkink*
>(obj);
766 AliVParticle* vparticle =
dynamic_cast<AliVParticle*
>(obj);
771 AliMultiplicity* tracklets =
dynamic_cast<AliMultiplicity*
>(obj);
774 Int_t label0 = tracklets->GetLabel(
id,0);
775 Int_t label1 = tracklets->GetLabel(
id,1);
777 if (label0!=label1) label = -666;
798 if (
id<0)
return kFALSE;
806 if (
fCutEta) {
if ( fTrackEta < fEtaMin || fTrackEta >=
fEtaMax )
return kFALSE;}
807 if (
fCutPhi) {
if ( fTrackPhi < fPhiMin || fTrackPhi >=
fPhiMax )
return kFALSE;}
812 Int_t label0 = tracklet->GetLabel(
id,0);
813 Int_t label1 = tracklet->GetLabel(
id,1);
815 fTrackLabel = (label0==label1)?tracklet->GetLabel(
id,1):-1;
829 if (
id<0)
return kFALSE;
836 fTrackEta = -1.*TMath::Log(TMath::Tan(tracklet->GetTheta(
id)/2.));
838 if (
fCutEta) {
if ( fTrackEta < fEtaMin || fTrackEta >=
fEtaMax )
return kFALSE;}
839 if (
fCutPhi) {
if ( fTrackPhi < fPhiMin || fTrackPhi >=
fPhiMax )
return kFALSE;}
844 Int_t label0 = tracklet->GetLabel(
id,0);
845 Int_t label1 = tracklet->GetLabel(
id,1);
847 fTrackLabel = (label0==label1)?tracklet->GetLabel(
id,1):-1;
859 if (!mcEvent)
return kFALSE;
860 if (label<0)
return kFALSE;
861 AliMCParticle* mcparticle =
static_cast<AliMCParticle*
>(mcEvent->GetTrack(label));
862 if (!mcparticle) {AliError(
"no MC track");
return kFALSE;}
870 Int_t pdgCode = mcparticle->PdgCode();
873 if (TMath::Abs(
fMCPID) != TMath::Abs(pdgCode))
return kFALSE;
877 if (
fMCPID != pdgCode)
return kFALSE;
883 TParticle* tparticle=mcparticle->Particle();
884 Int_t firstMotherLabel = 0;
885 if (tparticle) { firstMotherLabel = tparticle->GetFirstMother(); }
886 AliVParticle* firstMotherParticle = mcEvent->GetTrack(firstMotherLabel);
887 Int_t pdgcodeFirstMother = 0;
888 if (firstMotherParticle) { pdgcodeFirstMother = firstMotherParticle->PdgCode(); }
893 TParticle* particle = mcparticle->Particle();
894 Int_t processID = particle->GetUniqueID();
899 if (mcparticle->GetNumberOfTrackReferences()<1)
return kFALSE;
922 fV0 =
const_cast<AliESDv0*
>(v0);
927 if (!v0->GetOnFlyStatus())
return kFALSE;
928 const AliExternalTrackParam *negHelix=v0->GetParamN();
929 const AliExternalTrackParam *posHelix=v0->GetParamP();
930 AliVParticle *v0tracks[2];
931 v0tracks[0] =
fEvent->GetTrack(v0->GetNindex());
932 v0tracks[1] =
fEvent->GetTrack(v0->GetPindex());
933 if( v0tracks[1]->Charge() < 0)
935 v0tracks[1] =
fEvent->GetTrack(v0->GetNindex());
936 v0tracks[0] =
fEvent->GetTrack(v0->GetPindex());
937 negHelix=v0->GetParamP();
938 posHelix=v0->GetParamN();
941 int KalmanPidPairs[4][2] =
952 AliKFParticle v0trackKFneg(*(negHelix),KalmanPidPairs[
id][0]);
953 AliKFParticle v0trackKFpos(*(posHelix),KalmanPidPairs[
id][1]);
954 AliKFParticle v0particleRefit;
955 v0particleRefit += v0trackKFneg;
956 v0particleRefit += v0trackKFpos;
958 v0particleRefit.GetMass(
fTrackMass,invMassErr);
962 fTrackPhi = TMath::Pi()+v0particleRefit.GetPhi();
971 if ( v0tracks[0]->Charge() == v0tracks[1]->Charge() ) pass=kFALSE;
972 if ( v0tracks[0]->Pt()<0.15 || v0tracks[1]->Pt()<0.15 ) pass=kFALSE;
984 fKink=
const_cast<AliESDkink*
>(kink);
988 Float_t kinkAngle = kink->GetAngle(2);
991 if (kinkRadius<fMinKinkRadius || kinkRadius>
fMaxKinkRadius) pass = kFALSE;
994 const TVector3 motherMfromKink(kink->GetMotherP());
995 const TVector3 daughterMfromKink(kink->GetDaughterP());
997 if ( qt < fMinKinkQt || qt >
fMaxKinkQt) pass = kFALSE;
1000 Float_t energyDaughterMu = TMath::Sqrt( daughterMfromKink.Mag()*daughterMfromKink.Mag()+
1001 0.105658*0.105658 );
1002 Float_t p1XM = motherMfromKink.Px();
1003 Float_t p1YM = motherMfromKink.Py();
1004 Float_t p1ZM = motherMfromKink.Pz();
1005 Float_t p2XM = daughterMfromKink.Px();
1006 Float_t p2YM = daughterMfromKink.Py();
1007 Float_t p2ZM = daughterMfromKink.Pz();
1008 Float_t p3Daughter = TMath::Sqrt( ((p1XM-p2XM)*(p1XM-p2XM))+((p1YM-p2YM)*(p1YM-p2YM))+
1009 ((p1ZM-p2ZM)*(p1ZM-p2ZM)) );
1010 Double_t invariantMassKmu = TMath::Sqrt( (energyDaughterMu+p3Daughter)*(energyDaughterMu+p3Daughter)-
1011 motherMfromKink.Mag()*motherMfromKink.Mag() );
1019 if (pass)
QAafter(13)->Fill(qt);
1020 QAbefore(14)->Fill(invariantMassKmu);
1021 if (pass)
QAafter(14)->Fill(invariantMassKmu);
1022 const Double_t* kinkPosition = kink->GetPosition();
1023 QAbefore(15)->Fill(kinkPosition[0],kinkPosition[1]);
1024 if (pass)
QAafter(15)->Fill(kinkPosition[0],kinkPosition[1]);
1025 QAbefore(16)->Fill(motherMfromKink.Mag(),kinkAngle*TMath::RadToDeg());
1026 if (pass)
QAafter(16)->Fill(motherMfromKink.Mag(),kinkAngle*TMath::RadToDeg());
1030 Int_t indexKinkMother = kink->GetIndex(0);
1031 AliESDtrack* motherTrack =
dynamic_cast<AliESDtrack*
>(
fEvent->GetTrack(indexKinkMother));
1032 if (!motherTrack)
return kFALSE;
1055 Bool_t isMCparticle = kFALSE;
1056 AliESDtrack* esdTrack =
dynamic_cast<AliESDtrack*
>(vparticle);
1057 AliAODTrack* aodTrack = NULL;
1068 isMCparticle = (
dynamic_cast<AliMCParticle*
>(
fTrack))!=NULL;
1069 aodTrack =
dynamic_cast<AliAODTrack*
>(vparticle);
1074 if (!
fTrack)
return kFALSE;
1076 if (esdTrack) esdTrack =
static_cast<AliESDtrack*
>(
fTrack);
1082 if (
fCutPt) {
if (pt < fPtMin || pt >=
fPtMax ) pass=kFALSE;}
1091 if (charge!=
fCharge) pass=kFALSE;
1099 if (esdTrack) {
if (!
PassesESDcuts(esdTrack)) { pass=kFALSE; } }
1100 if (aodTrack) {
if (!
PassesAODcuts(aodTrack,pass)) { pass=kFALSE; } }
1107 Int_t processID = tparticle->GetUniqueID();
1108 Int_t firstMotherLabel = tparticle->GetFirstMother();
1116 AliVParticle* firstMotherParticle =
fMCevent->GetTrack(firstMotherLabel);
1117 Int_t pdgcodeFirstMother = 0;
1118 if (firstMotherParticle) {pdgcodeFirstMother = firstMotherParticle->PdgCode();}
1121 switch (TMath::Abs(pdgcode))
1124 pdg = AliPID::kElectron + 0.5;
break;
1126 pdg = AliPID::kMuon + 0.5;
break;
1128 pdg = AliPID::kPion + 0.5;
break;
1130 pdg = AliPID::kKaon + 0.5;
break;
1134 pdg = AliPID::kUnknown + 0.5;
break;
1136 pdg = TMath::Sign(pdg,static_cast<Float_t>(pdgcode));
1139 switch (pdgcodeFirstMother)
1150 case 12:
case 14:
case 16:
1279 QAbefore(3)->Fill(p,primary?0.5:-0.5);
1280 QAbefore(4)->Fill(p,static_cast<Float_t>(processID));
1281 QAbefore(7)->Fill(p,geantCode+0.5);
1282 if (pass)
QAafter(2)->Fill(p,pdg);
1283 if (pass)
QAafter(3)->Fill(p,primary?0.5:-0.5);
1284 if (pass)
QAafter(4)->Fill(p,static_cast<Float_t>(processID));
1285 if (pass)
QAafter(7)->Fill(p,geantCode);
1302 Int_t ntpccls = track->GetTPCNcls();
1308 Int_t nitscls = track->GetITSNcls();
1314 Double_t chi2tpc = track->Chi2perNDF();
1318 if (
GetRequireTPCRefit() && !(track->GetStatus() & AliESDtrack::kTPCrefit) ) pass=kFALSE;
1319 if (
GetRequireITSRefit() && !(track->GetStatus() & AliESDtrack::kITSrefit) ) pass=kFALSE;
1325 if (std::abs((
Int_t)DCAxy)==999 || std::abs((
Int_t)DCAz)==999) {
1328 Double_t pos[3] = {-99., -99., -99.};
1329 track->GetPosition(pos);
1330 if(pos[0]*pos[0]+pos[1]*pos[1] <= 3.*3.) {
1331 AliAODTrack copy(*track);
1333 Double_t bCov[3] = {-99., -99., -99.};
1334 if(copy.PropagateToDCA(
fEvent->GetPrimaryVertex(),
fEvent->GetMagneticField(), 100., b, bCov)) {
1343 Double_t dedx = track->GetTPCsignal();
1348 track->GetIntegratedTimes(time);
1351 Double_t xyz[3]={-9999.,-9999.,-9999.};
1352 const double r = 84.;
1353 if (!track->GetXYZatR(r,
fEvent->GetMagneticField(), xyz, NULL)) pass=kFALSE;
1354 Double_t cra = TMath::ATan2(xyz[1],xyz[0]);
1355 Double_t dpe = 3.*TMath::TwoPi()/360.;
1356 for(
Int_t nb=-9; nb<=9; nb++) {
1358 if(cra<bnp+dpe && cra>bnp-dpe) pass=kFALSE;
1369 Double_t momTPC = track->GetTPCmomentum();
1373 QAbefore( 5)->Fill(track->Pt(),DCAxy);
1374 QAbefore( 6)->Fill(track->Pt(),DCAz);
1375 if (pass)
QAafter( 1)->Fill(momTPC,dedx);
1376 if (pass)
QAafter( 5)->Fill(track->Pt(),DCAxy);
1377 if (pass)
QAafter( 6)->Fill(track->Pt(),DCAz);
1378 QAbefore( 8)->Fill(track->P(),(track->GetTOFsignal()-time[AliPID::kElectron]));
1379 if (pass)
QAafter( 8)->Fill(track->P(),(track->GetTOFsignal()-time[AliPID::kElectron]));
1380 QAbefore( 9)->Fill(track->P(),(track->GetTOFsignal()-time[AliPID::kMuon]));
1381 if (pass)
QAafter( 9)->Fill(track->P(),(track->GetTOFsignal()-time[AliPID::kMuon]));
1382 QAbefore(10)->Fill(track->P(),(track->GetTOFsignal()-time[AliPID::kPion]));
1383 if (pass)
QAafter( 10)->Fill(track->P(),(track->GetTOFsignal()-time[AliPID::kPion]));
1384 QAbefore(11)->Fill(track->P(),(track->GetTOFsignal()-time[AliPID::kKaon]));
1385 if (pass)
QAafter( 11)->Fill(track->P(),(track->GetTOFsignal()-time[AliPID::kKaon]));
1401 track->GetImpactParameters(dcaxy,dcaz);
1402 const AliExternalTrackParam* pout = track->GetOuterParam();
1403 const AliExternalTrackParam* pin = track->GetInnerParam();
1411 if (zin*zout<0) pass=kFALSE;
1413 if (zout < fIgnoreTPCzRangeMin || zout > fIgnoreTPCzRangeMax) pass=kFALSE;
1418 track->GetTPCNclsIter1():track->GetTPCNcls();
1422 track->GetTPCchi2Iter1():track->GetTPCchi2();
1423 tpcchi2 = (ntpccls>0)?tpcchi2/ntpccls:-FLT_MAX;
1438 Int_t nitscls = track->GetNcls(0);
1455 if (pass)
QAbefore(0)->Fill(track->GetP(),beta);
1456 if (pass)
QAbefore(1)->Fill(pin->GetP(),dedx);
1467 track->GetTPCpid(pidTPC);
1482 if (pass)
QAafter(0)->Fill(track->GetP(),beta);
1483 if (pass)
QAafter(1)->Fill(pin->GetP(),dedx);
1492 if (pass)
QAafter(5)->Fill(pt,dcaxy);
1493 if (pass)
QAafter(6)->Fill(pt,dcaz);
1523 if (!track->FillTPCOnlyTrack(
fTPCtrack))
1539 if (!track->FillTPCOnlyTrack(
fTPCtrack))
1565 Int_t multiplicity = 0;
1575 for (
Int_t i=0; i<
event->GetNumberOfTracks(); i++)
1577 if (
IsSelected(event->GetTrack(i))) multiplicity++;
1580 return multiplicity;
1753 cuts->
fAliESDtrackCuts = AliESDtrackCuts::GetStandardITSTPCTrackCuts2009(selPrimaries);
1863 trackCollection->AddAtAndExpand(flowtrack,trackIndex);
1866 TParticle *tmpTParticle=NULL;
1867 AliMCParticle* tmpAliMCParticle=NULL;
1868 AliExternalTrackParam* externalParams=NULL;
1869 AliESDtrack* esdtrack=NULL;
1891 tmpAliMCParticle =
static_cast<AliMCParticle*
>(
fMCevent->GetTrack(tmpTParticle->GetFirstMother()));
1892 flowtrack->
SetPt(tmpAliMCParticle->Pt());
1895 esdtrack =
dynamic_cast<AliESDtrack*
>(
fTrack);
1896 if (!esdtrack)
return NULL;
1897 externalParams =
const_cast<AliExternalTrackParam*
>(esdtrack->GetTPCInnerParam());
1898 if (!externalParams)
return NULL;
1899 flowtrack->
Set(externalParams);
1910 else if (dynamic_cast<AliESDtrack*>(
fTrack))
1913 flowtrack->
SetID(static_cast<AliVTrack*>(
fTrack)->GetID());
1915 else if (dynamic_cast<AliESDMuonTrack*>(
fTrack))
1918 flowtrack->
SetID((
Int_t)static_cast<AliESDMuonTrack*>(
fTrack)->GetUniqueID());
1920 else if (dynamic_cast<AliAODTrack*>(
fTrack))
1926 flowtrack->
SetID(static_cast<AliVTrack*>(
fTrack)->GetID());
1928 else if (dynamic_cast<AliMCParticle*>(
fTrack))
1931 flowtrack->
SetID(static_cast<AliVTrack*>(
fTrack)->GetID());
1938 flowtrack->
SetID(indexMother);
1961 trackCollection->AddAtAndExpand(flowtrack,trackIndex);
1967 trackCollection->RemoveAt(trackIndex);
1977 TParticle *tmpTParticle=NULL;
1978 AliMCParticle* tmpAliMCParticle=NULL;
2009 tmpAliMCParticle =
static_cast<AliMCParticle*
>(
fMCevent->GetTrack(tmpTParticle->GetFirstMother()));
2010 flowtrack->
SetPt(tmpAliMCParticle->Pt());
2038 trackCollection->AddAtAndExpand(flowtrack,trackIndex);
2044 trackCollection->RemoveAt(trackIndex);
2054 if (!
fTrack)
return kFALSE;
2055 TParticle *tmpTParticle=NULL;
2056 AliMCParticle* tmpAliMCParticle=NULL;
2057 AliExternalTrackParam* externalParams=NULL;
2058 AliESDtrack* esdtrack=NULL;
2080 tmpAliMCParticle =
static_cast<AliMCParticle*
>(
fMCevent->GetTrack(tmpTParticle->GetFirstMother()));
2081 flowtrack->
SetPt(tmpAliMCParticle->Pt());
2084 esdtrack =
dynamic_cast<AliESDtrack*
>(
fTrack);
2085 if (!esdtrack)
return kFALSE;
2086 externalParams =
const_cast<AliExternalTrackParam*
>(esdtrack->GetTPCInnerParam());
2087 if (!externalParams)
return kFALSE;
2088 flowtrack->
Set(externalParams);
2099 else if (dynamic_cast<AliESDtrack*>(
fTrack))
2102 flowtrack->
SetID(static_cast<AliVTrack*>(
fTrack)->GetID());
2104 else if (dynamic_cast<AliESDMuonTrack*>(
fTrack))
2107 flowtrack->
SetID((
Int_t)static_cast<AliESDMuonTrack*>(
fTrack)->GetUniqueID());
2109 else if (dynamic_cast<AliAODTrack*>(
fTrack))
2115 flowtrack->
SetID(static_cast<AliVTrack*>(
fTrack)->GetID());
2117 else if (dynamic_cast<AliMCParticle*>(
fTrack))
2120 flowtrack->
SetID(static_cast<AliVTrack*>(
fTrack)->GetID());
2442 Bool_t physprim=mcEvent->IsPhysicalPrimary(label);
2443 AliMCParticle* track =
static_cast<AliMCParticle*
>(mcEvent->GetTrack(label));
2444 if (!track)
return kFALSE;
2445 TParticle* particle = track->Particle();
2446 Bool_t transported = particle->TestBit(kTransportBit);
2449 return (physprim && (transported || !requiretransported));
2458 const Int_t kNbinsP=200;
2461 for(
int i=1; i<kNbinsP+1; i++)
2466 binsP[i]=binsP[i-1]+0.05;
2469 const Int_t nBinsDCA=1000;
2471 for(
int i=0; i<nBinsDCA+1; i++) {binsDCA[i]=0.01*i-5.;}
2474 Bool_t adddirstatus = TH1::AddDirectoryStatus();
2475 TH1::AddDirectory(kFALSE);
2477 fQA->SetName(Form(
"%s QA",GetName()));
2478 TList* before =
new TList(); before->SetOwner();
2479 before->SetName(
"before");
2480 TList* after =
new TList(); after->SetOwner();
2481 after->SetName(
"after");
2484 before->Add(
new TH2F(
"TOFbeta",
";p [GeV/c];#beta",kNbinsP,binsP,1000,0.4,1.1));
2485 after->Add(
new TH2F(
"TOFbeta",
";p [GeV/c];#beta",kNbinsP,binsP,1000,0.4,1.1));
2486 before->Add(
new TH2F(
"TPCdedx",
";p [GeV/c];dEdx",kNbinsP,binsP,500,0,500));
2487 after->Add(
new TH2F(
"TPCdedx",
";p [GeV/c];dEdx",kNbinsP,binsP,500,0,500));
2488 before->Add(
new TH2F(
"MC pid",
";p[GeV/c];species",kNbinsP,binsP,10,-5, 5));
2489 after->Add(
new TH2F(
"MC pid",
";p[GeV/c];species",kNbinsP,binsP,10,-5, 5));
2491 TH2F* hb =
new TH2F(
"MC primary",
";p[GeV/c];primary",kNbinsP,binsP,2,-1,1);
2492 TH2F* ha =
new TH2F(
"MC primary",
";p[GeV/c];primary",kNbinsP,binsP,2,-1,1);
2494 axis = hb->GetYaxis();
2495 axis->SetBinLabel(1,
"secondary");
2496 axis->SetBinLabel(2,
"primary");
2497 axis = ha->GetYaxis();
2498 axis->SetBinLabel(1,
"secondary");
2499 axis->SetBinLabel(2,
"primary");
2503 hb =
new TH2F(
"MC production process",
";p[GeV/c];",kNbinsP,binsP,kMaxMCProcess,
2504 -0.5, kMaxMCProcess-0.5);
2505 ha =
new TH2F(
"MC production process",
";p[GeV/c];",kNbinsP,binsP,kMaxMCProcess,
2506 -0.5, kMaxMCProcess-0.5);
2507 axis = hb->GetYaxis();
2508 for (
Int_t i=0; i<kMaxMCProcess; i++)
2510 axis->SetBinLabel(i+1,TMCProcessName[i]);
2512 axis = ha->GetYaxis();
2513 for (
Int_t i=0; i<kMaxMCProcess; i++)
2515 axis->SetBinLabel(i+1,TMCProcessName[i]);
2520 before->Add(
new TH2F(
"DCAxy",
";p_{t}[GeV/c];DCAxy[cm]", 100, 0., 10., nBinsDCA, binsDCA));
2521 after->Add(
new TH2F(
"DCAxy",
";p_{t}[GeV/c];DCAxy[cm]", 100, 0., 10., nBinsDCA, binsDCA));
2522 before->Add(
new TH2F(
"DCAz",
";p_{t}[GeV/c];DCAz[cm]", 100, 0., 10., nBinsDCA, binsDCA));
2523 after->Add(
new TH2F(
"DCAz",
";p_{t}[GeV/c];DCAz[cm]", 100, 0., 10., nBinsDCA, binsDCA));
2525 hb =
new TH2F(
"MC first mother",
";p[GeV/c];",kNbinsP,binsP,44,1.,45.);
2526 ha =
new TH2F(
"MC first mother",
";p[GeV/c];",kNbinsP,binsP,44,1.,45.);
2527 hb->GetYaxis()->SetBinLabel(1,
"#gamma");
2528 ha->GetYaxis()->SetBinLabel(1,
"#gamma");
2529 hb->GetYaxis()->SetBinLabel(2,
"e^{+}");
2530 ha->GetYaxis()->SetBinLabel(2,
"e^{+}");
2531 hb->GetYaxis()->SetBinLabel(3,
"e^{-}");
2532 ha->GetYaxis()->SetBinLabel(3,
"e^{-}");
2533 hb->GetYaxis()->SetBinLabel(4,
"#nu");
2534 ha->GetYaxis()->SetBinLabel(4,
"#nu");
2535 hb->GetYaxis()->SetBinLabel(5,
"#mu^{+}");
2536 ha->GetYaxis()->SetBinLabel(5,
"#mu^{+}");
2537 hb->GetYaxis()->SetBinLabel(6,
"#mu^{-}");
2538 ha->GetYaxis()->SetBinLabel(6,
"#mu^{-}");
2539 hb->GetYaxis()->SetBinLabel(7,
"#pi^{0}");
2540 ha->GetYaxis()->SetBinLabel(7,
"#pi^{0}");
2541 hb->GetYaxis()->SetBinLabel(8,
"#pi^{+}");
2542 ha->GetYaxis()->SetBinLabel(8,
"#pi^{+}");
2543 hb->GetYaxis()->SetBinLabel(9,
"#pi^{-}");
2544 ha->GetYaxis()->SetBinLabel(9,
"#pi^{-}");
2545 hb->GetYaxis()->SetBinLabel(10,
"K^{0}_{L}");
2546 ha->GetYaxis()->SetBinLabel(10,
"K^{0}_{L}");
2547 hb->GetYaxis()->SetBinLabel(11,
"K^{+}");
2548 ha->GetYaxis()->SetBinLabel(11,
"K^{+}");
2549 hb->GetYaxis()->SetBinLabel(12,
"K^{-}");
2550 ha->GetYaxis()->SetBinLabel(12,
"K^{-}");
2551 hb->GetYaxis()->SetBinLabel( 13,
"n");
2552 ha->GetYaxis()->SetBinLabel( 13,
"n");
2553 hb->GetYaxis()->SetBinLabel( 14,
"p");
2554 ha->GetYaxis()->SetBinLabel( 14,
"p");
2555 hb->GetYaxis()->SetBinLabel(15,
"#bar{p}");
2556 ha->GetYaxis()->SetBinLabel(15,
"#bar{p}");
2557 hb->GetYaxis()->SetBinLabel(16,
"K^{0}_{S}");
2558 ha->GetYaxis()->SetBinLabel(16,
"K^{0}_{S}");
2559 hb->GetYaxis()->SetBinLabel(17,
"#eta");
2560 ha->GetYaxis()->SetBinLabel(17,
"#eta");
2561 hb->GetYaxis()->SetBinLabel(18,
"#Lambda");
2562 ha->GetYaxis()->SetBinLabel(18,
"#Lambda");
2563 hb->GetYaxis()->SetBinLabel(19,
"#Sigma^{+}");
2564 ha->GetYaxis()->SetBinLabel(19,
"#Sigma^{+}");
2565 hb->GetYaxis()->SetBinLabel(20,
"#Sigma^{0}");
2566 ha->GetYaxis()->SetBinLabel(20,
"#Sigma^{0}");
2567 hb->GetYaxis()->SetBinLabel(21,
"#Sigma^{-}");
2568 ha->GetYaxis()->SetBinLabel(21,
"#Sigma^{-}");
2569 hb->GetYaxis()->SetBinLabel(22,
"#Theta^{0}");
2570 ha->GetYaxis()->SetBinLabel(22,
"#Theta^{0}");
2571 hb->GetYaxis()->SetBinLabel(23,
"#Theta^{-}");
2572 ha->GetYaxis()->SetBinLabel(23,
"#Theta^{-}");
2573 hb->GetYaxis()->SetBinLabel(24,
"#Omega^{-}");
2574 ha->GetYaxis()->SetBinLabel(24,
"#Omega^{-}");
2575 hb->GetYaxis()->SetBinLabel(25,
"#bar{n}");
2576 ha->GetYaxis()->SetBinLabel(25,
"#bar{n}");
2577 hb->GetYaxis()->SetBinLabel(26,
"#bar{#Lambda}");
2578 ha->GetYaxis()->SetBinLabel(26,
"#bar{#Lambda}");
2579 hb->GetYaxis()->SetBinLabel(27,
"#bar{#Sigma}^{-}");
2580 ha->GetYaxis()->SetBinLabel(27,
"#bar{#Sigma}^{-}");
2581 hb->GetYaxis()->SetBinLabel(28,
"#bar{#Sigma}^{0}");
2582 ha->GetYaxis()->SetBinLabel(28,
"#bar{#Sigma}^{0}");
2583 hb->GetYaxis()->SetBinLabel(29,
"#bar{#Sigma}^{+}");
2584 ha->GetYaxis()->SetBinLabel(29,
"#bar{#Sigma}^{+}");
2585 hb->GetYaxis()->SetBinLabel(30,
"#bar{#Theta}^{0}");
2586 ha->GetYaxis()->SetBinLabel(30,
"#bar{#Theta}^{0}");
2587 hb->GetYaxis()->SetBinLabel(31,
"#bar{#Theta}^{+}");
2588 ha->GetYaxis()->SetBinLabel(31,
"#bar{#Theta}^{+}");
2589 hb->GetYaxis()->SetBinLabel(32,
"#bar{#Omega}^{+}");
2590 ha->GetYaxis()->SetBinLabel(32,
"#bar{#Omega}^{+}");
2591 hb->GetYaxis()->SetBinLabel(33,
"#tau^{+}");
2592 ha->GetYaxis()->SetBinLabel(33,
"#tau^{+}");
2593 hb->GetYaxis()->SetBinLabel(34,
"#tau^{-}");
2594 ha->GetYaxis()->SetBinLabel(34,
"#tau^{-}");
2595 hb->GetYaxis()->SetBinLabel(35,
"D^{+}");
2596 ha->GetYaxis()->SetBinLabel(35,
"D^{+}");
2597 hb->GetYaxis()->SetBinLabel(36,
"D^{-}");
2598 ha->GetYaxis()->SetBinLabel(36,
"D^{-}");
2599 hb->GetYaxis()->SetBinLabel(37,
"D^{0}");
2600 ha->GetYaxis()->SetBinLabel(37,
"D^{0}");
2601 hb->GetYaxis()->SetBinLabel(38,
"#bar{D}^{0}");
2602 ha->GetYaxis()->SetBinLabel(38,
"#bar{D}^{0}");
2603 hb->GetYaxis()->SetBinLabel(39,
"D_{s}^{+}");
2604 ha->GetYaxis()->SetBinLabel(39,
"D_{s}^{+}");
2605 hb->GetYaxis()->SetBinLabel(40,
"#bar{D_{s}}^{-}");
2606 ha->GetYaxis()->SetBinLabel(40,
"#bar{D_{s}}^{-}");
2607 hb->GetYaxis()->SetBinLabel(41,
"#Lambda_{c}^{+}");
2608 ha->GetYaxis()->SetBinLabel(41,
"#Lambda_{c}^{+}");
2609 hb->GetYaxis()->SetBinLabel(42,
"W^{+}");
2610 ha->GetYaxis()->SetBinLabel(42,
"W^{+}");
2611 hb->GetYaxis()->SetBinLabel(43,
"W^{-}");
2612 ha->GetYaxis()->SetBinLabel(43,
"W^{-}");
2613 hb->GetYaxis()->SetBinLabel(44,
"Z^{0}");
2614 ha->GetYaxis()->SetBinLabel(44,
"Z^{0}");
2618 before->Add(
new TH2F(
"TOFkElectron",
";p_{t}[GeV/c];TOF signal - IT", kNbinsP,binsP,1000,-2e4, 2e4));
2619 after->Add(
new TH2F(
"TOFkElectron",
";p_{t}[GeV/c];TOF signal - IT", kNbinsP,binsP,1000,-2e4, 2e4));
2621 before->Add(
new TH2F(
"TOFkMuon",
";p_{t}[GeV/c];TOF signal - IT", kNbinsP,binsP,1000,-2e4, 2e4));
2622 after->Add(
new TH2F(
"TOFkMuon",
";p_{t}[GeV/c];TOF signal - IT", kNbinsP,binsP,1000,-2e4, 2e4));
2624 before->Add(
new TH2F(
"TOFkPion",
";p_{t}[GeV/c];TOF signal - IT", kNbinsP,binsP,1000,-2e4, 2e4));
2625 after->Add(
new TH2F(
"TOFkPion",
";p_{t}[GeV/c];TOF signal - IT", kNbinsP,binsP,1000,-2e4, 2e4));
2627 before->Add(
new TH2F(
"TOFkKaon",
";p_{t}[GeV/c];TOF signal - IT", kNbinsP,binsP,1000,-2e4, 2e4));
2628 after->Add(
new TH2F(
"TOFkKaon",
";p_{t}[GeV/c];TOF signal - IT", kNbinsP,binsP,1000,-2e4, 2e4));
2630 before->Add(
new TH2F(
"TOFkProton",
";p_{t}[GeV/c];TOF signal - IT", kNbinsP,binsP,1000,-2e4, 2e4));
2631 after->Add(
new TH2F(
"TOFkProton",
";p_{t}[GeV/c];TOF signal - IT", kNbinsP,binsP,1000,-2e4, 2e4));
2634 before->Add(
new TH1F(
"KinkQt",
";q_{t}[GeV/c];counts", 200, 0., 0.3));
2635 after->Add(
new TH1F(
"KinkQt",
";q_{t}[GeV/c];counts", 200, 0., 0.3));
2637 before->Add(
new TH1F(
"KinkMinv",
";m_{inv}(#mu#nu)[GeV/c^{2}];counts;Kink M_{inv}", 200, 0., 0.7));
2638 after->Add(
new TH1F(
"KinkMinv",
";m_{inv}(#mu#nu)[GeV/c^{2}];counts;Kink M_{inv}", 200, 0., 0.7));
2640 before->Add(
new TH2F(
"KinkVertex",
";x[cm];y[cm];Kink vertex position",250,-250.,250., 250,-250.,250.));
2641 after->Add(
new TH2F(
"KinkVertex",
";x[cm];y[cm];Kink vertex position",250,-250.,250., 250,-250.,250.));
2643 before->Add(
new TH2F(
"KinkAngleMp",
";p_{mother}[GeV/c];Kink decay angle [deg];", 100,0.,6., 100,0.,80.));
2644 after->Add(
new TH2F(
"KinkAngleMp",
";p_{mother}[GeV/c];Kink decay angle [deg];", 100,0.,6., 100,0.,80.));
2646 before->Add(
new TH1F(
"KinkIndex",
";Kink index;counts", 2, 0., 2.));
2647 after->Add(
new TH1F(
"KinkIndex",
";Kink index;counts", 2, 0., 2.));
2649 TH1::AddDirectory(adddirstatus);
2667 if (esd)
return esd->GetMultiplicity()->GetNumberOfTracklets();
2668 if (aod)
return aod->GetTracklets()->GetNumberOfTracklets();
2671 return fMCevent->GetNumberOfTracks();
2675 return esd->GetNumberOfPmdTracks();
2689 if (esd)
return esd->GetNumberOfMuonTracks();
2690 return fEvent->GetNumberOfTracks();
2694 return esd->GetNumberOfKinks();
2698 return esd->GetNumberOfV0s();
2701 return fEvent->GetNumberOfTracks();
2716 if (!
fEvent)
return NULL;
2721 if (esd)
return const_cast<AliMultiplicity*
>(esd->GetMultiplicity());
2722 if (aod)
return const_cast<AliAODTracklets*
>(aod->GetTracklets());
2728 if (!esd)
return NULL;
2729 return esd->GetPmdTrack(i);
2735 if(!aod)
return NULL;
2736 return aod->GetVZEROData();
2738 return esd->GetVZEROData();
2744 if(!aod)
return NULL;
2745 return aod->GetVZEROData();
2747 return esd->GetVZEROData();
2753 if(!aod)
return NULL;
2754 return aod->GetVZEROData();
2756 return esd->GetVZEROData();
2762 if(!aod)
return NULL;
2763 return aod->GetVZEROData();
2765 return esd->GetVZEROData();
2771 if(!aod)
return NULL;
2772 return aod->GetVZEROData();
2774 return esd->GetVZEROData();
2776 if (!
fEvent)
return NULL;
2778 if (esd)
return esd->GetMuonTrack(i);
2779 return fEvent->GetTrack(i);
2782 if (!esd)
return NULL;
2783 return esd->GetKink(i);
2786 if (!esd)
return NULL;
2787 return esd->GetV0(i);
2789 if (!
fEvent)
return NULL;
2790 return fEvent->GetTrack(i);
2822 if(!track->GetAODEvent()->GetTOFHeader()){
2823 AliAODPid *pidObj = track->GetDetPid();
2824 if (!pidObj)
fESDpid.GetTOFResponse().SetTimeResolution(84.);
2827 pidObj->GetTOFpidResolution(sigmaTOFPidInAOD);
2828 if(sigmaTOFPidInAOD[0] > 84.){
2829 fESDpid.GetTOFResponse().SetTimeResolution(sigmaTOFPidInAOD[0]);
2904 printf(
"AliFlowTrackCuts::PassesCuts() this should never be called!\n");
2915 Bool_t goodtrack = (track->GetStatus() & AliESDtrack::kTOFpid) &&
2916 (track->GetTOFsignal() > 12000) &&
2917 (track->GetTOFsignal() < 100000) &&
2918 (track->GetIntegratedLength() > 365);
2926 if (!goodtrack)
return kFALSE;
2928 const Float_t c = 2.99792457999999984e-02;
2930 Float_t l = track->GetIntegratedLength();
2932 Float_t timeTOF = track->GetTOFsignal()- trackT0;
2934 Double_t integratedTimes[9] = {-1.0,-1.0,-1.0,-1.0,-1.0, -1.0, -1.0, -1.0, -1.0};
2935 track->GetIntegratedTimes(integratedTimes);
2936 Float_t betaHypothesis[5] = {0.0,0.0,0.0,0.0,0.0};
2937 Float_t s[5] = {0.0,0.0,0.0,0.0,0.0};
2938 for (
Int_t i=0;i<5;i++)
2940 betaHypothesis[i] = l/integratedTimes[i]/
c;
2941 s[i] = beta-betaHypothesis[i];
2947 return ( (s[2]<0.015) && (s[2]>-0.015) &&
2951 return ( (s[3]<0.015) && (s[3]>-0.015) &&
2955 return ( (s[4]<0.015) && (s[4]>-0.015) &&
2968 Double_t integratedTimes[9] = {-1.0,-1.0,-1.0,-1.0,-1.0, -1.0, -1.0, -1.0, -1.0};
2969 track->GetIntegratedTimes(integratedTimes);
2971 const Float_t c = 2.99792457999999984e-02;
2975 Float_t timeTOF = track->GetTOFsignal()- trackT0;
2976 if(QAmode && timeTOF <= 0)
return -999;
2990 Bool_t goodtrack = (track->GetStatus() & AliESDtrack::kTOFpid) &&
2991 (track->GetTOFsignal() > 12000) &&
2992 (track->GetTOFsignal() < 100000);
2994 if (!goodtrack)
return kFALSE;
2996 const Float_t c = 2.99792457999999984e-02;
2997 Double_t integratedTimes[9] = {-1.0,-1.0,-1.0,-1.0,-1.0, -1.0, -1.0, -1.0, -1.0};
2998 track->GetIntegratedTimes(integratedTimes);
3001 goodtrack = goodtrack && (l > 365);
3003 if (!goodtrack)
return kFALSE;
3016 cout<<
"TOFbeta: fParticleID = "<<
fParticleID<<endl;
3034 Float_t betahypothesis = l/integratedTimes[pid]/
c;
3035 Float_t betadiff = beta-betahypothesis;
3039 if (col<0)
return kFALSE;
3040 Float_t min = (*fTOFpidCuts)(1,col);
3041 Float_t max = (*fTOFpidCuts)(2,col);
3043 Bool_t pass = (betadiff>min && betadiff<max);
3058 Bool_t goodtrack = (track->GetStatus() & AliESDtrack::kTOFpid) &&
3059 (track->GetTOFsignal() > 12000) &&
3060 (track->GetTOFsignal() < 100000) &&
3061 (track->GetIntegratedLength() > 365);
3065 if (!goodtrack)
return kFALSE;
3072 Double_t integratedTimes[9] = {-1.0,-1.0,-1.0,-1.0,-1.0, -1.0, -1.0, -1.0, -1.0};
3073 track->GetIntegratedTimes(integratedTimes);
3093 const Float_t c = 2.99792457999999984e-02;
3094 Float_t l = track->GetIntegratedLength();
3096 Float_t betahypothesis = l/integratedTimes[pid]/
c;
3097 Float_t betadiff = beta-betahypothesis;
3101 if (col<0)
return kFALSE;
3102 Float_t min = (*fTOFpidCuts)(1,col);
3103 Float_t max = (*fTOFpidCuts)(2,col);
3105 Bool_t pass = (betadiff>min && betadiff<max);
3115 track->GetTOFpid(pidTOF);
3125 track->GetTPCpid(pidTPC);
3130 probablity = pidTPC[AliPID::kPion] + pidTPC[AliPID::kMuon];
3143 return track->GetTPCsignal();
3156 const AliExternalTrackParam* tpcparam = track->GetInnerParam();
3157 if (!tpcparam)
return kFALSE;
3160 Float_t sigTPC = track->GetTPCsignal();
3161 Float_t s = (sigTPC-sigExp)/sigExp;
3165 Int_t col = TMath::BinarySearch( arrSize, arr, static_cast<Float_t>(p));
3166 if (col<0)
return kFALSE;
3167 Float_t min = (*fTPCpidCuts)(1,col);
3168 Float_t max = (*fTPCpidCuts)(2,col);
3171 return (s>min && s<max);
3183 t =
new TMatrixF(3,15);
3184 (*t)(0,0) = 0.20; (*t)(1,0) = -0.4; (*t)(2,0) = 0.0;
3185 (*t)(0,1) = 0.25; (*t)(1,1) = -0.4; (*t)(2,1) = 0.1;
3186 (*t)(0,2) = 0.30; (*t)(1,2) = -0.4; (*t)(2,2) = 0.2;
3187 (*t)(0,3) = 0.35; (*t)(1,3) = -0.4; (*t)(2,3) = 0.2;
3188 (*t)(0,4) = 0.40; (*t)(1,4) = -0.4; (*t)(2,4) = 0.3;
3189 (*t)(0,5) = 0.45; (*t)(1,5) = -0.4; (*t)(2,5) = 0.3;
3190 (*t)(0,6) = 0.50; (*t)(1,6) = -0.4; (*t)(2,6) = 0.25;
3191 (*t)(0,7) = 0.55; (*t)(1,7) = -0.4; (*t)(2,7) = 0.15;
3192 (*t)(0,8) = 0.60; (*t)(1,8) = -0.4; (*t)(2,8) = 0.1;
3193 (*t)(0,9) = 0.65; (*t)(1,9) = -0.4; (*t)(2,9) = 0.05;
3194 (*t)(0,10) = 0.70; (*t)(1,10) = -0.4; (*t)(2,10) = 0;
3195 (*t)(0,11) = 0.75; (*t)(1,11) = -0.4; (*t)(2,11) = 0;
3196 (*t)(0,12) = 0.80; (*t)(1,12) = -0.4; (*t)(2,12) = -0.05;
3197 (*t)(0,13) = 0.85; (*t)(1,13) = -0.4; (*t)(2,13) = -0.1;
3198 (*t)(0,14) = 0.90; (*t)(1,14) = 0; (*t)(2,14) = 0;
3203 t =
new TMatrixF(3,12);
3204 (*t)(0,0) = 0.20; (*t)(1,0) = -0.2; (*t)(2,0) = 0.2;
3205 (*t)(0,1) = 0.25; (*t)(1,1) = -0.2; (*t)(2,1) = 0.2;
3206 (*t)(0,2) = 0.30; (*t)(1,2) = -0.2; (*t)(2,2) = 0.2;
3207 (*t)(0,3) = 0.35; (*t)(1,3) = -0.2; (*t)(2,3) = 0.2;
3208 (*t)(0,4) = 0.40; (*t)(1,4) = -0.1; (*t)(2,4) = 0.2;
3209 (*t)(0,5) = 0.45; (*t)(1,5) = -0.1; (*t)(2,5) = 0.2;
3210 (*t)(0,6) = 0.50; (*t)(1,6) =-0.05; (*t)(2,6) = 0.2;
3211 (*t)(0,7) = 0.55; (*t)(1,7) = -0.1; (*t)(2,7) = 0.1;
3212 (*t)(0,8) = 0.60; (*t)(1,8) =-0.05; (*t)(2,8) = 0.1;
3213 (*t)(0,9) = 0.65; (*t)(1,9) = 0; (*t)(2,9) = 0.15;
3214 (*t)(0,10) = 0.70; (*t)(1,10) = 0.05; (*t)(2,10) = 0.2;
3215 (*t)(0,11) = 0.75; (*t)(1,11) = 0; (*t)(2,11) = 0;
3220 t =
new TMatrixF(3,9);
3221 (*t)(0,0) = 0.20; (*t)(1,0) = -0.1; (*t)(2,0) = 0.1;
3222 (*t)(0,1) = 0.25; (*t)(1,1) = -0.2; (*t)(2,1) = 0.2;
3223 (*t)(0,2) = 0.80; (*t)(1,2) = -0.1; (*t)(2,2) = 0.2;
3224 (*t)(0,3) = 0.85; (*t)(1,3) =-0.05; (*t)(2,3) = 0.2;
3225 (*t)(0,4) = 0.90; (*t)(1,4) =-0.05; (*t)(2,4) = 0.25;
3226 (*t)(0,5) = 0.95; (*t)(1,5) =-0.05; (*t)(2,5) = 0.25;
3227 (*t)(0,6) = 1.00; (*t)(1,6) = -0.1; (*t)(2,6) = 0.25;
3228 (*t)(0,7) = 1.10; (*t)(1,7) =-0.05; (*t)(2,7) = 0.3;
3229 (*t)(0,8) = 1.20; (*t)(1,8) = 0; (*t)(2,8) = 0;
3240 t =
new TMatrixF(3,61);
3241 (*t)(0,0) = 0.000; (*t)(1,0) = 0.000; (*t)(2,0) = 0.000;
3242 (*t)(0,1) = 0.050; (*t)(1,1) = 0.000; (*t)(2,1) = 0.000;
3243 (*t)(0,2) = 0.100; (*t)(1,2) = 0.000; (*t)(2,2) = 0.000;
3244 (*t)(0,3) = 0.150; (*t)(1,3) = 0.000; (*t)(2,3) = 0.000;
3245 (*t)(0,4) = 0.200; (*t)(1,4) = -0.030; (*t)(2,4) = 0.030;
3246 (*t)(0,5) = 0.250; (*t)(1,5) = -0.036; (*t)(2,5) = 0.032;
3247 (*t)(0,6) = 0.300; (*t)(1,6) = -0.038; (*t)(2,6) = 0.032;
3248 (*t)(0,7) = 0.350; (*t)(1,7) = -0.034; (*t)(2,7) = 0.032;
3249 (*t)(0,8) = 0.400; (*t)(1,8) = -0.032; (*t)(2,8) = 0.020;
3250 (*t)(0,9) = 0.450; (*t)(1,9) = -0.030; (*t)(2,9) = 0.020;
3251 (*t)(0,10) = 0.500; (*t)(1,10) = -0.030; (*t)(2,10) = 0.020;
3252 (*t)(0,11) = 0.550; (*t)(1,11) = -0.030; (*t)(2,11) = 0.020;
3253 (*t)(0,12) = 0.600; (*t)(1,12) = -0.030; (*t)(2,12) = 0.020;
3254 (*t)(0,13) = 0.650; (*t)(1,13) = -0.030; (*t)(2,13) = 0.020;
3255 (*t)(0,14) = 0.700; (*t)(1,14) = -0.030; (*t)(2,14) = 0.020;
3256 (*t)(0,15) = 0.750; (*t)(1,15) = -0.030; (*t)(2,15) = 0.020;
3257 (*t)(0,16) = 0.800; (*t)(1,16) = -0.030; (*t)(2,16) = 0.020;
3258 (*t)(0,17) = 0.850; (*t)(1,17) = -0.030; (*t)(2,17) = 0.020;
3259 (*t)(0,18) = 0.900; (*t)(1,18) = -0.030; (*t)(2,18) = 0.020;
3260 (*t)(0,19) = 0.950; (*t)(1,19) = -0.028; (*t)(2,19) = 0.028;
3261 (*t)(0,20) = 1.000; (*t)(1,20) = -0.028; (*t)(2,20) = 0.028;
3262 (*t)(0,21) = 1.100; (*t)(1,21) = -0.028; (*t)(2,21) = 0.028;
3263 (*t)(0,22) = 1.200; (*t)(1,22) = -0.026; (*t)(2,22) = 0.028;
3264 (*t)(0,23) = 1.300; (*t)(1,23) = -0.024; (*t)(2,23) = 0.028;
3265 (*t)(0,24) = 1.400; (*t)(1,24) = -0.020; (*t)(2,24) = 0.028;
3266 (*t)(0,25) = 1.500; (*t)(1,25) = -0.018; (*t)(2,25) = 0.028;
3267 (*t)(0,26) = 1.600; (*t)(1,26) = -0.016; (*t)(2,26) = 0.028;
3268 (*t)(0,27) = 1.700; (*t)(1,27) = -0.014; (*t)(2,27) = 0.028;
3269 (*t)(0,28) = 1.800; (*t)(1,28) = -0.012; (*t)(2,28) = 0.026;
3270 (*t)(0,29) = 1.900; (*t)(1,29) = -0.010; (*t)(2,29) = 0.026;
3271 (*t)(0,30) = 2.000; (*t)(1,30) = -0.008; (*t)(2,30) = 0.026;
3272 (*t)(0,31) = 2.100; (*t)(1,31) = -0.008; (*t)(2,31) = 0.024;
3273 (*t)(0,32) = 2.200; (*t)(1,32) = -0.006; (*t)(2,32) = 0.024;
3274 (*t)(0,33) = 2.300; (*t)(1,33) = -0.004; (*t)(2,33) = 0.024;
3275 (*t)(0,34) = 2.400; (*t)(1,34) = -0.004; (*t)(2,34) = 0.024;
3276 (*t)(0,35) = 2.500; (*t)(1,35) = -0.002; (*t)(2,35) = 0.024;
3277 (*t)(0,36) = 2.600; (*t)(1,36) = -0.002; (*t)(2,36) = 0.024;
3278 (*t)(0,37) = 2.700; (*t)(1,37) = 0.000; (*t)(2,37) = 0.024;
3279 (*t)(0,38) = 2.800; (*t)(1,38) = 0.000; (*t)(2,38) = 0.026;
3280 (*t)(0,39) = 2.900; (*t)(1,39) = 0.000; (*t)(2,39) = 0.024;
3281 (*t)(0,40) = 3.000; (*t)(1,40) = 0.002; (*t)(2,40) = 0.026;
3282 (*t)(0,41) = 3.100; (*t)(1,41) = 0.002; (*t)(2,41) = 0.026;
3283 (*t)(0,42) = 3.200; (*t)(1,42) = 0.002; (*t)(2,42) = 0.026;
3284 (*t)(0,43) = 3.300; (*t)(1,43) = 0.002; (*t)(2,43) = 0.026;
3285 (*t)(0,44) = 3.400; (*t)(1,44) = 0.002; (*t)(2,44) = 0.026;
3286 (*t)(0,45) = 3.500; (*t)(1,45) = 0.002; (*t)(2,45) = 0.026;
3287 (*t)(0,46) = 3.600; (*t)(1,46) = 0.002; (*t)(2,46) = 0.026;
3288 (*t)(0,47) = 3.700; (*t)(1,47) = 0.002; (*t)(2,47) = 0.026;
3289 (*t)(0,48) = 3.800; (*t)(1,48) = 0.002; (*t)(2,48) = 0.026;
3290 (*t)(0,49) = 3.900; (*t)(1,49) = 0.004; (*t)(2,49) = 0.024;
3291 (*t)(0,50) = 4.000; (*t)(1,50) = 0.004; (*t)(2,50) = 0.026;
3292 (*t)(0,51) = 4.100; (*t)(1,51) = 0.004; (*t)(2,51) = 0.026;
3293 (*t)(0,52) = 4.200; (*t)(1,52) = 0.004; (*t)(2,52) = 0.024;
3294 (*t)(0,53) = 4.300; (*t)(1,53) = 0.006; (*t)(2,53) = 0.024;
3295 (*t)(0,54) = 4.400; (*t)(1,54) = 0.000; (*t)(2,54) = 0.000;
3296 (*t)(0,55) = 4.500; (*t)(1,55) = 0.000; (*t)(2,55) = 0.000;
3297 (*t)(0,56) = 4.600; (*t)(1,56) = 0.000; (*t)(2,56) = 0.000;
3298 (*t)(0,57) = 4.700; (*t)(1,57) = 0.000; (*t)(2,57) = 0.000;
3299 (*t)(0,58) = 4.800; (*t)(1,58) = 0.000; (*t)(2,58) = 0.000;
3300 (*t)(0,59) = 4.900; (*t)(1,59) = 0.000; (*t)(2,59) = 0.000;
3301 (*t)(0,60) = 5.900; (*t)(1,60) = 0.000; (*t)(2,60) = 0.000;
3307 t =
new TMatrixF(3,61);
3308 (*t)(0,0) = 0.000; (*t)(1,0) = 0.000; (*t)(2,0) = 0.000;
3309 (*t)(0,1) = 0.050; (*t)(1,1) = 0.000; (*t)(2,1) = 0.000;
3310 (*t)(0,2) = 0.100; (*t)(1,2) = 0.000; (*t)(2,2) = 0.000;
3311 (*t)(0,3) = 0.150; (*t)(1,3) = 0.000; (*t)(2,3) = 0.000;
3312 (*t)(0,4) = 0.200; (*t)(1,4) = -0.07; (*t)(2,4) = 0.07;
3313 (*t)(0,5) = 0.200; (*t)(1,5) = -0.07; (*t)(2,5) = 0.07;
3314 (*t)(0,6) = 0.200; (*t)(1,6) = -0.07; (*t)(2,6) = 0.07;
3315 (*t)(0,7) = 0.200; (*t)(1,7) = -0.07; (*t)(2,7) = 0.07;
3316 (*t)(0,8) = 0.200; (*t)(1,8) = -0.07; (*t)(2,8) = 0.07;
3317 (*t)(0,9) = 0.200; (*t)(1,9) = -0.07; (*t)(2,9) = 0.07;
3318 (*t)(0,10) = 0.200; (*t)(1,10) = -0.07; (*t)(2,10) = 0.07;
3319 (*t)(0,11) = 0.200; (*t)(1,11) = -0.07; (*t)(2,11) = 0.07;
3320 (*t)(0,12) = 0.200; (*t)(1,12) = -0.07; (*t)(2,12) = 0.07;
3321 (*t)(0,13) = 0.200; (*t)(1,13) = -0.07; (*t)(2,13) = 0.07;
3322 (*t)(0,14) = 0.200; (*t)(1,14) = -0.07; (*t)(2,14) = 0.07;
3323 (*t)(0,15) = 0.200; (*t)(1,15) = -0.07; (*t)(2,15) = 0.07;
3324 (*t)(0,16) = 0.200; (*t)(1,16) = -0.07; (*t)(2,16) = 0.07;
3325 (*t)(0,17) = 0.850; (*t)(1,17) = -0.070; (*t)(2,17) = 0.070;
3326 (*t)(0,18) = 0.900; (*t)(1,18) = -0.072; (*t)(2,18) = 0.072;
3327 (*t)(0,19) = 0.950; (*t)(1,19) = -0.072; (*t)(2,19) = 0.072;
3328 (*t)(0,20) = 1.000; (*t)(1,20) = -0.074; (*t)(2,20) = 0.074;
3329 (*t)(0,21) = 1.100; (*t)(1,21) = -0.032; (*t)(2,21) = 0.032;
3330 (*t)(0,22) = 1.200; (*t)(1,22) = -0.026; (*t)(2,22) = 0.026;
3331 (*t)(0,23) = 1.300; (*t)(1,23) = -0.026; (*t)(2,23) = 0.026;
3332 (*t)(0,24) = 1.400; (*t)(1,24) = -0.024; (*t)(2,24) = 0.024;
3333 (*t)(0,25) = 1.500; (*t)(1,25) = -0.024; (*t)(2,25) = 0.024;
3334 (*t)(0,26) = 1.600; (*t)(1,26) = -0.026; (*t)(2,26) = 0.026;
3335 (*t)(0,27) = 1.700; (*t)(1,27) = -0.026; (*t)(2,27) = 0.026;
3336 (*t)(0,28) = 1.800; (*t)(1,28) = -0.026; (*t)(2,28) = 0.026;
3337 (*t)(0,29) = 1.900; (*t)(1,29) = -0.026; (*t)(2,29) = 0.026;
3338 (*t)(0,30) = 2.000; (*t)(1,30) = -0.026; (*t)(2,30) = 0.026;
3339 (*t)(0,31) = 2.100; (*t)(1,31) = -0.026; (*t)(2,31) = 0.026;
3340 (*t)(0,32) = 2.200; (*t)(1,32) = -0.026; (*t)(2,32) = 0.024;
3341 (*t)(0,33) = 2.300; (*t)(1,33) = -0.028; (*t)(2,33) = 0.022;
3342 (*t)(0,34) = 2.400; (*t)(1,34) = -0.028; (*t)(2,34) = 0.020;
3343 (*t)(0,35) = 2.500; (*t)(1,35) = -0.028; (*t)(2,35) = 0.018;
3344 (*t)(0,36) = 2.600; (*t)(1,36) = -0.028; (*t)(2,36) = 0.016;
3345 (*t)(0,37) = 2.700; (*t)(1,37) = -0.028; (*t)(2,37) = 0.016;
3346 (*t)(0,38) = 2.800; (*t)(1,38) = -0.030; (*t)(2,38) = 0.014;
3347 (*t)(0,39) = 2.900; (*t)(1,39) = -0.030; (*t)(2,39) = 0.012;
3348 (*t)(0,40) = 3.000; (*t)(1,40) = -0.030; (*t)(2,40) = 0.012;
3349 (*t)(0,41) = 3.100; (*t)(1,41) = -0.030; (*t)(2,41) = 0.010;
3350 (*t)(0,42) = 3.200; (*t)(1,42) = -0.030; (*t)(2,42) = 0.010;
3351 (*t)(0,43) = 3.300; (*t)(1,43) = -0.030; (*t)(2,43) = 0.010;
3352 (*t)(0,44) = 3.400; (*t)(1,44) = -0.030; (*t)(2,44) = 0.008;
3353 (*t)(0,45) = 3.500; (*t)(1,45) = -0.030; (*t)(2,45) = 0.008;
3354 (*t)(0,46) = 3.600; (*t)(1,46) = -0.030; (*t)(2,46) = 0.008;
3355 (*t)(0,47) = 3.700; (*t)(1,47) = -0.030; (*t)(2,47) = 0.006;
3356 (*t)(0,48) = 3.800; (*t)(1,48) = -0.030; (*t)(2,48) = 0.006;
3357 (*t)(0,49) = 3.900; (*t)(1,49) = -0.030; (*t)(2,49) = 0.006;
3358 (*t)(0,50) = 4.000; (*t)(1,50) = -0.028; (*t)(2,50) = 0.004;
3359 (*t)(0,51) = 4.100; (*t)(1,51) = -0.030; (*t)(2,51) = 0.004;
3360 (*t)(0,52) = 4.200; (*t)(1,52) = -0.030; (*t)(2,52) = 0.004;
3361 (*t)(0,53) = 4.300; (*t)(1,53) = -0.028; (*t)(2,53) = 0.002;
3362 (*t)(0,54) = 4.400; (*t)(1,54) = -0.030; (*t)(2,54) = 0.002;
3363 (*t)(0,55) = 4.500; (*t)(1,55) = -0.028; (*t)(2,55) = 0.002;
3364 (*t)(0,56) = 4.600; (*t)(1,56) = -0.028; (*t)(2,56) = 0.002;
3365 (*t)(0,57) = 4.700; (*t)(1,57) = -0.028; (*t)(2,57) = 0.000;
3366 (*t)(0,58) = 4.800; (*t)(1,58) = -0.028; (*t)(2,58) = 0.002;
3367 (*t)(0,59) = 4.900; (*t)(1,59) = 0.000; (*t)(2,59) = 0.000;
3368 (*t)(0,60) = 5.900; (*t)(1,60) = 0.000; (*t)(2,60) = 0.000;
3374 t =
new TMatrixF(3,61);
3375 (*t)(0,0) = 0.000; (*t)(1,0) = 0.000; (*t)(2,0) = 0.000;
3376 (*t)(0,1) = 0.050; (*t)(1,1) = 0.000; (*t)(2,1) = 0.000;
3377 (*t)(0,2) = 0.100; (*t)(1,2) = 0.000; (*t)(2,2) = 0.000;
3378 (*t)(0,3) = 0.150; (*t)(1,3) = 0.000; (*t)(2,3) = 0.000;
3379 (*t)(0,4) = 0.200; (*t)(1,4) = -0.05; (*t)(2,4) = 0.05;
3380 (*t)(0,5) = 0.200; (*t)(1,5) = -0.05; (*t)(2,5) = 0.05;
3381 (*t)(0,6) = 0.200; (*t)(1,6) = -0.05; (*t)(2,6) = 0.05;
3382 (*t)(0,7) = 0.200; (*t)(1,7) = -0.05; (*t)(2,7) = 0.05;
3383 (*t)(0,8) = 0.200; (*t)(1,8) = -0.05; (*t)(2,8) = 0.05;
3384 (*t)(0,9) = 0.200; (*t)(1,9) = -0.05; (*t)(2,9) = 0.05;
3385 (*t)(0,10) = 0.200; (*t)(1,10) = -0.05; (*t)(2,10) = 0.05;
3386 (*t)(0,11) = 0.550; (*t)(1,11) = -0.026; (*t)(2,11) = 0.026;
3387 (*t)(0,12) = 0.600; (*t)(1,12) = -0.026; (*t)(2,12) = 0.026;
3388 (*t)(0,13) = 0.650; (*t)(1,13) = -0.026; (*t)(2,13) = 0.026;
3389 (*t)(0,14) = 0.700; (*t)(1,14) = -0.026; (*t)(2,14) = 0.026;
3390 (*t)(0,15) = 0.750; (*t)(1,15) = -0.026; (*t)(2,15) = 0.026;
3391 (*t)(0,16) = 0.800; (*t)(1,16) = -0.026; (*t)(2,16) = 0.026;
3392 (*t)(0,17) = 0.850; (*t)(1,17) = -0.024; (*t)(2,17) = 0.024;
3393 (*t)(0,18) = 0.900; (*t)(1,18) = -0.024; (*t)(2,18) = 0.024;
3394 (*t)(0,19) = 0.950; (*t)(1,19) = -0.024; (*t)(2,19) = 0.024;
3395 (*t)(0,20) = 1.000; (*t)(1,20) = -0.024; (*t)(2,20) = 0.024;
3396 (*t)(0,21) = 1.100; (*t)(1,21) = -0.024; (*t)(2,21) = 0.024;
3397 (*t)(0,22) = 1.200; (*t)(1,22) = -0.024; (*t)(2,22) = 0.022;
3398 (*t)(0,23) = 1.300; (*t)(1,23) = -0.024; (*t)(2,23) = 0.020;
3399 (*t)(0,24) = 1.400; (*t)(1,24) = -0.026; (*t)(2,24) = 0.016;
3400 (*t)(0,25) = 1.500; (*t)(1,25) = -0.028; (*t)(2,25) = 0.014;
3401 (*t)(0,26) = 1.600; (*t)(1,26) = -0.028; (*t)(2,26) = 0.012;
3402 (*t)(0,27) = 1.700; (*t)(1,27) = -0.028; (*t)(2,27) = 0.010;
3403 (*t)(0,28) = 1.800; (*t)(1,28) = -0.028; (*t)(2,28) = 0.010;
3404 (*t)(0,29) = 1.900; (*t)(1,29) = -0.028; (*t)(2,29) = 0.008;
3405 (*t)(0,30) = 2.000; (*t)(1,30) = -0.028; (*t)(2,30) = 0.006;
3406 (*t)(0,31) = 2.100; (*t)(1,31) = -0.026; (*t)(2,31) = 0.006;
3407 (*t)(0,32) = 2.200; (*t)(1,32) = -0.024; (*t)(2,32) = 0.004;
3408 (*t)(0,33) = 2.300; (*t)(1,33) = -0.020; (*t)(2,33) = 0.002;
3409 (*t)(0,34) = 2.400; (*t)(1,34) = -0.020; (*t)(2,34) = 0.002;
3410 (*t)(0,35) = 2.500; (*t)(1,35) = -0.018; (*t)(2,35) = 0.000;
3411 (*t)(0,36) = 2.600; (*t)(1,36) = -0.016; (*t)(2,36) = 0.000;
3412 (*t)(0,37) = 2.700; (*t)(1,37) = -0.014; (*t)(2,37) = -0.002;
3413 (*t)(0,38) = 2.800; (*t)(1,38) = -0.014; (*t)(2,38) = -0.004;
3414 (*t)(0,39) = 2.900; (*t)(1,39) = -0.012; (*t)(2,39) = -0.004;
3415 (*t)(0,40) = 3.000; (*t)(1,40) = -0.010; (*t)(2,40) = -0.006;
3416 (*t)(0,41) = 3.100; (*t)(1,41) = 0.000; (*t)(2,41) = 0.000;
3417 (*t)(0,42) = 3.200; (*t)(1,42) = 0.000; (*t)(2,42) = 0.000;
3418 (*t)(0,43) = 3.300; (*t)(1,43) = 0.000; (*t)(2,43) = 0.000;
3419 (*t)(0,44) = 3.400; (*t)(1,44) = 0.000; (*t)(2,44) = 0.000;
3420 (*t)(0,45) = 3.500; (*t)(1,45) = 0.000; (*t)(2,45) = 0.000;
3421 (*t)(0,46) = 3.600; (*t)(1,46) = 0.000; (*t)(2,46) = 0.000;
3422 (*t)(0,47) = 3.700; (*t)(1,47) = 0.000; (*t)(2,47) = 0.000;
3423 (*t)(0,48) = 3.800; (*t)(1,48) = 0.000; (*t)(2,48) = 0.000;
3424 (*t)(0,49) = 3.900; (*t)(1,49) = 0.000; (*t)(2,49) = 0.000;
3425 (*t)(0,50) = 4.000; (*t)(1,50) = 0.000; (*t)(2,50) = 0.000;
3426 (*t)(0,51) = 4.100; (*t)(1,51) = 0.000; (*t)(2,51) = 0.000;
3427 (*t)(0,52) = 4.200; (*t)(1,52) = 0.000; (*t)(2,52) = 0.000;
3428 (*t)(0,53) = 4.300; (*t)(1,53) = 0.000; (*t)(2,53) = 0.000;
3429 (*t)(0,54) = 4.400; (*t)(1,54) = 0.000; (*t)(2,54) = 0.000;
3430 (*t)(0,55) = 4.500; (*t)(1,55) = 0.000; (*t)(2,55) = 0.000;
3431 (*t)(0,56) = 4.600; (*t)(1,56) = 0.000; (*t)(2,56) = 0.000;
3432 (*t)(0,57) = 4.700; (*t)(1,57) = 0.000; (*t)(2,57) = 0.000;
3433 (*t)(0,58) = 4.800; (*t)(1,58) = 0.000; (*t)(2,58) = 0.000;
3434 (*t)(0,59) = 4.900; (*t)(1,59) = 0.000; (*t)(2,59) = 0.000;
3435 (*t)(0,60) = 5.900; (*t)(1,60) = 0.000; (*t)(2,60) = 0.000;
3451 if(! kTPC)
return kFALSE;
3466 case AliPID::kElectron:
3472 case AliPID::kDeuteron:
3475 case AliPID::kTriton:
3506 if(! kTPC)
return kFALSE;
3532 case AliPID::kElectron:
3538 case AliPID::kDeuteron:
3541 case AliPID::kTriton:
3564 Bool_t goodtrack = (track->GetStatus() & AliESDtrack::kTOFout) &&
3565 (track->GetStatus() & AliESDtrack::kTIME) &&
3566 (track->GetTOFsignal() > 12000) &&
3567 (track->GetTOFsignal() < 100000);
3594 case AliPID::kElectron:
3600 case AliPID::kDeuteron:
3603 case AliPID::kTriton:
3627 Bool_t goodtrack = (track->GetStatus() & AliESDtrack::kTOFout) &&
3628 (track->GetStatus() & AliESDtrack::kTIME) &&
3629 (track->GetTOFsignal() > 12000) &&
3630 (track->GetTOFsignal() < 100000) &&
3631 (track->GetIntegratedLength() > 365);
3660 case AliPID::kElectron:
3666 case AliPID::kDeuteron:
3669 case AliPID::kTriton:
3699 if (!track->GetInnerParam())
3702 const AliExternalTrackParam* tpcTrack = track->GetInnerParam();
3704 Double_t ptotTPC = tpcTrack->GetP();
3705 Double_t sigTPC = track->GetTPCsignal();
3711 case AliPID::kDeuteron:
3713 dEdxBBA = AliExternalTrackParam::BetheBlochAleph(ptotTPC/1.8756,
3719 dSigma = (sigTPC - dEdxBBA)/dEdxBBA;
3721 if( ptotTPC<=1.1 && (dSigma < (0.5 - (0.1818*ptotTPC)) ) && (dSigma > ( (0.218*ptotTPC - 0.4) ) ) )
3725 case AliPID::kTriton:
3733 dEdxBBA = 4.0 * AliExternalTrackParam::BetheBlochAleph( (2.*ptotTPC)/2.8084,
3739 dSigma = (sigTPC - dEdxBBA)/dEdxBBA;
3740 if(ptotTPC<=5.0 && (dSigma >= (-0.03968*ptotTPC - 0.1)) && (dSigma <= (0.31 - 0.0217*ptotTPC)))
3763 if(!track)
return kFALSE;
3766 if ((track->GetStatus()&AliVTrack::kTOFout)==0)
return kFALSE;
3767 if ((track->GetStatus()&AliVTrack::kTIME)==0)
return kFALSE;
3770 if(track->GetTPCsignal() < 10)
return kFALSE;
3775 Float_t nsigma2 = nsigmaTPC*nsigmaTPC + nsigmaTOF*nsigmaTOF;
3787 if(!track)
return kFALSE;
3790 if ((track->GetStatus()&AliVTrack::kTOFout)==0)
return kFALSE;
3791 if ((track->GetStatus()&AliVTrack::kTIME)==0)
return kFALSE;
3794 if(track->GetTPCsignal() < 10)
return kFALSE;
3799 Float_t nsigma2 = nsigmaTPC*nsigmaTPC + nsigmaTOF*nsigmaTOF;
3811 if(!track)
return kFALSE;
3815 for(
int i=0;i<60;i++){
3817 if(track->P()>pInterval && track->P()<pInterval+0.1){p_int = i;}
3830 if ( (track->IsOn(AliAODTrack::kITSin))){
3831 if(p_int<2)
return kFALSE;
3833 if(!
fPurityFunction[index]){ cout<<
"fPurityFunction[index] does not exist"<<endl;
return kFALSE;}
3835 if((track->IsOn(AliAODTrack::kTOFpid))){
3837 if(TMath::Sqrt(TMath::Power(nsigmaTPC,2)+TMath::Power(nsigmaTOF,2))<3){
3986 else if(centrCur < 20){
4096 else if(centrCur < 30){
4206 else if(centrCur < 40){
4316 else if(centrCur < 50){
4426 else if(centrCur < 60){
4536 else if(centrCur < 70){
4646 else if(centrCur < 80){
4868 fC[i][0] =
fC[17][0];
4869 fC[i][1] =
fC[17][1];
4870 fC[i][2] =
fC[17][2];
4871 fC[i][3] =
fC[17][3];
4872 fC[i][4] =
fC[17][4];
4882 const Float_t c = 2.99792457999999984e-02;
4884 Float_t mass[5] = {5.10998909999999971e-04,1.05658000000000002e-01,1.39570000000000000e-01,4.93676999999999977e-01,9.38271999999999995e-01};
4888 track->GetIntegratedTimes(exptimes);
4890 Float_t dedx = track->GetTPCsignal();
4893 Float_t time = track->GetTOFsignal()-
fESDpid.GetTOFResponse().GetStartTime(p);
4896 Float_t betagammares =
fESDpid.GetTOFResponse().GetExpectedSigma(p, exptimes[4], mass[4]);
4898 Float_t betagamma1 = tl/(time-5 *betagammares) * 33.3564095198152043;
4902 if(betagamma1 < 0.1) betagamma1 = 0.1;
4904 if(betagamma1 < 0.99999) betagamma1 /= TMath::Sqrt(1-betagamma1*betagamma1);
4905 else betagamma1 = 100;
4907 Float_t betagamma2 = tl/(time+5 *betagammares) * 33.3564095198152043;
4910 if(betagamma2 < 0.1) betagamma2 = 0.1;
4912 if(betagamma2 < 0.99999) betagamma2 /= TMath::Sqrt(1-betagamma2*betagamma2);
4913 else betagamma2 = 100;
4916 Float_t momtpc=track->GetTPCmomentum();
4918 for(
Int_t i=0;i < 5;i++){
4919 Float_t resolutionTOF =
fESDpid.GetTOFResponse().GetExpectedSigma(p, exptimes[i], mass[i]);
4920 if(TMath::Abs(exptimes[i] - time) < 5 * resolutionTOF){
4922 if(i==0) dedxExp =
fESDpid.GetTPCResponse().GetExpectedSignal(momtpc,AliPID::kElectron);
4923 else if(i==1) dedxExp =
fESDpid.GetTPCResponse().GetExpectedSignal(momtpc,AliPID::kMuon);
4924 else if(i==2) dedxExp =
fESDpid.GetTPCResponse().GetExpectedSignal(momtpc,AliPID::kPion);
4925 else if(i==3) dedxExp =
fESDpid.GetTPCResponse().GetExpectedSignal(momtpc,AliPID::kKaon);
4929 if(i==0) resolutionTPC =
fESDpid.GetTPCResponse().GetExpectedSigma(momtpc,track->GetTPCsignalN(),AliPID::kElectron);
4930 else if(i==1) resolutionTPC =
fESDpid.GetTPCResponse().GetExpectedSigma(momtpc,track->GetTPCsignalN(),AliPID::kMuon);
4931 else if(i==2) resolutionTPC =
fESDpid.GetTPCResponse().GetExpectedSigma(momtpc,track->GetTPCsignalN(),AliPID::kPion);
4932 else if(i==3) resolutionTPC =
fESDpid.GetTPCResponse().GetExpectedSigma(momtpc,track->GetTPCsignalN(),AliPID::kKaon);
4933 else if(i==4) resolutionTPC =
fESDpid.GetTPCResponse().GetExpectedSigma(momtpc,track->GetTPCsignalN(),
AliPID::kProton);
4935 if(TMath::Abs(dedx - dedxExp) < 3 * resolutionTPC){
4943 Float_t bbM =
fESDpid.GetTPCResponse().Bethe((betagamma1+betagamma2)*0.5);
4948 Float_t resolutionTOFpr =
fESDpid.GetTOFResponse().GetExpectedSigma(p, exptimes[4], mass[4]);
4950 if(TMath::Abs(dedx-bb1) < resolutionTPCpr*3 && exptimes[4] < time-7*resolutionTOFpr){
4953 else if(TMath::Abs(dedx-bb2) < resolutionTPCpr*3 && exptimes[4] < time-7*resolutionTOFpr){
4956 else if(TMath::Abs(dedx-bbM) < resolutionTPCpr*3 && exptimes[4] < time-7*resolutionTOFpr){
4974 if(!track) pass = kFALSE;
4977 if(track->GetTPCsignal() < 10) pass = kFALSE;
4996 nsigma2 = nsigmaTPC*nsigmaTPC;
4999 if (((track->GetStatus()&AliVTrack::kTOFout)==0)&&((track->GetStatus()&AliVTrack::kTIME)==0)){
5003 nsigma2 = nsigmaTPC*nsigmaTPC + nsigmaTOF*nsigmaTOF;
5021 return "TPCbayesian";
5029 return "TOFbayesianPID";
5031 return "TOFbetaSimple";
5035 return "TPCTOFNsigma";
5037 return "TPCTOFNsigmaPurity";
5054 return "TPCstandalone";
5056 return "SPDtracklets";
5064 return "DeltaVZERO";
5066 return "KappaVZERO";
5085 Int_t det = track->GetDetector();
5087 Float_t clsX = track->GetClusterX();
5088 Float_t clsY = track->GetClusterY();
5089 Float_t clsZ = track->GetClusterZ();
5090 Float_t ncell = track->GetClusterCells();
5091 Float_t adc = track->GetClusterADC();
5102 if (
fCutEta) {
if ( fTrackEta < fEtaMin || fTrackEta >=
fEtaMax ) pass = kFALSE;}
5103 if (
fCutPhi) {
if ( fTrackPhi < fPhiMin || fTrackPhi >=
fPhiMax ) pass = kFALSE;}
5115 if (
id<0)
return kFALSE;
5120 fTrackPhi = TMath::PiOver4()*(0.5+
id%8);
5162 if(
fEvent->GetRunNumber() < 209122){
5165 EventCentrality =
fEvent->GetCentrality()->GetCentralityPercentile(
"V0M");
5182 if(CorrectionFactor) {
5187 AliMultSelection *MultSelection = 0x0;
5188 MultSelection = (AliMultSelection * )
fEvent->FindListObject(
"MultSelection");
5189 if( !MultSelection) {
5191 AliFatal(
"AliMultSelection not found, did you Run AliMultSelectionTask? \n");
5193 EventCentrality = MultSelection->GetMultiplicityPercentile(
"V0M");
5194 if(EventCentrality < 0 && EventCentrality > 100){
5195 AliWarning(
"No Correction Available for this Centrality \n");
5213 if(CorrectionFactor>0) {
5229 if (
fCutEta) {
if ( fTrackEta < fEtaMin || fTrackEta >=
fEtaMax ) pass = kFALSE;}
5230 if (
fCutPhi) {
if ( fTrackPhi < fPhiMin || fTrackPhi >=
fPhiMax ) pass = kFALSE;}
5244 AliESDMuonTrack *esdTrack =
dynamic_cast<AliESDMuonTrack*
>(vparticle);
5245 AliAODTrack *aodTrack =
dynamic_cast<AliAODTrack*
>(vparticle);
5246 if ((!esdTrack) && (!aodTrack))
return kFALSE;
5257 rpxpy = TMath::Sqrt(xPos*xPos + yPos*yPos);
5258 theta = TMath::ATan2(rpxpy,zPos);
5259 eta = -TMath::Log(TMath::Tan(0.5*theta));
5267 Float_t pybypx, phi = 0., phi1;
5270 if(yPos>0) phi = 90.;
5271 if(yPos<0) phi = 270.;
5276 if(pybypx < 0) pybypx = - pybypx;
5277 phi1 = TMath::ATan(pybypx)*180./3.14159;
5279 if(xPos > 0 && yPos > 0) phi = phi1;
5280 if(xPos < 0 && yPos > 0) phi = 180 - phi1;
5281 if(xPos < 0 && yPos < 0) phi = 180 + phi1;
5282 if(xPos > 0 && yPos < 0) phi = 360 - phi1;
5285 phi = phi*3.14159/180.;
5300 if (!
fQA || !list)
return 0;
5301 if (list->IsEmpty())
return 0;
5305 while ( (obj = dynamic_cast<AliFlowTrackCuts*>(next())) )
5307 if (obj==
this)
continue;
5308 tmplist.Add(obj->
GetQA());
5310 return fQA->Merge(&tmplist);
5320 printf(
"The purity functions file does not exist");
5326 TString species[3] = {
"pion",
"kaon",
"proton"};
5327 TList *Species_functions[3];
5329 for(ispecie = 0; ispecie < 3; ispecie++) {
5331 if(!Species_functions[ispecie]) {
5332 cout<<
"Purity functions for species: "<<species[ispecie]<<
" not found!!!"<<endl;
5337 for(
int i=0;i<180;i++){
5341 if(!
fPurityFunction[i]){printf(
"Purity function does not exist");
return;}
5347 Int_t counterForSharedCluster = 0;
5348 for(
int i =0;i<6;i++){
5349 Bool_t sharedITSCluster = track->HasSharedPointOnITSLayer(i);
5352 if(sharedITSCluster == 1) counterForSharedCluster++;
5356 return counterForSharedCluster;
5363 if(track->GetNcls(0) == 0)
return 999.;
5364 Double_t chi2perClusterITS = track->GetITSchi2()/track->GetNcls(0);
5370 return chi2perClusterITS;
Double_t fTrackPt
mass of the particle
Bool_t PassesESDcuts(AliESDtrack *track)
Double_t fIgnoreTPCzRangeMax
static AliFlowTrackCuts * GetStandardVZEROOnlyTrackCuts2011()
void SetDCAToVertex2D(Bool_t a)
void SetStandardMuonTrackCuts()
AliPID::EParticleType fParticleID
void SetMaxChi2PerClusterTPC(Float_t a)
void SetEta(Double_t eta)
void SetMaxDCAToVertexZ(Float_t a)
virtual void Clear(Option_t *o="")
virtual Bool_t IsSelectedMCtruth(TObject *obj, Int_t id=-666)
TObject * GetInputObject(Int_t i)
TFile * fPurityFunctionsFile
void SetApplyRecentering(Bool_t r)
virtual void AddDaughter(Int_t)
Bool_t fForceTPCstandalone
void SetIsMuonMC(Bool_t isMC)
static AliFlowTrackCuts * GetStandardITSTPCTrackCuts2009(Bool_t selPrimaries=kTRUE)
Float_t GetTOFMismProb() const
static AliFlowTrackCuts * GetStandardGlobalTrackCuts2010()
void Set(const AliVParticle *p)
Double_t MaxChi2perITSClusterCuts(AliESDtrack *track)
Bool_t FillFlowTrackVParticle(AliFlowTrack *t) const
Bool_t GetRequireITSRefit() const
AliMuonTrackCuts * fMuonTrackCuts
Bool_t PassesPMDcuts(const AliESDPmdTrack *track)
void ComputeProb(const AliESDtrack *t, Float_t)
Float_t fMinChi2PerClusterTPC
static const Int_t fgkNumberOfVZEROtracks
static AliFlowTrackCuts * GetAODTrackCutsForFilterBit(UInt_t bit=1, TString suffix="")
Bool_t PassesNucleiSelection(const AliESDtrack *track)
TH1 * fVZEROgainEqualization
void SetPhiMin(Double_t min)
void SetMass(Double_t mass)
Int_t Count(AliVEvent *event=NULL)
virtual Bool_t IsSelected(TObject *obj, Int_t id=-666)
void SetParamType(trackParameterType paramType)
void SetMaxDCAToVertexXY(Float_t a)
static AliFlowTrackCuts * GetStandardVZEROOnlyTrackCuts2010()
Bool_t PassesCuts(const AliFlowTrackSimple *track) const
void SetDetResponse(AliESDEvent *esd, Float_t centrality=-1.0, EStartTimeType_t flagStart=AliESDpid::kTOF_T0, Bool_t=kFALSE)
AliFlowTrackSimpleCuts & operator=(const AliFlowTrackSimpleCuts &)
AliESDpid fESDpid
placeholder for TPC only track to avoid new/delete on every track