Skip to content

Commit 40a650c

Browse files
committed
Fix default Zorro ccdb path
1 parent 3bd130f commit 40a650c

File tree

1 file changed

+18
-17
lines changed

1 file changed

+18
-17
lines changed

PWGLF/TableProducer/Nuspex/nucleiSpectra.cxx

Lines changed: 18 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -51,9 +51,10 @@
5151
#include "Framework/runDataProcessing.h"
5252
#include "ReconstructionDataFormats/Track.h"
5353

54-
#include "Math/Vector4D.h"
55-
#include "TRandom3.h"
54+
#include <Math/Vector4D.h>
5655
#include <TMCProcess.h>
56+
#include <TPDGCode.h> // for PDG codes
57+
#include <TRandom3.h>
5758

5859
#include <algorithm>
5960
#include <cmath>
@@ -331,7 +332,7 @@ struct nucleiSpectra {
331332
// CCDB options
332333
Configurable<int> cfgMaterialCorrection{"cfgMaterialCorrection", static_cast<int>(o2::base::Propagator::MatCorrType::USEMatCorrLUT), "Type of material correction"};
333334
Configurable<std::string> cfgCCDBurl{"ccdb-url", "http://alice-ccdb.cern.ch", "url of the ccdb repository"};
334-
Configurable<std::string> cfgZorroCCDBpath{"cfgZorroCCDBpath", "/Users/m/mpuccio/EventFiltering/OTS/", "path to the zorro ccdb objects"};
335+
Configurable<std::string> cfgZorroCCDBpath{"cfgZorroCCDBpath", "EventFiltering/Zorro/", "path to the zorro ccdb objects"};
335336
int mRunNumber = 0;
336337
float mBz = 0.f;
337338

@@ -356,7 +357,7 @@ struct nucleiSpectra {
356357
float dauVtx[3]{0.f, 0.f, 0.f};
357358
auto daughters = particle.daughters_as<aod::McParticles>();
358359
for (const auto& dau : daughters) {
359-
if (abs(dau.pdgCode()) != 22 && abs(dau.pdgCode()) != 11) {
360+
if (std::abs(dau.pdgCode()) != PDG_t::kGamma && std::abs(dau.pdgCode()) != PDG_t::kElectron) {
360361
dauVtx[0] = dau.vx();
361362
dauVtx[1] = dau.vy();
362363
dauVtx[2] = dau.vz();
@@ -605,7 +606,7 @@ struct nucleiSpectra {
605606
{nuclei::charges[4] * cfgMomentumScalingBetheBloch->get(3u, 0u) / nuclei::masses[4], nuclei::charges[4] * cfgMomentumScalingBetheBloch->get(3u, 1u) / nuclei::masses[4]}};
606607

607608
int nGloTracks[2]{0, 0}, nTOFTracks[2]{0, 0};
608-
for (auto& track : tracks) { // start loop over tracks
609+
for (const auto& track : tracks) { // start loop over tracks
609610
if (std::abs(track.eta()) > cfgCutEta ||
610611
track.tpcInnerParam() < cfgCutTpcMom ||
611612
track.itsNCls() < cfgCutNclusITS ||
@@ -857,7 +858,7 @@ struct nucleiSpectra {
857858
}
858859
}
859860
}
860-
for (auto& c : nuclei::candidates_flow) {
861+
for (const auto& c : nuclei::candidates_flow) {
861862
nucleiTableFlow(c.centFV0A, c.centFT0M, c.centFT0A, c.centFT0C, c.psiFT0A, c.psiFT0C, c.psiTPC, c.psiTPCl, c.psiTPCr, c.qFT0A, c.qFT0C, c.qTPC, c.qTPCl, c.qTPCr);
862863
}
863864
}
@@ -874,7 +875,7 @@ struct nucleiSpectra {
874875
return;
875876
}
876877
fillDataInfo(collision, tracks);
877-
for (auto& c : nuclei::candidates) {
878+
for (const auto& c : nuclei::candidates) {
878879
if (c.fillTree) {
879880
nucleiTable(c.pt, c.eta, c.phi, c.tpcInnerParam, c.beta, c.zVertex, c.nContrib, c.DCAxy, c.DCAz, c.TPCsignal, c.ITSchi2, c.TPCchi2, c.TOFchi2, c.flags, c.TPCfindableCls, c.TPCcrossedRows, c.ITSclsMap, c.TPCnCls, c.TPCnClsShared, c.clusterSizesITS);
880881
}
@@ -886,7 +887,7 @@ struct nucleiSpectra {
886887
}
887888
}
888889
}
889-
for (auto& c : nuclei::candidates_flow) {
890+
for (const auto& c : nuclei::candidates_flow) {
890891
nucleiTableFlow(c.centFV0A, c.centFT0M, c.centFT0A, c.centFT0C, c.psiFT0A, c.psiFT0C, c.psiTPC, c.psiTPCl, c.psiTPCr, c.qFT0A, c.qFT0C, c.qTPC, c.qTPCl, c.qTPCr);
891892
}
892893
}
@@ -896,11 +897,11 @@ struct nucleiSpectra {
896897
void processMC(soa::Join<aod::Collisions, aod::EvSels, aod::McCollisionLabels> const& collisions, aod::McCollisions const& mcCollisions, soa::Join<TrackCandidates, aod::McTrackLabels> const& tracks, aod::McParticles const& particlesMC, aod::BCsWithTimestamps const&)
897898
{
898899
nuclei::candidates.clear();
899-
for (auto& c : mcCollisions) {
900+
for (const auto& c : mcCollisions) {
900901
spectra.fill(HIST("hGenVtxZ"), c.posZ());
901902
}
902903
std::vector<bool> goodCollisions(mcCollisions.size(), false);
903-
for (auto& collision : collisions) {
904+
for (const auto& collision : collisions) {
904905
if (!eventSelection(collision)) {
905906
continue;
906907
}
@@ -948,7 +949,7 @@ struct nucleiSpectra {
948949
if (particle.isPhysicalPrimary()) {
949950
c.flags |= kIsPhysicalPrimary;
950951
if (particle.has_mothers()) {
951-
for (auto& motherparticle : particle.mothers_as<aod::McParticles>()) {
952+
for (const auto& motherparticle : particle.mothers_as<aod::McParticles>()) {
952953
if (std::find(nuclei::hfMothCodes.begin(), nuclei::hfMothCodes.end(), std::abs(motherparticle.pdgCode())) != nuclei::hfMothCodes.end()) {
953954
c.flags |= kIsSecondaryFromWeakDecay;
954955
motherPdgCode = motherparticle.pdgCode();
@@ -959,7 +960,7 @@ struct nucleiSpectra {
959960
}
960961
} else if (particle.has_mothers()) {
961962
c.flags |= kIsSecondaryFromWeakDecay;
962-
for (auto& motherparticle : particle.mothers_as<aod::McParticles>()) {
963+
for (const auto& motherparticle : particle.mothers_as<aod::McParticles>()) {
963964
motherPdgCode = motherparticle.pdgCode();
964965
motherDecRadius = std::hypot(particle.vx() - motherparticle.vx(), particle.vy() - motherparticle.vy());
965966
}
@@ -973,7 +974,7 @@ struct nucleiSpectra {
973974
}
974975

975976
int index{0};
976-
for (auto& particle : particlesMC) {
977+
for (const auto& particle : particlesMC) {
977978
int pdg{std::abs(particle.pdgCode())};
978979
for (int iS{0}; iS < nuclei::species; ++iS) {
979980
if (pdg != nuclei::codes[iS]) {
@@ -1005,7 +1006,7 @@ struct nucleiSpectra {
10051006
continue; // skip secondaries from weak decay without mothers
10061007
}
10071008
flags |= kIsSecondaryFromWeakDecay;
1008-
for (auto& motherparticle : particle.mothers_as<aod::McParticles>()) {
1009+
for (const auto& motherparticle : particle.mothers_as<aod::McParticles>()) {
10091010
motherPdgCode = motherparticle.pdgCode();
10101011
motherDecRadius = std::hypot(particle.vx() - motherparticle.vx(), particle.vy() - motherparticle.vy());
10111012
}
@@ -1062,7 +1063,7 @@ struct nucleiSpectra {
10621063
{
10631064
nuclei::candidates.clear();
10641065
std::vector<bool> goodCollisions(mcCollisions.size(), false);
1065-
for (auto& collision : collisions) {
1066+
for (const auto& collision : collisions) {
10661067
if (!eventSelection(collision)) {
10671068
continue;
10681069
}
@@ -1085,7 +1086,7 @@ struct nucleiSpectra {
10851086
if (particle.isPhysicalPrimary()) {
10861087
c.flags |= kIsPhysicalPrimary;
10871088
if (particle.has_mothers()) {
1088-
for (auto& motherparticle : particle.mothers_as<aod::McParticles>()) {
1089+
for (const auto& motherparticle : particle.mothers_as<aod::McParticles>()) {
10891090
if (std::find(nuclei::hfMothCodes.begin(), nuclei::hfMothCodes.end(), std::abs(motherparticle.pdgCode())) != nuclei::hfMothCodes.end()) {
10901091
c.flags |= kIsSecondaryFromWeakDecay;
10911092
motherPdgCode = motherparticle.pdgCode();
@@ -1096,7 +1097,7 @@ struct nucleiSpectra {
10961097
}
10971098
} else if (particle.has_mothers()) {
10981099
c.flags |= kIsSecondaryFromWeakDecay;
1099-
for (auto& motherparticle : particle.mothers_as<aod::McParticles>()) {
1100+
for (const auto& motherparticle : particle.mothers_as<aod::McParticles>()) {
11001101
motherPdgCode = motherparticle.pdgCode();
11011102
motherDecRadius = std::hypot(particle.vx() - motherparticle.vx(), particle.vy() - motherparticle.vy());
11021103
}

0 commit comments

Comments
 (0)