@@ -92,6 +92,7 @@ struct HfFilter { // Main struct for HF triggers
9292 Configurable<LabeledArray<double >> cutsBzeroToDstar{" cutsBzeroToDstar" , {hf_trigger_cuts_presel_beauty::cuts[0 ], hf_trigger_cuts_presel_beauty::nBinsPt, hf_trigger_cuts_presel_beauty::nCutVars, hf_trigger_cuts_presel_beauty::labelsPt, hf_trigger_cuts_presel_beauty::labelsColumnsTopolBeauty}, " B0 -> D*+ candidate selection per pT bin" };
9393 Configurable<LabeledArray<double >> cutsBzero{" cutsBzero" , {hf_trigger_cuts_presel_beauty::cuts[0 ], hf_trigger_cuts_presel_beauty::nBinsPt, hf_trigger_cuts_presel_beauty::nCutVars, hf_trigger_cuts_presel_beauty::labelsPt, hf_trigger_cuts_presel_beauty::labelsColumnsTopolBeauty}, " B0 candidate selection per pT bin" };
9494 Configurable<LabeledArray<double >> cutsBs{" cutsBs" , {hf_trigger_cuts_presel_beauty::cuts[0 ], hf_trigger_cuts_presel_beauty::nBinsPt, hf_trigger_cuts_presel_beauty::nCutVars, hf_trigger_cuts_presel_beauty::labelsPt, hf_trigger_cuts_presel_beauty::labelsColumnsTopolBeauty}, " Bs candidate selection per pT bin" };
95+ Configurable<LabeledArray<double >> cutsBc{" cutsBc" , {hf_trigger_cuts_presel_beauty::cuts[0 ], hf_trigger_cuts_presel_beauty::nBinsPt, hf_trigger_cuts_presel_beauty::nCutVars, hf_trigger_cuts_presel_beauty::labelsPt, hf_trigger_cuts_presel_beauty::labelsColumnsTopolBeauty}, " Bc candidate selection per pT bin" };
9596 Configurable<LabeledArray<double >> cutsLb{" cutsLb" , {hf_trigger_cuts_presel_beauty::cuts[0 ], hf_trigger_cuts_presel_beauty::nBinsPt, hf_trigger_cuts_presel_beauty::nCutVars, hf_trigger_cuts_presel_beauty::labelsPt, hf_trigger_cuts_presel_beauty::labelsColumnsTopolBeauty}, " Lb candidate selection per pT bin" };
9697 Configurable<LabeledArray<double >> cutsXib{" cutsXib" , {hf_trigger_cuts_presel_beauty::cuts[0 ], hf_trigger_cuts_presel_beauty::nBinsPt, hf_trigger_cuts_presel_beauty::nCutVars, hf_trigger_cuts_presel_beauty::labelsPt, hf_trigger_cuts_presel_beauty::labelsColumnsTopolBeauty}, " Xib candidate selection per pT bin" };
9798 Configurable<LabeledArray<double >> cutsBtoJPsiX{" cutsBtoJPsiX" , {hf_trigger_cuts_presel_beauty::cutsBtoJPsi[0 ], hf_trigger_cuts_presel_beauty::nBinsPt, hf_trigger_cuts_presel_beauty::nCutVarsBtoJPsi, hf_trigger_cuts_presel_beauty::labelsPt, hf_trigger_cuts_presel_beauty::labelsColumnsCutsBeautyToJPsi}, " B->JPsiX candidate selection" };
@@ -207,7 +208,7 @@ struct HfFilter { // Main struct for HF triggers
207208 helper.setPtLimitsLcResonanceBachelor (ptCuts->get (0u , 8u ), ptCuts->get (1u , 8u ));
208209 helper.setCutsSingleTrackBeauty (cutsTrackBeauty3Prong, cutsTrackBeauty4Prong, cutsTrackBeauty4Prong);
209210 helper.setCutsSingleTrackCharmBaryonBachelor (cutsTrackCharmBaryonBachelor);
210- helper.setCutsBhadrons (cutsBplus, cutsBzeroToDstar, cutsBzero, cutsBs, cutsLb, cutsXib);
211+ helper.setCutsBhadrons (cutsBplus, cutsBzeroToDstar, cutsBzero, cutsBs, cutsBc, cutsLb, cutsXib);
211212 helper.setCutsBtoJPsi (cutsBtoJPsiX);
212213 helper.setNsigmaProtonCutsForFemto (std::array{nSigmaPidCuts->get (0u , 3u ), nSigmaPidCuts->get (1u , 3u ), nSigmaPidCuts->get (2u , 3u ), nSigmaPidCuts->get (3u , 3u )});
213214 helper.setNsigmaDeuteronCutsForFemto (std::array{nSigmaPidCuts->get (0u , 6u ), nSigmaPidCuts->get (1u , 6u ), nSigmaPidCuts->get (2u , 6u ), nSigmaPidCuts->get (3u , 6u )});
@@ -556,9 +557,15 @@ struct HfFilter { // Main struct for HF triggers
556557 auto massCandD0K = RecoDecay::m (std::array{pVec2Prong, pVecThird}, std::array{massD0, massKa});
557558 auto pVecBeauty3Prong = RecoDecay::pVec (pVec2Prong, pVecThird);
558559 auto ptCand = RecoDecay::pt (pVecBeauty3Prong);
559- if (TESTBIT (isTrackSelected, kForBeauty ) && (helper.isSelectedBhadronInMassRange (ptCand, massCandD0Pi, kBplus ) || helper.isSelectedBhadronInMassRange (ptCand, massCandD0K, kBc ))) {
560+ bool isBplusInMass = helper.isSelectedBhadronInMassRange (ptCand, massCandD0Pi, kBplus );
561+ bool isBcInMass = helper.isSelectedBhadronInMassRange (ptCand, massCandD0K, kBc );
562+
563+ if (TESTBIT (isTrackSelected, kForBeauty ) && (isBplusInMass || isBcInMass)) {
560564 if (activateQA) {
561- registry.fill (HIST (" fHfVtxStages" ), 1 + HfVtxStage::Skimmed, kBplus );
565+ if (isBplusInMass)
566+ registry.fill (HIST (" fHfVtxStages" ), 1 + HfVtxStage::Skimmed, kBplus );
567+ if (isBcInMass)
568+ registry.fill (HIST (" fHfVtxStages" ), 1 + HfVtxStage::Skimmed, kBc );
562569 }
563570 if (!activateSecVtxForB) {
564571 keepEvent[kBeauty3P ] = true ;
@@ -567,7 +574,10 @@ struct HfFilter { // Main struct for HF triggers
567574 optimisationTreeBeauty (thisCollId, o2::constants::physics::Pdg::kD0 , pt2Prong, scores[0 ], scores[1 ], scores[2 ], dcaThird[0 ]);
568575 }
569576 if (activateQA) {
570- hMassVsPtB[kBplus ]->Fill (ptCand, massCand);
577+ if (isBplusInMass)
578+ hMassVsPtB[kBplus ]->Fill (ptCand, massCandD0Pi);
579+ if (isBcInMass)
580+ hMassVsPtB[kBc ]->Fill (ptCand, massCandD0K);
571581 }
572582 } else {
573583 df2.process (trackParPos, trackParNeg);
@@ -583,25 +593,36 @@ struct HfFilter { // Main struct for HF triggers
583593 registry.fill (HIST (" fHfVtxStages" ), 1 + HfVtxStage::BeautyVertex, kBplus );
584594 }
585595 dfB.propagateTracksToVertex ();
586- const auto & secondaryVertexBplus = dfB.getPCACandidate ();
596+ const auto & secondaryVertexBtoD0h = dfB.getPCACandidate ();
587597 std::array<float , 3 > pVecThirdVtx{};
588598 dfB.getTrack (0 ).getPxPyPzGlo (pVec2ProngVtx);
589599 dfB.getTrack (1 ).getPxPyPzGlo (pVecThirdVtx);
590600 o2::gpu::gpustd::array<float , 2 > dca2Prong; // {trackParD.dcaXY(), trackParD.dcaZ()};
591601 o2::base::Propagator::Instance ()->propagateToDCABxByBz ({collision.posX (), collision.posY (), collision.posZ ()}, trackParD, 2 .f , noMatCorr, &dca2Prong);
592- bool isBplus = helper.isSelectedBhadron (pVec2ProngVtx, pVecThirdVtx, dca2Prong, dcaThird, std::array<double , 3 >{static_cast <double >(collision.posX ()), static_cast <double >(collision.posY ()), static_cast <double >(collision.posZ ())}, std::array{secondaryVertexBplus[0 ], secondaryVertexBplus[1 ], secondaryVertexBplus[2 ]}, kBplus );
593- if (isBplus) {
602+ bool isBplus = helper.isSelectedBhadron (pVec2ProngVtx, pVecThirdVtx, dca2Prong, dcaThird, std::array<double , 3 >{static_cast <double >(collision.posX ()), static_cast <double >(collision.posY ()), static_cast <double >(collision.posZ ())}, std::array{secondaryVertexBtoD0h[0 ], secondaryVertexBtoD0h[1 ], secondaryVertexBtoD0h[2 ]}, kBplus );
603+ bool isBc = helper.isSelectedBhadron (pVec2ProngVtx, pVecThirdVtx, dca2Prong, dcaThird, std::array<double , 3 >{static_cast <double >(collision.posX ()), static_cast <double >(collision.posY ()), static_cast <double >(collision.posZ ())}, std::array{secondaryVertexBtoD0h[0 ], secondaryVertexBtoD0h[1 ], secondaryVertexBtoD0h[2 ]}, kBc );
604+
605+ if (isBplus || isBc) {
594606 keepEvent[kBeauty3P ] = true ;
595607 // fill optimisation tree for D0
596608 if (applyOptimisation) {
597609 optimisationTreeBeauty (thisCollId, o2::constants::physics::Pdg::kD0 , pt2Prong, scores[0 ], scores[1 ], scores[2 ], dcaThird[0 ]);
598610 }
599611 if (activateQA) {
600- registry.fill (HIST (" fHfVtxStages" ), 1 + HfVtxStage::CharmHadPiSelected, kBplus );
601- hCpaVsPtB[kBplus ]->Fill (ptCand, RecoDecay::cpa (std::array<double , 3 >{static_cast <double >(collision.posX ()), static_cast <double >(collision.posY ()), static_cast <double >(collision.posZ ())}, std::array{secondaryVertexBplus[0 ], secondaryVertexBplus[1 ], secondaryVertexBplus[2 ]}, RecoDecay::pVec (pVec2ProngVtx, pVecThirdVtx)));
602- hDecayLengthVsPtB[kBplus ]->Fill (ptCand, RecoDecay::distance (std::array<double , 3 >{static_cast <double >(collision.posX ()), static_cast <double >(collision.posY ()), static_cast <double >(collision.posZ ())}, std::array{secondaryVertexBplus[0 ], secondaryVertexBplus[1 ], secondaryVertexBplus[2 ]}));
603- hImpactParamProductVsPtB[kBplus ]->Fill (ptCand, dca2Prong[0 ] * dcaThird[0 ]);
604- hMassVsPtB[kBplus ]->Fill (ptCand, massCand);
612+ if (isBplus) {
613+ registry.fill (HIST (" fHfVtxStages" ), 1 + HfVtxStage::CharmHadPiSelected, kBplus );
614+ hCpaVsPtB[kBplus ]->Fill (ptCand, RecoDecay::cpa (std::array<double , 3 >{static_cast <double >(collision.posX ()), static_cast <double >(collision.posY ()), static_cast <double >(collision.posZ ())}, std::array{secondaryVertexBtoD0h[0 ], secondaryVertexBtoD0h[1 ], secondaryVertexBtoD0h[2 ]}, RecoDecay::pVec (pVec2ProngVtx, pVecThirdVtx)));
615+ hDecayLengthVsPtB[kBplus ]->Fill (ptCand, RecoDecay::distance (std::array<double , 3 >{static_cast <double >(collision.posX ()), static_cast <double >(collision.posY ()), static_cast <double >(collision.posZ ())}, std::array{secondaryVertexBtoD0h[0 ], secondaryVertexBtoD0h[1 ], secondaryVertexBtoD0h[2 ]}));
616+ hImpactParamProductVsPtB[kBplus ]->Fill (ptCand, dca2Prong[0 ] * dcaThird[0 ]);
617+ hMassVsPtB[kBplus ]->Fill (ptCand, massCandD0Pi);
618+ }
619+ if (isBc) {
620+ registry.fill (HIST (" fHfVtxStages" ), 1 + HfVtxStage::CharmHadPiSelected, kBc );
621+ hCpaVsPtB[kBc ]->Fill (ptCand, RecoDecay::cpa (std::array<double , 3 >{static_cast <double >(collision.posX ()), static_cast <double >(collision.posY ()), static_cast <double >(collision.posZ ())}, std::array{secondaryVertexBtoD0h[0 ], secondaryVertexBtoD0h[1 ], secondaryVertexBtoD0h[2 ]}, RecoDecay::pVec (pVec2ProngVtx, pVecThirdVtx)));
622+ hDecayLengthVsPtB[kBc ]->Fill (ptCand, RecoDecay::distance (std::array<double , 3 >{static_cast <double >(collision.posX ()), static_cast <double >(collision.posY ()), static_cast <double >(collision.posZ ())}, std::array{secondaryVertexBtoD0h[0 ], secondaryVertexBtoD0h[1 ], secondaryVertexBtoD0h[2 ]}));
623+ hImpactParamProductVsPtB[kBc ]->Fill (ptCand, dca2Prong[0 ] * dcaThird[0 ]);
624+ hMassVsPtB[kBc ]->Fill (ptCand, massCandD0K);
625+ }
605626 }
606627 }
607628 }
0 commit comments