@@ -77,6 +77,7 @@ struct alice3decayFinder {
7777 Configurable<float > magneticField{" magneticField" , 20 .0f , " Magnetic field (in kilogauss)" };
7878 Configurable<bool > doDCAplotsD{" doDCAplotsD" , true , " do daughter prong DCA plots for D mesons" };
7979 Configurable<bool > doDCAplotsLc{" doDCAplotsLc" , true , " do daughter prong DCA plots for Lc baryons" };
80+ Configurable<bool > doTopoPlotsForSAndB{" doTopoPlotsForSAndB" , true , " do topological variable distributions for S and B separately" };
8081 Configurable<bool > mcSameMotherCheck{" mcSameMotherCheck" , true , " check if tracks come from the same MC mother" };
8182 Configurable<float > dcaDaughtersSelection{" dcaDaughtersSelection" , 1000 .0f , " DCA between daughters (cm)" };
8283
@@ -92,11 +93,13 @@ struct alice3decayFinder {
9293 Configurable<float > DCosThetaStarLowPt{" DCosThetaStarLowPt" , 0.8 , " Cos theta; low pt" };
9394 Configurable<float > DCosThetaStarHighPt{" DCosThetaStarHighPt" , 0.9 , " Cos theta; high pt" };
9495 Configurable<float > DCosThetaStarVHighPt{" DCosThetaStarVHighPt" , 1.0 , " Cos theta; very high pt" };
96+ Configurable<float > DDecayLengthSquaredCut{" DDecayLengthSquaredCut" , 0 ., " Flat component of squared decay length cut (only for LoI legacy)" };
9597 Configurable<float > DMinDecayLength{" DMinDecayLength" , 0 ., " Minimum D decay length (3D)" };
9698 Configurable<float > DMaxDecayLength{" DMaxDecayLength" , 10 ., " Maximum D decay length (3D)" };
9799 Configurable<float > DMinDecayLengthXY{" DMinDecayLengthXY" , 0 ., " Minimum D decay length (xy)" };
98100 Configurable<float > DMaxDecayLengthXY{" DMaxDecayLengthXY" , 10 ., " Maximum D decay length (xy)" };
99- Configurable<float > DNormDecayLength{" DNormDecayLength" , 3 , " Minimum normalized decay length" };
101+ Configurable<float > DMinNormDecayLength{" DMinNormDecayLength" , 3 , " Minimum normalized decay length" };
102+ Configurable<float > DMaxNormDecayLength{" DMaxNormDecayLength" , 3 , " Maximum normalized decay length" };
100103 Configurable<float > minPtPi{" minPtPi" , 0 ., " Minimum pT of daughter pion track" };
101104 Configurable<float > minPtK{" minPtK" , 0 ., " Minimum pT of daughter kaon track" };
102105 Configurable<float > maxImpParPi{" maxImpParPi" , 1 ., " Maximum impact paramter of daughter pion track" };
@@ -389,7 +392,7 @@ struct alice3decayFinder {
389392 histos.add (" hDNormDecayLength" , " hDNormDecayLength" , kTH1F , {{100 , 0 , 10 }});
390393 histos.add (" hImpParPi" , " hImpParPi" , kTH1F , {{200 , -0.4 , 0.4 }});
391394 histos.add (" hImpParK" , " hImpParK" , kTH1F , {{200 , -0.4 , 0.4 }});
392- histos.add (" hImpParProduct" , " hImpParProduct" , kTH1F , {{200 , -0.04 , 0.04 }});
395+ histos.add (" hImpParProduct" , " hImpParProduct" , kTH1F , {{400 , -0.04 , 0.04 }});
393396
394397 histos.add (" hDCosPA_Selected" , " hDCosPA_Selected" , kTH1F , {{800 , -1 , 1 }});
395398 histos.add (" hDCosPAxy_Selected" , " hDCosPAxy_Selected" , kTH1F , {{800 , -1 , 1 }});
@@ -399,7 +402,28 @@ struct alice3decayFinder {
399402 histos.add (" hDNormDecayLength_Selected" , " hDNormDecayLength_Selected" , kTH1F , {{100 , 0 , 10 }});
400403 histos.add (" hImpParPi_Selected" , " hImpParPi_Selected" , kTH1F , {{200 , -0.4 , 0.4 }});
401404 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 }});
405+ histos.add (" hImpParProduct_Selected" , " hImpParProduct_Selected" , kTH1F , {{400 , -0.04 , 0.04 }});
406+
407+ if (doTopoPlotsForSAndB) {
408+ histos.add (" hDCosPA_Signal" , " hDCosPA_Signal" , kTH1F , {{800 , -1 , 1 }});
409+ histos.add (" hDCosPAxy_Signal" , " hDCosPAxy_Signal" , kTH1F , {{800 , -1 , 1 }});
410+ histos.add (" hDCosThetaStar_Signal" , " hDCosThetaStar_Signal" , kTH1F , {{200 , -1 , 1 }});
411+ histos.add (" hDDecayLength_Signal" , " hDDecayLength_Signal" , kTH1F , {{100 , 0 , 0.5 }});
412+ histos.add (" hDDecayLengthXY_Signal" , " hDDecayLengthXY_Signal" , kTH1F , {{100 , 0 , 0.5 }});
413+ histos.add (" hDNormDecayLength_Signal" , " hDNormDecayLength_Signal" , kTH1F , {{100 , 0 , 10 }});
414+ histos.add (" hImpParPi_Signal" , " hImpParPi_Signal" , kTH1F , {{200 , -0.4 , 0.4 }});
415+ histos.add (" hImpParK_Signal" , " hImpParK_Signal" , kTH1F , {{200 , -0.4 , 0.4 }});
416+ histos.add (" hImpParProduct_Signal" , " hImpParProduct_Signal" , kTH1F , {{400 , -0.04 , 0.04 }});
417+ histos.add (" hDCosPA_Bkg" , " hDCosPA_Bkg" , kTH1F , {{800 , -1 , 1 }});
418+ histos.add (" hDCosPAxy_Bkg" , " hDCosPAxy_Bkg" , kTH1F , {{800 , -1 , 1 }});
419+ histos.add (" hDCosThetaStar_Bkg" , " hDCosThetaStar_Bkg" , kTH1F , {{200 , -1 , 1 }});
420+ histos.add (" hDDecayLength_Bkg" , " hDDecayLength_Bkg" , kTH1F , {{100 , 0 , 0.5 }});
421+ histos.add (" hDDecayLengthXY_Bkg" , " hDDecayLengthXY_Bkg" , kTH1F , {{100 , 0 , 0.5 }});
422+ histos.add (" hDNormDecayLength_Bkg" , " hDNormDecayLength_Bkg" , kTH1F , {{100 , 0 , 10 }});
423+ histos.add (" hImpParPi_Bkg" , " hImpParPi_Bkg" , kTH1F , {{200 , -0.4 , 0.4 }});
424+ histos.add (" hImpParK_Bkg" , " hImpParK_Bkg" , kTH1F , {{200 , -0.4 , 0.4 }});
425+ histos.add (" hImpParProduct_Bkg" , " hImpParProduct_Bkg" , kTH1F , {{400 , -0.04 , 0.04 }});
426+ }
403427
404428 if (doDCAplotsD) {
405429 histos.add (" hDCADDaughters" , " hDCADDaughters" , kTH1D , {axisDCADaughters});
@@ -502,10 +526,37 @@ struct alice3decayFinder {
502526 histos.fill (HIST (" hDDecayLength" ), decayLength);
503527 histos.fill (HIST (" hDDecayLengthXY" ), decayLengthXY);
504528 histos.fill (HIST (" hDNormDecayLength" ), dmeson.normalizedDecayLength );
505- histos.fill (HIST (" hDCADDaughters" ), dmeson.dcaDau * 1e+4 );
506529 histos.fill (HIST (" hImpParPi" ), impParXY_daugPos);
507530 histos.fill (HIST (" hImpParK" ), impParXY_daugNeg);
508531 histos.fill (HIST (" hImpParProduct" ), impParXY_daugPos * impParXY_daugNeg);
532+ if (doDCAplotsD)
533+ histos.fill (HIST (" hDCADDaughters" ), dmeson.dcaDau * 1e+4 );
534+
535+ if (doTopoPlotsForSAndB) { // fill plots of topological variables for S and B separately (reflections not considered here)
536+ histos.fill (HIST (" hDCosPA_Signal" ), dmeson.cosPA );
537+ histos.fill (HIST (" hDCosPAxy_Signal" ), dmeson.cosPAxy );
538+ histos.fill (HIST (" hDCosThetaStar_Signal" ), dmeson.cosThetaStar );
539+ histos.fill (HIST (" hDDecayLength_Signal" ), decayLength);
540+ histos.fill (HIST (" hDDecayLengthXY_Signal" ), decayLengthXY);
541+ histos.fill (HIST (" hDNormDecayLength_Signal" ), dmeson.normalizedDecayLength );
542+ histos.fill (HIST (" hImpParPi_Signal" ), impParXY_daugPos);
543+ histos.fill (HIST (" hImpParK_Signal" ), impParXY_daugNeg);
544+ histos.fill (HIST (" hImpParProduct_Signal" ), impParXY_daugPos * impParXY_daugNeg);
545+ histos.fill (HIST (" hDCosPA_Bkg" ), dmeson.cosPA );
546+ histos.fill (HIST (" hDCosPAxy_Bkg" ), dmeson.cosPAxy );
547+ histos.fill (HIST (" hDCosThetaStar_Bkg" ), dmeson.cosThetaStar );
548+ histos.fill (HIST (" hDDecayLength_Bkg" ), decayLength);
549+ histos.fill (HIST (" hDDecayLengthXY_Bkg" ), decayLengthXY);
550+ histos.fill (HIST (" hDNormDecayLength_Bkg" ), dmeson.normalizedDecayLength );
551+ histos.fill (HIST (" hDCADDaughters_Bkg" ), dmeson.dcaDau * 1e+4 );
552+ histos.fill (HIST (" hImpParPi_Bkg" ), impParXY_daugPos);
553+ histos.fill (HIST (" hImpParK_Bkg" ), impParXY_daugNeg);
554+ histos.fill (HIST (" hImpParProduct_Bkg" ), impParXY_daugPos * impParXY_daugNeg);
555+ if (doDCAplotsD) {
556+ histos.fill (HIST (" hDCADDaughters_Signal" ), dmeson.dcaDau * 1e+4 );
557+ histos.fill (HIST (" hDCADDaughters_Bkg" ), dmeson.dcaDau * 1e+4 );
558+ }
559+ }
509560
510561 if (dmeson.dcaDau > dcaDaughtersSelection)
511562 continue ;
@@ -527,7 +578,7 @@ struct alice3decayFinder {
527578 else if (dmeson.pt > highPtDLimit && std::fabs (dmeson.cosThetaStar ) > DCosThetaStarVHighPt)
528579 continue ;
529580
530- if (dmeson.normalizedDecayLength > DNormDecayLength )
581+ if (dmeson.normalizedDecayLength < DMinNormDecayLength || dmeson. normalizedDecayLength > DMaxNormDecayLength )
531582 continue ;
532583
533584 if (dmeson.ptdaugPos < minPtPi) // track1 (positive) is the pion
@@ -546,6 +597,9 @@ struct alice3decayFinder {
546597 continue ;
547598 if (decayLengthXY < DMinDecayLengthXY || decayLengthXY > DMaxDecayLengthXY)
548599 continue ;
600+ auto decayLengthSquaredCut = std::min ((std::hypot (dmeson.P [0 ], dmeson.P [1 ], dmeson.P [2 ]) * 0.0066 ) + 0.01 , (double )DDecayLengthSquaredCut);
601+ if (decayLength * decayLength < decayLengthSquaredCut * decayLengthSquaredCut)
602+ continue ;
549603
550604 // fill plots of topological variables after topological selection
551605 histos.fill (HIST (" hDCosPA_Selected" ), dmeson.cosPA );
@@ -554,10 +608,11 @@ struct alice3decayFinder {
554608 histos.fill (HIST (" hDDecayLength_Selected" ), decayLength);
555609 histos.fill (HIST (" hDDecayLengthXY_Selected" ), decayLengthXY);
556610 histos.fill (HIST (" hDNormDecayLength_Selected" ), dmeson.normalizedDecayLength );
557- histos.fill (HIST (" hDCADDaughters_Selected" ), dmeson.dcaDau * 1e+4 );
558611 histos.fill (HIST (" hImpParPi_Selected" ), impParXY_daugPos);
559612 histos.fill (HIST (" hImpParK_Selected" ), impParXY_daugNeg);
560613 histos.fill (HIST (" hImpParProduct_Selected" ), impParXY_daugPos * impParXY_daugNeg);
614+ if (doDCAplotsD)
615+ histos.fill (HIST (" hDCADDaughters_Selected" ), dmeson.dcaDau * 1e+4 );
561616
562617 // filling of mass plots for selected candidates
563618 histos.fill (HIST (" hMassD" ), dmeson.mass );
@@ -620,6 +675,32 @@ struct alice3decayFinder {
620675 if (doDCAplotsD)
621676 histos.fill (HIST (" hDCADbarDaughters" ), dmeson.dcaDau * 1e+4 );
622677
678+ if (doTopoPlotsForSAndB) { // fill plots of topological variables for S and B separately (reflections not considered here)
679+ histos.fill (HIST (" hDCosPA_Signal" ), dmeson.cosPA );
680+ histos.fill (HIST (" hDCosPAxy_Signal" ), dmeson.cosPAxy );
681+ histos.fill (HIST (" hDCosThetaStar_Signal" ), dmeson.cosThetaStar );
682+ histos.fill (HIST (" hDDecayLength_Signal" ), decayLength);
683+ histos.fill (HIST (" hDDecayLengthXY_Signal" ), decayLengthXY);
684+ histos.fill (HIST (" hDNormDecayLength_Signal" ), dmeson.normalizedDecayLength );
685+ histos.fill (HIST (" hImpParPi_Signal" ), impParXY_daugNeg);
686+ histos.fill (HIST (" hImpParK_Signal" ), impParXY_daugPos);
687+ histos.fill (HIST (" hImpParProduct_Signal" ), impParXY_daugPos * impParXY_daugNeg);
688+ histos.fill (HIST (" hDCosPA_Bkg" ), dmeson.cosPA );
689+ histos.fill (HIST (" hDCosPAxy_Bkg" ), dmeson.cosPAxy );
690+ histos.fill (HIST (" hDCosThetaStar_Bkg" ), dmeson.cosThetaStar );
691+ histos.fill (HIST (" hDDecayLength_Bkg" ), decayLength);
692+ histos.fill (HIST (" hDDecayLengthXY_Bkg" ), decayLengthXY);
693+ histos.fill (HIST (" hDNormDecayLength_Bkg" ), dmeson.normalizedDecayLength );
694+ histos.fill (HIST (" hDCADDaughters_Bkg" ), dmeson.dcaDau * 1e+4 );
695+ histos.fill (HIST (" hImpParPi_Bkg" ), impParXY_daugNeg);
696+ histos.fill (HIST (" hImpParK_Bkg" ), impParXY_daugPos);
697+ histos.fill (HIST (" hImpParProduct_Bkg" ), impParXY_daugPos * impParXY_daugNeg);
698+ if (doDCAplotsD) {
699+ histos.fill (HIST (" hDCADDaughters_Signal" ), dmeson.dcaDau * 1e+4 );
700+ histos.fill (HIST (" hDCADDaughters_Bkg" ), dmeson.dcaDau * 1e+4 );
701+ }
702+ }
703+
623704 if (dmeson.dcaDau > dcaDaughtersSelection)
624705 continue ;
625706
@@ -640,7 +721,7 @@ struct alice3decayFinder {
640721 else if (dmeson.pt > highPtDLimit && std::fabs (dmeson.cosThetaStar ) > DCosThetaStarVHighPt)
641722 continue ;
642723
643- if (dmeson.normalizedDecayLength > DNormDecayLength )
724+ if (dmeson.normalizedDecayLength < DMinNormDecayLength || dmeson. normalizedDecayLength > DMaxNormDecayLength )
644725 continue ;
645726
646727 if (dmeson.ptdaugPos < minPtK) // track1 is the kaon
@@ -659,6 +740,9 @@ struct alice3decayFinder {
659740 continue ;
660741 if (decayLengthXY < DMinDecayLengthXY || decayLengthXY > DMaxDecayLengthXY)
661742 continue ;
743+ auto decayLengthSquaredCut = std::min ((std::hypot (dmeson.P [0 ], dmeson.P [1 ], dmeson.P [2 ]) * 0.0066 ) + 0.01 , (double )DDecayLengthSquaredCut);
744+ if (decayLength * decayLength < decayLengthSquaredCut * decayLengthSquaredCut)
745+ continue ;
662746
663747 // fill plots of topological variables after topological selection
664748 histos.fill (HIST (" hDCosPA_Selected" ), dmeson.cosPA );
0 commit comments