Skip to content

Commit fadd22f

Browse files
blacwovieblacwalibuild
authored
[PWGLF] add new table for Hypertiton collision ID (#12824)
Co-authored-by: blacw <blacw@blacwdeMacBook-Air.local> Co-authored-by: ALICE Action Bot <alibuild@cern.ch>
1 parent a2a0a89 commit fadd22f

File tree

2 files changed

+51
-4
lines changed

2 files changed

+51
-4
lines changed

PWGLF/DataModel/LFHypernucleiTables.h

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ DECLARE_SOA_COLUMN(QFT0C, qFT0C, float); // Amplitude with FT0
3434
DECLARE_SOA_COLUMN(MultFT0C, multFT0C, float); // Multiplicity with FT0C estimator
3535
DECLARE_SOA_COLUMN(PsiTPC, psiTPC, float); // Psi with TPC estimator
3636
DECLARE_SOA_COLUMN(MultTPC, multTPC, float); // Multiplicity with TPC estimator
37+
DECLARE_SOA_COLUMN(CollisionId, collisionId, int64_t); // CollisionID
3738

3839
DECLARE_SOA_COLUMN(IsMatter, isMatter, bool); // bool: true for matter
3940
DECLARE_SOA_COLUMN(PtHe3, ptHe3, float); // Pt of the He daughter
@@ -147,9 +148,26 @@ DECLARE_SOA_TABLE(MCHypCands, "AOD", "MCHYPCANDS",
147148
hyperrec::IsRecoMCCollision,
148149
hyperrec::IsSurvEvSel);
149150

151+
DECLARE_SOA_TABLE(DataHypCandsWColl, "AOD", "HYPCANDSWCOLL",
152+
o2::soa::Index<>,
153+
hyperrec::CollisionId, hyperrec::CentralityFT0A, hyperrec::CentralityFT0C, hyperrec::CentralityFT0M,
154+
hyperrec::XPrimVtx, hyperrec::YPrimVtx, hyperrec::ZPrimVtx,
155+
156+
hyperrec::IsMatter,
157+
hyperrec::PtHe3, hyperrec::PhiHe3, hyperrec::EtaHe3,
158+
hyperrec::PtPi, hyperrec::PhiPi, hyperrec::EtaPi,
159+
hyperrec::XDecVtx, hyperrec::YDecVtx, hyperrec::ZDecVtx,
160+
hyperrec::DcaV0Daug, hyperrec::DcaHe, hyperrec::DcaPi,
161+
hyperrec::NSigmaHe, hyperrec::NTPCclusHe, hyperrec::NTPCclusPi, hyperrec::NTPCpidClusHe, hyperrec::NTPCpidClusPi,
162+
hyperrec::TPCmomHe, hyperrec::TPCmomPi, hyperrec::TPCsignalHe, hyperrec::TPCsignalPi, hyperrec::TPCChi2He, hyperrec::ITSChi2He, hyperrec::ITSChi2Pi,
163+
hyperrec::TOFMass,
164+
hyperrec::ITSclusterSizesHe, hyperrec::ITSclusterSizesPi,
165+
hyperrec::Flags, hyperrec::TrackedClSize);
166+
150167
using DataHypCand = DataHypCands::iterator;
151168
using DataHypCandFlow = DataHypCandsFlow::iterator;
152169
using MCHypCand = MCHypCands::iterator;
170+
using DataHypCandWColl = DataHypCandsWColl::iterator;
153171

154172
namespace hyperkink
155173
{

PWGLF/TableProducer/Nuspex/hyperRecoTask.cxx

Lines changed: 33 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ struct hyperCandidate {
9191
float genPhi() const { return std::atan2(gMom[1], gMom[0]); }
9292
float genEta() const { return std::asinh(gMom[2] / genPt()); }
9393

94-
int v0ID;
94+
int v0ID = -1;
9595
int heTrackID;
9696
int piTrackID;
9797
float dcaV0dau = -10;
@@ -121,7 +121,7 @@ struct hyperCandidate {
121121
uint32_t clusterSizeITSPi = 0u;
122122

123123
// collision information
124-
unsigned int collisionID = 0;
124+
int64_t collisionID = 0;
125125

126126
bool isMatter = false;
127127
bool isSignal = false; // true MC signal
@@ -137,6 +137,7 @@ struct hyperRecoTask {
137137
Produces<aod::DataHypCands> outputDataTable;
138138
Produces<aod::DataHypCandsFlow> outputDataTableWithFlow;
139139
Produces<aod::MCHypCands> outputMCTable;
140+
Produces<aod::DataHypCandsWColl> outputDataTableWithCollID;
140141
Service<o2::ccdb::BasicCCDBManager> ccdb;
141142
Zorro zorro;
142143
OutputObj<ZorroSummary> zorroSummary{"zorroSummary"};
@@ -409,10 +410,10 @@ struct hyperRecoTask {
409410
hypCand.nSigmaHe3 = computeNSigmaHe3(heTrack);
410411
hypCand.nTPCClustersHe3 = heTrack.tpcNClsFound();
411412
hypCand.tpcSignalHe3 = heTrack.tpcSignal();
412-
hypCand.nTPCpidClusHe3 = (int16_t)heTrack.tpcNClsFindable() - heTrack.tpcNClsFindableMinusPID();
413+
hypCand.nTPCpidClusHe3 = static_cast<int16_t>(heTrack.tpcNClsFindable()) - heTrack.tpcNClsFindableMinusPID();
413414
hypCand.clusterSizeITSHe3 = heTrack.itsClusterSizes();
414415
hypCand.nTPCClustersPi = piTrack.tpcNClsFound();
415-
hypCand.nTPCpidClusPi = (int16_t)piTrack.tpcNClsFindable() - piTrack.tpcNClsFindableMinusPID();
416+
hypCand.nTPCpidClusPi = static_cast<int16_t>(piTrack.tpcNClsFindable()) - piTrack.tpcNClsFindableMinusPID();
416417
hypCand.tpcSignalPi = piTrack.tpcSignal();
417418
hypCand.tpcChi2He3 = heTrack.tpcChi2NCl();
418419
hypCand.itsChi2He3 = heTrack.itsChi2NCl();
@@ -733,6 +734,34 @@ struct hyperRecoTask {
733734
}
734735
PROCESS_SWITCH(hyperRecoTask, processDataWithFlow, "Data analysis with flow", false);
735736

737+
void processDataWithCollID(CollisionsFull const& collisions, aod::V0s const& V0s, TracksFull const& tracks, aod::AmbiguousTracks const& ambiTracks, aod::BCsWithTimestamps const& bcs)
738+
{
739+
goodCollision.clear();
740+
goodCollision.resize(collisions.size(), false);
741+
hyperCandidates.clear();
742+
743+
selectGoodCollisions(collisions);
744+
useCustomVertexer ? fillCustomV0s(collisions, tracks, ambiTracks, bcs) : fillV0s(collisions, tracks, V0s);
745+
746+
for (auto& hypCand : hyperCandidates) {
747+
auto collision = collisions.rawIteratorAt(hypCand.collisionID);
748+
float trackedHypClSize = !trackedClSize.empty() ? trackedClSize[hypCand.v0ID] : 0;
749+
outputDataTableWithCollID(hypCand.collisionID, collision.centFT0A(), collision.centFT0C(), collision.centFT0M(),
750+
collision.posX(), collision.posY(), collision.posZ(),
751+
hypCand.isMatter,
752+
hypCand.recoPtHe3(), hypCand.recoPhiHe3(), hypCand.recoEtaHe3(),
753+
hypCand.recoPtPi(), hypCand.recoPhiPi(), hypCand.recoEtaPi(),
754+
hypCand.decVtx[0], hypCand.decVtx[1], hypCand.decVtx[2],
755+
hypCand.dcaV0dau, hypCand.he3DCAXY, hypCand.piDCAXY,
756+
hypCand.nSigmaHe3, hypCand.nTPCClustersHe3, hypCand.nTPCClustersPi,
757+
hypCand.nTPCpidClusHe3, hypCand.nTPCpidClusPi,
758+
hypCand.momHe3TPC, hypCand.momPiTPC, hypCand.tpcSignalHe3, hypCand.tpcSignalPi, hypCand.tpcChi2He3, hypCand.itsChi2He3, hypCand.itsChi2Pi,
759+
hypCand.massTOFHe3,
760+
hypCand.clusterSizeITSHe3, hypCand.clusterSizeITSPi, hypCand.flags, trackedHypClSize);
761+
}
762+
}
763+
PROCESS_SWITCH(hyperRecoTask, processDataWithCollID, "Data analysis with collision ID", false);
764+
736765
void processMC(CollisionsFullMC const& collisions, aod::McCollisions const& mcCollisions, aod::V0s const& V0s, TracksFull const& tracks, aod::AmbiguousTracks const& ambiTracks, aod::BCsWithTimestamps const& bcs, aod::McTrackLabels const& trackLabelsMC, aod::McParticles const& particlesMC)
737766
{
738767
filledMothers.clear();

0 commit comments

Comments
 (0)