|
17 | 17 |
|
18 | 18 | #include <algorithm> // std::upper_bound |
19 | 19 | #include <iterator> // std::distance |
| 20 | +#include <string> //std::string |
| 21 | +#include "Common/Core/RecoDecay.h" |
| 22 | +#include "CommonConstants/PhysicsConstants.h" |
20 | 23 |
|
21 | 24 | namespace o2::analysis |
22 | 25 | { |
@@ -108,6 +111,34 @@ bool isSelectedTrackTpcQuality(T const& track, const int tpcNClustersFoundMin, c |
108 | 111 | return true; |
109 | 112 | } |
110 | 113 |
|
| 114 | +struct HfTriggerCuts : o2::framework::ConfigurableGroup { |
| 115 | + std::string prefix = "hfMassCut"; // JSON group name |
| 116 | + |
| 117 | + static constexpr float defaultDeltaMassPars3Prong[1][2] = {{-0.0025f, 0.0001f}}; |
| 118 | + static constexpr float defaultSigmaPars3Prong[1][2] = {{0.00796f, 0.00176f}}; |
| 119 | + o2::framework::Configurable<float> nSigma{"nSigma", 2.5, "Number of Sigmas for pT differential mass cut"}; |
| 120 | + o2::framework::Configurable<float> pTMaxDeltaMass{"pTMaxDeltaMass", 10., "Max pT to apply delta mass shift to PDG mass value"}; |
| 121 | + o2::framework::Configurable<float> pTMaxMassCut{"pTMaxMassCut", 8., "Max pT to apply pT differential cut"}; |
| 122 | + o2::framework::Configurable<o2::framework::LabeledArray<float>> deltaMassPars3Prong{"deltaMassPars3Prong", {defaultDeltaMassPars3Prong[0], 2, {"constant", "linear"}}, "delta mass parameters for HF 3 prong trigger mass cut"}; |
| 123 | + o2::framework::Configurable<o2::framework::LabeledArray<float>> sigmaPars3Prong{"sigmaPars3Prong", {defaultSigmaPars3Prong[0], 2, {"constant", "linear"}}, "sigma parameters for HF 3 prong trigger mass cut"}; |
| 124 | + |
| 125 | + /// Mass selection of D+ candidates to build B0 candidates |
| 126 | + /// \param pTrackSameChargeFirst is the first same-charge track momentum |
| 127 | + /// \param pTrackSameChargeFirst is the second same-charge track momentum |
| 128 | + /// \param pTrackSameChargeFirst is the opposite charge track momentum |
| 129 | + /// \param ptD is the pt of the D+ meson candidate |
| 130 | + /// \return true if D+ passes selection |
| 131 | + bool isSelectedDplusInMassRange(const float& invMassDplus, const float& ptD) |
| 132 | + { |
| 133 | + float peakMean = (ptD < pTMaxDeltaMass) ? ((o2::constants::physics::MassDPlus + deltaMassPars3Prong->get("constant")) + deltaMassPars3Prong->get("linear") * ptD) : o2::constants::physics::MassDPlus; |
| 134 | + float peakWidth = sigmaPars3Prong->get("constant") + sigmaPars3Prong->get("linear") * ptD; |
| 135 | + |
| 136 | + if (std::fabs(invMassDplus - peakMean) > nSigma * peakWidth && ptD < pTMaxMassCut) { |
| 137 | + return false; |
| 138 | + } |
| 139 | + return true; |
| 140 | + } |
| 141 | +}; |
111 | 142 | } // namespace o2::analysis |
112 | 143 |
|
113 | 144 | #endif // PWGHF_UTILS_UTILSANALYSIS_H_ |
0 commit comments