Skip to content

Commit

Permalink
Please consider the following formatting changes
Browse files Browse the repository at this point in the history
  • Loading branch information
alibuild committed Sep 26, 2024
1 parent 1122d03 commit e1c25e7
Show file tree
Hide file tree
Showing 4 changed files with 76 additions and 68 deletions.
51 changes: 30 additions & 21 deletions Common/Core/TrackSelectorPID.h
Original file line number Diff line number Diff line change
Expand Up @@ -84,31 +84,35 @@ class TrackSelectorPidBase
}

/// Set the custom value of TPC nσ vs. pion hypothesis to be used for selections
void setCustomNSigmaTpcPi(float nSigma) {
void setCustomNSigmaTpcPi(float nSigma)
{
mUseCustomNSigmaTpcPi = true;
mCustomNSigmaTpcPi = nSigma;
}
/// Set the custom value of TPC nσ vs. kaon hypothesis to be used for selections
void setCustomNSigmaTpcKa(float nSigma) {
void setCustomNSigmaTpcKa(float nSigma)
{
mUseCustomNSigmaTpcKa = true;
mCustomNSigmaTpcKa = nSigma;
}
/// Set the custom value of TPC nσ vs. proton hypothesis to be used for selections
void setCustomNSigmaTpcPr(float nSigma) {
void setCustomNSigmaTpcPr(float nSigma)
{
mUseCustomNSigmaTpcPr = true;
mCustomNSigmaTpcPr = nSigma;
}
/// Set the custom value of TPC nσ vs. muon hypothesis to be used for selections
void setCustomNSigmaTpcMu(float nSigma) {
void setCustomNSigmaTpcMu(float nSigma)
{
mUseCustomNSigmaTpcMu = true;
mCustomNSigmaTpcMu = nSigma;
}
/// Set the custom value of TPC nσ vs. electron hypothesis to be used for selections
void setCustomNSigmaTpcEl(float nSigma) {
void setCustomNSigmaTpcEl(float nSigma)
{
mUseCustomNSigmaTpcEl = true;
mCustomNSigmaTpcEl = nSigma;
}


/// Set TPC nσ range in which a track should be conditionally accepted if combined with TOF. Set to 0 to disable.
void setRangeNSigmaTpcCondTof(float nsMin, float nsMax)
Expand Down Expand Up @@ -199,27 +203,32 @@ class TrackSelectorPidBase
}

/// Set the custom value of TOF nσ vs. pion hypothesis to be used for selections
void setCustomNSigmaTofPi(float nSigma) {
void setCustomNSigmaTofPi(float nSigma)
{
mUseCustomNSigmaTofPi = true;
mCustomNSigmaTofPi = nSigma;
}
/// Set the custom value of TOF nσ vs. kaon hypothesis to be used for selections
void setCustomNSigmaTofKa(float nSigma) {
void setCustomNSigmaTofKa(float nSigma)
{
mUseCustomNSigmaTofKa = true;
mCustomNSigmaTofKa = nSigma;
}
/// Set the custom value of TOF nσ vs. proton hypothesis to be used for selections
void setCustomNSigmaTofPr(float nSigma) {
void setCustomNSigmaTofPr(float nSigma)
{
mUseCustomNSigmaTofPr = true;
mCustomNSigmaTofPr = nSigma;
}
/// Set the custom value of TOF nσ vs. muon hypothesis to be used for selections
void setCustomNSigmaTofMu(float nSigma) {
void setCustomNSigmaTofMu(float nSigma)
{
mUseCustomNSigmaTofMu = true;
mCustomNSigmaTofMu = nSigma;
}
/// Set the custom value of TOF nσ vs. electron hypothesis to be used for selections
void setCustomNSigmaTofEl(float nSigma) {
void setCustomNSigmaTofEl(float nSigma)
{
mUseCustomNSigmaTofEl = true;
mCustomNSigmaTofEl = nSigma;
}
Expand Down Expand Up @@ -665,11 +674,11 @@ class TrackSelectorPidBase
float mNSigmaTpcMax = 3.; ///< maximum number of TPC σ
float mNSigmaTpcMinCondTof = 0.; ///< minimum number of TPC σ if combined with TOF
float mNSigmaTpcMaxCondTof = 0.; ///< maximum number of TPC σ if combined with TOF
bool mUseCustomNSigmaTpcPi = false; ///< enable the usage of a custom value of TPC nσ vs. pion hypothesis
bool mUseCustomNSigmaTpcKa = false; ///< enable the usage of a custom value of TPC nσ vs. kaon hypothesis
bool mUseCustomNSigmaTpcPr = false; ///< enable the usage of a custom value of TPC nσ vs. proton hypothesis
bool mUseCustomNSigmaTpcMu = false; ///< enable the usage of a custom value of TPC nσ vs. muon hypothesis
bool mUseCustomNSigmaTpcEl = false; ///< enable the usage of a custom value of TPC nσ vs. electron hypothesis
bool mUseCustomNSigmaTpcPi = false; ///< enable the usage of a custom value of TPC nσ vs. pion hypothesis
bool mUseCustomNSigmaTpcKa = false; ///< enable the usage of a custom value of TPC nσ vs. kaon hypothesis
bool mUseCustomNSigmaTpcPr = false; ///< enable the usage of a custom value of TPC nσ vs. proton hypothesis
bool mUseCustomNSigmaTpcMu = false; ///< enable the usage of a custom value of TPC nσ vs. muon hypothesis
bool mUseCustomNSigmaTpcEl = false; ///< enable the usage of a custom value of TPC nσ vs. electron hypothesis
float mCustomNSigmaTpcPi = -99999.f; ///< custom value of TPC nσ vs. pion hypothesis to be used for selections
float mCustomNSigmaTpcKa = -99999.f; ///< custom value of TPC nσ vs. kaon hypothesis to be used for selections
float mCustomNSigmaTpcPr = -99999.f; ///< custom value of TPC nσ vs. proton hypothesis to be used for selections
Expand All @@ -683,11 +692,11 @@ class TrackSelectorPidBase
float mNSigmaTofMax = 3.; ///< maximum number of TOF σ
float mNSigmaTofMinCondTpc = 0.; ///< minimum number of TOF σ if combined with TPC
float mNSigmaTofMaxCondTpc = 0.; ///< maximum number of TOF σ if combined with TPC
bool mUseCustomNSigmaTofPi = false; ///< enable the usage of a custom value of TOF nσ vs. pion hypothesis
bool mUseCustomNSigmaTofKa = false; ///< enable the usage of a custom value of TOF nσ vs. kaon hypothesis
bool mUseCustomNSigmaTofPr = false; ///< enable the usage of a custom value of TOF nσ vs. proton hypothesis
bool mUseCustomNSigmaTofMu = false; ///< enable the usage of a custom value of TOF nσ vs. muon hypothesis
bool mUseCustomNSigmaTofEl = false; ///< enable the usage of a custom value of TOF nσ vs. electron hypothesis
bool mUseCustomNSigmaTofPi = false; ///< enable the usage of a custom value of TOF nσ vs. pion hypothesis
bool mUseCustomNSigmaTofKa = false; ///< enable the usage of a custom value of TOF nσ vs. kaon hypothesis
bool mUseCustomNSigmaTofPr = false; ///< enable the usage of a custom value of TOF nσ vs. proton hypothesis
bool mUseCustomNSigmaTofMu = false; ///< enable the usage of a custom value of TOF nσ vs. muon hypothesis
bool mUseCustomNSigmaTofEl = false; ///< enable the usage of a custom value of TOF nσ vs. electron hypothesis
float mCustomNSigmaTofPi = -99999.f; ///< custom value of TOF nσ vs. pion hypothesis to be used for selections
float mCustomNSigmaTofKa = -99999.f; ///< custom value of TOF nσ vs. kaon hypothesis to be used for selections
float mCustomNSigmaTofPr = -99999.f; ///< custom value of TOF nσ vs. proton hypothesis to be used for selections
Expand Down
38 changes: 19 additions & 19 deletions PWGHF/Core/HfMlResponseD0ToKPi.h
Original file line number Diff line number Diff line change
Expand Up @@ -90,13 +90,13 @@
// where GETTER1 and GETTER2 are methods of the OBJECT, and the variable
// is filled depending on whether it is a D0 or a D0bar
#define CHECK_AND_FILL_VEC_D0_SIGNED(OBJECT, FEATURE, GETTER1, GETTER2) \
case static_cast<uint8_t>(InputFeaturesD0ToKPi::FEATURE): { \
if (pdgCode == o2::constants::physics::kD0) { \
inputFeatures.emplace_back(OBJECT.GETTER1()); \
} else { \
inputFeatures.emplace_back(OBJECT.GETTER2()); \
} \
break; \
case static_cast<uint8_t>(InputFeaturesD0ToKPi::FEATURE): { \
if (pdgCode == o2::constants::physics::kD0) { \
inputFeatures.emplace_back(OBJECT.GETTER1()); \
} else { \
inputFeatures.emplace_back(OBJECT.GETTER2()); \
} \
break; \
}

namespace o2::analysis
Expand Down Expand Up @@ -186,10 +186,10 @@ class HfMlResponseD0ToKPi : public HfMlResponse<TypeOutputScore>
CHECK_AND_FILL_VEC_D0_FULL(candidate, nSigTpcKa0, /*getter*/ nSigTpcKa0);
CHECK_AND_FILL_VEC_D0_FULL(candidate, nSigTpcPi1, /*getter*/ nSigTpcPi1);
CHECK_AND_FILL_VEC_D0_FULL(candidate, nSigTpcKa1, /*getter*/ nSigTpcKa1);
//CHECK_AND_FILL_VEC_D0_OBJECT_HFHELPER_SIGNED(prong0, prong1, nSigTpcPiExpPi, tpcNSigmaPi);
//CHECK_AND_FILL_VEC_D0_OBJECT_HFHELPER_SIGNED(prong0, prong1, nSigTpcKaExpPi, tpcNSigmaKa);
//CHECK_AND_FILL_VEC_D0_OBJECT_HFHELPER_SIGNED(prong1, prong0, nSigTpcPiExpKa, tpcNSigmaPi);
//CHECK_AND_FILL_VEC_D0_OBJECT_HFHELPER_SIGNED(prong1, prong0, nSigTpcKaExpKa, tpcNSigmaKa);
// CHECK_AND_FILL_VEC_D0_OBJECT_HFHELPER_SIGNED(prong0, prong1, nSigTpcPiExpPi, tpcNSigmaPi);
// CHECK_AND_FILL_VEC_D0_OBJECT_HFHELPER_SIGNED(prong0, prong1, nSigTpcKaExpPi, tpcNSigmaKa);
// CHECK_AND_FILL_VEC_D0_OBJECT_HFHELPER_SIGNED(prong1, prong0, nSigTpcPiExpKa, tpcNSigmaPi);
// CHECK_AND_FILL_VEC_D0_OBJECT_HFHELPER_SIGNED(prong1, prong0, nSigTpcKaExpKa, tpcNSigmaKa);
CHECK_AND_FILL_VEC_D0_SIGNED(candidate, nSigTpcPiExpPi, nSigTpcPi0, nSigTpcPi1);
CHECK_AND_FILL_VEC_D0_SIGNED(candidate, nSigTpcKaExpPi, nSigTpcKa0, nSigTpcKa1);
CHECK_AND_FILL_VEC_D0_SIGNED(candidate, nSigTpcPiExpKa, nSigTpcPi1, nSigTpcPi0);
Expand All @@ -199,10 +199,10 @@ class HfMlResponseD0ToKPi : public HfMlResponse<TypeOutputScore>
CHECK_AND_FILL_VEC_D0_FULL(candidate, nSigTofKa0, /*getter*/ nSigTofKa0);
CHECK_AND_FILL_VEC_D0_FULL(candidate, nSigTofPi1, /*getter*/ nSigTofPi1);
CHECK_AND_FILL_VEC_D0_FULL(candidate, nSigTofKa1, /*getter*/ nSigTofKa1);
//CHECK_AND_FILL_VEC_D0_OBJECT_HFHELPER_SIGNED(prong0, prong1, nSigTofPiExpPi, tofNSigmaPi);
//CHECK_AND_FILL_VEC_D0_OBJECT_HFHELPER_SIGNED(prong0, prong1, nSigTofKaExpPi, tofNSigmaKa);
//CHECK_AND_FILL_VEC_D0_OBJECT_HFHELPER_SIGNED(prong1, prong0, nSigTofPiExpKa, tofNSigmaPi);
//CHECK_AND_FILL_VEC_D0_OBJECT_HFHELPER_SIGNED(prong1, prong0, nSigTofKaExpKa, tofNSigmaKa);
// CHECK_AND_FILL_VEC_D0_OBJECT_HFHELPER_SIGNED(prong0, prong1, nSigTofPiExpPi, tofNSigmaPi);
// CHECK_AND_FILL_VEC_D0_OBJECT_HFHELPER_SIGNED(prong0, prong1, nSigTofKaExpPi, tofNSigmaKa);
// CHECK_AND_FILL_VEC_D0_OBJECT_HFHELPER_SIGNED(prong1, prong0, nSigTofPiExpKa, tofNSigmaPi);
// CHECK_AND_FILL_VEC_D0_OBJECT_HFHELPER_SIGNED(prong1, prong0, nSigTofKaExpKa, tofNSigmaKa);
CHECK_AND_FILL_VEC_D0_SIGNED(candidate, nSigTofPiExpPi, nSigTofPi0, nSigTofPi1);
CHECK_AND_FILL_VEC_D0_SIGNED(candidate, nSigTofKaExpPi, nSigTofKa0, nSigTofKa1);
CHECK_AND_FILL_VEC_D0_SIGNED(candidate, nSigTofPiExpKa, nSigTofPi1, nSigTofPi0);
Expand All @@ -212,10 +212,10 @@ class HfMlResponseD0ToKPi : public HfMlResponse<TypeOutputScore>
CHECK_AND_FILL_VEC_D0_FULL(candidate, nSigTpcTofKa0, tpcTofNSigmaKa0);
CHECK_AND_FILL_VEC_D0_FULL(candidate, nSigTpcTofPi1, tpcTofNSigmaPi1);
CHECK_AND_FILL_VEC_D0_FULL(candidate, nSigTpcTofKa1, tpcTofNSigmaKa1);
//CHECK_AND_FILL_VEC_D0_OBJECT_HFHELPER_SIGNED(prong0, prong1, nSigTpcTofPiExpPi, tpcTofNSigmaPi);
//CHECK_AND_FILL_VEC_D0_OBJECT_HFHELPER_SIGNED(prong0, prong1, nSigTpcTofKaExpPi, tpcTofNSigmaKa);
//CHECK_AND_FILL_VEC_D0_OBJECT_HFHELPER_SIGNED(prong1, prong0, nSigTpcTofPiExpKa, tpcTofNSigmaPi);
//CHECK_AND_FILL_VEC_D0_OBJECT_HFHELPER_SIGNED(prong1, prong0, nSigTpcTofKaExpKa, tpcTofNSigmaKa);
// CHECK_AND_FILL_VEC_D0_OBJECT_HFHELPER_SIGNED(prong0, prong1, nSigTpcTofPiExpPi, tpcTofNSigmaPi);
// CHECK_AND_FILL_VEC_D0_OBJECT_HFHELPER_SIGNED(prong0, prong1, nSigTpcTofKaExpPi, tpcTofNSigmaKa);
// CHECK_AND_FILL_VEC_D0_OBJECT_HFHELPER_SIGNED(prong1, prong0, nSigTpcTofPiExpKa, tpcTofNSigmaPi);
// CHECK_AND_FILL_VEC_D0_OBJECT_HFHELPER_SIGNED(prong1, prong0, nSigTpcTofKaExpKa, tpcTofNSigmaKa);
CHECK_AND_FILL_VEC_D0_SIGNED(candidate, nSigTpcTofPiExpPi, tpcTofNSigmaPi0, tpcTofNSigmaPi1);
CHECK_AND_FILL_VEC_D0_SIGNED(candidate, nSigTpcTofKaExpPi, tpcTofNSigmaKa0, tpcTofNSigmaKa1);
CHECK_AND_FILL_VEC_D0_SIGNED(candidate, nSigTpcTofPiExpKa, tpcTofNSigmaPi1, tpcTofNSigmaPi0);
Expand Down
36 changes: 18 additions & 18 deletions PWGHF/DataModel/CandidateReconstructionTables.h
Original file line number Diff line number Diff line change
Expand Up @@ -483,24 +483,24 @@ DECLARE_SOA_COLUMN(ErrorImpactParameterZ2, errorImpactParameterZ2, float);
DECLARE_SOA_DYNAMIC_COLUMN(ImpactParameterZNormalised2, impactParameterZNormalised2, //!
[](float dca, float err) -> float { return dca / err; });
DECLARE_SOA_COLUMN(NProngsContributorsPV, nProngsContributorsPV, uint8_t); //! number of prongs contributing to the primary-vertex reconstruction
DECLARE_SOA_COLUMN(NSigTpcPi0, nSigTpcPi0, float); //! TPC nSigma for pion hypothesis - prong 0
DECLARE_SOA_COLUMN(NSigTpcPi1, nSigTpcPi1, float); //! TPC nSigma for pion hypothesis - prong 1
DECLARE_SOA_COLUMN(NSigTpcPi2, nSigTpcPi2, float); //! TPC nSigma for pion hypothesis - prong 2
DECLARE_SOA_COLUMN(NSigTpcKa0, nSigTpcKa0, float); //! TPC nSigma for kaon hypothesis - prong 0
DECLARE_SOA_COLUMN(NSigTpcKa1, nSigTpcKa1, float); //! TPC nSigma for kaon hypothesis - prong 1
DECLARE_SOA_COLUMN(NSigTpcKa2, nSigTpcKa2, float); //! TPC nSigma for kaon hypothesis - prong 2
DECLARE_SOA_COLUMN(NSigTpcPr0, nSigTpcPr0, float); //! TPC nSigma for proton hypothesis - prong 0
DECLARE_SOA_COLUMN(NSigTpcPr1, nSigTpcPr1, float); //! TPC nSigma for proton hypothesis - prong 1
DECLARE_SOA_COLUMN(NSigTpcPr2, nSigTpcPr2, float); //! TPC nSigma for proton hypothesis - prong 2
DECLARE_SOA_COLUMN(NSigTofPi0, nSigTofPi0, float); //! TOF nSigma for pion hypothesis - prong 0
DECLARE_SOA_COLUMN(NSigTofPi1, nSigTofPi1, float); //! TOF nSigma for pion hypothesis - prong 1
DECLARE_SOA_COLUMN(NSigTofPi2, nSigTofPi2, float); //! TOF nSigma for pion hypothesis - prong 2
DECLARE_SOA_COLUMN(NSigTofKa0, nSigTofKa0, float); //! TOF nSigma for kaon hypothesis - prong 0
DECLARE_SOA_COLUMN(NSigTofKa1, nSigTofKa1, float); //! TOF nSigma for kaon hypothesis - prong 1
DECLARE_SOA_COLUMN(NSigTofKa2, nSigTofKa2, float); //! TOF nSigma for kaon hypothesis - prong 2
DECLARE_SOA_COLUMN(NSigTofPr0, nSigTofPr0, float); //! TOF nSigma for proton hypothesis - prong 0
DECLARE_SOA_COLUMN(NSigTofPr1, nSigTofPr1, float); //! TOF nSigma for proton hypothesis - prong 1
DECLARE_SOA_COLUMN(NSigTofPr2, nSigTofPr2, float); //! TOF nSigma for proton hypothesis - prong 2
DECLARE_SOA_COLUMN(NSigTpcPi0, nSigTpcPi0, float); //! TPC nSigma for pion hypothesis - prong 0
DECLARE_SOA_COLUMN(NSigTpcPi1, nSigTpcPi1, float); //! TPC nSigma for pion hypothesis - prong 1
DECLARE_SOA_COLUMN(NSigTpcPi2, nSigTpcPi2, float); //! TPC nSigma for pion hypothesis - prong 2
DECLARE_SOA_COLUMN(NSigTpcKa0, nSigTpcKa0, float); //! TPC nSigma for kaon hypothesis - prong 0
DECLARE_SOA_COLUMN(NSigTpcKa1, nSigTpcKa1, float); //! TPC nSigma for kaon hypothesis - prong 1
DECLARE_SOA_COLUMN(NSigTpcKa2, nSigTpcKa2, float); //! TPC nSigma for kaon hypothesis - prong 2
DECLARE_SOA_COLUMN(NSigTpcPr0, nSigTpcPr0, float); //! TPC nSigma for proton hypothesis - prong 0
DECLARE_SOA_COLUMN(NSigTpcPr1, nSigTpcPr1, float); //! TPC nSigma for proton hypothesis - prong 1
DECLARE_SOA_COLUMN(NSigTpcPr2, nSigTpcPr2, float); //! TPC nSigma for proton hypothesis - prong 2
DECLARE_SOA_COLUMN(NSigTofPi0, nSigTofPi0, float); //! TOF nSigma for pion hypothesis - prong 0
DECLARE_SOA_COLUMN(NSigTofPi1, nSigTofPi1, float); //! TOF nSigma for pion hypothesis - prong 1
DECLARE_SOA_COLUMN(NSigTofPi2, nSigTofPi2, float); //! TOF nSigma for pion hypothesis - prong 2
DECLARE_SOA_COLUMN(NSigTofKa0, nSigTofKa0, float); //! TOF nSigma for kaon hypothesis - prong 0
DECLARE_SOA_COLUMN(NSigTofKa1, nSigTofKa1, float); //! TOF nSigma for kaon hypothesis - prong 1
DECLARE_SOA_COLUMN(NSigTofKa2, nSigTofKa2, float); //! TOF nSigma for kaon hypothesis - prong 2
DECLARE_SOA_COLUMN(NSigTofPr0, nSigTofPr0, float); //! TOF nSigma for proton hypothesis - prong 0
DECLARE_SOA_COLUMN(NSigTofPr1, nSigTofPr1, float); //! TOF nSigma for proton hypothesis - prong 1
DECLARE_SOA_COLUMN(NSigTofPr2, nSigTofPr2, float); //! TOF nSigma for proton hypothesis - prong 2
// candidate properties
DECLARE_SOA_DYNAMIC_COLUMN(Pt, pt, //!
[](float px, float py) -> float { return RecoDecay::pt(px, py); });
Expand Down
19 changes: 9 additions & 10 deletions PWGHF/TableProducer/pidCreator.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -136,22 +136,21 @@ struct HfPidCreator {
#undef PROCESS_PID

// Macro for declaring process functions per species taking PID information from the candidate table
#define PROCESS_PID_CANDIDATE_2PRONG(_Species_, _Id0_, _Id1_) \
void processPIDCand2ProngFull##_Species_(aod::HfCand2Prong const& candidates) \
{ \
for (const auto& candidate : candidates) { \
cand2ProngPidFull##_Species_(combineNSigma<false>(candidate.nSigTpc##_Species_##_Id0_(), candidate.nSigTof##_Species_##_Id0_()), \
combineNSigma<false>(candidate.nSigTpc##_Species_##_Id1_(), candidate.nSigTof##_Species_##_Id1_())); \
} \
} \
PROCESS_SWITCH(HfPidCreator, processPIDCand2ProngFull##_Species_, "Process 2-prong candidate full " #_Species_, false); \
#define PROCESS_PID_CANDIDATE_2PRONG(_Species_, _Id0_, _Id1_) \
void processPIDCand2ProngFull##_Species_(aod::HfCand2Prong const& candidates) \
{ \
for (const auto& candidate : candidates) { \
cand2ProngPidFull##_Species_(combineNSigma<false>(candidate.nSigTpc##_Species_##_Id0_(), candidate.nSigTof##_Species_##_Id0_()), \
combineNSigma<false>(candidate.nSigTpc##_Species_##_Id1_(), candidate.nSigTof##_Species_##_Id1_())); \
} \
} \
PROCESS_SWITCH(HfPidCreator, processPIDCand2ProngFull##_Species_, "Process 2-prong candidate full " #_Species_, false);

// Declare process functions for all species.
PROCESS_PID_CANDIDATE_2PRONG(Pi, 0, 1)
PROCESS_PID_CANDIDATE_2PRONG(Ka, 0, 1)

#undef PROCESS_PID_CANDIDATE_2PRONG

};

WorkflowSpec defineDataProcessing(ConfigContext const& cfgc)
Expand Down

0 comments on commit e1c25e7

Please sign in to comment.