From 12f5f291e8e6c0a8feeb4023c604f4bdaf504be3 Mon Sep 17 00:00:00 2001 From: nepeivodaRS Date: Thu, 8 Jun 2023 16:39:26 +0200 Subject: [PATCH 1/7] Cascqaanalysis and PostProcessing update cascqaanalysis.cxx: 1. added bach-baryon selection columns in mycascades table 2. changed binning of ptAxis to match with the one in post processing task 3. more info in hNEvents (1 bin now represents all events, 4th one - after all selections) 4. more info in hNEventsMCLabels 5. Added INELgt0 configurable and corr. functions in code (isINELgt0 for reconstruction, isINELgt0mc for MC) cascpostprocessing.cxx 1. added bach-baryon selection columns in mycascades table 2. isSelectBachBaryon configurable + corresponding bachBaryonCosPA and bachBaryonDCAxyToPV configurable 3. cut Labels updated --- PWGLF/Tasks/cascpostprocessing.cxx | 33 +++++- PWGLF/Tasks/cascqaanalysis.cxx | 183 ++++++++++++++++++++++++----- 2 files changed, 183 insertions(+), 33 deletions(-) diff --git a/PWGLF/Tasks/cascpostprocessing.cxx b/PWGLF/Tasks/cascpostprocessing.cxx index 5c88812fdd5..66a1522f5b5 100644 --- a/PWGLF/Tasks/cascpostprocessing.cxx +++ b/PWGLF/Tasks/cascpostprocessing.cxx @@ -90,6 +90,8 @@ DECLARE_SOA_COLUMN(NegPt, negpt, float); DECLARE_SOA_COLUMN(BachPt, bachpt, float); DECLARE_SOA_COLUMN(McPdgCode, mcPdgCode, float); // -1 unknown DECLARE_SOA_COLUMN(IsPrimary, isPrimary, float); // -1 unknown, 0 not primary, 1 primary +DECLARE_SOA_COLUMN(BachBaryonCosPA, bachBaryonCosPA, float); //! avoid bach-baryon correlated inv mass structure in analysis +DECLARE_SOA_COLUMN(BachBaryonDCAxyToPV, bachBaryonDCAxyToPV, float); //! avoid bach-baryon correlated inv mass structure in analysis } // namespace mycascades @@ -104,7 +106,9 @@ DECLARE_SOA_TABLE(MyCascades, "AOD", "MYCASCADES", o2::soa::Index<>, mycascades::NTOFSigmaPosPi, mycascades::NTOFSigmaBachPi, mycascades::NTOFSigmaBachKa, mycascades::PosNTPCClusters, mycascades::NegNTPCClusters, mycascades::BachNTPCClusters, mycascades::PosHasTOF, mycascades::NegHasTOF, mycascades::BachHasTOF, - mycascades::PosPt, mycascades::NegPt, mycascades::BachPt, mycascades::McPdgCode, mycascades::IsPrimary); + mycascades::PosPt, mycascades::NegPt, mycascades::BachPt, + mycascades::McPdgCode, mycascades::IsPrimary, + cascdata::BachBaryonCosPA, cascdata::BachBaryonDCAxyToPV); } // namespace o2::aod @@ -140,6 +144,10 @@ struct cascpostprocessing { Configurable nsigmatofPr{"nsigmatofPr", 6, "N sigma TOF Proton"}; Configurable nsigmatofKa{"nsigmatofKa", 6, "N sigma TOF Kaon"}; + Configurable isSelectBachBaryon{"isSelectBachBaryon", 0, "Bachelor-baryon cascade selection"}; + Configurable bachBaryonCosPA{"bachBaryonCosPA", 0.9999, "Bachelor baryon CosPA"}; + Configurable bachBaryonDCAxyToPV{"bachBaryonDCAxyToPV", 0.05, "DCA bachelor baryon to PV"}; + HistogramRegistry registry{"registryts"}; void init(InitContext const&) @@ -158,10 +166,10 @@ struct cascpostprocessing { AxisSpec rapidityAxis = {200, -2.0f, 2.0f, "y"}; AxisSpec phiAxis = {100, -TMath::Pi() / 2, 3. * TMath::Pi() / 2, "#varphi"}; - TString CutLabel[25] = {"All", "MassWin", "y", "EtaDau", "DCADauToPV", "CascCosPA", "V0CosPA", "DCACascDau", "DCAV0Dau", "rCasc", "rV0", "DCAV0ToPV", "LambdaMass", "TPCPr", "TPCPi", "TOFPr", "TOFPi", "TPCBach", "TOFBach", "ctau", "CompDecayMass"}; - TString CutLabelSummary[25] = {"MassWin", "y", "EtaDau", "dcapostopv", "dcanegtopv", "dcabachtopv", "CascCosPA", "V0CosPA", "DCACascDau", "DCAV0Dau", "rCasc", "rV0", "DCAV0ToPV", "LambdaMass", "TPCPr", "TPCPi", "TOFPr", "TOFPi", "TPCBach", "TOFBach", "proplifetime", "rejcomp", "ptthrtof"}; + TString CutLabel[22] = {"All", "MassWin", "y", "EtaDau", "DCADauToPV", "CascCosPA", "V0CosPA", "DCACascDau", "DCAV0Dau", "rCasc", "rV0", "DCAV0ToPV", "LambdaMass", "TPCPr", "TPCPi", "TOFPr", "TOFPi", "TPCBach", "TOFBach", "ctau", "CompDecayMass", "Bach-baryon"}; + TString CutLabelSummary[25] = {"MassWin", "y", "EtaDau", "dcapostopv", "dcanegtopv", "dcabachtopv", "CascCosPA", "V0CosPA", "DCACascDau", "DCAV0Dau", "rCasc", "rV0", "DCAV0ToPV", "LambdaMass", "TPCPr", "TPCPi", "TOFPr", "TOFPi", "TPCBach", "TOFBach", "proplifetime", "rejcomp", "ptthrtof", "bachBaryonCosPA", "bachBaryonDCAxyToPV"}; - registry.add("hCandidate", "hCandidate", HistType::kTH1F, {{25, -0.5, 24.5}}); + registry.add("hCandidate", "hCandidate", HistType::kTH1F, {{22, -0.5, 21.5}}); for (Int_t n = 1; n <= registry.get(HIST("hCandidate"))->GetNbinsX(); n++) { registry.get(HIST("hCandidate"))->GetXaxis()->SetBinLabel(n, CutLabel[n - 1]); } @@ -197,6 +205,10 @@ struct cascpostprocessing { registry.get(HIST("CascadeSelectionSummary"))->SetBinContent(22, rejcomp); if (hastof) registry.get(HIST("CascadeSelectionSummary"))->SetBinContent(23, ptthrtof); + if (isSelectBachBaryon){ + registry.get(HIST("CascadeSelectionSummary"))->SetBinContent(24, bachBaryonCosPA); + registry.get(HIST("CascadeSelectionSummary"))->SetBinContent(25, bachBaryonDCAxyToPV); + } registry.add("hPt", "hPt", {HistType::kTH1F, {ptAxis}}); registry.add("hCascMinusInvMassvsPt", "hCascMinusInvMassvsPt", HistType::kTH2F, {ptAxis, massAxis}); @@ -223,6 +235,9 @@ struct cascpostprocessing { registry.add("hDCAV0ToPV", "hDCAV0ToPV", {HistType::kTH1F, {{55, 0.0f, 2.20f}}}); registry.add("hMassLambdaDau", "hMassLambdaDau", {HistType::kTH1F, {{60, 1.1f, 1.13f}}}); + registry.add("hBachBaryonCosPA", "hBachBaryonCosPA", {HistType::kTH1F, {{100, 0.0f, 1.0f}}}); + registry.add("hBachBaryonDCAxyToPV", "hBachBaryonDCAxyToPV", {HistType::kTH1F, {{300, -3.0f, 3.0f}}}); + // kine registry.add("hEtaMinus", "hEtaMinus", {HistType::kTH2F, {ptAxis, etaAxis}}); registry.add("hEtaPlus", "hEtaPlus", {HistType::kTH2F, {ptAxis, etaAxis}}); @@ -396,6 +411,10 @@ struct cascpostprocessing { ctau = candidate.ctauomega(); invmass = candidate.massomega(); } + if(isSelectBachBaryon && (candidate.bachBaryonCosPA() > bachBaryonCosPA || fabs(candidate.bachBaryonDCAxyToPV()) < bachBaryonDCAxyToPV)){ // Bach-baryon selection if required + continue; + } + registry.fill(HIST("hCandidate"), ++counter); registry.fill(HIST("hPt"), candidate.pt()); registry.fill(HIST("hDCANegToPV"), candidate.dcanegtopv()); @@ -410,6 +429,8 @@ struct cascpostprocessing { registry.fill(HIST("hDCAV0ToPV"), candidate.dcav0topv()); registry.fill(HIST("hMassLambdaDau"), candidate.masslambdadau()); + registry.fill(HIST("hBachBaryonCosPA"), candidate.bachBaryonCosPA()); + registry.fill(HIST("hBachBaryonDCAxyToPV"), candidate.bachBaryonDCAxyToPV()); if (candidate.sign() > 0) { registry.fill(HIST("hCtauPlus"), ctau); registry.fill(HIST("hEtaPlus"), candidate.pt(), candidate.eta()); @@ -464,7 +485,7 @@ struct cascpostprocessing { if (candidate.sign() < 0) { if (isCorrectlyRec) { - registry.fill(HIST("hPtCascMinusTrueRec"), candidate.pt(), rapidity, candidate.multFT0M()); + registry.fill(HIST("hPtCascMinusTrueRec"), candidate.pt(), rapidity, 0); } registry.fill(HIST("hCascMinusInvMassvsPt"), candidate.pt(), invmass); registry.fill(HIST("hCascMinusInvMassvsPt_FT0M"), candidate.multFT0M(), candidate.pt(), invmass); @@ -472,7 +493,7 @@ struct cascpostprocessing { } if (candidate.sign() > 0) { if (isCorrectlyRec) { - registry.fill(HIST("hPtCascPlusTrueRec"), candidate.pt(), rapidity, candidate.multFT0M()); + registry.fill(HIST("hPtCascPlusTrueRec"), candidate.pt(), rapidity, 0); } registry.fill(HIST("hCascPlusInvMassvsPt"), candidate.pt(), invmass); registry.fill(HIST("hCascPlusInvMassvsPt_FT0M"), candidate.multFT0M(), candidate.pt(), invmass); diff --git a/PWGLF/Tasks/cascqaanalysis.cxx b/PWGLF/Tasks/cascqaanalysis.cxx index a03952a1f66..cdc06bc201e 100644 --- a/PWGLF/Tasks/cascqaanalysis.cxx +++ b/PWGLF/Tasks/cascqaanalysis.cxx @@ -23,6 +23,9 @@ #include "Common/DataModel/Centrality.h" #include "TRandom.h" #include +#include +#include +#include using namespace o2; using namespace o2::framework; @@ -89,8 +92,10 @@ DECLARE_SOA_COLUMN(BachHasTOF, bachhastof, float); DECLARE_SOA_COLUMN(PosPt, pospt, float); DECLARE_SOA_COLUMN(NegPt, negpt, float); DECLARE_SOA_COLUMN(BachPt, bachpt, float); -DECLARE_SOA_COLUMN(McPdgCode, mcPdgCode, float); // -1 unknown -DECLARE_SOA_COLUMN(IsPrimary, isPrimary, float); // -1 unknown, 0 not primary, 1 primary +DECLARE_SOA_COLUMN(McPdgCode, mcPdgCode, float); //! -1 unknown +DECLARE_SOA_COLUMN(IsPrimary, isPrimary, float); //! -1 unknown, 0 not primary, 1 primary +DECLARE_SOA_COLUMN(BachBaryonCosPA, bachBaryonCosPA, float); //! avoid bach-baryon correlated inv mass structure in analysis +DECLARE_SOA_COLUMN(BachBaryonDCAxyToPV, bachBaryonDCAxyToPV, float); //! avoid bach-baryon correlated inv mass structure in analysis } // namespace mycascades @@ -105,7 +110,9 @@ DECLARE_SOA_TABLE(MyCascades, "AOD", "MYCASCADES", o2::soa::Index<>, mycascades::NTOFSigmaPosPi, mycascades::NTOFSigmaBachPi, mycascades::NTOFSigmaBachKa, mycascades::PosNTPCClusters, mycascades::NegNTPCClusters, mycascades::BachNTPCClusters, mycascades::PosHasTOF, mycascades::NegHasTOF, mycascades::BachHasTOF, - mycascades::PosPt, mycascades::NegPt, mycascades::BachPt, mycascades::McPdgCode, mycascades::IsPrimary); + mycascades::PosPt, mycascades::NegPt, mycascades::BachPt, + mycascades::McPdgCode, mycascades::IsPrimary, + cascdata::BachBaryonCosPA, cascdata::BachBaryonDCAxyToPV); } // namespace o2::aod @@ -116,25 +123,34 @@ struct cascqaanalysis { HistogramRegistry registry{"registry"}; - AxisSpec ptAxis = {100, 0.0f, 10.0f, "#it{p}_{T} (GeV/#it{c})"}; + AxisSpec ptAxis = {200, 0.0f, 10.0f, "#it{p}_{T} (GeV/#it{c})"}; AxisSpec rapidityAxis = {200, -2.0f, 2.0f, "y"}; AxisSpec centFT0MAxis = {100, 0.0f, 100.0f, "FT0M (%)"}; void init(InitContext const&) { TString CandidateCounterLabels[5] = {"All candidates", "v0data exists", "passed topo cuts", "has associated MC particle", "associated with Xi(Omega)"}; - TString hNEventsMCLabels[2] = {"All", "Selected"}; + TString hNEventsMCLabels[4] = {"All", "z vrtx", "INEL>0", "Associated with rec. collision"}; + TString hNEventsLabels[4] = {"All", "sel8", "z vrtx", "INEL>0"}; - registry.add("hNEvents", "hNEvents", {HistType::kTH1I, {{1, 0.f, 1.f}}}); + registry.add("hNEvents", "hNEvents", {HistType::kTH1I, {{4, 0.f, 4.f}}}); + for (Int_t n = 1; n <= registry.get(HIST("hNEvents"))->GetNbinsX(); n++) { + registry.get(HIST("hNEvents"))->GetXaxis()->SetBinLabel(n, hNEventsLabels[n - 1]); + } registry.add("hZCollision", "hZCollision", {HistType::kTH1F, {{200, -20.f, 20.f}}}); + registry.add("hZCollisionGen", "hZCollisionGen", {HistType::kTH1F, {{200, -20.f, 20.f}}}); registry.add("hCentFT0M", "hCentFT0M", {HistType::kTH1F, {{1000, 0.f, 100.f}}}); registry.add("hCentFV0A", "hCentFV0A", {HistType::kTH1F, {{1000, 0.f, 100.f}}}); registry.add("hPtXiPlusTrue", "hPtXiPlusTrue", {HistType::kTH3F, {ptAxis, rapidityAxis, centFT0MAxis}}); registry.add("hPtXiMinusTrue", "hPtXiMinusTrue", {HistType::kTH3F, {ptAxis, rapidityAxis, centFT0MAxis}}); registry.add("hPtOmegaPlusTrue", "hPtOmegaPlusTrue", {HistType::kTH3F, {ptAxis, rapidityAxis, centFT0MAxis}}); registry.add("hPtOmegaMinusTrue", "hPtOmegaMinusTrue", {HistType::kTH3F, {ptAxis, rapidityAxis, centFT0MAxis}}); + registry.add("hPtXiPlusTrueAssoiciatedWithSelColl", "hPtXiPlusTrueAssoiciatedWithSelColl", {HistType::kTH3F, {ptAxis, rapidityAxis, centFT0MAxis}}); + registry.add("hPtXiMinusTrueAssoiciatedWithSelColl", "hPtXiMinusTrueAssoiciatedWithSelColl", {HistType::kTH3F, {ptAxis, rapidityAxis, centFT0MAxis}}); + registry.add("hPtOmegaPlusTrueAssoiciatedWithSelColl", "hPtOmegaPlusTrueAssoiciatedWithSelColl", {HistType::kTH3F, {ptAxis, rapidityAxis, centFT0MAxis}}); + registry.add("hPtOmegaMinusTrueAssoiciatedWithSelColl", "hPtOmegaMinusTrueAssoiciatedWithSelColl", {HistType::kTH3F, {ptAxis, rapidityAxis, centFT0MAxis}}); - registry.add("hNEventsMC", "hNEventsMC", {HistType::kTH1F, {{2, 0.0f, 2.0f}}}); + registry.add("hNEventsMC", "hNEventsMC", {HistType::kTH1F, {{4, 0.0f, 4.0f}}}); for (Int_t n = 1; n <= registry.get(HIST("hNEventsMC"))->GetNbinsX(); n++) { registry.get(HIST("hNEventsMC"))->GetXaxis()->SetBinLabel(n, hNEventsMCLabels[n - 1]); } @@ -148,6 +164,7 @@ struct cascqaanalysis { // Event selection criteria Configurable cutzvertex{"cutzvertex", 15.0f, "Accepted z-vertex range (cm)"}; Configurable sel8{"sel8", 1, "Apply sel8 event selection"}; + Configurable INELgt0{"INELgt0", 1, "Apply INEL>0 selection"}; // Selection criteria Configurable scalefactor{"scalefactor", 1.0, "Scaling factor"}; @@ -174,7 +191,6 @@ struct cascqaanalysis { template bool AcceptCascCandidate(TCascade const& cascCand, float const& pvx, float const& pvy, float const& pvz) { - registry.fill(HIST("hCandidateCounter"), 0.5); // all candidates // Access daughter tracks auto v0index = cascCand.template v0_as(); auto v0 = v0index.v0Data(); @@ -196,24 +212,98 @@ struct cascqaanalysis { } } - template - bool AcceptEvent(TCollision const& collision, bool isFillEventSelectionQA) + template + bool isINELgt0(TTracks tracks){ + // INEL > 0 (at least 1 charged track in |eta| < 1.0) + // TO DO: check for primary via DCA + std::vector TracksEta(tracks.size()); + int nTracks = 0; + for(const auto& track : tracks){ + TracksEta[nTracks++] = track.eta(); + } + + auto etaConditionFunc = [](float elem) { + return TMath::Abs(elem) < 1.0; + }; + + if(std::any_of(TracksEta.begin(), TracksEta.end(), etaConditionFunc)){ + return true; + } + else{ + return false; + } + } + + template + bool isINELgt0mc(TMcParticles particles){ + // INEL > 0 (at least 1 charged particle in |eta| < 1.0) + typedef struct EtaCharge { double eta; short charge; } EtaCharge; + EtaCharge etaCharge; + std::vector ParticlesEtaAndCharge(particles.size()); + unsigned int nParticles = 0; + for(const auto& particle : particles){ + if (particle.isPhysicalPrimary() == 0) + continue; // consider only primaries + etaCharge = {999, 0}; // refresh init. for safety + TParticlePDG* p = TDatabasePDG::Instance()->GetParticle(particle.pdgCode()); + if(!p){ + switch(std::to_string(particle.pdgCode()).length()){ + case 10: // nuclei + { + etaCharge = {particle.eta(), static_cast(particle.pdgCode()/10000%1000)}; + ParticlesEtaAndCharge[nParticles++] = etaCharge; + break; + } + default: + break; + } + } + else{ + etaCharge = {particle.eta(), static_cast(p->Charge())}; + ParticlesEtaAndCharge[nParticles++] = etaCharge; + } + } + + ParticlesEtaAndCharge.resize(nParticles); + + auto etaChargeConditionFunc = [](EtaCharge elem) { + return ((TMath::Abs(elem.eta) < 1.0) && (TMath::Abs(elem.charge) < 0.001)); + }; + + if(std::any_of(ParticlesEtaAndCharge.begin(), ParticlesEtaAndCharge.end(), etaChargeConditionFunc)){ + return true; + } + else{ + return false; + } + } + + + template + bool AcceptEvent(TCollision const& collision, TTracks const& tracks, bool isFillEventSelectionQA) { + if(isFillEventSelectionQA){registry.fill(HIST("hNEvents"), 0.5);} // Event selection if required if (sel8 && !collision.sel8()) { return false; } + if(isFillEventSelectionQA){registry.fill(HIST("hNEvents"), 1.5);} + if (TMath::Abs(collision.posZ()) > cutzvertex) { return false; } + if(isFillEventSelectionQA){registry.fill(HIST("hNEvents"), 2.5);} + + if(INELgt0 && !isINELgt0(tracks)){ + return false; + } + if(isFillEventSelectionQA){registry.fill(HIST("hNEvents"), 3.5);} if (isFillEventSelectionQA) { - registry.fill(HIST("hNEvents"), 0.5); registry.fill(HIST("hZCollision"), collision.posZ()); registry.fill(HIST("hCentFT0M"), collision.centFT0M()); registry.fill(HIST("hCentFV0A"), collision.centFV0A()); } - return true; } @@ -221,9 +311,9 @@ struct cascqaanalysis { soa::Filtered const& Cascades, aod::V0sLinked const&, aod::V0Datas const&, - DauTracks const& tracks) + DauTracks const& Tracks) { - if (!AcceptEvent(collision, 1)) { + if (!AcceptEvent(collision, Tracks, 1)) { return; } @@ -278,7 +368,7 @@ struct cascqaanalysis { negdau.tofNSigmaPr(), posdau.tofNSigmaPr(), negdau.tofNSigmaPi(), posdau.tofNSigmaPi(), bachelor.tofNSigmaPi(), bachelor.tofNSigmaKa(), posdau.tpcNClsFound(), negdau.tpcNClsFound(), bachelor.tpcNClsFound(), posdau.hasTOF(), negdau.hasTOF(), bachelor.hasTOF(), - posdau.pt(), negdau.pt(), bachelor.pt(), -1, -1); + posdau.pt(), negdau.pt(), bachelor.pt(), -1, -1, casc.bachBaryonCosPA(), casc.bachBaryonDCAxyToPV()); } } } @@ -290,10 +380,10 @@ struct cascqaanalysis { soa::Filtered const& Cascades, aod::V0sLinked const&, aod::V0Datas const&, - DauTracks const& tracks, - aod::McParticles const&) // centrality-table is not ready for MC yet. + DauTracks const& Tracks, + aod::McParticles const&) { - if (!AcceptEvent(collision, 1)) { + if (!AcceptEvent(collision, Tracks, 1)) { return; } @@ -360,7 +450,7 @@ struct cascqaanalysis { negdau.tofNSigmaPr(), posdau.tofNSigmaPr(), negdau.tofNSigmaPi(), posdau.tofNSigmaPi(), bachelor.tofNSigmaPi(), bachelor.tofNSigmaKa(), posdau.tpcNClsFound(), negdau.tpcNClsFound(), bachelor.tpcNClsFound(), posdau.hasTOF(), negdau.hasTOF(), bachelor.hasTOF(), - posdau.pt(), negdau.pt(), bachelor.pt(), lPDG, isPrimary); + posdau.pt(), negdau.pt(), bachelor.pt(), lPDG, isPrimary, casc.bachBaryonCosPA(), casc.bachBaryonDCAxyToPV()); } } } @@ -370,14 +460,48 @@ struct cascqaanalysis { void processMCgen(aod::McCollision const& mcCollision, aod::McParticles const& mcParticles, - const soa::SmallGroups>& collisions) + const soa::SmallGroups>& collisions, + aod::Tracks const& Tracks) { + // All generated collisions registry.fill(HIST("hNEventsMC"), 0.5); + // Generated with accepted z vertex + if(TMath::Abs(mcCollision.posZ()) > cutzvertex){ + return; + } + registry.fill(HIST("hNEventsMC"), 1.5); + + // Generated collision is INEL>=0 + if(INELgt0 && !isINELgt0mc(mcParticles)){ + return; + } + registry.fill(HIST("hNEventsMC"), 2.5); + + registry.fill(HIST("hZCollisionGen"), mcCollision.posZ()); + + // Histos of generated cascades from generated events with accepted z vrtx + INEL>0 (for signal loss correction) + for (const auto& mcParticle : mcParticles) { + if (mcParticle.isPhysicalPrimary() == 0) + continue; // Consider only primaries + if (mcParticle.pdgCode() == -3312) { + registry.fill(HIST("hPtXiPlusTrue"), mcParticle.pt(), mcParticle.y(), 0); // MB will be used correction + } + if (mcParticle.pdgCode() == 3312) { + registry.fill(HIST("hPtXiMinusTrue"), mcParticle.pt(), mcParticle.y(), 0); + } + if (mcParticle.pdgCode() == -3334) { + registry.fill(HIST("hPtOmegaPlusTrue"), mcParticle.pt(), mcParticle.y(), 0); + } + if (mcParticle.pdgCode() == 3334) { + registry.fill(HIST("hPtOmegaMinusTrue"), mcParticle.pt(), mcParticle.y(), 0); + } + } + std::vector SelectedEvents(collisions.size()); int nevts = 0; for (const auto& collision : collisions) { - if (!AcceptEvent(collision, 0)) { + if (!AcceptEvent(collision, Tracks, 0)) { continue; } SelectedEvents[nevts++] = collision.mcCollision_as().globalIndex(); @@ -386,26 +510,27 @@ struct cascqaanalysis { const auto evtReconstructedAndSelected = std::find(SelectedEvents.begin(), SelectedEvents.end(), mcCollision.globalIndex()) != SelectedEvents.end(); // at least 1 selected reconstructed event has the same global index as mcCollision - if (!evtReconstructedAndSelected) { // Check that the event is reconstructed and that the reconstructed events pass the selection + if (!evtReconstructedAndSelected) { // Check that the event is reconstructed and that the reconstructed event passes the selection return; } - registry.fill(HIST("hNEventsMC"), 1.5); + registry.fill(HIST("hNEventsMC"), 3.5); + // Histos of generated cascades from generated events with good z vrtx + INEL>0 + associated to the accepted reconstructed event (for signal loss + efficiency x acceptance correction) for (const auto& mcParticle : mcParticles) { if (mcParticle.isPhysicalPrimary() == 0) continue; // Consider only primaries if (mcParticle.pdgCode() == -3312) { - registry.fill(HIST("hPtXiPlusTrue"), mcParticle.pt(), mcParticle.y(), 0); // MB will be used for the efficiency + registry.fill(HIST("hPtXiPlusTrueAssoiciatedWithSelColl"), mcParticle.pt(), mcParticle.y(), 0); // MB will be used correction } if (mcParticle.pdgCode() == 3312) { - registry.fill(HIST("hPtXiMinusTrue"), mcParticle.pt(), mcParticle.y(), 0); + registry.fill(HIST("hPtXiMinusTrueAssoiciatedWithSelColl"), mcParticle.pt(), mcParticle.y(), 0); } if (mcParticle.pdgCode() == -3334) { - registry.fill(HIST("hPtOmegaPlusTrue"), mcParticle.pt(), mcParticle.y(), 0); + registry.fill(HIST("hPtOmegaPlusTrueAssoiciatedWithSelColl"), mcParticle.pt(), mcParticle.y(), 0); } if (mcParticle.pdgCode() == 3334) { - registry.fill(HIST("hPtOmegaMinusTrue"), mcParticle.pt(), mcParticle.y(), 0); + registry.fill(HIST("hPtOmegaMinusTrueAssoiciatedWithSelColl"), mcParticle.pt(), mcParticle.y(), 0); } } } @@ -451,6 +576,8 @@ struct myCascades { for (Int_t n = 1; n <= registry.get(HIST("hPDGcode"))->GetNbinsX(); n++) { registry.get(HIST("hPDGcode"))->GetXaxis()->SetBinLabel(n, PGDlabels[n - 1]); } + registry.add("hBachBaryonCosPA", "hBachBaryonCosPA", {HistType::kTH1F, {{100, 0.0f, 1.0f}}}); + registry.add("hBachBaryonDCAxyToPV", "hBachBaryonDCAxyToPV", {HistType::kTH1F, {{300, -3.0f, 3.0f}}}); } void process(aod::MyCascades const& mycascades) @@ -485,6 +612,8 @@ struct myCascades { registry.fill(HIST("hNegITSHits"), candidate.negitshits()); registry.fill(HIST("hBachITSHits"), candidate.bachitshits()); registry.fill(HIST("hIsPrimary"), candidate.isPrimary()); + registry.fill(HIST("hBachBaryonCosPA"), candidate.bachBaryonCosPA()); + registry.fill(HIST("hBachBaryonDCAxyToPV"), candidate.bachBaryonDCAxyToPV()); if (TMath::Abs(candidate.mcPdgCode()) == 3312 || TMath::Abs(candidate.mcPdgCode()) == 3334) { registry.fill(HIST("hPDGcode"), TMath::Abs(candidate.mcPdgCode()) == 3312 ? 0 : 1); // 0 if Xi, 1 if Omega From 9806562f403838c97682966d82bcb36b7a15ce00 Mon Sep 17 00:00:00 2001 From: ALICE Action Bot Date: Thu, 8 Jun 2023 14:44:09 +0000 Subject: [PATCH 2/7] Please consider the following formatting changes --- PWGLF/Tasks/cascpostprocessing.cxx | 6 +-- PWGLF/Tasks/cascqaanalysis.cxx | 75 +++++++++++++++++------------- 2 files changed, 45 insertions(+), 36 deletions(-) diff --git a/PWGLF/Tasks/cascpostprocessing.cxx b/PWGLF/Tasks/cascpostprocessing.cxx index 66a1522f5b5..daa6ec9bbbd 100644 --- a/PWGLF/Tasks/cascpostprocessing.cxx +++ b/PWGLF/Tasks/cascpostprocessing.cxx @@ -106,7 +106,7 @@ DECLARE_SOA_TABLE(MyCascades, "AOD", "MYCASCADES", o2::soa::Index<>, mycascades::NTOFSigmaPosPi, mycascades::NTOFSigmaBachPi, mycascades::NTOFSigmaBachKa, mycascades::PosNTPCClusters, mycascades::NegNTPCClusters, mycascades::BachNTPCClusters, mycascades::PosHasTOF, mycascades::NegHasTOF, mycascades::BachHasTOF, - mycascades::PosPt, mycascades::NegPt, mycascades::BachPt, + mycascades::PosPt, mycascades::NegPt, mycascades::BachPt, mycascades::McPdgCode, mycascades::IsPrimary, cascdata::BachBaryonCosPA, cascdata::BachBaryonDCAxyToPV); @@ -205,7 +205,7 @@ struct cascpostprocessing { registry.get(HIST("CascadeSelectionSummary"))->SetBinContent(22, rejcomp); if (hastof) registry.get(HIST("CascadeSelectionSummary"))->SetBinContent(23, ptthrtof); - if (isSelectBachBaryon){ + if (isSelectBachBaryon) { registry.get(HIST("CascadeSelectionSummary"))->SetBinContent(24, bachBaryonCosPA); registry.get(HIST("CascadeSelectionSummary"))->SetBinContent(25, bachBaryonDCAxyToPV); } @@ -411,7 +411,7 @@ struct cascpostprocessing { ctau = candidate.ctauomega(); invmass = candidate.massomega(); } - if(isSelectBachBaryon && (candidate.bachBaryonCosPA() > bachBaryonCosPA || fabs(candidate.bachBaryonDCAxyToPV()) < bachBaryonDCAxyToPV)){ // Bach-baryon selection if required + if (isSelectBachBaryon && (candidate.bachBaryonCosPA() > bachBaryonCosPA || fabs(candidate.bachBaryonDCAxyToPV()) < bachBaryonDCAxyToPV)) { // Bach-baryon selection if required continue; } registry.fill(HIST("hCandidate"), ++counter); diff --git a/PWGLF/Tasks/cascqaanalysis.cxx b/PWGLF/Tasks/cascqaanalysis.cxx index cdc06bc201e..7febd5b97e5 100644 --- a/PWGLF/Tasks/cascqaanalysis.cxx +++ b/PWGLF/Tasks/cascqaanalysis.cxx @@ -92,8 +92,8 @@ DECLARE_SOA_COLUMN(BachHasTOF, bachhastof, float); DECLARE_SOA_COLUMN(PosPt, pospt, float); DECLARE_SOA_COLUMN(NegPt, negpt, float); DECLARE_SOA_COLUMN(BachPt, bachpt, float); -DECLARE_SOA_COLUMN(McPdgCode, mcPdgCode, float); //! -1 unknown -DECLARE_SOA_COLUMN(IsPrimary, isPrimary, float); //! -1 unknown, 0 not primary, 1 primary +DECLARE_SOA_COLUMN(McPdgCode, mcPdgCode, float); //! -1 unknown +DECLARE_SOA_COLUMN(IsPrimary, isPrimary, float); //! -1 unknown, 0 not primary, 1 primary DECLARE_SOA_COLUMN(BachBaryonCosPA, bachBaryonCosPA, float); //! avoid bach-baryon correlated inv mass structure in analysis DECLARE_SOA_COLUMN(BachBaryonDCAxyToPV, bachBaryonDCAxyToPV, float); //! avoid bach-baryon correlated inv mass structure in analysis @@ -110,7 +110,7 @@ DECLARE_SOA_TABLE(MyCascades, "AOD", "MYCASCADES", o2::soa::Index<>, mycascades::NTOFSigmaPosPi, mycascades::NTOFSigmaBachPi, mycascades::NTOFSigmaBachKa, mycascades::PosNTPCClusters, mycascades::NegNTPCClusters, mycascades::BachNTPCClusters, mycascades::PosHasTOF, mycascades::NegHasTOF, mycascades::BachHasTOF, - mycascades::PosPt, mycascades::NegPt, mycascades::BachPt, + mycascades::PosPt, mycascades::NegPt, mycascades::BachPt, mycascades::McPdgCode, mycascades::IsPrimary, cascdata::BachBaryonCosPA, cascdata::BachBaryonDCAxyToPV); @@ -213,12 +213,13 @@ struct cascqaanalysis { } template - bool isINELgt0(TTracks tracks){ + bool isINELgt0(TTracks tracks) + { // INEL > 0 (at least 1 charged track in |eta| < 1.0) // TO DO: check for primary via DCA std::vector TracksEta(tracks.size()); int nTracks = 0; - for(const auto& track : tracks){ + for (const auto& track : tracks) { TracksEta[nTracks++] = track.eta(); } @@ -226,39 +227,41 @@ struct cascqaanalysis { return TMath::Abs(elem) < 1.0; }; - if(std::any_of(TracksEta.begin(), TracksEta.end(), etaConditionFunc)){ + if (std::any_of(TracksEta.begin(), TracksEta.end(), etaConditionFunc)) { return true; - } - else{ + } else { return false; } } template - bool isINELgt0mc(TMcParticles particles){ + bool isINELgt0mc(TMcParticles particles) + { // INEL > 0 (at least 1 charged particle in |eta| < 1.0) - typedef struct EtaCharge { double eta; short charge; } EtaCharge; + typedef struct EtaCharge { + double eta; + short charge; + } EtaCharge; EtaCharge etaCharge; std::vector ParticlesEtaAndCharge(particles.size()); unsigned int nParticles = 0; - for(const auto& particle : particles){ + for (const auto& particle : particles) { if (particle.isPhysicalPrimary() == 0) - continue; // consider only primaries + continue; // consider only primaries etaCharge = {999, 0}; // refresh init. for safety TParticlePDG* p = TDatabasePDG::Instance()->GetParticle(particle.pdgCode()); - if(!p){ - switch(std::to_string(particle.pdgCode()).length()){ + if (!p) { + switch (std::to_string(particle.pdgCode()).length()) { case 10: // nuclei - { - etaCharge = {particle.eta(), static_cast(particle.pdgCode()/10000%1000)}; - ParticlesEtaAndCharge[nParticles++] = etaCharge; - break; - } + { + etaCharge = {particle.eta(), static_cast(particle.pdgCode() / 10000 % 1000)}; + ParticlesEtaAndCharge[nParticles++] = etaCharge; + break; + } default: break; } - } - else{ + } else { etaCharge = {particle.eta(), static_cast(p->Charge())}; ParticlesEtaAndCharge[nParticles++] = etaCharge; } @@ -270,34 +273,40 @@ struct cascqaanalysis { return ((TMath::Abs(elem.eta) < 1.0) && (TMath::Abs(elem.charge) < 0.001)); }; - if(std::any_of(ParticlesEtaAndCharge.begin(), ParticlesEtaAndCharge.end(), etaChargeConditionFunc)){ + if (std::any_of(ParticlesEtaAndCharge.begin(), ParticlesEtaAndCharge.end(), etaChargeConditionFunc)) { return true; - } - else{ + } else { return false; } } - template bool AcceptEvent(TCollision const& collision, TTracks const& tracks, bool isFillEventSelectionQA) { - if(isFillEventSelectionQA){registry.fill(HIST("hNEvents"), 0.5);} + if (isFillEventSelectionQA) { + registry.fill(HIST("hNEvents"), 0.5); + } // Event selection if required if (sel8 && !collision.sel8()) { return false; } - if(isFillEventSelectionQA){registry.fill(HIST("hNEvents"), 1.5);} - + if (isFillEventSelectionQA) { + registry.fill(HIST("hNEvents"), 1.5); + } + if (TMath::Abs(collision.posZ()) > cutzvertex) { return false; } - if(isFillEventSelectionQA){registry.fill(HIST("hNEvents"), 2.5);} + if (isFillEventSelectionQA) { + registry.fill(HIST("hNEvents"), 2.5); + } - if(INELgt0 && !isINELgt0(tracks)){ + if (INELgt0 && !isINELgt0(tracks)) { return false; } - if(isFillEventSelectionQA){registry.fill(HIST("hNEvents"), 3.5);} + if (isFillEventSelectionQA) { + registry.fill(HIST("hNEvents"), 3.5); + } if (isFillEventSelectionQA) { registry.fill(HIST("hZCollision"), collision.posZ()); @@ -467,13 +476,13 @@ struct cascqaanalysis { registry.fill(HIST("hNEventsMC"), 0.5); // Generated with accepted z vertex - if(TMath::Abs(mcCollision.posZ()) > cutzvertex){ + if (TMath::Abs(mcCollision.posZ()) > cutzvertex) { return; } registry.fill(HIST("hNEventsMC"), 1.5); // Generated collision is INEL>=0 - if(INELgt0 && !isINELgt0mc(mcParticles)){ + if (INELgt0 && !isINELgt0mc(mcParticles)) { return; } registry.fill(HIST("hNEventsMC"), 2.5); From 348479ecfcec17938caec00d3bb1d23e06633888 Mon Sep 17 00:00:00 2001 From: nepeivodaRS Date: Thu, 8 Jun 2023 16:53:28 +0200 Subject: [PATCH 3/7] short to int --- PWGLF/Tasks/cascqaanalysis.cxx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/PWGLF/Tasks/cascqaanalysis.cxx b/PWGLF/Tasks/cascqaanalysis.cxx index 7febd5b97e5..6a0c6f5f508 100644 --- a/PWGLF/Tasks/cascqaanalysis.cxx +++ b/PWGLF/Tasks/cascqaanalysis.cxx @@ -240,7 +240,7 @@ struct cascqaanalysis { // INEL > 0 (at least 1 charged particle in |eta| < 1.0) typedef struct EtaCharge { double eta; - short charge; + int charge; } EtaCharge; EtaCharge etaCharge; std::vector ParticlesEtaAndCharge(particles.size()); @@ -254,7 +254,7 @@ struct cascqaanalysis { switch (std::to_string(particle.pdgCode()).length()) { case 10: // nuclei { - etaCharge = {particle.eta(), static_cast(particle.pdgCode() / 10000 % 1000)}; + etaCharge = {particle.eta(), static_cast(particle.pdgCode() / 10000 % 1000)}; ParticlesEtaAndCharge[nParticles++] = etaCharge; break; } @@ -262,7 +262,7 @@ struct cascqaanalysis { break; } } else { - etaCharge = {particle.eta(), static_cast(p->Charge())}; + etaCharge = {particle.eta(), static_cast(p->Charge())}; ParticlesEtaAndCharge[nParticles++] = etaCharge; } } From 1006e558d2bfeec68460126a87d4bce0876170f5 Mon Sep 17 00:00:00 2001 From: nepeivodaRS Date: Thu, 8 Jun 2023 18:40:14 +0200 Subject: [PATCH 4/7] MultF0 and PrimariesForINELgt0 1. Chiara's suggestion to have isFT0MforMC configurable was implemented 2. check for primaries via DCAs was implemented in isINELgt0 function (for rec.), corresponding configurables and QA histo were added --- PWGLF/Tasks/cascpostprocessing.cxx | 6 +- PWGLF/Tasks/cascqaanalysis.cxx | 101 +++++++++++++++++------------ 2 files changed, 63 insertions(+), 44 deletions(-) diff --git a/PWGLF/Tasks/cascpostprocessing.cxx b/PWGLF/Tasks/cascpostprocessing.cxx index daa6ec9bbbd..03dee50593f 100644 --- a/PWGLF/Tasks/cascpostprocessing.cxx +++ b/PWGLF/Tasks/cascpostprocessing.cxx @@ -148,6 +148,8 @@ struct cascpostprocessing { Configurable bachBaryonCosPA{"bachBaryonCosPA", 0.9999, "Bachelor baryon CosPA"}; Configurable bachBaryonDCAxyToPV{"bachBaryonDCAxyToPV", 0.05, "DCA bachelor baryon to PV"}; + Configurable isFT0MforMC{"isFT0MforMC", 0, "Fill with FT0M information or 0s"}; + HistogramRegistry registry{"registryts"}; void init(InitContext const&) @@ -485,7 +487,7 @@ struct cascpostprocessing { if (candidate.sign() < 0) { if (isCorrectlyRec) { - registry.fill(HIST("hPtCascMinusTrueRec"), candidate.pt(), rapidity, 0); + registry.fill(HIST("hPtCascMinusTrueRec"), candidate.pt(), rapidity, (isFT0MforMC ? candidate.multFT0M() : 0)); } registry.fill(HIST("hCascMinusInvMassvsPt"), candidate.pt(), invmass); registry.fill(HIST("hCascMinusInvMassvsPt_FT0M"), candidate.multFT0M(), candidate.pt(), invmass); @@ -493,7 +495,7 @@ struct cascpostprocessing { } if (candidate.sign() > 0) { if (isCorrectlyRec) { - registry.fill(HIST("hPtCascPlusTrueRec"), candidate.pt(), rapidity, 0); + registry.fill(HIST("hPtCascPlusTrueRec"), candidate.pt(), rapidity, (isFT0MforMC ? candidate.multFT0M() : 0)); } registry.fill(HIST("hCascPlusInvMassvsPt"), candidate.pt(), invmass); registry.fill(HIST("hCascPlusInvMassvsPt_FT0M"), candidate.multFT0M(), candidate.pt(), invmass); diff --git a/PWGLF/Tasks/cascqaanalysis.cxx b/PWGLF/Tasks/cascqaanalysis.cxx index 6a0c6f5f508..fa44dd168f9 100644 --- a/PWGLF/Tasks/cascqaanalysis.cxx +++ b/PWGLF/Tasks/cascqaanalysis.cxx @@ -129,7 +129,7 @@ struct cascqaanalysis { void init(InitContext const&) { - TString CandidateCounterLabels[5] = {"All candidates", "v0data exists", "passed topo cuts", "has associated MC particle", "associated with Xi(Omega)"}; + TString hCandidateCounterLabels[5] = {"All candidates", "v0data exists", "passed topo cuts", "has associated MC particle", "associated with Xi(Omega)"}; TString hNEventsMCLabels[4] = {"All", "z vrtx", "INEL>0", "Associated with rec. collision"}; TString hNEventsLabels[4] = {"All", "sel8", "z vrtx", "INEL>0"}; @@ -157,12 +157,16 @@ struct cascqaanalysis { registry.add("hCandidateCounter", "hCandidateCounter", {HistType::kTH1F, {{5, 0.0f, 5.0f}}}); for (Int_t n = 1; n <= registry.get(HIST("hCandidateCounter"))->GetNbinsX(); n++) { - registry.get(HIST("hCandidateCounter"))->GetXaxis()->SetBinLabel(n, CandidateCounterLabels[n - 1]); + registry.get(HIST("hCandidateCounter"))->GetXaxis()->SetBinLabel(n, hCandidateCounterLabels[n - 1]); } + + AxisSpec allTracks = {2000, 0, 2000, "N_{all tracks}"}; + AxisSpec secondaryTracks = {2000, 0, 2000, "N_{secondary tracks}"}; + registry.add("hINELgt0PrimariesSelection", "hINELgt0PrimariesSelection", {HistType::kTH2F, {allTracks, secondaryTracks}}); } // Event selection criteria - Configurable cutzvertex{"cutzvertex", 15.0f, "Accepted z-vertex range (cm)"}; + Configurable cutzvertex{"cutzvertex", 20.0f, "Accepted z-vertex range (cm)"}; Configurable sel8{"sel8", 1, "Apply sel8 event selection"}; Configurable INELgt0{"INELgt0", 1, "Apply INEL>0 selection"}; @@ -179,6 +183,11 @@ struct cascqaanalysis { Configurable cascradius{"cascradius", 0.0, "Casc Radius"}; Configurable etadau{"etadau", 0.8, "Eta Daughters"}; + Configurable maxDCANsigmaScaling{"DCANsigmaScaling", 1.0f, "N of 7*sigma scaling factor for DCA to select primaries"}; + Configurable DCASigma{"DCASigma", 0.004f, "7*sigma for DCA"}; + Configurable DCAPtScaling{"DCAPtScaling", 0.013f, "pt scaling for DCA"}; + Configurable maxDCAz{"DCAz", 0.5f, "DCA z cut to select primaries"}; + TRandom* fRand = new TRandom(); Filter preFilter = @@ -212,17 +221,61 @@ struct cascqaanalysis { } } + template + bool AcceptEvent(TCollision const& collision, TTracks const& tracks, bool isFillEventSelectionQA) + { + if (isFillEventSelectionQA) { + registry.fill(HIST("hNEvents"), 0.5); + } + // Event selection if required + if (sel8 && !collision.sel8()) { + return false; + } + if (isFillEventSelectionQA) { + registry.fill(HIST("hNEvents"), 1.5); + } + + if (TMath::Abs(collision.posZ()) > cutzvertex) { + return false; + } + if (isFillEventSelectionQA) { + registry.fill(HIST("hNEvents"), 2.5); + } + + if (INELgt0 && !isINELgt0(tracks, isFillEventSelectionQA)) { + return false; + } + if (isFillEventSelectionQA) { + registry.fill(HIST("hNEvents"), 3.5); + } + + if (isFillEventSelectionQA) { + registry.fill(HIST("hZCollision"), collision.posZ()); + registry.fill(HIST("hCentFT0M"), collision.centFT0M()); + registry.fill(HIST("hCentFV0A"), collision.centFV0A()); + } + return true; + } + template - bool isINELgt0(TTracks tracks) + bool isINELgt0(TTracks tracks, bool isFillEventSelectionQA) { // INEL > 0 (at least 1 charged track in |eta| < 1.0) - // TO DO: check for primary via DCA std::vector TracksEta(tracks.size()); int nTracks = 0; + int nRejTracks = 0; for (const auto& track : tracks) { + if(TMath::Abs(track.dcaXY()) > (maxDCANsigmaScaling*DCASigma + DCAPtScaling/track.pt()) || TMath::Abs(track.dcaZ()) > maxDCAz) { + nRejTracks++; + continue; // consider only primaries + } TracksEta[nTracks++] = track.eta(); } + if(isFillEventSelectionQA){ + registry.fill(HIST("hINELgt0PrimariesSelection"), tracks.size(), nRejTracks); + } + auto etaConditionFunc = [](float elem) { return TMath::Abs(elem) < 1.0; }; @@ -280,42 +333,6 @@ struct cascqaanalysis { } } - template - bool AcceptEvent(TCollision const& collision, TTracks const& tracks, bool isFillEventSelectionQA) - { - if (isFillEventSelectionQA) { - registry.fill(HIST("hNEvents"), 0.5); - } - // Event selection if required - if (sel8 && !collision.sel8()) { - return false; - } - if (isFillEventSelectionQA) { - registry.fill(HIST("hNEvents"), 1.5); - } - - if (TMath::Abs(collision.posZ()) > cutzvertex) { - return false; - } - if (isFillEventSelectionQA) { - registry.fill(HIST("hNEvents"), 2.5); - } - - if (INELgt0 && !isINELgt0(tracks)) { - return false; - } - if (isFillEventSelectionQA) { - registry.fill(HIST("hNEvents"), 3.5); - } - - if (isFillEventSelectionQA) { - registry.fill(HIST("hZCollision"), collision.posZ()); - registry.fill(HIST("hCentFT0M"), collision.centFT0M()); - registry.fill(HIST("hCentFV0A"), collision.centFV0A()); - } - return true; - } - void processData(soa::Join::iterator const& collision, soa::Filtered const& Cascades, aod::V0sLinked const&, @@ -470,7 +487,7 @@ struct cascqaanalysis { void processMCgen(aod::McCollision const& mcCollision, aod::McParticles const& mcParticles, const soa::SmallGroups>& collisions, - aod::Tracks const& Tracks) + DauTracks const& Tracks) { // All generated collisions registry.fill(HIST("hNEventsMC"), 0.5); From 6897cd9b66616cb0944fd806a43ea42c496e5c57 Mon Sep 17 00:00:00 2001 From: ALICE Action Bot Date: Thu, 8 Jun 2023 16:40:51 +0000 Subject: [PATCH 5/7] Please consider the following formatting changes --- PWGLF/Tasks/cascqaanalysis.cxx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/PWGLF/Tasks/cascqaanalysis.cxx b/PWGLF/Tasks/cascqaanalysis.cxx index fa44dd168f9..0092d25c6e2 100644 --- a/PWGLF/Tasks/cascqaanalysis.cxx +++ b/PWGLF/Tasks/cascqaanalysis.cxx @@ -265,14 +265,14 @@ struct cascqaanalysis { int nTracks = 0; int nRejTracks = 0; for (const auto& track : tracks) { - if(TMath::Abs(track.dcaXY()) > (maxDCANsigmaScaling*DCASigma + DCAPtScaling/track.pt()) || TMath::Abs(track.dcaZ()) > maxDCAz) { + if (TMath::Abs(track.dcaXY()) > (maxDCANsigmaScaling * DCASigma + DCAPtScaling / track.pt()) || TMath::Abs(track.dcaZ()) > maxDCAz) { nRejTracks++; continue; // consider only primaries } TracksEta[nTracks++] = track.eta(); } - if(isFillEventSelectionQA){ + if (isFillEventSelectionQA) { registry.fill(HIST("hINELgt0PrimariesSelection"), tracks.size(), nRejTracks); } From be04ee3dc4025ce0756c87fc705b75cecf021de8 Mon Sep 17 00:00:00 2001 From: nepeivodaRS Date: Thu, 8 Jun 2023 18:54:13 +0200 Subject: [PATCH 6/7] small name fix --- PWGLF/Tasks/cascqaanalysis.cxx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/PWGLF/Tasks/cascqaanalysis.cxx b/PWGLF/Tasks/cascqaanalysis.cxx index fa44dd168f9..dfadcfbea51 100644 --- a/PWGLF/Tasks/cascqaanalysis.cxx +++ b/PWGLF/Tasks/cascqaanalysis.cxx @@ -183,10 +183,10 @@ struct cascqaanalysis { Configurable cascradius{"cascradius", 0.0, "Casc Radius"}; Configurable etadau{"etadau", 0.8, "Eta Daughters"}; - Configurable maxDCANsigmaScaling{"DCANsigmaScaling", 1.0f, "N of 7*sigma scaling factor for DCA to select primaries"}; + Configurable maxDCANsigmaScaling{"maxDCANsigmaScaling", 1.0f, "N of 7*sigma scaling factor for DCA to select primaries"}; Configurable DCASigma{"DCASigma", 0.004f, "7*sigma for DCA"}; Configurable DCAPtScaling{"DCAPtScaling", 0.013f, "pt scaling for DCA"}; - Configurable maxDCAz{"DCAz", 0.5f, "DCA z cut to select primaries"}; + Configurable maxDCAz{"maxDCAz", 0.5f, "DCA z cut to select primaries"}; TRandom* fRand = new TRandom(); From 29b28e452e19d001b5d3511da5f2e4830b6f0750 Mon Sep 17 00:00:00 2001 From: Chiara De Martin <39315597+ChiaraDeMartin95@users.noreply.github.com> Date: Thu, 8 Jun 2023 20:41:07 +0200 Subject: [PATCH 7/7] Fix formula in dcaxy --- PWGLF/Tasks/cascqaanalysis.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/PWGLF/Tasks/cascqaanalysis.cxx b/PWGLF/Tasks/cascqaanalysis.cxx index 64adf121232..e7b0177e459 100644 --- a/PWGLF/Tasks/cascqaanalysis.cxx +++ b/PWGLF/Tasks/cascqaanalysis.cxx @@ -265,7 +265,7 @@ struct cascqaanalysis { int nTracks = 0; int nRejTracks = 0; for (const auto& track : tracks) { - if (TMath::Abs(track.dcaXY()) > (maxDCANsigmaScaling * DCASigma + DCAPtScaling / track.pt()) || TMath::Abs(track.dcaZ()) > maxDCAz) { + if (TMath::Abs(track.dcaXY()) > (maxDCANsigmaScaling * (DCASigma + DCAPtScaling / track.pt())) || TMath::Abs(track.dcaZ()) > maxDCAz) { nRejTracks++; continue; // consider only primaries }