@@ -202,6 +202,7 @@ struct HfDataCreatorCharmHadPiReduced {
202202 struct : o2::framework::ConfigurableGroup {
203203 Configurable<double > cpaMin{" cpaMin" , 0 ., " Minimum cosine of pointing angle for B candidates" };
204204 Configurable<double > decLenMin{" decLenMin" , 0 ., " Minimum decay length for B candidates" };
205+ Configurable<double > impParProductMax{" impParProductMax" , 10 ., " Maximum product of the impact parameters of the B daughters (cm^2)" };
205206 } bhadronConfigurations;
206207 // HF flags
207208 struct : o2::framework::ConfigurableGroup {
@@ -1034,8 +1035,9 @@ struct HfDataCreatorCharmHadPiReduced {
10341035 // / \param momentum is the B meson momentum
10351036 // / \param secondaryVertex is the reconstructed secondary vertex
10361037 // / \param collision is the reconstructed collision
1038+ // / \param impParProduct is the product of the impact parameters of the B daughters
10371039 template <typename T1 , typename T2 , typename T3 >
1038- bool isBHadronSelected (const T1 & momentum, const T2 & secondaryVertex, const T3 & collision)
1040+ bool isBHadronSelected (const T1 & momentum, const T2 & secondaryVertex, const T3 & collision, const float impParProduct )
10391041 {
10401042 // B candidate CPA
10411043 if (RecoDecay::cpa (std::array{collision.posX (), collision.posY (), collision.posZ ()}, secondaryVertex, momentum) < bhadronConfigurations.cpaMin ) {
@@ -1047,6 +1049,11 @@ struct HfDataCreatorCharmHadPiReduced {
10471049 return false ;
10481050 }
10491051
1052+ // B candidate product of daughter impact parameters
1053+ if (impParProduct > bhadronConfigurations.impParProductMax ) {
1054+ return false ;
1055+ }
1056+
10501057 return true ;
10511058 }
10521059
@@ -1364,7 +1371,10 @@ struct HfDataCreatorCharmHadPiReduced {
13641371 df2.getTrack (0 ).getPxPyPzGlo (pVecDHad);
13651372 df2.getTrack (1 ).getPxPyPzGlo (pVecDau);
13661373 pVecBHad = RecoDecay::pVec (pVecDHad, pVecDau);
1367- if (!isBHadronSelected (pVecBHad, secondaryVertexBHad, collision)) {
1374+ o2::track::TrackParCov trackParCovCharmHadAtPv = trackParCovCharmHad;
1375+ std::array<float , 2 > dcaCharmHad{};
1376+ o2::base::Propagator::Instance ()->propagateToDCABxByBz ({collision.posX (), collision.posY (), collision.posZ ()}, trackParCovCharmHadAtPv, 2 .f , noMatCorr, &dcaCharmHad);
1377+ if (!isBHadronSelected (pVecBHad, secondaryVertexBHad, collision, dcaCharmHad[0 ] * dcaPion[0 ])) {
13681378 continue ;
13691379 }
13701380 // fill Pion tracks table
0 commit comments