Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions ALICE3/TableProducer/OTF/onTheFlyTracker.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -454,13 +454,13 @@
double pi_mass = o2::constants::physics::MassPionCharged;
double pr_mass = o2::constants::physics::MassProton;

double xi_gamma = 1 / sqrt(1 + (particle.p() * particle.p()) / (xi_mass * xi_mass));

Check failure on line 457 in ALICE3/TableProducer/OTF/onTheFlyTracker.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[std-prefix]

Use std:: prefix for names from the std namespace.
double xi_ctau = 4.91 * xi_gamma;
double xi_rxyz = (-xi_ctau * log(1 - u));

Check failure on line 459 in ALICE3/TableProducer/OTF/onTheFlyTracker.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[std-prefix]

Use std:: prefix for names from the std namespace.
float sna, csa;
o2::math_utils::CircleXYf_t xi_circle;
track.getCircleParams(magneticField, xi_circle, sna, csa);
double xi_rxy = xi_rxyz / sqrt(1. + track.getTgl() * track.getTgl());

Check failure on line 463 in ALICE3/TableProducer/OTF/onTheFlyTracker.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[std-prefix]

Use std:: prefix for names from the std namespace.
double theta = xi_rxy / xi_circle.rC;
double newX = ((particle.vx() - xi_circle.xC) * std::cos(theta) - (particle.vy() - xi_circle.yC) * std::sin(theta)) + xi_circle.xC;
double newY = ((particle.vy() - xi_circle.yC) * std::cos(theta) + (particle.vx() - xi_circle.xC) * std::sin(theta)) + xi_circle.yC;
Expand All @@ -478,10 +478,10 @@
decayDaughters.push_back(*xiDecay.GetDecay(1));
TLorentzVector la = *xiDecay.GetDecay(0);

double la_gamma = 1 / sqrt(1 + (la.P() * la.P()) / (la_mass * la_mass));

Check failure on line 481 in ALICE3/TableProducer/OTF/onTheFlyTracker.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[std-prefix]

Use std:: prefix for names from the std namespace.
double la_ctau = 7.89 * la_gamma;
std::vector<double> laDaughters = {pi_mass, pr_mass};
double la_rxyz = (-la_ctau * log(1 - u));

Check failure on line 484 in ALICE3/TableProducer/OTF/onTheFlyTracker.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[std-prefix]

Use std:: prefix for names from the std namespace.
laDecayVertex.push_back(xiDecayVertex[0] + la_rxyz * (xiDecay.GetDecay(0)->Px() / xiDecay.GetDecay(0)->P()));
laDecayVertex.push_back(xiDecayVertex[1] + la_rxyz * (xiDecay.GetDecay(0)->Py() / xiDecay.GetDecay(0)->P()));
laDecayVertex.push_back(xiDecayVertex[2] + la_rxyz * (xiDecay.GetDecay(0)->Pz() / xiDecay.GetDecay(0)->P()));
Expand Down Expand Up @@ -607,8 +607,8 @@
o2::track::TrackParCov xiTrackParCov;
convertMCParticleToO2Track(mcParticle, xiTrackParCov);
decayParticle(mcParticle, xiTrackParCov, decayProducts, xiDecayVertex, laDecayVertex);
xiDecayRadius2D = sqrt(xiDecayVertex[0] * xiDecayVertex[0] + xiDecayVertex[1] * xiDecayVertex[1]);

Check failure on line 610 in ALICE3/TableProducer/OTF/onTheFlyTracker.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[std-prefix]

Use std:: prefix for names from the std namespace.
laDecayRadius2D = sqrt(laDecayVertex[0] * laDecayVertex[0] + laDecayVertex[1] * laDecayVertex[1]);

Check failure on line 611 in ALICE3/TableProducer/OTF/onTheFlyTracker.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[std-prefix]

Use std:: prefix for names from the std namespace.
}
}

Expand All @@ -632,7 +632,7 @@
}

histos.fill(HIST("hPtGenerated"), mcParticle.pt());
if (TMath::Abs(mcParticle.pdgCode()) == 11)

Check failure on line 635 in ALICE3/TableProducer/OTF/onTheFlyTracker.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[root/entity]

Replace ROOT entities with equivalents from standard C++ or from O2.
histos.fill(HIST("hPtGeneratedEl"), mcParticle.pt());
if (TMath::Abs(mcParticle.pdgCode()) == 211)
histos.fill(HIST("hPtGeneratedPi"), mcParticle.pt());
Expand Down Expand Up @@ -782,7 +782,7 @@
// DCA to PV taken care of in daughter tracks already, not necessary
thisCascade.dcaV0dau = TMath::Sqrt(fitter.getChi2AtPCACandidate());
thisCascade.v0radius = std::hypot(pos[0], pos[1]);
thisCascade.mLambda = RecoDecay::m(array{array{posP[0], posP[1], posP[2]}, array{negP[0], negP[1], negP[2]}}, array{o2::constants::physics::MassProton, o2::constants::physics::MassPionCharged});

Check failure on line 785 in ALICE3/TableProducer/OTF/onTheFlyTracker.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[std-prefix]

Use std:: prefix for names from the std namespace.

// go for cascade: create V0 (pseudo)track from reconstructed V0
std::array<float, 21> covV = {0.};
Expand Down Expand Up @@ -827,7 +827,7 @@
thisCascade.cascradius = std::hypot(posCascade[0], posCascade[1]);
bachelorTrackAtPCA.getPxPyPzGlo(bachP);

thisCascade.mXi = RecoDecay::m(array{array{bachP[0], bachP[1], bachP[2]}, array{posP[0] + negP[0], posP[1] + negP[1], posP[2] + negP[2]}}, array{o2::constants::physics::MassPionCharged, o2::constants::physics::MassLambda});

Check failure on line 830 in ALICE3/TableProducer/OTF/onTheFlyTracker.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[std-prefix]

Use std:: prefix for names from the std namespace.

// initialize cascade track
o2::track::TrackParCov cascadeTrack = fitter.createParentTrackParCov();
Expand Down Expand Up @@ -870,6 +870,9 @@
posClusterCandidate[2] = gRandom->Gaus(posClusterCandidate[2], currentTrackingLayer.resZ);
}

if (std::isnan(phi))
continue; // Catch when getXatLabR misses layer[i]

// towards adding cluster: move to track alpha
double alpha = cascadeTrack.getAlpha();
double xyz1[3]{
Expand Down
58 changes: 36 additions & 22 deletions ALICE3/TableProducer/alice3-multicharm.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -522,21 +522,28 @@ struct alice3multicharm {
if (std::fabs(xi.dcaXY()) < xiFromXiC_dcaXYconstant || std::fabs(xi.dcaZ()) < xiFromXiC_dcaZconstant)
continue; // likely a primary xi

histos.fill(HIST("hDCAxyXi"), std::fabs(xi.dcaXY() * 1e+4));
histos.fill(HIST("hDCAzXi"), std::fabs(xi.dcaZ() * 1e+4));

if (xiCand.cascRadius() < minXiRadius)
continue;

histos.fill(HIST("hMinXiDecayRadius"), xiCand.cascRadius());
for (auto const& pi1c : tracksPiFromXiCgrouped) {
if (mcSameMotherCheck && !checkSameMother(xi, pi1c))
continue;
if (xiCand.posTrackId() == pi1c.globalIndex() || xiCand.negTrackId() == pi1c.globalIndex() || xiCand.bachTrackId() == pi1c.globalIndex())
continue; // avoid using any track that was already used

if (pi1c.pt() < minPiCPt)
continue; // too low momentum

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

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

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

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

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

histos.fill(HIST("hDCAXiCDaughters"), thisXiCcandidate.dca * 1e+4);

if (std::fabs(thisXiCcandidate.mass - o2::constants::physics::MassXiCPlus) > massWindowXiC)
continue; // out of mass region

Expand All @@ -578,10 +589,13 @@ struct alice3multicharm {
if (xicDecayRadius2D < minXiCRadius)
continue; // do not take if radius too small, likely a primary combination

histos.fill(HIST("hXiRadiusVsXicRadius"), xiCand.cascRadius() * 1e+4, xicDecayRadius2D * 1e+4);
histos.fill(HIST("hMinXiCDecayRadius"), xicDecayRadius2D * 1e+4);

if (xicDecayRadius2D > xiCand.cascRadius())
continue;

histos.fill(HIST("hXiRadiusVsXicRadius"), xiCand.cascRadius() * 1e+4, xicDecayRadius2D * 1e+4);

o2::dataformats::DCA dcaInfo;
float xicdcaXY = 1e+10, xicdcaZ = 1e+10;
o2::track::TrackParCov xicTrackCopy(xicTrack); // paranoia
Expand All @@ -596,6 +610,8 @@ struct alice3multicharm {
if (std::fabs(xicdcaXY) < xiCFromXiCC_dcaXY || std::fabs(xicdcaZ) < xiCFromXiCC_dcaZ)
continue; // likely a primary xic

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

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

histos.fill(HIST("hPiccPt"), picc.pt());

double piccTOFDiffInner = std::fabs(picc.innerTOFTrackTimeReco() - picc.innerTOFExpectedTimePi());
if (piccTOFDiffInner > piFromXiCC_tofDiffInner)
continue; // did not arrive at expected time

histos.fill(HIST("hInnerTOFTrackTimeRecoPicc"), piccTOFDiffInner);

o2::track::TrackParCov piccTrack = getTrackParCov(picc);
nCombinationsCC++;
histos.fill(HIST("hCharmBuilding"), 2.0f);
if (!buildDecayCandidateTwoBody(xicTrack, piccTrack, o2::constants::physics::MassXiCPlus, o2::constants::physics::MassPionCharged))
continue; // failed at building candidate

histos.fill(HIST("hDCAXiCCDaughters"), thisXiCCcandidate.dca * 1e+4);

const std::array<float, 3> momentumCC = {
thisXiCCcandidate.prong0mom[0] + thisXiCCcandidate.prong1mom[0],
thisXiCCcandidate.prong0mom[1] + thisXiCCcandidate.prong1mom[1],
Expand All @@ -630,15 +652,20 @@ struct alice3multicharm {
if (xiccDecayRadius2D < minXiCCRadius)
continue; // do not take if radius too small, likely a primary combination

histos.fill(HIST("hMinXiCCDecayRadius"), xiccDecayRadius2D * 1e+4);

double totalMomentumC = std::hypot(momentumC[0], momentumC[1], momentumC[2]);
double decayLengthXiC = std::hypot(
thisXiCcandidate.xyz[0] - thisXiCCcandidate.xyz[0],
thisXiCcandidate.xyz[1] - thisXiCCcandidate.xyz[1],
thisXiCcandidate.xyz[2] - thisXiCCcandidate.xyz[2]);
double xicProperLength = decayLengthXiC * thisXiCcandidate.mass / totalMomentumC;

if (xicProperLength < xicMinProperLength || xicProperLength > xicMaxProperLength)
continue; // likely background

histos.fill(HIST("hProperLengthXiC"), xicProperLength * 1e+4);

double xicDistanceFromPV = std::hypot(
thisXiCcandidate.xyz[0] - collision.posX(),
thisXiCcandidate.xyz[1] - collision.posY(),
Expand All @@ -647,6 +674,8 @@ struct alice3multicharm {
if (xicDecayDistanceFromPV < xicMinDecayDistanceFromPV)
continue; // too close to PV

histos.fill(HIST("hMinxicDecayDistanceFromPV"), xicDecayDistanceFromPV * 1e+4);

double totalMomentumCC = std::hypot(momentumCC[0], momentumCC[1], momentumCC[2]);
double decayLengthXiCC = std::hypot(
thisXiCCcandidate.xyz[0] - collision.posX(),
Expand All @@ -656,10 +685,12 @@ struct alice3multicharm {
if (xiccProperLength < xiccMinProperLength || xiccProperLength > xicMaxProperLength)
continue; // likely background

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

histos.fill(HIST("hXicRadiusVsXiccRadius"), xicDecayRadius2D * 1e+4, xiccDecayRadius2D * 1e+4);

float xiccdcaXY = 1e+10, xiccdcaZ = 1e+10;
if (xiccTrack.propagateToDCA(primaryVertex, magneticField, &dcaInfo)) {
xiccdcaXY = dcaInfo.getY();
Expand All @@ -669,29 +700,12 @@ struct alice3multicharm {
if (std::fabs(xiccdcaXY) > xiCC_dcaXY || std::fabs(xiccdcaZ) > xiCC_dcaZ)
continue; // not pointing to PV

histos.fill(HIST("hDCAxyXiCC"), std::fabs(xiccdcaXY * 1e+4));
histos.fill(HIST("hDCAzXiCC"), std::fabs(xiccdcaZ * 1e+4));

if (std::fabs(thisXiCcandidate.eta) > xiccMaxEta)
continue; // not in central barrel

histos.fill(HIST("hMinxicDecayDistanceFromPV"), xicDecayDistanceFromPV * 1e+4);
histos.fill(HIST("hInnerTOFTrackTimeRecoPi1c"), pi1cTOFDiffInner);
histos.fill(HIST("hInnerTOFTrackTimeRecoPi2c"), pi2cTOFDiffInner);
histos.fill(HIST("hInnerTOFTrackTimeRecoPicc"), piccTOFDiffInner);
histos.fill(HIST("hDCAXiCDaughters"), thisXiCcandidate.dca * 1e+4);
histos.fill(HIST("hDCAXiCCDaughters"), thisXiCCcandidate.dca * 1e+4);
histos.fill(HIST("hProperLengthXiCC"), xiccProperLength * 1e+4);
histos.fill(HIST("hProperLengthXiC"), xicProperLength * 1e+4);
histos.fill(HIST("hMinXiCCDecayRadius"), xiccDecayRadius2D * 1e+4);
histos.fill(HIST("hMinXiCDecayRadius"), xicDecayRadius2D * 1e+4);
histos.fill(HIST("hMinXiDecayRadius"), xiCand.cascRadius());
histos.fill(HIST("hPi1cPt"), pi1c.pt());
histos.fill(HIST("hPi2cPt"), pi2c.pt());
histos.fill(HIST("hPiccPt"), picc.pt());
histos.fill(HIST("hDCAxyXi"), std::fabs(xi.dcaXY() * 1e+4));
histos.fill(HIST("hDCAzXi"), std::fabs(xi.dcaZ() * 1e+4));
histos.fill(HIST("hDCAxyXiC"), std::fabs(xicdcaXY * 1e+4));
histos.fill(HIST("hDCAzXiC"), std::fabs(xicdcaZ * 1e+4));
histos.fill(HIST("hDCAxyXiCC"), std::fabs(xiccdcaXY * 1e+4));
histos.fill(HIST("hDCAzXiCC"), std::fabs(xiccdcaZ * 1e+4));
histos.fill(HIST("hCharmBuilding"), 3.0f);
histos.fill(HIST("hMassXiCC"), thisXiCCcandidate.mass);
histos.fill(HIST("hPtXiCC"), thisXiCCcandidate.pt);
Expand Down
Loading