Skip to content
Merged
Show file tree
Hide file tree
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
2 changes: 1 addition & 1 deletion PWGHF/TableProducer/candidateCreator2Prong.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -764,7 +764,7 @@
void processCollisionsUpc(soa::Join<aod::Collisions, aod::EvSels> const& collisions,
aod::BcFullInfos const& bcs,
aod::FT0s const& /*ft0s*/,
aod::FV0As const& /*fv0as*/,
aod::FV0As const& /*fv0as*/,
aod::FDDs const& /*fdds*/,
aod::Zdcs const& /*zdcs*/)
{
Expand Down Expand Up @@ -883,7 +883,7 @@
// D0(bar) → π+ K−, π+ K− π0, π+ π−, π+ π− π0, K+ K−
for (const auto& [chn, finalState] : hf_cand_2prong::daughtersD0Main) {
std::array<int, 2> finalStateParts2Prong = std::array{finalState[0], finalState[1]};
if (finalState.size() == 3) { // o2-linter: disable=magic-number (Partly Reco 3-prong decays)

Check failure on line 886 in PWGHF/TableProducer/candidateCreator2Prong.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[magic-number]

Avoid magic numbers in expressions. Assign the value to a clearly named variable or constant.
if (matchKinkedDecayTopology && matchInteractionsWithMaterial) {
indexRec = RecoDecay::getMatchedMCRec<false, false, true, true, true>(mcParticles, arrayDaughters, Pdg::kD0, finalStateParts2Prong, true, &sign, FinalStateDepth, &nKinkedTracks, &nInteractionsWithMaterial);
} else if (matchKinkedDecayTopology && !matchInteractionsWithMaterial) {
Expand All @@ -902,7 +902,7 @@
indexRec = -1; // Reset indexRec if the generated decay does not match the reconstructed one does not match the reconstructed one
}
}
} else if (finalState.size() == 2) { // o2-linter: disable=magic-number (Fully Reco 2-prong decays)

Check failure on line 905 in PWGHF/TableProducer/candidateCreator2Prong.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[magic-number]

Avoid magic numbers in expressions. Assign the value to a clearly named variable or constant.
if (matchKinkedDecayTopology && matchInteractionsWithMaterial) {
indexRec = RecoDecay::getMatchedMCRec<false, false, false, true, true>(mcParticles, arrayDaughters, Pdg::kD0, finalStateParts2Prong, true, &sign, FinalStateDepth, &nKinkedTracks, &nInteractionsWithMaterial);
} else if (matchKinkedDecayTopology && !matchInteractionsWithMaterial) {
Expand Down
2 changes: 1 addition & 1 deletion PWGHF/TableProducer/candidateCreator3Prong.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -242,7 +242,7 @@
}

template <bool doPvRefit, bool applyUpcSel, o2::hf_centrality::CentralityEstimator centEstimator, typename Coll, typename Cand, typename BCsType>
void runCreator3ProngWithDCAFitterN(Coll const&,
void runCreator3ProngWithDCAFitterN(Coll const&,
Cand const& rowsTrackIndexProng3,
TracksWCovExtraPidPiKaPr const&,
BCsType const& bcs)
Expand Down Expand Up @@ -1086,7 +1086,7 @@
}
}
}
} else if (finalState.size() == 3) { // o2-linter: disable=magic-number(Fully Reco 3-prong decays)

Check failure on line 1089 in PWGHF/TableProducer/candidateCreator3Prong.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[magic-number]

Avoid magic numbers in expressions. Assign the value to a clearly named variable or constant.
if (matchKinkedDecayTopology && matchInteractionsWithMaterial) {
indexRec = RecoDecay::getMatchedMCRec<false, false, false, true, true>(mcParticles, arrayDaughters, pdg, finalStateParts3Prong, true, &sign, depth, &nKinkedTracks, &nInteractionsWithMaterial);
} else if (matchKinkedDecayTopology && !matchInteractionsWithMaterial) {
Expand Down
22 changes: 11 additions & 11 deletions PWGHF/TableProducer/trackIndexSkimCreator.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -164,51 +164,51 @@

/// Event selection with trigger and FT0A centrality selection
void processTrigAndCentFT0ASel(soa::Join<aod::Collisions,
aod::EvSels, aod::CentFT0As>::iterator const& collision,
aod::EvSels, aod::CentFT0As>::iterator const& collision,
aod::BcFullInfos const& bcs)
{
selectCollision<true, false, CentralityEstimator::FT0A>(collision, bcs);
}
PROCESS_SWITCH(HfTrackIndexSkimCreatorTagSelCollisions, processTrigAndCentFT0ASel, "Use trigger and centrality selection with FT0A", false);

/// Event selection with trigger and FT0C centrality selection
void processTrigAndCentFT0CSel(soa::Join<aod::Collisions,
aod::EvSels, aod::CentFT0Cs>::iterator const& collision,
void processTrigAndCentFT0CSel(soa::Join<aod::Collisions,
aod::EvSels, aod::CentFT0Cs>::iterator const& collision,
aod::BcFullInfos const& bcs)
{
selectCollision<true, false, CentralityEstimator::FT0C>(collision, bcs);
}
PROCESS_SWITCH(HfTrackIndexSkimCreatorTagSelCollisions, processTrigAndCentFT0CSel, "Use trigger and centrality selection with FT0C", false);

/// Event selection with trigger and FT0M centrality selection
void processTrigAndCentFT0MSel(soa::Join<aod::Collisions,
aod::EvSels, aod::CentFT0Ms>::iterator const& collision,
void processTrigAndCentFT0MSel(soa::Join<aod::Collisions,
aod::EvSels, aod::CentFT0Ms>::iterator const& collision,
aod::BcFullInfos const& bcs)
{
selectCollision<true, false, CentralityEstimator::FT0M>(collision, bcs);
}
PROCESS_SWITCH(HfTrackIndexSkimCreatorTagSelCollisions, processTrigAndCentFT0MSel, "Use trigger and centrality selection with FT0M", false);

/// Event selection with trigger and FV0A centrality selection
void processTrigAndCentFV0ASel(soa::Join<aod::Collisions,
aod::EvSels, aod::CentFV0As>::iterator const& collision,
void processTrigAndCentFV0ASel(soa::Join<aod::Collisions,
aod::EvSels, aod::CentFV0As>::iterator const& collision,
aod::BcFullInfos const& bcs)
{
selectCollision<true, false, CentralityEstimator::FV0A>(collision, bcs);
}
PROCESS_SWITCH(HfTrackIndexSkimCreatorTagSelCollisions, processTrigAndCentFV0ASel, "Use trigger and centrality selection with FV0A", false);

/// Event selection with trigger selection
void processTrigSel(soa::Join<aod::Collisions,
aod::EvSels>::iterator const& collision,
void processTrigSel(soa::Join<aod::Collisions,
aod::EvSels>::iterator const& collision,
aod::BcFullInfos const& bcs)
{
selectCollision<true, false, CentralityEstimator::None>(collision, bcs);
}
PROCESS_SWITCH(HfTrackIndexSkimCreatorTagSelCollisions, processTrigSel, "Use trigger selection", false);

/// Event selection without trigger selection
void processNoTrigSel(aod::Collision const& collision,
void processNoTrigSel(aod::Collision const& collision,
aod::BcFullInfos const& bcs)
{
selectCollision<false, false, CentralityEstimator::None>(collision, bcs);
Expand All @@ -217,7 +217,7 @@

/// Event selection with UPC
void processUpcSel(soa::Join<aod::Collisions,
aod::EvSels>::iterator const& collision,
aod::EvSels>::iterator const& collision,
aod::BcFullInfos const& bcs,
aod::FT0s const& /*ft0s*/,
aod::FV0As const& /*fv0as*/,
Expand Down Expand Up @@ -332,16 +332,16 @@

cutsSingleTrack = {config.cutsTrack2Prong, config.cutsTrack3Prong, config.cutsTrackBach, config.cutsTrackDstar, config.cutsTrackBachLfCasc};

if (config.etaMinTrack2Prong == -99999.) {

Check failure on line 335 in PWGHF/TableProducer/trackIndexSkimCreator.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[magic-number]

Avoid magic numbers in expressions. Assign the value to a clearly named variable or constant.
config.etaMinTrack2Prong.value = -config.etaMaxTrack2Prong;
}
if (config.etaMinTrack3Prong == -99999.) {

Check failure on line 338 in PWGHF/TableProducer/trackIndexSkimCreator.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[magic-number]

Avoid magic numbers in expressions. Assign the value to a clearly named variable or constant.
config.etaMinTrack3Prong.value = -config.etaMaxTrack3Prong;
}
if (config.etaMinTrackBach == -99999.) {

Check failure on line 341 in PWGHF/TableProducer/trackIndexSkimCreator.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[magic-number]

Avoid magic numbers in expressions. Assign the value to a clearly named variable or constant.
config.etaMinTrackBach.value = -config.etaMaxTrackBach;
}
if (config.etaMinSoftPionForDstar == -99999.) {

Check failure on line 344 in PWGHF/TableProducer/trackIndexSkimCreator.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[magic-number]

Avoid magic numbers in expressions. Assign the value to a clearly named variable or constant.
config.etaMinSoftPionForDstar.value = -config.etaMaxSoftPionForDstar;
}
if (config.etaMinTrackBachLfCasc == -99999.) {
Expand Down Expand Up @@ -576,7 +576,7 @@
hasGoodQuality = false;
}
} else {
UChar_t clustermap = hfTrack.itsClusterMap();

Check failure on line 579 in PWGHF/TableProducer/trackIndexSkimCreator.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[root/entity]

Replace ROOT entities with equivalents from standard C++ or from O2.
if (!(hfTrack.tpcNClsFound() >= config.tpcNClsFoundMin.value && // is this the number of TPC clusters? It should not be used
TESTBIT(hfTrack.flags(), o2::aod::track::ITSrefit) &&
(TESTBIT(clustermap, 0) || TESTBIT(clustermap, 1)))) {
Expand Down Expand Up @@ -612,7 +612,7 @@
hasGoodQuality = false;
}
} else { // selections for Run2 converted data
UChar_t clustermap = hfTrack.itsClusterMap();

Check failure on line 615 in PWGHF/TableProducer/trackIndexSkimCreator.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[root/entity]

Replace ROOT entities with equivalents from standard C++ or from O2.
if (!(TESTBIT(hfTrack.flags(), o2::aod::track::ITSrefit) && (TESTBIT(clustermap, 0) || TESTBIT(clustermap, 1)))) {
hasGoodQuality = false;
}
Expand Down Expand Up @@ -641,7 +641,7 @@
hasGoodQuality = false;
}
} else { // selections for Run2 converted data
UChar_t clustermap = hfTrack.itsClusterMap();

Check failure on line 644 in PWGHF/TableProducer/trackIndexSkimCreator.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[root/entity]

Replace ROOT entities with equivalents from standard C++ or from O2.
if (!(TESTBIT(hfTrack.flags(), o2::aod::track::ITSrefit) && (TESTBIT(clustermap, 0) || TESTBIT(clustermap, 1)))) {
hasGoodQuality = false;
}
Expand Down
33 changes: 17 additions & 16 deletions PWGHF/Utils/utilsEvSelHf.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,31 +18,32 @@
#ifndef PWGHF_UTILS_UTILSEVSELHF_H_
#define PWGHF_UTILS_UTILSEVSELHF_H_

#include <fairlogger/Logger.h>
#include "PWGHF/Core/CentralityEstimation.h"
#include "PWGUD/Core/SGSelector.h"

#include <Rtypes.h>
#include <TH1.h>
#include <TH2.h>
#include "Common/CCDB/EventSelectionParams.h"
#include "Common/CCDB/RCTSelectionFlags.h"
#include "EventFiltering/Zorro.h"
#include "EventFiltering/ZorroSummary.h"

#include <Framework/AnalysisHelpers.h>
#include <Framework/Configurable.h>
#include <Framework/DeviceSpec.h>
#include <Framework/HistogramRegistry.h>
#include <Framework/HistogramSpec.h>

#include <cstdint>
#include <TH1.h>
#include <TH2.h>

#include <fairlogger/Logger.h>

#include <Rtypes.h>

#include <cstddef>
#include <cstdint>
#include <memory> // std::shared_ptr
#include <string> // std::string

#include "Common/CCDB/EventSelectionParams.h"
#include "Common/CCDB/RCTSelectionFlags.h"
#include "EventFiltering/Zorro.h"
#include "EventFiltering/ZorroSummary.h"

#include "PWGHF/Core/CentralityEstimation.h"
#include "PWGUD/Core/SGSelector.h"

namespace o2::hf_occupancy
{
// centrality selection estimators
Expand Down Expand Up @@ -114,7 +115,7 @@ enum EventRejection {
};

o2::framework::AxisSpec axisEvents = {EventRejection::NEventRejection, -0.5f, +EventRejection::NEventRejection - 0.5f, ""};
o2::framework::AxisSpec axisUpcEvents = { o2::aod::sgselector::DoubleGap + 1, -0.5f, +o2::aod::sgselector::DoubleGap + 0.5f, ""};
o2::framework::AxisSpec axisUpcEvents = {o2::aod::sgselector::DoubleGap + 1, -0.5f, +o2::aod::sgselector::DoubleGap + 0.5f, ""};

/// \brief Function to put labels on monitoring histogram
/// \param hRejection monitoring histogram
Expand Down Expand Up @@ -228,7 +229,7 @@ struct HfEventSelection : o2::framework::ConfigurableGroup {
hPosYAfterEvSel = registry.add<TH1>(NameHistPosYAfterEvSel, "selected events;#it{y}_{prim. vtx.} (cm);entries", {o2::framework::HistType::kTH1D, {{200, -0.5, 0.5}}});
hNumPvContributorsAfterSel = registry.add<TH1>(NameHistNumPvContributorsAfterSel, "selected events;#it{y}_{prim. vtx.} (cm);entries", {o2::framework::HistType::kTH1D, {{500, -0.5, 499.5}}});
setEventRejectionLabels(hCollisions, softwareTrigger);
hUpCollisions = registry.add<TH1>(NameHistUpCollisions, "HF UPC counter;;# of UPC events", {o2::framework::HistType::kTH1D, {axisUpcEvents}});
hUpCollisions = registry.add<TH1>(NameHistUpCollisions, "HF UPC counter;;# of UPC events", {o2::framework::HistType::kTH1D, {axisUpcEvents}});
const o2::framework::AxisSpec th2AxisCent{th2ConfigAxisCent, "Centrality"};
const o2::framework::AxisSpec th2AxisOccupancy{th2ConfigAxisOccupancy, "Occupancy"};
hCollisionsCentOcc = registry.add<TH2>(NameHistCollisionsCentOcc, "selected events;Centrality; Occupancy", {o2::framework::HistType::kTH2D, {th2AxisCent, th2AxisOccupancy}});
Expand Down Expand Up @@ -378,7 +379,7 @@ struct HfEventSelection : o2::framework::ConfigurableGroup {
if (upcEventType > o2::aod::sgselector::DoubleGap) {
SETBIT(rejectionMaskWithUpc, EventRejection::UpcEventCut);
} else {
hUpCollisions->Fill(upcEventType);
hUpCollisions->Fill(upcEventType);
}
}

Expand Down
Loading