Skip to content

Commit 285877c

Browse files
blacwblacw
authored andcommitted
add new table for Hypertiton collision ID
1 parent b21b55e commit 285877c

File tree

2 files changed

+47
-0
lines changed

2 files changed

+47
-0
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: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -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"};
@@ -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)