Skip to content

Commit ecd8a4f

Browse files
committed
Fix to corrupted cascade tracks
1 parent 9a4ff63 commit ecd8a4f

File tree

2 files changed

+43
-24
lines changed

2 files changed

+43
-24
lines changed

ALICE3/TableProducer/OTF/onTheFlyTracker.cxx

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -869,6 +869,9 @@ struct OnTheFlyTracker {
869869
posClusterCandidate[1] = r * std::sin(phi);
870870
posClusterCandidate[2] = gRandom->Gaus(posClusterCandidate[2], currentTrackingLayer.resZ);
871871
}
872+
873+
if (std::isnan(phi))
874+
continue; // Catch when getXatLabR misses layer[i]
872875

873876
// towards adding cluster: move to track alpha
874877
double alpha = cascadeTrack.getAlpha();

ALICE3/TableProducer/alice3-multicharm.cxx

Lines changed: 40 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -522,21 +522,28 @@ struct alice3multicharm {
522522
if (std::fabs(xi.dcaXY()) < xiFromXiC_dcaXYconstant || std::fabs(xi.dcaZ()) < xiFromXiC_dcaZconstant)
523523
continue; // likely a primary xi
524524

525+
histos.fill(HIST("hDCAxyXi"), std::fabs(xi.dcaXY() * 1e+4));
526+
histos.fill(HIST("hDCAzXi"), std::fabs(xi.dcaZ() * 1e+4));
527+
525528
if (xiCand.cascRadius() < minXiRadius)
526529
continue;
527-
530+
531+
histos.fill(HIST("hMinXiDecayRadius"), xiCand.cascRadius());
528532
for (auto const& pi1c : tracksPiFromXiCgrouped) {
529533
if (mcSameMotherCheck && !checkSameMother(xi, pi1c))
530534
continue;
531535
if (xiCand.posTrackId() == pi1c.globalIndex() || xiCand.negTrackId() == pi1c.globalIndex() || xiCand.bachTrackId() == pi1c.globalIndex())
532536
continue; // avoid using any track that was already used
537+
533538
if (pi1c.pt() < minPiCPt)
534539
continue; // too low momentum
535540

541+
histos.fill(HIST("hPi1cPt"), pi1c.pt());
536542
double pi1cTOFDiffInner = std::fabs(pi1c.innerTOFTrackTimeReco() - pi1c.innerTOFExpectedTimePi());
537543
if (pi1cTOFDiffInner > piFromXiC_tofDiffInner)
538544
continue; // did not arrive at expected time
539545

546+
histos.fill(HIST("hInnerTOFTrackTimeRecoPi1c"), pi1cTOFDiffInner);
540547
// second pion from XiC decay for starts here
541548
for (auto const& pi2c : tracksPiFromXiCgrouped) {
542549
if (mcSameMotherCheck && !checkSameMother(xi, pi2c))
@@ -551,10 +558,12 @@ struct alice3multicharm {
551558
if (pi2c.pt() < minPiCPt)
552559
continue; // too low momentum
553560

561+
histos.fill(HIST("hPi2cPt"), pi2c.pt());
554562
double pi2cTOFDiffInner = std::fabs(pi2c.innerTOFTrackTimeReco() - pi2c.innerTOFExpectedTimePi());
555563
if (pi2cTOFDiffInner > piFromXiC_tofDiffInner)
556564
continue; // did not arrive at expected time
557565

566+
histos.fill(HIST("hInnerTOFTrackTimeRecoPi2c"), pi2cTOFDiffInner);
558567
// if I am here, it means this is a triplet to be considered for XiC vertexing.
559568
// will now attempt to build a three-body decay candidate with these three track rows.
560569

@@ -563,6 +572,8 @@ struct alice3multicharm {
563572
if (!buildDecayCandidateThreeBody(xi, pi1c, pi2c, o2::constants::physics::MassXiMinus, o2::constants::physics::MassPionCharged, o2::constants::physics::MassPionCharged))
564573
continue; // failed at building candidate
565574

575+
histos.fill(HIST("hDCAXiCDaughters"), thisXiCcandidate.dca * 1e+4);
576+
566577
if (std::fabs(thisXiCcandidate.mass - o2::constants::physics::MassXiCPlus) > massWindowXiC)
567578
continue; // out of mass region
568579

@@ -577,11 +588,14 @@ struct alice3multicharm {
577588
double xicDecayRadius2D = std::hypot(thisXiCcandidate.xyz[0], thisXiCcandidate.xyz[1]);
578589
if (xicDecayRadius2D < minXiCRadius)
579590
continue; // do not take if radius too small, likely a primary combination
580-
581-
histos.fill(HIST("hXiRadiusVsXicRadius"), xiCand.cascRadius() * 1e+4, xicDecayRadius2D * 1e+4);
591+
592+
histos.fill(HIST("hMinXiCDecayRadius"), xicDecayRadius2D * 1e+4);
593+
582594
if (xicDecayRadius2D > xiCand.cascRadius())
583595
continue;
584596

597+
histos.fill(HIST("hXiRadiusVsXicRadius"), xiCand.cascRadius() * 1e+4, xicDecayRadius2D * 1e+4);
598+
585599
o2::dataformats::DCA dcaInfo;
586600
float xicdcaXY = 1e+10, xicdcaZ = 1e+10;
587601
o2::track::TrackParCov xicTrackCopy(xicTrack); // paranoia
@@ -596,6 +610,8 @@ struct alice3multicharm {
596610
if (std::fabs(xicdcaXY) < xiCFromXiCC_dcaXY || std::fabs(xicdcaZ) < xiCFromXiCC_dcaZ)
597611
continue; // likely a primary xic
598612

613+
histos.fill(HIST("hDCAxyXiC"), std::fabs(xicdcaXY * 1e+4));
614+
histos.fill(HIST("hDCAzXiC"), std::fabs(xicdcaZ * 1e+4));
599615
histos.fill(HIST("hMassXiC"), thisXiCcandidate.mass);
600616

601617
// attempt XiCC finding
@@ -610,16 +626,22 @@ struct alice3multicharm {
610626
if (picc.pt() < minPiCCPt)
611627
continue; // too low momentum
612628

629+
histos.fill(HIST("hPiccPt"), picc.pt());
630+
613631
double piccTOFDiffInner = std::fabs(picc.innerTOFTrackTimeReco() - picc.innerTOFExpectedTimePi());
614632
if (piccTOFDiffInner > piFromXiCC_tofDiffInner)
615633
continue; // did not arrive at expected time
616634

635+
histos.fill(HIST("hInnerTOFTrackTimeRecoPicc"), piccTOFDiffInner);
636+
617637
o2::track::TrackParCov piccTrack = getTrackParCov(picc);
618638
nCombinationsCC++;
619639
histos.fill(HIST("hCharmBuilding"), 2.0f);
620640
if (!buildDecayCandidateTwoBody(xicTrack, piccTrack, o2::constants::physics::MassXiCPlus, o2::constants::physics::MassPionCharged))
621641
continue; // failed at building candidate
622642

643+
histos.fill(HIST("hDCAXiCCDaughters"), thisXiCCcandidate.dca * 1e+4);
644+
623645
const std::array<float, 3> momentumCC = {
624646
thisXiCCcandidate.prong0mom[0] + thisXiCCcandidate.prong1mom[0],
625647
thisXiCCcandidate.prong0mom[1] + thisXiCCcandidate.prong1mom[1],
@@ -630,15 +652,21 @@ struct alice3multicharm {
630652
if (xiccDecayRadius2D < minXiCCRadius)
631653
continue; // do not take if radius too small, likely a primary combination
632654

655+
histos.fill(HIST("hMinXiCCDecayRadius"), xiccDecayRadius2D * 1e+4);
656+
633657
double totalMomentumC = std::hypot(momentumC[0], momentumC[1], momentumC[2]);
658+
histos.fill(HIST("hXicCandidateP"), totalMomentumC);
634659
double decayLengthXiC = std::hypot(
635660
thisXiCcandidate.xyz[0] - thisXiCCcandidate.xyz[0],
636661
thisXiCcandidate.xyz[1] - thisXiCCcandidate.xyz[1],
637662
thisXiCcandidate.xyz[2] - thisXiCCcandidate.xyz[2]);
638663
double xicProperLength = decayLengthXiC * thisXiCcandidate.mass / totalMomentumC;
664+
639665
if (xicProperLength < xicMinProperLength || xicProperLength > xicMaxProperLength)
640666
continue; // likely background
641667

668+
histos.fill(HIST("hProperLengthXiC"), xicProperLength * 1e+4);
669+
642670
double xicDistanceFromPV = std::hypot(
643671
thisXiCcandidate.xyz[0] - collision.posX(),
644672
thisXiCcandidate.xyz[1] - collision.posY(),
@@ -647,7 +675,10 @@ struct alice3multicharm {
647675
if (xicDecayDistanceFromPV < xicMinDecayDistanceFromPV)
648676
continue; // too close to PV
649677

678+
histos.fill(HIST("hMinxicDecayDistanceFromPV"), xicDecayDistanceFromPV * 1e+4);
679+
650680
double totalMomentumCC = std::hypot(momentumCC[0], momentumCC[1], momentumCC[2]);
681+
histos.fill(HIST("hXiccCandidateP"), totalMomentumCC);
651682
double decayLengthXiCC = std::hypot(
652683
thisXiCCcandidate.xyz[0] - collision.posX(),
653684
thisXiCCcandidate.xyz[1] - collision.posY(),
@@ -656,10 +687,12 @@ struct alice3multicharm {
656687
if (xiccProperLength < xiccMinProperLength || xiccProperLength > xicMaxProperLength)
657688
continue; // likely background
658689

659-
histos.fill(HIST("hXicRadiusVsXiccRadius"), xicDecayRadius2D * 1e+4, xiccDecayRadius2D * 1e+4);
690+
histos.fill(HIST("hProperLengthXiCC"), xiccProperLength * 1e+4);
660691
if (xiccDecayRadius2D > xicDecayRadius2D)
661692
continue; // XiCC should decay before XiC
662693

694+
histos.fill(HIST("hXicRadiusVsXiccRadius"), xicDecayRadius2D * 1e+4, xiccDecayRadius2D * 1e+4);
695+
663696
float xiccdcaXY = 1e+10, xiccdcaZ = 1e+10;
664697
if (xiccTrack.propagateToDCA(primaryVertex, magneticField, &dcaInfo)) {
665698
xiccdcaXY = dcaInfo.getY();
@@ -669,29 +702,12 @@ struct alice3multicharm {
669702
if (std::fabs(xiccdcaXY) > xiCC_dcaXY || std::fabs(xiccdcaZ) > xiCC_dcaZ)
670703
continue; // not pointing to PV
671704

705+
histos.fill(HIST("hDCAxyXiCC"), std::fabs(xiccdcaXY * 1e+4));
706+
histos.fill(HIST("hDCAzXiCC"), std::fabs(xiccdcaZ * 1e+4));
707+
672708
if (std::fabs(thisXiCcandidate.eta) > xiccMaxEta)
673709
continue; // not in central barrel
674710

675-
histos.fill(HIST("hMinxicDecayDistanceFromPV"), xicDecayDistanceFromPV * 1e+4);
676-
histos.fill(HIST("hInnerTOFTrackTimeRecoPi1c"), pi1cTOFDiffInner);
677-
histos.fill(HIST("hInnerTOFTrackTimeRecoPi2c"), pi2cTOFDiffInner);
678-
histos.fill(HIST("hInnerTOFTrackTimeRecoPicc"), piccTOFDiffInner);
679-
histos.fill(HIST("hDCAXiCDaughters"), thisXiCcandidate.dca * 1e+4);
680-
histos.fill(HIST("hDCAXiCCDaughters"), thisXiCCcandidate.dca * 1e+4);
681-
histos.fill(HIST("hProperLengthXiCC"), xiccProperLength * 1e+4);
682-
histos.fill(HIST("hProperLengthXiC"), xicProperLength * 1e+4);
683-
histos.fill(HIST("hMinXiCCDecayRadius"), xiccDecayRadius2D * 1e+4);
684-
histos.fill(HIST("hMinXiCDecayRadius"), xicDecayRadius2D * 1e+4);
685-
histos.fill(HIST("hMinXiDecayRadius"), xiCand.cascRadius());
686-
histos.fill(HIST("hPi1cPt"), pi1c.pt());
687-
histos.fill(HIST("hPi2cPt"), pi2c.pt());
688-
histos.fill(HIST("hPiccPt"), picc.pt());
689-
histos.fill(HIST("hDCAxyXi"), std::fabs(xi.dcaXY() * 1e+4));
690-
histos.fill(HIST("hDCAzXi"), std::fabs(xi.dcaZ() * 1e+4));
691-
histos.fill(HIST("hDCAxyXiC"), std::fabs(xicdcaXY * 1e+4));
692-
histos.fill(HIST("hDCAzXiC"), std::fabs(xicdcaZ * 1e+4));
693-
histos.fill(HIST("hDCAxyXiCC"), std::fabs(xiccdcaXY * 1e+4));
694-
histos.fill(HIST("hDCAzXiCC"), std::fabs(xiccdcaZ * 1e+4));
695711
histos.fill(HIST("hCharmBuilding"), 3.0f);
696712
histos.fill(HIST("hMassXiCC"), thisXiCCcandidate.mass);
697713
histos.fill(HIST("hPtXiCC"), thisXiCCcandidate.pt);

0 commit comments

Comments
 (0)