Skip to content

Commit 8f006e7

Browse files
authored
[PWGLF] moved UE calculation outside of loop on tracks
1 parent d0ac2fe commit 8f006e7

File tree

1 file changed

+11
-11
lines changed

1 file changed

+11
-11
lines changed

PWGLF/Tasks/Nuspex/antinucleiInJets.cxx

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -453,13 +453,21 @@ struct AntinucleiInJets {
453453
// jet must be fully contained in the acceptance
454454
if ((std::fabs(jet.eta()) + rJet) > (maxEta - 0.05))
455455
continue;
456-
456+
457457
// jet pt must be larger than threshold
458458
fastjet::PseudoJet jetMinusBkg = backgroundSub.doRhoAreaSub(jet, rhoPerp, rhoMPerp);
459459
if (getCorrectedPt(jetMinusBkg.pt()) < minJetPt)
460460
continue;
461461
isAtLeastOneJetSelected = true;
462462

463+
// perpendicular cone
464+
double coneRadius = std::sqrt(jet.area() / PI);
465+
TVector3 jetAxis(jet.px(), jet.py(), jet.pz());
466+
TVector3 ueAxis1(0, 0, 0);
467+
TVector3 ueAxis2(0, 0, 0);
468+
getPerpendicularAxis(jetAxis, ueAxis1, +1);
469+
getPerpendicularAxis(jetAxis, ueAxis2, -1);
470+
463471
// get jet constituents
464472
std::vector<fastjet::PseudoJet> jetConstituents = jet.constituents();
465473
o2::aod::ITSResponse itsResponse;
@@ -541,14 +549,6 @@ struct AntinucleiInJets {
541549
}
542550
}
543551

544-
// perpendicular cone
545-
double coneRadius = std::sqrt(jet.area() / PI);
546-
TVector3 jetAxis(jet.px(), jet.py(), jet.pz());
547-
TVector3 ueAxis1(0, 0, 0);
548-
TVector3 ueAxis2(0, 0, 0);
549-
getPerpendicularAxis(jetAxis, ueAxis1, +1);
550-
getPerpendicularAxis(jetAxis, ueAxis2, -1);
551-
552552
for (auto track : tracks) { // o2-linter: disable=[const-ref-in-for-loop]
553553

554554
// get corresponding track and apply track selection criteria
@@ -678,12 +678,14 @@ struct AntinucleiInJets {
678678
if ((std::fabs(jet.eta()) + rJet) > (maxEta - 0.05))
679679
continue;
680680
njetsInAcc++;
681+
registryQC.fill(HIST("sumPtJetCone"), jet.pt());
681682

682683
// jet pt must be larger than threshold
683684
fastjet::PseudoJet jetMinusBkg = backgroundSub.doRhoAreaSub(jet, rhoPerp, rhoMPerp);
684685
if (getCorrectedPt(jetMinusBkg.pt()) < minJetPt)
685686
continue;
686687
njetsHighPt++;
688+
registryQC.fill(HIST("sumPtJet"), jet.pt());
687689

688690
// jet properties and perpendicular cone
689691
std::vector<fastjet::PseudoJet> jetConstituents = jet.constituents();
@@ -696,7 +698,6 @@ struct AntinucleiInJets {
696698

697699
registryQC.fill(HIST("jetEffectiveArea"), jet.area() / (PI * rJet * rJet));
698700
registryQC.fill(HIST("NchJetCone"), static_cast<int>(jetConstituents.size()));
699-
registryQC.fill(HIST("sumPtJetCone"), jet.pt());
700701

701702
// loop over jet constituents
702703
for (const auto& particle : jetConstituents) { // o2-linter: disable=[const-ref-in-for-loop]
@@ -731,7 +732,6 @@ struct AntinucleiInJets {
731732
registryQC.fill(HIST("NchUE"), 0.5 * nParticlesPerp);
732733
registryQC.fill(HIST("NchJet"), static_cast<double>(jetConstituents.size()) - 0.5 * nParticlesPerp);
733734
registryQC.fill(HIST("sumPtUE"), 0.5 * ptPerp);
734-
registryQC.fill(HIST("sumPtJet"), jet.pt() - 0.5 * ptPerp);
735735
}
736736
registryQC.fill(HIST("nJetsFound"), static_cast<int>(jets.size()));
737737
registryQC.fill(HIST("nJetsInAcceptance"), njetsInAcc);

0 commit comments

Comments
 (0)