@@ -116,9 +116,9 @@ struct StrangeCascTrack {
116116 } axesConfig;
117117
118118 // Filters events
119- // Filter eventFilter = (o2::aod::evsel::sel8 == true);
120- // Filter posZFilter = (nabs(o2::aod::collision::posZ) < selCuts.cutZVertex);
121- // Filter posZFilterMC = (nabs(o2::aod::mccollision::posZ) < selCuts.cutZVertex);
119+ // Filter eventFilter = (o2::aod::evsel::sel8 == true);
120+ // Filter posZFilter = (nabs(o2::aod::collision::posZ) < selCuts.cutZVertex);
121+ // Filter posZFilterMC = (nabs(o2::aod::mccollision::posZ) < selCuts.cutZVertex);
122122
123123 // cascade reconstruction types
124124 static constexpr std::string_view kTypeNames [] = {" Standard" , " Tracked" };
@@ -156,10 +156,14 @@ struct StrangeCascTrack {
156156 auto timeStamp = timestamp;
157157
158158 std::string efficiencyCCDBPath = [&]() {
159- if (doProcesspp) return efficiencyCCDBPath_pp;
160- if (doProcesspO) return efficiencyCCDBPath_pO;
161- if (doProcessPbPb) return efficiencyCCDBPath_PbPb;
162- if (doProcessOO) return efficiencyCCDBPath_OO;
159+ if (doProcesspp)
160+ return efficiencyCCDBPath_pp;
161+ if (doProcesspO)
162+ return efficiencyCCDBPath_pO;
163+ if (doProcessPbPb)
164+ return efficiencyCCDBPath_PbPb;
165+ if (doProcessOO)
166+ return efficiencyCCDBPath_OO;
163167 }();
164168
165169 TList* listEfficiencies = ccdb->getForTimeStamp <TList>(efficiencyCCDBPath, timeStamp);
@@ -249,8 +253,10 @@ struct StrangeCascTrack {
249253 template <typename TCascade>
250254 bool passesTOF (TCascade cascade, TString particle)
251255 {
252- if (particle == " xi" ) return cascade.tofXiCompatibility (selCuts.nSigmaTOFXi );
253- if (particle == " omega" ) return cascade.tofOmegaCompatibility (selCuts.nSigmaTOFOmega );
256+ if (particle == " xi" )
257+ return cascade.tofXiCompatibility (selCuts.nSigmaTOFXi );
258+ if (particle == " omega" )
259+ return cascade.tofOmegaCompatibility (selCuts.nSigmaTOFOmega );
254260 }
255261 // checks whether gen cascade corresponds to PDG code
256262 template <typename TCascade>
@@ -366,10 +372,9 @@ struct StrangeCascTrack {
366372 efficiencyXi = 1 .;
367373 efficiencyXiErr = 0 .;
368374 }
369-
370375 }
371376 }
372-
377+
373378 if (doApplyPurity) {
374379 if constexpr (requires { cascade.topologyChi2 (); }) {
375380 purityOmega = hPurityOmegaTra->Interpolate (cascade.pt (), mult);
@@ -424,47 +429,55 @@ struct StrangeCascTrack {
424429 histos.fill (HIST (kTypeNames [type]) + HIST (" /NoSel/MassOmega" ), massOmega);
425430
426431 if constexpr (requires { collision.straMCCollisionId (); }) {
427- if (isMCTruth (stdCasc, " xi" ) || isMCTruth (stdCasc, " omega" )) {
428- histos.fill (HIST (kTypeNames [type]) + HIST (" /NoSel-Truth/DCAxy" ), cascade.dcaXYCascToPV ());
429- histos.fill (HIST (kTypeNames [type]) + HIST (" /NoSel-Truth/DCAz" ), cascade.dcaZCascToPV ());
430- histos.fill (HIST (kTypeNames [type]) + HIST (" /NoSel-Truth/DCAzVSpt" ), pt, cascade.dcaZCascToPV ());
431- histos.fill (HIST (kTypeNames [type]) + HIST (" /NoSel-Truth/Phi" ), cascade.phi ());
432- histos.fill (HIST (kTypeNames [type]) + HIST (" /NoSel-Truth/Eta" ), cascade.eta ());
433- histos.fill (HIST (kTypeNames [type]) + HIST (" /NoSel-Truth/EvMult" ), mult);
434- histos.fill (HIST (kTypeNames [type]) + HIST (" /NoSel-Truth/BachCosPA" ), stdCasc.bachBaryonCosPA ());
435- histos.fill (HIST (kTypeNames [type]) + HIST (" /NoSel-Truth/V0CosPA" ), v0cosPA);
436- if (isMCTruth (stdCasc, " xi" )) histos.fill (HIST (kTypeNames [type]) + HIST (" /NoSel-Truth/MassXi" ), massXi);
437- if (isMCTruth (stdCasc, " omega" )) histos.fill (HIST (kTypeNames [type]) + HIST (" /NoSel-Truth/MassOmega" ), massOmega);
438- }}
432+ if (isMCTruth (stdCasc, " xi" ) || isMCTruth (stdCasc, " omega" )) {
433+ histos.fill (HIST (kTypeNames [type]) + HIST (" /NoSel-Truth/DCAxy" ), cascade.dcaXYCascToPV ());
434+ histos.fill (HIST (kTypeNames [type]) + HIST (" /NoSel-Truth/DCAz" ), cascade.dcaZCascToPV ());
435+ histos.fill (HIST (kTypeNames [type]) + HIST (" /NoSel-Truth/DCAzVSpt" ), pt, cascade.dcaZCascToPV ());
436+ histos.fill (HIST (kTypeNames [type]) + HIST (" /NoSel-Truth/Phi" ), cascade.phi ());
437+ histos.fill (HIST (kTypeNames [type]) + HIST (" /NoSel-Truth/Eta" ), cascade.eta ());
438+ histos.fill (HIST (kTypeNames [type]) + HIST (" /NoSel-Truth/EvMult" ), mult);
439+ histos.fill (HIST (kTypeNames [type]) + HIST (" /NoSel-Truth/BachCosPA" ), stdCasc.bachBaryonCosPA ());
440+ histos.fill (HIST (kTypeNames [type]) + HIST (" /NoSel-Truth/V0CosPA" ), v0cosPA);
441+ if (isMCTruth (stdCasc, " xi" ))
442+ histos.fill (HIST (kTypeNames [type]) + HIST (" /NoSel-Truth/MassXi" ), massXi);
443+ if (isMCTruth (stdCasc, " omega" ))
444+ histos.fill (HIST (kTypeNames [type]) + HIST (" /NoSel-Truth/MassOmega" ), massOmega);
445+ }
446+ }
439447
440448 // start checking selections
441449 bool passedAllSels = true ;
442450 // apply general selection criteria
443451 if (doApplyCuts) {
444- if (!isValidCasc (collision, stdCasc)) passedAllSels = false ;
452+ if (!isValidCasc (collision, stdCasc))
453+ passedAllSels = false ;
445454 }
446455 // apply tpc pid
447456 if (doApplyTPCPID) {
448- if (!passesTPC (stdCasc)) passedAllSels = false ;
457+ if (!passesTPC (stdCasc))
458+ passedAllSels = false ;
449459 }
450460 // apply tof pid
451461 bool passedAllSelsXi = passedAllSels;
452462 bool passedAllSelsOmega = passedAllSels;
453463 if (doApplyTOFPID) {
454- if (!passesTOF (stdCasc, " xi" )) passedAllSelsXi = false ;
455- if (!passesTOF (stdCasc, " omega" )) passedAllSelsOmega = false ;
464+ if (!passesTOF (stdCasc, " xi" ))
465+ passedAllSelsXi = false ;
466+ if (!passesTOF (stdCasc, " omega" ))
467+ passedAllSelsOmega = false ;
456468 }
457469 // apply competing mass rej
458470 if (doCompetingMassRej) {
459- if (!(std::abs (massXi - o2::constants::physics::MassXiMinus) > selCuts.compMassRej )) passedAllSelsOmega = false ;
471+ if (!(std::abs (massXi - o2::constants::physics::MassXiMinus) > selCuts.compMassRej ))
472+ passedAllSelsOmega = false ;
460473 }
461474
462475 // fill truth w/ cascs that passed all applied sels
463476 double binFillXi[3 ] = {massXi, pt, mult};
464477
465478 if constexpr (requires { collision.straMCCollisionId (); }) {
466479 if (passedAllSels && (passedAllSelsXi || passedAllSelsOmega)) { // fill once for every desired cascade
467- if (isMCTruth (stdCasc, " xi" ) || isMCTruth (stdCasc, " omega" )) {
480+ if (isMCTruth (stdCasc, " xi" ) || isMCTruth (stdCasc, " omega" )) {
468481 histos.fill (HIST (kTypeNames [type]) + HIST (" /Rec-Truth/DCAxy" ), cascade.dcaXYCascToPV ());
469482 histos.fill (HIST (kTypeNames [type]) + HIST (" /Rec-Truth/DCAz" ), cascade.dcaZCascToPV ());
470483 histos.fill (HIST (kTypeNames [type]) + HIST (" /Rec-Truth/DCAzVSpt" ), pt, cascade.dcaZCascToPV ());
@@ -473,17 +486,20 @@ struct StrangeCascTrack {
473486 histos.fill (HIST (kTypeNames [type]) + HIST (" /Rec-Truth/EvMult" ), mult);
474487 histos.fill (HIST (kTypeNames [type]) + HIST (" /Rec-Truth/BachCosPA" ), stdCasc.bachBaryonCosPA ());
475488 histos.fill (HIST (kTypeNames [type]) + HIST (" /Rec-Truth/V0CosPA" ), v0cosPA);
476- }}}
489+ }
490+ }
491+ }
477492
478493 // fill rec
479494 if (passedAllSelsXi) {
480495 histos.fill (HIST (kTypeNames [type]) + HIST (" /Rec/MassXi" ), massXi);
481496 fillHist (histos.get <THn>(HIST (kTypeNames [type]) + HIST (" /Rec/Xi" )), binFillXi, efficiencyXi, efficiencyXiErr, purityXi, purityXiErr);
482497 if constexpr (requires { collision.straMCCollisionId (); }) {
483- if (isMCTruth (stdCasc, " xi" )) {
498+ if (isMCTruth (stdCasc, " xi" )) {
484499 histos.fill (HIST (kTypeNames [type]) + HIST (" /Rec-Truth/MassXi" ), massXi);
485500 histos.fill (HIST (kTypeNames [type]) + HIST (" /Rec-Truth/Xi" ), massXi, pt, mult);
486- }}
501+ }
502+ }
487503 }
488504 double binFillOmega[3 ] = {massOmega, pt, mult};
489505 if (passedAllSelsOmega) {
@@ -493,7 +509,8 @@ struct StrangeCascTrack {
493509 if (isMCTruth (stdCasc, " omega" )) {
494510 histos.fill (HIST (kTypeNames [type]) + HIST (" /Rec-Truth/MassOmega" ), massOmega);
495511 histos.fill (HIST (kTypeNames [type]) + HIST (" /Rec-Truth/Omega" ), massOmega, pt, mult);
496- }}
512+ }
513+ }
497514 }
498515 }
499516 }
@@ -547,16 +564,15 @@ struct StrangeCascTrack {
547564 histos.add (Form (" %s/Rec-Truth/MassOmega" , kTypeNames [type].data ()), " Invariant mass hypothesis" , kTH1F , {axesConfig.axisOmegaMass });
548565 histos.add (Form (" %s/Rec-Truth/Omega" , kTypeNames [type].data ()), " " , kTHnD , {axesConfig.axisOmegaMass , axesConfig.axisPt , axesConfig.axisMult });
549566 histos.add (Form (" %s/Rec-Truth/Xi" , kTypeNames [type].data ()), " " , kTHnD , {axesConfig.axisXiMass , axesConfig.axisPt , axesConfig.axisMult });
550-
551567 });
552568 // for MC-specific processing
553569 histos.add (" MC/Gen/EvCounter" , " Event Counter" , kTH1F , {{1 , 0 , 1 }});
554- histos.add (" MC/Gen/Xi" , " Xi" , kTH2F , {axesConfig.axisPt , axesConfig.axisMult }); // generated Xis
555- histos.add (" MC/Gen/Omega" , " Omega" , kTH2F , {axesConfig.axisPt , axesConfig.axisMult }); // generated Omegas
570+ histos.add (" MC/Gen/Xi" , " Xi" , kTH2F , {axesConfig.axisPt , axesConfig.axisMult }); // generated Xis
571+ histos.add (" MC/Gen/Omega" , " Omega" , kTH2F , {axesConfig.axisPt , axesConfig.axisMult }); // generated Omegas
556572 histos.add (" MC/Gen/PrimaryXi" , " Xi primaries" , kTH2F , {axesConfig.axisPt , axesConfig.axisMult }); // generated primary Xis
557573 histos.add (" MC/Gen/PrimaryOmega" , " Omega primaries" , kTH2F , {axesConfig.axisPt , axesConfig.axisMult }); // generated primary Omegas
558- histos.add (" MC/Rec/EvCounter" , " Event Counter" , kTH1F , {{1 , 0 , 1 }}); // counter of all recreated events
559- histos.add (" MC/Rec/EvMult" , " Multiplicity" , kTH1F , {axesConfig.axisMult }); // multiplicity of all recreated events
574+ histos.add (" MC/Rec/EvCounter" , " Event Counter" , kTH1F , {{1 , 0 , 1 }}); // counter of all recreated events
575+ histos.add (" MC/Rec/EvMult" , " Multiplicity" , kTH1F , {axesConfig.axisMult }); // multiplicity of all recreated events
560576 }
561577
562578 void processDerivedData (DerCollisionWMults::iterator const & collision, DerCascDatas const & allCascs, DerTraCascDatas const & traCascs, DauTracks const &)
0 commit comments