Skip to content

Commit 62b6c6a

Browse files
authored
[PWGLF] Replace cone radius calculation with rJet (#16292)
1 parent a8d638d commit 62b6c6a

1 file changed

Lines changed: 14 additions & 12 deletions

File tree

PWGLF/Tasks/Strangeness/strangenessInJets.cxx

Lines changed: 14 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1455,7 +1455,7 @@ struct StrangenessInJets {
14551455

14561456
// Set up two perpendicular cone axes for underlying event estimation
14571457
const TVector3 jetAxis(jet.px(), jet.py(), jet.pz());
1458-
const double coneRadius = std::sqrt(jet.area() / PI);
1458+
const double coneRadius = rJet;
14591459
TVector3 ueAxis1(0, 0, 0), ueAxis2(0, 0, 0);
14601460
getPerpendicularDirections(jetAxis, ueAxis1, ueAxis2);
14611461
if (ueAxis1.Mag() == 0 || ueAxis2.Mag() == 0) {
@@ -1664,7 +1664,8 @@ struct StrangenessInJets {
16641664
if (!motherPos.isPhysicalPrimary())
16651665
continue;
16661666

1667-
if (std::abs(motherPos.eta()) > 0.8)
1667+
const double maxPseudorap = 0.8;
1668+
if (std::abs(motherPos.eta()) > maxPseudorap)
16681669
continue;
16691670

16701671
// K0s
@@ -1744,8 +1745,8 @@ struct StrangenessInJets {
17441745
if (!mcParticle.isPhysicalPrimary()) {
17451746
continue;
17461747
}
1747-
1748-
if (std::abs(mcParticle.eta()) > 0.8) {
1748+
const double maxPseudorap = 0.8;
1749+
if (std::abs(mcParticle.eta()) > maxPseudorap) {
17491750
continue;
17501751
}
17511752

@@ -1786,9 +1787,10 @@ struct StrangenessInJets {
17861787
}
17871788
}
17881789

1789-
for (auto& particle : mcParticlesPerColl) {
1790+
const double maxPseudorap = 0.8;
1791+
for (auto const& particle : mcParticlesPerColl) {
17901792

1791-
if (particle.isPhysicalPrimary() && std::abs(particle.eta()) <= 0.8) {
1793+
if (particle.isPhysicalPrimary() && std::abs(particle.eta()) <= maxPseudorap) {
17921794
switch (particle.pdgCode()) {
17931795
case kK0Short:
17941796
if (enabledSignals.value[ParticleOfInterest::kV0Particles]) {
@@ -1889,8 +1891,8 @@ struct StrangenessInJets {
18891891
continue;
18901892
if (!motherPos.isPhysicalPrimary())
18911893
continue;
1892-
1893-
if (std::abs(motherPos.eta()) > 0.8)
1894+
double maxPseudorap = 0.8;
1895+
if (std::abs(motherPos.eta()) > maxPseudorap)
18941896
continue;
18951897

18961898
// K0s
@@ -1908,9 +1910,9 @@ struct StrangenessInJets {
19081910
}
19091911
}
19101912

1911-
for (auto& particle : mcParticlesPerColl) {
1912-
1913-
if (particle.isPhysicalPrimary() && std::abs(particle.eta()) <= 0.8) {
1913+
for (auto const& particle : mcParticlesPerColl) {
1914+
double maxPseudorap = 0.8;
1915+
if (particle.isPhysicalPrimary() && std::abs(particle.eta()) <= maxPseudorap) {
19141916
switch (particle.pdgCode()) {
19151917
case kK0Short:
19161918
if (enabledSignals.value[ParticleOfInterest::kV0Particles]) {
@@ -1936,7 +1938,7 @@ struct StrangenessInJets {
19361938
// Loop over selected jets
19371939
for (int i = 0; i < static_cast<int>(selectedJet.size()); i++) {
19381940

1939-
for (auto& particle : mcParticlesPerColl) {
1941+
for (auto const& particle : mcParticlesPerColl) {
19401942

19411943
const ParticlePositionWithRespectToJet positionMC{particle.px(), particle.py(), particle.pz(), selectedJet[i], ue1[i], ue2[i]};
19421944

0 commit comments

Comments
 (0)