3535#include <vector>
3636
3737// PWGLF
38- #include "PWGLF/DataModel/lambdaJetPolarizationIons.h"
39- #include "RCTSelectionFlags.h"
4038#include "EventSelectionParams.h"
39+ #include "RCTSelectionFlags.h"
40+
4141#include "PWGLF/DataModel/LFStrangenessPIDTables.h"
42+ #include "PWGLF/DataModel/lambdaJetPolarizationIons.h"
4243// #include "Common/DataModel/PIDResponseTOF.h" // Maybe switch this around with LFStrangenessPIDTables?
4344#include "PWGLF/DataModel/LFStrangenessTables.h" // For V0TOFPIDs and NSigmas getters. Better for considering the daughters as coming from V0s instead of from PV:
4445
6869#include <Framework/AnalysisDataModel.h>
6970#include <Framework/AnalysisHelpers.h>
7071#include <Framework/AnalysisTask.h>
71- #include <Framework/HistogramRegistry.h>
7272#include <Framework/Configurable.h>
73+ #include <Framework/DataTypes.h>
74+ #include <Framework/HistogramRegistry.h>
7375#include <Framework/HistogramSpec.h>
7476#include <Framework/InitContext.h>
75- #include <Framework/DataTypes.h>
7677#include <Framework/Logger.h>
7778#include <Framework/OutputObjHeader.h>
7879#include <Framework/runDataProcessing.h>
7980
8081// O2 subsystems
82+ #include "Common/CCDB/ctpRateFetcher.h"
83+
8184#include <CCDB/BasicCCDBManager.h>
8285#include <CCDB/CcdbApi.h>
83- #include "Common/CCDB/ctpRateFetcher.h"
8486#include <DataFormatsParameters/GRPMagField.h>
8587
8688// External libraries
@@ -984,18 +986,19 @@ struct lambdajetpolarizationions {
984986 // (shows pass-through count as a flat line, making it visually
985987 // clear that the stage was not active).
986988 // (Replaces N dummy fill() calls)
987- void fillUpTo(int targetBinX) {
988- while (binValue < targetBinX)
989- histos->fill(HIST("GeneralQA/hSelectionV0s"), ++binValue);
989+ void fillUpTo(int targetBinX)
990+ {
991+ while (binValue < targetBinX)
992+ histos->fill(HIST("GeneralQA/hSelectionV0s"), ++binValue);
990993 }
991994
992- void advanceTo(int targetBinX) { binValue = targetBinX - 1; } // next fill() lands at targetBin. Needed to deal with early exits at isLambda vs isAntiLambda checks
995+ void advanceTo(int targetBinX) { binValue = targetBinX - 1; } // next fill() lands at targetBin. Needed to deal with early exits at isLambda vs isAntiLambda checks
993996 void fill() { histos->fill(HIST("GeneralQA/hSelectionV0s"), ++binValue); } // Hardcoded hSelectionV0s histogram, as it will not change. Increments before filling, by default
994997 };
995998 V0SelectionFlowCounter V0SelCounter{-1, &histos}; // Could initialize with any index (resetForNewV0 is always called for a new V0 anyways)
996- // Calculating some bins, for convenience:
997- int nGenericCuts = 31; // x=0 to x=30
998- int nHypoCuts = 9; // per hypothesis (x=31..39 for Lambda)
999+ // Calculating some bins, for convenience:
1000+ int nGenericCuts = 31; // x=0 to x=30
1001+ int nHypoCuts = 9; // per hypothesis (x=31..39 for Lambda)
9991002 int lambdaHypoEnd = nGenericCuts + nHypoCuts - 1; // x=39
10001003
10011004 // Minimal helper to fill hSelectionJetTracks, mirroring V0SelectionFlowCounter.
@@ -1438,11 +1441,11 @@ struct lambdajetpolarizationions {
14381441
14391442 // (CAUTION!) You cannot use the getter for raw data's PIDResponseTOF.h instead of LFStrangenessPIDTables.h (as below)
14401443 // If you do use, TOF will just try to identify that track as a proton from the PV, instead of using the correct path
1441- // length from the V0s PV-DCA and the such! In other words, it is a naive estimator of TOF PID, because it does not
1444+ // length from the V0s PV-DCA and the such! In other words, it is a naive estimator of TOF PID, because it does not
14421445 // correct for the V0 mother's travel time and considers all tracks as if they came from the PV!
14431446 // if (protonHasTOF && std::fabs(protonTrack.tofNSigmaPr()) > v0Selections.tofPidNsigmaCutLaPr) return false;
14441447 // To properly use the LFStrangenessPIDTables version, you need to call o2-analysis-lf-strangenesstofpid too.
1445- } else { // Should fill counters an equal number of times to advance indices
1448+ } else { // Should fill counters an equal number of times to advance indices
14461449 V0SelCounter.fillUpTo(V0SelCounter.binValue + 4); // Fills the 4 times "V0SelCounter.fill()" would be called
14471450 }
14481451
@@ -1568,7 +1571,8 @@ struct lambdajetpolarizationions {
15681571 return;
15691572 histos.fill(HIST("hEventsWithJet"), 0.5);
15701573 // Another version of this counter, which is already integrated in the Event Selection flow:
1571- if (doEventQA) fillEventSelectionQA(lastBinEvSel - 1, centrality); // hasRingJet passes
1574+ if (doEventQA)
1575+ fillEventSelectionQA(lastBinEvSel - 1, centrality); // hasRingJet passes
15721576
15731577 if (doJetKinematicsQA) {
15741578 histos.fill(HIST("JetKinematicsQA/hLeadingJetPt"), leadingJetSub.pt());
@@ -1650,7 +1654,8 @@ struct lambdajetpolarizationions {
16501654 return;
16511655 histos.fill(HIST("hEventsWithJet"), 0.5);
16521656 // Another version of this counter, which is already integrated in the Event Selection flow:
1653- if (doEventQA) fillEventSelectionQA(lastBinEvSel - 1, centrality); // hasRingJet passes
1657+ if (doEventQA)
1658+ fillEventSelectionQA(lastBinEvSel - 1, centrality); // hasRingJet passes
16541659
16551660 const auto& leadingJet = jets[0];
16561661 for (const auto& jet : jets) {
@@ -1754,8 +1759,10 @@ struct lambdajetpolarizationions {
17541759 if (!isEventAccepted(collision, bc, centrality, doEventQA))
17551760 return; // Uses return instead of continue, as there is no explicit loop here
17561761
1757- if (doEventQA) fillCentralityProperties(collision, centrality);
1758- if (v0Selections.rejectTPCsectorBoundary) initCCDB(bc); // Substituted call from collision to bc for raw data
1762+ if (doEventQA)
1763+ fillCentralityProperties(collision, centrality);
1764+ if (v0Selections.rejectTPCsectorBoundary)
1765+ initCCDB(bc); // Substituted call from collision to bc for raw data
17591766
17601767 // Fill event table:
17611768 tableCollisions(collision.centFT0M(),
@@ -1764,7 +1771,7 @@ struct lambdajetpolarizationions {
17641771
17651772 // Get the derived collision row index for this event:
17661773 const int ringCollIdx = tableCollisions.lastIndex();
1767-
1774+
17681775 // Call to jets process:
17691776 jetsProcess(V0DauTracks, ringCollIdx, centrality); // V0DauTracks takes the place of jetTracks now
17701777
@@ -1788,7 +1795,7 @@ struct lambdajetpolarizationions {
17881795 if (analyseLambda)
17891796 isLambda = passesLambdaLambdaBarHypothesis(v0, collision, true);
17901797 if (analyseAntiLambda) {
1791- if (analyseLambda) // We only need to advance when the Lambda hypothesis had an early exit on the counters
1798+ if (analyseLambda) // We only need to advance when the Lambda hypothesis had an early exit on the counters
17921799 V0SelCounter.advanceTo(lambdaHypoEnd + 1); // sync to bin 41 (x=40 means bin 41, the first #bar{#Lambda} bin)
17931800 isAntiLambda = passesLambdaLambdaBarHypothesis(v0, collision, false);
17941801 }
@@ -2021,4 +2028,5 @@ WorkflowSpec defineDataProcessing(ConfigContext const& cfgc)
20212028{
20222029 return WorkflowSpec{
20232030 adaptAnalysisTask<lambdajetpolarizationions>(cfgc)};
2024- }
2031+ }
2032+
0 commit comments