Skip to content

Commit a99ff4f

Browse files
committed
Fix error messages relevant to name of variables
1 parent 8707695 commit a99ff4f

File tree

1 file changed

+11
-9
lines changed

1 file changed

+11
-9
lines changed

PWGUD/Tasks/processMCDPMJetSGv3.cxx

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ using namespace o2::framework::expressions;
3232

3333
struct ProcessMCDPMJetSGv3 {
3434
HistogramRegistry histos{"histos", {}, OutputObjHandlingPolicy::AnalysisObject};
35-
TDatabasePDG* fPDG = TDatabasePDG::Instance();
35+
// TDatabasePDG* fPDG = TDatabasePDG::Instance();
3636

3737
Configurable<int> nBinsPt{"nBinsPt", 100, "N bins in pT histo"};
3838

@@ -250,11 +250,13 @@ struct ProcessMCDPMJetSGv3 {
250250

251251
histos.fill(HIST("numberOfTracksReco"), tracks.size());
252252
double etaMax = 0.8;
253+
double yMax = 0.8;
254+
double sigmaMax = 3.;
253255
double ptMin = 0.1;
254256
int nFindableMin = 70;
255257

256258
int counter = 0;
257-
for (auto& track : tracks) {
259+
for (const auto& track : tracks) {
258260
if (track.isPVContributor()) {
259261
int nFindable = track.tpcNClsFindable();
260262
if (nFindable < nFindableMin) {
@@ -276,7 +278,7 @@ struct ProcessMCDPMJetSGv3 {
276278
// continue;
277279
// }
278280

279-
double momentum = sqrt(track.px() * track.px() + track.py() * track.py() + track.pz() * track.pz());
281+
double momentum = std::sqrt(track.px() * track.px() + track.py() * track.py() + track.pz() * track.pz());
280282
double dEdx = track.tpcSignal();
281283
histos.fill(HIST("hdEdx"), momentum, dEdx);
282284

@@ -294,7 +296,7 @@ struct ProcessMCDPMJetSGv3 {
294296
nSigmaPi = track.tpcNSigmaPi();
295297
nSigmaKa = track.tpcNSigmaKa();
296298
nSigmaPr = track.tpcNSigmaPr();
297-
if (std::abs(nSigmaPi) < 3. && std::abs(pion.Rapidity()) < 0.8) {
299+
if (std::abs(nSigmaPi) < sigmaMax && std::abs(pion.Rapidity()) < yMax) {
298300
histos.fill(HIST("hSigmaPion"), track.pt(), nSigmaPi);
299301
if (track.has_udMcParticle()) {
300302
auto mcParticle = track.udMcParticle();
@@ -308,7 +310,7 @@ struct ProcessMCDPMJetSGv3 {
308310
}
309311
}
310312
}
311-
if (std::abs(nSigmaKa) < 3. && std::abs(kaon.Rapidity()) < 0.8) {
313+
if (std::abs(nSigmaKa) < sigmaMax && std::abs(kaon.Rapidity()) < yMax) {
312314
histos.fill(HIST("hSigmaKaon"), track.pt(), nSigmaKa);
313315
if (track.has_udMcParticle()) {
314316
auto mcParticle = track.udMcParticle();
@@ -321,7 +323,7 @@ struct ProcessMCDPMJetSGv3 {
321323
}
322324
}
323325
}
324-
if (std::abs(nSigmaPr) < 3. && std::abs(proton.Rapidity()) < 0.8) {
326+
if (std::abs(nSigmaPr) < sigmaMax && std::abs(proton.Rapidity()) < yMax) {
325327
histos.fill(HIST("hSigmaProton"), track.pt(), nSigmaPr);
326328
if (track.has_udMcParticle()) {
327329
auto mcParticle = track.udMcParticle();
@@ -350,7 +352,7 @@ struct ProcessMCDPMJetSGv3 {
350352
nSigmaPiTOF = track.tofNSigmaPi();
351353
nSigmaKaTOF = track.tofNSigmaKa();
352354
nSigmaPrTOF = track.tofNSigmaPr();
353-
if (std::abs(nSigmaPiTOF) < 3. && std::abs(pion.Rapidity()) < 0.8) {
355+
if (std::abs(nSigmaPiTOF) < sigmaMax && std::abs(pion.Rapidity()) < yMax) {
354356
histos.fill(HIST("hSigmaPionTOF"), track.pt(), nSigmaPiTOF);
355357
if (track.has_udMcParticle()) {
356358
auto mcParticle = track.udMcParticle();
@@ -364,7 +366,7 @@ struct ProcessMCDPMJetSGv3 {
364366
}
365367
}
366368
}
367-
if (std::abs(nSigmaKaTOF) < 3. && std::abs(kaon.Rapidity()) < 0.8) {
369+
if (std::abs(nSigmaKaTOF) < sigmaMax && std::abs(kaon.Rapidity()) < yMax) {
368370
histos.fill(HIST("hSigmaKaonTOF"), track.pt(), nSigmaKaTOF);
369371
if (track.has_udMcParticle()) {
370372
auto mcParticle = track.udMcParticle();
@@ -377,7 +379,7 @@ struct ProcessMCDPMJetSGv3 {
377379
}
378380
}
379381
}
380-
if (std::abs(nSigmaPrTOF) < 3. && std::abs(proton.Rapidity()) < 0.8) {
382+
if (std::abs(nSigmaPrTOF) < sigmaMax && std::abs(proton.Rapidity()) < yMax) {
381383
histos.fill(HIST("hSigmaProtonTOF"), track.pt(), nSigmaPrTOF);
382384
if (track.has_udMcParticle()) {
383385
auto mcParticle = track.udMcParticle();

0 commit comments

Comments
 (0)