Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
37 changes: 25 additions & 12 deletions PWGLF/Tasks/Resonances/lambda1520Analysispo.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -70,39 +70,43 @@
// ── Event-level configurables ────────────────────────────────────────────
// FIX name/configurable: lowerCamelCase, member name == JSON string, on one
// line
Configurable<bool> applyOccupancyInTimeRangeCut{

Check failure on line 73 in PWGLF/Tasks/Resonances/lambda1520Analysispo.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[name/configurable]

Use lowerCamelCase for names of configurables and use the same name for the struct member as for the JSON string. (Declare the type and names on the same line.)
"applyOccupancyInTimeRangeCut", false,
"If true, apply a cut on the number of tracks in a time window around "
"the collision (occupancy cut)"};

// ── Histogram binning configurables ─────────────────────────────────────
Configurable<int> numberOfPtBins{

Check failure on line 79 in PWGLF/Tasks/Resonances/lambda1520Analysispo.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[name/configurable]

Use lowerCamelCase for names of configurables and use the same name for the struct member as for the JSON string. (Declare the type and names on the same line.)
"numberOfPtBins", 100,
"Number of bins along the transverse momentum (pT) axis"};
Configurable<int> numberOfInvMassBins{

Check failure on line 82 in PWGLF/Tasks/Resonances/lambda1520Analysispo.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[name/configurable]

Use lowerCamelCase for names of configurables and use the same name for the struct member as for the JSON string. (Declare the type and names on the same line.)
"numberOfInvMassBins", 120,
"Number of bins along the invariant mass axis"};

// ── Physics configurables ────────────────────────────────────────────────
Configurable<int> pdgCodeLambda1520{"pdgCodeLambda1520", 3124,
"PDG code of the Lambda(1520) resonance"};
Configurable<bool> enableRotationalBackground{

Check failure on line 89 in PWGLF/Tasks/Resonances/lambda1520Analysispo.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[name/configurable]

Use lowerCamelCase for names of configurables and use the same name for the struct member as for the JSON string. (Declare the type and names on the same line.)
"enableRotationalBackground", true,
"If true, compute rotational background (kaon phi rotated by ~pi) to "
"estimate combinatorial background"};

// ── Track quality cuts ───────────────────────────────────────────────────
Configurable<float> minTrackPt{

Check failure on line 95 in PWGLF/Tasks/Resonances/lambda1520Analysispo.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[name/configurable]

Use lowerCamelCase for names of configurables and use the same name for the struct member as for the JSON string. (Declare the type and names on the same line.)
"minTrackPt", 0.15f, "Minimum transverse momentum pT of a track [GeV/c]"};
Configurable<float> minTrackMomentum{
"minTrackMomentum", 0.f, "Minimum total momentum p of a track [GeV/c]"};
Configurable<float> minProtonMomentum{

Check failure on line 97 in PWGLF/Tasks/Resonances/lambda1520Analysispo.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[name/configurable]

Use lowerCamelCase for names of configurables and use the same name for the struct member as for the JSON string. (Declare the type and names on the same line.)
"minProtonMomentum", 0.f,
"Minimum total momentum p for proton PID [GeV/c]"};
Comment on lines +97 to +99
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Don't break the lines like this. The linter cannot parse it and it increases the number of lines for no reason.

Configurable<float> minKaonMomentum{

Check failure on line 100 in PWGLF/Tasks/Resonances/lambda1520Analysispo.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[name/configurable]

Use lowerCamelCase for names of configurables and use the same name for the struct member as for the JSON string. (Declare the type and names on the same line.)
"minKaonMomentum", 0.f,
"Minimum total momentum p for kaon PID [GeV/c]"};
Configurable<float> minPseudorapidity{

Check failure on line 103 in PWGLF/Tasks/Resonances/lambda1520Analysispo.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[name/configurable]

Use lowerCamelCase for names of configurables and use the same name for the struct member as for the JSON string. (Declare the type and names on the same line.)
"minPseudorapidity", -0.8f,
"Minimum pseudorapidity eta (detector acceptance)"};
Configurable<float> maxPseudorapidity{

Check failure on line 106 in PWGLF/Tasks/Resonances/lambda1520Analysispo.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[name/configurable]

Use lowerCamelCase for names of configurables and use the same name for the struct member as for the JSON string. (Declare the type and names on the same line.)
"maxPseudorapidity", 0.8f,
"Maximum pseudorapidity eta (detector acceptance)"};
Configurable<float> maxDCAz{

Check failure on line 109 in PWGLF/Tasks/Resonances/lambda1520Analysispo.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[name/configurable]

Use lowerCamelCase for names of configurables and use the same name for the struct member as for the JSON string. (Declare the type and names on the same line.)
"maxDCAz", 1.0f,
"Maximum allowed distance of closest approach along z-axis (DCAz) [cm]"};
Configurable<float> minPairRapidity{
Expand Down Expand Up @@ -363,8 +367,8 @@
Configurable<bool> mcRequireTriggerTVX{
"mcRequireTriggerTVX", false,
"MC event selection: require the TVX (T0 vertex) trigger"};
Configurable<bool> mcRequireRecoINELgt0{
"mcRequireRecoINELgt0", false,
Configurable<bool> cEvtRecINELgt0{
"cEvtRecINELgt0", false,
"MC event selection: require reconstructed INEL>0 condition"};

// ── Histogram registry ───────────────────────────────────────────────────
Expand Down Expand Up @@ -769,7 +773,7 @@
if (track.tofNSigmaPr() < minTOFNSigmaProton)
return false;

if (combinedNSigmaCutProton < 0 && totalMomentum >= minTrackMomentum) {
if (combinedNSigmaCutProton < 0 && totalMomentum >= minProtonMomentum) {
for (int i = 0; i < nTOFBins - 1; ++i) {
if (totalMomentum >= tofMomBins[i] &&
totalMomentum < tofMomBins[i + 1] &&
Expand All @@ -786,15 +790,15 @@
tpcPIDPassed = true;
}

if ((combinedNSigmaCutProton > 0) && totalMomentum >= minTrackMomentum &&
if ((combinedNSigmaCutProton > 0) && totalMomentum >= minProtonMomentum &&
(combinedNSigProton < circularCutSquared &&
combinedNSigPion > circularRejCutSquared &&
combinedNSigKaon > circularRejCutSquared)) {
tofPIDPassed = true;
tpcPIDPassed = true;
}

if (totalMomentum < minTrackMomentum &&
if (totalMomentum < minProtonMomentum &&
tpcNSigProton < maxTPCNSigmaProton) {
tofPIDPassed = true;
tpcPIDPassed = true;
Expand Down Expand Up @@ -853,7 +857,7 @@
if (track.tofNSigmaKa() < minTOFNSigmaKaon)
return false;

if (combinedNSigmaCutKaon < 0 && totalMomentum >= minTrackMomentum) {
if (combinedNSigmaCutKaon < 0 && totalMomentum >= minKaonMomentum) {
for (int i = 0; i < nTOFBins - 1; ++i) {
if (totalMomentum >= tofMomBins[i] &&
totalMomentum < tofMomBins[i + 1] &&
Expand All @@ -870,15 +874,15 @@
tpcPIDPassed = true;
}

if ((combinedNSigmaCutKaon > 0) && totalMomentum >= minTrackMomentum &&
if ((combinedNSigmaCutKaon > 0) && totalMomentum >= minKaonMomentum &&
(combinedNSigKaon < circularCutSquared &&
combinedNSigPion > circularRejCutSquared &&
combinedNSigProton > circularRejCutSquared)) {
tofPIDPassed = true;
tpcPIDPassed = true;
}

if (totalMomentum < minTrackMomentum && tpcNSigKaon < maxTPCNSigmaKaon) {
if (totalMomentum < minKaonMomentum && tpcNSigKaon < maxTPCNSigmaKaon) {
tofPIDPassed = true;
tpcPIDPassed = true;
}
Expand Down Expand Up @@ -1236,6 +1240,9 @@
void processData(ResonanceCollisionsWithEP::iterator const& collision,
ResonanceTrackTable const& tracks)
{
if (cEvtRecINELgt0 && !collision.isRecINELgt0()) // Check reco INELgt0 (at least one PV track in |eta| < 1) about the collision
return;

allHistograms.fill(HIST("Event/centralityVsOccupancy"), collision.cent(),
100);
allHistograms.fill(HIST("Event/primaryVertexZ"), collision.posZ());
Expand Down Expand Up @@ -1270,7 +1277,7 @@
return;
allHistograms.fill(HIST("Event/mcEventSelectionCutflow"), 4);

if (mcRequireRecoINELgt0 && !collision.isRecINELgt0())
if (cEvtRecINELgt0 && !collision.isRecINELgt0())
return;
allHistograms.fill(HIST("Event/mcEventSelectionCutflow"), 5);

Expand Down Expand Up @@ -1370,7 +1377,7 @@
if (mcRequireSel8 && !collision.isInSel8())
return;
allHistograms.fill(HIST("SignalLoss/mcEventSelectionCutflow"), 4);
if (mcRequireRecoINELgt0 && !collision.isRecINELgt0())
if (cEvtRecINELgt0 && !collision.isRecINELgt0())
return;
allHistograms.fill(HIST("SignalLoss/mcEventSelectionCutflow"), 5);
if (mcRequireAfterAllCuts && !collision.isInAfterAllCuts())
Expand Down Expand Up @@ -1479,6 +1486,8 @@

// FIX const-ref-in-for-loop: const auto& structured binding
for (const auto& [col1, tracks1, col2, tracks2] : eventPairs) {
if (cEvtRecINELgt0 && !col1.isRecINELgt0()) // Check reco INELgt0 (at least one PV track in |eta| < 1) about the collision
return;
allHistograms.fill(HIST("Event/mixingBins_centralityVsVtxZVsEventPlane"),
col1.cent(), col1.posZ(), col1.evtPl());
fillInvariantMassHistograms<true, false>(tracks1, tracks2, col1.cent());
Expand All @@ -1503,6 +1512,8 @@
if (doprocessData)
LOG(error) << "Disable processData() first when using processDatadf()!";

if (cEvtRecINELgt0 && !collision.isRecINELgt0()) // Check reco INELgt0 (at least one PV track in |eta| < 1) about the collision
return;
auto occupancyValue = 100;
if (applyOccupancyInTimeRangeCut)
occupancyValue = collision.trackOccupancyInTimeRange();
Expand Down Expand Up @@ -1538,6 +1549,8 @@

// FIX const-ref-in-for-loop: const auto& structured binding
for (const auto& [col1, tracks1, col2, tracks2] : eventPairs) {
if (cEvtRecINELgt0 && !col1.isRecINELgt0()) // Check reco INELgt0 (at least one PV track in |eta| < 1) about the collision
return;
auto occupancyValue = 100;
if (applyOccupancyInTimeRangeCut)
occupancyValue = col1.trackOccupancyInTimeRange();
Expand Down
Loading