Skip to content

Commit ff44cad

Browse files
author
Maria Calmon Behling
committed
removed comments and unnecessary includes
1 parent e0a2e80 commit ff44cad

2 files changed

Lines changed: 2 additions & 63 deletions

File tree

PWGLF/TableProducer/Nuspex/particleCompositionCorrection.cxx

Lines changed: 1 addition & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -119,43 +119,31 @@ void ParticleCompositionCorrection::init(InitContext const&)
119119
const int nBinsMult = maxMult + 1;
120120
const AxisSpec multAxis = {nBinsMult, -0.5, nBinsMult - 0.5, "#it{N}_{ch}", "mult"};
121121

122-
// Multiplicity distributions: fiducial vs INELg0
123122
histos.add("multDist_INELg0", "", kTH1D, {multAxis});
124123
histos.add("multDist_fid", "", kTH1D, {multAxis});
125124
histos.add("multDist_fidVsINELg0", "", kTH2D, {multAxis, multAxis});
126125

127-
// Fractions data 1D
128-
// histos.add("frac/data/pion", "", kTProfile, {ptAxis});
129126
histos.add("frac/data/kaon", "", kTProfile, {ptAxis});
130127
histos.add("frac/data/proton", "", kTProfile, {ptAxis});
131128
histos.add("frac/data/sigma", "", kTProfile, {ptAxis});
132129

133-
// Fractions data 2D
134-
// histos.add("frac/data/pion_mult", "", kTProfile2D, {multAxis, ptAxis});
135130
histos.add("frac/data/kaon_mult", "", kTProfile2D, {multAxis, ptAxis});
136131
histos.add("frac/data/proton_mult", "", kTProfile2D, {multAxis, ptAxis});
137132
histos.add("frac/data/sigma_mult", "", kTProfile2D, {multAxis, ptAxis});
138133

139-
// Fractions MC
140134
histos.addClone("frac/data/", "frac/mc/");
141135

142-
// Weights Data / MC 1D
143-
// histos.add("weight/pion", "", kTProfile, {ptAxis});
144136
histos.add("weight/kaon", "", kTProfile, {ptAxis});
145137
histos.add("weight/proton", "", kTProfile, {ptAxis});
146138
histos.add("weight/sigma", "", kTProfile, {ptAxis});
147139

148-
// Weights Data / MC 2D
149-
// histos.add("weight/pion_mult", "", kTProfile2D, {multAxis,ptAxis});
150140
histos.add("weight/kaon_mult", "", kTProfile2D, {multAxis, ptAxis});
151141
histos.add("weight/proton_mult", "", kTProfile2D, {multAxis, ptAxis});
152142
histos.add("weight/sigma_mult", "", kTProfile2D, {multAxis, ptAxis});
153143

154-
// Weights Secondaries 1D
155144
histos.add("weight/secDec", "", kTProfile, {ptAxis});
156145
histos.add("weight/secMat", "", kTProfile, {ptAxis});
157146

158-
// Weights Secondaries 2D
159147
histos.add("weight/secDec_mult", "", kTProfile2D, {multAxis, ptAxis});
160148
histos.add("weight/secMat_mult", "", kTProfile2D, {multAxis, ptAxis});
161149
}
@@ -176,10 +164,7 @@ std::tuple<float, float, float> ParticleCompositionCorrection::getWeights(aod::M
176164
auto absPDGCode = std::abs(particle.pdgCode());
177165
// translate abs PDG code to PID variable of neural networks (0: pion, 1: kaon, 2: proton, 3: sigma)
178166

179-
// std::cout << "absPDGCode: " << absPDGCode << '\n';
180-
181167
if (absPDGCode == PDG_t::kPiPlus || absPDGCode == PDG_t::kPi0) {
182-
// std::cout << "same PDG code as Pi +- (" << PDG_t::kPiPlus <<") or Pi0 (" << PDG_t::kPi0 <<")--> skipping " << '\n';
183168
return noWeights;
184169
}
185170

@@ -215,14 +200,6 @@ std::tuple<float, float, float> ParticleCompositionCorrection::getWeights(aod::M
215200
storedWeights[particle.index()] = weights;
216201
}
217202
if (enableQAHistos && particle.isPhysicalPrimary() && std::abs(particle.eta()) < 0.8) { // o2-linter: disable=magic-number (usual range of charged-partilce measurements)
218-
/* if (iterMapPID->first == PDG_t::kPiPlus) {
219-
histos.fill(HIST("frac/data/pion"), pt, fracData);
220-
histos.fill(HIST("frac/mc/pion"), pt, fracMC);
221-
histos.fill(HIST("frac/data/pion_mult"), dNdEta, pt, fracData);
222-
histos.fill(HIST("frac/mc/pion_mult"), dNdEta, pt, fracMC);
223-
histos.fill(HIST("weight/pion"), pt, weight);
224-
histos.fill(HIST("weight/pion_mult"), dNdEta, pt, weight);
225-
} */
226203
if (iterMapPID->first == PDG_t::kKPlus) {
227204
histos.fill(HIST("frac/data/kaon"), pt, fracData);
228205
histos.fill(HIST("frac/mc/kaon"), pt, fracMC);
@@ -296,7 +273,7 @@ void ParticleCompositionCorrection::process(aod::McCollisions::iterator const&,
296273
if (!pdgParticle || pdgParticle->Charge() == 0.) {
297274
continue;
298275
}
299-
if (std::abs(particle.eta()) >= 0.8) { // o2-linter: disable=magic-number (particle density at mid-rapidity)
276+
if (std::abs(particle.eta()) >= etaCut) {
300277
continue;
301278
}
302279
if (std::abs(particle.eta()) < 0.5) { // o2-linter: disable=magic-number (particle density at mid-rapidity)

PWGLF/Tasks/Nuspex/pccQa.cxx

Lines changed: 1 addition & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -28,25 +28,11 @@
2828
#include <Framework/HistogramSpec.h>
2929
#include <Framework/InitContext.h>
3030
#include <Framework/O2DatabasePDGPlugin.h>
31-
32-
#include <iostream>
33-
34-
// Workaround local
35-
/* void customize(std::vector<o2::framework::ConfigParamSpec>& workflowOptions)
36-
{
37-
workflowOptions.push_back(
38-
{"doMC",
39-
o2::framework::VariantType::Bool,
40-
false,
41-
{"Use MC info"}}
42-
);
43-
} */
44-
45-
#include "Framework/Logger.h"
4631
#include <Framework/runDataProcessing.h>
4732

4833
#include <TMCProcess.h>
4934

35+
#include <iostream>
5036
#include <vector>
5137

5238
using namespace o2;
@@ -85,30 +71,9 @@ WorkflowSpec defineDataProcessing(ConfigContext const& cfgc)
8571
return WorkflowSpec{adaptAnalysisTask<PccQa>(cfgc)};
8672
}
8773

88-
// Workaround local:
89-
/* WorkflowSpec defineDataProcessing(ConfigContext const& cfgc)
90-
{
91-
const bool doMC = cfgc.options().get<bool>("doMC");
92-
93-
LOGP(info, "doMC = {}", static_cast<bool>(doMC));
94-
95-
SetDefaultProcesses processes;
96-
processes.map = {
97-
{"processData", !doMC},
98-
{"processMC", doMC}
99-
};
100-
101-
return WorkflowSpec{
102-
adaptAnalysisTask<PccQa>(cfgc, processes)
103-
};
104-
} */
105-
10674
void PccQa::init(InitContext const&)
10775
{
10876

109-
LOGP(info, "processData = {}", static_cast<bool>(doprocessData));
110-
LOGP(info, "processMC = {}", static_cast<bool>(doprocessMC));
111-
11277
histos.add("eventCounter", "", kTH1D, {{1, 0.5, 1.5}});
11378
const AxisSpec dcaAxis = {1000, -1., 1., "#it{DCA}_{xy}", "dca"};
11479
std::vector<double> ptBinEdges = {0.2, 0.4, 0.6, 0.8, 1.0, 1.2, 1.4, 1.6, 1.8, 2.0, 2.5, 3.0};
@@ -152,14 +117,11 @@ void PccQa::init(InitContext const&)
152117

153118
void PccQa::processData(CollisionTableData::iterator const& collision, TrackTableData const& tracks)
154119
{
155-
std::cout << "using processData function: " << '\n';
156120
processMeas<false>(collision, tracks);
157121
}
158122
void PccQa::processMC(CollisionTableMCTrue::iterator const&, TrackTableMC const& tracks, CollisionTableMC const& collisions, ParticleTableMC const&)
159123
{
160124

161-
std::cout << "using processMC function: " << '\n';
162-
163125
for (const auto& collision : collisions) {
164126
auto curTracks = tracks.sliceBy(perCollision, collision.globalIndex());
165127
processMeas<true>(collision, curTracks);

0 commit comments

Comments
 (0)