99// granted to it by virtue of its status as an Intergovernmental Organization
1010// or submit itself to any jurisdiction.
1111//
12+ // / \file strangederivedbuilder.cxx
13+ // / \brief this task provides general links between collisions and strange objects reconstructed in various ways.
14+ // / It is meant to help with providing auxiliary information when dealing with derived data.
15+ // /
16+ // / \author David Dobrigkeit Chinellato <david.dobrigkeit.chinellato@cern.ch>, Austrian Academy of Sciences & MBI
17+ // / \author Romain Schotter <romain.schotter@cern.ch>, Austrian Academy of Sciences & MBI
18+ //
1219// __________________________________________________
13- // this task provides general links between collisions
14- // and strange objects reconstructed in various ways.
15- // It is meant to help with providing auxiliary information
16- // when dealing with derived data.
20+ //
1721
1822#include " PWGLF/DataModel/EPCalibrationTables.h"
1923#include " PWGLF/DataModel/LFParticleIdentification.h"
@@ -1031,8 +1035,8 @@ struct strangederivedbuilder {
10311035
10321036 void processPureSimulation (aod::McParticles const & mcParticles)
10331037 {
1034- for (auto & mcp : mcParticles) {
1035- if (TMath::Abs (mcp.y ()) < 0.5 ) {
1038+ for (auto const & mcp : mcParticles) {
1039+ if (std::abs (mcp.y ()) < 0.5 ) {
10361040 static_for<0 , nSpecies - 1 >([&](auto i) {
10371041 constexpr int index = i.value ;
10381042 if (mcp.pdgCode () == particlePDGCodes[index] && bitcheck (enabledBits, index)) {
@@ -1049,7 +1053,7 @@ struct strangederivedbuilder {
10491053 // identify best-of collision
10501054 int biggestNContribs = -1 ;
10511055 float bestCentrality = 100.5 ;
1052- for (auto & collision : collisions) {
1056+ for (auto const & collision : collisions) {
10531057 if (biggestNContribs < collision.numContrib ()) {
10541058 biggestNContribs = collision.numContrib ();
10551059 bestCentrality = collision.centFT0C ();
@@ -1061,8 +1065,8 @@ struct strangederivedbuilder {
10611065 }
10621066 histos.fill (HIST (" h2dNVerticesVsCentrality" ), bestCentrality, collisions.size ());
10631067
1064- for (auto & mcp : mcParticles) {
1065- if (TMath::Abs (mcp.y ()) < 0.5 && mcp.isPhysicalPrimary ()) {
1068+ for (auto const & mcp : mcParticles) {
1069+ if (std::abs (mcp.y ()) < 0.5 && mcp.isPhysicalPrimary ()) {
10661070 static_for<0 , nSpecies - 1 >([&](auto i) {
10671071 constexpr int index = i.value ;
10681072 if (mcp.pdgCode () == particlePDGCodes[index] && bitcheck (enabledBits, index)) {
@@ -1085,29 +1089,29 @@ struct strangederivedbuilder {
10851089 std::fill (genOmegaPlus.begin (), genOmegaPlus.end (), 0 );
10861090
10871091 // this process function also checks if a given collision was reconstructed and checks explicitly for splitting, etc
1088- for (auto & mcCollision : mcCollisions) {
1092+ for (auto const & mcCollision : mcCollisions) {
10891093 const uint64_t mcCollIndex = mcCollision.globalIndex ();
10901094
10911095 // use one of the generated histograms as the bin finder
10921096 auto hBinFinder = histos.get <TH2>(HIST (" h2dGeneratedK0Short" ));
10931097
10941098 auto mcParticles = mcParticlesEntireTable.sliceBy (mcParticlePerMcCollision, mcCollIndex);
1095- for (auto & mcp : mcParticles) {
1096- if (TMath::Abs (mcp.y ()) < 0.5 && mcp.isPhysicalPrimary ()) {
1099+ for (auto const & mcp : mcParticles) {
1100+ if (std::abs (mcp.y ()) < 0.5 && mcp.isPhysicalPrimary ()) {
10971101 auto binNumber = hBinFinder->FindBin (mcCollision.bestCollisionCentFT0C (), mcp.pt ()); // caution: pack
1098- if (mcp.pdgCode () == 310 )
1102+ if (mcp.pdgCode () == PDG_t:: kK0Short )
10991103 genK0Short[binNumber]++;
1100- if (mcp.pdgCode () == 3122 )
1104+ if (mcp.pdgCode () == PDG_t:: kLambda0 )
11011105 genLambda[binNumber]++;
1102- if (mcp.pdgCode () == - 3122 )
1106+ if (mcp.pdgCode () == PDG_t:: kLambda0Bar )
11031107 genAntiLambda[binNumber]++;
1104- if (mcp.pdgCode () == 3312 )
1108+ if (mcp.pdgCode () == PDG_t:: kXiMinus )
11051109 genXiMinus[binNumber]++;
1106- if (mcp.pdgCode () == - 3312 )
1110+ if (mcp.pdgCode () == PDG_t:: kXiPlusBar )
11071111 genXiPlus[binNumber]++;
1108- if (mcp.pdgCode () == 3334 )
1112+ if (mcp.pdgCode () == PDG_t:: kOmegaMinus )
11091113 genOmegaMinus[binNumber]++;
1110- if (mcp.pdgCode () == - 3334 )
1114+ if (mcp.pdgCode () == PDG_t:: kOmegaPlusBar )
11111115 genOmegaPlus[binNumber]++;
11121116 }
11131117 }
0 commit comments