Skip to content

Commit 4356704

Browse files
committed
Final fill guard corrections and comment removals
1 parent 02e8d98 commit 4356704

1 file changed

Lines changed: 6 additions & 7 deletions

File tree

PWGLF/Tasks/Strangeness/lambdaJetPolarizationIonsDerived.cxx

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,6 @@ using namespace o2::framework;
7070
using namespace o2::framework::expressions;
7171
using ROOT::Math::PtEtaPhiMVector;
7272
using ROOT::Math::XYZVector;
73-
// using namespace o2::aod::lambdajetpol; // Used it explicitly along the code for clarity
7473

7574
// Declaring constants:
7675
constexpr double ProtonMass = o2::constants::physics::MassProton; // Assumes particle identification for daughter is perfect
@@ -530,6 +529,8 @@ struct lambdajetpolarizationionsderived {
530529
<< "Previous-jet/Mixed-Event proxies do not change between resamplings, so every extra pass would double-count the same proxy.";
531530
if (excludeOutOfPeakQA && excludeInPeakQA) // Complementary selections
532531
LOG(fatal) << "excludeOutOfPeakQA and excludeInPeakQA are complementary: enabling both rejects every V0.";
532+
if (!familySwitches.doFamilyRing) // Todo: think of a smarter way of handling the axis getters for the DeltaMethod
533+
LOG(fatal) << "doFamilyRing must be on: the Delta Method accumulators take their binning from the Ring/ histograms.";
533534

534535
// Ring observable histograms:
535536
// Helper to register one full histogram family (kinematic cut variation of ring observable)
@@ -1469,7 +1470,7 @@ struct lambdajetpolarizationionsderived {
14691470
// First we build lookup tables based on current dataframe's collisions (connects pairs of jet proxies from similar collisions):
14701471
// (these proxies may come from collisions with no valid Lambdas, by construction, enabling more mixes)
14711472
if (fakePolSwitches.doMixedEventProxies) { // This is performed out of the resampling loop, so nProxyResamples will not resample event mixing candidates
1472-
auto getMixCentrality = [this](o2::aod::RingCollision const& col) { return this->getCentrality(col); };
1473+
auto getMixCentrality = [this](o2::aod::RingCollision const& col) { return this->getCentrality(col); }; // Already filtered even though referencing only RingCollision, not an iterator to Filtered table
14731474

14741475
// For the leading particle:
14751476
// Pattern follows MixedEventsLambdaBinning tutorial (captures leadPs table and cache define in task's struct):
@@ -1484,7 +1485,7 @@ struct lambdajetpolarizationionsderived {
14841485
true}; // Ignore overflows true
14851486

14861487
// SameKindPair defaults to CombinationsBlockStrictlyUpperSameIndexPolicy, so no same-event mixing should happen:
1487-
SameKindPair<o2::aod::RingCollisions, o2::aod::RingLeadPs, LeadPBinningType> leadPPair{
1488+
SameKindPair<o2::aod::RingCollisions, o2::aod::RingLeadPs, LeadPBinningType> leadPPair{ // Already filtered even though referencing only RingCollision, so no need to access the filtered table
14881489
leadPBinning, fakePolSwitches.mixedEventWindowSize, -1, collisions, std::make_tuple(leadPs), &mixCache};
14891490

14901491
std::unordered_map<int64_t, int> leadPCandidateCount;
@@ -1641,7 +1642,7 @@ struct lambdajetpolarizationionsderived {
16411642

16421643
// Used this dummy for backwards compatibility, under the reasonable assumption that the field points always in the same *direction* in the used runs
16431644
// (it is not worth it to fetch and store the magnetic field in the datamodel)
1644-
float magField = 1.f; // Purely geometric.
1645+
const float magField = 1.f; // Purely geometric.
16451646

16461647
// Slice jets, V0s and leading particle belonging to this collision:
16471648
// (global collision indices repeat a lot, but they are unique to a same TimeFrame (TF) subfolder in the derived data)
@@ -1857,7 +1858,7 @@ struct lambdajetpolarizationionsderived {
18571858
// Code above was superseeded: new datamodel does not store ambiguous candidates!
18581859
// The new getter comes at the very start of processPolarizationData() now.
18591860

1860-
// Initialize delta method accumulators (reset for new dataframe):
1861+
// Initialize delta method accumulators (reset for new collision):
18611862
for (auto const& tracker : {&trackRing, &trackRingKinCuts, &trackJetKinCuts, &trackJetLambdaKinCuts})
18621863
tracker->reset();
18631864
for (auto const& v0 : v0sInColl) {
@@ -1986,7 +1987,6 @@ struct lambdajetpolarizationionsderived {
19861987
float deltaThetaLeadP = 0.;
19871988
float cosDeltaThetaLeadP = 0.;
19881989
if (hasValidLeadingP) {
1989-
// Cross product
19901990
XYZVector crossLeadP = leadPUnitVec.Cross(lambdaLike3Vec);
19911991
ringObservableLeadP = protonLikeStarUnit3Vec.Dot(crossLeadP) / crossLeadP.R();
19921992
// Adding the prefactor related to the CP-violating decay (decay constants have different signs)
@@ -2013,7 +2013,6 @@ struct lambdajetpolarizationionsderived {
20132013
float Jz = 0.;
20142014
float ringObservableOverJetZ = 0.;
20152015
if (hasValidLeadingJet) {
2016-
// Cross product
20172016
XYZVector cross = leadingJetUnitVec.Cross(lambdaLike3Vec);
20182017
ringObservable = protonLikeStarUnit3Vec.Dot(cross) / cross.R();
20192018
// Adding prefactor

0 commit comments

Comments
 (0)