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
18 changes: 18 additions & 0 deletions PWGLF/DataModel/LFHypernucleiTables.h
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright 2019-2020 CERN and copyright holders of ALICE O2.

Check failure on line 1 in PWGLF/DataModel/LFHypernucleiTables.h

View workflow job for this annotation

GitHub Actions / O2 linter

[doc/file]

Provide mandatory file documentation.
// See https://alice-o2.web.cern.ch/copyright for details of the copyright holders.
// All rights not expressly granted are reserved.
//
Expand All @@ -12,7 +12,7 @@
///
/// \file LFHypernucleiTables.h
/// \brief Slim hypernuclei tables
///

Check failure on line 15 in PWGLF/DataModel/LFHypernucleiTables.h

View workflow job for this annotation

GitHub Actions / O2 linter

[doc/file]

Documentation for \author is missing, incorrect or misplaced.

#include "Framework/AnalysisDataModel.h"
#include "Framework/ASoAHelpers.h"
Expand All @@ -34,6 +34,7 @@
DECLARE_SOA_COLUMN(MultFT0C, multFT0C, float); // Multiplicity with FT0C estimator
DECLARE_SOA_COLUMN(PsiTPC, psiTPC, float); // Psi with TPC estimator
DECLARE_SOA_COLUMN(MultTPC, multTPC, float); // Multiplicity with TPC estimator
DECLARE_SOA_COLUMN(CollisionId, collisionId, int64_t); // CollisionID

DECLARE_SOA_COLUMN(IsMatter, isMatter, bool); // bool: true for matter
DECLARE_SOA_COLUMN(PtHe3, ptHe3, float); // Pt of the He daughter
Expand All @@ -57,16 +58,16 @@
DECLARE_SOA_COLUMN(NTPCclusPi, nTPCclusPi, uint8_t); // Number of TPC clusters of the Pi daughter
DECLARE_SOA_COLUMN(NTPCpidClusHe, nTPCpidClusHe, uint8_t); // Number of TPC clusters with PID information of the He daughter
DECLARE_SOA_COLUMN(NTPCpidClusPi, nTPCpidClusPi, uint8_t); // Number of TPC clusters with PID information of the Pi daughter
DECLARE_SOA_COLUMN(TPCsignalHe, tpcSignalHe, uint16_t); // TPC signal of the He daughter

Check failure on line 61 in PWGLF/DataModel/LFHypernucleiTables.h

View workflow job for this annotation

GitHub Actions / O2 linter

[name/o2-column]

Use UpperCamelCase for names of O2 columns and matching lowerCamelCase names for their getters.
DECLARE_SOA_COLUMN(TPCsignalPi, tpcSignalPi, uint16_t); // TPC signal of the Pi daughter

Check failure on line 62 in PWGLF/DataModel/LFHypernucleiTables.h

View workflow job for this annotation

GitHub Actions / O2 linter

[name/o2-column]

Use UpperCamelCase for names of O2 columns and matching lowerCamelCase names for their getters.
DECLARE_SOA_COLUMN(TPCChi2He, tpcChi2He, float); // TPC chi2 of the He daughter

Check failure on line 63 in PWGLF/DataModel/LFHypernucleiTables.h

View workflow job for this annotation

GitHub Actions / O2 linter

[name/o2-column]

Use UpperCamelCase for names of O2 columns and matching lowerCamelCase names for their getters.
DECLARE_SOA_COLUMN(ITSChi2He, itsChi2He, float); // ITS chi2 of the He daughter

Check failure on line 64 in PWGLF/DataModel/LFHypernucleiTables.h

View workflow job for this annotation

GitHub Actions / O2 linter

[name/o2-column]

Use UpperCamelCase for names of O2 columns and matching lowerCamelCase names for their getters.
DECLARE_SOA_COLUMN(ITSChi2Pi, itsChi2Pi, float); // ITS chi2 of the Pi daughter

Check failure on line 65 in PWGLF/DataModel/LFHypernucleiTables.h

View workflow job for this annotation

GitHub Actions / O2 linter

[name/o2-column]

Use UpperCamelCase for names of O2 columns and matching lowerCamelCase names for their getters.
DECLARE_SOA_COLUMN(TrackedClSize, trackedClSize, int); // int: zero for non-tracked candidates
DECLARE_SOA_COLUMN(Flags, flags, uint8_t); // Flags for PID in tracking (bits [0, 3] for negative daughter, [4,7] for positive daughter)
DECLARE_SOA_COLUMN(TPCmomHe, tpcMomHe, float); // TPC momentum of the He daughter

Check failure on line 68 in PWGLF/DataModel/LFHypernucleiTables.h

View workflow job for this annotation

GitHub Actions / O2 linter

[name/o2-column]

Use UpperCamelCase for names of O2 columns and matching lowerCamelCase names for their getters.
DECLARE_SOA_COLUMN(TPCmomPi, tpcMomPi, float); // TPC momentum of the Pi daughter

Check failure on line 69 in PWGLF/DataModel/LFHypernucleiTables.h

View workflow job for this annotation

GitHub Actions / O2 linter

[name/o2-column]

Use UpperCamelCase for names of O2 columns and matching lowerCamelCase names for their getters.
DECLARE_SOA_COLUMN(TOFMass, tofMass, float); // TOF mass of the candidate

Check failure on line 70 in PWGLF/DataModel/LFHypernucleiTables.h

View workflow job for this annotation

GitHub Actions / O2 linter

[name/o2-column]

Use UpperCamelCase for names of O2 columns and matching lowerCamelCase names for their getters.
DECLARE_SOA_COLUMN(ITSclusterSizesHe, itsClusterSizesHe, uint32_t); // ITS cluster size of the He daughter
DECLARE_SOA_COLUMN(ITSclusterSizesPi, itsClusterSizesPi, uint32_t); // ITS cluster size of the Pi daughter
DECLARE_SOA_COLUMN(ITSclusterSizesHyp, itsClusterSizesHyp, uint32_t); // ITS cluster size of the Pi daughter
Expand Down Expand Up @@ -147,9 +148,26 @@
hyperrec::IsRecoMCCollision,
hyperrec::IsSurvEvSel);

DECLARE_SOA_TABLE(DataHypCandsWColl, "AOD", "HYPCANDSWCOLL",
o2::soa::Index<>,
hyperrec::CollisionId, hyperrec::CentralityFT0A, hyperrec::CentralityFT0C, hyperrec::CentralityFT0M,
hyperrec::XPrimVtx, hyperrec::YPrimVtx, hyperrec::ZPrimVtx,

hyperrec::IsMatter,
hyperrec::PtHe3, hyperrec::PhiHe3, hyperrec::EtaHe3,
hyperrec::PtPi, hyperrec::PhiPi, hyperrec::EtaPi,
hyperrec::XDecVtx, hyperrec::YDecVtx, hyperrec::ZDecVtx,
hyperrec::DcaV0Daug, hyperrec::DcaHe, hyperrec::DcaPi,
hyperrec::NSigmaHe, hyperrec::NTPCclusHe, hyperrec::NTPCclusPi, hyperrec::NTPCpidClusHe, hyperrec::NTPCpidClusPi,
hyperrec::TPCmomHe, hyperrec::TPCmomPi, hyperrec::TPCsignalHe, hyperrec::TPCsignalPi, hyperrec::TPCChi2He, hyperrec::ITSChi2He, hyperrec::ITSChi2Pi,
hyperrec::TOFMass,
hyperrec::ITSclusterSizesHe, hyperrec::ITSclusterSizesPi,
hyperrec::Flags, hyperrec::TrackedClSize);

using DataHypCand = DataHypCands::iterator;
using DataHypCandFlow = DataHypCandsFlow::iterator;
using MCHypCand = MCHypCands::iterator;
using DataHypCandWColl = DataHypCandsWColl::iterator;

namespace hyperkink
{
Expand Down
37 changes: 33 additions & 4 deletions PWGLF/TableProducer/Nuspex/hyperRecoTask.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ struct hyperCandidate {
float genPhi() const { return std::atan2(gMom[1], gMom[0]); }
float genEta() const { return std::asinh(gMom[2] / genPt()); }

int v0ID;
int v0ID = -1;
int heTrackID;
int piTrackID;
float dcaV0dau = -10;
Expand Down Expand Up @@ -121,7 +121,7 @@ struct hyperCandidate {
uint32_t clusterSizeITSPi = 0u;

// collision information
unsigned int collisionID = 0;
int64_t collisionID = 0;

bool isMatter = false;
bool isSignal = false; // true MC signal
Expand All @@ -137,6 +137,7 @@ struct hyperRecoTask {
Produces<aod::DataHypCands> outputDataTable;
Produces<aod::DataHypCandsFlow> outputDataTableWithFlow;
Produces<aod::MCHypCands> outputMCTable;
Produces<aod::DataHypCandsWColl> outputDataTableWithCollID;
Service<o2::ccdb::BasicCCDBManager> ccdb;
Zorro zorro;
OutputObj<ZorroSummary> zorroSummary{"zorroSummary"};
Expand Down Expand Up @@ -409,10 +410,10 @@ struct hyperRecoTask {
hypCand.nSigmaHe3 = computeNSigmaHe3(heTrack);
hypCand.nTPCClustersHe3 = heTrack.tpcNClsFound();
hypCand.tpcSignalHe3 = heTrack.tpcSignal();
hypCand.nTPCpidClusHe3 = (int16_t)heTrack.tpcNClsFindable() - heTrack.tpcNClsFindableMinusPID();
hypCand.nTPCpidClusHe3 = static_cast<int16_t>(heTrack.tpcNClsFindable()) - heTrack.tpcNClsFindableMinusPID();
hypCand.clusterSizeITSHe3 = heTrack.itsClusterSizes();
hypCand.nTPCClustersPi = piTrack.tpcNClsFound();
hypCand.nTPCpidClusPi = (int16_t)piTrack.tpcNClsFindable() - piTrack.tpcNClsFindableMinusPID();
hypCand.nTPCpidClusPi = static_cast<int16_t>(piTrack.tpcNClsFindable()) - piTrack.tpcNClsFindableMinusPID();
hypCand.tpcSignalPi = piTrack.tpcSignal();
hypCand.tpcChi2He3 = heTrack.tpcChi2NCl();
hypCand.itsChi2He3 = heTrack.itsChi2NCl();
Expand Down Expand Up @@ -733,6 +734,34 @@ struct hyperRecoTask {
}
PROCESS_SWITCH(hyperRecoTask, processDataWithFlow, "Data analysis with flow", false);

void processDataWithCollID(CollisionsFull const& collisions, aod::V0s const& V0s, TracksFull const& tracks, aod::AmbiguousTracks const& ambiTracks, aod::BCsWithTimestamps const& bcs)
{
goodCollision.clear();
goodCollision.resize(collisions.size(), false);
hyperCandidates.clear();

selectGoodCollisions(collisions);
useCustomVertexer ? fillCustomV0s(collisions, tracks, ambiTracks, bcs) : fillV0s(collisions, tracks, V0s);

for (auto& hypCand : hyperCandidates) {
auto collision = collisions.rawIteratorAt(hypCand.collisionID);
float trackedHypClSize = !trackedClSize.empty() ? trackedClSize[hypCand.v0ID] : 0;
outputDataTableWithCollID(hypCand.collisionID, collision.centFT0A(), collision.centFT0C(), collision.centFT0M(),
collision.posX(), collision.posY(), collision.posZ(),
hypCand.isMatter,
hypCand.recoPtHe3(), hypCand.recoPhiHe3(), hypCand.recoEtaHe3(),
hypCand.recoPtPi(), hypCand.recoPhiPi(), hypCand.recoEtaPi(),
hypCand.decVtx[0], hypCand.decVtx[1], hypCand.decVtx[2],
hypCand.dcaV0dau, hypCand.he3DCAXY, hypCand.piDCAXY,
hypCand.nSigmaHe3, hypCand.nTPCClustersHe3, hypCand.nTPCClustersPi,
hypCand.nTPCpidClusHe3, hypCand.nTPCpidClusPi,
hypCand.momHe3TPC, hypCand.momPiTPC, hypCand.tpcSignalHe3, hypCand.tpcSignalPi, hypCand.tpcChi2He3, hypCand.itsChi2He3, hypCand.itsChi2Pi,
hypCand.massTOFHe3,
hypCand.clusterSizeITSHe3, hypCand.clusterSizeITSPi, hypCand.flags, trackedHypClSize);
}
}
PROCESS_SWITCH(hyperRecoTask, processDataWithCollID, "Data analysis with collision ID", false);

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)
{
filledMothers.clear();
Expand Down
Loading