Skip to content

Commit ab531bf

Browse files
committed
code check error solved
1 parent efe872c commit ab531bf

1 file changed

Lines changed: 8 additions & 6 deletions

File tree

‎PWGJE/Tasks/nucleiInJets.cxx‎

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -49,8 +49,11 @@
4949
#include <TH3.h>
5050
#include <THnSparse.h>
5151
#include <TMCProcess.h>
52+
#include <TPDGCode.h>
5253
#include <TVector2.h>
5354

55+
#include <ReconstructionDataFormats/PID.h>
56+
5457
#include <algorithm>
5558
#include <array>
5659
#include <cmath>
@@ -303,7 +306,7 @@ struct nucleiInJets {
303306
if (doprocessJetTracksData && doprocessJetTracksDataLfPid) {
304307
LOGP(fatal, "only one process function should be enabled!!!");
305308
}
306-
if (!(mcClosureTrainingFraction >= 0.f && mcClosureTrainingFraction <= 1.f)) {
309+
if (!(mcClosureTrainingFraction >= 0.f) || !(mcClosureTrainingFraction <= 1.f)) {
307310
LOGP(fatal, "mcClosureTrainingFraction must be between 0 and 1, inclusive");
308311
}
309312
if (mcClosureSplitSeed == 0) {
@@ -368,7 +371,9 @@ struct nucleiInJets {
368371
if (isPOCollision) {
369372
for (const auto& sample : {std::string("tracksInc"), std::string("recInc")}) {
370373
for (const auto& species : {std::string("proton"), std::string("antiproton"), std::string("deuteron"), std::string("antideuteron")}) {
371-
const auto base = sample + "/qa/rapidity/" + species;
374+
auto base = sample;
375+
base += "/qa/rapidity/";
376+
base += species;
372377
const bool isMcTruth = sample == "recInc";
373378
const char* yLabTitle = isMcTruth ? "matched primary MC truth; #it{p}_{T} (GeV/#it{c}); #eta; y_{lab}" : "inclusive data; #it{p}_{T} (GeV/#it{c}); #eta; y_{lab}";
374379
const char* yCmsTitle = isMcTruth ? "matched primary MC truth; #it{p}_{T} (GeV/#it{c}); #eta; y_{CMS}" : "inclusive data; #it{p}_{T} (GeV/#it{c}); #eta; y_{CMS}";
@@ -1029,10 +1034,7 @@ struct nucleiInJets {
10291034
bool isOccupancyAccepted(const coll& collision)
10301035
{
10311036
auto occupancy{collision.trackOccupancyInTimeRange()};
1032-
if (occupancy < cfgOccupancyRange->at(0) || occupancy > cfgOccupancyRange->at(1))
1033-
return false;
1034-
else
1035-
return true;
1037+
return !(occupancy < cfgOccupancyRange->at(0) || occupancy > cfgOccupancyRange->at(1));
10361038
}
10371039

10381040
int nEvents = 0;

0 commit comments

Comments
 (0)