@@ -92,7 +92,16 @@ struct alice3decayFinder {
9292 Configurable<float > DCosThetaStarLowPt{" DCosThetaStarLowPt" , 0.8 , " Cos theta; low pt" };
9393 Configurable<float > DCosThetaStarHighPt{" DCosThetaStarHighPt" , 0.9 , " Cos theta; high pt" };
9494 Configurable<float > DCosThetaStarVHighPt{" DCosThetaStarVHighPt" , 1.0 , " Cos theta; very high pt" };
95- Configurable<float > DDauDecayLength{" DDauDecayLength" , 3 , " |Normalized dau decay length| > [0]" };
95+ Configurable<float > DMinDecayLength{" DMinDecayLength" , 0 ., " Minimum D decay length (3D)" };
96+ Configurable<float > DMaxDecayLength{" DMaxDecayLength" , 10 ., " Maximum D decay length (3D)" };
97+ Configurable<float > DMinDecayLengthXY{" DMinDecayLengthXY" , 0 ., " Minimum D decay length (xy)" };
98+ Configurable<float > DMaxDecayLengthXY{" DMaxDecayLengthXY" , 10 ., " Maximum D decay length (xy)" };
99+ Configurable<float > DNormDecayLength{" DNormDecayLength" , 3 , " Minimum normalized decay length" };
100+ Configurable<float > minPtPi{" minPtPi" , 0 ., " Minimum pT of daughter pion track" };
101+ Configurable<float > minPtK{" minPtK" , 0 ., " Minimum pT of daughter kaon track" };
102+ Configurable<float > maxImpParPi{" maxImpParPi" , 1 ., " Maximum impact paramter of daughter pion track" };
103+ Configurable<float > maxImpParK{" maxImpParK" , 1 ., " Maximum impact paramter of daughter kaon track" };
104+ Configurable<float > maxImpParProduct{" maxImpParProduct" , 0 ., " Maximum daughter impact paramter product" };
96105
97106 Configurable<float > piFromLc_dcaXYconstant{" piFromLc_dcaXYconstant" , -1 .0f , " [0] in |DCAxy| > [0]+[1]/pT" };
98107 Configurable<float > piFromLc_dcaXYpTdep{" piFromLc_dcaXYpTdep" , 0.0 , " [1] in |DCAxy| > [0]+[1]/pT" };
@@ -172,6 +181,8 @@ struct alice3decayFinder {
172181 std::array<float , 3 > Pdaug; // positive track
173182 std::array<float , 3 > Ndaug; // negative track
174183 float pt;
184+ float ptdaugPos;
185+ float ptdaugNeg;
175186 float phi;
176187 float eta;
177188 float y;
@@ -226,6 +237,8 @@ struct alice3decayFinder {
226237 // return mass and kinematic variables
227238 dmeson.mass = RecoDecay::m (array{array{posP[0 ], posP[1 ], posP[2 ]}, array{negP[0 ], negP[1 ], negP[2 ]}}, array{posMass, negMass});
228239 dmeson.pt = std::hypot (posP[0 ] + negP[0 ], posP[1 ] + negP[1 ]);
240+ dmeson.ptdaugPos = std::hypot (posP[0 ], posP[1 ]);
241+ dmeson.ptdaugNeg = std::hypot (negP[0 ], negP[1 ]);
229242 dmeson.phi = RecoDecay::phi (array{posP[0 ] + negP[0 ], posP[1 ] + negP[1 ]});
230243 dmeson.eta = RecoDecay::eta (array{posP[0 ] + negP[0 ], posP[1 ] + negP[1 ], posP[2 ] + negP[2 ]});
231244 dmeson.y = RecoDecay::y (std::array{posP[0 ] + negP[0 ], posP[1 ] + negP[1 ], posP[2 ] + negP[2 ]}, dmeson.mass );
@@ -368,14 +381,31 @@ struct alice3decayFinder {
368381 histos.add (" hMassDbarRefl" , " hMassDbarRefl" , kTH1F , {axisDMass});
369382 histos.add (" hMassDbarBkg" , " hMassDbarBkg" , kTH1F , {axisDMass});
370383
371- histos.add (" hDCosPA" , " hDCosPA" , kTH1F , {{200 , 0 , 1 }});
372- histos.add (" hDCosPAxy" , " hDCosPAxy" , kTH1F , {{200 , 0 , 1 }});
384+ histos.add (" hDCosPA" , " hDCosPA" , kTH1F , {{800 , - 1 , 1 }});
385+ histos.add (" hDCosPAxy" , " hDCosPAxy" , kTH1F , {{800 , - 1 , 1 }});
373386 histos.add (" hDCosThetaStar" , " hDCosThetaStar" , kTH1F , {{200 , -1 , 1 }});
374- histos.add (" hDDauDecayLength" , " hDDauDecayLength" , kTH1F , {{100 , 0 , 10 }});
387+ histos.add (" hDDecayLength" , " hDDecayLength" , kTH1F , {{100 , 0 , 0.5 }});
388+ histos.add (" hDDecayLengthXY" , " hDDecayLengthXY" , kTH1F , {{100 , 0 , 0.5 }});
389+ histos.add (" hDNormDecayLength" , " hDNormDecayLength" , kTH1F , {{100 , 0 , 10 }});
390+ histos.add (" hImpParPi" , " hImpParPi" , kTH1F , {{200 , -0.4 , 0.4 }});
391+ histos.add (" hImpParK" , " hImpParK" , kTH1F , {{200 , -0.4 , 0.4 }});
392+ histos.add (" hImpParProduct" , " hImpParProduct" , kTH1F , {{200 , -0.04 , 0.04 }});
393+
394+ histos.add (" hDCosPA_Selected" , " hDCosPA_Selected" , kTH1F , {{800 , -1 , 1 }});
395+ histos.add (" hDCosPAxy_Selected" , " hDCosPAxy_Selected" , kTH1F , {{800 , -1 , 1 }});
396+ histos.add (" hDCosThetaStar_Selected" , " hDCosThetaStar_Selected" , kTH1F , {{200 , -1 , 1 }});
397+ histos.add (" hDDecayLength_Selected" , " hDDecayLength_Selected" , kTH1F , {{100 , 0 , 0.5 }});
398+ histos.add (" hDDecayLengthXY_Selected" , " hDDecayLengthXY_Selected" , kTH1F , {{100 , 0 , 0.5 }});
399+ histos.add (" hDNormDecayLength_Selected" , " hDNormDecayLength_Selected" , kTH1F , {{100 , 0 , 10 }});
400+ histos.add (" hImpParPi_Selected" , " hImpParPi_Selected" , kTH1F , {{200 , -0.4 , 0.4 }});
401+ histos.add (" hImpParK_Selected" , " hImpParK_Selected" , kTH1F , {{200 , -0.4 , 0.4 }});
402+ histos.add (" hImpParProduct_Selected" , " hImpParProduct_Selected" , kTH1F , {{200 , -0.04 , 0.04 }});
375403
376404 if (doDCAplotsD) {
377405 histos.add (" hDCADDaughters" , " hDCADDaughters" , kTH1D , {axisDCADaughters});
378- histos.add (" hDCADbarDaughters" , " hDCADbarDaughters" , kTH1D , {axisDCA});
406+ histos.add (" hDCADbarDaughters" , " hDCADbarDaughters" , kTH1D , {axisDCADaughters});
407+ histos.add (" hDCADDaughters_Selected" , " hDCADDaughters" , kTH1D , {axisDCADaughters});
408+ histos.add (" hDCADbarDaughters_Selected" , " hDCADbarDaughters" , kTH1D , {axisDCADaughters});
379409 histos.add (" h2dDCAxyVsPtPiPlusFromD" , " h2dDCAxyVsPtPiPlusFromD" , kTH2F , {axisPt, axisDCA});
380410 histos.add (" h2dDCAxyVsPtPiMinusFromD" , " h2dDCAxyVsPtPiMinusFromD" , kTH2F , {axisPt, axisDCA});
381411 histos.add (" h2dDCAxyVsPtKaPlusFromD" , " h2dDCAxyVsPtKaPlusFromD" , kTH2F , {axisPt, axisDCA});
@@ -460,10 +490,22 @@ struct alice3decayFinder {
460490 const float dmesonCtau = 0.012301 ;
461491 dmeson.normalizedDecayLength = ((dmeson.mass * std::fabs (std::hypot (collision.posX (), collision.posY (), collision.posZ ()) - std::hypot (dmeson.posSV [0 ], dmeson.posSV [1 ], dmeson.posSV [2 ]))) / std::hypot (dmeson.P [0 ], dmeson.P [1 ], dmeson.P [2 ])) / dmesonCtau;
462492
493+ auto impParXY_daugPos = RecoDecay::impParXY (std::array{collision.posX (), collision.posY (), collision.posZ ()}, std::array{dmeson.posSV [0 ], dmeson.posSV [1 ], dmeson.posSV [2 ]}, std::array{dmeson.Pdaug [0 ], dmeson.Pdaug [1 ], dmeson.Pdaug [2 ]});
494+ auto impParXY_daugNeg = RecoDecay::impParXY (std::array{collision.posX (), collision.posY (), collision.posZ ()}, std::array{dmeson.posSV [0 ], dmeson.posSV [1 ], dmeson.posSV [2 ]}, std::array{dmeson.Ndaug [0 ], dmeson.Ndaug [1 ], dmeson.Ndaug [2 ]});
495+ auto decayLength = std::hypot (collision.posX () - dmeson.posSV [0 ], collision.posY () - dmeson.posSV [1 ], collision.posZ () - dmeson.posSV [2 ]);
496+ auto decayLengthXY = std::hypot (collision.posX () - dmeson.posSV [0 ], collision.posY () - dmeson.posSV [1 ]);
497+
498+ // fill plots of topological variables before topological selection
463499 histos.fill (HIST (" hDCosPA" ), dmeson.cosPA );
464500 histos.fill (HIST (" hDCosPAxy" ), dmeson.cosPAxy );
465501 histos.fill (HIST (" hDCosThetaStar" ), dmeson.cosThetaStar );
466- histos.fill (HIST (" hDDauDecayLength" ), dmeson.normalizedDecayLength );
502+ histos.fill (HIST (" hDDecayLength" ), decayLength);
503+ histos.fill (HIST (" hDDecayLengthXY" ), decayLengthXY);
504+ histos.fill (HIST (" hDNormDecayLength" ), dmeson.normalizedDecayLength );
505+ histos.fill (HIST (" hDCADDaughters" ), dmeson.dcaDau * 1e+4 );
506+ histos.fill (HIST (" hImpParPi" ), impParXY_daugPos);
507+ histos.fill (HIST (" hImpParK" ), impParXY_daugNeg);
508+ histos.fill (HIST (" hImpParProduct" ), impParXY_daugPos * impParXY_daugNeg);
467509
468510 if (dmeson.dcaDau > dcaDaughtersSelection)
469511 continue ;
@@ -485,10 +527,39 @@ struct alice3decayFinder {
485527 else if (dmeson.pt > highPtDLimit && std::fabs (dmeson.cosThetaStar ) > DCosThetaStarVHighPt)
486528 continue ;
487529
488- if (dmeson.normalizedDecayLength > DDauDecayLength )
530+ if (dmeson.normalizedDecayLength > DNormDecayLength )
489531 continue ;
490532
491- histos.fill (HIST (" hDCADDaughters" ), dmeson.dcaDau * 1e+4 );
533+ if (dmeson.ptdaugPos < minPtPi) // track1 (positive) is the pion
534+ continue ;
535+ if (dmeson.ptdaugNeg < minPtK) // track2 (negative) is the kaon
536+ continue ;
537+
538+ if (impParXY_daugPos > maxImpParPi)
539+ continue ;
540+ if (impParXY_daugNeg > maxImpParK)
541+ continue ;
542+ if (impParXY_daugPos * impParXY_daugNeg > maxImpParProduct)
543+ continue ;
544+
545+ if (decayLength < DMinDecayLength || decayLength > DMaxDecayLength)
546+ continue ;
547+ if (decayLengthXY < DMinDecayLengthXY || decayLengthXY > DMaxDecayLengthXY)
548+ continue ;
549+
550+ // fill plots of topological variables after topological selection
551+ histos.fill (HIST (" hDCosPA_Selected" ), dmeson.cosPA );
552+ histos.fill (HIST (" hDCosPAxy_Selected" ), dmeson.cosPAxy );
553+ histos.fill (HIST (" hDCosThetaStar_Selected" ), dmeson.cosThetaStar );
554+ histos.fill (HIST (" hDDecayLength_Selected" ), decayLength);
555+ histos.fill (HIST (" hDDecayLengthXY_Selected" ), decayLengthXY);
556+ histos.fill (HIST (" hDNormDecayLength_Selected" ), dmeson.normalizedDecayLength );
557+ histos.fill (HIST (" hDCADDaughters_Selected" ), dmeson.dcaDau * 1e+4 );
558+ histos.fill (HIST (" hImpParPi_Selected" ), impParXY_daugPos);
559+ histos.fill (HIST (" hImpParK_Selected" ), impParXY_daugNeg);
560+ histos.fill (HIST (" hImpParProduct_Selected" ), impParXY_daugPos * impParXY_daugNeg);
561+
562+ // filling of mass plots for selected candidates
492563 histos.fill (HIST (" hMassD" ), dmeson.mass );
493564 histos.fill (HIST (" h3dRecD" ), dmeson.pt , dmeson.eta , dmeson.mass );
494565 if (dmeson.mcTruth == 1 ) { // true D0 meson, reco as D0 (= correct matching)
@@ -531,10 +602,23 @@ struct alice3decayFinder {
531602 const float dmesonCtau = 0.012301 ;
532603 dmeson.normalizedDecayLength = ((dmeson.mass * std::fabs (std::hypot (collision.posX (), collision.posY (), collision.posZ ()) - std::hypot (dmeson.posSV [0 ], dmeson.posSV [1 ], dmeson.posSV [2 ]))) / std::hypot (dmeson.P [0 ], dmeson.P [1 ], dmeson.P [2 ])) / dmesonCtau;
533604
605+ auto impParXY_daugPos = RecoDecay::impParXY (std::array{collision.posX (), collision.posY (), collision.posZ ()}, std::array{dmeson.posSV [0 ], dmeson.posSV [1 ], dmeson.posSV [2 ]}, std::array{dmeson.Pdaug [0 ], dmeson.Pdaug [1 ], dmeson.Pdaug [2 ]});
606+ auto impParXY_daugNeg = RecoDecay::impParXY (std::array{collision.posX (), collision.posY (), collision.posZ ()}, std::array{dmeson.posSV [0 ], dmeson.posSV [1 ], dmeson.posSV [2 ]}, std::array{dmeson.Ndaug [0 ], dmeson.Ndaug [1 ], dmeson.Ndaug [2 ]});
607+ auto decayLength = std::hypot (collision.posX () - dmeson.posSV [0 ], collision.posY () - dmeson.posSV [1 ], collision.posZ () - dmeson.posSV [2 ]);
608+ auto decayLengthXY = std::hypot (collision.posX () - dmeson.posSV [0 ], collision.posY () - dmeson.posSV [1 ]);
609+
610+ // fill plots of topological variables before topological selection
534611 histos.fill (HIST (" hDCosPA" ), dmeson.cosPA );
535612 histos.fill (HIST (" hDCosPAxy" ), dmeson.cosPAxy );
536613 histos.fill (HIST (" hDCosThetaStar" ), dmeson.cosThetaStar );
537- histos.fill (HIST (" hDDauDecayLength" ), dmeson.normalizedDecayLength );
614+ histos.fill (HIST (" hDDecayLength" ), decayLength);
615+ histos.fill (HIST (" hDDecayLengthXY" ), decayLengthXY);
616+ histos.fill (HIST (" hDNormDecayLength" ), dmeson.normalizedDecayLength );
617+ histos.fill (HIST (" hImpParPi" ), impParXY_daugNeg);
618+ histos.fill (HIST (" hImpParK" ), impParXY_daugPos);
619+ histos.fill (HIST (" hImpParProduct" ), impParXY_daugPos * impParXY_daugNeg);
620+ if (doDCAplotsD)
621+ histos.fill (HIST (" hDCADbarDaughters" ), dmeson.dcaDau * 1e+4 );
538622
539623 if (dmeson.dcaDau > dcaDaughtersSelection)
540624 continue ;
@@ -556,10 +640,40 @@ struct alice3decayFinder {
556640 else if (dmeson.pt > highPtDLimit && std::fabs (dmeson.cosThetaStar ) > DCosThetaStarVHighPt)
557641 continue ;
558642
559- if (dmeson.normalizedDecayLength > DDauDecayLength)
643+ if (dmeson.normalizedDecayLength > DNormDecayLength)
644+ continue ;
645+
646+ if (dmeson.ptdaugPos < minPtK) // track1 is the kaon
647+ continue ;
648+ if (dmeson.ptdaugNeg < minPtPi) // track2 is the pion
649+ continue ;
650+
651+ if (impParXY_daugPos > maxImpParK)
652+ continue ;
653+ if (impParXY_daugNeg > maxImpParPi)
654+ continue ;
655+ if (impParXY_daugPos * impParXY_daugNeg > maxImpParProduct)
656+ continue ;
657+
658+ if (decayLength < DMinDecayLength || decayLength > DMaxDecayLength)
659+ continue ;
660+ if (decayLengthXY < DMinDecayLengthXY || decayLengthXY > DMaxDecayLengthXY)
560661 continue ;
561662
562- histos.fill (HIST (" hDCADbarDaughters" ), dmeson.dcaDau * 1e+4 );
663+ // fill plots of topological variables after topological selection
664+ histos.fill (HIST (" hDCosPA_Selected" ), dmeson.cosPA );
665+ histos.fill (HIST (" hDCosPAxy_Selected" ), dmeson.cosPAxy );
666+ histos.fill (HIST (" hDCosThetaStar_Selected" ), dmeson.cosThetaStar );
667+ histos.fill (HIST (" hDDecayLength_Selected" ), decayLength);
668+ histos.fill (HIST (" hDDecayLengthXY_Selected" ), decayLengthXY);
669+ histos.fill (HIST (" hDNormDecayLength_Selected" ), dmeson.normalizedDecayLength );
670+ histos.fill (HIST (" hImpParK_Selected" ), impParXY_daugPos);
671+ histos.fill (HIST (" hImpParPi_Selected" ), impParXY_daugNeg);
672+ histos.fill (HIST (" hImpParProduct_Selected" ), impParXY_daugPos * impParXY_daugNeg);
673+ if (doDCAplotsD)
674+ histos.fill (HIST (" hDCADbarDaughters_Selected" ), dmeson.dcaDau * 1e+4 );
675+
676+ // filling of mass plots for selected candidates
563677 histos.fill (HIST (" hMassDbar" ), dmeson.mass );
564678 histos.fill (HIST (" h3dRecDbar" ), dmeson.pt , dmeson.eta , dmeson.mass );
565679 if (dmeson.mcTruth == 2 ) { // true D0bar meson, reco as D0bar (= correct matching)
0 commit comments