diff --git a/PWGLF/DataModel/LFHyperNucleiKinkTables.h b/PWGLF/DataModel/LFHyperNucleiKinkTables.h new file mode 100644 index 00000000000..797a1d3c109 --- /dev/null +++ b/PWGLF/DataModel/LFHyperNucleiKinkTables.h @@ -0,0 +1,120 @@ +// Copyright 2019-2020 CERN and copyright holders of ALICE O2. +// See https://alice-o2.web.cern.ch/copyright for details of the copyright holders. +// All rights not expressly granted are reserved. +// +// This software is distributed under the terms of the GNU General Public +// License v3 (GPL Version 3), copied verbatim in the file "COPYING". +// +// In applying this license CERN does not waive the privileges and immunities +// granted to it by virtue of its status as an Intergovernmental Organization +// or submit itself to any jurisdiction. +// +/// \file LFHyperNucleiKinkTables.h +/// \brief Slim hypernuclei kink tables +/// \author Yuanzhe Wang + +#include "Framework/ASoAHelpers.h" +#include "Framework/AnalysisDataModel.h" + +#ifndef PWGLF_DATAMODEL_LFHYPERNUCLEIKINKTABLES_H_ +#define PWGLF_DATAMODEL_LFHYPERNUCLEIKINKTABLES_H_ + +namespace o2::aod +{ + +namespace hyperkink +{ +DECLARE_SOA_COLUMN(XPV, xPV, float); //! Primary vertex of the candidate (x direction) +DECLARE_SOA_COLUMN(YPV, yPV, float); //! Primary vertex of the candidate (y direction) +DECLARE_SOA_COLUMN(ZPV, zPV, float); //! Primary vertex of the candidate (z direction) +DECLARE_SOA_COLUMN(XSV, xSV, float); //! Decay vertex of the candidate (x direction) +DECLARE_SOA_COLUMN(YSV, ySV, float); //! Decay vertex of the candidate (y direction) +DECLARE_SOA_COLUMN(ZSV, zSV, float); //! Decay vertex of the candidate (z direction) +DECLARE_SOA_COLUMN(XMothIU, xMothIU, float); //! X of the mother track at the radii of ITS layer which has the outermost update +DECLARE_SOA_COLUMN(YMothIU, yMothIU, float); //! Y of the mother track at the radii of ITS layer which has the outermost update +DECLARE_SOA_COLUMN(ZMothIU, zMothIU, float); //! Z of the mother track at the radii of ITS layer which has the outermost update +DECLARE_SOA_COLUMN(PxMothSV, pxMothSV, float); //! Px of the mother track at the decay vertex +DECLARE_SOA_COLUMN(PyMothSV, pyMothSV, float); //! Py of the mother track at the decay vertex +DECLARE_SOA_COLUMN(PzMothSV, pzMothSV, float); //! Pz of the mother track at the decay vertex +DECLARE_SOA_COLUMN(RefitPxMothPV, refitPxMothPV, float); //! Refit Px of the mother track at the primary vertex +DECLARE_SOA_COLUMN(RefitPyMothPV, refitPyMothPV, float); //! Refit Py of the mother track at the primary vertex +DECLARE_SOA_COLUMN(RefitPzMothPV, refitPzMothPV, float); //! Refit Pz of the mother track at the primary vertex +DECLARE_SOA_COLUMN(RefitPxMothSV, refitPxMothSV, float); //! Refit Px of the mother track at the decay vertex +DECLARE_SOA_COLUMN(RefitPyMothSV, refitPyMothSV, float); //! Refit Py of the mother track at the decay vertex +DECLARE_SOA_COLUMN(RefitPzMothSV, refitPzMothSV, float); //! Refit Pz of the mother track at the decay vertex +DECLARE_SOA_COLUMN(PxDaugSV, pxDaugSV, float); //! Px of the daughter track at the decay vertex +DECLARE_SOA_COLUMN(PyDaugSV, pyDaugSV, float); //! Py of the daughter track at the decay vertex +DECLARE_SOA_COLUMN(PzDaugSV, pzDaugSV, float); //! Pz of the daughter track at the decay vertex +DECLARE_SOA_COLUMN(IsMatter, isMatter, bool); //! bool: true for matter +DECLARE_SOA_COLUMN(DcaMothPv, dcaMothPv, float); //! DCA of the mother to the primary vertex +DECLARE_SOA_COLUMN(DcaDaugPv, dcaDaugPv, float); //! DCA of the daughter kink to the primary vertex +DECLARE_SOA_COLUMN(DcaKinkTopo, dcaKinkTopo, float); //! DCA of the kink topology +DECLARE_SOA_COLUMN(ItsChi2Moth, itsChi2Moth, float); //! ITS chi2 of the mother track +DECLARE_SOA_COLUMN(ItsClusterSizesMoth, itsClusterSizesMoth, uint32_t); //! ITS cluster size of the mother track +DECLARE_SOA_COLUMN(ItsClusterSizesDaug, itsClusterSizesDaug, uint32_t); //! ITS cluster size of the daughter track +DECLARE_SOA_COLUMN(NSigmaTPCDaug, nSigmaTPCDaug, float); //! Number of tpc sigmas of the daughter track +DECLARE_SOA_COLUMN(NSigmaITSDaug, nSigmaITSDaug, float); //! Number of ITS sigmas of the daughter track + +DECLARE_SOA_COLUMN(IsSignal, isSignal, bool); //! bool: true for hyperhelium4signal +DECLARE_SOA_COLUMN(IsSignalReco, isSignalReco, bool); //! bool: true if the signal is reconstructed +DECLARE_SOA_COLUMN(IsCollReco, isCollReco, bool); //! bool: true if the collision is reconstructed +DECLARE_SOA_COLUMN(IsSurvEvSelection, isSurvEvSelection, bool); //! bool: true for the collision passed the event selection +DECLARE_SOA_COLUMN(TrueXSV, trueXSV, float); //! true x decay vertex +DECLARE_SOA_COLUMN(TrueYSV, trueYSV, float); //! true y decay vertex +DECLARE_SOA_COLUMN(TrueZSV, trueZSV, float); //! true z decay vertex +DECLARE_SOA_COLUMN(TruePxMothPV, truePxMothPV, float); //! Generated px of the mother track +DECLARE_SOA_COLUMN(TruePyMothPV, truePyMothPV, float); //! Generated py of the mother track +DECLARE_SOA_COLUMN(TruePzMothPV, truePzMothPV, float); //! Generated pz of the mother track +DECLARE_SOA_COLUMN(TruePxMothSV, truePxMothSV, float); //! true px of the mother track at the decay vertex +DECLARE_SOA_COLUMN(TruePyMothSV, truePyMothSV, float); //! true py of the mother track at the decay vertex +DECLARE_SOA_COLUMN(TruePzMothSV, truePzMothSV, float); //! true pz of the mother track at the decay vertex +DECLARE_SOA_COLUMN(TruePxDaugSV, truePxDaugSV, float); //! true px of the daughter track at the decay vertex +DECLARE_SOA_COLUMN(TruePyDaugSV, truePyDaugSV, float); //! true py of the daughter track at the decay vertex +DECLARE_SOA_COLUMN(TruePzDaugSV, truePzDaugSV, float); //! true pz of the daughter track at the decay vertex +DECLARE_SOA_COLUMN(IsMothReco, isMothReco, bool); //! bool: true if the mother track is reconstructed +DECLARE_SOA_COLUMN(PxMothPV, pxMothPV, float); //! reconstructed px of the mother track at the primary vertex +DECLARE_SOA_COLUMN(PyMothPV, pyMothPV, float); //! reconstructed py of the mother track at the primary vertex +DECLARE_SOA_COLUMN(PzMothPV, pzMothPV, float); //! reconstructed pz of the mother track at the primary vertex +DECLARE_SOA_COLUMN(UpdatePxMothPV, updatePxMothPV, float); //! updated px of the mother track at the primary vertex after update using PV +DECLARE_SOA_COLUMN(UpdatePyMothPV, updatePyMothPV, float); //! updated py of the mother track at the primary vertex after update using PV +DECLARE_SOA_COLUMN(UpdatePzMothPV, updatePzMothPV, float); //! updated pz of the mother track at the primary vertex after update using PV +} // namespace hyperkink + +DECLARE_SOA_TABLE(HypKinkCand, "AOD", "HYPKINKCANDS", + o2::soa::Index<>, + hyperkink::XPV, hyperkink::YPV, hyperkink::ZPV, + hyperkink::XSV, hyperkink::YSV, hyperkink::ZSV, + hyperkink::IsMatter, + hyperkink::XMothIU, hyperkink::YMothIU, hyperkink::ZMothIU, + hyperkink::PxMothSV, hyperkink::PyMothSV, hyperkink::PzMothSV, + hyperkink::RefitPxMothPV, hyperkink::RefitPyMothPV, hyperkink::RefitPzMothPV, + hyperkink::RefitPxMothSV, hyperkink::RefitPyMothSV, hyperkink::RefitPzMothSV, + hyperkink::PxDaugSV, hyperkink::PyDaugSV, hyperkink::PzDaugSV, + hyperkink::DcaMothPv, hyperkink::DcaDaugPv, hyperkink::DcaKinkTopo, + hyperkink::ItsChi2Moth, hyperkink::ItsClusterSizesMoth, hyperkink::ItsClusterSizesDaug, + hyperkink::NSigmaTPCDaug, hyperkink::NSigmaITSDaug); + +DECLARE_SOA_TABLE(MCHypKinkCand, "AOD", "MCHYPKINKCANDS", + o2::soa::Index<>, + hyperkink::XPV, hyperkink::YPV, hyperkink::ZPV, + hyperkink::XSV, hyperkink::YSV, hyperkink::ZSV, + hyperkink::IsMatter, + hyperkink::XMothIU, hyperkink::YMothIU, hyperkink::ZMothIU, + hyperkink::PxMothSV, hyperkink::PyMothSV, hyperkink::PzMothSV, + hyperkink::RefitPxMothPV, hyperkink::RefitPyMothPV, hyperkink::RefitPzMothPV, + hyperkink::RefitPxMothSV, hyperkink::RefitPyMothSV, hyperkink::RefitPzMothSV, + hyperkink::PxDaugSV, hyperkink::PyDaugSV, hyperkink::PzDaugSV, + hyperkink::DcaMothPv, hyperkink::DcaDaugPv, hyperkink::DcaKinkTopo, + hyperkink::ItsChi2Moth, hyperkink::ItsClusterSizesMoth, hyperkink::ItsClusterSizesDaug, + hyperkink::NSigmaTPCDaug, hyperkink::NSigmaITSDaug, + hyperkink::IsSignal, hyperkink::IsSignalReco, hyperkink::IsCollReco, hyperkink::IsSurvEvSelection, + hyperkink::TrueXSV, hyperkink::TrueYSV, hyperkink::TrueZSV, + hyperkink::TruePxMothPV, hyperkink::TruePyMothPV, hyperkink::TruePzMothPV, + hyperkink::TruePxMothSV, hyperkink::TruePyMothSV, hyperkink::TruePzMothSV, + hyperkink::TruePxDaugSV, hyperkink::TruePyDaugSV, hyperkink::TruePzDaugSV, + hyperkink::IsMothReco, hyperkink::PxMothPV, hyperkink::PyMothPV, hyperkink::PzMothPV, + hyperkink::UpdatePxMothPV, hyperkink::UpdatePyMothPV, hyperkink::UpdatePzMothPV); + +} // namespace o2::aod + +#endif // PWGLF_DATAMODEL_LFHYPERNUCLEIKINKTABLES_H_ diff --git a/PWGLF/DataModel/LFHyperhelium4sigmaTables.h b/PWGLF/DataModel/LFHyperhelium4sigmaTables.h deleted file mode 100644 index 3d083f446d5..00000000000 --- a/PWGLF/DataModel/LFHyperhelium4sigmaTables.h +++ /dev/null @@ -1,110 +0,0 @@ -// Copyright 2019-2020 CERN and copyright holders of ALICE O2. -// See https://alice-o2.web.cern.ch/copyright for details of the copyright holders. -// All rights not expressly granted are reserved. -// -// This software is distributed under the terms of the GNU General Public -// License v3 (GPL Version 3), copied verbatim in the file "COPYING". -// -// In applying this license CERN does not waive the privileges and immunities -// granted to it by virtue of its status as an Intergovernmental Organization -// or submit itself to any jurisdiction. -// -/// \file LFHyperhelium4sigmaTables.h -/// \brief Slim hyperhelium4sigma tables -/// \author Yuanzhe Wang - -#include "Framework/ASoAHelpers.h" -#include "Framework/AnalysisDataModel.h" - -#ifndef PWGLF_DATAMODEL_LFHYPERHELIUM4SIGMATABLES_H_ -#define PWGLF_DATAMODEL_LFHYPERHELIUM4SIGMATABLES_H_ - -namespace o2::aod -{ - -namespace he4scand -{ -DECLARE_SOA_COLUMN(XPrimVtx, xPrimVtx, float); // Primary vertex of the candidate (x direction) -DECLARE_SOA_COLUMN(YPrimVtx, yPrimVtx, float); // Primary vertex of the candidate (y direction) -DECLARE_SOA_COLUMN(ZPrimVtx, zPrimVtx, float); // Primary vertex of the candidate (z direction) -DECLARE_SOA_COLUMN(XDecVtx, xDecVtx, float); // Decay vertex of the candidate (x direction) -DECLARE_SOA_COLUMN(YDecVtx, yDecVtx, float); // Decay vertex of the candidate (y direction) -DECLARE_SOA_COLUMN(ZDecVtx, zDecVtx, float); // Decay vertex of the candidate (z direction) -DECLARE_SOA_COLUMN(XMoth, xMoth, float); // X of the mother track at the radii of ITS layer which has the outermost update -DECLARE_SOA_COLUMN(YMoth, yMoth, float); // Y of the mother track at the radii of ITS layer which has the outermost update -DECLARE_SOA_COLUMN(ZMoth, zMoth, float); // Z of the mother track at the radii of ITS layer which has the outermost update -DECLARE_SOA_COLUMN(PxMoth, pxMoth, float); //! Px of the mother track at the decay vertex -DECLARE_SOA_COLUMN(PyMoth, pyMoth, float); //! Py of the mother track at the decay vertex -DECLARE_SOA_COLUMN(PzMoth, pzMoth, float); //! Pz of the mother track at the decay vertex -DECLARE_SOA_COLUMN(RefitPxMoth, refitPxMoth, float); //! Refit Px of the mother track at the decay vertex -DECLARE_SOA_COLUMN(RefitPyMoth, refitPyMoth, float); //! Refit Py of the mother track at the decay vertex -DECLARE_SOA_COLUMN(RefitPzMoth, refitPzMoth, float); //! Refit Pz of the mother track at the decay vertex -DECLARE_SOA_COLUMN(PxAlpha, pxAlpha, float); //! Px of the daughter alpha track at the decay vertex -DECLARE_SOA_COLUMN(PyAlpha, pyAlpha, float); //! Py of the daughter alpha track at the decay vertex -DECLARE_SOA_COLUMN(PzAlpha, pzAlpha, float); //! Pz of the daughter alpha track at the decay vertex -DECLARE_SOA_COLUMN(IsMatter, isMatter, bool); // bool: true for matter -DECLARE_SOA_COLUMN(DcaMothPv, dcaMothPv, float); //! DCA of the mother to the primary vertex -DECLARE_SOA_COLUMN(DcaAlphaPv, dcaAlphaPv, float); //! DCA of the daughter kink to the primary vertex -DECLARE_SOA_COLUMN(DcaKinkTopo, dcaKinkTopo, float); //! DCA of the kink topology -DECLARE_SOA_COLUMN(ItsChi2Moth, itsChi2Moth, float); // ITS chi2 of the mother track -DECLARE_SOA_COLUMN(ItsClusterSizesMoth, itsClusterSizesMoth, uint32_t); // ITS cluster size of the mother track -DECLARE_SOA_COLUMN(ItsClusterSizesAlpha, itsClusterSizesAlpha, uint32_t); // ITS cluster size of the daughter alpha track -DECLARE_SOA_COLUMN(NSigmaTPCAlpha, nSigmaTPCAlpha, float); // Number of tpc sigmas of the daughter alpha track -DECLARE_SOA_COLUMN(NSigmaITSAlpha, nSigmaITSAlpha, float); // Number of ITS sigmas of the daughter alpha track - -DECLARE_SOA_COLUMN(IsSignal, isSignal, bool); // bool: true for hyperhelium4signal -DECLARE_SOA_COLUMN(IsSignalReco, isSignalReco, bool); // bool: true if the signal is reconstructed -DECLARE_SOA_COLUMN(IsCollReco, isCollReco, bool); // bool: true if the collision is reconstructed -DECLARE_SOA_COLUMN(IsSurvEvSelection, isSurvEvSelection, bool); // bool: true for the collision passed the event selection -DECLARE_SOA_COLUMN(TrueXDecVtx, trueXDecVtx, float); // true x decay vertex -DECLARE_SOA_COLUMN(TrueYDecVtx, trueYDecVtx, float); // true y decay vertex -DECLARE_SOA_COLUMN(TrueZDecVtx, trueZDecVtx, float); // true z decay vertex -DECLARE_SOA_COLUMN(GenPxMoth, genPxMoth, float); // Generated px of the mother track -DECLARE_SOA_COLUMN(GenPyMoth, genPyMoth, float); // Generated py of the mother track -DECLARE_SOA_COLUMN(GenPzMoth, genPzMoth, float); // Generated pz of the mother track -DECLARE_SOA_COLUMN(TruePxMoth, truePxMoth, float); // true px of the mother track at the decay vertex -DECLARE_SOA_COLUMN(TruePyMoth, truePyMoth, float); // true py of the mother track at the decay vertex -DECLARE_SOA_COLUMN(TruePzMoth, truePzMoth, float); // true pz of the mother track at the decay vertex -DECLARE_SOA_COLUMN(GenPxAlpha, genPxAlpha, float); // true px of the daughter alpha track -DECLARE_SOA_COLUMN(GenPyAlpha, genPyAlpha, float); // true py of the daughter alpha track -DECLARE_SOA_COLUMN(GenPzAlpha, genPzAlpha, float); // true pz of the daughter alpha track -DECLARE_SOA_COLUMN(IsMothReco, isMothReco, bool); // bool: true if the mother track is reconstructed -DECLARE_SOA_COLUMN(RecoPtMoth, recoPtMoth, float); // reconstructed pt of the mother track -DECLARE_SOA_COLUMN(RecoPzMoth, recoPzMoth, float); // reconstructed pz of the mother track -} // namespace he4scand - -DECLARE_SOA_TABLE(He4S2BCands, "AOD", "HE4S2BCANDS", - o2::soa::Index<>, - he4scand::XPrimVtx, he4scand::YPrimVtx, he4scand::ZPrimVtx, - he4scand::XDecVtx, he4scand::YDecVtx, he4scand::ZDecVtx, - he4scand::IsMatter, - he4scand::XMoth, he4scand::YMoth, he4scand::ZMoth, - he4scand::PxMoth, he4scand::PyMoth, he4scand::PzMoth, - he4scand::RefitPxMoth, he4scand::RefitPyMoth, he4scand::RefitPzMoth, - he4scand::PxAlpha, he4scand::PyAlpha, he4scand::PzAlpha, - he4scand::DcaMothPv, he4scand::DcaAlphaPv, he4scand::DcaKinkTopo, - he4scand::ItsChi2Moth, he4scand::ItsClusterSizesMoth, he4scand::ItsClusterSizesAlpha, - he4scand::NSigmaTPCAlpha, he4scand::NSigmaITSAlpha); - -DECLARE_SOA_TABLE(MCHe4S2BCands, "AOD", "MCHE4S2BCANDS", - o2::soa::Index<>, - he4scand::XPrimVtx, he4scand::YPrimVtx, he4scand::ZPrimVtx, - he4scand::XDecVtx, he4scand::YDecVtx, he4scand::ZDecVtx, - he4scand::IsMatter, - he4scand::XMoth, he4scand::YMoth, he4scand::ZMoth, - he4scand::PxMoth, he4scand::PyMoth, he4scand::PzMoth, - he4scand::RefitPxMoth, he4scand::RefitPyMoth, he4scand::RefitPzMoth, - he4scand::PxAlpha, he4scand::PyAlpha, he4scand::PzAlpha, - he4scand::DcaMothPv, he4scand::DcaAlphaPv, he4scand::DcaKinkTopo, - he4scand::ItsChi2Moth, he4scand::ItsClusterSizesMoth, he4scand::ItsClusterSizesAlpha, - he4scand::NSigmaTPCAlpha, he4scand::NSigmaITSAlpha, - he4scand::IsSignal, he4scand::IsSignalReco, he4scand::IsCollReco, he4scand::IsSurvEvSelection, - he4scand::TrueXDecVtx, he4scand::TrueYDecVtx, he4scand::TrueZDecVtx, - he4scand::GenPxMoth, he4scand::GenPyMoth, he4scand::GenPzMoth, - he4scand::TruePxMoth, he4scand::TruePyMoth, he4scand::TruePzMoth, - he4scand::GenPxAlpha, he4scand::GenPyAlpha, he4scand::GenPzAlpha, - he4scand::IsMothReco, he4scand::RecoPtMoth, he4scand::RecoPzMoth); - -} // namespace o2::aod - -#endif // PWGLF_DATAMODEL_LFHYPERHELIUM4SIGMATABLES_H_ diff --git a/PWGLF/TableProducer/Nuspex/hyperhelium4sigmaRecoTask.cxx b/PWGLF/TableProducer/Nuspex/hyperhelium4sigmaRecoTask.cxx index bf6ca1a6203..300fe513e8e 100644 --- a/PWGLF/TableProducer/Nuspex/hyperhelium4sigmaRecoTask.cxx +++ b/PWGLF/TableProducer/Nuspex/hyperhelium4sigmaRecoTask.cxx @@ -10,10 +10,10 @@ // or submit itself to any jurisdiction. // /// \file hyperhelium4sigmaRecoTask.cxx -/// \brief QA and analysis task for hyper-helium4sigma (He4S) +/// \brief QA and analysis task for hyper-helium4sigma (HyperHe4S) /// \author Yuanzhe Wang -#include "PWGLF/DataModel/LFHyperhelium4sigmaTables.h" +#include "PWGLF/DataModel/LFHyperNucleiKinkTables.h" #include "PWGLF/DataModel/LFKinkDecayTables.h" #include "Common/Core/RecoDecay.h" @@ -56,14 +56,14 @@ enum Channel { }; enum DaughterType { - kDauAlpha = 0, - kDauTriton, - kDauProton, - kDauChargedPion, - kDauNeutron, - kDauPion0, + kDaugAlpha = 0, + kDaugTriton, + kDaugProton, + kDaugChargedPion, + kDaugNeutron, + kDaugPion0, kNDaughterType, - kNChargedDaughterType = kDauNeutron + kNChargedDaughterType = kDaugNeutron }; namespace @@ -72,7 +72,7 @@ constexpr std::array LayerRadii{2.33959f, 3.14076f, 3.91924f, 19.6213f constexpr int kITSLayers = 7; constexpr int kITSInnerBarrelLayers = 3; // constexpr int kITSOuterBarrelLayers = 4; -constexpr std::array kDaughterPDG = { +constexpr std::array kDaugghterPDG = { o2::constants::physics::Pdg::kAlpha, o2::constants::physics::Pdg::kTriton, PDG_t::kProton, @@ -82,12 +82,12 @@ constexpr std::array kDaughterPDG = { const std::array covPosSV{6.4462712107237135f, 0.1309793068144521f, 6.626654155592929f, -0.4510297694023185f, 0.16996629627762413f, 4.109195981415627f}; -std::shared_ptr hMotherCounter; -std::shared_ptr hMother2BCounter; -std::shared_ptr hDauCounter[kNChargedDaughterType]; -std::shared_ptr hDauTPCNSigma[kNChargedDaughterType]; -std::shared_ptr hRecoMotherCounter; -std::shared_ptr hRecoDauAlphaCounter; +std::shared_ptr hMothCounter; +std::shared_ptr hMoth2BCounter; +std::shared_ptr hDaugCounter[kNChargedDaughterType]; +std::shared_ptr hDaugTPCNSigma[kNChargedDaughterType]; +std::shared_ptr hRecoMothCounter; +std::shared_ptr hRecoDaugAlphaCounter; } // namespace //-------------------------------------------------------------- @@ -167,13 +167,13 @@ Channel getDecayChannelHe4S(TMCParticle const& particle, std::vector& list) //-------------------------------------------------------------- // Extract track parameters from a mcparticle, use global coordinates as the local one template -o2::track::TrackParametrization getTrackParFromMC(const T& mcparticle) +o2::track::TrackParametrization getTrackParFromMC(const T& mcparticle, int charge = 1) { int sign = mcparticle.pdgCode() > 0 ? 1 : -1; // ok for hyperhelium4sigma TrackPrecision snp = mcparticle.py() / (mcparticle.pt() + 1.e-10f); TrackPrecision tgl = mcparticle.pz() / (mcparticle.pt() + 1.e-10f); std::array arraypar = {mcparticle.vy(), mcparticle.vz(), snp, - tgl, 2 * sign / (mcparticle.pt() + 1.e-10f)}; + tgl, charge * sign / (mcparticle.pt() + 1.e-10f)}; return o2::track::TrackParametrization(mcparticle.vx(), 0, std::move(arraypar)); } @@ -208,16 +208,16 @@ float getTPCNSigma(const TTrack& track, const int daughterType) { float nSigma = -999.f; switch (daughterType) { - case kDauAlpha: + case kDaugAlpha: nSigma = track.tpcNSigmaAl(); break; - case kDauTriton: + case kDaugTriton: nSigma = track.tpcNSigmaTr(); break; - case kDauProton: + case kDaugProton: nSigma = track.tpcNSigmaPr(); break; - case kDauChargedPion: + case kDaugChargedPion: nSigma = track.tpcNSigmaPi(); break; default: @@ -228,37 +228,31 @@ float getTPCNSigma(const TTrack& track, const int daughterType) //-------------------------------------------------------------- // Refit the momentum of the mother track -template -std::array refitMotherTrack(TCollision& collision, TTrack& track, std::array posSV) +template +bool refitMotherTrack(const TTrack& track, o2::track::TrackParametrizationWithError& trackPar, const o2::dataformats::VertexBase& primaryVtx, const o2::dataformats::VertexBase& secondaryVtx) { - auto trackPar = getTrackParCov(track); - float trackIUPos[2] = {track.y(), track.z()}; float trackIUCov[3] = {track.cYY(), track.cZY(), track.cZZ()}; - o2::dataformats::VertexBase primaryVtx = {{collision.posX(), collision.posY(), collision.posZ()}, {collision.covXX(), collision.covXY(), collision.covYY(), collision.covXZ(), collision.covYZ(), collision.covZZ()}}; - o2::dataformats::VertexBase secondaryVtx = {{posSV[0], posSV[1], posSV[2]}, {covPosSV[0], covPosSV[1], covPosSV[2], covPosSV[3], covPosSV[4], covPosSV[5]}}; o2::base::Propagator::Instance()->propagateToDCABxByBz(primaryVtx, trackPar, 2.f, o2::base::Propagator::MatCorrType::USEMatCorrLUT); - trackPar.resetCovariance(999.f); - std::array refitP = {-999.f, -999.f, -999.f}; - if (!trackPar.update(primaryVtx, 999.f)) { - return refitP; + trackPar.resetCovariance(1e15); + if (!trackPar.update(primaryVtx)) { + return false; } trackPar.rotate(track.alpha()); o2::base::Propagator::Instance()->PropagateToXBxByBz(trackPar, track.x()); if (!trackPar.update(trackIUPos, trackIUCov)) { - return refitP; + return false; } o2::base::Propagator::Instance()->propagateToDCABxByBz(secondaryVtx, trackPar, 2.f, o2::base::Propagator::MatCorrType::USEMatCorrLUT); - if (!trackPar.update(secondaryVtx, 999.f)) { - return refitP; + if (!trackPar.update(secondaryVtx)) { + return false; } - trackPar.getPxPyPzGlo(refitP); - return refitP; + return true; } //-------------------------------------------------------------- @@ -266,21 +260,21 @@ struct Hyphe4sCandidate { bool isMatter = false; - std::array primVtx = {0.0f, 0.0f, 0.0f}; - std::array decVtx = {0.0f, 0.0f, 0.0f}; + std::array posPV = {0.0f, 0.0f, 0.0f}; + std::array posSV = {0.0f, 0.0f, 0.0f}; std::array lastPosMoth = {0.0f, 0.0f, 0.0f}; // last position of mother track at the radii of ITS layer which has the outermost update - std::array momMoth = {0.0f, 0.0f, 0.0f}; - std::array momDaug = {0.0f, 0.0f, 0.0f}; + std::array momMothSV = {0.0f, 0.0f, 0.0f}; + std::array momDaugSV = {0.0f, 0.0f, 0.0f}; float dcaXYMothPv = -999.f; - float dcaXYDauPv = -999.f; + float dcaXYDaugPv = -999.f; float dcaKinkTopo = -999.f; float chi2ITSMoth = 0.0f; uint32_t itsClusterSizeMoth = 0u; - uint32_t itsClusterSizeDau = 0u; - float nSigmaTPCDau = -999.f; - float nSigmaITSDau = -999.f; + uint32_t itsClusterSizeDaug = 0u; + float nSigmaTPCDaug = -999.f; + float nSigmaITSDaug = -999.f; // mc information bool isSignal = false; @@ -288,25 +282,25 @@ struct Hyphe4sCandidate { bool isCollReco = false; bool isSurvEvSelection = false; - std::array trueDecVtx = {0.0f, 0.0f, 0.0f}; - std::array gMomMoth = {0.0f, 0.0f, 0.0f}; // generated mother momentum - std::array trueMomMoth = {0.0f, 0.0f, 0.0f}; // true mother momentum at decay vertex - std::array gMomDau = {0.0f, 0.0f, 0.0f}; + std::array truePosSV = {0.0f, 0.0f, 0.0f}; + std::array trueMomMothPV = {0.0f, 0.0f, 0.0f}; // generated mother momentum at primary vertex + std::array trueMomMothSV = {0.0f, 0.0f, 0.0f}; // true mother momentum at decay vertex + std::array trueMomDaugSV = {0.0f, 0.0f, 0.0f}; // true daughter momentum at decay vertex bool isMothReco = false; - float ptMoth = -999.f; - float pzMoth = -999.f; + std::array momMothPV = {0.0f, 0.0f, 0.0f}; + std::array updateMomMothPV = {0.0f, 0.0f, 0.0f}; // mother momentum at primary vertex after update using PV }; //-------------------------------------------------------------- // analysis task for hyperhelium4sigma 2-body decay struct Hyperhelium4sigmaRecoTask { - Produces outputDataTable; - Produces outputMCTable; + Produces outputDataTable; + Produces outputMCTable; Service ccdb; - o2::base::Propagator::MatCorrType matCorr = o2::base::Propagator::MatCorrType::USEMatCorrNONE; + o2::base::Propagator::MatCorrType matCorr = o2::base::Propagator::MatCorrType::USEMatCorrLUT; std::vector mcHe4sIndices; @@ -321,10 +315,8 @@ struct Hyperhelium4sigmaRecoTask { // CCDB options Configurable inputBz{"inputBz", -999, "bz field, -999 is automatic"}; Configurable ccdbPath{"ccdbPath", "http://alice-ccdb.cern.ch", "url of the ccdb repository"}; - Configurable grpPath{"grpPath", "GLO/GRP/GRP", "Path of the grp file"}; Configurable grpmagPath{"grpmagPath", "GLO/Config/GRPMagField", "CCDB path of the GRPMagField object"}; Configurable lutPath{"lutPath", "GLO/Param/MatLUT", "Path of the Lut parametrization"}; - Configurable geoPath{"geoPath", "GLO/Config/GeometryAligned", "Path of the geometry file"}; int mRunNumber; float mBz; @@ -371,11 +363,6 @@ struct Hyperhelium4sigmaRecoTask { registry.add("hDCAXYMothToRecSV", "hDCAXYMothToRecSV", HistType::kTH1F, {{200, -10, 10}}); registry.add("hDCAZMothToRecSV", "hDCAZMothToRecSV", HistType::kTH1F, {{200, -10, 10}}); - - registry.add("h2TrueMotherDiffPtVsKinkAngle", ";cos(#theta);#Delta p_{T} / p_{T};", HistType::kTH2F, {{100, 0.8f, 1.f}, {100, -5.f, 5.f}}); - registry.add("h2TrueMotherDiffPtVsKinkAngleSV", ";cos(#theta);#Delta p_{T} / p_{T};", HistType::kTH2F, {{100, 0.8f, 1.f}, {100, -5.f, 5.f}}); - registry.add("h2TrueMotherDiffPtVsKinkAngleXY", ";cos(#theta);#Delta p_{T} / p_{T};", HistType::kTH2F, {{100, 0.8f, 1.f}, {100, -5.f, 5.f}}); - registry.add("h2TrueMotherDiffPtVsKinkAngleXYSV", ";cos(#theta);#Delta p_{T} / p_{T};", HistType::kTH2F, {{100, 0.8f, 1.f}, {100, -5.f, 5.f}}); } registry.add("h2MassHyperhelium4sigmaPt", "h2MassHyperhelium4sigmaPt", HistType::kTH2F, {{ptAxis, massAxis}}); @@ -385,7 +372,6 @@ struct Hyperhelium4sigmaRecoTask { ccdb->setCaching(true); ccdb->setLocalObjectValidityChecking(); ccdb->setFatalWhenNull(false); - lut = o2::base::MatLayerCylSet::rectifyPtrFromFile(ccdb->get(lutPath)); } void initCCDB(aod::BCs::iterator const& bc) @@ -394,6 +380,7 @@ struct Hyperhelium4sigmaRecoTask { return; } mRunNumber = bc.runNumber(); + ccdb->clearCache(grpmagPath.value.data()); LOG(info) << "Initializing CCDB for run " << mRunNumber; o2::parameters::GRPMagField* grpmag = ccdb->getForRun(grpmagPath, mRunNumber); o2::base::Propagator::initFieldFromGRP(grpmag); @@ -407,32 +394,32 @@ struct Hyperhelium4sigmaRecoTask { } template - void fillCandidate(Hyphe4sCandidate& hyphe4sCand, TCollision const& collision, TKindCandidate const& kinkCand, TTrack const& trackMoth, TTrack const& trackDau) + void fillCandidate(Hyphe4sCandidate& hyphe4sCand, TCollision const& collision, TKindCandidate const& kinkCand, TTrack const& trackMoth, TTrack const& trackDaug) { hyphe4sCand.isMatter = kinkCand.mothSign() > 0; - hyphe4sCand.primVtx[0] = collision.posX(); - hyphe4sCand.primVtx[1] = collision.posY(); - hyphe4sCand.primVtx[2] = collision.posZ(); - hyphe4sCand.decVtx[0] = kinkCand.xDecVtx() + collision.posX(); - hyphe4sCand.decVtx[1] = kinkCand.yDecVtx() + collision.posY(); - hyphe4sCand.decVtx[2] = kinkCand.zDecVtx() + collision.posZ(); - - hyphe4sCand.momMoth[0] = kinkCand.pxMoth(); - hyphe4sCand.momMoth[1] = kinkCand.pyMoth(); - hyphe4sCand.momMoth[2] = kinkCand.pzMoth(); - hyphe4sCand.momDaug[0] = kinkCand.pxDaug(); - hyphe4sCand.momDaug[1] = kinkCand.pyDaug(); - hyphe4sCand.momDaug[2] = kinkCand.pzDaug(); + hyphe4sCand.posPV[0] = collision.posX(); + hyphe4sCand.posPV[1] = collision.posY(); + hyphe4sCand.posPV[2] = collision.posZ(); + hyphe4sCand.posSV[0] = kinkCand.xDecVtx() + collision.posX(); + hyphe4sCand.posSV[1] = kinkCand.yDecVtx() + collision.posY(); + hyphe4sCand.posSV[2] = kinkCand.zDecVtx() + collision.posZ(); + + hyphe4sCand.momMothSV[0] = kinkCand.pxMoth(); + hyphe4sCand.momMothSV[1] = kinkCand.pyMoth(); + hyphe4sCand.momMothSV[2] = kinkCand.pzMoth(); + hyphe4sCand.momDaugSV[0] = kinkCand.pxDaug(); + hyphe4sCand.momDaugSV[1] = kinkCand.pyDaug(); + hyphe4sCand.momDaugSV[2] = kinkCand.pzDaug(); hyphe4sCand.dcaXYMothPv = kinkCand.dcaMothPv(); - hyphe4sCand.dcaXYDauPv = kinkCand.dcaDaugPv(); + hyphe4sCand.dcaXYDaugPv = kinkCand.dcaDaugPv(); hyphe4sCand.dcaKinkTopo = kinkCand.dcaKinkTopo(); - fillCandidateRecoMoth(hyphe4sCand, trackMoth); + fillCandidateRecoMoth(hyphe4sCand, collision, trackMoth); - hyphe4sCand.itsClusterSizeDau = trackDau.itsClusterSizes(); - hyphe4sCand.nSigmaTPCDau = trackDau.tpcNSigmaAl(); - hyphe4sCand.nSigmaITSDau = itsResponse.nSigmaITS(trackDau); + hyphe4sCand.itsClusterSizeDaug = trackDaug.itsClusterSizes(); + hyphe4sCand.nSigmaTPCDaug = trackDaug.tpcNSigmaAl(); + hyphe4sCand.nSigmaITSDaug = itsResponse.nSigmaITS(trackDaug); int lastLayerMoth = 0; for (int i = 6; i >= 0; i--) { @@ -443,39 +430,54 @@ struct Hyperhelium4sigmaRecoTask { } auto trackparMother = getTrackParCov(trackMoth); o2::base::Propagator::Instance()->PropagateToXBxByBz(trackparMother, LayerRadii[lastLayerMoth]); - std::array vecLab{0.f}; - if (trackparMother.getPosDirGlo(vecLab)) { - hyphe4sCand.lastPosMoth[0] = vecLab[0]; - hyphe4sCand.lastPosMoth[1] = vecLab[1]; - hyphe4sCand.lastPosMoth[2] = vecLab[2]; - } + std::array posLastHit{-999.f}; + trackparMother.getXYZGlo(posLastHit); + hyphe4sCand.lastPosMoth[0] = posLastHit[0]; + hyphe4sCand.lastPosMoth[1] = posLastHit[1]; + hyphe4sCand.lastPosMoth[2] = posLastHit[2]; } - template - void fillCandidateRecoMoth(Hyphe4sCandidate& hyphe4sCand, TTrack const& trackMoth) + template + void fillCandidateRecoMoth(Hyphe4sCandidate& hyphe4sCand, TCollision const& collision, TTrack const& trackMoth) { hyphe4sCand.isMothReco = true; hyphe4sCand.chi2ITSMoth = trackMoth.itsChi2NCl(); hyphe4sCand.itsClusterSizeMoth = trackMoth.itsClusterSizes(); - hyphe4sCand.ptMoth = trackMoth.pt(); - hyphe4sCand.pzMoth = trackMoth.pz(); + + auto motherTrackPar = getTrackParCov(trackMoth); + o2::dataformats::VertexBase primaryVtx = {{collision.posX(), collision.posY(), collision.posZ()}, {collision.covXX(), collision.covXY(), collision.covYY(), collision.covXZ(), collision.covYZ(), collision.covZZ()}}; + std::array pMotherPv = {-999.f}; + if (o2::base::Propagator::Instance()->propagateToDCABxByBz(primaryVtx, motherTrackPar, 2.f, o2::base::Propagator::MatCorrType::USEMatCorrLUT)) { + motherTrackPar.getPxPyPzGlo(pMotherPv); + } + hyphe4sCand.momMothPV[0] = pMotherPv[0]; + hyphe4sCand.momMothPV[1] = pMotherPv[1]; + hyphe4sCand.momMothPV[2] = pMotherPv[2]; + + std::array updatePMotherPv = {-999.f}; + if (motherTrackPar.update(primaryVtx)) { + motherTrackPar.getPxPyPzGlo(updatePMotherPv); + } + hyphe4sCand.updateMomMothPV[0] = updatePMotherPv[0]; + hyphe4sCand.updateMomMothPV[1] = updatePMotherPv[1]; + hyphe4sCand.updateMomMothPV[2] = updatePMotherPv[2]; } template void fillCandidateMCInfo(Hyphe4sCandidate& hyphe4sCand, TMCParticle const& mcMothTrack, TMCParticle const& mcDauTrack, TMCParticle const& mcNeutDauTrack) { - hyphe4sCand.trueDecVtx[0] = mcDauTrack.vx(); - hyphe4sCand.trueDecVtx[1] = mcDauTrack.vy(); - hyphe4sCand.trueDecVtx[2] = mcDauTrack.vz(); - hyphe4sCand.gMomMoth[0] = mcMothTrack.px(); - hyphe4sCand.gMomMoth[1] = mcMothTrack.py(); - hyphe4sCand.gMomMoth[2] = mcMothTrack.pz(); - hyphe4sCand.trueMomMoth[0] = mcDauTrack.px() + mcNeutDauTrack.px(); - hyphe4sCand.trueMomMoth[1] = mcDauTrack.py() + mcNeutDauTrack.py(); - hyphe4sCand.trueMomMoth[2] = mcDauTrack.pz() + mcNeutDauTrack.pz(); - hyphe4sCand.gMomDau[0] = mcDauTrack.px(); - hyphe4sCand.gMomDau[1] = mcDauTrack.py(); - hyphe4sCand.gMomDau[2] = mcDauTrack.pz(); + hyphe4sCand.truePosSV[0] = mcDauTrack.vx(); + hyphe4sCand.truePosSV[1] = mcDauTrack.vy(); + hyphe4sCand.truePosSV[2] = mcDauTrack.vz(); + hyphe4sCand.trueMomMothPV[0] = mcMothTrack.px(); + hyphe4sCand.trueMomMothPV[1] = mcMothTrack.py(); + hyphe4sCand.trueMomMothPV[2] = mcMothTrack.pz(); + hyphe4sCand.trueMomMothSV[0] = mcDauTrack.px() + mcNeutDauTrack.px(); + hyphe4sCand.trueMomMothSV[1] = mcDauTrack.py() + mcNeutDauTrack.py(); + hyphe4sCand.trueMomMothSV[2] = mcDauTrack.pz() + mcNeutDauTrack.pz(); + hyphe4sCand.trueMomDaugSV[0] = mcDauTrack.px(); + hyphe4sCand.trueMomDaugSV[1] = mcDauTrack.py(); + hyphe4sCand.trueMomDaugSV[2] = mcDauTrack.pz(); } void processData(CollisionsFull const& collisions, aod::KinkCands const& KinkCands, FullTracksExtIU const&, aod::BCs const&) @@ -512,23 +514,29 @@ struct Hyperhelium4sigmaRecoTask { Hyphe4sCandidate hyphe4sCand; fillCandidate(hyphe4sCand, collision, kinkCand, motherTrack, dauTrack); - std::array posDecVtx = {kinkCand.xDecVtx() + collision.posX(), kinkCand.yDecVtx() + collision.posY(), kinkCand.zDecVtx() + collision.posZ()}; - auto refitP = refitMotherTrack(collision, motherTrack, posDecVtx); - for (size_t i = 0; i < refitP.size(); ++i) { - refitP[i] *= 2.f; + o2::dataformats::VertexBase primaryVtx = {{collision.posX(), collision.posY(), collision.posZ()}, {collision.covXX(), collision.covXY(), collision.covYY(), collision.covXZ(), collision.covYZ(), collision.covZZ()}}; + o2::dataformats::VertexBase secondaryVtx = {{kinkCand.xDecVtx() + collision.posX(), kinkCand.yDecVtx() + collision.posY(), kinkCand.zDecVtx() + collision.posZ()}, {covPosSV[0], covPosSV[1], covPosSV[2], covPosSV[3], covPosSV[4], covPosSV[5]}}; + std::array refitPPV = {-999.f}; + std::array refitPSV = {-999.f}; + auto motherTrackPar = getTrackParCov(motherTrack); + if (refitMotherTrack(motherTrack, motherTrackPar, primaryVtx, secondaryVtx)) { + motherTrackPar.getPxPyPzGlo(refitPSV); + o2::base::Propagator::Instance()->propagateToDCABxByBz(primaryVtx, motherTrackPar, 2.f, o2::base::Propagator::MatCorrType::USEMatCorrLUT); + motherTrackPar.getPxPyPzGlo(refitPPV); } outputDataTable( - hyphe4sCand.primVtx[0], hyphe4sCand.primVtx[1], hyphe4sCand.primVtx[2], - hyphe4sCand.decVtx[0], hyphe4sCand.decVtx[1], hyphe4sCand.decVtx[2], + hyphe4sCand.posPV[0], hyphe4sCand.posPV[1], hyphe4sCand.posPV[2], + hyphe4sCand.posSV[0], hyphe4sCand.posSV[1], hyphe4sCand.posSV[2], hyphe4sCand.isMatter, hyphe4sCand.lastPosMoth[0], hyphe4sCand.lastPosMoth[1], hyphe4sCand.lastPosMoth[2], - hyphe4sCand.momMoth[0], hyphe4sCand.momMoth[1], hyphe4sCand.momMoth[2], - refitP[0], refitP[1], refitP[2], - hyphe4sCand.momDaug[0], hyphe4sCand.momDaug[1], hyphe4sCand.momDaug[2], - hyphe4sCand.dcaXYMothPv, hyphe4sCand.dcaXYDauPv, hyphe4sCand.dcaKinkTopo, - hyphe4sCand.chi2ITSMoth, hyphe4sCand.itsClusterSizeMoth, hyphe4sCand.itsClusterSizeDau, - hyphe4sCand.nSigmaTPCDau, hyphe4sCand.nSigmaITSDau); + hyphe4sCand.momMothSV[0], hyphe4sCand.momMothSV[1], hyphe4sCand.momMothSV[2], + refitPPV[0], refitPPV[1], refitPPV[2], + refitPSV[0], refitPSV[1], refitPSV[2], + hyphe4sCand.momDaugSV[0], hyphe4sCand.momDaugSV[1], hyphe4sCand.momDaugSV[2], + hyphe4sCand.dcaXYMothPv, hyphe4sCand.dcaXYDaugPv, hyphe4sCand.dcaKinkTopo, + hyphe4sCand.chi2ITSMoth, hyphe4sCand.itsClusterSizeMoth, hyphe4sCand.itsClusterSizeDaug, + hyphe4sCand.nSigmaTPCDaug, hyphe4sCand.nSigmaITSDaug); } } PROCESS_SWITCH(Hyperhelium4sigmaRecoTask, processData, "process data", true); @@ -599,9 +607,16 @@ struct Hyperhelium4sigmaRecoTask { fillCandidate(hyphe4sCand, collision, kinkCand, motherTrack, dauTrack); std::array posDecVtx = {kinkCand.xDecVtx() + collision.posX(), kinkCand.yDecVtx() + collision.posY(), kinkCand.zDecVtx() + collision.posZ()}; - auto refitP = refitMotherTrack(collision, motherTrack, posDecVtx); - for (size_t i = 0; i < refitP.size(); ++i) { - refitP[i] *= 2.f; + + o2::dataformats::VertexBase primaryVtx = {{collision.posX(), collision.posY(), collision.posZ()}, {collision.covXX(), collision.covXY(), collision.covYY(), collision.covXZ(), collision.covYZ(), collision.covZZ()}}; + o2::dataformats::VertexBase secondaryVtx = {{posDecVtx[0], posDecVtx[1], posDecVtx[2]}, {covPosSV[0], covPosSV[1], covPosSV[2], covPosSV[3], covPosSV[4], covPosSV[5]}}; + std::array refitPPV = {-999.f}; + std::array refitPSV = {-999.f}; + auto motherTrackPar = getTrackParCov(motherTrack); + if (refitMotherTrack(motherTrack, motherTrackPar, primaryVtx, secondaryVtx)) { + motherTrackPar.getPxPyPzGlo(refitPSV); + o2::base::Propagator::Instance()->propagateToDCABxByBz(primaryVtx, motherTrackPar, 2.f, o2::base::Propagator::MatCorrType::USEMatCorrLUT); + motherTrackPar.getPxPyPzGlo(refitPPV); } // qa for true signal @@ -609,7 +624,6 @@ struct Hyperhelium4sigmaRecoTask { auto mcMotherTrack = motherTrack.mcParticle_as(); auto mcDauTrack = dauTrack.mcParticle_as(); auto mcNeutTrack = particlesMC.rawIteratorAt(dauIDList[2]); - float posDecVtx[3] = {kinkCand.xDecVtx() + collision.posX(), kinkCand.yDecVtx() + collision.posY(), kinkCand.zDecVtx() + collision.posZ()}; float recSVR = std::sqrt(posDecVtx[0] * posDecVtx[0] + posDecVtx[1] * posDecVtx[1]); registry.fill(HIST("hDiffSVx"), posDecVtx[0] - mcDauTrack.vx()); registry.fill(HIST("hDiffSVy"), posDecVtx[1] - mcDauTrack.vy()); @@ -633,54 +647,35 @@ struct Hyperhelium4sigmaRecoTask { mcHe4sIndices.push_back(mcMotherTrack.globalIndex()); std::array dcaInfo; - auto mcMotherTrackPar = getTrackParFromMC(mcMotherTrack); + auto mcMotherTrackPar = getTrackParFromMC(mcMotherTrack, 2); o2::base::Propagator::Instance()->propagateToDCABxByBz({posDecVtx[0], posDecVtx[1], posDecVtx[2]}, mcMotherTrackPar, 2.f, matCorr, &dcaInfo); registry.fill(HIST("hDCAXYMothToRecSV"), dcaInfo[0]); registry.fill(HIST("hDCAZMothToRecSV"), dcaInfo[1]); - std::array pMotherAtSV = {-999.f, -999.f, -999.f}; - mcMotherTrackPar.getPxPyPzGlo(pMotherAtSV); - registry.fill(HIST("h2TrueMotherDiffPxVsRecSVR"), recSVR, pMotherAtSV[0] - kinkCand.pxMoth()); - registry.fill(HIST("h2TrueMotherDiffPyVsRecSVR"), recSVR, pMotherAtSV[1] - kinkCand.pyMoth()); - - float spKinkXY = kinkCand.pxMoth() * kinkCand.pxDaug() + kinkCand.pyMoth() * kinkCand.pyDaug(); - float spKink = spKinkXY + kinkCand.pzMoth() * kinkCand.pzDaug(); - float pMoth = std::hypot(kinkCand.pxMoth(), kinkCand.pyMoth(), kinkCand.pzMoth()); - float pDaug = std::hypot(kinkCand.pxDaug(), kinkCand.pyDaug(), kinkCand.pzDaug()); - - float mothPDir[3] = {kinkCand.xDecVtx(), kinkCand.yDecVtx(), kinkCand.zDecVtx()}; - float magMothPDirXY = std::hypot(mothPDir[0], mothPDir[1]); - float magMothPDir = std::hypot(mothPDir[0], mothPDir[1], mothPDir[2]); - float spKinkSV = mothPDir[0] * kinkCand.pxDaug() + mothPDir[1] * kinkCand.pyDaug() + mothPDir[2] * kinkCand.pzDaug(); - float sptKinkSV = mothPDir[0] * kinkCand.pxDaug() + mothPDir[1] * kinkCand.pyDaug(); - - float kinkAngle = spKink / (pMoth * pDaug); - float kinkAngleSV = spKinkSV / (magMothPDir * pDaug); - float kinkAngleXY = spKinkXY / (kinkCand.ptMoth() * kinkCand.ptDaug()); - float kinkAngleXYSV = sptKinkSV / (magMothPDirXY * kinkCand.ptDaug()); - - registry.fill(HIST("h2TrueMotherDiffPtVsKinkAngle"), kinkAngle, (mcMotherTrack.pt() - kinkCand.ptMoth()) / kinkCand.ptMoth()); - registry.fill(HIST("h2TrueMotherDiffPtVsKinkAngleSV"), kinkAngleSV, (mcMotherTrack.pt() - kinkCand.ptMoth()) / kinkCand.ptMoth()); - registry.fill(HIST("h2TrueMotherDiffPtVsKinkAngleXY"), kinkAngleXY, (mcMotherTrack.pt() - kinkCand.ptMoth()) / kinkCand.ptMoth()); - registry.fill(HIST("h2TrueMotherDiffPtVsKinkAngleXYSV"), kinkAngleXYSV, (mcMotherTrack.pt() - kinkCand.ptMoth()) / kinkCand.ptMoth()); + std::array mcPMotherSV = {-999.f, -999.f, -999.f}; + mcMotherTrackPar.getPxPyPzGlo(mcPMotherSV); + registry.fill(HIST("h2TrueMotherDiffPxVsRecSVR"), recSVR, mcPMotherSV[0] - kinkCand.pxMoth()); + registry.fill(HIST("h2TrueMotherDiffPyVsRecSVR"), recSVR, mcPMotherSV[1] - kinkCand.pyMoth()); } outputMCTable( - hyphe4sCand.primVtx[0], hyphe4sCand.primVtx[1], hyphe4sCand.primVtx[2], - hyphe4sCand.decVtx[0], hyphe4sCand.decVtx[1], hyphe4sCand.decVtx[2], + hyphe4sCand.posPV[0], hyphe4sCand.posPV[1], hyphe4sCand.posPV[2], + hyphe4sCand.posSV[0], hyphe4sCand.posSV[1], hyphe4sCand.posSV[2], hyphe4sCand.isMatter, hyphe4sCand.lastPosMoth[0], hyphe4sCand.lastPosMoth[1], hyphe4sCand.lastPosMoth[2], - hyphe4sCand.momMoth[0], hyphe4sCand.momMoth[1], hyphe4sCand.momMoth[2], - refitP[0], refitP[1], refitP[2], - hyphe4sCand.momDaug[0], hyphe4sCand.momDaug[1], hyphe4sCand.momDaug[2], - hyphe4sCand.dcaXYMothPv, hyphe4sCand.dcaXYDauPv, hyphe4sCand.dcaKinkTopo, - hyphe4sCand.chi2ITSMoth, hyphe4sCand.itsClusterSizeMoth, hyphe4sCand.itsClusterSizeDau, - hyphe4sCand.nSigmaTPCDau, hyphe4sCand.nSigmaITSDau, + hyphe4sCand.momMothSV[0], hyphe4sCand.momMothSV[1], hyphe4sCand.momMothSV[2], + refitPPV[0], refitPPV[1], refitPPV[2], + refitPSV[0], refitPSV[1], refitPSV[2], + hyphe4sCand.momDaugSV[0], hyphe4sCand.momDaugSV[1], hyphe4sCand.momDaugSV[2], + hyphe4sCand.dcaXYMothPv, hyphe4sCand.dcaXYDaugPv, hyphe4sCand.dcaKinkTopo, + hyphe4sCand.chi2ITSMoth, hyphe4sCand.itsClusterSizeMoth, hyphe4sCand.itsClusterSizeDaug, + hyphe4sCand.nSigmaTPCDaug, hyphe4sCand.nSigmaITSDaug, hyphe4sCand.isSignal, hyphe4sCand.isSignalReco, hyphe4sCand.isCollReco, hyphe4sCand.isSurvEvSelection, - hyphe4sCand.trueDecVtx[0], hyphe4sCand.trueDecVtx[1], hyphe4sCand.trueDecVtx[2], - hyphe4sCand.gMomMoth[0], hyphe4sCand.gMomMoth[1], hyphe4sCand.gMomMoth[2], - hyphe4sCand.trueMomMoth[0], hyphe4sCand.trueMomMoth[1], hyphe4sCand.trueMomMoth[2], - hyphe4sCand.gMomDau[0], hyphe4sCand.gMomDau[1], hyphe4sCand.gMomDau[2], - hyphe4sCand.isMothReco, hyphe4sCand.ptMoth, hyphe4sCand.pzMoth); + hyphe4sCand.truePosSV[0], hyphe4sCand.truePosSV[1], hyphe4sCand.truePosSV[2], + hyphe4sCand.trueMomMothPV[0], hyphe4sCand.trueMomMothPV[1], hyphe4sCand.trueMomMothPV[2], + hyphe4sCand.trueMomMothSV[0], hyphe4sCand.trueMomMothSV[1], hyphe4sCand.trueMomMothSV[2], + hyphe4sCand.trueMomDaugSV[0], hyphe4sCand.trueMomDaugSV[1], hyphe4sCand.trueMomDaugSV[2], + hyphe4sCand.isMothReco, hyphe4sCand.momMothPV[0], hyphe4sCand.momMothPV[1], hyphe4sCand.momMothPV[2], + hyphe4sCand.updateMomMothPV[0], hyphe4sCand.updateMomMothPV[1], hyphe4sCand.updateMomMothPV[2]); } // fill hyperhelium4sigma signals which are not reconstructed @@ -700,7 +695,12 @@ struct Hyperhelium4sigmaRecoTask { if (mcPartIndices[mcparticle.globalIndex()] != -1) { auto mothTrack = tracks.rawIteratorAt(mcPartIndices[mcparticle.globalIndex()]); - fillCandidateRecoMoth(hyphe4sCand, mothTrack); + if (mothTrack.has_collision()) { + auto collision = mothTrack.collision_as(); + auto bc = collision.template bc_as(); + initCCDB(bc); + fillCandidateRecoMoth(hyphe4sCand, collision, mothTrack); + } } outputMCTable( @@ -713,13 +713,15 @@ struct Hyperhelium4sigmaRecoTask { -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, true, false, isReconstructedMCCollisions[mcparticle.mcCollisionId()], isSelectedMCCollisions[mcparticle.mcCollisionId()], - hyphe4sCand.trueDecVtx[0], hyphe4sCand.trueDecVtx[1], hyphe4sCand.trueDecVtx[2], - hyphe4sCand.gMomMoth[0], hyphe4sCand.gMomMoth[1], hyphe4sCand.gMomMoth[2], - hyphe4sCand.trueMomMoth[0], hyphe4sCand.trueMomMoth[1], hyphe4sCand.trueMomMoth[2], - hyphe4sCand.gMomDau[0], hyphe4sCand.gMomDau[1], hyphe4sCand.gMomDau[2], - hyphe4sCand.isMothReco, hyphe4sCand.ptMoth, hyphe4sCand.pzMoth); + hyphe4sCand.truePosSV[0], hyphe4sCand.truePosSV[1], hyphe4sCand.truePosSV[2], + hyphe4sCand.trueMomMothPV[0], hyphe4sCand.trueMomMothPV[1], hyphe4sCand.trueMomMothPV[2], + hyphe4sCand.trueMomMothSV[0], hyphe4sCand.trueMomMothSV[1], hyphe4sCand.trueMomMothSV[2], + hyphe4sCand.trueMomDaugSV[0], hyphe4sCand.trueMomDaugSV[1], hyphe4sCand.trueMomDaugSV[2], + hyphe4sCand.isMothReco, hyphe4sCand.momMothPV[0], hyphe4sCand.momMothPV[1], hyphe4sCand.momMothPV[2], + hyphe4sCand.updateMomMothPV[0], hyphe4sCand.updateMomMothPV[1], hyphe4sCand.updateMomMothPV[2]); } } PROCESS_SWITCH(Hyperhelium4sigmaRecoTask, processMC, "process MC", false); @@ -788,9 +790,9 @@ struct Hyperhelium4sigmaQa { genQAHist.add("hMcRecoInvMass", "", HistType::kTH1F, {invMassAxis}); // efficiency/criteria studies for tracks which are true candidates - hMotherCounter = recoQAHist.add("hMotherCounter", "", HistType::kTH1F, {{9, 0.f, 9.f}}); - hMother2BCounter = recoQAHist.add("hMother2BCounter", "", HistType::kTH1F, {{9, 0.f, 9.f}}); - for (const auto& hist : {hMotherCounter, hMother2BCounter}) { + hMothCounter = recoQAHist.add("hMothCounter", "", HistType::kTH1F, {{9, 0.f, 9.f}}); + hMoth2BCounter = recoQAHist.add("hMoth2BCounter", "", HistType::kTH1F, {{9, 0.f, 9.f}}); + for (const auto& hist : {hMothCounter, hMoth2BCounter}) { hist->GetXaxis()->SetBinLabel(1, "Generated"); hist->GetXaxis()->SetBinLabel(2, "Reconstructed"); hist->GetXaxis()->SetBinLabel(3, "eta"); @@ -808,19 +810,19 @@ struct Hyperhelium4sigmaQa { recoQAHist.add("h2GoodMotherDiffPtVsTrueSVR", ";Decay Vertex R (cm);#Delta p_{T} (GeV/#it{c});", HistType::kTH2F, {svRadiuAxis, diffPtAxis}); recoQAHist.add("h2GoodMotherDiffPzVsTrueSVR", ";Decay Vertex R (cm);#Delta p_{z} (GeV/#it{c});", HistType::kTH2F, {svRadiuAxis, diffPzAxis}); - hDauCounter[kDauAlpha] = recoQAHist.add("hDauAlphaCounter", "", HistType::kTH1F, {{9, 0.f, 9.f}}); - hDauCounter[kDauTriton] = recoQAHist.add("hDauTritonCounter", "", HistType::kTH1F, {{9, 0.f, 9.f}}); - hDauCounter[kDauProton] = recoQAHist.add("hDauProtonCounter", "", HistType::kTH1F, {{9, 0.f, 9.f}}); - hDauCounter[kDauChargedPion] = recoQAHist.add("hDauPionCounter", "", HistType::kTH1F, {{9, 0.f, 9.f}}); - hDauTPCNSigma[kDauAlpha] = recoQAHist.add("hDauAlphaTPCNSigma", "", HistType::kTH2F, {rigidityAxis, nsigmaAxis}); - hDauTPCNSigma[kDauTriton] = recoQAHist.add("hDauTritonTPCNSigma", "", HistType::kTH2F, {rigidityAxis, nsigmaAxis}); - hDauTPCNSigma[kDauProton] = recoQAHist.add("hDauProtonTPCNSigma", "", HistType::kTH2F, {rigidityAxis, nsigmaAxis}); - hDauTPCNSigma[kDauChargedPion] = recoQAHist.add("hDauPionTPCNSigma", "", HistType::kTH2F, {rigidityAxis, nsigmaAxis}); - recoQAHist.add("hDauAlphaITSNSigmaCheck", "", HistType::kTH2F, {rigidityAxis, itsnsigmaAxis}); - - hRecoMotherCounter = recoQAHist.add("hRecoMotherCounter", "", HistType::kTH1F, {{9, 0.f, 9.f}}); - hRecoDauAlphaCounter = recoQAHist.add("hRecoDauAlphaCounter", "", HistType::kTH1F, {{9, 0.f, 9.f}}); - for (const auto& hist : {hDauCounter[kDauAlpha], hDauCounter[kDauTriton], hDauCounter[kDauProton], hDauCounter[kDauChargedPion], hRecoMotherCounter, hRecoDauAlphaCounter}) { + hDaugCounter[kDaugAlpha] = recoQAHist.add("hDaugAlphaCounter", "", HistType::kTH1F, {{9, 0.f, 9.f}}); + hDaugCounter[kDaugTriton] = recoQAHist.add("hDaugTritonCounter", "", HistType::kTH1F, {{9, 0.f, 9.f}}); + hDaugCounter[kDaugProton] = recoQAHist.add("hDaugProtonCounter", "", HistType::kTH1F, {{9, 0.f, 9.f}}); + hDaugCounter[kDaugChargedPion] = recoQAHist.add("hDaugPionCounter", "", HistType::kTH1F, {{9, 0.f, 9.f}}); + hDaugTPCNSigma[kDaugAlpha] = recoQAHist.add("hDaugAlphaTPCNSigma", "", HistType::kTH2F, {rigidityAxis, nsigmaAxis}); + hDaugTPCNSigma[kDaugTriton] = recoQAHist.add("hDaugTritonTPCNSigma", "", HistType::kTH2F, {rigidityAxis, nsigmaAxis}); + hDaugTPCNSigma[kDaugProton] = recoQAHist.add("hDaugProtonTPCNSigma", "", HistType::kTH2F, {rigidityAxis, nsigmaAxis}); + hDaugTPCNSigma[kDaugChargedPion] = recoQAHist.add("hDaugPionTPCNSigma", "", HistType::kTH2F, {rigidityAxis, nsigmaAxis}); + recoQAHist.add("hDaugAlphaITSNSigmaCheck", "", HistType::kTH2F, {rigidityAxis, itsnsigmaAxis}); + + hRecoMothCounter = recoQAHist.add("hRecoMothCounter", "", HistType::kTH1F, {{9, 0.f, 9.f}}); + hRecoDaugAlphaCounter = recoQAHist.add("hRecoDaugAlphaCounter", "", HistType::kTH1F, {{9, 0.f, 9.f}}); + for (const auto& hist : {hDaugCounter[kDaugAlpha], hDaugCounter[kDaugTriton], hDaugCounter[kDaugProton], hDaugCounter[kDaugChargedPion], hRecoMothCounter, hRecoDaugAlphaCounter}) { hist->GetXaxis()->SetBinLabel(1, "Generated"); hist->GetXaxis()->SetBinLabel(2, "Reconstructed"); hist->GetXaxis()->SetBinLabel(3, "eta"); @@ -832,11 +834,11 @@ struct Hyperhelium4sigmaQa { hist->GetXaxis()->SetBinLabel(9, "has TOF)"); } - recoQAHist.add("hMotherIsPVContributer", "", HistType::kTH1F, {{2, 0.f, 2.f}}); - recoQAHist.add("hMotherITSCls", "", HistType::kTH1F, {{8, 0.f, 8.f}}); - recoQAHist.add("hDauAlphaIsPVContributer", "", HistType::kTH1F, {{2, 0.f, 2.f}}); - recoQAHist.add("hDauAlphaITSCls", "", HistType::kTH1F, {{8, 0.f, 8.f}}); - recoQAHist.add("hDauAlphaITSNSigma", "", HistType::kTH2F, {rigidityAxis, itsnsigmaAxis}); + recoQAHist.add("hMothIsPVContributer", "", HistType::kTH1F, {{2, 0.f, 2.f}}); + recoQAHist.add("hMothITSCls", "", HistType::kTH1F, {{8, 0.f, 8.f}}); + recoQAHist.add("hDaugAlphaIsPVContributer", "", HistType::kTH1F, {{2, 0.f, 2.f}}); + recoQAHist.add("hDaugAlphaITSCls", "", HistType::kTH1F, {{8, 0.f, 8.f}}); + recoQAHist.add("hDaugAlphaITSNSigma", "", HistType::kTH2F, {rigidityAxis, itsnsigmaAxis}); recoQAHist.add("hReco2BDauAlphaPVsITSNSigma", "", HistType::kTH2F, {rigidityAxis, itsnsigmaAxis}); recoQAHist.add("hReco2BCandidateCount", "", HistType::kTH1F, {{4, 0.f, 4.f}}); } @@ -996,13 +998,13 @@ struct Hyperhelium4sigmaQa { // qa for mother tracks if (dChannel == k2body) { - recoQAHist.fill(HIST("hMother2BCounter"), 0); + recoQAHist.fill(HIST("hMoth2BCounter"), 0); } else { if (only2BodyDecay) { continue; // skip 3-body decays } } - recoQAHist.fill(HIST("hMotherCounter"), 0); + recoQAHist.fill(HIST("hMothCounter"), 0); genQAHist.fill(HIST("hGenHyperHelium4SigmaCounter"), 0.5); genQAHist.fill(HIST("hGenHyperHelium4SigmaCounter"), isMatter ? 1.5 : 2.5); @@ -1015,29 +1017,29 @@ struct Hyperhelium4sigmaQa { std::vector> dauMom(kNDaughterType, std::vector(3, -999.0f)); for (const auto& mcparticleDaughter : mcparticle.daughters_as()) { for (int type = 0; type < kNDaughterType; type++) { - if (std::abs(mcparticleDaughter.pdgCode()) == kDaughterPDG[type]) { + if (std::abs(mcparticleDaughter.pdgCode()) == kDaugghterPDG[type]) { dauMom[type][0] = mcparticleDaughter.px(); dauMom[type][1] = mcparticleDaughter.py(); dauMom[type][2] = mcparticleDaughter.pz(); - if (type <= kDauTriton) { + if (type <= kDaugTriton) { svPos[0] = mcparticleDaughter.vx(); svPos[1] = mcparticleDaughter.vy(); svPos[2] = mcparticleDaughter.vz(); } if (type < kNChargedDaughterType) { - hDauCounter[type]->Fill(0.f); + hDaugCounter[type]->Fill(0.f); // if daughter track is reconstructed if (type <= kNChargedDaughterType && mcPartIndices[mcparticleDaughter.globalIndex()] != -1) { auto track = tracks.rawIteratorAt(mcPartIndices[mcparticleDaughter.globalIndex()]); float tpcNSigma = getTPCNSigma(track, type); - daughterTrackCheck(track, hDauCounter[type], tpcNSigma); + daughterTrackCheck(track, hDaugCounter[type], tpcNSigma); if (track.hasTPC()) { - hDauTPCNSigma[type]->Fill(track.p() * track.sign(), tpcNSigma); + hDaugTPCNSigma[type]->Fill(track.p() * track.sign(), tpcNSigma); } - if (type == kDauAlpha && track.itsNCls() > kITSLayers - 2) { - recoQAHist.fill(HIST("hDauAlphaITSNSigmaCheck"), track.p() * track.sign(), itsResponse.nSigmaITS(track)); + if (type == kDaugAlpha && track.itsNCls() > kITSLayers - 2) { + recoQAHist.fill(HIST("hDaugAlphaITSNSigmaCheck"), track.p() * track.sign(), itsResponse.nSigmaITS(track)); } } } @@ -1053,9 +1055,9 @@ struct Hyperhelium4sigmaQa { // if mother track is reconstructed if (mcPartIndices[mcparticle.globalIndex()] != -1) { auto motherTrack = tracks.rawIteratorAt(mcPartIndices[mcparticle.globalIndex()]); - bool isGoodMother = motherTrackCheck(motherTrack, hMotherCounter); + bool isGoodMother = motherTrackCheck(motherTrack, hMothCounter); if (dChannel == k2body) { - motherTrackCheck(motherTrack, hMother2BCounter); + motherTrackCheck(motherTrack, hMoth2BCounter); } float svR = RecoDecay::sqrtSumOfSquares(svPos[0], svPos[1]); float diffpt = mcparticle.pt() - 2 * motherTrack.pt(); @@ -1069,6 +1071,7 @@ struct Hyperhelium4sigmaQa { recoQAHist.fill(HIST("h2GoodMotherDiffPtVsTrueSVR"), svR, diffpt); recoQAHist.fill(HIST("h2GoodMotherDiffPzVsTrueSVR"), svR, diffpz); } + // if mother track and charged daughters are all reconstructed bool isDauReconstructed = mcPartIndices[dauIDList[0]] != -1 && (dChannel == k2body ? true : mcPartIndices[dauIDList[1]] != -1); if (isDauReconstructed) { @@ -1077,20 +1080,20 @@ struct Hyperhelium4sigmaQa { // qa for bc matching for reconstructed tracks if (dChannel == k2body) { auto daughterTrack = tracks.rawIteratorAt(mcPartIndices[dauIDList[0]]); - bool isMoth = motherTrackCheck(motherTrack, hRecoMotherCounter); - bool isDaug = daughterTrackCheck(daughterTrack, hRecoDauAlphaCounter, daughterTrack.tpcNSigmaAl()); + bool isMoth = motherTrackCheck(motherTrack, hRecoMothCounter); + bool isDaug = daughterTrackCheck(daughterTrack, hRecoDaugAlphaCounter, daughterTrack.tpcNSigmaAl()); recoQAHist.fill(HIST("hReco2BCandidateCount"), 0.5); - recoQAHist.fill(HIST("hRecoMotherCounter"), 0.5); - recoQAHist.fill(HIST("hMotherITSCls"), motherTrack.itsNCls()); - recoQAHist.fill(HIST("hRecoDauAlphaCounter"), 0.5); - recoQAHist.fill(HIST("hMotherIsPVContributer"), motherTrack.isPVContributor() ? 1.5 : 0.5); - recoQAHist.fill(HIST("hDauAlphaIsPVContributer"), daughterTrack.isPVContributor() ? 1.5 : 0.5); + recoQAHist.fill(HIST("hRecoMothCounter"), 0.5); + recoQAHist.fill(HIST("hMothITSCls"), motherTrack.itsNCls()); + recoQAHist.fill(HIST("hRecoDaugAlphaCounter"), 0.5); + recoQAHist.fill(HIST("hMothIsPVContributer"), motherTrack.isPVContributor() ? 1.5 : 0.5); + recoQAHist.fill(HIST("hDaugAlphaIsPVContributer"), daughterTrack.isPVContributor() ? 1.5 : 0.5); float itsNSigma = itsResponse.nSigmaITS(daughterTrack); if (daughterTrack.hasITS()) { - recoQAHist.fill(HIST("hDauAlphaITSNSigma"), daughterTrack.sign() * daughterTrack.p(), itsNSigma); - recoQAHist.fill(HIST("hDauAlphaITSCls"), daughterTrack.itsNCls()); + recoQAHist.fill(HIST("hDaugAlphaITSNSigma"), daughterTrack.sign() * daughterTrack.p(), itsNSigma); + recoQAHist.fill(HIST("hDaugAlphaITSCls"), daughterTrack.itsNCls()); } if (motherTrack.has_collision() && daughterTrack.has_collision()) { @@ -1111,15 +1114,15 @@ struct Hyperhelium4sigmaQa { // qa for branching ratios and invariant mass if (dChannel == k2body) { genQAHist.fill(HIST("hGenHyperHelium4SigmaCounter"), isMatter ? 3.5 : 4.5); - float hyperHelium4SigmaMCMass = RecoDecay::m(std::array{std::array{dauMom[kDauAlpha][0], dauMom[kDauAlpha][1], dauMom[kDauAlpha][2]}, std::array{dauMom[kDauPion0][0], dauMom[kDauPion0][1], dauMom[kDauPion0][2]}}, std::array{o2::constants::physics::MassAlpha, o2::constants::physics::MassPi0}); + float hyperHelium4SigmaMCMass = RecoDecay::m(std::array{std::array{dauMom[kDaugAlpha][0], dauMom[kDaugAlpha][1], dauMom[kDaugAlpha][2]}, std::array{dauMom[kDaugPion0][0], dauMom[kDaugPion0][1], dauMom[kDaugPion0][2]}}, std::array{o2::constants::physics::MassAlpha, o2::constants::physics::MassPi0}); genQAHist.fill(HIST("hMcRecoInvMass"), hyperHelium4SigmaMCMass); } else if (dChannel == k3body_p) { genQAHist.fill(HIST("hGenHyperHelium4SigmaCounter"), isMatter ? 5.5 : 6.5); - float hyperHelium4SigmaMCMass = RecoDecay::m(std::array{std::array{dauMom[kDauTriton][0], dauMom[kDauTriton][1], dauMom[kDauTriton][2]}, std::array{dauMom[kDauProton][0], dauMom[kDauProton][1], dauMom[kDauProton][2]}, std::array{dauMom[kDauPion0][0], dauMom[kDauPion0][1], dauMom[kDauPion0][2]}}, std::array{o2::constants::physics::MassTriton, o2::constants::physics::MassProton, o2::constants::physics::MassPi0}); + float hyperHelium4SigmaMCMass = RecoDecay::m(std::array{std::array{dauMom[kDaugTriton][0], dauMom[kDaugTriton][1], dauMom[kDaugTriton][2]}, std::array{dauMom[kDaugProton][0], dauMom[kDaugProton][1], dauMom[kDaugProton][2]}, std::array{dauMom[kDaugPion0][0], dauMom[kDaugPion0][1], dauMom[kDaugPion0][2]}}, std::array{o2::constants::physics::MassTriton, o2::constants::physics::MassProton, o2::constants::physics::MassPi0}); genQAHist.fill(HIST("hMcRecoInvMass"), hyperHelium4SigmaMCMass); } else if (dChannel == k3body_n) { genQAHist.fill(HIST("hGenHyperHelium4SigmaCounter"), isMatter ? 7.5 : 8.5); - float hyperHelium4SigmaMCMass = RecoDecay::m(std::array{std::array{dauMom[kDauTriton][0], dauMom[kDauTriton][1], dauMom[kDauTriton][2]}, std::array{dauMom[kDauNeutron][0], dauMom[kDauNeutron][1], dauMom[kDauNeutron][2]}, std::array{dauMom[kDauChargedPion][0], dauMom[kDauChargedPion][1], dauMom[kDauChargedPion][2]}}, std::array{o2::constants::physics::MassTriton, o2::constants::physics::MassNeutron, o2::constants::physics::MassPiPlus}); + float hyperHelium4SigmaMCMass = RecoDecay::m(std::array{std::array{dauMom[kDaugTriton][0], dauMom[kDaugTriton][1], dauMom[kDaugTriton][2]}, std::array{dauMom[kDaugNeutron][0], dauMom[kDaugNeutron][1], dauMom[kDaugNeutron][2]}, std::array{dauMom[kDaugChargedPion][0], dauMom[kDaugChargedPion][1], dauMom[kDaugChargedPion][2]}}, std::array{o2::constants::physics::MassTriton, o2::constants::physics::MassNeutron, o2::constants::physics::MassPiPlus}); genQAHist.fill(HIST("hMcRecoInvMass"), hyperHelium4SigmaMCMass); } }