diff --git a/PWGLF/DataModel/LFHypernucleiTables.h b/PWGLF/DataModel/LFHypernucleiTables.h index 026235d67bd..049b93ebb79 100644 --- a/PWGLF/DataModel/LFHypernucleiTables.h +++ b/PWGLF/DataModel/LFHypernucleiTables.h @@ -24,10 +24,23 @@ namespace o2::aod { namespace hyperrec { +DECLARE_SOA_COLUMN(CentralityFT0A, centralityFT0A, float); // centrality with FT0A estimator +DECLARE_SOA_COLUMN(CentralityFT0C, centralityFT0C, float); // centrality with FT0C estimator +DECLARE_SOA_COLUMN(CentralityFT0M, centralityFT0M, float); // centrality with FT0M estimator +DECLARE_SOA_COLUMN(QVecXFT0A, qVecXFT0A, float); // Q vector x component with FT0A estimator +DECLARE_SOA_COLUMN(QVecYFT0A, qVecYFT0A, float); // Q vector y component with FT0A estimator +DECLARE_SOA_COLUMN(QVecAmpFT0A, qVecAmpFT0A, float); // Q vector amplitude with FT0A estimator +DECLARE_SOA_COLUMN(QVecXFT0C, qVecXFT0C, float); // Q vector x component with FT0C estimator +DECLARE_SOA_COLUMN(QVecYFT0C, qVecYFT0C, float); // Q vector y component with FT0C estimator +DECLARE_SOA_COLUMN(QVecAmpFT0C, qVecAmpFT0C, float); // Q vector amplitude with FT0C estimator +DECLARE_SOA_COLUMN(QVecXFT0M, qVecXFT0M, float); // Q vector x component with FT0M estimator +DECLARE_SOA_COLUMN(QVecYFT0M, qVecYFT0M, float); // Q vector y component with FT0M estimator +DECLARE_SOA_COLUMN(QVecAmpFT0M, qVecAmpFT0M, float); // Q vector amplitude with FT0M estimator +DECLARE_SOA_COLUMN(QVecXFV0A, qVecXFV0A, float); // Q vector x component with FV0A estimator +DECLARE_SOA_COLUMN(QVecYFV0A, qVecYFV0A, float); // Q vector y component with FV0A estimator +DECLARE_SOA_COLUMN(QVecAmpFV0A, qVecAmpFV0A, float); // Q vector amplitude with FV0A estimator + DECLARE_SOA_COLUMN(IsMatter, isMatter, bool); // bool: true for matter -DECLARE_SOA_COLUMN(CentralityFT0A, centralityFT0A, float); // centrality with FT0A estimator -DECLARE_SOA_COLUMN(CentralityFT0C, centralityFT0C, float); // centrality with FT0C estimator -DECLARE_SOA_COLUMN(CentralityFT0M, centralityFT0M, float); // centrality with FT0M estimator DECLARE_SOA_COLUMN(PtHe3, ptHe3, float); // Pt of the He daughter DECLARE_SOA_COLUMN(PhiHe3, phiHe3, float); // Phi of the He daughter DECLARE_SOA_COLUMN(EtaHe3, etaHe3, float); // Eta of the He daughter @@ -67,68 +80,53 @@ DECLARE_SOA_COLUMN(IsReco, isReco, bool); // bool: tru DECLARE_SOA_COLUMN(IsSignal, isSignal, bool); // bool: true for signal } // namespace hyperrec -DECLARE_SOA_TABLE(DataHypCands, "AOD", "DATAHYPCANDS", +DECLARE_SOA_TABLE(DataHypCands, "AOD", "HYPCANDS", + o2::soa::Index<>, + 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::TPCmomHe, hyperrec::TPCmomPi, hyperrec::TPCsignalHe, hyperrec::TPCsignalPi, + hyperrec::ITSclusterSizesHe, hyperrec::ITSclusterSizesPi, + hyperrec::Flags); + +DECLARE_SOA_TABLE(DataHypCandsFlow, "AOD", "HYPCANDSFLOW", o2::soa::Index<>, + hyperrec::CentralityFT0A, hyperrec::CentralityFT0C, hyperrec::CentralityFT0M, + hyperrec::QVecXFT0A, hyperrec::QVecYFT0A, hyperrec::QVecAmpFT0A, + hyperrec::QVecXFT0C, hyperrec::QVecYFT0C, hyperrec::QVecAmpFT0C, + hyperrec::QVecXFT0M, hyperrec::QVecYFT0M, hyperrec::QVecAmpFT0M, + hyperrec::QVecXFV0A, hyperrec::QVecYFV0A, hyperrec::QVecAmpFV0A, + hyperrec::XPrimVtx, hyperrec::YPrimVtx, hyperrec::ZPrimVtx, + hyperrec::IsMatter, - hyperrec::CentralityFT0A, - hyperrec::CentralityFT0C, - hyperrec::CentralityFT0M, - hyperrec::PtHe3, - hyperrec::PhiHe3, - hyperrec::EtaHe3, - hyperrec::PtPi, - hyperrec::PhiPi, - hyperrec::EtaPi, - hyperrec::XPrimVtx, - hyperrec::YPrimVtx, - hyperrec::ZPrimVtx, - hyperrec::XDecVtx, - hyperrec::YDecVtx, - hyperrec::ZDecVtx, - hyperrec::DcaV0Daug, - hyperrec::DcaHe, - hyperrec::DcaPi, - hyperrec::NSigmaHe, - hyperrec::NTPCclusHe, - hyperrec::NTPCclusPi, - hyperrec::TPCmomHe, - hyperrec::TPCmomPi, - hyperrec::TPCsignalHe, - hyperrec::TPCsignalPi, - hyperrec::ITSclusterSizesHe, - hyperrec::ITSclusterSizesPi, + 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::TPCmomHe, hyperrec::TPCmomPi, hyperrec::TPCsignalHe, hyperrec::TPCsignalPi, + hyperrec::ITSclusterSizesHe, hyperrec::ITSclusterSizesPi, hyperrec::Flags); DECLARE_SOA_TABLE(MCHypCands, "AOD", "MCHYPCANDS", o2::soa::Index<>, + hyperrec::CentralityFT0A, hyperrec::CentralityFT0C, hyperrec::CentralityFT0M, + hyperrec::XPrimVtx, hyperrec::YPrimVtx, hyperrec::ZPrimVtx, + hyperrec::IsMatter, - hyperrec::CentralityFT0A, - hyperrec::CentralityFT0C, - hyperrec::CentralityFT0M, - hyperrec::PtHe3, - hyperrec::PhiHe3, - hyperrec::EtaHe3, - hyperrec::PtPi, - hyperrec::PhiPi, - hyperrec::EtaPi, - hyperrec::XPrimVtx, - hyperrec::YPrimVtx, - hyperrec::ZPrimVtx, - hyperrec::XDecVtx, - hyperrec::YDecVtx, - hyperrec::ZDecVtx, - hyperrec::DcaV0Daug, - hyperrec::DcaHe, - hyperrec::DcaPi, - hyperrec::NSigmaHe, - hyperrec::NTPCclusHe, - hyperrec::NTPCclusPi, - hyperrec::TPCmomHe, - hyperrec::TPCmomPi, - hyperrec::TPCsignalHe, - hyperrec::TPCsignalPi, - hyperrec::ITSclusterSizesHe, - hyperrec::ITSclusterSizesPi, + 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::TPCmomHe, hyperrec::TPCmomPi, hyperrec::TPCsignalHe, hyperrec::TPCsignalPi, + hyperrec::ITSclusterSizesHe, hyperrec::ITSclusterSizesPi, hyperrec::Flags, hyperrec::GenPt, hyperrec::GenPhi, @@ -141,6 +139,7 @@ DECLARE_SOA_TABLE(MCHypCands, "AOD", "MCHYPCANDS", hyperrec::IsSignal); using DataHypCand = DataHypCands::iterator; +using DataHypCandFlow = DataHypCandsFlow::iterator; using MCHypCand = MCHypCands::iterator; } // namespace o2::aod diff --git a/PWGLF/TableProducer/hyperRecoTask.cxx b/PWGLF/TableProducer/hyperRecoTask.cxx index c1500cc3fa2..fc3a8454346 100644 --- a/PWGLF/TableProducer/hyperRecoTask.cxx +++ b/PWGLF/TableProducer/hyperRecoTask.cxx @@ -32,6 +32,7 @@ #include "Common/Core/PID/TPCPIDResponse.h" #include "DataFormatsTPC/BetheBlochAleph.h" #include "DCAFitter/DCAFitterN.h" +#include "Common/DataModel/Qvectors.h" #include "PWGLF/DataModel/LFHypernucleiTables.h" @@ -40,6 +41,8 @@ using namespace o2::framework; using namespace o2::framework::expressions; using std::array; using TracksFull = soa::Join; +using CollisionsFull = soa::Join; +using CollisionsFullWithFlow = soa::Join; namespace { @@ -79,10 +82,6 @@ struct hyperCandidate { float momPiTPC = -10.f; std::array momHe3; std::array momPi; - std::array primVtx; - float centralityFT0A = -1; - float centralityFT0C = -1; - float centralityFT0M = -1; std::array decVtx; std::array gMom; std::array gMomHe3; @@ -103,6 +102,7 @@ struct hyperCandidate { struct hyperRecoTask { Produces outputDataTable; + Produces outputDataTableWithFlow; Produces outputMCTable; Service ccdb; @@ -148,6 +148,8 @@ struct hyperRecoTask { // std vector of candidates std::vector hyperCandidates; + // vector to keep track of MC mothers already filled + std::vector filledMothers; Preslice perCollision = o2::aod::v0::collisionId; @@ -249,16 +251,16 @@ struct hyperRecoTask { mRunNumber = bc.runNumber(); } - template - void fillCandidateData(soa::Join::iterator const& collision, aod::V0s const& V0s) + template + void fillCandidateData(Tcoll const& collision, aod::V0s const& V0s) { if (mBBparamsHe[5] < 0) { LOG(fatal) << "Bethe-Bloch parameters for He3 not set, please check your CCDB and configuration"; } for (auto& v0 : V0s) { - auto posTrack = v0.posTrack_as(); - auto negTrack = v0.negTrack_as(); + auto posTrack = v0.posTrack_as(); + auto negTrack = v0.negTrack_as(); if (std::abs(posTrack.eta()) > etaMax || std::abs(negTrack.eta()) > etaMax) continue; @@ -320,7 +322,7 @@ struct hyperRecoTask { hePropTrack.getPxPyPzGlo(hypCand.momHe3); piPropTrack.getPxPyPzGlo(hypCand.momPi); - // he momentum has to be multiplied by 2 (charge) + // the momentum has to be multiplied by 2 (charge) for (int i = 0; i < 3; i++) { hypCand.momHe3[i] *= 2; } @@ -333,10 +335,6 @@ struct hyperRecoTask { float h3lE = he3E + piE; float h4lE = he4E + piE; - hypCand.primVtx = array{collision.posX(), collision.posY(), collision.posZ()}; - hypCand.centralityFT0A = collision.centFT0A(); - hypCand.centralityFT0C = collision.centFT0C(); - hypCand.centralityFT0M = collision.centFT0M(); std::array hypMom; const auto& vtx = fitter.getPCACandidate(); for (int i = 0; i < 3; i++) { @@ -359,13 +357,15 @@ struct hyperRecoTask { continue; } - double cosPA = RecoDecay::cpa(hypCand.primVtx, array{hypCand.decVtx[0], hypCand.decVtx[1], hypCand.decVtx[2]}, array{hypMom[0], hypMom[1], hypMom[2]}); + std::array primVtx = {collision.posX(), collision.posY(), collision.posZ()}; + + double cosPA = RecoDecay::cpa(primVtx, hypCand.decVtx, hypMom); if (cosPA < v0cospa) { continue; } for (int i = 0; i < 3; i++) { - hypCand.decVtx[i] = hypCand.decVtx[i] - hypCand.primVtx[i]; + hypCand.decVtx[i] = hypCand.decVtx[i] - primVtx[i]; } // if survived all selections, propagate decay daughters to PV @@ -393,7 +393,6 @@ struct hyperRecoTask { void fillMCinfo(aod::McTrackLabels const& trackLabels, aod::McParticles const& particlesMC) { - std::vector filledMothers; for (auto& hypCand : hyperCandidates) { auto mcLabPos = trackLabels.rawIteratorAt(hypCand.posTrackID); auto mcLabNeg = trackLabels.rawIteratorAt(hypCand.negTrackID); @@ -426,61 +425,56 @@ struct hyperRecoTask { } } } + } - for (auto& mcPart : particlesMC) { + void processData(CollisionsFull const& collisions, aod::V0s const& V0s, TracksFull const& tracks, aod::BCsWithTimestamps const&) + { - if (std::abs(mcPart.pdgCode()) != hyperPdg) - continue; - std::array secVtx; - std::array primVtx = {mcPart.vx(), mcPart.vy(), mcPart.vz()}; - std::array momMother = {mcPart.px(), mcPart.py(), mcPart.pz()}; - std::array momHe3; - bool isHeFound = false; - for (auto& mcDaught : mcPart.daughters_as()) { - if (std::abs(mcDaught.pdgCode()) == heDauPdg) { - secVtx = {mcDaught.vx(), mcDaught.vy(), mcDaught.vz()}; - momHe3 = {mcDaught.px(), mcDaught.py(), mcDaught.pz()}; - isHeFound = true; - break; - } - } - if (mcPart.pdgCode() > 0) { - hIsMatterGen->Fill(0.); - } else { - hIsMatterGen->Fill(1.); - } - if (!isHeFound) { - hDecayChannel->Fill(1.); + for (const auto& collision : collisions) { + hyperCandidates.clear(); + + auto bc = collision.bc_as(); + initCCDB(bc); + + hEvents->Fill(0.); + if (!collision.sel8()) continue; - } - hDecayChannel->Fill(0.); - if (mcPart.pdgCode() > 0) { - hIsMatterGenTwoBody->Fill(0.); - } else { - hIsMatterGenTwoBody->Fill(1.); - } - if (std::find(filledMothers.begin(), filledMothers.end(), mcPart.globalIndex()) != std::end(filledMothers)) { + + hEvents->Fill(1.); + + if (std::abs(collision.posZ()) > 10.f) continue; + + hEvents->Fill(2.); + hZvtx->Fill(collision.posZ()); + + const uint64_t collIdx = collision.globalIndex(); + auto V0Table_thisCollision = V0s.sliceBy(perCollision, collIdx); + V0Table_thisCollision.bindExternalIndices(&tracks); + + fillCandidateData(collision, V0Table_thisCollision); + + for (auto& hypCand : hyperCandidates) { + outputDataTable(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.momHe3TPC, hypCand.momPiTPC, hypCand.tpcSignalHe3, hypCand.tpcSignalPi, + hypCand.clusterSizeITSHe3, hypCand.clusterSizeITSPi, hypCand.flags); } - hyperCandidate hypCand; - for (int i = 0; i < 3; i++) { - hypCand.gDecVtx[i] = secVtx[i] - primVtx[i]; - hypCand.gMom[i] = momMother[i]; - hypCand.gMomHe3[i] = momHe3[i]; - } - hypCand.posTrackID = -1; - hypCand.negTrackID = -1; - hypCand.isSignal = true; - hypCand.pdgCode = mcPart.pdgCode(); - hyperCandidates.push_back(hypCand); } } + PROCESS_SWITCH(hyperRecoTask, processData, "Data analysis", true); - void processData(soa::Join const& collisions, aod::V0s const& V0s, TracksFull const& tracks, aod::BCsWithTimestamps const&) + void processDataWithFlow(CollisionsFullWithFlow const& collisions, aod::V0s const& V0s, TracksFull const& tracks, aod::BCsWithTimestamps const&) { - hyperCandidates.clear(); for (const auto& collision : collisions) { + hyperCandidates.clear(); auto bc = collision.bc_as(); initCCDB(bc); @@ -501,32 +495,33 @@ struct hyperRecoTask { auto V0Table_thisCollision = V0s.sliceBy(perCollision, collIdx); V0Table_thisCollision.bindExternalIndices(&tracks); - fillCandidateData(collision, V0Table_thisCollision); - } - - for (auto& hypCand : hyperCandidates) { - outputDataTable(hypCand.isMatter, - hypCand.centralityFT0A, - hypCand.centralityFT0C, - hypCand.centralityFT0M, - hypCand.recoPtHe3(), hypCand.recoPhiHe3(), hypCand.recoEtaHe3(), - hypCand.recoPtPi(), hypCand.recoPhiPi(), hypCand.recoEtaPi(), - hypCand.primVtx[0], hypCand.primVtx[1], hypCand.primVtx[2], - hypCand.decVtx[0], hypCand.decVtx[1], hypCand.decVtx[2], - hypCand.dcaV0dau, hypCand.he3DCAXY, hypCand.piDCAXY, - hypCand.nSigmaHe3, hypCand.nTPCClustersHe3, hypCand.nTPCClustersPi, - hypCand.momHe3TPC, hypCand.momPiTPC, hypCand.tpcSignalHe3, hypCand.tpcSignalPi, - hypCand.clusterSizeITSHe3, hypCand.clusterSizeITSPi, hypCand.flags); + fillCandidateData(collision, V0Table_thisCollision); + + for (auto& hypCand : hyperCandidates) { + outputDataTableWithFlow(collision.centFT0A(), collision.centFT0C(), collision.centFT0M(), + collision.qvecFT0ARe(), collision.qvecFT0AIm(), collision.sumAmplFT0A(), + collision.qvecFT0CRe(), collision.qvecFT0CIm(), collision.sumAmplFT0C(), + collision.qvecFT0MRe(), collision.qvecFT0MIm(), collision.sumAmplFT0M(), + collision.qvecFV0ARe(), collision.qvecFV0AIm(), collision.sumAmplFV0A(), + 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.momHe3TPC, hypCand.momPiTPC, hypCand.tpcSignalHe3, hypCand.tpcSignalPi, + hypCand.clusterSizeITSHe3, hypCand.clusterSizeITSPi, hypCand.flags); + } } } - PROCESS_SWITCH(hyperRecoTask, processData, "Data analysis", true); + PROCESS_SWITCH(hyperRecoTask, processDataWithFlow, "Data analysis with flow", false); - void processMC(soa::Join const& collisions, aod::V0s const& V0s, TracksFull const& tracks, aod::BCsWithTimestamps const&, aod::McTrackLabels const& trackLabelsMC, aod::McParticles const& particlesMC) + void processMC(CollisionsFull const& collisions, aod::V0s const& V0s, TracksFull const& tracks, aod::BCsWithTimestamps const&, aod::McTrackLabels const& trackLabelsMC, aod::McParticles const& particlesMC) { - hyperCandidates.clear(); for (const auto& collision : collisions) { - + hyperCandidates.clear(); auto bc = collision.bc_as(); initCCDB(bc); @@ -543,26 +538,85 @@ struct hyperRecoTask { auto V0Table_thisCollision = V0s.sliceBy(perCollision, collIdx); V0Table_thisCollision.bindExternalIndices(&tracks); - fillCandidateData(collision, V0Table_thisCollision); + fillCandidateData(collision, V0Table_thisCollision); + fillMCinfo(trackLabelsMC, particlesMC); + + for (auto& hypCand : hyperCandidates) { + if (!hypCand.isSignal && mcSignalOnly) + continue; + int chargeFactor = -1 + 2 * (hypCand.pdgCode > 0); + outputMCTable(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.momHe3TPC, hypCand.momPiTPC, hypCand.tpcSignalHe3, hypCand.tpcSignalPi, + hypCand.clusterSizeITSHe3, hypCand.clusterSizeITSPi, hypCand.flags, + chargeFactor * hypCand.genPt(), hypCand.genPhi(), hypCand.genEta(), hypCand.genPtHe3(), + hypCand.gDecVtx[0], hypCand.gDecVtx[1], hypCand.gDecVtx[2], hypCand.isReco, hypCand.isSignal); + } } - fillMCinfo(trackLabelsMC, particlesMC); - for (auto& hypCand : hyperCandidates) { - if (!hypCand.isSignal && mcSignalOnly) + // now we fill only the signal candidates that were not reconstructed + for (auto& mcPart : particlesMC) { + + if (std::abs(mcPart.pdgCode()) != hyperPdg) continue; + std::array secVtx; + std::array primVtx = {mcPart.vx(), mcPart.vy(), mcPart.vz()}; + std::array momMother = {mcPart.px(), mcPart.py(), mcPart.pz()}; + std::array momHe3; + bool isHeFound = false; + for (auto& mcDaught : mcPart.daughters_as()) { + if (std::abs(mcDaught.pdgCode()) == heDauPdg) { + secVtx = {mcDaught.vx(), mcDaught.vy(), mcDaught.vz()}; + momHe3 = {mcDaught.px(), mcDaught.py(), mcDaught.pz()}; + isHeFound = true; + break; + } + } + if (mcPart.pdgCode() > 0) { + hIsMatterGen->Fill(0.); + } else { + hIsMatterGen->Fill(1.); + } + if (!isHeFound) { + hDecayChannel->Fill(1.); + continue; + } + hDecayChannel->Fill(0.); + if (mcPart.pdgCode() > 0) { + hIsMatterGenTwoBody->Fill(0.); + } else { + hIsMatterGenTwoBody->Fill(1.); + } + if (std::find(filledMothers.begin(), filledMothers.end(), mcPart.globalIndex()) != std::end(filledMothers)) { + continue; + } + hyperCandidate hypCand; int chargeFactor = -1 + 2 * (hypCand.pdgCode > 0); - outputMCTable(hypCand.isMatter, - hypCand.centralityFT0A, - hypCand.centralityFT0C, - hypCand.centralityFT0M, - hypCand.recoPtHe3(), hypCand.recoPhiHe3(), hypCand.recoEtaHe3(), - hypCand.recoPtPi(), hypCand.recoPhiPi(), hypCand.recoEtaPi(), - hypCand.primVtx[0], hypCand.primVtx[1], hypCand.primVtx[2], - hypCand.decVtx[0], hypCand.decVtx[1], hypCand.decVtx[2], - hypCand.dcaV0dau, hypCand.he3DCAXY, hypCand.piDCAXY, - hypCand.nSigmaHe3, hypCand.nTPCClustersHe3, hypCand.nTPCClustersPi, - hypCand.momHe3TPC, hypCand.momPiTPC, hypCand.tpcSignalHe3, hypCand.tpcSignalPi, - hypCand.clusterSizeITSHe3, hypCand.clusterSizeITSPi, hypCand.flags, + for (int i = 0; i < 3; i++) { + hypCand.gDecVtx[i] = secVtx[i] - primVtx[i]; + hypCand.gMom[i] = momMother[i]; + hypCand.gMomHe3[i] = momHe3[i]; + } + hypCand.posTrackID = -1; + hypCand.negTrackID = -1; + hypCand.isSignal = true; + hypCand.pdgCode = mcPart.pdgCode(); + outputMCTable(-1, -1, -1, + 0, + -1, -1, -1, + -1, -1, -1, + -1, -1, -1, + -1, -1, -1, + -1, -1, -1, + -1, -1, -1, + -1, -1, -1, -1, + -1, -1, -1, chargeFactor * hypCand.genPt(), hypCand.genPhi(), hypCand.genEta(), hypCand.genPtHe3(), hypCand.gDecVtx[0], hypCand.gDecVtx[1], hypCand.gDecVtx[2], hypCand.isReco, hypCand.isSignal); }