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
4 changes: 3 additions & 1 deletion PWGHF/D2H/TableProducer/dataCreatorCharmHadPiReduced.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@
#include "PWGHF/Utils/utilsTrkCandHf.h"

#include "Common/Core/RecoDecay.h"
#include "Common/Core/ZorroSummary.h"
#include "Common/Core/trackUtilities.h"
#include "Common/DataModel/Centrality.h"
#include "Common/DataModel/CollisionAssociationTables.h"
Expand Down Expand Up @@ -272,6 +273,7 @@

std::shared_ptr<TH1> hCandidatesD0, hCandidatesDPlus, hCandidatesDs, hCandidatesLc, hCandidatesD0FromDstar;
HistogramRegistry registry{"registry"};
OutputObj<ZorroSummary> zorroSummary{"zorroSummary"};

std::array<int, 2> arrPDGResonantDsPhiPi = {kPhi, kPiPlus}; // Ds± → Phi π±
std::array<int, 2> arrPDGResonantDKstarK = {kK0Star892, kKPlus}; // Ds± → K*(892)0bar K± and D± → K*(892)0bar K±
Expand Down Expand Up @@ -394,7 +396,7 @@
setLabelHistoCands(hCandidatesD0FromDstar);

// init HF event selection helper
hfEvSel.init(registry);
hfEvSel.init(registry, zorroSummary);
if (doprocessDplusPiMc || doprocessDplusPiMcWithMl ||
doprocessDsPiMc || doprocessDsPiMcWithMl ||
doprocessD0PiMc || doprocessD0PiMcWithMl ||
Expand Down Expand Up @@ -985,7 +987,7 @@
RecoDecay::getDaughters(particlesMc.rawIteratorAt(indexRec), &arrDaughDstarIndex, std::array{0}, 1);
if (arrDaughDstarIndex.size() == NDaughtersDstar) {
bool matchD0{false};
for (const int iProng : arrDaughDstarIndex) {

Check failure on line 990 in PWGHF/D2H/TableProducer/dataCreatorCharmHadPiReduced.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[const-ref-in-for-loop]

Use constant references for non-modified iterators in range-based for loops.
auto daughI = particlesMc.rawIteratorAt(iProng);
if (std::abs(daughI.pdgCode()) == Pdg::kD0) {
matchD0 = RecoDecay::isMatchedMCGen(particlesMc, daughI, +Pdg::kD0, std::array{+kPiPlus, -kKPlus}, true, &signD, 2);
Expand Down
4 changes: 3 additions & 1 deletion PWGHF/D2H/TableProducer/dataCreatorCharmResoReduced.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
#include "PWGHF/Utils/utilsMcMatching.h"

#include "Common/Core/RecoDecay.h"
#include "Common/Core/ZorroSummary.h"
#include "Common/Core/trackUtilities.h"
#include "Common/DataModel/CollisionAssociationTables.h"
#include "Common/DataModel/EventSelection.h"
Expand Down Expand Up @@ -283,6 +284,7 @@ struct HfDataCreatorCharmResoReduced {
PresliceUnsorted<McCollisionsNoCents> colPerMcCollision = aod::mccollisionlabel::mcCollisionId;

HistogramRegistry registry{"registry"};
OutputObj<ZorroSummary> zorroSummary{"zorroSummary"};

void init(InitContext& initContext)
{
Expand Down Expand Up @@ -381,7 +383,7 @@ struct HfDataCreatorCharmResoReduced {
fitter.setWeightedFinalPCA(false);

// init HF event selection helper
hfEvSel.init(registry);
hfEvSel.init(registry, zorroSummary);

const auto& workflows = initContext.services().get<RunningWorkflowInfo const>();
for (const DeviceSpec& device : workflows.devices) {
Expand Down
4 changes: 3 additions & 1 deletion PWGHF/D2H/TableProducer/dataCreatorJpsiHadReduced.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@

#include "Common/Core/RecoDecay.h"
#include "Common/Core/TrackSelectorPID.h"
#include "Common/Core/ZorroSummary.h"
#include "Common/Core/trackUtilities.h"
#include "Common/DataModel/CollisionAssociationTables.h"
#include "Common/DataModel/EventSelection.h"
Expand Down Expand Up @@ -220,6 +221,7 @@ struct HfDataCreatorJpsiHadReduced {
o2::vertexing::DCAFitterN<4> df4;

HistogramRegistry registry{"registry"};
OutputObj<ZorroSummary> zorroSummary{"zorroSummary"};

void init(InitContext& initContext)
{
Expand Down Expand Up @@ -335,7 +337,7 @@ struct HfDataCreatorJpsiHadReduced {
}

// init HF event selection helper
hfEvSel.init(registry);
hfEvSel.init(registry, zorroSummary);
if (doprocessJpsiKMc || doprocessJpsiPhiMc) {
const auto& workflows = initContext.services().get<RunningWorkflowInfo const>();
for (const DeviceSpec& device : workflows.devices) {
Expand Down
4 changes: 3 additions & 1 deletion PWGHF/TableProducer/candidateCreator2Prong.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@

#include "Common/CCDB/ctpRateFetcher.h"
#include "Common/Core/RecoDecay.h"
#include "Common/Core/ZorroSummary.h"
#include "Common/Core/trackUtilities.h"
#include "Common/DataModel/Centrality.h"
#include "Common/DataModel/EventSelection.h"
Expand Down Expand Up @@ -131,6 +132,7 @@ struct HfCandidateCreator2Prong {
ConfigurableAxis axisMass{"axisMass", {500, 1.6, 2.1}, "axis for mass (GeV/c^2)"};

HistogramRegistry registry{"registry"};
OutputObj<ZorroSummary> zorroSummary{"zorroSummary"};

void init(InitContext const&)
{
Expand Down Expand Up @@ -187,7 +189,7 @@ struct HfCandidateCreator2Prong {
hCandidates = registry.add<TH1>("hCandidates", "candidates counter", {HistType::kTH1D, {axisCands}});

// init HF event selection helper
hfEvSel.init(registry);
hfEvSel.init(registry, zorroSummary);

if (std::accumulate(doprocessDF.begin(), doprocessDF.end(), 0) == 1) {
registry.fill(HIST("hVertexerType"), aod::hf_cand::VertexerType::DCAFitter);
Expand Down
4 changes: 3 additions & 1 deletion PWGHF/TableProducer/candidateCreator3Prong.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@

#include "Common/CCDB/ctpRateFetcher.h"
#include "Common/Core/RecoDecay.h"
#include "Common/Core/ZorroSummary.h"
#include "Common/Core/trackUtilities.h"
#include "Common/DataModel/Centrality.h"
#include "Common/DataModel/EventSelection.h"
Expand Down Expand Up @@ -151,6 +152,7 @@ struct HfCandidateCreator3Prong {

std::shared_ptr<TH1> hCandidates;
HistogramRegistry registry{"registry"};
OutputObj<ZorroSummary> zorroSummary{"zorroSummary"};

void init(InitContext const&)
{
Expand Down Expand Up @@ -221,7 +223,7 @@ struct HfCandidateCreator3Prong {
hCandidates = registry.add<TH1>("hCandidates", "candidates counter", {HistType::kTH1D, {axisCands}});

// init HF event selection helper
hfEvSel.init(registry);
hfEvSel.init(registry, zorroSummary);

// Configure DCAFitterN
// df.setBz(bz);
Expand Down
4 changes: 3 additions & 1 deletion PWGHF/TableProducer/candidateCreatorCascade.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@

#include "Common/CCDB/ctpRateFetcher.h"
#include "Common/Core/RecoDecay.h"
#include "Common/Core/ZorroSummary.h"
#include "Common/Core/trackUtilities.h"
#include "Common/DataModel/Centrality.h"
#include "Common/DataModel/EventSelection.h"
Expand Down Expand Up @@ -109,6 +110,7 @@ struct HfCandidateCreatorCascade {

std::shared_ptr<TH1> hCandidates;
HistogramRegistry registry{"registry"};
OutputObj<ZorroSummary> zorroSummary{"zorroSummary"};

void init(InitContext const&)
{
Expand Down Expand Up @@ -141,7 +143,7 @@ struct HfCandidateCreatorCascade {
hCandidates = registry.add<TH1>("hCandidates", "candidates counter", {HistType::kTH1D, {axisCands}});

// init HF event selection helper
hfEvSel.init(registry);
hfEvSel.init(registry, zorroSummary);

massP = MassProton;
massK0s = MassK0Short;
Expand Down
4 changes: 3 additions & 1 deletion PWGHF/TableProducer/candidateCreatorDstar.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@

#include "Common/CCDB/ctpRateFetcher.h"
#include "Common/Core/RecoDecay.h"
#include "Common/Core/ZorroSummary.h"
#include "Common/Core/trackUtilities.h"
#include "Common/DataModel/Centrality.h"
#include "Common/DataModel/EventSelection.h"
Expand Down Expand Up @@ -143,6 +144,7 @@ struct HfCandidateCreatorDstar {
{"QA/hPtD0Prong1", "D^{0} candidates' prong1", {HistType::kTH1F, {ptAxis}}},
{"QA/hPtD0", "D^{0} candidates", {HistType::kTH1F, {ptAxis}}},
{"QA/hPtDstar", "D* candidates", {HistType::kTH1F, {ptAxis}}}}};
OutputObj<ZorroSummary> zorroSummary{"zorroSummary"};

/// @brief This function initializes the ccdb setting, vertex fitter and runs function MatLayerCylSet::rectifyPtrFromFile(..args..)
void init(InitContext const&)
Expand Down Expand Up @@ -174,7 +176,7 @@ struct HfCandidateCreatorDstar {
hCandidates = registry.add<TH1>("hCandidates", "candidates counter", {HistType::kTH1D, {axisCands}});

// init HF event selection helper
hfEvSel.init(registry);
hfEvSel.init(registry, zorroSummary);

// LOG(info) << "Init Function Invoked";
massPi = MassPiPlus;
Expand Down
5 changes: 4 additions & 1 deletion PWGHF/TableProducer/candidateCreatorXic0Omegac0.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@

#include "Common/CCDB/ctpRateFetcher.h"
#include "Common/Core/RecoDecay.h"
#include "Common/Core/ZorroSummary.h"
#include "Common/Core/trackUtilities.h"
#include "Common/DataModel/Centrality.h"
#include "Common/DataModel/EventSelection.h"
Expand Down Expand Up @@ -165,6 +166,8 @@ struct HfCandidateCreatorXic0Omegac0 {
std::shared_ptr<TH1> hInvMassCharmBaryonToXiPi, hInvMassCharmBaryonToOmegaPi, hInvMassCharmBaryonToOmegaK, hFitterStatusToXiPi, hFitterStatusToOmegaPi, hFitterStatusToOmegaK, hCandidateCounterToXiPi, hCandidateCounterToOmegaPi, hCandidateCounterToOmegaK, hCascadesCounterToXiPi, hCascadesCounterToOmegaPi, hCascadesCounterToOmegaK;

HistogramRegistry registry{"registry"};
OutputObj<ZorroSummary> zorroSummary{"zorroSummary"};

// Helper struct to pass information
struct {
float chi2GeoV0;
Expand Down Expand Up @@ -365,7 +368,7 @@ struct HfCandidateCreatorXic0Omegac0 {
}

// init HF event selection helper
hfEvSel.init(registry);
hfEvSel.init(registry, zorroSummary);

df.setPropagateToPCA(propagateToPCA);
df.setMaxR(maxR);
Expand Down
4 changes: 3 additions & 1 deletion PWGHF/TableProducer/candidateCreatorXicToXiPiPi.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@

#include "Common/CCDB/ctpRateFetcher.h"
#include "Common/Core/RecoDecay.h"
#include "Common/Core/ZorroSummary.h"
#include "Common/Core/trackUtilities.h"
#include "Common/DataModel/Centrality.h"
#include "Common/DataModel/EventSelection.h"
Expand Down Expand Up @@ -139,6 +140,7 @@ struct HfCandidateCreatorXicToXiPiPi {
using TracksWCovExtraPidPrPi = soa::Join<aod::TracksWCovExtra, aod::TracksPidPr, aod::TracksPidPi>;

HistogramRegistry registry{"registry"};
OutputObj<ZorroSummary> zorroSummary{"zorroSummary"};

void init(InitContext const&)
{
Expand Down Expand Up @@ -186,7 +188,7 @@ struct HfCandidateCreatorXicToXiPiPi {
runNumber = 0;

// initialize HF event selection helper
hfEvSel.init(registry);
hfEvSel.init(registry, zorroSummary);

// initialize 3-prong vertex fitter
df.setPropagateToPCA(propagateToPCA);
Expand Down
3 changes: 1 addition & 2 deletions PWGHF/Utils/utilsEvSelHf.h
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,6 @@ struct HfEventSelection : o2::framework::ConfigurableGroup {

// util to retrieve trigger mask in case of software triggers
Zorro zorro;
o2::framework::OutputObj<ZorroSummary> zorroSummary{"zorroSummary"};
int currentRun{-1};

/// Set standard preselection gap trigger (values taken from UD group)
Expand Down Expand Up @@ -248,7 +247,7 @@ struct HfEventSelection : o2::framework::ConfigurableGroup {

/// \brief Inits the HF event selection object
/// \param registry reference to the histogram registry
void init(o2::framework::HistogramRegistry& registry)
void init(o2::framework::HistogramRegistry& registry, o2::framework::OutputObj<ZorroSummary>& zorroSummary)
{
// we initialise the RCT checker
if (requireGoodRct) {
Expand Down
Loading