Skip to content

Commit 2aead6d

Browse files
authored
[PWGHF: Added processes to select Sc collisions
1 parent fcbc816 commit 2aead6d

File tree

1 file changed

+14
-33
lines changed

1 file changed

+14
-33
lines changed

PWGHF/HFC/Utils/utilsCorrelations.h

Lines changed: 14 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -28,9 +28,7 @@
2828
#include "Common/DataModel/PIDResponseTPC.h"
2929
#include "Common/DataModel/PIDResponseTOF.h"
3030

31-
using namespace o2::constants::physics;
32-
33-
HfHelper hfHelper;
31+
//HfHelper hfHelper;
3432

3533
namespace o2::analysis::hf_correlations
3634
{
@@ -49,12 +47,16 @@ enum PairSign {
4947
LcNegTrkNeg
5048
};
5149

50+
constexpr float PhiTowardMax{o2::constants::math::PIThird};
51+
constexpr float PhiAwayMin{2.f * o2::constants::math::PIThird};
52+
constexpr float PhiAwayMax{4.f * o2::constants::math::PIThird};
53+
5254
template <typename T>
5355
Region getRegion(T const deltaPhi)
5456
{
55-
if (std::abs(deltaPhi) < o2::constants::math::PIThird) {
57+
if (std::abs(deltaPhi) < PhiTowardMax) {
5658
return Toward;
57-
} else if (deltaPhi > 2. * o2::constants::math::PIThird && deltaPhi < 4. * o2::constants::math::PIThird) {
59+
} else if (deltaPhi > PhiAwayMin && deltaPhi < PhiAwayMax) {
5860
return Away;
5961
} else {
6062
return Transverse;
@@ -124,21 +126,20 @@ bool passPIDSelection(Atrack const& track, SpeciesContainer const mPIDspecies,
124126
}
125127

126128
template <bool isScCand, typename McParticle>
127-
bool matchCandAndMass(McParticle const& particle, double& massCand)
128-
{
129+
bool matchCandAndMass(McParticle const& particle, double& massCand) {
129130
const auto pdgCand = std::abs(particle.pdgCode());
130131
const auto matchGenFlag = std::abs(particle.flagMcMatchGen());
131132

132133
// Validate PDG code based on candidate type
133134
if constexpr (isScCand) {
134-
if (!(pdgCand == Pdg::kSigmaC0 ||
135-
pdgCand == Pdg::kSigmaCPlusPlus ||
136-
pdgCand == Pdg::kSigmaCStar0 ||
137-
pdgCand == Pdg::kSigmaCStarPlusPlus)) {
135+
if (!(pdgCand == o2::constants::physics::Pdg::kSigmaC0 ||
136+
pdgCand == o2::constants::physics::Pdg::kSigmaCPlusPlus ||
137+
pdgCand == o2::constants::physics::Pdg::kSigmaCStar0 ||
138+
pdgCand == o2::constants::physics::Pdg::kSigmaCStarPlusPlus)) {
138139
return false;
139140
}
140141
} else {
141-
if (pdgCand != Pdg::kLambdaCPlus) {
142+
if (pdgCand != o2::constants::physics::Pdg::kLambdaCPlus) {
142143
return false;
143144
}
144145
}
@@ -156,7 +157,7 @@ bool matchCandAndMass(McParticle const& particle, double& massCand)
156157
case BIT(aod::hf_cand_sigmac::DecayType::ScplusplusToPKPiPi):
157158
massCand = o2::constants::physics::MassSigmaCStarPlusPlus;
158159
return true;
159-
160+
160161
case BIT(aod::hf_cand_sigmac::DecayType::ScStarPlusPlusToPKPiPi):
161162
massCand = o2::constants::physics::MassSigmaCStarPlusPlus;
162163
return true;
@@ -170,26 +171,6 @@ bool matchCandAndMass(McParticle const& particle, double& massCand)
170171
}
171172
}
172173

173-
template <bool isCandSc, typename CandType>
174-
double estimateY(CandType const& candidate)
175-
{
176-
double y = -999.;
177-
const int chargeScZero = 0;
178-
if constexpr (isCandSc) {
179-
int8_t chargeCand = candidate.charge();
180-
181-
if (chargeCand == chargeScZero) {
182-
y = hfHelper.ySc0(candidate);
183-
} else {
184-
y = hfHelper.yScPlusPlus(candidate);
185-
}
186-
187-
} else {
188-
y = hfHelper.yLc(candidate);
189-
}
190-
return y;
191-
}
192-
193174
// ========= Find Leading Particle ==============
194175
template <typename TTracks, typename T1> //// FIXME: 14 days
195176
int findLeadingParticle(TTracks const& tracks, T1 const etaTrackMax)

0 commit comments

Comments
 (0)