Skip to content

Commit a9d5b30

Browse files
victor-gonzalezVictor
andauthored
[PWGCF] DptDpt - Per run QC. Addressing linter recommendations (#10241)
Co-authored-by: Victor <victor@cern.ch>
1 parent 5443f10 commit a9d5b30

File tree

3 files changed

+25
-23
lines changed

3 files changed

+25
-23
lines changed

PWGCF/TwoParticleCorrelations/Tasks/CMakeLists.txt

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -38,13 +38,13 @@ o2physics_add_dpl_workflow(dpt-dpt-efficiency-and-qc
3838
PUBLIC_LINK_LIBRARIES O2::Framework O2Physics::AnalysisCore O2Physics::PWGCFCore
3939
COMPONENT_NAME Analysis)
4040

41-
o2physics_add_dpl_workflow(twopartcorr-per-run-qc
42-
SOURCES perRunQc.cxx
41+
o2physics_add_dpl_workflow(dpt-dpt-per-run-qc
42+
SOURCES dptDptPerRunQc.cxx
4343
PUBLIC_LINK_LIBRARIES O2::Framework O2Physics::AnalysisCore O2Physics::PWGCFCore O2Physics::AnalysisCCDB
4444
COMPONENT_NAME Analysis)
4545

46-
o2physics_add_dpl_workflow(twopartcorr-per-run-extraqc
47-
SOURCES perRunExtraQc.cxx
46+
o2physics_add_dpl_workflow(dpt-dpt-per-run-extra-qc
47+
SOURCES dptDptPerRunExtraQc.cxx
4848
PUBLIC_LINK_LIBRARIES O2::Framework O2Physics::AnalysisCore O2Physics::PWGCFCore O2Physics::AnalysisCCDB
4949
COMPONENT_NAME Analysis)
5050

PWGCF/TwoParticleCorrelations/Tasks/perRunExtraQc.cxx renamed to PWGCF/TwoParticleCorrelations/Tasks/dptDptPerRunExtraQc.cxx

Lines changed: 14 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,14 @@
88
// In applying this license CERN does not waive the privileges and immunities
99
// granted to it by virtue of its status as an Intergovernmental Organization
1010
// or submit itself to any jurisdiction.
11-
//
12-
// Minimal example to run this task:
13-
// o2-analysis-centrality-table -b --configuration json://configuration.json | o2-analysis-timestamp -b --configuration json://configuration.json | o2-analysis-event-selection -b --configuration json://configuration.json | o2-analysis-multiplicity-table -b --configuration json://configuration.json | o2-analysis-lf-zdcsp -b --configuration json://configuration.json --aod-file @input_data.txt --aod-writer-json OutputDirector.json
11+
12+
/// \file dptDptPerRunExtraQc.cxx
13+
/// \brief basic per run check of the per analyzed species p vs TPC IW momentum
14+
/// \author victor.gonzalez.sebastian@gmail.com
1415

1516
#include <array>
1617
#include <cmath>
18+
#include <unordered_map>
1719

1820
#include "Framework/AnalysisDataModel.h"
1921
#include "Framework/AnalysisTask.h"
@@ -31,21 +33,21 @@ using namespace o2::constants::physics;
3133

3234
using BCsWithTimestamps = soa::Join<aod::BCs, aod::Timestamps>;
3335

34-
namespace perrunextraqa
36+
namespace perrunextraqc
3537
{
3638
std::unordered_map<int, TProfile3D*> gRunMapPvsTpcIwP;
3739
TProfile3D* gCurrentRunPvsPtcIwP;
38-
} // namespace perrunextraqa
40+
} // namespace perrunextraqc
3941

40-
struct DptDptPerRunExtraQa {
42+
struct DptDptPerRunExtraQc {
4143
int mRunNumber{-1};
4244
AxisSpec qaPAxis{150, 0.1, 5.0};
4345

44-
HistogramRegistry mHistos{"PerRunExtraQaHistograms", {}, OutputObjHandlingPolicy::AnalysisObject};
46+
HistogramRegistry mHistos{"PerRunExtraQcHistograms", {}, OutputObjHandlingPolicy::AnalysisObject};
4547

4648
void initRunNumber(aod::BCsWithTimestamps::iterator const& bc)
4749
{
48-
using namespace perrunextraqa;
50+
using namespace perrunextraqc;
4951

5052
if (mRunNumber == bc.runNumber()) {
5153
return;
@@ -60,17 +62,17 @@ struct DptDptPerRunExtraQa {
6062

6163
void init(InitContext&)
6264
{
63-
using namespace perrunextraqa;
65+
using namespace perrunextraqc;
6466

6567
qaPAxis.makeLogarithmic();
6668
}
6769

6870
template <typename PassedTracks>
6971
void processTracks(PassedTracks const& tracks)
7072
{
71-
using namespace perrunextraqa;
73+
using namespace perrunextraqc;
7274

73-
for (auto& track : tracks) {
75+
for (const auto& track : tracks) {
7476
gCurrentRunPvsPtcIwP->Fill(track.trackacceptedid(), track.p(), track.tpcInnerParam(), track.pt());
7577
}
7678
}
@@ -95,5 +97,5 @@ struct DptDptPerRunExtraQa {
9597
WorkflowSpec defineDataProcessing(ConfigContext const& cfgc)
9698
{
9799
return WorkflowSpec{
98-
adaptAnalysisTask<DptDptPerRunExtraQa>(cfgc)};
100+
adaptAnalysisTask<DptDptPerRunExtraQc>(cfgc)};
99101
}

PWGCF/TwoParticleCorrelations/Tasks/perRunQc.cxx renamed to PWGCF/TwoParticleCorrelations/Tasks/dptDptPerRunQc.cxx

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
// granted to it by virtue of its status as an Intergovernmental Organization
1010
// or submit itself to any jurisdiction.
1111

12-
/// \file perRunQc.cxx
12+
/// \file dptDptPerRunQc.cxx
1313
/// \brief basic per run check of the ITS dead chips and of the hadronic interaction rate
1414
/// \author victor.gonzalez.sebastian@gmail.com
1515

@@ -42,7 +42,7 @@ using namespace o2::framework::expressions;
4242

4343
using BCsWithTimestamps = soa::Join<aod::BCs, aod::Timestamps>;
4444

45-
namespace perrunqatask
45+
namespace perrunqctask
4646
{
4747
static const int32_t nBCsPerOrbit = o2::constants::lhc::LHCMaxBunches;
4848
std::unordered_map<int, TH2*> gHadronicRate;
@@ -53,9 +53,9 @@ std::unordered_map<int, std::shared_ptr<TH1>> gCollisionOrbitAfter;
5353
TH2* gCurrentHadronicRate;
5454
std::shared_ptr<TH1> gCurrentCollisionOrbitBefore;
5555
std::shared_ptr<TH1> gCurrentCollisionOrbitAfter;
56-
} // namespace perrunqatask
56+
} // namespace perrunqctask
5757

58-
struct DptDptPerRunQa {
58+
struct DptDptPerRunQc {
5959

6060
Service<o2::ccdb::BasicCCDBManager> ccdb;
6161

@@ -67,7 +67,7 @@ struct DptDptPerRunQa {
6767

6868
void initCCDB(aod::BCsWithTimestamps::iterator const& bc)
6969
{
70-
using namespace perrunqatask;
70+
using namespace perrunqctask;
7171
using namespace analysis::dptdptfilter;
7272

7373
if (mRunNumber == bc.runNumber()) {
@@ -144,7 +144,7 @@ struct DptDptPerRunQa {
144144

145145
void process(soa::Join<aod::Collisions, aod::EvSels, aod::DptDptCFCollisionsInfo>::iterator const& collision, aod::BCsWithTimestamps const&)
146146
{
147-
using namespace perrunqatask;
147+
using namespace perrunqctask;
148148
using namespace analysis::dptdptfilter;
149149

150150
auto bc = collision.bc_as<aod::BCsWithTimestamps>();
@@ -166,5 +166,5 @@ struct DptDptPerRunQa {
166166
WorkflowSpec defineDataProcessing(ConfigContext const& cfgc)
167167
{
168168
return WorkflowSpec{
169-
adaptAnalysisTask<DptDptPerRunQa>(cfgc)};
169+
adaptAnalysisTask<DptDptPerRunQc>(cfgc)};
170170
}

0 commit comments

Comments
 (0)