Skip to content

Commit

Permalink
A3: Development of analysis-level tree for XiCC (AliceO2Group#7496)
Browse files Browse the repository at this point in the history
* A3: Development of analysis-level tree for XiCC

* Please consider the following formatting changes (#337)

---------

Co-authored-by: ALICE Builder <[email protected]>
  • Loading branch information
ddobrigk and alibuild authored Aug 29, 2024
1 parent 0586d59 commit dfb6f30
Show file tree
Hide file tree
Showing 3 changed files with 104 additions and 3 deletions.
55 changes: 54 additions & 1 deletion ALICE3/DataModel/OTFMulticharm.h
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,35 @@ DECLARE_SOA_COLUMN(MXiCC, mXiCC, float);
DECLARE_SOA_COLUMN(Pt, pt, float);
DECLARE_SOA_COLUMN(Eta, eta, float);

// tracking counters
DECLARE_SOA_COLUMN(NSiliconHitsXi, nSiliconHitsXi, int);
DECLARE_SOA_COLUMN(NSiliconHitsPiFromXi, nSiliconHitsPiFromXi, int);
DECLARE_SOA_COLUMN(NSiliconHitsPiFromLa, nSiliconHitsPiFromLa, int);
DECLARE_SOA_COLUMN(NSiliconHitsPrFromLa, nSiliconHitsPrFromLa, int);
DECLARE_SOA_COLUMN(NSiliconHitsPiC1, nSiliconHitsPiC1, int);
DECLARE_SOA_COLUMN(NSiliconHitsPiC2, nSiliconHitsPiC2, int);
DECLARE_SOA_COLUMN(NSiliconHitsPiCC, nSiliconHitsPiCC, int);

DECLARE_SOA_COLUMN(NTPCHitsPiFromXi, nTPCHitsPiFromXi, int);
DECLARE_SOA_COLUMN(NTPCHitsPiFromLa, nTPCHitsPiFromLa, int);
DECLARE_SOA_COLUMN(NTPCHitsPrFromLa, nTPCHitsPrFromLa, int);
DECLARE_SOA_COLUMN(NTPCHitsPiC1, nTPCHitsPiC1, int);
DECLARE_SOA_COLUMN(NTPCHitsPiC2, nTPCHitsPiC2, int);
DECLARE_SOA_COLUMN(NTPCHitsPiCC, nTPCHitsPiCC, int);

// DCA to PV variables
DECLARE_SOA_COLUMN(DCAToPVXi, dcaToPVXi, float);
DECLARE_SOA_COLUMN(DCAToPVXiC, dcaToPVXiC, float);
DECLARE_SOA_COLUMN(DCAToPVXiCC, dcaToPVXiCC, float);

DECLARE_SOA_COLUMN(DCAToPVPiFromXi, dcaToPVPiFromXi, float);
DECLARE_SOA_COLUMN(DCAToPVPiFromLa, dcaToPVPiFromLa, float);
DECLARE_SOA_COLUMN(DCAToPVPrFromLa, dcaToPVPrFromLa, float);

DECLARE_SOA_COLUMN(DCAToPVPiC1, dcaToPVPiC1, float);
DECLARE_SOA_COLUMN(DCAToPVPiC2, dcaToPVPiC2, float);
DECLARE_SOA_COLUMN(DCAToPVPiCC, dcaToPVPiCC, float);

} // namespace otfmulticharm
DECLARE_SOA_TABLE(MCharmIndices, "AOD", "MCharmIndices",
o2::soa::Index<>,
Expand All @@ -56,7 +85,31 @@ DECLARE_SOA_TABLE(MCharmCores, "AOD", "MCharmCores",
otfmulticharm::MXiC,
otfmulticharm::MXiCC,
otfmulticharm::Pt,
otfmulticharm::Eta);
otfmulticharm::Eta,

otfmulticharm::NSiliconHitsXi,
otfmulticharm::NSiliconHitsPiFromXi,
otfmulticharm::NSiliconHitsPiFromLa,
otfmulticharm::NSiliconHitsPrFromLa,
otfmulticharm::NSiliconHitsPiC1,
otfmulticharm::NSiliconHitsPiC2,
otfmulticharm::NSiliconHitsPiCC,
otfmulticharm::NTPCHitsPiFromXi,
otfmulticharm::NTPCHitsPiFromLa,
otfmulticharm::NTPCHitsPrFromLa,
otfmulticharm::NTPCHitsPiC1,
otfmulticharm::NTPCHitsPiC2,
otfmulticharm::NTPCHitsPiCC,

otfmulticharm::DCAToPVXi,
otfmulticharm::DCAToPVXiC,
otfmulticharm::DCAToPVXiCC,
otfmulticharm::DCAToPVPiFromXi,
otfmulticharm::DCAToPVPiFromLa,
otfmulticharm::DCAToPVPrFromLa,
otfmulticharm::DCAToPVPiC1,
otfmulticharm::DCAToPVPiC2,
otfmulticharm::DCAToPVPiCC);

} // namespace o2::aod

Expand Down
2 changes: 1 addition & 1 deletion ALICE3/TableProducer/OTF/onTheFlyTracker.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -859,7 +859,7 @@ struct OnTheFlyTracker {
histos.fill(HIST("hXiBuilding"), 6.0f);
thisCascade.cascadeTrackId = lastTrackIndex + tracksAlice3.size(); // this is the next index to be filled -> should be it

tracksAlice3.push_back(TrackAlice3{cascadeTrack, mcParticle.globalIndex(), t, 100.f * 1e-3, false, false, 1});
tracksAlice3.push_back(TrackAlice3{cascadeTrack, mcParticle.globalIndex(), t, 100.f * 1e-3, false, false, 1, thisCascade.foundClusters});

if (doXiQA) {
histos.fill(HIST("h2dDeltaPtVsPt"), trackParCov.getPt(), cascadeTrack.getPt() - trackParCov.getPt());
Expand Down
50 changes: 49 additions & 1 deletion ALICE3/TableProducer/alice3-multicharm.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,8 @@
#include "ALICE3/DataModel/OTFStrangeness.h"
#include "ALICE3/DataModel/OTFMulticharm.h"
#include "ALICE3/DataModel/tracksAlice3.h"
#include "DetectorsVertexing/PVertexer.h"
#include "DetectorsVertexing/PVertexerHelpers.h"

using namespace o2;
using namespace o2::framework;
Expand Down Expand Up @@ -122,6 +124,7 @@ struct alice3multicharm {

// Helper struct to pass candidate information
struct {
// decay properties
float dca;
float mass;
float pt;
Expand All @@ -142,6 +145,12 @@ struct alice3multicharm {
std::array<float, 3> prong0mom;
std::array<float, 3> prong1mom;
std::array<float, 21> parentTrackCovMatrix;

float etaPiCC;

// charm daughters
int nSiliconHitsPiCC;
int nTPCHitsPiCC;
} thisXiCCcandidate;

template <typename TTrackType>
Expand Down Expand Up @@ -397,6 +406,10 @@ struct alice3multicharm {
histos.fill(HIST("hMassXi"), xiCand.mXi());
uint32_t nCombinationsC = 0;
auto xi = xiCand.cascadeTrack_as<alice3tracks>(); // de-reference cascade track
auto piFromXi = xiCand.bachTrack_as<alice3tracks>(); // de-reference bach track
auto piFromLa = xiCand.negTrack_as<alice3tracks>(); // de-reference neg track
auto prFromLa = xiCand.posTrack_as<alice3tracks>(); // de-reference pos track

if (!bitcheck(xi.decayMap(), kTrueXiFromXiC))
continue;

Expand All @@ -408,6 +421,7 @@ struct alice3multicharm {

// second pion from XiC decay for starts here
for (auto const& pi2c : tracksPiFromXiCgrouped) {

if (mcSameMotherCheck && !checkSameMother(xi, pi2c))
continue; // keep only if same mother
if (pi1c.globalIndex() >= pi2c.globalIndex())
Expand All @@ -431,12 +445,25 @@ struct alice3multicharm {

o2::track::TrackParCov xicTrack(thisXiCcandidate.xyz, momentumC, thisXiCcandidate.parentTrackCovMatrix, +1);

o2::dataformats::DCA dcaInfo;
float xicdcaXY = 1e+10, xicdcaZ = 1e+10;
o2::track::TrackParCov xicTrackCopy(xicTrack); // paranoia

o2::vertexing::PVertex primaryVertex;
primaryVertex.setXYZ(collision.posX(), collision.posY(), collision.posZ());

if (xicTrackCopy.propagateToDCA(primaryVertex, magneticField, &dcaInfo)) {
xicdcaXY = dcaInfo.getY();
xicdcaZ = dcaInfo.getZ();
}

histos.fill(HIST("hMassXiC"), thisXiCcandidate.mass);
histos.fill(HIST("hDCAXiCDaughters"), thisXiCcandidate.dca);

// attempt XiCC finding
uint32_t nCombinationsCC = 0;
for (auto const& picc : tracksPiFromXiCCgrouped) {

if (xiCand.posTrackId() == picc.globalIndex() || xiCand.negTrackId() == picc.globalIndex() || xiCand.bachTrackId() == picc.globalIndex())
continue; // avoid using any track that was already used

Expand All @@ -454,11 +481,32 @@ struct alice3multicharm {
histos.fill(HIST("h3dMassXiCC"), thisXiCCcandidate.pt, thisXiCCcandidate.eta, thisXiCCcandidate.mass);
histos.fill(HIST("hDCAXiCCDaughters"), thisXiCCcandidate.dca);

const std::array<float, 3> momentumCC = {
thisXiCCcandidate.prong0mom[0] + thisXiCCcandidate.prong1mom[0],
thisXiCCcandidate.prong0mom[1] + thisXiCCcandidate.prong1mom[1],
thisXiCCcandidate.prong0mom[2] + thisXiCCcandidate.prong1mom[2]};

o2::track::TrackParCov xiccTrack(thisXiCCcandidate.xyz, momentumCC, thisXiCCcandidate.parentTrackCovMatrix, +2);

float xiccdcaXY = 1e+10, xiccdcaZ = 1e+10;
if (xiccTrack.propagateToDCA(primaryVertex, magneticField, &dcaInfo)) {
xiccdcaXY = dcaInfo.getY();
xiccdcaZ = dcaInfo.getZ();
}

// produce multi-charm table for posterior analysis
multiCharmCore(
thisXiCcandidate.dca, thisXiCCcandidate.dca,
thisXiCcandidate.mass, thisXiCCcandidate.mass,
thisXiCCcandidate.pt, thisXiCCcandidate.eta);
thisXiCCcandidate.pt, thisXiCCcandidate.eta,
xi.nSiliconHits(), piFromXi.nSiliconHits(),
piFromLa.nSiliconHits(), prFromLa.nSiliconHits(),
pi1c.nSiliconHits(), pi2c.nSiliconHits(), picc.nSiliconHits(),
piFromXi.nTPCHits(), piFromLa.nTPCHits(), prFromLa.nTPCHits(),
pi1c.nTPCHits(), pi2c.nTPCHits(), picc.nTPCHits(),
xi.dcaXY(), xicdcaXY, xiccdcaXY,
piFromXi.dcaXY(), piFromLa.dcaXY(), prFromLa.dcaXY(),
pi1c.dcaXY(), pi2c.dcaXY(), picc.dcaXY());
}
histos.fill(HIST("hCombinationsXiCC"), nCombinationsCC);
}
Expand Down

0 comments on commit dfb6f30

Please sign in to comment.