Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 8 additions & 6 deletions PWGLF/TableProducer/Nuspex/nucleiSpectra.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -52,11 +52,11 @@
#include "ReconstructionDataFormats/Track.h"

#include <Math/Vector4D.h>
#include <TDatabasePDG.h>
#include <TMCProcess.h>
#include <TPDGCode.h> // for PDG codes
#include <TRandom3.h>
#include <TDatabasePDG.h>
#include <TParticlePDG.h>
#include <TRandom3.h>

#include <algorithm>
#include <cmath>
Expand Down Expand Up @@ -922,7 +922,7 @@ struct nucleiSpectra {
bool selectINELgt0 = cfgEventSelections->get(nuclei::evSel::kINELgt0);
std::vector<bool> goodCollisions(mcCollisions.size(), false);

auto *pdgDB = TDatabasePDG::Instance(); // Useful for evaluating the particle charge
auto* pdgDB = TDatabasePDG::Instance(); // Useful for evaluating the particle charge

for (const auto& c : mcCollisions) {

Expand Down Expand Up @@ -950,7 +950,7 @@ struct nucleiSpectra {
if (selectINELgt0 && !acceptEvent) {
if (std::abs(p.eta()) < 1.0f) {
auto* pdg = pdgDB->GetParticle(p.pdgCode());
if (pdg && pdg->Charge()!= 0)
if (pdg && pdg->Charge() != 0)
acceptEvent = true;
}
}
Expand All @@ -971,8 +971,10 @@ struct nucleiSpectra {
}

int mcId = collision.mcCollisionId();
if (mcId < 0) continue;
if(!goodCollisions[mcId]) continue;
if (mcId < 0)
continue;
if (!goodCollisions[mcId])
continue;

const auto& slicedTracks = tracks.sliceBy(tracksPerCollisions, collision.globalIndex());
fillDataInfo(collision, slicedTracks);
Expand Down