Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[PWGEM/PhotonMeson] Fix Cluster-Collision assignment in emcQC task #8942

Merged
merged 1 commit into from
Dec 11, 2024
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: 2 additions & 2 deletions PWGEM/PhotonMeson/Tasks/emcalQC.cxx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright 2019-2024 CERN and copyright holders of ALICE O2.

Check warning on line 1 in PWGEM/PhotonMeson/Tasks/emcalQC.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[doc/file]

Provide mandatory file documentation.
// See https://alice-o2.web.cern.ch/copyright for details of the copyright holders.
// All rights not expressly granted are reserved.
//
Expand All @@ -8,7 +8,7 @@
// In applying this license CERN does not waive the privileges and immunities
// granted to it by virtue of its status as an Intergovernmental Organization
// or submit itself to any jurisdiction.
//

Check warning on line 11 in PWGEM/PhotonMeson/Tasks/emcalQC.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[doc/file]

Documentation for \file is missing, incorrect or misplaced.

Check warning on line 11 in PWGEM/PhotonMeson/Tasks/emcalQC.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[doc/file]

Documentation for \brief is missing, incorrect or misplaced.

Check warning on line 11 in PWGEM/PhotonMeson/Tasks/emcalQC.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[doc/file]

Documentation for \author is missing, incorrect or misplaced.
// ========================
//
// This code runs loop over EMCal clusters for EMCal QC.
Expand Down Expand Up @@ -122,8 +122,8 @@
fEMCCut.SetM02Range(emccuts.EMC_minM02, emccuts.EMC_maxM02);
fEMCCut.SetTimeRange(emccuts.EMC_minTime, emccuts.EMC_maxTime);

fEMCCut.SetTrackMatchingEta([a, b, c](float pT) { return a + pow(pT + b, c); });

Check warning on line 125 in PWGEM/PhotonMeson/Tasks/emcalQC.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[std-prefix]

Use std:: prefix for names from the std namespace.
fEMCCut.SetTrackMatchingPhi([d, e, f](float pT) { return d + pow(pT + e, f); });

Check warning on line 126 in PWGEM/PhotonMeson/Tasks/emcalQC.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[std-prefix]

Use std:: prefix for names from the std namespace.

fEMCCut.SetMinEoverP(emccuts.EMC_Eoverp);
fEMCCut.SetUseExoticCut(emccuts.EMC_UseExoticCut);
Expand Down Expand Up @@ -152,20 +152,20 @@
o2::aod::pwgem::photonmeson::utils::clusterhistogram::addClusterHistograms(&fRegistry, cfgDo2DQA);
}

Preslice<aod::SkimEMCClusters> perCollision = aod::skimmedcluster::collisionId;
Preslice<MyEMCClusters> perCollision = aod::emccluster::emeventId;

void processQC(MyCollisions const& collisions, aod::SkimEMCClusters const& clusters)
void processQC(MyCollisions const& collisions, MyEMCClusters const& clusters)
{
for (auto& collision : collisions) {

Check warning on line 159 in PWGEM/PhotonMeson/Tasks/emcalQC.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.

if (eventcuts.onlyKeepWeightedEvents && fabs(collision.weight() - 1.) < 1E-10) {

Check warning on line 161 in PWGEM/PhotonMeson/Tasks/emcalQC.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[std-prefix]

Use std:: prefix for names from the std namespace.
continue;
}

fRegistry.fill(HIST("Event/hEMCCollisionCounter"), 1);
if (collision.selection_bit(o2::aod::evsel::kIsTriggerTVX)) {
fRegistry.fill(HIST("Event/hEMCCollisionCounter"), 2);
if (abs(collision.posZ()) < eventcuts.cfgZvtxMax) {

Check warning on line 168 in PWGEM/PhotonMeson/Tasks/emcalQC.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[std-prefix]

Use std:: prefix for names from the std namespace.
fRegistry.fill(HIST("Event/hEMCCollisionCounter"), 3);
if (collision.sel8()) {
fRegistry.fill(HIST("Event/hEMCCollisionCounter"), 4);
Expand Down Expand Up @@ -197,7 +197,7 @@
fRegistry.fill(HIST("Cluster/before/hNgamma"), clusters_per_coll.size(), collision.weight());
int ngBefore = 0;
int ngAfter = 0;
for (auto& cluster : clusters_per_coll) {

Check warning on line 200 in PWGEM/PhotonMeson/Tasks/emcalQC.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.
// Fill the cluster properties before applying any cuts
if (!fEMCCut.IsSelectedEMCal(EMCPhotonCut::EMCPhotonCuts::kDefinition, cluster))
continue;
Expand Down
4 changes: 2 additions & 2 deletions PWGEM/PhotonMeson/Utils/ClusterHistograms.h
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,8 @@ void addClusterHistograms(HistogramRegistry* fRegistry, bool do2DQA)
fRegistry->addClone("Cluster/before/", "Cluster/after/");
}

template <const int cls_id>
void fillClusterHistograms(HistogramRegistry* fRegistry, SkimEMCCluster cluster, bool do2DQA, float weight = 1.f)
template <const int cls_id, typename TCluster>
void fillClusterHistograms(HistogramRegistry* fRegistry, TCluster cluster, bool do2DQA, float weight = 1.f)
{
static constexpr std::string_view cluster_types[2] = {"before/", "after/"};
fRegistry->fill(HIST("Cluster/") + HIST(cluster_types[cls_id]) + HIST("hE"), cluster.e(), weight);
Expand Down
Loading