@@ -62,6 +62,8 @@ struct FemtoUniverseEfficiencyBase {
6262 Configurable<float > confNsigmaTPCProton{" confNsigmaTPCProton" , 3.0 , " TPC Proton Sigma for momentum < confMomProton" };
6363 Configurable<float > confNsigmaCombinedPion{" confNsigmaCombinedPion" , 3.0 , " TPC and TOF Pion Sigma (combined) for momentum > confMomPion" };
6464 Configurable<float > confNsigmaTPCPion{" confNsigmaTPCPion" , 3.0 , " TPC Pion Sigma for momentum < confMomPion" };
65+ Configurable<bool > confPDGCheckMCReco{" confPDGCheckMCReco" , true , " Check PDG code of MC reco paricles" };
66+
6567 } ConfBothTracks;
6668
6769 // / Lambda cuts
@@ -165,7 +167,7 @@ struct FemtoUniverseEfficiencyBase {
165167 {
166168
167169 eventHisto.init (&qaRegistry);
168- registryCuts.add (" part1/cutsVspT" , " ;#it{p}_{T} (GeV/c) ;Cut no." , {HistType::kTH2F , {{500 , 0 , 5 }, {5 , 0 , 6 }}});
170+ registryCuts.add (" part1/cutsVspT" , " ;#it{p}_{T} (GeV/c) ;Cut no." , {HistType::kTH2F , {{500 , 0 , 5 }, {7 , 0 , 7 }}});
169171 trackHistoPartOneGen.init (&qaRegistry, confTempFitVarpTBins, confTempFitVarPDGBins, confIsMCGen, confPDGCodePartOne, false );
170172 trackHistoPartOneRec.init (&qaRegistry, confTempFitVarpTBins, confTempFitVarDCABins, confIsMCReco, confPDGCodePartOne, confIsDebug);
171173 registryMCOrigin.add (" part1/hPt" , " ;#it{p}_{T} (GeV/c); Entries" , {HistType::kTH1F , {{240 , 0 , 6 }}});
@@ -182,7 +184,7 @@ struct FemtoUniverseEfficiencyBase {
182184 registryPDG.add (" part2/PDGvspT" , " PDG;#it{p}_{T} (GeV/c); PDG" , {HistType::kTH2F , {{500 , 0 , 5 }, {16001 , -8000.5 , 8000.5 }}});
183185 registryPDG.add (" part2/PDGvspTall" , " PDG;#it{p}_{T} (GeV/c); PDG" , {HistType::kTH2F , {{500 , 0 , 5 }, {16001 , -8000.5 , 8000.5 }}});
184186 if (!confIsSame) {
185- registryCuts.add (" part2/cutsVspT" , " ;#it{p}_{T} (GeV/c) ;Cut no." , {HistType::kTH2F , {{500 , 0 , 5 }, {5 , 0 , 6 }}});
187+ registryCuts.add (" part2/cutsVspT" , " ;#it{p}_{T} (GeV/c) ;Cut no." , {HistType::kTH2F , {{500 , 0 , 5 }, {7 , 0 , 7 }}});
186188 trackHistoPartTwoGen.init (&qaRegistry, confTempFitVarpTBins, confTempFitVarPDGBins, confIsMCGen, confPDGCodePartTwo, false );
187189 trackHistoPartTwoRec.init (&qaRegistry, confTempFitVarpTBins, confTempFitVarDCABins, confIsMCReco, confPDGCodePartTwo, confIsDebug);
188190 registryMCOrigin.add (" part2/hPt" , " ;#it{p}_{T} (GeV/c); Entries" , {HistType::kTH1F , {{240 , 0 , 6 }}});
@@ -398,18 +400,28 @@ struct FemtoUniverseEfficiencyBase {
398400 for (const auto & part : grouppartsOneMCRec) {
399401
400402 // only partition
403+ registryCuts.fill (HIST (" part1/cutsVspT" ), part.pt (), 0 );
404+
405+ if (part.partType () != confParticleTypePartOne) {
406+ continue ;
407+ }
401408 registryCuts.fill (HIST (" part1/cutsVspT" ), part.pt (), 1 );
402409
403- if (part.partType () != confParticleTypePartOne || part. sign () != confChargePart1 || ! isParticleNSigma (confPDGCodePartOne, part. p (), trackCuts. getNsigmaTPC (part, o2::track::PID::Proton), trackCuts. getNsigmaTOF (part, o2::track::PID::Proton), trackCuts. getNsigmaTPC (part, o2::track::PID::Pion), trackCuts. getNsigmaTOF (part, o2::track::PID::Pion), trackCuts. getNsigmaTPC (part, o2::track::PID::Kaon), trackCuts. getNsigmaTOF (part, o2::track::PID::Kaon), trackCuts. getNsigmaTPC (part, o2::track::PID::Deuteron), trackCuts. getNsigmaTOF (part, o2::track::PID::Deuteron)) ) {
410+ if (part.sign () != confChargePart1) {
404411 continue ;
405412 }
406413 registryCuts.fill (HIST (" part1/cutsVspT" ), part.pt (), 2 );
407414
408- if (!part.has_fdMCParticle ( )) {
415+ if (!isParticleNSigma (confPDGCodePartOne, part.p (), trackCuts. getNsigmaTPC (part, o2::track::PID::Proton), trackCuts. getNsigmaTOF (part, o2::track::PID::Proton), trackCuts. getNsigmaTPC (part, o2::track::PID::Pion), trackCuts. getNsigmaTOF (part, o2::track::PID::Pion), trackCuts. getNsigmaTPC (part, o2::track::PID::Kaon), trackCuts. getNsigmaTOF (part, o2::track::PID::Kaon), trackCuts. getNsigmaTPC (part, o2::track::PID::Deuteron), trackCuts. getNsigmaTOF (part, o2::track::PID::Deuteron) )) {
409416 continue ;
410417 }
411418 registryCuts.fill (HIST (" part1/cutsVspT" ), part.pt (), 3 );
412419
420+ if (!part.has_fdMCParticle ()) {
421+ continue ;
422+ }
423+ registryCuts.fill (HIST (" part1/cutsVspT" ), part.pt (), 4 );
424+
413425 const auto mcParticle = part.fdMCParticle ();
414426
415427 registryPDG.fill (HIST (" part1/PDGvspTall" ), part.pt (), mcParticle.pdgMCTruth ());
@@ -418,29 +430,40 @@ struct FemtoUniverseEfficiencyBase {
418430 if (!(mcParticle.partOriginMCTruth () == aod::femtouniverse_mc_particle::ParticleOriginMCTruth::kPrimary )) {
419431 continue ;
420432 }
421- registryCuts.fill (HIST (" part1/cutsVspT" ), part.pt (), 4 );
433+ registryCuts.fill (HIST (" part1/cutsVspT" ), part.pt (), 5 );
422434
423- if (!(std::abs (mcParticle.pdgMCTruth ()) == std::abs (confPDGCodePartOne))) {
435+ if (ConfBothTracks. confPDGCheckMCReco && !(std::abs (mcParticle.pdgMCTruth ()) == std::abs (confPDGCodePartOne))) {
424436 continue ;
425437 }
426- registryCuts.fill (HIST (" part1/cutsVspT" ), part.pt (), 5 );
438+ registryCuts.fill (HIST (" part1/cutsVspT" ), part.pt (), 6 );
427439
428440 registryPDG.fill (HIST (" part1/PDGvspT" ), part.pt (), mcParticle.pdgMCTruth ());
429441 registryMCOrigin.fill (HIST (" part1/hPt" ), mcParticle.pt ());
430442 }
431443
432444 if (!confIsSame) {
433445 for (const auto & part : grouppartsTwoMCRec) {
446+ registryCuts.fill (HIST (" part2/cutsVspT" ), part.pt (), 0 );
447+
448+ if (part.partType () != confParticleTypePartOne) {
449+ continue ;
450+ }
434451 registryCuts.fill (HIST (" part2/cutsVspT" ), part.pt (), 1 );
435- if (part.partType () != confParticleTypePartTwo || part.sign () != confChargePart2 || !isParticleNSigma (confPDGCodePartTwo, part.p (), trackCuts.getNsigmaTPC (part, o2::track::PID::Proton), trackCuts.getNsigmaTOF (part, o2::track::PID::Proton), trackCuts.getNsigmaTPC (part, o2::track::PID::Pion), trackCuts.getNsigmaTOF (part, o2::track::PID::Pion), trackCuts.getNsigmaTPC (part, o2::track::PID::Kaon), trackCuts.getNsigmaTOF (part, o2::track::PID::Kaon), trackCuts.getNsigmaTPC (part, o2::track::PID::Deuteron), trackCuts.getNsigmaTOF (part, o2::track::PID::Deuteron))) {
452+
453+ if (part.sign () != confChargePart1) {
436454 continue ;
437455 }
438456 registryCuts.fill (HIST (" part2/cutsVspT" ), part.pt (), 2 );
439457
440- if (!part.has_fdMCParticle ( )) {
458+ if (!isParticleNSigma (confPDGCodePartOne, part.p (), trackCuts. getNsigmaTPC (part, o2::track::PID::Proton), trackCuts. getNsigmaTOF (part, o2::track::PID::Proton), trackCuts. getNsigmaTPC (part, o2::track::PID::Pion), trackCuts. getNsigmaTOF (part, o2::track::PID::Pion), trackCuts. getNsigmaTPC (part, o2::track::PID::Kaon), trackCuts. getNsigmaTOF (part, o2::track::PID::Kaon), trackCuts. getNsigmaTPC (part, o2::track::PID::Deuteron), trackCuts. getNsigmaTOF (part, o2::track::PID::Deuteron) )) {
441459 continue ;
442460 }
443461 registryCuts.fill (HIST (" part2/cutsVspT" ), part.pt (), 3 );
462+
463+ if (!part.has_fdMCParticle ()) {
464+ continue ;
465+ }
466+ registryCuts.fill (HIST (" part2/cutsVspT" ), part.pt (), 4 );
444467 const auto mcParticle = part.fdMCParticle ();
445468
446469 registryPDG.fill (HIST (" part2/PDGvspTall" ), part.pt (), mcParticle.pdgMCTruth ());
@@ -449,12 +472,12 @@ struct FemtoUniverseEfficiencyBase {
449472 if (!(mcParticle.partOriginMCTruth () == aod::femtouniverse_mc_particle::ParticleOriginMCTruth::kPrimary )) {
450473 continue ;
451474 }
452- registryCuts.fill (HIST (" part2/cutsVspT" ), part.pt (), 4 );
475+ registryCuts.fill (HIST (" part2/cutsVspT" ), part.pt (), 5 );
453476
454- if (!(std::abs (mcParticle.pdgMCTruth ()) == std::abs (confPDGCodePartTwo))) {
477+ if (ConfBothTracks. confPDGCheckMCReco && !(std::abs (mcParticle.pdgMCTruth ()) == std::abs (confPDGCodePartTwo))) {
455478 continue ;
456479 }
457- registryCuts.fill (HIST (" part2/cutsVspT" ), part.pt (), 5 );
480+ registryCuts.fill (HIST (" part2/cutsVspT" ), part.pt (), 6 );
458481
459482 registryPDG.fill (HIST (" part2/PDGvspT" ), part.pt (), mcParticle.pdgMCTruth ());
460483 registryMCOrigin.fill (HIST (" part2/hPt" ), mcParticle.pt ());
0 commit comments