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 fCutTPCSecboundMinpt(0.2),
127 fCutTPCSecboundVar(kFALSE),
130 fLinearizeVZEROresponse(kFALSE),
131 fCentralityPercentileMin(0.),
132 fCentralityPercentileMax(5.),
138 fCutPmdNcell(kFALSE),
140 fMinKinkAngle(TMath::DegToRad()*2.),
141 fMinKinkRadius(130.),
142 fMaxKinkRadius(200.),
145 fMinKinkInvMassKmu(0.),
146 fMaxKinkInvMassKmu(0.6),
147 fForceTPCstandalone(kFALSE),
148 fRequireKinkDaughters(kFALSE),
159 fTrackLabel(INT_MIN),
165 fBayesianResponse(NULL),
169 fParticleID(AliPID::kUnknown),
170 fParticleProbability(.9),
171 fAllowTOFmismatchFlag(kFALSE),
172 fRequireStrictTOFTPCagreement(kFALSE),
173 fCutRejectElectronsWithTPCpid(kFALSE),
177 fVZEROgainEqualization(NULL),
178 fVZEROgainEqualizationCen(NULL),
179 fApplyRecentering(kFALSE),
180 fVZEROgainEqualizationPerRing(kFALSE),
188 fPurityFunctionsFile(0),
189 fPurityFunctionsList(0),
190 fCutITSclusterShared(kFALSE),
191 fMaxITSclusterShared(0),
203 fBayesianResponse->SetNewTrackParam();
204 for(
Int_t i(0); i < 4; i++) {
208 for(
Int_t i(0); i < 8; i++) fUseVZERORing[i] = kTRUE;
210 for(
Int_t i(0) ; i < 180; i++) {
211 fPurityFunction[i]=NULL;
214 fPhiCutLow =
new TF1(
"fPhiCutLow",
"0.1/x/x+pi/18.0-0.025", 0, 100);
215 fPhiCutHigh =
new TF1(
"fPhiCutHigh",
"0.12/x+pi/18.0+0.035", 0, 100);
221 fAliESDtrackCuts(NULL),
222 fMuonTrackCuts(NULL),
225 fCutMChasTrackReferences(kFALSE),
226 fCutMCprocessType(kFALSE),
227 fMCprocessType(kPNoProcess),
230 fCutMCfirstMotherPID(kFALSE),
231 fMCfirstMotherPID(0),
232 fIgnoreSignInMCPID(kFALSE),
233 fCutMCisPrimary(kFALSE),
234 fRequireTransportBitForPrimaries(kTRUE),
235 fMCisPrimary(kFALSE),
236 fRequireCharge(kFALSE),
238 fCutSPDtrackletDeltaPhi(kFALSE),
239 fSPDtrackletDeltaPhiMax(FLT_MAX),
240 fSPDtrackletDeltaPhiMin(-FLT_MAX),
241 fIgnoreTPCzRange(kFALSE),
242 fIgnoreTPCzRangeMax(FLT_MAX),
243 fIgnoreTPCzRangeMin(-FLT_MAX),
244 fCutChi2PerClusterTPC(kFALSE),
245 fMaxChi2PerClusterTPC(FLT_MAX),
246 fMinChi2PerClusterTPC(-FLT_MAX),
247 fCutNClustersTPC(kFALSE),
248 fNClustersTPCMax(INT_MAX),
249 fNClustersTPCMin(INT_MIN),
250 fCutNClustersITS(kFALSE),
251 fNClustersITSMax(INT_MAX),
252 fNClustersITSMin(INT_MIN),
253 fUseAODFilterBit(kTRUE),
255 fCutDCAToVertexXY(kFALSE),
256 fCutDCAToVertexZ(kFALSE),
257 fCutMinimalTPCdedx(kFALSE),
259 fCutTPCSecbound(kFALSE),
260 fCutTPCSecboundMinpt(0.2),
261 fCutTPCSecboundVar(kFALSE),
264 fLinearizeVZEROresponse(kFALSE),
265 fCentralityPercentileMin(0.),
266 fCentralityPercentileMax(5.),
272 fCutPmdNcell(kFALSE),
274 fMinKinkAngle(TMath::DegToRad()*2.),
275 fMinKinkRadius(130.),
276 fMaxKinkRadius(200.),
279 fMinKinkInvMassKmu(0.0),
280 fMaxKinkInvMassKmu(0.6),
281 fForceTPCstandalone(kFALSE),
282 fRequireKinkDaughters(kFALSE),
293 fTrackLabel(INT_MIN),
299 fBayesianResponse(NULL),
303 fParticleID(AliPID::kUnknown),
304 fParticleProbability(.9),
305 fAllowTOFmismatchFlag(kFALSE),
306 fRequireStrictTOFTPCagreement(kFALSE),
307 fCutRejectElectronsWithTPCpid(kFALSE),
311 fVZEROgainEqualization(NULL),
312 fVZEROgainEqualizationCen(NULL),
313 fApplyRecentering(kFALSE),
314 fVZEROgainEqualizationPerRing(kFALSE),
322 fPurityFunctionsFile(0),
323 fPurityFunctionsList(0),
324 fCutITSclusterShared(kFALSE),
325 fMaxITSclusterShared(0),
331 SetTitle(
"AliFlowTrackCuts");
332 fESDpid.GetTPCResponse().SetBetheBlochParameters( 0.0283086,
341 for(
Int_t i(0); i < 4; i++) {
347 for(
int i=0;i<180;i++){
351 fPhiCutLow =
new TF1(
"fPhiCutLow",
"0.1/x/x+pi/18.0-0.025", 0, 100);
352 fPhiCutHigh =
new TF1(
"fPhiCutHigh",
"0.12/x+pi/18.0+0.035", 0, 100);
358 fAliESDtrackCuts(NULL),
359 fMuonTrackCuts(NULL),
362 fCutMChasTrackReferences(that.fCutMChasTrackReferences),
363 fCutMCprocessType(that.fCutMCprocessType),
364 fMCprocessType(that.fMCprocessType),
365 fCutMCPID(that.fCutMCPID),
367 fCutMCfirstMotherPID(that.fCutMCfirstMotherPID),
368 fMCfirstMotherPID(that.fMCfirstMotherPID),
369 fIgnoreSignInMCPID(that.fIgnoreSignInMCPID),
370 fCutMCisPrimary(that.fCutMCisPrimary),
371 fRequireTransportBitForPrimaries(that.fRequireTransportBitForPrimaries),
372 fMCisPrimary(that.fMCisPrimary),
373 fRequireCharge(that.fRequireCharge),
374 fFakesAreOK(that.fFakesAreOK),
375 fCutSPDtrackletDeltaPhi(that.fCutSPDtrackletDeltaPhi),
376 fSPDtrackletDeltaPhiMax(that.fSPDtrackletDeltaPhiMax),
377 fSPDtrackletDeltaPhiMin(that.fSPDtrackletDeltaPhiMin),
378 fIgnoreTPCzRange(that.fIgnoreTPCzRange),
379 fIgnoreTPCzRangeMax(that.fIgnoreTPCzRangeMax),
380 fIgnoreTPCzRangeMin(that.fIgnoreTPCzRangeMin),
381 fCutChi2PerClusterTPC(that.fCutChi2PerClusterTPC),
382 fMaxChi2PerClusterTPC(that.fMaxChi2PerClusterTPC),
383 fMinChi2PerClusterTPC(that.fMinChi2PerClusterTPC),
384 fCutNClustersTPC(that.fCutNClustersTPC),
385 fNClustersTPCMax(that.fNClustersTPCMax),
386 fNClustersTPCMin(that.fNClustersTPCMin),
387 fCutNClustersITS(that.fCutNClustersITS),
388 fNClustersITSMax(that.fNClustersITSMax),
389 fNClustersITSMin(that.fNClustersITSMin),
390 fUseAODFilterBit(that.fUseAODFilterBit),
391 fAODFilterBit(that.fAODFilterBit),
392 fCutDCAToVertexXY(that.fCutDCAToVertexXY),
393 fCutDCAToVertexZ(that.fCutDCAToVertexZ),
394 fCutMinimalTPCdedx(that.fCutMinimalTPCdedx),
395 fMinimalTPCdedx(that.fMinimalTPCdedx),
396 fCutTPCSecbound(that.fCutTPCSecbound),
397 fCutTPCSecboundMinpt(that.fCutTPCSecboundMinpt),
398 fCutTPCSecboundVar(that.fCutTPCSecboundVar),
401 fLinearizeVZEROresponse(that.fLinearizeVZEROresponse),
402 fCentralityPercentileMin(that.fCentralityPercentileMin),
403 fCentralityPercentileMax(that.fCentralityPercentileMax),
404 fPurityLevel(that.fPurityLevel),
405 fCutPmdDet(that.fCutPmdDet),
406 fPmdDet(that.fPmdDet),
407 fCutPmdAdc(that.fCutPmdAdc),
408 fPmdAdc(that.fPmdAdc),
409 fCutPmdNcell(that.fCutPmdNcell),
410 fPmdNcell(that.fPmdNcell),
411 fMinKinkAngle(that.fMinKinkAngle),
412 fMinKinkRadius(that.fMinKinkRadius),
413 fMaxKinkRadius(that.fMaxKinkRadius),
414 fMinKinkQt(that.fMinKinkQt),
415 fMaxKinkQt(that.fMaxKinkQt),
416 fMinKinkInvMassKmu(that.fMinKinkInvMassKmu),
417 fMaxKinkInvMassKmu(that.fMaxKinkInvMassKmu),
418 fForceTPCstandalone(that.fForceTPCstandalone),
419 fRequireKinkDaughters(that.fRequireKinkDaughters),
420 fParamType(that.fParamType),
421 fParamMix(that.fParamMix),
430 fTrackLabel(INT_MIN),
435 fESDpid(that.fESDpid),
436 fBayesianResponse(NULL),
437 fPIDsource(that.fPIDsource),
440 fParticleID(that.fParticleID),
441 fParticleProbability(that.fParticleProbability),
442 fAllowTOFmismatchFlag(that.fAllowTOFmismatchFlag),
443 fRequireStrictTOFTPCagreement(that.fRequireStrictTOFTPCagreement),
444 fCutRejectElectronsWithTPCpid(that.fCutRejectElectronsWithTPCpid),
447 fPtTOFPIDoff(that.fPtTOFPIDoff),
448 fVZEROgainEqualization(NULL),
449 fVZEROgainEqualizationCen(NULL),
450 fApplyRecentering(that.fApplyRecentering),
451 fVZEROgainEqualizationPerRing(that.fVZEROgainEqualizationPerRing),
452 fDivSigma(that.fDivSigma),
457 fPIDResponse(that.fPIDResponse),
458 fNsigmaCut2(that.fNsigmaCut2),
459 fPurityFunctionsFile(that.fPurityFunctionsFile),
460 fPurityFunctionsList(that.fPurityFunctionsList),
461 fCutITSclusterShared(kFALSE),
462 fMaxITSclusterShared(0),
481 fBayesianResponse->SetNewTrackParam();
487 for(
Int_t i(0); i < 4; i++) {
493 for(
Int_t i(0); i < 180; i++) {
497 fPhiCutLow =
new TF1(
"fPhiCutLow",
"0.1/x/x+pi/18.0-0.025", 0, 100);
498 fPhiCutHigh =
new TF1(
"fPhiCutHigh",
"0.12/x+pi/18.0+0.035", 0, 100);
505 if (
this==&that)
return *
this;
616 #if ROOT_VERSION_CODE < ROOT_VERSION(5,99,0)
625 for(
Int_t i(0); i < 4; i++) {
641 fPhiCutLow =
new TF1(
"fPhiCutLow",
"0.1/x/x+pi/18.0-0.025", 0, 100);
642 fPhiCutHigh =
new TF1(
"fPhiCutHigh",
"0.12/x+pi/18.0+0.035", 0, 100);
655 if (
fQA) {
fQA->SetOwner();
fQA->Delete();
delete fQA; }
684 for(
int i=0;i<180;i++){
708 AliInputEventHandler* inputHandler = (AliInputEventHandler*) (man->GetInputEventHandler());
709 if(inputHandler)
fPIDResponse=inputHandler->GetPIDResponse();
723 fESDpid.SetTOFResponse(myESD,AliESDpid::kTOF_T0);
728 if(myAOD->GetTOFHeader()){
729 fESDpid.SetTOFResponse(myAOD,AliESDpid::kTOF_T0);
750 fESDpid.GetTPCResponse().SetBetheBlochParameters( 2.15898e+00/50.,
762 AliVParticle* vparticle =
dynamic_cast<AliVParticle*
>(obj);
771 AliMultiplicity* tracklets =
dynamic_cast<AliMultiplicity*
>(obj);
772 if (tracklets)
return PassesCuts(tracklets,
id);
773 AliAODTracklets* trkletAOD =
dynamic_cast<AliAODTracklets*
>(obj);
774 if (trkletAOD)
return PassesCuts(trkletAOD,
id);
775 AliESDPmdTrack* pmdtrack =
dynamic_cast<AliESDPmdTrack*
>(obj);
777 AliVVZERO* vvzero =
dynamic_cast<AliVVZERO*
>(obj);
779 AliESDkink* kink =
dynamic_cast<AliESDkink*
>(obj);
791 AliVParticle* vparticle =
dynamic_cast<AliVParticle*
>(obj);
796 AliMultiplicity* tracklets =
dynamic_cast<AliMultiplicity*
>(obj);
799 Int_t label0 = tracklets->GetLabel(
id,0);
800 Int_t label1 = tracklets->GetLabel(
id,1);
802 if (label0!=label1) label = -666;
823 if (
id<0)
return kFALSE;
831 if (
fCutEta) {
if ( fTrackEta < fEtaMin || fTrackEta >=
fEtaMax )
return kFALSE;}
832 if (
fCutPhi) {
if ( fTrackPhi < fPhiMin || fTrackPhi >=
fPhiMax )
return kFALSE;}
837 Int_t label0 = tracklet->GetLabel(
id,0);
838 Int_t label1 = tracklet->GetLabel(
id,1);
840 fTrackLabel = (label0==label1)?tracklet->GetLabel(
id,1):-1;
854 if (
id<0)
return kFALSE;
861 fTrackEta = -1.*TMath::Log(TMath::Tan(tracklet->GetTheta(
id)/2.));
863 if (
fCutEta) {
if ( fTrackEta < fEtaMin || fTrackEta >=
fEtaMax )
return kFALSE;}
864 if (
fCutPhi) {
if ( fTrackPhi < fPhiMin || fTrackPhi >=
fPhiMax )
return kFALSE;}
869 Int_t label0 = tracklet->GetLabel(
id,0);
870 Int_t label1 = tracklet->GetLabel(
id,1);
872 fTrackLabel = (label0==label1)?tracklet->GetLabel(
id,1):-1;
884 if (!mcEvent)
return kFALSE;
885 if (label<0)
return kFALSE;
886 AliMCParticle* mcparticle =
static_cast<AliMCParticle*
>(mcEvent->GetTrack(label));
887 if (!mcparticle) {AliError(
"no MC track");
return kFALSE;}
895 Int_t pdgCode = mcparticle->PdgCode();
898 if (TMath::Abs(
fMCPID) != TMath::Abs(pdgCode))
return kFALSE;
902 if (
fMCPID != pdgCode)
return kFALSE;
908 TParticle* tparticle=mcparticle->Particle();
909 Int_t firstMotherLabel = 0;
910 if (tparticle) { firstMotherLabel = tparticle->GetFirstMother(); }
911 AliVParticle* firstMotherParticle = mcEvent->GetTrack(firstMotherLabel);
912 Int_t pdgcodeFirstMother = 0;
913 if (firstMotherParticle) { pdgcodeFirstMother = firstMotherParticle->PdgCode(); }
918 TParticle* particle = mcparticle->Particle();
919 Int_t processID = particle->GetUniqueID();
924 if (mcparticle->GetNumberOfTrackReferences()<1)
return kFALSE;
947 fV0 =
const_cast<AliESDv0*
>(v0);
952 if (!v0->GetOnFlyStatus())
return kFALSE;
953 const AliExternalTrackParam *negHelix=v0->GetParamN();
954 const AliExternalTrackParam *posHelix=v0->GetParamP();
955 AliVParticle *v0tracks[2];
956 v0tracks[0] =
fEvent->GetTrack(v0->GetNindex());
957 v0tracks[1] =
fEvent->GetTrack(v0->GetPindex());
958 if( v0tracks[1]->Charge() < 0)
960 v0tracks[1] =
fEvent->GetTrack(v0->GetNindex());
961 v0tracks[0] =
fEvent->GetTrack(v0->GetPindex());
962 negHelix=v0->GetParamP();
963 posHelix=v0->GetParamN();
966 int KalmanPidPairs[4][2] =
977 AliKFParticle v0trackKFneg(*(negHelix),KalmanPidPairs[
id][0]);
978 AliKFParticle v0trackKFpos(*(posHelix),KalmanPidPairs[
id][1]);
979 AliKFParticle v0particleRefit;
980 v0particleRefit += v0trackKFneg;
981 v0particleRefit += v0trackKFpos;
983 v0particleRefit.GetMass(
fTrackMass,invMassErr);
987 fTrackPhi = TMath::Pi()+v0particleRefit.GetPhi();
996 if ( v0tracks[0]->Charge() == v0tracks[1]->Charge() ) pass=kFALSE;
997 if ( v0tracks[0]->Pt()<0.15 || v0tracks[1]->Pt()<0.15 ) pass=kFALSE;
1009 fKink=
const_cast<AliESDkink*
>(kink);
1013 Float_t kinkAngle = kink->GetAngle(2);
1015 Double_t kinkRadius = kink->GetR();
1016 if (kinkRadius<fMinKinkRadius || kinkRadius>
fMaxKinkRadius) pass = kFALSE;
1019 const TVector3 motherMfromKink(kink->GetMotherP());
1020 const TVector3 daughterMfromKink(kink->GetDaughterP());
1022 if ( qt < fMinKinkQt || qt >
fMaxKinkQt) pass = kFALSE;
1025 Float_t energyDaughterMu = TMath::Sqrt( daughterMfromKink.Mag()*daughterMfromKink.Mag()+
1026 0.105658*0.105658 );
1027 Float_t p1XM = motherMfromKink.Px();
1028 Float_t p1YM = motherMfromKink.Py();
1029 Float_t p1ZM = motherMfromKink.Pz();
1030 Float_t p2XM = daughterMfromKink.Px();
1031 Float_t p2YM = daughterMfromKink.Py();
1032 Float_t p2ZM = daughterMfromKink.Pz();
1033 Float_t p3Daughter = TMath::Sqrt( ((p1XM-p2XM)*(p1XM-p2XM))+((p1YM-p2YM)*(p1YM-p2YM))+
1034 ((p1ZM-p2ZM)*(p1ZM-p2ZM)) );
1035 Double_t invariantMassKmu = TMath::Sqrt( (energyDaughterMu+p3Daughter)*(energyDaughterMu+p3Daughter)-
1036 motherMfromKink.Mag()*motherMfromKink.Mag() );
1044 if (pass)
QAafter(13)->Fill(qt);
1045 QAbefore(14)->Fill(invariantMassKmu);
1046 if (pass)
QAafter(14)->Fill(invariantMassKmu);
1047 const Double_t* kinkPosition = kink->GetPosition();
1048 QAbefore(15)->Fill(kinkPosition[0],kinkPosition[1]);
1049 if (pass)
QAafter(15)->Fill(kinkPosition[0],kinkPosition[1]);
1050 QAbefore(16)->Fill(motherMfromKink.Mag(),kinkAngle*TMath::RadToDeg());
1051 if (pass)
QAafter(16)->Fill(motherMfromKink.Mag(),kinkAngle*TMath::RadToDeg());
1055 Int_t indexKinkMother = kink->GetIndex(0);
1056 AliESDtrack* motherTrack =
dynamic_cast<AliESDtrack*
>(
fEvent->GetTrack(indexKinkMother));
1057 if (!motherTrack)
return kFALSE;
1080 Bool_t isMCparticle = kFALSE;
1081 AliESDtrack* esdTrack =
dynamic_cast<AliESDtrack*
>(vparticle);
1082 AliAODTrack* aodTrack = NULL;
1093 isMCparticle = (
dynamic_cast<AliMCParticle*
>(
fTrack))!=NULL;
1094 aodTrack =
dynamic_cast<AliAODTrack*
>(vparticle);
1099 if (!
fTrack)
return kFALSE;
1101 if (esdTrack) esdTrack =
static_cast<AliESDtrack*
>(
fTrack);
1107 if (
fCutPt) {
if (pt < fPtMin || pt >=
fPtMax ) pass=kFALSE;}
1116 if (charge!=
fCharge) pass=kFALSE;
1124 if (esdTrack) {
if (!
PassesESDcuts(esdTrack)) { pass=kFALSE; } }
1125 if (aodTrack) {
if (!
PassesAODcuts(aodTrack,pass)) { pass=kFALSE; } }
1132 Int_t processID = tparticle->GetUniqueID();
1133 Int_t firstMotherLabel = tparticle->GetFirstMother();
1141 AliVParticle* firstMotherParticle =
fMCevent->GetTrack(firstMotherLabel);
1142 Int_t pdgcodeFirstMother = 0;
1143 if (firstMotherParticle) {pdgcodeFirstMother = firstMotherParticle->PdgCode();}
1146 switch (TMath::Abs(pdgcode))
1149 pdg = AliPID::kElectron + 0.5;
break;
1151 pdg = AliPID::kMuon + 0.5;
break;
1153 pdg = AliPID::kPion + 0.5;
break;
1155 pdg = AliPID::kKaon + 0.5;
break;
1159 pdg = AliPID::kUnknown + 0.5;
break;
1161 pdg = TMath::Sign(pdg,static_cast<Float_t>(pdgcode));
1164 switch (pdgcodeFirstMother)
1175 case 12:
case 14:
case 16:
1304 QAbefore(3)->Fill(p,primary?0.5:-0.5);
1305 QAbefore(4)->Fill(p,static_cast<Float_t>(processID));
1306 QAbefore(7)->Fill(p,geantCode+0.5);
1307 if (pass)
QAafter(2)->Fill(p,pdg);
1308 if (pass)
QAafter(3)->Fill(p,primary?0.5:-0.5);
1309 if (pass)
QAafter(4)->Fill(p,static_cast<Float_t>(processID));
1310 if (pass)
QAafter(7)->Fill(p,geantCode);
1327 Int_t ntpccls = track->GetTPCNcls();
1333 Int_t nitscls = track->GetITSNcls();
1339 Double_t chi2tpc = track->Chi2perNDF();
1343 if (
GetRequireTPCRefit() && !(track->GetStatus() & AliESDtrack::kTPCrefit) ) pass=kFALSE;
1344 if (
GetRequireITSRefit() && !(track->GetStatus() & AliESDtrack::kITSrefit) ) pass=kFALSE;
1350 if (std::abs((
Int_t)DCAxy)==999 || std::abs((
Int_t)DCAz)==999) {
1353 Double_t pos[3] = {-99., -99., -99.};
1354 track->GetPosition(pos);
1355 if(pos[0]*pos[0]+pos[1]*pos[1] <= 3.*3.) {
1356 AliAODTrack copy(*track);
1358 Double_t bCov[3] = {-99., -99., -99.};
1359 if(copy.PropagateToDCA(
fEvent->GetPrimaryVertex(),
fEvent->GetMagneticField(), 100., b, bCov)) {
1368 Double_t dedx = track->GetTPCsignal();
1373 track->GetIntegratedTimes(time);
1376 Double_t xyz[3]={-9999.,-9999.,-9999.};
1377 const double r = 84.;
1378 if (!track->GetXYZatR(r,
fEvent->GetMagneticField(), xyz, NULL)) pass=kFALSE;
1379 Double_t cra = TMath::ATan2(xyz[1],xyz[0]);
1380 Double_t dpe = 3.*TMath::TwoPi()/360.;
1381 for(
Int_t nb=-9; nb<=9; nb++) {
1383 if(cra<bnp+dpe && cra>bnp-dpe) pass=kFALSE;
1388 if(
fEvent->GetMagneticField() < 0)
1389 phimod = TMath::TwoPi() - phimod;
1390 if(track->Charge() < 0)
1391 phimod = TMath::TwoPi() - phimod;
1393 cout <<
"Warning!!!!! phi < 0: " << phimod << endl;
1395 phimod += TMath::Pi()/18.0;
1396 phimod = fmod(phimod, TMath::Pi()/9.0);
1397 if(phimod < fPhiCutHigh->Eval(track->Pt()) && phimod >
fPhiCutLow->Eval(track->Pt()))
1408 Double_t momTPC = track->GetTPCmomentum();
1412 QAbefore( 5)->Fill(track->Pt(),DCAxy);
1413 QAbefore( 6)->Fill(track->Pt(),DCAz);
1414 if (pass)
QAafter( 1)->Fill(momTPC,dedx);
1415 if (pass)
QAafter( 5)->Fill(track->Pt(),DCAxy);
1416 if (pass)
QAafter( 6)->Fill(track->Pt(),DCAz);
1417 QAbefore( 8)->Fill(track->P(),(track->GetTOFsignal()-time[AliPID::kElectron]));
1418 if (pass)
QAafter( 8)->Fill(track->P(),(track->GetTOFsignal()-time[AliPID::kElectron]));
1419 QAbefore( 9)->Fill(track->P(),(track->GetTOFsignal()-time[AliPID::kMuon]));
1420 if (pass)
QAafter( 9)->Fill(track->P(),(track->GetTOFsignal()-time[AliPID::kMuon]));
1421 QAbefore(10)->Fill(track->P(),(track->GetTOFsignal()-time[AliPID::kPion]));
1422 if (pass)
QAafter( 10)->Fill(track->P(),(track->GetTOFsignal()-time[AliPID::kPion]));
1423 QAbefore(11)->Fill(track->P(),(track->GetTOFsignal()-time[AliPID::kKaon]));
1424 if (pass)
QAafter( 11)->Fill(track->P(),(track->GetTOFsignal()-time[AliPID::kKaon]));
1440 track->GetImpactParameters(dcaxy,dcaz);
1441 const AliExternalTrackParam* pout = track->GetOuterParam();
1442 const AliExternalTrackParam* pin = track->GetInnerParam();
1450 if (zin*zout<0) pass=kFALSE;
1452 if (zout < fIgnoreTPCzRangeMin || zout > fIgnoreTPCzRangeMax) pass=kFALSE;
1457 track->GetTPCNclsIter1():track->GetTPCNcls();
1461 track->GetTPCchi2Iter1():track->GetTPCchi2();
1462 tpcchi2 = (ntpccls>0)?tpcchi2/ntpccls:-FLT_MAX;
1477 Int_t nitscls = track->GetNcls(0);
1494 if (pass)
QAbefore(0)->Fill(track->GetP(),beta);
1495 if (pass)
QAbefore(1)->Fill(pin->GetP(),dedx);
1506 track->GetTPCpid(pidTPC);
1521 if (pass)
QAafter(0)->Fill(track->GetP(),beta);
1522 if (pass)
QAafter(1)->Fill(pin->GetP(),dedx);
1531 if (pass)
QAafter(5)->Fill(pt,dcaxy);
1532 if (pass)
QAafter(6)->Fill(pt,dcaz);
1562 if (!track->FillTPCOnlyTrack(
fTPCtrack))
1578 if (!track->FillTPCOnlyTrack(
fTPCtrack))
1604 Int_t multiplicity = 0;
1614 for (
Int_t i=0; i<
event->GetNumberOfTracks(); i++)
1616 if (
IsSelected(event->GetTrack(i))) multiplicity++;
1619 return multiplicity;
1792 cuts->
fAliESDtrackCuts = AliESDtrackCuts::GetStandardITSTPCTrackCuts2009(selPrimaries);
1902 trackCollection->AddAtAndExpand(flowtrack,trackIndex);
1905 TParticle *tmpTParticle=NULL;
1906 AliMCParticle* tmpAliMCParticle=NULL;
1907 AliExternalTrackParam* externalParams=NULL;
1908 AliESDtrack* esdtrack=NULL;
1930 tmpAliMCParticle =
static_cast<AliMCParticle*
>(
fMCevent->GetTrack(tmpTParticle->GetFirstMother()));
1931 flowtrack->
SetPt(tmpAliMCParticle->Pt());
1934 esdtrack =
dynamic_cast<AliESDtrack*
>(
fTrack);
1935 if (!esdtrack)
return NULL;
1936 externalParams =
const_cast<AliExternalTrackParam*
>(esdtrack->GetTPCInnerParam());
1937 if (!externalParams)
return NULL;
1938 flowtrack->
Set(externalParams);
1949 else if (dynamic_cast<AliESDtrack*>(
fTrack))
1952 flowtrack->
SetID(static_cast<AliVTrack*>(
fTrack)->GetID());
1954 else if (dynamic_cast<AliESDMuonTrack*>(
fTrack))
1957 flowtrack->
SetID((
Int_t)static_cast<AliESDMuonTrack*>(
fTrack)->GetUniqueID());
1959 else if (dynamic_cast<AliAODTrack*>(
fTrack))
1965 flowtrack->
SetID(static_cast<AliVTrack*>(
fTrack)->GetID());
1967 else if (dynamic_cast<AliMCParticle*>(
fTrack))
1970 flowtrack->
SetID(static_cast<AliVTrack*>(
fTrack)->GetID());
1977 flowtrack->
SetID(indexMother);
2000 trackCollection->AddAtAndExpand(flowtrack,trackIndex);
2006 trackCollection->RemoveAt(trackIndex);
2016 TParticle *tmpTParticle=NULL;
2017 AliMCParticle* tmpAliMCParticle=NULL;
2048 tmpAliMCParticle =
static_cast<AliMCParticle*
>(
fMCevent->GetTrack(tmpTParticle->GetFirstMother()));
2049 flowtrack->
SetPt(tmpAliMCParticle->Pt());
2077 trackCollection->AddAtAndExpand(flowtrack,trackIndex);
2083 trackCollection->RemoveAt(trackIndex);
2093 if (!
fTrack)
return kFALSE;
2094 TParticle *tmpTParticle=NULL;
2095 AliMCParticle* tmpAliMCParticle=NULL;
2096 AliExternalTrackParam* externalParams=NULL;
2097 AliESDtrack* esdtrack=NULL;
2119 tmpAliMCParticle =
static_cast<AliMCParticle*
>(
fMCevent->GetTrack(tmpTParticle->GetFirstMother()));
2120 flowtrack->
SetPt(tmpAliMCParticle->Pt());
2123 esdtrack =
dynamic_cast<AliESDtrack*
>(
fTrack);
2124 if (!esdtrack)
return kFALSE;
2125 externalParams =
const_cast<AliExternalTrackParam*
>(esdtrack->GetTPCInnerParam());
2126 if (!externalParams)
return kFALSE;
2127 flowtrack->
Set(externalParams);
2138 else if (dynamic_cast<AliESDtrack*>(
fTrack))
2141 flowtrack->
SetID(static_cast<AliVTrack*>(
fTrack)->GetID());
2143 else if (dynamic_cast<AliESDMuonTrack*>(
fTrack))
2146 flowtrack->
SetID((
Int_t)static_cast<AliESDMuonTrack*>(
fTrack)->GetUniqueID());
2148 else if (dynamic_cast<AliAODTrack*>(
fTrack))
2154 flowtrack->
SetID(static_cast<AliVTrack*>(
fTrack)->GetID());
2156 else if (dynamic_cast<AliMCParticle*>(
fTrack))
2159 flowtrack->
SetID(static_cast<AliVTrack*>(
fTrack)->GetID());
2481 Bool_t physprim=mcEvent->IsPhysicalPrimary(label);
2482 AliMCParticle* track =
static_cast<AliMCParticle*
>(mcEvent->GetTrack(label));
2483 if (!track)
return kFALSE;
2484 TParticle* particle = track->Particle();
2485 Bool_t transported = particle->TestBit(kTransportBit);
2488 return (physprim && (transported || !requiretransported));
2497 const Int_t kNbinsP=200;
2500 for(
int i=1; i<kNbinsP+1; i++)
2505 binsP[i]=binsP[i-1]+0.05;
2508 const Int_t nBinsDCA=1000;
2510 for(
int i=0; i<nBinsDCA+1; i++) {binsDCA[i]=0.01*i-5.;}
2513 Bool_t adddirstatus = TH1::AddDirectoryStatus();
2514 TH1::AddDirectory(kFALSE);
2516 fQA->SetName(Form(
"%s QA",GetName()));
2517 TList* before =
new TList(); before->SetOwner();
2518 before->SetName(
"before");
2519 TList* after =
new TList(); after->SetOwner();
2520 after->SetName(
"after");
2523 before->Add(
new TH2F(
"TOFbeta",
";p [GeV/c];#beta",kNbinsP,binsP,1000,0.4,1.1));
2524 after->Add(
new TH2F(
"TOFbeta",
";p [GeV/c];#beta",kNbinsP,binsP,1000,0.4,1.1));
2525 before->Add(
new TH2F(
"TPCdedx",
";p [GeV/c];dEdx",kNbinsP,binsP,500,0,500));
2526 after->Add(
new TH2F(
"TPCdedx",
";p [GeV/c];dEdx",kNbinsP,binsP,500,0,500));
2527 before->Add(
new TH2F(
"MC pid",
";p[GeV/c];species",kNbinsP,binsP,10,-5, 5));
2528 after->Add(
new TH2F(
"MC pid",
";p[GeV/c];species",kNbinsP,binsP,10,-5, 5));
2530 TH2F* hb =
new TH2F(
"MC primary",
";p[GeV/c];primary",kNbinsP,binsP,2,-1,1);
2531 TH2F* ha =
new TH2F(
"MC primary",
";p[GeV/c];primary",kNbinsP,binsP,2,-1,1);
2533 axis = hb->GetYaxis();
2534 axis->SetBinLabel(1,
"secondary");
2535 axis->SetBinLabel(2,
"primary");
2536 axis = ha->GetYaxis();
2537 axis->SetBinLabel(1,
"secondary");
2538 axis->SetBinLabel(2,
"primary");
2542 hb =
new TH2F(
"MC production process",
";p[GeV/c];",kNbinsP,binsP,kMaxMCProcess,
2543 -0.5, kMaxMCProcess-0.5);
2544 ha =
new TH2F(
"MC production process",
";p[GeV/c];",kNbinsP,binsP,kMaxMCProcess,
2545 -0.5, kMaxMCProcess-0.5);
2546 axis = hb->GetYaxis();
2547 for (
Int_t i=0; i<kMaxMCProcess; i++)
2549 axis->SetBinLabel(i+1,TMCProcessName[i]);
2551 axis = ha->GetYaxis();
2552 for (
Int_t i=0; i<kMaxMCProcess; i++)
2554 axis->SetBinLabel(i+1,TMCProcessName[i]);
2559 before->Add(
new TH2F(
"DCAxy",
";p_{t}[GeV/c];DCAxy[cm]", 100, 0., 10., nBinsDCA, binsDCA));
2560 after->Add(
new TH2F(
"DCAxy",
";p_{t}[GeV/c];DCAxy[cm]", 100, 0., 10., nBinsDCA, binsDCA));
2561 before->Add(
new TH2F(
"DCAz",
";p_{t}[GeV/c];DCAz[cm]", 100, 0., 10., nBinsDCA, binsDCA));
2562 after->Add(
new TH2F(
"DCAz",
";p_{t}[GeV/c];DCAz[cm]", 100, 0., 10., nBinsDCA, binsDCA));
2564 hb =
new TH2F(
"MC first mother",
";p[GeV/c];",kNbinsP,binsP,44,1.,45.);
2565 ha =
new TH2F(
"MC first mother",
";p[GeV/c];",kNbinsP,binsP,44,1.,45.);
2566 hb->GetYaxis()->SetBinLabel(1,
"#gamma");
2567 ha->GetYaxis()->SetBinLabel(1,
"#gamma");
2568 hb->GetYaxis()->SetBinLabel(2,
"e^{+}");
2569 ha->GetYaxis()->SetBinLabel(2,
"e^{+}");
2570 hb->GetYaxis()->SetBinLabel(3,
"e^{-}");
2571 ha->GetYaxis()->SetBinLabel(3,
"e^{-}");
2572 hb->GetYaxis()->SetBinLabel(4,
"#nu");
2573 ha->GetYaxis()->SetBinLabel(4,
"#nu");
2574 hb->GetYaxis()->SetBinLabel(5,
"#mu^{+}");
2575 ha->GetYaxis()->SetBinLabel(5,
"#mu^{+}");
2576 hb->GetYaxis()->SetBinLabel(6,
"#mu^{-}");
2577 ha->GetYaxis()->SetBinLabel(6,
"#mu^{-}");
2578 hb->GetYaxis()->SetBinLabel(7,
"#pi^{0}");
2579 ha->GetYaxis()->SetBinLabel(7,
"#pi^{0}");
2580 hb->GetYaxis()->SetBinLabel(8,
"#pi^{+}");
2581 ha->GetYaxis()->SetBinLabel(8,
"#pi^{+}");
2582 hb->GetYaxis()->SetBinLabel(9,
"#pi^{-}");
2583 ha->GetYaxis()->SetBinLabel(9,
"#pi^{-}");
2584 hb->GetYaxis()->SetBinLabel(10,
"K^{0}_{L}");
2585 ha->GetYaxis()->SetBinLabel(10,
"K^{0}_{L}");
2586 hb->GetYaxis()->SetBinLabel(11,
"K^{+}");
2587 ha->GetYaxis()->SetBinLabel(11,
"K^{+}");
2588 hb->GetYaxis()->SetBinLabel(12,
"K^{-}");
2589 ha->GetYaxis()->SetBinLabel(12,
"K^{-}");
2590 hb->GetYaxis()->SetBinLabel( 13,
"n");
2591 ha->GetYaxis()->SetBinLabel( 13,
"n");
2592 hb->GetYaxis()->SetBinLabel( 14,
"p");
2593 ha->GetYaxis()->SetBinLabel( 14,
"p");
2594 hb->GetYaxis()->SetBinLabel(15,
"#bar{p}");
2595 ha->GetYaxis()->SetBinLabel(15,
"#bar{p}");
2596 hb->GetYaxis()->SetBinLabel(16,
"K^{0}_{S}");
2597 ha->GetYaxis()->SetBinLabel(16,
"K^{0}_{S}");
2598 hb->GetYaxis()->SetBinLabel(17,
"#eta");
2599 ha->GetYaxis()->SetBinLabel(17,
"#eta");
2600 hb->GetYaxis()->SetBinLabel(18,
"#Lambda");
2601 ha->GetYaxis()->SetBinLabel(18,
"#Lambda");
2602 hb->GetYaxis()->SetBinLabel(19,
"#Sigma^{+}");
2603 ha->GetYaxis()->SetBinLabel(19,
"#Sigma^{+}");
2604 hb->GetYaxis()->SetBinLabel(20,
"#Sigma^{0}");
2605 ha->GetYaxis()->SetBinLabel(20,
"#Sigma^{0}");
2606 hb->GetYaxis()->SetBinLabel(21,
"#Sigma^{-}");
2607 ha->GetYaxis()->SetBinLabel(21,
"#Sigma^{-}");
2608 hb->GetYaxis()->SetBinLabel(22,
"#Theta^{0}");
2609 ha->GetYaxis()->SetBinLabel(22,
"#Theta^{0}");
2610 hb->GetYaxis()->SetBinLabel(23,
"#Theta^{-}");
2611 ha->GetYaxis()->SetBinLabel(23,
"#Theta^{-}");
2612 hb->GetYaxis()->SetBinLabel(24,
"#Omega^{-}");
2613 ha->GetYaxis()->SetBinLabel(24,
"#Omega^{-}");
2614 hb->GetYaxis()->SetBinLabel(25,
"#bar{n}");
2615 ha->GetYaxis()->SetBinLabel(25,
"#bar{n}");
2616 hb->GetYaxis()->SetBinLabel(26,
"#bar{#Lambda}");
2617 ha->GetYaxis()->SetBinLabel(26,
"#bar{#Lambda}");
2618 hb->GetYaxis()->SetBinLabel(27,
"#bar{#Sigma}^{-}");
2619 ha->GetYaxis()->SetBinLabel(27,
"#bar{#Sigma}^{-}");
2620 hb->GetYaxis()->SetBinLabel(28,
"#bar{#Sigma}^{0}");
2621 ha->GetYaxis()->SetBinLabel(28,
"#bar{#Sigma}^{0}");
2622 hb->GetYaxis()->SetBinLabel(29,
"#bar{#Sigma}^{+}");
2623 ha->GetYaxis()->SetBinLabel(29,
"#bar{#Sigma}^{+}");
2624 hb->GetYaxis()->SetBinLabel(30,
"#bar{#Theta}^{0}");
2625 ha->GetYaxis()->SetBinLabel(30,
"#bar{#Theta}^{0}");
2626 hb->GetYaxis()->SetBinLabel(31,
"#bar{#Theta}^{+}");
2627 ha->GetYaxis()->SetBinLabel(31,
"#bar{#Theta}^{+}");
2628 hb->GetYaxis()->SetBinLabel(32,
"#bar{#Omega}^{+}");
2629 ha->GetYaxis()->SetBinLabel(32,
"#bar{#Omega}^{+}");
2630 hb->GetYaxis()->SetBinLabel(33,
"#tau^{+}");
2631 ha->GetYaxis()->SetBinLabel(33,
"#tau^{+}");
2632 hb->GetYaxis()->SetBinLabel(34,
"#tau^{-}");
2633 ha->GetYaxis()->SetBinLabel(34,
"#tau^{-}");
2634 hb->GetYaxis()->SetBinLabel(35,
"D^{+}");
2635 ha->GetYaxis()->SetBinLabel(35,
"D^{+}");
2636 hb->GetYaxis()->SetBinLabel(36,
"D^{-}");
2637 ha->GetYaxis()->SetBinLabel(36,
"D^{-}");
2638 hb->GetYaxis()->SetBinLabel(37,
"D^{0}");
2639 ha->GetYaxis()->SetBinLabel(37,
"D^{0}");
2640 hb->GetYaxis()->SetBinLabel(38,
"#bar{D}^{0}");
2641 ha->GetYaxis()->SetBinLabel(38,
"#bar{D}^{0}");
2642 hb->GetYaxis()->SetBinLabel(39,
"D_{s}^{+}");
2643 ha->GetYaxis()->SetBinLabel(39,
"D_{s}^{+}");
2644 hb->GetYaxis()->SetBinLabel(40,
"#bar{D_{s}}^{-}");
2645 ha->GetYaxis()->SetBinLabel(40,
"#bar{D_{s}}^{-}");
2646 hb->GetYaxis()->SetBinLabel(41,
"#Lambda_{c}^{+}");
2647 ha->GetYaxis()->SetBinLabel(41,
"#Lambda_{c}^{+}");
2648 hb->GetYaxis()->SetBinLabel(42,
"W^{+}");
2649 ha->GetYaxis()->SetBinLabel(42,
"W^{+}");
2650 hb->GetYaxis()->SetBinLabel(43,
"W^{-}");
2651 ha->GetYaxis()->SetBinLabel(43,
"W^{-}");
2652 hb->GetYaxis()->SetBinLabel(44,
"Z^{0}");
2653 ha->GetYaxis()->SetBinLabel(44,
"Z^{0}");
2657 before->Add(
new TH2F(
"TOFkElectron",
";p_{t}[GeV/c];TOF signal - IT", kNbinsP,binsP,1000,-2e4, 2e4));
2658 after->Add(
new TH2F(
"TOFkElectron",
";p_{t}[GeV/c];TOF signal - IT", kNbinsP,binsP,1000,-2e4, 2e4));
2660 before->Add(
new TH2F(
"TOFkMuon",
";p_{t}[GeV/c];TOF signal - IT", kNbinsP,binsP,1000,-2e4, 2e4));
2661 after->Add(
new TH2F(
"TOFkMuon",
";p_{t}[GeV/c];TOF signal - IT", kNbinsP,binsP,1000,-2e4, 2e4));
2663 before->Add(
new TH2F(
"TOFkPion",
";p_{t}[GeV/c];TOF signal - IT", kNbinsP,binsP,1000,-2e4, 2e4));
2664 after->Add(
new TH2F(
"TOFkPion",
";p_{t}[GeV/c];TOF signal - IT", kNbinsP,binsP,1000,-2e4, 2e4));
2666 before->Add(
new TH2F(
"TOFkKaon",
";p_{t}[GeV/c];TOF signal - IT", kNbinsP,binsP,1000,-2e4, 2e4));
2667 after->Add(
new TH2F(
"TOFkKaon",
";p_{t}[GeV/c];TOF signal - IT", kNbinsP,binsP,1000,-2e4, 2e4));
2669 before->Add(
new TH2F(
"TOFkProton",
";p_{t}[GeV/c];TOF signal - IT", kNbinsP,binsP,1000,-2e4, 2e4));
2670 after->Add(
new TH2F(
"TOFkProton",
";p_{t}[GeV/c];TOF signal - IT", kNbinsP,binsP,1000,-2e4, 2e4));
2673 before->Add(
new TH1F(
"KinkQt",
";q_{t}[GeV/c];counts", 200, 0., 0.3));
2674 after->Add(
new TH1F(
"KinkQt",
";q_{t}[GeV/c];counts", 200, 0., 0.3));
2676 before->Add(
new TH1F(
"KinkMinv",
";m_{inv}(#mu#nu)[GeV/c^{2}];counts;Kink M_{inv}", 200, 0., 0.7));
2677 after->Add(
new TH1F(
"KinkMinv",
";m_{inv}(#mu#nu)[GeV/c^{2}];counts;Kink M_{inv}", 200, 0., 0.7));
2679 before->Add(
new TH2F(
"KinkVertex",
";x[cm];y[cm];Kink vertex position",250,-250.,250., 250,-250.,250.));
2680 after->Add(
new TH2F(
"KinkVertex",
";x[cm];y[cm];Kink vertex position",250,-250.,250., 250,-250.,250.));
2682 before->Add(
new TH2F(
"KinkAngleMp",
";p_{mother}[GeV/c];Kink decay angle [deg];", 100,0.,6., 100,0.,80.));
2683 after->Add(
new TH2F(
"KinkAngleMp",
";p_{mother}[GeV/c];Kink decay angle [deg];", 100,0.,6., 100,0.,80.));
2685 before->Add(
new TH1F(
"KinkIndex",
";Kink index;counts", 2, 0., 2.));
2686 after->Add(
new TH1F(
"KinkIndex",
";Kink index;counts", 2, 0., 2.));
2688 TH1::AddDirectory(adddirstatus);
2706 if (esd)
return esd->GetMultiplicity()->GetNumberOfTracklets();
2707 if (aod)
return aod->GetTracklets()->GetNumberOfTracklets();
2710 return fMCevent->GetNumberOfTracks();
2714 return esd->GetNumberOfPmdTracks();
2728 if (esd)
return esd->GetNumberOfMuonTracks();
2729 return fEvent->GetNumberOfTracks();
2733 return esd->GetNumberOfKinks();
2737 return esd->GetNumberOfV0s();
2740 return fEvent->GetNumberOfTracks();
2755 if (!
fEvent)
return NULL;
2760 if (esd)
return const_cast<AliMultiplicity*
>(esd->GetMultiplicity());
2761 if (aod)
return const_cast<AliAODTracklets*
>(aod->GetTracklets());
2767 if (!esd)
return NULL;
2768 return esd->GetPmdTrack(i);
2774 if(!aod)
return NULL;
2775 return aod->GetVZEROData();
2777 return esd->GetVZEROData();
2783 if(!aod)
return NULL;
2784 return aod->GetVZEROData();
2786 return esd->GetVZEROData();
2792 if(!aod)
return NULL;
2793 return aod->GetVZEROData();
2795 return esd->GetVZEROData();
2801 if(!aod)
return NULL;
2802 return aod->GetVZEROData();
2804 return esd->GetVZEROData();
2810 if(!aod)
return NULL;
2811 return aod->GetVZEROData();
2813 return esd->GetVZEROData();
2815 if (!
fEvent)
return NULL;
2817 if (esd)
return esd->GetMuonTrack(i);
2818 return fEvent->GetTrack(i);
2821 if (!esd)
return NULL;
2822 return esd->GetKink(i);
2825 if (!esd)
return NULL;
2826 return esd->GetV0(i);
2828 if (!
fEvent)
return NULL;
2829 return fEvent->GetTrack(i);
2861 if(!track->GetAODEvent()->GetTOFHeader()){
2862 AliAODPid *pidObj = track->GetDetPid();
2863 if (!pidObj)
fESDpid.GetTOFResponse().SetTimeResolution(84.);
2866 pidObj->GetTOFpidResolution(sigmaTOFPidInAOD);
2867 if(sigmaTOFPidInAOD[0] > 84.){
2868 fESDpid.GetTOFResponse().SetTimeResolution(sigmaTOFPidInAOD[0]);
2943 printf(
"AliFlowTrackCuts::PassesCuts() this should never be called!\n");
2954 Bool_t goodtrack = (track->GetStatus() & AliESDtrack::kTOFpid) &&
2955 (track->GetTOFsignal() > 12000) &&
2956 (track->GetTOFsignal() < 100000) &&
2957 (track->GetIntegratedLength() > 365);
2965 if (!goodtrack)
return kFALSE;
2967 const Float_t c = 2.99792457999999984e-02;
2969 Float_t l = track->GetIntegratedLength();
2971 Float_t timeTOF = track->GetTOFsignal()- trackT0;
2973 Double_t integratedTimes[9] = {-1.0,-1.0,-1.0,-1.0,-1.0, -1.0, -1.0, -1.0, -1.0};
2974 track->GetIntegratedTimes(integratedTimes);
2975 Float_t betaHypothesis[5] = {0.0,0.0,0.0,0.0,0.0};
2976 Float_t s[5] = {0.0,0.0,0.0,0.0,0.0};
2977 for (
Int_t i=0;i<5;i++)
2979 betaHypothesis[i] = l/integratedTimes[i]/
c;
2980 s[i] = beta-betaHypothesis[i];
2986 return ( (s[2]<0.015) && (s[2]>-0.015) &&
2990 return ( (s[3]<0.015) && (s[3]>-0.015) &&
2994 return ( (s[4]<0.015) && (s[4]>-0.015) &&
3007 Double_t integratedTimes[9] = {-1.0,-1.0,-1.0,-1.0,-1.0, -1.0, -1.0, -1.0, -1.0};
3008 track->GetIntegratedTimes(integratedTimes);
3010 const Float_t c = 2.99792457999999984e-02;
3014 Float_t timeTOF = track->GetTOFsignal()- trackT0;
3015 if(QAmode && timeTOF <= 0)
return -999;
3029 Bool_t goodtrack = (track->GetStatus() & AliESDtrack::kTOFpid) &&
3030 (track->GetTOFsignal() > 12000) &&
3031 (track->GetTOFsignal() < 100000);
3033 if (!goodtrack)
return kFALSE;
3035 const Float_t c = 2.99792457999999984e-02;
3036 Double_t integratedTimes[9] = {-1.0,-1.0,-1.0,-1.0,-1.0, -1.0, -1.0, -1.0, -1.0};
3037 track->GetIntegratedTimes(integratedTimes);
3040 goodtrack = goodtrack && (l > 365);
3042 if (!goodtrack)
return kFALSE;
3055 cout<<
"TOFbeta: fParticleID = "<<
fParticleID<<endl;
3073 Float_t betahypothesis = l/integratedTimes[pid]/
c;
3074 Float_t betadiff = beta-betahypothesis;
3078 if (col<0)
return kFALSE;
3079 Float_t min = (*fTOFpidCuts)(1,col);
3080 Float_t max = (*fTOFpidCuts)(2,col);
3082 Bool_t pass = (betadiff>min && betadiff<max);
3097 Bool_t goodtrack = (track->GetStatus() & AliESDtrack::kTOFpid) &&
3098 (track->GetTOFsignal() > 12000) &&
3099 (track->GetTOFsignal() < 100000) &&
3100 (track->GetIntegratedLength() > 365);
3104 if (!goodtrack)
return kFALSE;
3111 Double_t integratedTimes[9] = {-1.0,-1.0,-1.0,-1.0,-1.0, -1.0, -1.0, -1.0, -1.0};
3112 track->GetIntegratedTimes(integratedTimes);
3132 const Float_t c = 2.99792457999999984e-02;
3133 Float_t l = track->GetIntegratedLength();
3135 Float_t betahypothesis = l/integratedTimes[pid]/
c;
3136 Float_t betadiff = beta-betahypothesis;
3140 if (col<0)
return kFALSE;
3141 Float_t min = (*fTOFpidCuts)(1,col);
3142 Float_t max = (*fTOFpidCuts)(2,col);
3144 Bool_t pass = (betadiff>min && betadiff<max);
3154 track->GetTOFpid(pidTOF);
3164 track->GetTPCpid(pidTPC);
3169 probablity = pidTPC[AliPID::kPion] + pidTPC[AliPID::kMuon];
3182 return track->GetTPCsignal();
3195 const AliExternalTrackParam* tpcparam = track->GetInnerParam();
3196 if (!tpcparam)
return kFALSE;
3199 Float_t sigTPC = track->GetTPCsignal();
3200 Float_t s = (sigTPC-sigExp)/sigExp;
3204 Int_t col = TMath::BinarySearch( arrSize, arr, static_cast<Float_t>(p));
3205 if (col<0)
return kFALSE;
3206 Float_t min = (*fTPCpidCuts)(1,col);
3207 Float_t max = (*fTPCpidCuts)(2,col);
3210 return (s>min && s<max);
3222 t =
new TMatrixF(3,15);
3223 (*t)(0,0) = 0.20; (*t)(1,0) = -0.4; (*t)(2,0) = 0.0;
3224 (*t)(0,1) = 0.25; (*t)(1,1) = -0.4; (*t)(2,1) = 0.1;
3225 (*t)(0,2) = 0.30; (*t)(1,2) = -0.4; (*t)(2,2) = 0.2;
3226 (*t)(0,3) = 0.35; (*t)(1,3) = -0.4; (*t)(2,3) = 0.2;
3227 (*t)(0,4) = 0.40; (*t)(1,4) = -0.4; (*t)(2,4) = 0.3;
3228 (*t)(0,5) = 0.45; (*t)(1,5) = -0.4; (*t)(2,5) = 0.3;
3229 (*t)(0,6) = 0.50; (*t)(1,6) = -0.4; (*t)(2,6) = 0.25;
3230 (*t)(0,7) = 0.55; (*t)(1,7) = -0.4; (*t)(2,7) = 0.15;
3231 (*t)(0,8) = 0.60; (*t)(1,8) = -0.4; (*t)(2,8) = 0.1;
3232 (*t)(0,9) = 0.65; (*t)(1,9) = -0.4; (*t)(2,9) = 0.05;
3233 (*t)(0,10) = 0.70; (*t)(1,10) = -0.4; (*t)(2,10) = 0;
3234 (*t)(0,11) = 0.75; (*t)(1,11) = -0.4; (*t)(2,11) = 0;
3235 (*t)(0,12) = 0.80; (*t)(1,12) = -0.4; (*t)(2,12) = -0.05;
3236 (*t)(0,13) = 0.85; (*t)(1,13) = -0.4; (*t)(2,13) = -0.1;
3237 (*t)(0,14) = 0.90; (*t)(1,14) = 0; (*t)(2,14) = 0;
3242 t =
new TMatrixF(3,12);
3243 (*t)(0,0) = 0.20; (*t)(1,0) = -0.2; (*t)(2,0) = 0.2;
3244 (*t)(0,1) = 0.25; (*t)(1,1) = -0.2; (*t)(2,1) = 0.2;
3245 (*t)(0,2) = 0.30; (*t)(1,2) = -0.2; (*t)(2,2) = 0.2;
3246 (*t)(0,3) = 0.35; (*t)(1,3) = -0.2; (*t)(2,3) = 0.2;
3247 (*t)(0,4) = 0.40; (*t)(1,4) = -0.1; (*t)(2,4) = 0.2;
3248 (*t)(0,5) = 0.45; (*t)(1,5) = -0.1; (*t)(2,5) = 0.2;
3249 (*t)(0,6) = 0.50; (*t)(1,6) =-0.05; (*t)(2,6) = 0.2;
3250 (*t)(0,7) = 0.55; (*t)(1,7) = -0.1; (*t)(2,7) = 0.1;
3251 (*t)(0,8) = 0.60; (*t)(1,8) =-0.05; (*t)(2,8) = 0.1;
3252 (*t)(0,9) = 0.65; (*t)(1,9) = 0; (*t)(2,9) = 0.15;
3253 (*t)(0,10) = 0.70; (*t)(1,10) = 0.05; (*t)(2,10) = 0.2;
3254 (*t)(0,11) = 0.75; (*t)(1,11) = 0; (*t)(2,11) = 0;
3259 t =
new TMatrixF(3,9);
3260 (*t)(0,0) = 0.20; (*t)(1,0) = -0.1; (*t)(2,0) = 0.1;
3261 (*t)(0,1) = 0.25; (*t)(1,1) = -0.2; (*t)(2,1) = 0.2;
3262 (*t)(0,2) = 0.80; (*t)(1,2) = -0.1; (*t)(2,2) = 0.2;
3263 (*t)(0,3) = 0.85; (*t)(1,3) =-0.05; (*t)(2,3) = 0.2;
3264 (*t)(0,4) = 0.90; (*t)(1,4) =-0.05; (*t)(2,4) = 0.25;
3265 (*t)(0,5) = 0.95; (*t)(1,5) =-0.05; (*t)(2,5) = 0.25;
3266 (*t)(0,6) = 1.00; (*t)(1,6) = -0.1; (*t)(2,6) = 0.25;
3267 (*t)(0,7) = 1.10; (*t)(1,7) =-0.05; (*t)(2,7) = 0.3;
3268 (*t)(0,8) = 1.20; (*t)(1,8) = 0; (*t)(2,8) = 0;
3279 t =
new TMatrixF(3,61);
3280 (*t)(0,0) = 0.000; (*t)(1,0) = 0.000; (*t)(2,0) = 0.000;
3281 (*t)(0,1) = 0.050; (*t)(1,1) = 0.000; (*t)(2,1) = 0.000;
3282 (*t)(0,2) = 0.100; (*t)(1,2) = 0.000; (*t)(2,2) = 0.000;
3283 (*t)(0,3) = 0.150; (*t)(1,3) = 0.000; (*t)(2,3) = 0.000;
3284 (*t)(0,4) = 0.200; (*t)(1,4) = -0.030; (*t)(2,4) = 0.030;
3285 (*t)(0,5) = 0.250; (*t)(1,5) = -0.036; (*t)(2,5) = 0.032;
3286 (*t)(0,6) = 0.300; (*t)(1,6) = -0.038; (*t)(2,6) = 0.032;
3287 (*t)(0,7) = 0.350; (*t)(1,7) = -0.034; (*t)(2,7) = 0.032;
3288 (*t)(0,8) = 0.400; (*t)(1,8) = -0.032; (*t)(2,8) = 0.020;
3289 (*t)(0,9) = 0.450; (*t)(1,9) = -0.030; (*t)(2,9) = 0.020;
3290 (*t)(0,10) = 0.500; (*t)(1,10) = -0.030; (*t)(2,10) = 0.020;
3291 (*t)(0,11) = 0.550; (*t)(1,11) = -0.030; (*t)(2,11) = 0.020;
3292 (*t)(0,12) = 0.600; (*t)(1,12) = -0.030; (*t)(2,12) = 0.020;
3293 (*t)(0,13) = 0.650; (*t)(1,13) = -0.030; (*t)(2,13) = 0.020;
3294 (*t)(0,14) = 0.700; (*t)(1,14) = -0.030; (*t)(2,14) = 0.020;
3295 (*t)(0,15) = 0.750; (*t)(1,15) = -0.030; (*t)(2,15) = 0.020;
3296 (*t)(0,16) = 0.800; (*t)(1,16) = -0.030; (*t)(2,16) = 0.020;
3297 (*t)(0,17) = 0.850; (*t)(1,17) = -0.030; (*t)(2,17) = 0.020;
3298 (*t)(0,18) = 0.900; (*t)(1,18) = -0.030; (*t)(2,18) = 0.020;
3299 (*t)(0,19) = 0.950; (*t)(1,19) = -0.028; (*t)(2,19) = 0.028;
3300 (*t)(0,20) = 1.000; (*t)(1,20) = -0.028; (*t)(2,20) = 0.028;
3301 (*t)(0,21) = 1.100; (*t)(1,21) = -0.028; (*t)(2,21) = 0.028;
3302 (*t)(0,22) = 1.200; (*t)(1,22) = -0.026; (*t)(2,22) = 0.028;
3303 (*t)(0,23) = 1.300; (*t)(1,23) = -0.024; (*t)(2,23) = 0.028;
3304 (*t)(0,24) = 1.400; (*t)(1,24) = -0.020; (*t)(2,24) = 0.028;
3305 (*t)(0,25) = 1.500; (*t)(1,25) = -0.018; (*t)(2,25) = 0.028;
3306 (*t)(0,26) = 1.600; (*t)(1,26) = -0.016; (*t)(2,26) = 0.028;
3307 (*t)(0,27) = 1.700; (*t)(1,27) = -0.014; (*t)(2,27) = 0.028;
3308 (*t)(0,28) = 1.800; (*t)(1,28) = -0.012; (*t)(2,28) = 0.026;
3309 (*t)(0,29) = 1.900; (*t)(1,29) = -0.010; (*t)(2,29) = 0.026;
3310 (*t)(0,30) = 2.000; (*t)(1,30) = -0.008; (*t)(2,30) = 0.026;
3311 (*t)(0,31) = 2.100; (*t)(1,31) = -0.008; (*t)(2,31) = 0.024;
3312 (*t)(0,32) = 2.200; (*t)(1,32) = -0.006; (*t)(2,32) = 0.024;
3313 (*t)(0,33) = 2.300; (*t)(1,33) = -0.004; (*t)(2,33) = 0.024;
3314 (*t)(0,34) = 2.400; (*t)(1,34) = -0.004; (*t)(2,34) = 0.024;
3315 (*t)(0,35) = 2.500; (*t)(1,35) = -0.002; (*t)(2,35) = 0.024;
3316 (*t)(0,36) = 2.600; (*t)(1,36) = -0.002; (*t)(2,36) = 0.024;
3317 (*t)(0,37) = 2.700; (*t)(1,37) = 0.000; (*t)(2,37) = 0.024;
3318 (*t)(0,38) = 2.800; (*t)(1,38) = 0.000; (*t)(2,38) = 0.026;
3319 (*t)(0,39) = 2.900; (*t)(1,39) = 0.000; (*t)(2,39) = 0.024;
3320 (*t)(0,40) = 3.000; (*t)(1,40) = 0.002; (*t)(2,40) = 0.026;
3321 (*t)(0,41) = 3.100; (*t)(1,41) = 0.002; (*t)(2,41) = 0.026;
3322 (*t)(0,42) = 3.200; (*t)(1,42) = 0.002; (*t)(2,42) = 0.026;
3323 (*t)(0,43) = 3.300; (*t)(1,43) = 0.002; (*t)(2,43) = 0.026;
3324 (*t)(0,44) = 3.400; (*t)(1,44) = 0.002; (*t)(2,44) = 0.026;
3325 (*t)(0,45) = 3.500; (*t)(1,45) = 0.002; (*t)(2,45) = 0.026;
3326 (*t)(0,46) = 3.600; (*t)(1,46) = 0.002; (*t)(2,46) = 0.026;
3327 (*t)(0,47) = 3.700; (*t)(1,47) = 0.002; (*t)(2,47) = 0.026;
3328 (*t)(0,48) = 3.800; (*t)(1,48) = 0.002; (*t)(2,48) = 0.026;
3329 (*t)(0,49) = 3.900; (*t)(1,49) = 0.004; (*t)(2,49) = 0.024;
3330 (*t)(0,50) = 4.000; (*t)(1,50) = 0.004; (*t)(2,50) = 0.026;
3331 (*t)(0,51) = 4.100; (*t)(1,51) = 0.004; (*t)(2,51) = 0.026;
3332 (*t)(0,52) = 4.200; (*t)(1,52) = 0.004; (*t)(2,52) = 0.024;
3333 (*t)(0,53) = 4.300; (*t)(1,53) = 0.006; (*t)(2,53) = 0.024;
3334 (*t)(0,54) = 4.400; (*t)(1,54) = 0.000; (*t)(2,54) = 0.000;
3335 (*t)(0,55) = 4.500; (*t)(1,55) = 0.000; (*t)(2,55) = 0.000;
3336 (*t)(0,56) = 4.600; (*t)(1,56) = 0.000; (*t)(2,56) = 0.000;
3337 (*t)(0,57) = 4.700; (*t)(1,57) = 0.000; (*t)(2,57) = 0.000;
3338 (*t)(0,58) = 4.800; (*t)(1,58) = 0.000; (*t)(2,58) = 0.000;
3339 (*t)(0,59) = 4.900; (*t)(1,59) = 0.000; (*t)(2,59) = 0.000;
3340 (*t)(0,60) = 5.900; (*t)(1,60) = 0.000; (*t)(2,60) = 0.000;
3346 t =
new TMatrixF(3,61);
3347 (*t)(0,0) = 0.000; (*t)(1,0) = 0.000; (*t)(2,0) = 0.000;
3348 (*t)(0,1) = 0.050; (*t)(1,1) = 0.000; (*t)(2,1) = 0.000;
3349 (*t)(0,2) = 0.100; (*t)(1,2) = 0.000; (*t)(2,2) = 0.000;
3350 (*t)(0,3) = 0.150; (*t)(1,3) = 0.000; (*t)(2,3) = 0.000;
3351 (*t)(0,4) = 0.200; (*t)(1,4) = -0.07; (*t)(2,4) = 0.07;
3352 (*t)(0,5) = 0.200; (*t)(1,5) = -0.07; (*t)(2,5) = 0.07;
3353 (*t)(0,6) = 0.200; (*t)(1,6) = -0.07; (*t)(2,6) = 0.07;
3354 (*t)(0,7) = 0.200; (*t)(1,7) = -0.07; (*t)(2,7) = 0.07;
3355 (*t)(0,8) = 0.200; (*t)(1,8) = -0.07; (*t)(2,8) = 0.07;
3356 (*t)(0,9) = 0.200; (*t)(1,9) = -0.07; (*t)(2,9) = 0.07;
3357 (*t)(0,10) = 0.200; (*t)(1,10) = -0.07; (*t)(2,10) = 0.07;
3358 (*t)(0,11) = 0.200; (*t)(1,11) = -0.07; (*t)(2,11) = 0.07;
3359 (*t)(0,12) = 0.200; (*t)(1,12) = -0.07; (*t)(2,12) = 0.07;
3360 (*t)(0,13) = 0.200; (*t)(1,13) = -0.07; (*t)(2,13) = 0.07;
3361 (*t)(0,14) = 0.200; (*t)(1,14) = -0.07; (*t)(2,14) = 0.07;
3362 (*t)(0,15) = 0.200; (*t)(1,15) = -0.07; (*t)(2,15) = 0.07;
3363 (*t)(0,16) = 0.200; (*t)(1,16) = -0.07; (*t)(2,16) = 0.07;
3364 (*t)(0,17) = 0.850; (*t)(1,17) = -0.070; (*t)(2,17) = 0.070;
3365 (*t)(0,18) = 0.900; (*t)(1,18) = -0.072; (*t)(2,18) = 0.072;
3366 (*t)(0,19) = 0.950; (*t)(1,19) = -0.072; (*t)(2,19) = 0.072;
3367 (*t)(0,20) = 1.000; (*t)(1,20) = -0.074; (*t)(2,20) = 0.074;
3368 (*t)(0,21) = 1.100; (*t)(1,21) = -0.032; (*t)(2,21) = 0.032;
3369 (*t)(0,22) = 1.200; (*t)(1,22) = -0.026; (*t)(2,22) = 0.026;
3370 (*t)(0,23) = 1.300; (*t)(1,23) = -0.026; (*t)(2,23) = 0.026;
3371 (*t)(0,24) = 1.400; (*t)(1,24) = -0.024; (*t)(2,24) = 0.024;
3372 (*t)(0,25) = 1.500; (*t)(1,25) = -0.024; (*t)(2,25) = 0.024;
3373 (*t)(0,26) = 1.600; (*t)(1,26) = -0.026; (*t)(2,26) = 0.026;
3374 (*t)(0,27) = 1.700; (*t)(1,27) = -0.026; (*t)(2,27) = 0.026;
3375 (*t)(0,28) = 1.800; (*t)(1,28) = -0.026; (*t)(2,28) = 0.026;
3376 (*t)(0,29) = 1.900; (*t)(1,29) = -0.026; (*t)(2,29) = 0.026;
3377 (*t)(0,30) = 2.000; (*t)(1,30) = -0.026; (*t)(2,30) = 0.026;
3378 (*t)(0,31) = 2.100; (*t)(1,31) = -0.026; (*t)(2,31) = 0.026;
3379 (*t)(0,32) = 2.200; (*t)(1,32) = -0.026; (*t)(2,32) = 0.024;
3380 (*t)(0,33) = 2.300; (*t)(1,33) = -0.028; (*t)(2,33) = 0.022;
3381 (*t)(0,34) = 2.400; (*t)(1,34) = -0.028; (*t)(2,34) = 0.020;
3382 (*t)(0,35) = 2.500; (*t)(1,35) = -0.028; (*t)(2,35) = 0.018;
3383 (*t)(0,36) = 2.600; (*t)(1,36) = -0.028; (*t)(2,36) = 0.016;
3384 (*t)(0,37) = 2.700; (*t)(1,37) = -0.028; (*t)(2,37) = 0.016;
3385 (*t)(0,38) = 2.800; (*t)(1,38) = -0.030; (*t)(2,38) = 0.014;
3386 (*t)(0,39) = 2.900; (*t)(1,39) = -0.030; (*t)(2,39) = 0.012;
3387 (*t)(0,40) = 3.000; (*t)(1,40) = -0.030; (*t)(2,40) = 0.012;
3388 (*t)(0,41) = 3.100; (*t)(1,41) = -0.030; (*t)(2,41) = 0.010;
3389 (*t)(0,42) = 3.200; (*t)(1,42) = -0.030; (*t)(2,42) = 0.010;
3390 (*t)(0,43) = 3.300; (*t)(1,43) = -0.030; (*t)(2,43) = 0.010;
3391 (*t)(0,44) = 3.400; (*t)(1,44) = -0.030; (*t)(2,44) = 0.008;
3392 (*t)(0,45) = 3.500; (*t)(1,45) = -0.030; (*t)(2,45) = 0.008;
3393 (*t)(0,46) = 3.600; (*t)(1,46) = -0.030; (*t)(2,46) = 0.008;
3394 (*t)(0,47) = 3.700; (*t)(1,47) = -0.030; (*t)(2,47) = 0.006;
3395 (*t)(0,48) = 3.800; (*t)(1,48) = -0.030; (*t)(2,48) = 0.006;
3396 (*t)(0,49) = 3.900; (*t)(1,49) = -0.030; (*t)(2,49) = 0.006;
3397 (*t)(0,50) = 4.000; (*t)(1,50) = -0.028; (*t)(2,50) = 0.004;
3398 (*t)(0,51) = 4.100; (*t)(1,51) = -0.030; (*t)(2,51) = 0.004;
3399 (*t)(0,52) = 4.200; (*t)(1,52) = -0.030; (*t)(2,52) = 0.004;
3400 (*t)(0,53) = 4.300; (*t)(1,53) = -0.028; (*t)(2,53) = 0.002;
3401 (*t)(0,54) = 4.400; (*t)(1,54) = -0.030; (*t)(2,54) = 0.002;
3402 (*t)(0,55) = 4.500; (*t)(1,55) = -0.028; (*t)(2,55) = 0.002;
3403 (*t)(0,56) = 4.600; (*t)(1,56) = -0.028; (*t)(2,56) = 0.002;
3404 (*t)(0,57) = 4.700; (*t)(1,57) = -0.028; (*t)(2,57) = 0.000;
3405 (*t)(0,58) = 4.800; (*t)(1,58) = -0.028; (*t)(2,58) = 0.002;
3406 (*t)(0,59) = 4.900; (*t)(1,59) = 0.000; (*t)(2,59) = 0.000;
3407 (*t)(0,60) = 5.900; (*t)(1,60) = 0.000; (*t)(2,60) = 0.000;
3413 t =
new TMatrixF(3,61);
3414 (*t)(0,0) = 0.000; (*t)(1,0) = 0.000; (*t)(2,0) = 0.000;
3415 (*t)(0,1) = 0.050; (*t)(1,1) = 0.000; (*t)(2,1) = 0.000;
3416 (*t)(0,2) = 0.100; (*t)(1,2) = 0.000; (*t)(2,2) = 0.000;
3417 (*t)(0,3) = 0.150; (*t)(1,3) = 0.000; (*t)(2,3) = 0.000;
3418 (*t)(0,4) = 0.200; (*t)(1,4) = -0.05; (*t)(2,4) = 0.05;
3419 (*t)(0,5) = 0.200; (*t)(1,5) = -0.05; (*t)(2,5) = 0.05;
3420 (*t)(0,6) = 0.200; (*t)(1,6) = -0.05; (*t)(2,6) = 0.05;
3421 (*t)(0,7) = 0.200; (*t)(1,7) = -0.05; (*t)(2,7) = 0.05;
3422 (*t)(0,8) = 0.200; (*t)(1,8) = -0.05; (*t)(2,8) = 0.05;
3423 (*t)(0,9) = 0.200; (*t)(1,9) = -0.05; (*t)(2,9) = 0.05;
3424 (*t)(0,10) = 0.200; (*t)(1,10) = -0.05; (*t)(2,10) = 0.05;
3425 (*t)(0,11) = 0.550; (*t)(1,11) = -0.026; (*t)(2,11) = 0.026;
3426 (*t)(0,12) = 0.600; (*t)(1,12) = -0.026; (*t)(2,12) = 0.026;
3427 (*t)(0,13) = 0.650; (*t)(1,13) = -0.026; (*t)(2,13) = 0.026;
3428 (*t)(0,14) = 0.700; (*t)(1,14) = -0.026; (*t)(2,14) = 0.026;
3429 (*t)(0,15) = 0.750; (*t)(1,15) = -0.026; (*t)(2,15) = 0.026;
3430 (*t)(0,16) = 0.800; (*t)(1,16) = -0.026; (*t)(2,16) = 0.026;
3431 (*t)(0,17) = 0.850; (*t)(1,17) = -0.024; (*t)(2,17) = 0.024;
3432 (*t)(0,18) = 0.900; (*t)(1,18) = -0.024; (*t)(2,18) = 0.024;
3433 (*t)(0,19) = 0.950; (*t)(1,19) = -0.024; (*t)(2,19) = 0.024;
3434 (*t)(0,20) = 1.000; (*t)(1,20) = -0.024; (*t)(2,20) = 0.024;
3435 (*t)(0,21) = 1.100; (*t)(1,21) = -0.024; (*t)(2,21) = 0.024;
3436 (*t)(0,22) = 1.200; (*t)(1,22) = -0.024; (*t)(2,22) = 0.022;
3437 (*t)(0,23) = 1.300; (*t)(1,23) = -0.024; (*t)(2,23) = 0.020;
3438 (*t)(0,24) = 1.400; (*t)(1,24) = -0.026; (*t)(2,24) = 0.016;
3439 (*t)(0,25) = 1.500; (*t)(1,25) = -0.028; (*t)(2,25) = 0.014;
3440 (*t)(0,26) = 1.600; (*t)(1,26) = -0.028; (*t)(2,26) = 0.012;
3441 (*t)(0,27) = 1.700; (*t)(1,27) = -0.028; (*t)(2,27) = 0.010;
3442 (*t)(0,28) = 1.800; (*t)(1,28) = -0.028; (*t)(2,28) = 0.010;
3443 (*t)(0,29) = 1.900; (*t)(1,29) = -0.028; (*t)(2,29) = 0.008;
3444 (*t)(0,30) = 2.000; (*t)(1,30) = -0.028; (*t)(2,30) = 0.006;
3445 (*t)(0,31) = 2.100; (*t)(1,31) = -0.026; (*t)(2,31) = 0.006;
3446 (*t)(0,32) = 2.200; (*t)(1,32) = -0.024; (*t)(2,32) = 0.004;
3447 (*t)(0,33) = 2.300; (*t)(1,33) = -0.020; (*t)(2,33) = 0.002;
3448 (*t)(0,34) = 2.400; (*t)(1,34) = -0.020; (*t)(2,34) = 0.002;
3449 (*t)(0,35) = 2.500; (*t)(1,35) = -0.018; (*t)(2,35) = 0.000;
3450 (*t)(0,36) = 2.600; (*t)(1,36) = -0.016; (*t)(2,36) = 0.000;
3451 (*t)(0,37) = 2.700; (*t)(1,37) = -0.014; (*t)(2,37) = -0.002;
3452 (*t)(0,38) = 2.800; (*t)(1,38) = -0.014; (*t)(2,38) = -0.004;
3453 (*t)(0,39) = 2.900; (*t)(1,39) = -0.012; (*t)(2,39) = -0.004;
3454 (*t)(0,40) = 3.000; (*t)(1,40) = -0.010; (*t)(2,40) = -0.006;
3455 (*t)(0,41) = 3.100; (*t)(1,41) = 0.000; (*t)(2,41) = 0.000;
3456 (*t)(0,42) = 3.200; (*t)(1,42) = 0.000; (*t)(2,42) = 0.000;
3457 (*t)(0,43) = 3.300; (*t)(1,43) = 0.000; (*t)(2,43) = 0.000;
3458 (*t)(0,44) = 3.400; (*t)(1,44) = 0.000; (*t)(2,44) = 0.000;
3459 (*t)(0,45) = 3.500; (*t)(1,45) = 0.000; (*t)(2,45) = 0.000;
3460 (*t)(0,46) = 3.600; (*t)(1,46) = 0.000; (*t)(2,46) = 0.000;
3461 (*t)(0,47) = 3.700; (*t)(1,47) = 0.000; (*t)(2,47) = 0.000;
3462 (*t)(0,48) = 3.800; (*t)(1,48) = 0.000; (*t)(2,48) = 0.000;
3463 (*t)(0,49) = 3.900; (*t)(1,49) = 0.000; (*t)(2,49) = 0.000;
3464 (*t)(0,50) = 4.000; (*t)(1,50) = 0.000; (*t)(2,50) = 0.000;
3465 (*t)(0,51) = 4.100; (*t)(1,51) = 0.000; (*t)(2,51) = 0.000;
3466 (*t)(0,52) = 4.200; (*t)(1,52) = 0.000; (*t)(2,52) = 0.000;
3467 (*t)(0,53) = 4.300; (*t)(1,53) = 0.000; (*t)(2,53) = 0.000;
3468 (*t)(0,54) = 4.400; (*t)(1,54) = 0.000; (*t)(2,54) = 0.000;
3469 (*t)(0,55) = 4.500; (*t)(1,55) = 0.000; (*t)(2,55) = 0.000;
3470 (*t)(0,56) = 4.600; (*t)(1,56) = 0.000; (*t)(2,56) = 0.000;
3471 (*t)(0,57) = 4.700; (*t)(1,57) = 0.000; (*t)(2,57) = 0.000;
3472 (*t)(0,58) = 4.800; (*t)(1,58) = 0.000; (*t)(2,58) = 0.000;
3473 (*t)(0,59) = 4.900; (*t)(1,59) = 0.000; (*t)(2,59) = 0.000;
3474 (*t)(0,60) = 5.900; (*t)(1,60) = 0.000; (*t)(2,60) = 0.000;
3490 if(! kTPC)
return kFALSE;
3505 case AliPID::kElectron:
3511 case AliPID::kDeuteron:
3514 case AliPID::kTriton:
3545 if(! kTPC)
return kFALSE;
3571 case AliPID::kElectron:
3577 case AliPID::kDeuteron:
3580 case AliPID::kTriton:
3603 Bool_t goodtrack = (track->GetStatus() & AliESDtrack::kTOFout) &&
3604 (track->GetStatus() & AliESDtrack::kTIME) &&
3605 (track->GetTOFsignal() > 12000) &&
3606 (track->GetTOFsignal() < 100000);
3633 case AliPID::kElectron:
3639 case AliPID::kDeuteron:
3642 case AliPID::kTriton:
3666 Bool_t goodtrack = (track->GetStatus() & AliESDtrack::kTOFout) &&
3667 (track->GetStatus() & AliESDtrack::kTIME) &&
3668 (track->GetTOFsignal() > 12000) &&
3669 (track->GetTOFsignal() < 100000) &&
3670 (track->GetIntegratedLength() > 365);
3699 case AliPID::kElectron:
3705 case AliPID::kDeuteron:
3708 case AliPID::kTriton:
3738 if (!track->GetInnerParam())
3741 const AliExternalTrackParam* tpcTrack = track->GetInnerParam();
3743 Double_t ptotTPC = tpcTrack->GetP();
3744 Double_t sigTPC = track->GetTPCsignal();
3750 case AliPID::kDeuteron:
3752 dEdxBBA = AliExternalTrackParam::BetheBlochAleph(ptotTPC/1.8756,
3758 dSigma = (sigTPC - dEdxBBA)/dEdxBBA;
3760 if( ptotTPC<=1.1 && (dSigma < (0.5 - (0.1818*ptotTPC)) ) && (dSigma > ( (0.218*ptotTPC - 0.4) ) ) )
3764 case AliPID::kTriton:
3772 dEdxBBA = 4.0 * AliExternalTrackParam::BetheBlochAleph( (2.*ptotTPC)/2.8084,
3778 dSigma = (sigTPC - dEdxBBA)/dEdxBBA;
3779 if(ptotTPC<=5.0 && (dSigma >= (-0.03968*ptotTPC - 0.1)) && (dSigma <= (0.31 - 0.0217*ptotTPC)))
3802 if(!track)
return kFALSE;
3805 if ((track->GetStatus()&AliVTrack::kTOFout)==0)
return kFALSE;
3806 if ((track->GetStatus()&AliVTrack::kTIME)==0)
return kFALSE;
3809 if(track->GetTPCsignal() < 10)
return kFALSE;
3814 Float_t nsigma2 = nsigmaTPC*nsigmaTPC + nsigmaTOF*nsigmaTOF;
3826 if(!track)
return kFALSE;
3829 if ((track->GetStatus()&AliVTrack::kTOFout)==0)
return kFALSE;
3830 if ((track->GetStatus()&AliVTrack::kTIME)==0)
return kFALSE;
3833 if(track->GetTPCsignal() < 10)
return kFALSE;
3838 Float_t nsigma2 = nsigmaTPC*nsigmaTPC + nsigmaTOF*nsigmaTOF;
3850 if(!track)
return kFALSE;
3854 for(
int i=0;i<60;i++){
3856 if(track->P()>pInterval && track->P()<pInterval+0.1){p_int = i;}
3869 if ( (track->IsOn(AliAODTrack::kITSin))){
3870 if(p_int<2)
return kFALSE;
3872 if(!
fPurityFunction[index]){ cout<<
"fPurityFunction[index] does not exist"<<endl;
return kFALSE;}
3874 if((track->IsOn(AliAODTrack::kTOFpid))){
3876 if(TMath::Sqrt(TMath::Power(nsigmaTPC,2)+TMath::Power(nsigmaTOF,2))<3){
4025 else if(centrCur < 20){
4135 else if(centrCur < 30){
4245 else if(centrCur < 40){
4355 else if(centrCur < 50){
4465 else if(centrCur < 60){
4575 else if(centrCur < 70){
4685 else if(centrCur < 80){
4907 fC[i][0] =
fC[17][0];
4908 fC[i][1] =
fC[17][1];
4909 fC[i][2] =
fC[17][2];
4910 fC[i][3] =
fC[17][3];
4911 fC[i][4] =
fC[17][4];
4921 const Float_t c = 2.99792457999999984e-02;
4923 Float_t mass[5] = {5.10998909999999971e-04,1.05658000000000002e-01,1.39570000000000000e-01,4.93676999999999977e-01,9.38271999999999995e-01};
4927 track->GetIntegratedTimes(exptimes);
4929 Float_t dedx = track->GetTPCsignal();
4932 Float_t time = track->GetTOFsignal()-
fESDpid.GetTOFResponse().GetStartTime(p);
4935 Float_t betagammares =
fESDpid.GetTOFResponse().GetExpectedSigma(p, exptimes[4], mass[4]);
4937 Float_t betagamma1 = tl/(time-5 *betagammares) * 33.3564095198152043;
4941 if(betagamma1 < 0.1) betagamma1 = 0.1;
4943 if(betagamma1 < 0.99999) betagamma1 /= TMath::Sqrt(1-betagamma1*betagamma1);
4944 else betagamma1 = 100;
4946 Float_t betagamma2 = tl/(time+5 *betagammares) * 33.3564095198152043;
4949 if(betagamma2 < 0.1) betagamma2 = 0.1;
4951 if(betagamma2 < 0.99999) betagamma2 /= TMath::Sqrt(1-betagamma2*betagamma2);
4952 else betagamma2 = 100;
4955 Float_t momtpc=track->GetTPCmomentum();
4957 for(
Int_t i=0;i < 5;i++){
4958 Float_t resolutionTOF =
fESDpid.GetTOFResponse().GetExpectedSigma(p, exptimes[i], mass[i]);
4959 if(TMath::Abs(exptimes[i] - time) < 5 * resolutionTOF){
4961 if(i==0) dedxExp =
fESDpid.GetTPCResponse().GetExpectedSignal(momtpc,AliPID::kElectron);
4962 else if(i==1) dedxExp =
fESDpid.GetTPCResponse().GetExpectedSignal(momtpc,AliPID::kMuon);
4963 else if(i==2) dedxExp =
fESDpid.GetTPCResponse().GetExpectedSignal(momtpc,AliPID::kPion);
4964 else if(i==3) dedxExp =
fESDpid.GetTPCResponse().GetExpectedSignal(momtpc,AliPID::kKaon);
4968 if(i==0) resolutionTPC =
fESDpid.GetTPCResponse().GetExpectedSigma(momtpc,track->GetTPCsignalN(),AliPID::kElectron);
4969 else if(i==1) resolutionTPC =
fESDpid.GetTPCResponse().GetExpectedSigma(momtpc,track->GetTPCsignalN(),AliPID::kMuon);
4970 else if(i==2) resolutionTPC =
fESDpid.GetTPCResponse().GetExpectedSigma(momtpc,track->GetTPCsignalN(),AliPID::kPion);
4971 else if(i==3) resolutionTPC =
fESDpid.GetTPCResponse().GetExpectedSigma(momtpc,track->GetTPCsignalN(),AliPID::kKaon);
4972 else if(i==4) resolutionTPC =
fESDpid.GetTPCResponse().GetExpectedSigma(momtpc,track->GetTPCsignalN(),
AliPID::kProton);
4974 if(TMath::Abs(dedx - dedxExp) < 3 * resolutionTPC){
4982 Float_t bbM =
fESDpid.GetTPCResponse().Bethe((betagamma1+betagamma2)*0.5);
4987 Float_t resolutionTOFpr =
fESDpid.GetTOFResponse().GetExpectedSigma(p, exptimes[4], mass[4]);
4989 if(TMath::Abs(dedx-bb1) < resolutionTPCpr*3 && exptimes[4] < time-7*resolutionTOFpr){
4992 else if(TMath::Abs(dedx-bb2) < resolutionTPCpr*3 && exptimes[4] < time-7*resolutionTOFpr){
4995 else if(TMath::Abs(dedx-bbM) < resolutionTPCpr*3 && exptimes[4] < time-7*resolutionTOFpr){
5013 if(!track) pass = kFALSE;
5016 if(track->GetTPCsignal() < 10) pass = kFALSE;
5035 nsigma2 = nsigmaTPC*nsigmaTPC;
5038 if (((track->GetStatus()&AliVTrack::kTOFout)==0)&&((track->GetStatus()&AliVTrack::kTIME)==0)){
5042 nsigma2 = nsigmaTPC*nsigmaTPC + nsigmaTOF*nsigmaTOF;
5060 return "TPCbayesian";
5068 return "TOFbayesianPID";
5070 return "TOFbetaSimple";
5074 return "TPCTOFNsigma";
5076 return "TPCTOFNsigmaPurity";
5093 return "TPCstandalone";
5095 return "SPDtracklets";
5103 return "DeltaVZERO";
5105 return "KappaVZERO";
5124 Int_t det = track->GetDetector();
5126 Float_t clsX = track->GetClusterX();
5127 Float_t clsY = track->GetClusterY();
5128 Float_t clsZ = track->GetClusterZ();
5129 Float_t ncell = track->GetClusterCells();
5130 Float_t adc = track->GetClusterADC();
5141 if (
fCutEta) {
if ( fTrackEta < fEtaMin || fTrackEta >=
fEtaMax ) pass = kFALSE;}
5142 if (
fCutPhi) {
if ( fTrackPhi < fPhiMin || fTrackPhi >=
fPhiMax ) pass = kFALSE;}
5154 if (
id<0)
return kFALSE;
5159 fTrackPhi = TMath::PiOver4()*(0.5+
id%8);
5201 if(
fEvent->GetRunNumber() < 209122){
5204 EventCentrality =
fEvent->GetCentrality()->GetCentralityPercentile(
"V0M");
5221 if(CorrectionFactor) {
5226 AliMultSelection *MultSelection = 0x0;
5227 MultSelection = (AliMultSelection * )
fEvent->FindListObject(
"MultSelection");
5228 if( !MultSelection) {
5230 AliFatal(
"AliMultSelection not found, did you Run AliMultSelectionTask? \n");
5232 EventCentrality = MultSelection->GetMultiplicityPercentile(
"V0M");
5233 if(EventCentrality < 0 && EventCentrality > 100){
5234 AliWarning(
"No Correction Available for this Centrality \n");
5252 if(CorrectionFactor>0) {
5268 if (
fCutEta) {
if ( fTrackEta < fEtaMin || fTrackEta >=
fEtaMax ) pass = kFALSE;}
5269 if (
fCutPhi) {
if ( fTrackPhi < fPhiMin || fTrackPhi >=
fPhiMax ) pass = kFALSE;}
5283 AliESDMuonTrack *esdTrack =
dynamic_cast<AliESDMuonTrack*
>(vparticle);
5284 AliAODTrack *aodTrack =
dynamic_cast<AliAODTrack*
>(vparticle);
5285 if ((!esdTrack) && (!aodTrack))
return kFALSE;
5296 rpxpy = TMath::Sqrt(xPos*xPos + yPos*yPos);
5297 theta = TMath::ATan2(rpxpy,zPos);
5298 eta = -TMath::Log(TMath::Tan(0.5*theta));
5306 Float_t pybypx, phi = 0., phi1;
5309 if(yPos>0) phi = 90.;
5310 if(yPos<0) phi = 270.;
5315 if(pybypx < 0) pybypx = - pybypx;
5316 phi1 = TMath::ATan(pybypx)*180./3.14159;
5318 if(xPos > 0 && yPos > 0) phi = phi1;
5319 if(xPos < 0 && yPos > 0) phi = 180 - phi1;
5320 if(xPos < 0 && yPos < 0) phi = 180 + phi1;
5321 if(xPos > 0 && yPos < 0) phi = 360 - phi1;
5324 phi = phi*3.14159/180.;
5339 if (!
fQA || !list)
return 0;
5340 if (list->IsEmpty())
return 0;
5344 while ( (obj = dynamic_cast<AliFlowTrackCuts*>(next())) )
5346 if (obj==
this)
continue;
5347 tmplist.Add(obj->
GetQA());
5349 return fQA->Merge(&tmplist);
5359 printf(
"The purity functions file does not exist");
5365 TString species[3] = {
"pion",
"kaon",
"proton"};
5366 TList *Species_functions[3];
5368 for(ispecie = 0; ispecie < 3; ispecie++) {
5370 if(!Species_functions[ispecie]) {
5371 cout<<
"Purity functions for species: "<<species[ispecie]<<
" not found!!!"<<endl;
5376 for(
int i=0;i<180;i++){
5380 if(!
fPurityFunction[i]){printf(
"Purity function does not exist");
return;}
5386 Int_t counterForSharedCluster = 0;
5387 for(
int i =0;i<6;i++){
5388 Bool_t sharedITSCluster = track->HasSharedPointOnITSLayer(i);
5391 if(sharedITSCluster == 1) counterForSharedCluster++;
5395 return counterForSharedCluster;
5402 if(track->GetNcls(0) == 0)
return 999.;
5403 Double_t chi2perClusterITS = track->GetITSchi2()/track->GetNcls(0);
5409 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="")