@@ -706,7 +706,7 @@ struct V0PtInvMassPlots {
706706 if (std::abs (mcCollision.posZ ()) > cutZVertex) {
707707 return ;
708708 }
709- // if (!(mcCollision.multMCNParticlesEta10() > 0)) { TRY TO CHANGE TO THIS
709+ // if (!(mcCollision.multMCNParticlesEta10() > 0)) { // TRY TO CHANGE TO THIS
710710 if (!pwglf::isINELgtNmc (mcParticles, 0 , pdgDB)) {
711711 return ;
712712 }
@@ -1095,10 +1095,9 @@ struct V0PtInvMassPlots {
10951095 }
10961096 }
10971097 }
1098- void recMCProcessDerived (
1099- soa::Join<aod::StraCollisions, aod::StraEvSels, aod::StraCollLabels, aod::StraCents, aod::StraMCCollMults>::iterator const & collision,
1100- soa::Join<aod::V0CollRefs, aod::V0MCCores, aod::V0Datas, aod::V0Extras, aod::V0CoreMCLabels, aod::V0MCMothers> const & V0s,
1101- DaughterTracksDerived const &)
1098+ void recMCProcessDerived (soa::Join<aod::StraCollisions, aod::StraEvSels, aod::StraCollLabels, aod::StraCents>::iterator const & collision,
1099+ soa::Join<aod::V0CollRefs, aod::V0MCCores, aod::V0Cores, aod::V0Extras, aod::V0CoreMCLabels, aod::V0MCMothers> const & V0s,
1100+ DaughterTracksDerived const &)
11021101 {
11031102 // tokenise strings into individual values
11041103 pthistos::kaonPtBins = o2::utils::Str::tokenize (kzeroSettingPtBinsString, ' ,' );
@@ -1245,45 +1244,41 @@ struct V0PtInvMassPlots {
12451244 }
12461245
12471246 // This si the process for the MC generated derived data
1248- void genMCProcessDerived (
1249- // soa::Join<aod::StraMcCollisions, aod::StraMcCents>::iterator const& mcCollision, will include when table is available in the O2 framework
1250- soa::Join<aod::StraMCCollisions, aod::StraCents, aod::StraMCCollMults>::iterator const & mcCollision,
1247+ void genMCProcessDerived ( // soa::Join<aod::StraMcCollisions, aod::StraMcCents>::iterator const& mcCollision, will include when table is available in the O2 framework
1248+ soa::Join<aod::StraMCCollisions, aod::StraMCCollMults>::iterator const & mcCollision,
12511249 soa::SmallGroups<soa::Join<aod::StraCollisions, aod::StraEvSels, aod::StraCollLabels, aod::StraCents>> const & collisions,
1252- soa::Join< aod::V0MCCores, aod::V0CoreMCLabels> const & V0s,
1253- soa::Join< aod::CascMCCores, aod::CascCoreMCLabels> const & cascs,
1250+ aod::V0MCCores const & V0s,
1251+ aod::CascMCCores const & cascs,
12541252 DaughterTracksDerived const &)
12551253 {
12561254 // Event Efficiency, Event Split and V0 Signal Loss Corrections
1257- rMCCorrections.fill (HIST (" hNEvents_Corrections" ), 0.5 , mcCollision.centFT0M ()); // All Events
1255+ // rMCCorrections.fill(HIST("hNEvents_Corrections"), 0.5, mcCollision.centFT0M()); // All Events
12581256 if (std::abs (mcCollision.posZ ()) > cutZVertex) {
12591257 return ;
12601258 }
12611259 if (!(mcCollision.multMCNParticlesEta10 () > 0 )) {
12621260 return ;
12631261 }
1264- rMCCorrections.fill (HIST (" hNEvents_Corrections" ), 1.5 , mcCollision.centFT0M ()); // Event Efficiency Denominator
1265- // Particles (of interest) Generated Pt Spectrum and Signal Loss Denominator Loop
1262+ // rMCCorrections.fill(HIST("hNEvents_Corrections"), 1.5, mcCollision.centFT0M()); // Event Efficiency Denominator
1263+ // Particles (of interest) Generated Pt Spectrum and Signal Loss Denominator Loop
12661264 for (const auto & v0 : V0s) {
1267- if (v0.has_v0MCCore ()) {
1268- auto v0mcParticle = v0.v0MCCore_as <aod::V0MCCores>();
1269- if (v0mcParticle.isPhysicalPrimary ()) {
1270- if (v0mcParticle.pdgCode () == kK0Short ) // kzero matched
1271- {
1272- if (std::abs (v0mcParticle.rapidityMC (0 )) < rapidityCut) {
1273- rMCCorrections.fill (HIST (" hK0shGeneratedPtSpectrum" ), v0.ptMC (), mcCollision.centFT0M ());
1274- }
1265+ if (v0.isPhysicalPrimary ()) {
1266+ if (v0.pdgCode () == kK0Short ) // kzero matched
1267+ {
1268+ if (std::abs (v0.rapidityMC (0 )) < rapidityCut) {
1269+ // rMCCorrections.fill(HIST("hK0shGeneratedPtSpectrum"), v0.ptMC(), mcCollision.centFT0M());
12751270 }
1276- if (v0mcParticle. pdgCode () == kLambda0 ) // lambda matched
1277- {
1278- if ( std::abs (v0mcParticle. rapidityMC ( 1 )) < rapidityCut) {
1279- rMCCorrections. fill ( HIST ( " hLambdaGeneratedPtSpectrum " ), v0.ptMC (), mcCollision. centFT0M ());
1280- }
1271+ }
1272+ if (v0. pdgCode () == kLambda0 ) // lambda matched
1273+ {
1274+ if ( std::abs ( v0.rapidityMC ( 1 )) < rapidityCut) {
1275+ // rMCCorrections.fill(HIST("hLambdaGeneratedPtSpectrum"), v0.ptMC(), mcCollision.centFT0M());
12811276 }
1282- if (v0mcParticle. pdgCode () == kLambda0Bar ) // antilambda matched
1283- {
1284- if ( std::abs (v0mcParticle. rapidityMC ( 2 )) < rapidityCut) {
1285- rMCCorrections. fill ( HIST ( " hAntiLambdaGeneratedPtSpectrum " ), v0.ptMC (), mcCollision. centFT0M ());
1286- }
1277+ }
1278+ if (v0. pdgCode () == kLambda0Bar ) // antilambda matched
1279+ {
1280+ if ( std::abs ( v0.rapidityMC ( 2 )) < rapidityCut) {
1281+ // rMCCorrections.fill(HIST("hAntiLambdaGeneratedPtSpectrum"), v0.ptMC(), mcCollision.centFT0M());
12871282 }
12881283 }
12891284 }
@@ -1294,71 +1289,68 @@ struct V0PtInvMassPlots {
12941289 if (casc.pdgCode () == kXiMinus ) // Xi Minus matched
12951290 {
12961291 if (std::abs (casc.rapidityMC (0 )) < rapidityCut) {
1297- rMCCorrections.fill (HIST (" hXiMinusGeneratedPtSpectrum" ), casc.ptMC (), mcCollision.centFT0M ());
1292+ // rMCCorrections.fill(HIST("hXiMinusGeneratedPtSpectrum"), casc.ptMC(), mcCollision.centFT0M());
12981293 }
12991294 }
13001295 if (casc.pdgCode () == kXi0 ) // Xi Zero matched
13011296 {
13021297 if (std::abs (casc.rapidityMC (0 )) < rapidityCut) { // Using the Xi mass assumption
1303- rMCCorrections.fill (HIST (" hXiZeroGeneratedPtSpectrum" ), casc.ptMC (), mcCollision.centFT0M ());
1298+ // rMCCorrections.fill(HIST("hXiZeroGeneratedPtSpectrum"), casc.ptMC(), mcCollision.centFT0M());
13041299 }
13051300 }
13061301 if (casc.pdgCode () == kOmegaMinus ) // Omega matched
13071302 {
13081303 if (std::abs (casc.rapidityMC (2 )) < rapidityCut) {
1309- rMCCorrections.fill (HIST (" hOmegaGeneratedPtSpectrum" ), casc.ptMC (), mcCollision.centFT0M ());
1304+ // rMCCorrections.fill(HIST("hOmegaGeneratedPtSpectrum"), casc.ptMC(), mcCollision.centFT0M());
13101305 }
13111306 }
13121307 if (casc.pdgCode () == kXiPlusBar ) // Xi Plus matched
13131308 {
13141309 if (std::abs (casc.rapidityMC (1 )) < rapidityCut) {
1315- rMCCorrections.fill (HIST (" hXiPlusGeneratedPtSpectrum" ), casc.ptMC (), mcCollision.centFT0M ());
1310+ // rMCCorrections.fill(HIST("hXiPlusGeneratedPtSpectrum"), casc.ptMC(), mcCollision.centFT0M());
13161311 }
13171312 }
13181313 if (casc.pdgCode () == -kXi0 ) // Anti-Xi Zero matched
13191314 {
13201315 if (std::abs (casc.rapidityMC (1 )) < rapidityCut) { // Using the Xi mass assumption
1321- rMCCorrections.fill (HIST (" hAntiXiZeroGeneratedPtSpectrum" ), casc.ptMC (), mcCollision.centFT0M ());
1316+ // rMCCorrections.fill(HIST("hAntiXiZeroGeneratedPtSpectrum"), casc.ptMC(), mcCollision.centFT0M());
13221317 }
13231318 }
13241319 if (casc.pdgCode () == kOmegaPlusBar ) // Anti-Omega matched
13251320 {
13261321 if (std::abs (casc.rapidityMC (3 )) < rapidityCut) {
1327- rMCCorrections.fill (HIST (" hAntiOmegaGeneratedPtSpectrum" ), casc.ptMC (), mcCollision.centFT0M ());
1322+ // rMCCorrections.fill(HIST("hAntiOmegaGeneratedPtSpectrum"), casc.ptMC(), mcCollision.centFT0M());
13281323 }
13291324 }
13301325 }
13311326 }
13321327 // Signal Loss Numenator Loop
13331328 for (const auto & collision : collisions) {
1334- rMCCorrections.fill (HIST (" hNEvents_Corrections" ), 2.5 , mcCollision.centFT0M ()); // Number of Events Reconsctructed
1335- if (!acceptEvent (collision)) { // Event Selection
1336- return ;
1329+ // rMCCorrections.fill(HIST("hNEvents_Corrections"), 2.5, mcCollision.centFT0M()); // Number of Events Reconsctructed
1330+ if (!acceptEvent (collision)) { // Event Selection
1331+ continue ;
13371332 }
1338- rMCCorrections.fill (HIST (" hNEvents_Corrections" ), 3.5 , mcCollision.centFT0M ()); // Event Split Denomimator and Event Efficiency Numenator
1333+ // rMCCorrections.fill(HIST("hNEvents_Corrections"), 3.5, mcCollision.centFT0M()); // Event Split Denomimator and Event Efficiency Numenator
13391334 for (const auto & v0 : V0s) {
1340- if (v0.has_v0MCCore ()) {
1341- auto v0mcParticle = v0.v0MCCore_as <aod::V0MCCores>();
1342- if (!v0mcParticle.isPhysicalPrimary ()) {
1343- continue ;
1344- }
1345- if (v0mcParticle.pdgCode () == kK0Short ) // kzero matched
1346- {
1347- if (std::abs (v0mcParticle.rapidityMC (0 )) < rapidityCut) {
1348- rMCCorrections.fill (HIST (" hK0shAfterEventSelectionPtSpectrum" ), v0.ptMC (), mcCollision.centFT0M ());
1349- }
1335+ if (!v0.isPhysicalPrimary ()) {
1336+ continue ;
1337+ }
1338+ if (v0.pdgCode () == kK0Short ) // kzero matched
1339+ {
1340+ if (std::abs (v0.rapidityMC (0 )) < rapidityCut) {
1341+ // rMCCorrections.fill(HIST("hK0shAfterEventSelectionPtSpectrum"), v0.ptMC(), mcCollision.centFT0M());
13501342 }
1351- if (v0mcParticle. pdgCode () == kLambda0 ) // lambda matched
1352- {
1353- if ( std::abs (v0mcParticle. rapidityMC ( 1 )) < rapidityCut) {
1354- rMCCorrections. fill ( HIST ( " hLambdaAfterEventSelectionPtSpectrum " ), v0.ptMC (), mcCollision. centFT0M ());
1355- }
1343+ }
1344+ if (v0. pdgCode () == kLambda0 ) // lambda matched
1345+ {
1346+ if ( std::abs ( v0.rapidityMC ( 1 )) < rapidityCut) {
1347+ // rMCCorrections.fill(HIST("hLambdaAfterEventSelectionPtSpectrum"), v0.ptMC(), mcCollision.centFT0M());
13561348 }
1357- if (v0mcParticle. pdgCode () == kLambda0Bar ) // antilambda matched
1358- {
1359- if ( std::abs (v0mcParticle. rapidityMC ( 2 )) < rapidityCut) {
1360- rMCCorrections. fill ( HIST ( " hAntiLambdaAfterEventSelectionPtSpectrum " ), v0.ptMC (), mcCollision. centFT0M ());
1361- }
1349+ }
1350+ if (v0. pdgCode () == kLambda0Bar ) // antilambda matched
1351+ {
1352+ if ( std::abs ( v0.rapidityMC ( 2 )) < rapidityCut) {
1353+ // rMCCorrections.fill(HIST("hAntiLambdaAfterEventSelectionPtSpectrum"), v0.ptMC(), mcCollision.centFT0M());
13621354 }
13631355 }
13641356 }
0 commit comments