diff --git a/PWGLF/TableProducer/Nuspex/lnnRecoTask.cxx b/PWGLF/TableProducer/Nuspex/lnnRecoTask.cxx index 5e3eaa7c85c..4c1a56ce899 100644 --- a/PWGLF/TableProducer/Nuspex/lnnRecoTask.cxx +++ b/PWGLF/TableProducer/Nuspex/lnnRecoTask.cxx @@ -19,8 +19,8 @@ #include "Common/Core/RecoDecay.h" #include "Common/Core/trackUtilities.h" #include "Common/DataModel/Centrality.h" -#include "Common/DataModel/Multiplicity.h" #include "Common/DataModel/EventSelection.h" +#include "Common/DataModel/Multiplicity.h" #include "Common/DataModel/PIDResponseTOF.h" #include "Common/DataModel/TrackSelectionTables.h" @@ -67,7 +67,7 @@ using std::array; using TracksFull = soa::Join; using TracksFullMC = soa::Join; using CollisionsFull = soa::Join; -using CollisionsFullMC = soa::Join; +using CollisionsFullMC = soa::Join; using CollisionCandidates = o2::soa::Join; using CollisionCandidatesMC = o2::soa::Join; @@ -131,7 +131,7 @@ std::shared_ptr h2FT0CPtGenColRecTrStrMC; // QA signal generated candidate and daugher particles from secondary vertex std::shared_ptr h2FT0CPtGenColGenCandMC; std::shared_ptr h2FT0CPtGenColGenTrStrMC; -// Event and signal loss +// Event and signal loss std::shared_ptr hEvtMC; std::shared_ptr hImpactParamGen; std::shared_ptr hImpactParamGenOneReco; @@ -374,7 +374,6 @@ struct LnnRecoTask { const AxisSpec multAxis = {binsMult, "Multiplicity #eta <0.5"}; const AxisSpec globalTrackMultAxis = {binsglobalTrackMult, "N_{global track mult.}"}; - hNsigma3HSel = qaRegistry.add("PID/hNsigma3HSel", ";#it{p}^{TPC}/z (GeV/#it{c}); n_{#sigma} ({}^{3}H)", HistType::kTH2F, {rigidityAxis, nSigma3HtpcAxis}); hNsigma3HSelTOF = qaRegistry.add("PID/hNsigma3HSelTOF", ";#it{p}_{T} (GeV/#it{c}); n_{#sigma} ({}^{3}H)", HistType::kTH2F, {tPtAxis, nSigma3HtpcAxis}); h2Nsigma3HSelTPCTOF = qaRegistry.add("PID/h2Nsigma3HSelTPCTOF", ";n_{#sigma TPC} ({}^{3}H); n_{#sigma TOF} ({}^{3}H)", HistType::kTH2F, {nSigma3HtpcAxis, nSigma3HtofAxis}); @@ -393,7 +392,7 @@ struct LnnRecoTask { hCentFT0C = qaRegistry.add("hCentFT0C", ";Centrality; ", HistType::kTH1D, {{100, 0, 100}}); hCentFT0M = qaRegistry.add("hCentFT0M", ";Centrality; ", HistType::kTH1D, {{100, 0, 100}}); hCentFV0A = qaRegistry.add("hCentFV0A", ";Centrality; ", HistType::kTH1D, {{100, 0, 100}}); - + hLnnCandLoss = qaRegistry.add("CandCounts/hLnnCandLoss", ";CandLoss; ", HistType::kTH1D, {{7, -0.5, 6.5}}); hEvents->GetXaxis()->SetBinLabel(1, "All"); hEvents->GetXaxis()->SetBinLabel(2, "sel8"); @@ -751,8 +750,9 @@ struct LnnRecoTask { if (lnnCand.isMatter) { hdEdx3HPosTrack->Fill(lnnCand.mom3HTPC, h3track.tpcSignal()); } else { - hdEdx3HNegTrack->Fill(-lnnCand.mom3HTPC, h3track.tpcSignal());} - + hdEdx3HNegTrack->Fill(-lnnCand.mom3HTPC, h3track.tpcSignal()); + } + hNsigma3HSel->Fill(chargeFactor * lnnCand.mom3HTPC, lnnCand.nSigma3H); if (h3track.hasTOF()) { h3HSignalPtTOF->Fill(chargeFactor * h3track.pt(), beta); @@ -766,7 +766,7 @@ struct LnnRecoTask { // Monte Carlo information void fillMCinfo(aod::McTrackLabels const& trackLabels, aod::McParticles const&) { - for(size_t iCand = 0; iCand < lnnCandidates.size(); ++iCand) { + for (size_t iCand = 0; iCand < lnnCandidates.size(); ++iCand) { auto& lnnCand = lnnCandidates[iCand]; auto mcLabPos = trackLabels.rawIteratorAt(lnnCand.posTrackID); auto mcLabNeg = trackLabels.rawIteratorAt(lnnCand.negTrackID); @@ -995,7 +995,7 @@ struct LnnRecoTask { } // Fill only tracks producing to the current reconstructed collision - auto tracksThisCollision = tracksMC.sliceBy( tracksPerCollision, collIdx); + auto tracksThisCollision = tracksMC.sliceBy(tracksPerCollision, collIdx); for (const auto& trackMC : tracksThisCollision) { if (!trackMC.has_mcParticle()) { continue; @@ -1005,7 +1005,7 @@ struct LnnRecoTask { if (!isLnnDecay(mc)) { continue; } - fillMcHistograms(trackMC, mc,collision); + fillMcHistograms(trackMC, mc, collision); } for (const auto& lnnCand : lnnCandidates) { @@ -1090,7 +1090,7 @@ struct LnnRecoTask { LnnCandidate lnnCand; lnnCand.pdgCode = mcPart.pdgCode(); lnnCand.survEvSelection = isGoodCollision[mcPart.mcCollisionId()]; - + int chargeFactor = -1 + 2 * (lnnCand.pdgCode > 0); int kDimGen = 3; @@ -1214,9 +1214,8 @@ struct LnnRecoTask { trSign = daughter.pdgCode() > 0 ? 1 : -1; daugh1 = ROOT::Math::PxPyPzMVector(daughter.px(), daughter.py(), daughter.pz(), h3Mass); - - } - else if (std::abs(daughter.pdgCode()) == piDauPdg) { + + } else if (std::abs(daughter.pdgCode()) == piDauPdg) { dauPi = true; piSign = daughter.pdgCode() > 0 ? 1 : -1; @@ -1226,7 +1225,7 @@ struct LnnRecoTask { } if (!dauTr || !dauPi || (trSign * piSign) > 0) { - continue; + continue; } mother = daugh1 + daugh2;