Skip to content
Closed
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
21 changes: 21 additions & 0 deletions PWGHF/D2H/DataModel/ReducedDataModel.h
Original file line number Diff line number Diff line change
Expand Up @@ -189,6 +189,7 @@ DECLARE_SOA_COLUMN(HasTOFProng2, hasTOFProng2, bool);
DECLARE_SOA_COLUMN(ItsNCls, itsNCls, int); //! Number of clusters in ITS
DECLARE_SOA_COLUMN(TpcNClsCrossedRows, tpcNClsCrossedRows, int); //! Number of TPC crossed rows
DECLARE_SOA_COLUMN(TpcChi2NCl, tpcChi2NCl, float); //! TPC chi2
DECLARE_SOA_COLUMN(ItsChi2NCl, itsChi2NCl, float); //! ITS chi2
DECLARE_SOA_COLUMN(ItsNClsProngMin, itsNClsProngMin, int); //! minimum value of number of ITS clusters for the decay daughter tracks
DECLARE_SOA_COLUMN(TpcNClsCrossedRowsProngMin, tpcNClsCrossedRowsProngMin, int); //! minimum value of number of TPC crossed rows for the decay daughter tracks
DECLARE_SOA_COLUMN(TpcChi2NClProngMax, tpcChi2NClProngMax, float); //! maximum value of TPC chi2 for the decay daughter tracks
Expand Down Expand Up @@ -299,6 +300,7 @@ DECLARE_SOA_TABLE(HfRedBach0Bases, "AOD", "HFREDBACH0BASE", //! Table with track
hf_track_vars_reduced::ItsNCls,
hf_track_vars_reduced::TpcNClsCrossedRows,
hf_track_vars_reduced::TpcChi2NCl,
hf_track_vars_reduced::ItsChi2NCl,
hf_track_vars_reduced::HasTPC,
hf_track_vars_reduced::HasTOF,
pidtpc::TPCNSigmaPi,
Expand Down Expand Up @@ -330,6 +332,7 @@ DECLARE_SOA_TABLE(HfRedBach1Bases, "AOD", "HFREDBACH1BASE", //! Table with track
hf_track_vars_reduced::ItsNCls,
hf_track_vars_reduced::TpcNClsCrossedRows,
hf_track_vars_reduced::TpcChi2NCl,
hf_track_vars_reduced::ItsChi2NCl,
hf_track_vars_reduced::HasTPC,
hf_track_vars_reduced::HasTOF,
pidtpc::TPCNSigmaPi,
Expand Down Expand Up @@ -388,6 +391,16 @@ DECLARE_SOA_COLUMN(ProngPosId, prongPosId, int); //! Original track
DECLARE_SOA_COLUMN(ProngNegId, prongNegId, int); //! Original track index
DECLARE_SOA_COLUMN(HfRedCollisionId, hfRedCollisionId, int); //! Collision index
DECLARE_SOA_COLUMN(M, m, float); //! Invariant mass of candidate in GeV/c2

DECLARE_SOA_COLUMN(ItsNClsDauPos, itsNClsDauPos, int); //! Number of clusters in ITS
DECLARE_SOA_COLUMN(TpcNClsCrossedRowsDauPos, tpcNClsCrossedRowsDauPos, int); //! Number of TPC crossed rows
DECLARE_SOA_COLUMN(TpcChi2NClDauPos, tpcChi2NClDauPos, float); //! TPC chi2 / Number of clusters
DECLARE_SOA_COLUMN(ItsChi2NClDauPos, itsChi2NClDauPos, float); //! ITS chi2 / Number of clusters
DECLARE_SOA_COLUMN(ItsNClsDauNeg, itsNClsDauNeg, int); //! Number of clusters in ITS
DECLARE_SOA_COLUMN(TpcNClsCrossedRowsDauNeg, tpcNClsCrossedRowsDauNeg, int); //! Number of TPC crossed rows
DECLARE_SOA_COLUMN(TpcChi2NClDauNeg, tpcChi2NClDauNeg, float); //! TPC chi2 / Number of clusters
DECLARE_SOA_COLUMN(ItsChi2NClDauNeg, itsChi2NClDauNeg, float); //! ITS chi2 / Number of clusters

DECLARE_SOA_COLUMN(XDauPos, xDauPos, float); //! x
DECLARE_SOA_COLUMN(XDauNeg, xDauNeg, float); //! x
DECLARE_SOA_COLUMN(YDauPos, yDauPos, float); //! y
Expand Down Expand Up @@ -556,6 +569,14 @@ DECLARE_SOA_TABLE(HfRedJpsis, "AOD", "HFREDJPSI", //! Table with J/Psi candidate
hf_track_index_reduced::HfRedCollisionId,
hf_cand::XSecondaryVertex, hf_cand::YSecondaryVertex, hf_cand::ZSecondaryVertex,
hf_jpsi_cand_reduced::M,
hf_jpsi_cand_reduced::ItsNClsDauPos,
hf_jpsi_cand_reduced::TpcNClsCrossedRowsDauPos,
hf_jpsi_cand_reduced::TpcChi2NClDauPos,
hf_jpsi_cand_reduced::ItsChi2NClDauPos,
hf_jpsi_cand_reduced::ItsNClsDauNeg,
hf_jpsi_cand_reduced::TpcNClsCrossedRowsDauNeg,
hf_jpsi_cand_reduced::TpcChi2NClDauNeg,
hf_jpsi_cand_reduced::ItsChi2NClDauNeg,
hf_jpsi_cand_reduced::XDauPos, hf_jpsi_cand_reduced::XDauNeg,
hf_jpsi_cand_reduced::YDauPos, hf_jpsi_cand_reduced::YDauNeg,
hf_jpsi_cand_reduced::ZDauPos, hf_jpsi_cand_reduced::ZDauNeg,
Expand Down
11 changes: 7 additions & 4 deletions PWGHF/D2H/TableProducer/dataCreatorJpsiHadReduced.cxx
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 PWGHF/D2H/TableProducer/dataCreatorJpsiHadReduced.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[pwghf/struct-member-order]

Declare struct members in the conventional order. See the PWGHF coding guidelines.
// See https://alice-o2.web.cern.ch/copyright for details of the copyright holders.
// All rights not expressly granted are reserved.
//
Expand Down Expand Up @@ -201,7 +201,7 @@

Preslice<aod::HfCand2ProngWPid> candsJpsiPerCollision = aod::track_association::collisionId;
Preslice<aod::TrackAssoc> trackIndicesPerCollision = aod::track_association::collisionId;
PresliceUnsorted<CollisionsWCMcLabels> colPerMcCollision = aod::mccollisionlabel::mcCollisionId;

Check failure on line 204 in PWGHF/D2H/TableProducer/dataCreatorJpsiHadReduced.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[pwghf/struct-member-order]

HfDataCreatorJpsiHadReduced: PresliceUnsorted< appears too early (before end of Preslice<).
Preslice<aod::McParticles> mcParticlesPerMcCollision = aod::mcparticle::mcCollisionId;

o2::base::Propagator::MatCorrType noMatCorr = o2::base::Propagator::MatCorrType::USEMatCorrNONE;
Expand Down Expand Up @@ -438,7 +438,8 @@
}

template <typename T1>
bool isSelectedJpsiDauPid(const T1& track) {
bool isSelectedJpsiDauPid(const T1& track)
{
int pidPion = -1;
int pidProton = -1;
int pidElectron = -1;
Expand Down Expand Up @@ -896,7 +897,7 @@
trackParCovBach.getX(), trackParCovBach.getAlpha(),
trackParCovBach.getY(), trackParCovBach.getZ(), trackParCovBach.getSnp(),
trackParCovBach.getTgl(), trackParCovBach.getQ2Pt(),
trackBach.itsNCls(), trackBach.tpcNClsCrossedRows(), trackBach.tpcChi2NCl(),
trackBach.itsNCls(), trackBach.tpcNClsCrossedRows(), trackBach.tpcChi2NCl(), trackBach.itsChi2NCl(),
trackBach.hasTPC(), trackBach.hasTOF(),
trackBach.tpcNSigmaPi(), trackBach.tofNSigmaPi(),
trackBach.tpcNSigmaKa(), trackBach.tofNSigmaKa(),
Expand Down Expand Up @@ -993,7 +994,7 @@
trackParCovBach.getX(), trackParCovBach.getAlpha(),
trackParCovBach.getY(), trackParCovBach.getZ(), trackParCovBach.getSnp(),
trackParCovBach.getTgl(), trackParCovBach.getQ2Pt(),
trackBach.itsNCls(), trackBach.tpcNClsCrossedRows(), trackBach.tpcChi2NCl(),
trackBach.itsNCls(), trackBach.tpcNClsCrossedRows(), trackBach.tpcChi2NCl(), trackBach.itsChi2NCl(),
trackBach.hasTPC(), trackBach.hasTOF(),
trackBach.tpcNSigmaPi(), trackBach.tofNSigmaPi(),
trackBach.tpcNSigmaKa(), trackBach.tofNSigmaKa(),
Expand All @@ -1017,7 +1018,7 @@
trackBach2ParCov.getX(), trackBach2ParCov.getAlpha(),
trackBach2ParCov.getY(), trackBach2ParCov.getZ(), trackBach2ParCov.getSnp(),
trackBach2ParCov.getTgl(), trackBach2ParCov.getQ2Pt(),
trackBach2.itsNCls(), trackBach2.tpcNClsCrossedRows(), trackBach2.tpcChi2NCl(),
trackBach2.itsNCls(), trackBach2.tpcNClsCrossedRows(), trackBach2.tpcChi2NCl(), trackBach2.itsChi2NCl(),
trackBach2.hasTPC(), trackBach2.hasTOF(),
trackBach2.tpcNSigmaPi(), trackBach2.tofNSigmaPi(),
trackBach2.tpcNSigmaKa(), trackBach2.tofNSigmaKa(),
Expand Down Expand Up @@ -1057,6 +1058,8 @@
indexHfReducedCollision,
candidate.xSecondaryVertex(), candidate.ySecondaryVertex(), candidate.zSecondaryVertex(),
invMassJpsi,
trackPos.itsNCls(), trackPos.tpcNClsCrossedRows(), trackPos.tpcChi2NCl(), trackPos.itsChi2NCl(),
trackNeg.itsNCls(), trackNeg.tpcNClsCrossedRows(), trackNeg.tpcChi2NCl(), trackNeg.itsChi2NCl(),
trackPosParCov.getX(), trackNegParCov.getX(),
trackPosParCov.getY(), trackNegParCov.getY(),
trackPosParCov.getZ(), trackNegParCov.getZ(),
Expand Down
81 changes: 54 additions & 27 deletions PWGHF/D2H/Tasks/taskBplusToJpsiKReduced.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -63,15 +63,21 @@ namespace hf_cand_bplustojpsik_lite
{
DECLARE_SOA_COLUMN(PtJpsi, ptJpsi, float); //! Transverse momentum of Jpsi daughter candidate (GeV/c)
DECLARE_SOA_COLUMN(PtBach, ptBach, float); //! Transverse momentum of bachelor kaon (GeV/c)
// DECLARE_SOA_COLUMN(AbsEtaBach, absEtaBach, float); //! Absolute pseudorapidity of bachelor kaon
// DECLARE_SOA_COLUMN(ItsNClsBach, itsNClsBach, int); //! Number of ITS clusters of bachelor kaon
// DECLARE_SOA_COLUMN(TpcNClsCrossedRowsBach, tpcNClsCrossedRowsBach, int); //! Number of TPC crossed rows of prongs of bachelor kaon
// DECLARE_SOA_COLUMN(TpcChi2NClBach, tpcChi2NClBach, float); //! Maximum TPC chi2 of prongs of Jpsi-meson daughter candidate
// DECLARE_SOA_COLUMN(PtJpsiProngMin, ptJpsiProngMin, float); //! Minimum pT of prongs of Jpsi daughter candidate (GeV/c)
// DECLARE_SOA_COLUMN(AbsEtaJpsiProngMin, absEtaJpsiProngMin, float); //! Minimum absolute pseudorapidity of prongs of Jpsi daughter candidate
// DECLARE_SOA_COLUMN(ItsNClsJpsiProngMin, itsNClsJpsiProngMin, int); //! Minimum number of ITS clusters of prongs of Jpsi daughter candidate
// DECLARE_SOA_COLUMN(TpcNClsCrossedRowsJpsiProngMin, tpcNClsCrossedRowsJpsiProngMin, int); //! Minimum number of TPC crossed rows of prongs of Jpsi daughter candidate
// DECLARE_SOA_COLUMN(TpcChi2NClJpsiProngMax, tpcChi2NClJpsiProngMax, float); //! Maximum TPC chi2 of prongs of Jpsi daughter candidate
DECLARE_SOA_COLUMN(ItsNClsJpsiDauPos, itsNClsJpsiDauPos, int); //! Number of clusters in ITS
DECLARE_SOA_COLUMN(TpcNClsCrossedRowsJpsiDauPos, tpcNClsCrossedRowsJpsiDauPos, int); //! Number of TPC crossed rows
DECLARE_SOA_COLUMN(ItsChi2NClJpsiDauPos, itsChi2NClJpsiDauPos, float); //! ITS chi2 / Number of clusters
DECLARE_SOA_COLUMN(TpcChi2NClJpsiDauPos, tpcChi2NClJpsiDauPos, float); //! TPC chi2 / Number of clusters
DECLARE_SOA_COLUMN(AbsEtaJpsiDauPos, absEtaJpsiDauPos, float); //! |eta|
DECLARE_SOA_COLUMN(ItsNClsJpsiDauNeg, itsNClsJpsiDauNeg, int); //! Number of clusters in ITS
DECLARE_SOA_COLUMN(TpcNClsCrossedRowsJpsiDauNeg, tpcNClsCrossedRowsJpsiDauNeg, int); //! Number of TPC crossed rows
DECLARE_SOA_COLUMN(ItsChi2NClJpsiDauNeg, itsChi2NClJpsiDauNeg, float); //! ITS chi2 / Number of clusters
DECLARE_SOA_COLUMN(TpcChi2NClJpsiDauNeg, tpcChi2NClJpsiDauNeg, float); //! TPC chi2 / Number of clusters
DECLARE_SOA_COLUMN(AbsEtaJpsiDauNeg, absEtaJpsiDauNeg, float); //! |eta|
DECLARE_SOA_COLUMN(ItsNClsLfTrack0, itsNClsLfTrack0, int); //! Number of clusters in ITS
DECLARE_SOA_COLUMN(TpcNClsCrossedRowsLfTrack0, tpcNClsCrossedRowsLfTrack0, int); //! Number of TPC crossed rows
DECLARE_SOA_COLUMN(ItsChi2NClLfTrack0, itsChi2NClLfTrack0, float); //! ITS chi2 / Number of clusters
DECLARE_SOA_COLUMN(TpcChi2NClLfTrack0, tpcChi2NClLfTrack0, float); //! TPC chi2 / Number of clusters
DECLARE_SOA_COLUMN(AbsEtaLfTrack0, absEtaLfTrack0, float); //! |eta|
DECLARE_SOA_COLUMN(MJpsi, mJpsi, float); //! Invariant mass of Jpsi daughter candidates (GeV/c)
DECLARE_SOA_COLUMN(M, m, float); //! Invariant mass of candidate (GeV/c2)
DECLARE_SOA_COLUMN(Pt, pt, float); //! Transverse momentum of candidate (GeV/c)
Expand Down Expand Up @@ -134,17 +140,24 @@ DECLARE_SOA_TABLE(HfRedCandBpLites, "AOD", "HFREDCANDBPLITE", //! Table with som
hf_cand_bplustojpsik_lite::ImpactParameterJpsiDauPos,
hf_cand_bplustojpsik_lite::ImpactParameterJpsiDauNeg,
hf_cand_bplustojpsik_lite::ImpactParameterLfTrack0,
// hf_cand_bplustojpsik_lite::PtJpsiProngMin,
// hf_cand_bplustojpsik_lite::AbsEtaJpsiProngMin,
// hf_cand_bplustojpsik_lite::ItsNClsJpsiProngMin,
// hf_cand_bplustojpsik_lite::TpcNClsCrossedRowsJpsiProngMin,
// hf_cand_bplustojpsik_lite::TpcChi2NClJpsiProngMax,
// Jpsi daughter features
hf_cand_bplustojpsik_lite::ItsNClsJpsiDauPos,
hf_cand_bplustojpsik_lite::TpcNClsCrossedRowsJpsiDauPos,
hf_cand_bplustojpsik_lite::ItsChi2NClJpsiDauPos,
hf_cand_bplustojpsik_lite::TpcChi2NClJpsiDauPos,
hf_cand_bplustojpsik_lite::AbsEtaJpsiDauPos,
hf_cand_bplustojpsik_lite::ItsNClsJpsiDauNeg,
hf_cand_bplustojpsik_lite::TpcNClsCrossedRowsJpsiDauNeg,
hf_cand_bplustojpsik_lite::ItsChi2NClJpsiDauNeg,
hf_cand_bplustojpsik_lite::TpcChi2NClJpsiDauNeg,
hf_cand_bplustojpsik_lite::AbsEtaJpsiDauNeg,
// kaon features
hf_cand_bplustojpsik_lite::PtBach,
// hf_cand_bplustojpsik_lite::AbsEtaBach,
// hf_cand_bplustojpsik_lite::ItsNClsBach,
// hf_cand_bplustojpsik_lite::TpcNClsCrossedRowsBach,
// hf_cand_bplustojpsik_lite::TpcChi2NClBach,
hf_cand_bplustojpsik_lite::ItsNClsLfTrack0,
hf_cand_bplustojpsik_lite::TpcNClsCrossedRowsLfTrack0,
hf_cand_bplustojpsik_lite::ItsChi2NClLfTrack0,
hf_cand_bplustojpsik_lite::TpcChi2NClLfTrack0,
hf_cand_bplustojpsik_lite::AbsEtaLfTrack0,
hf_cand_bplustojpsik_lite::NSigTpcKaBachelor,
hf_cand_bplustojpsik_lite::NSigTofKaBachelor,
hf_cand_bplustojpsik_lite::NSigTpcTofKaBachelor,
Expand Down Expand Up @@ -306,6 +319,14 @@ struct HfTaskBplusToJpsiKReduced {
return std::abs(etaProng) <= etaTrackMax && ptProng >= ptTrackMin;
}

/// Calculate pseudorapidity from track tan(lambda)
/// \param tgl is the track tangent of the dip angle
/// \return pseudorapidity
inline float absEta(float tgl)
{
return std::abs(std::log(std::tan(o2::constants::math::PIQuarter - 0.5f * std::atan(tgl))));
}

/// Fill candidate information at reconstruction level
/// \param doMc is the flag to enable the filling with MC information
/// \param withBplusMl is the flag to enable the filling with ML scores for the B+ candidate
Expand Down Expand Up @@ -415,17 +436,23 @@ struct HfTaskBplusToJpsiKReduced {
candidate.impactParameter0(),
candidate.impactParameter1(),
candidate.impactParameter2(),
// candJpsi.ptProngMin(),
// candJpsi.absEtaProngMin(),
// candJpsi.itsNClsProngMin(),
// candJpsi.tpcNClsCrossedRowsProngMin(),
// candJpsi.tpcChi2NClProngMax(),
candJpsi.itsNClsDauPos(),
candJpsi.tpcNClsCrossedRowsDauPos(),
candJpsi.itsChi2NClDauPos(),
candJpsi.tpcChi2NClDauPos(),
absEta(candJpsi.tglDauPos()),
candJpsi.itsNClsDauNeg(),
candJpsi.tpcNClsCrossedRowsDauNeg(),
candJpsi.itsChi2NClDauNeg(),
candJpsi.tpcChi2NClDauNeg(),
absEta(candJpsi.tglDauNeg()),
// kaon features
candidate.ptProng1(),
// std::abs(RecoDecay::eta(candKa.pVector())),
// candKa.itsNCls(),
// candKa.tpcNClsCrossedRows(),
// candKa.tpcChi2NCl(),
candKa.itsNCls(),
candKa.tpcNClsCrossedRows(),
candKa.itsChi2NCl(),
candKa.tpcChi2NCl(),
absEta(candKa.tgl()),
candKa.tpcNSigmaKa(),
candKa.tofNSigmaKa(),
candKa.tpcTofNSigmaKa(),
Expand Down
Loading
Loading