diff --git a/PWGLF/Tasks/Resonances/CMakeLists.txt b/PWGLF/Tasks/Resonances/CMakeLists.txt index 4f00934dba0..6c98d0325bc 100644 --- a/PWGLF/Tasks/Resonances/CMakeLists.txt +++ b/PWGLF/Tasks/Resonances/CMakeLists.txt @@ -165,7 +165,7 @@ o2physics_add_dpl_workflow(highmasslambdasvx COMPONENT_NAME Analysis) o2physics_add_dpl_workflow(chk892flow - SOURCES chk892flow.cxx + SOURCES chk892Flow.cxx PUBLIC_LINK_LIBRARIES O2Physics::AnalysisCore COMPONENT_NAME Analysis) diff --git a/PWGLF/Tasks/Resonances/chk892flow.cxx b/PWGLF/Tasks/Resonances/chk892Flow.cxx similarity index 80% rename from PWGLF/Tasks/Resonances/chk892flow.cxx rename to PWGLF/Tasks/Resonances/chk892Flow.cxx index 1d253665ca0..e2abf37da88 100644 --- a/PWGLF/Tasks/Resonances/chk892flow.cxx +++ b/PWGLF/Tasks/Resonances/chk892Flow.cxx @@ -8,12 +8,11 @@ // In applying this license CERN does not waive the privileges and immunities // granted to it by virtue of its status as an Intergovernmental Organization // or submit itself to any jurisdiction. - -/// \file chk892flow.cxx -/// \brief Reconstruction of track-track decay resonance candidates /// +/// \file chk892Flow.cxx +/// \brief Reconstruction of track-track decay resonance candidates +/// \author Su-Jeong Ji , Bong-Hwi Lim /// -/// \author Su-Jeong Ji #include #include @@ -80,8 +79,8 @@ using namespace o2::framework::expressions; using namespace o2::soa; using namespace o2::constants::physics; -struct chk892flow { - enum binType : unsigned int { +struct Chk892Flow { + enum BinType : unsigned int { kKstarP = 0, kKstarN, kKstarP_Mix, @@ -187,12 +186,13 @@ struct chk892flow { Configurable cfgByPassDauPIDSelection{"cfgByPassDauPIDSelection", true, "Bypass Daughters PID selection"}; Configurable cSecondaryDauDCAMax{"cSecondaryDauDCAMax", 0.2, "Maximum DCA Secondary daughters to PV"}; - // Configurable cSecondaryDauPosDCAtoPVMin{"cSecondaryDauPosDCAtoPVMin", 0.0, "Minimum DCA Secondary positive daughters to PV"}; - // Configurable cSecondaryDauNegDCAtoPVMin{"cSecondaryDauNegDCAtoPVMin", 0.0, "Minimum DCA Secondary negative daughters to PV"}; + Configurable cSecondaryDauPosDCAtoPVMin{"cSecondaryDauPosDCAtoPVMin", 0.0, "Minimum DCA Secondary positive daughters to PV"}; + Configurable cSecondaryDauNegDCAtoPVMin{"cSecondaryDauNegDCAtoPVMin", 0.0, "Minimum DCA Secondary negative daughters to PV"}; - // Configurable cSecondaryPtMin{"cSecondaryPtMin", 0.f, "Minimum transverse momentum of Secondary"}; + Configurable cSecondaryPtMin{"cSecondaryPtMin", 0.f, "Minimum transverse momentum of Secondary"}; Configurable cSecondaryRapidityMax{"cSecondaryRapidityMax", 0.5, "Maximum rapidity of Secondary"}; - // Configurable cSecondaryRadiusMin{"cSecondaryRadiusMin", 1.2, "Minimum transverse radius of Secondary"}; + Configurable cSecondaryRadiusMin{"cSecondaryRadiusMin", 0.0, "Minimum transverse radius of Secondary"}; + Configurable cSecondaryRadiusMax{"cSecondaryRadiusMax", 999.9, "Maximum transverse radius of Secondary"}; Configurable cSecondaryCosPAMin{"cSecondaryCosPAMin", 0.998, "Mininum cosine pointing angle of Secondary"}; Configurable cSecondaryDCAtoPVMax{"cSecondaryDCAtoPVMax", 0.4, "Maximum DCA Secondary to PV"}; Configurable cSecondaryProperLifetimeMax{"cSecondaryProperLifetimeMax", 20., "Maximum Secondary Lifetime"}; @@ -229,10 +229,9 @@ struct chk892flow { float lCentrality; // PDG code - int kPDGK0s = 310; - int kPDGK0 = 311; + int kPDGK0s = kK0Short; + int kPDGK0 = kK0; int kKstarPlus = o2::constants::physics::Pdg::kKPlusStar892; - int kPiPlus = 211; void init(o2::framework::InitContext&) { @@ -270,14 +269,14 @@ struct chk892flow { AxisSpec mcTypeAxis = {4, 0, 4, "Histogram types"}; // THnSparse - AxisSpec axisType = {binType::kTYEnd, 0, binType::kTYEnd, "Type of bin with charge and mix"}; + AxisSpec axisType = {BinType::kTYEnd, 0, BinType::kTYEnd, "Type of bin with charge and mix"}; AxisSpec mcLabelAxis = {5, -0.5, 4.5, "MC Label"}; - histos.add("QA/K0sCutCheck", "Check K0s cut", HistType::kTH1D, {AxisSpec{12, -0.5, 11.5, "Check"}}); - + if (cfgReturnFlag) { + histos.add("QA/K0sCutCheck", "Check K0s cut", HistType::kTH1D, {AxisSpec{12, -0.5, 11.5, "Check"}}); + } histos.add("QA/before/CentDist", "Centrality distribution", {HistType::kTH1D, {centAxis}}); histos.add("QA/before/VtxZ", "Centrality distribution", {HistType::kTH1D, {vtxzAxis}}); - histos.add("QA/before/hEvent", "Number of Events", HistType::kTH1F, {{1, 0.5, 1.5}}); // EventPlane histos.add("QA/EP/hEPDet", "Event plane distribution of FT0C (Det = A)", {HistType::kTH2D, {centAxis, epAxis}}); @@ -339,48 +338,36 @@ struct chk892flow { // K0s histos.add("QA/before/hDauDCASecondary", "DCA of daughters of secondary resonance", HistType::kTH1D, {dcaAxis}); - // histos.add("QA/before/hDauPosDCAtoPVSecondary", "Pos DCA to PV of daughters secondary resonance", HistType::kTH1D, {dcaAxis}); - // histos.add("QA/before/hDauNegDCAtoPVSecondary", "Neg DCA to PV of daughters secondary resonance", HistType::kTH1D, {dcaAxis}); - // histos.add("QA/before/hpT_Secondary", "pT distribution of secondary resonance", HistType::kTH1D, {ptAxisQA}); histos.add("QA/before/hy_Secondary", "Rapidity distribution of secondary resonance", HistType::kTH1D, {yAxis}); - // histos.add("QA/before/hRadiusSecondary", "Radius distribution of secondary resonance", HistType::kTH1D, {radiusAxis}); histos.add("QA/before/hCPASecondary", "Cosine pointing angle distribution of secondary resonance", HistType::kTH1D, {cpaAxis}); histos.add("QA/before/hDCAtoPVSecondary", "DCA to PV distribution of secondary resonance", HistType::kTH1D, {dcaAxis}); - // histos.add("QA/before/hPropTauSecondary", "Proper Lifetime distribution of secondary resonance", HistType::kTH1D, {tauAxis}); - // histos.add("QA/before/hPtAsymSecondary", "pT asymmetry distribution of secondary resonance", HistType::kTH1D, {AxisSpec{100, -1, 1, "Pair asymmetry"}}); + histos.add("QA/before/hPropTauSecondary", "Proper Lifetime distribution of secondary resonance", HistType::kTH1D, {tauAxis}); histos.add("QA/before/hInvmassSecondary", "Invariant mass of unlike-sign secondary resonance", HistType::kTH1D, {invMassAxisK0s}); histos.add("QA/after/hDauDCASecondary", "DCA of daughters of secondary resonance", HistType::kTH1D, {dcaAxis}); - // histos.add("QA/after/hDauPosDCAtoPVSecondary", "Pos DCA to PV of daughters secondary resonance", HistType::kTH1D, {dcaAxis}); - // histos.add("QA/after/hDauNegDCAtoPVSecondary", "Neg DCA to PV of daughters secondary resonance", HistType::kTH1D, {dcaAxis}); - // histos.add("QA/after/hpT_Secondary", "pT distribution of secondary resonance", HistType::kTH1D, {ptAxisQA}); histos.add("QA/after/hy_Secondary", "Rapidity distribution of secondary resonance", HistType::kTH1D, {yAxis}); - // histos.add("QA/after/hRadiusSecondary", "Radius distribution of secondary resonance", HistType::kTH1D, {radiusAxis}); histos.add("QA/after/hCPASecondary", "Cosine pointing angle distribution of secondary resonance", HistType::kTH1D, {cpaAxis}); histos.add("QA/after/hDCAtoPVSecondary", "DCA to PV distribution of secondary resonance", HistType::kTH1D, {dcaAxis}); - // histos.add("QA/after/hPropTauSecondary", "Proper Lifetime distribution of secondary resonance", HistType::kTH1D, {tauAxis}); - // histos.add("QA/after/hPtAsymSecondary", "pT asymmetry distribution of secondary resonance", HistType::kTH1D, {AxisSpec{100, -1, 1, "Pair asymmetry"}}); + histos.add("QA/after/hPropTauSecondary", "Proper Lifetime distribution of secondary resonance", HistType::kTH1D, {tauAxis}); histos.add("QA/after/hInvmassSecondary", "Invariant mass of unlike-sign secondary resonance", HistType::kTH1D, {invMassAxisK0s}); // Kstar // Invariant mass nSparse - histos.add("QA/before/KstarRapidity", "Rapidity distribution of chK(892)", HistType::kTH1D, {yAxis}); histos.add("hInvmass_Kstar", "Invariant mass of unlike-sign chK(892)", HistType::kTHnSparseD, {axisType, centAxis, ptAxis, invMassAxisReso, v2Axis}); - histos.add("hInvmass_Kstar_Mix", "Invariant mass of unlike-sign chK(892) from mixed event", HistType::kTHnSparseD, {axisType, centAxis, ptAxis, invMassAxisReso, v2Axis}); + histos.add("hInvmass_K0s", "Invariant mass of unlike-sign K0s", HistType::kTHnSparseD, {centAxis, ptAxis, invMassAxisK0s, v2Axis}); // Mass QA (quick check) + histos.add("QA/before/KstarRapidity", "Rapidity distribution of chK(892)", HistType::kTH1D, {yAxis}); histos.add("QA/before/kstarinvmass", "Invariant mass of unlike-sign chK(892)", HistType::kTH1D, {invMassAxisReso}); histos.add("QA/before/k0sv2vsinvmass", "Invariant mass vs v2 of unlike-sign K0s", HistType::kTH2D, {invMassAxisK0s, v2Axis}); histos.add("QA/before/kstarv2vsinvmass", "Invariant mass vs v2 of unlike-sign chK(892)", HistType::kTH2D, {invMassAxisReso, v2Axis}); histos.add("QA/before/kstarinvmass_Mix", "Invariant mass of unlike-sign chK(892) from mixed event", HistType::kTH1D, {invMassAxisReso}); - histos.add("QA/before/kstarv2vsinvmass_Mix", "Invariant mass vs v2 of unlike-sign chK(892) from mixed event", HistType::kTH2D, {invMassAxisReso, v2Axis}); histos.add("QA/after/KstarRapidity", "Rapidity distribution of chK(892)", HistType::kTH1D, {yAxis}); histos.add("QA/after/kstarinvmass", "Invariant mass of unlike-sign chK(892)", HistType::kTH1D, {invMassAxisReso}); histos.add("QA/after/k0sv2vsinvmass", "Invariant mass vs v2 of unlike-sign K0s", HistType::kTH2D, {invMassAxisK0s, v2Axis}); histos.add("QA/after/kstarv2vsinvmass", "Invariant mass vs v2 of unlike-sign chK(892)", HistType::kTH2D, {invMassAxisReso, v2Axis}); histos.add("QA/after/kstarinvmass_Mix", "Invariant mass of unlike-sign chK(892) from mixed event", HistType::kTH1D, {invMassAxisReso}); - histos.add("QA/after/kstarv2vsinvmass_Mix", "Invariant mass vs v2 of unlike-sign chK(892) from mixed event", HistType::kTH2D, {invMassAxisReso, v2Axis}); lDetId = getlDetId(cfgQvecDetName); lRefAId = getlDetId(cfgQvecRefAName); @@ -396,8 +383,6 @@ struct chk892flow { // MC if (doprocessMC) { - - histos.add("QAMC/hEvent", "Number of Events", HistType::kTH1F, {{1, 0.5, 1.5}}); // Bachelor pion histos.add("QAMC/trkbpionDCAxy", "DCAxy distribution of bachelor pion candidates", HistType::kTH1D, {dcaxyAxis}); histos.add("QAMC/trkbpionDCAz", "DCAz distribution of bachelor pion candidates", HistType::kTH1D, {dcazAxis}); @@ -422,18 +407,15 @@ struct chk892flow { histos.add("QAMC/trknpionDCAxy", "DCAxy distribution of secondary pion 2 (negative) candidates", HistType::kTH1D, {dcaxyAxis}); histos.add("QAMC/trknpionDCAz", "DCAz distribution of secondary pion 2 (negative) candidates", HistType::kTH1D, {dcazAxis}); - // Secondary Resonance (K0s cand) + // Secondary Resonance (K0s candidates) histos.add("QAMC/hDauDCASecondary", "DCA of daughters of secondary resonance", HistType::kTH1D, {dcaAxis}); histos.add("QAMC/hDauPosDCAtoPVSecondary", "Pos DCA to PV of daughters secondary resonance", HistType::kTH1D, {dcaAxis}); histos.add("QAMC/hDauNegDCAtoPVSecondary", "Neg DCA to PV of daughters secondary resonance", HistType::kTH1D, {dcaAxis}); - histos.add("QAMC/hpT_Secondary", "pT distribution of secondary resonance", HistType::kTH1D, {ptAxis}); histos.add("QAMC/hy_Secondary", "Rapidity distribution of secondary resonance", HistType::kTH1D, {yAxis}); - histos.add("QAMC/hRadiusSecondary", "Radius distribution of secondary resonance", HistType::kTH1D, {radiusAxis}); histos.add("QAMC/hCPASecondary", "Cosine pointing angle distribution of secondary resonance", HistType::kTH1D, {cpaAxis}); histos.add("QAMC/hDCAtoPVSecondary", "DCA to PV distribution of secondary resonance", HistType::kTH1D, {dcaAxis}); histos.add("QAMC/hPropTauSecondary", "Proper Lifetime distribution of secondary resonance", HistType::kTH1D, {tauAxis}); - histos.add("QAMC/hPtAsymSecondary", "pT asymmetry distribution of secondary resonance", HistType::kTH1D, {AxisSpec{100, -1, 1, "Pair asymmetry"}}); histos.add("QAMC/hInvmassSecondary", "Invariant mass of unlike-sign secondary resonance", HistType::kTH1D, {invMassAxisK0s}); // K892 @@ -542,184 +524,119 @@ struct chk892flow { template bool selectionPIDPion(TrackType const& candidate) { - bool tpcPIDPassed{false}, tofPIDPassed{false}; + bool tpcPIDPassed = std::abs(candidate.tpcNSigmaPi()) < cMaxTPCnSigmaPion; + bool tofPIDPassed = false; if (cTPConly) { + return tpcPIDPassed; + } - if (std::abs(candidate.tpcNSigmaPi()) < cMaxTPCnSigmaPion) { - tpcPIDPassed = true; - } else { - return false; - } - tofPIDPassed = true; - + if (candidate.hasTOF()) { + tofPIDPassed = std::abs(candidate.tofNSigmaPi()) < cMaxTOFnSigmaPion || + (nsigmaCutCombinedPion > 0 && + candidate.tpcNSigmaPi() * candidate.tpcNSigmaPi() + + candidate.tofNSigmaPi() * candidate.tofNSigmaPi() < + nsigmaCutCombinedPion * nsigmaCutCombinedPion); } else { - - if (std::abs(candidate.tpcNSigmaPi()) < cMaxTPCnSigmaPion) { - tpcPIDPassed = true; - } else { - return false; - } - if (candidate.hasTOF()) { - if (std::abs(candidate.tofNSigmaPi()) < cMaxTOFnSigmaPion) { - tofPIDPassed = true; - } - if ((nsigmaCutCombinedPion > 0) && (candidate.tpcNSigmaPi() * candidate.tpcNSigmaPi() + candidate.tofNSigmaPi() * candidate.tofNSigmaPi() < nsigmaCutCombinedPion * nsigmaCutCombinedPion)) { - tofPIDPassed = true; - } - } else { - if (!cTOFVeto) { - return false; - } - tofPIDPassed = true; - } + tofPIDPassed = cTOFVeto; } - if (tpcPIDPassed && tofPIDPassed) { - return true; - } - return false; + return tpcPIDPassed && tofPIDPassed; } template bool selectionK0s(CollisionType const& collision, K0sType const& candidate) { auto lDauDCA = candidate.dcaV0daughters(); - // auto lDauPosDCAtoPV = candidate.dcapostopv(); - // auto lDauNegDCAtoPV = candidate.dcanegtopv(); - // auto lPt = candidate.pt(); + auto lDauPosDCAtoPV = candidate.dcapostopv(); + auto lDauNegDCAtoPV = candidate.dcanegtopv(); + auto lPt = candidate.pt(); auto lRapidity = candidate.yK0Short(); - // auto lRadius = candidate.v0radius(); + auto lRadius = candidate.v0radius(); auto lDCAtoPV = candidate.dcav0topv(); auto lCPA = candidate.v0cosPA(); auto lPropTauK0s = candidate.distovertotmom(collision.posX(), collision.posY(), collision.posZ()) * MassK0Short; auto lMk0s = candidate.mK0Short(); - if (cfgReturnFlag) { - bool returnFlag = true; - - if (cSecondaryRequire) { - histos.fill(HIST("QA/K0sCutCheck"), 0); - if (lDauDCA > cSecondaryDauDCAMax) { - histos.fill(HIST("QA/K0sCutCheck"), 1); - returnFlag = false; - } - /* - if (lDauPosDCAtoPV < cSecondaryDauPosDCAtoPVMin) { - histos.fill(HIST("QA/K0sCutCheck"), 2); - returnFlag = false; - } - if (lDauNegDCAtoPV < cSecondaryDauNegDCAtoPVMin) { - histos.fill(HIST("QA/K0sCutCheck"), 3); - returnFlag = false; - } - if (lPt < cSecondaryPtMin) { - histos.fill(HIST("QA/K0sCutCheck"), 4); - returnFlag = false; - } - */ - if (std::fabs(lRapidity) > cSecondaryRapidityMax) { - histos.fill(HIST("QA/K0sCutCheck"), 5); - returnFlag = false; - } - /* - if (lRadius < cSecondaryRadiusMin) { - histos.fill(HIST("QA/K0sCutCheck"), 6); - returnFlag = false; - } - */ - if (lDCAtoPV > cSecondaryDCAtoPVMax) { - histos.fill(HIST("QA/K0sCutCheck"), 7); - returnFlag = false; - } - if (lCPA < cSecondaryCosPAMin) { - histos.fill(HIST("QA/K0sCutCheck"), 8); - returnFlag = false; - } - if (lPropTauK0s > cSecondaryProperLifetimeMax) { - histos.fill(HIST("QA/K0sCutCheck"), 9); - returnFlag = false; - } - if (candidate.qtarm() < cSecondaryparamArmenterosCut * std::abs(candidate.alpha())) { - histos.fill(HIST("QA/K0sCutCheck"), 11); - returnFlag = false; - } - if (std::fabs(lMk0s - MassK0Short) > cSecondaryMassWindow) { - histos.fill(HIST("QA/K0sCutCheck"), 10); - returnFlag = false; - } - - return returnFlag; - - } else { - if (std::fabs(lMk0s - MassK0Short) > cSecondaryMassWindow) { - histos.fill(HIST("QA/K0sCutCheck"), 10); - returnFlag = false; - } + auto checkCommonCuts = [&]() { + if (lDauDCA > cSecondaryDauDCAMax) + return false; + if (lDauPosDCAtoPV < cSecondaryDauPosDCAtoPVMin) + return false; + if (lDauNegDCAtoPV < cSecondaryDauNegDCAtoPVMin) + return false; + if (lPt < cSecondaryPtMin) + return false; + if (std::fabs(lRapidity) > cSecondaryRapidityMax) + return false; + if (lRadius < cSecondaryRadiusMin || lRadius > cSecondaryRadiusMax) + return false; + if (lDCAtoPV > cSecondaryDCAtoPVMax) + return false; + if (lCPA < cSecondaryCosPAMin) + return false; + if (lPropTauK0s > cSecondaryProperLifetimeMax) + return false; + if (candidate.qtarm() < cSecondaryparamArmenterosCut * std::abs(candidate.alpha())) + return false; + if (std::fabs(lMk0s - MassK0Short) > cSecondaryMassWindow) + return false; + return true; + }; - return returnFlag; + if (cfgReturnFlag) { // For cut study + bool returnFlag = true; + histos.fill(HIST("QA/K0sCutCheck"), 0); + if (lDauDCA > cSecondaryDauDCAMax) { + histos.fill(HIST("QA/K0sCutCheck"), 1); + returnFlag = false; } - - } else { + if (lDauPosDCAtoPV < cSecondaryDauPosDCAtoPVMin) { + histos.fill(HIST("QA/K0sCutCheck"), 2); + returnFlag = false; + } + if (lDauNegDCAtoPV < cSecondaryDauNegDCAtoPVMin) { + histos.fill(HIST("QA/K0sCutCheck"), 3); + returnFlag = false; + } + if (lPt < cSecondaryPtMin) { + histos.fill(HIST("QA/K0sCutCheck"), 4); + returnFlag = false; + } + if (std::fabs(lRapidity) > cSecondaryRapidityMax) { + histos.fill(HIST("QA/K0sCutCheck"), 5); + returnFlag = false; + } + if (lRadius < cSecondaryRadiusMin || lRadius > cSecondaryRadiusMax) { + histos.fill(HIST("QA/K0sCutCheck"), 6); + returnFlag = false; + } + if (lDCAtoPV > cSecondaryDCAtoPVMax) { + histos.fill(HIST("QA/K0sCutCheck"), 7); + returnFlag = false; + } + if (lCPA < cSecondaryCosPAMin) { + histos.fill(HIST("QA/K0sCutCheck"), 8); + returnFlag = false; + } + if (lPropTauK0s > cSecondaryProperLifetimeMax) { + histos.fill(HIST("QA/K0sCutCheck"), 9); + returnFlag = false; + } + if (candidate.qtarm() < cSecondaryparamArmenterosCut * std::abs(candidate.alpha())) { + histos.fill(HIST("QA/K0sCutCheck"), 10); + returnFlag = false; + } + if (std::fabs(lMk0s - MassK0Short) > cSecondaryMassWindow) { + histos.fill(HIST("QA/K0sCutCheck"), 11); + returnFlag = false; + } + return returnFlag; + } else { // normal usage if (cSecondaryRequire) { - - histos.fill(HIST("QA/K0sCutCheck"), 0); - if (lDauDCA > cSecondaryDauDCAMax) { - histos.fill(HIST("QA/K0sCutCheck"), 1); - return false; - } - /* - if (lDauPosDCAtoPV < cSecondaryDauPosDCAtoPVMin) { - histos.fill(HIST("QA/K0sCutCheck"), 2); - return false; - } - if (lDauNegDCAtoPV < cSecondaryDauNegDCAtoPVMin) { - histos.fill(HIST("QA/K0sCutCheck"), 3); - return false; - } - if (lPt < cSecondaryPtMin) { - histos.fill(HIST("QA/K0sCutCheck"), 4); - return false; - } - */ - if (std::fabs(lRapidity) > cSecondaryRapidityMax) { - histos.fill(HIST("QA/K0sCutCheck"), 5); - return false; - } - /* - if (lRadius < cSecondaryRadiusMin) { - histos.fill(HIST("QA/K0sCutCheck"), 6); - return false; - } - */ - if (lDCAtoPV > cSecondaryDCAtoPVMax) { - histos.fill(HIST("QA/K0sCutCheck"), 7); - return false; - } - if (lCPA < cSecondaryCosPAMin) { - histos.fill(HIST("QA/K0sCutCheck"), 8); - return false; - } - if (lPropTauK0s > cSecondaryProperLifetimeMax) { - histos.fill(HIST("QA/K0sCutCheck"), 9); - return false; - } - if (candidate.qtarm() < cSecondaryparamArmenterosCut * std::abs(candidate.alpha())) { - histos.fill(HIST("QA/K0sCutCheck"), 11); - return false; - } - if (std::fabs(lMk0s - MassK0Short) > cSecondaryMassWindow) { - histos.fill(HIST("QA/K0sCutCheck"), 10); - return false; - } - return true; - + return checkCommonCuts(); } else { - if (std::fabs(lMk0s - MassK0Short) > cSecondaryMassWindow) { - histos.fill(HIST("QA/K0sCutCheck"), 10); - return false; - } - return true; + return std::fabs(lMk0s - MassK0Short) <= cSecondaryMassWindow; // always apply mass window cut } } } // selectionK0s @@ -843,16 +760,15 @@ struct chk892flow { /// K0s auto trkkDauDCA = k0sCand.dcaV0daughters(); - // auto trkkDauDCAPostoPV = k0sCand.dcapostopv(); - // auto trkkDauDCANegtoPV = k0sCand.dcanegtopv(); - // auto trkkpt = k0sCand.pt(); auto trkky = k0sCand.yK0Short(); - // auto trkkRadius = k0sCand.v0radius(); auto trkkDCAtoPV = k0sCand.dcav0topv(); auto trkkCPA = k0sCand.v0cosPA(); - // auto trkkPropTau = k0sCand.distovertotmom(collision.posX(), collision.posY(), collision.posZ()) * MassK0Short; + auto trkkPropTau = k0sCand.distovertotmom(collision.posX(), collision.posY(), collision.posZ()) * MassK0Short; auto trkkMass = k0sCand.mK0Short(); + lResoSecondary.SetXYZM(k0sCand.px(), k0sCand.py(), k0sCand.pz(), MassK0Short); + auto lPhiMinusPsiK0s = RecoDecay::constrainAngle(lResoSecondary.Phi() - lEPDet, 0.0, 2); // constrain angle to range 0, Pi + auto v2K0s = std::cos(static_cast(nmode) * lPhiMinusPsiK0s); if constexpr (!IsMix) { // Seconddary QA plots histos.fill(HIST("QA/before/trkppionTPCPID"), trkppt, trkpNSigmaPiTPC); @@ -872,23 +788,17 @@ struct chk892flow { histos.fill(HIST("QA/before/trknpionpT"), trknpt); histos.fill(HIST("QA/before/trknpionDCAxy"), negDauTrack.dcaXY()); histos.fill(HIST("QA/before/trknpionDCAz"), negDauTrack.dcaZ()); - histos.fill(HIST("QA/before/hDauDCASecondary"), trkkDauDCA); - // histos.fill(HIST("QA/before/hDauPosDCAtoPVSecondary"), trkkDauDCAPostoPV); - // histos.fill(HIST("QA/before/hDauNegDCAtoPVSecondary"), trkkDauDCANegtoPV); - - // histos.fill(HIST("QA/before/hpT_Secondary"), trkkpt); histos.fill(HIST("QA/before/hy_Secondary"), trkky); - // histos.fill(HIST("QA/before/hRadiusSecondary"), trkkRadius); histos.fill(HIST("QA/before/hDCAtoPVSecondary"), trkkDCAtoPV); histos.fill(HIST("QA/before/hCPASecondary"), trkkCPA); - // histos.fill(HIST("QA/before/hPropTauSecondary"), trkkPropTau); + histos.fill(HIST("QA/before/hPropTauSecondary"), trkkPropTau); histos.fill(HIST("QA/before/hInvmassSecondary"), trkkMass); + + histos.fill(HIST("QA/before/k0sv2vsinvmass"), lResoSecondary.M(), v2K0s); } - // if (!trackCut(posDauTrack) || !trackCut(negDauTrack)) // Too tight cut for K0s daugthers - // continue; - if (!cfgByPassDauPIDSelection && !selectionPIDPion(posDauTrack)) // Perhaps it's already applied in trackCut (need to check QA plots) + if (!cfgByPassDauPIDSelection && !selectionPIDPion(posDauTrack)) continue; if (!cfgByPassDauPIDSelection && !selectionPIDPion(negDauTrack)) continue; @@ -897,7 +807,6 @@ struct chk892flow { if constexpr (!IsMix) { // Seconddary QA plots after applying cuts - histos.fill(HIST("QA/after/trkppionTPCPID"), trkppt, trkpNSigmaPiTPC); if (istrkphasTOF) { histos.fill(HIST("QA/after/trkppionTOFPID"), trkppt, trkpNSigmaPiTOF); @@ -917,16 +826,14 @@ struct chk892flow { histos.fill(HIST("QA/after/trknpionDCAz"), negDauTrack.dcaZ()); histos.fill(HIST("QA/after/hDauDCASecondary"), trkkDauDCA); - // histos.fill(HIST("QA/after/hDauPosDCAtoPVSecondary"), trkkDauDCAPostoPV); - // histos.fill(HIST("QA/after/hDauNegDCAtoPVSecondary"), trkkDauDCANegtoPV); - - // histos.fill(HIST("QA/after/hpT_Secondary"), trkkpt); histos.fill(HIST("QA/after/hy_Secondary"), trkky); - // histos.fill(HIST("QA/after/hRadiusSecondary"), trkkRadius); histos.fill(HIST("QA/after/hDCAtoPVSecondary"), trkkDCAtoPV); histos.fill(HIST("QA/after/hCPASecondary"), trkkCPA); - // histos.fill(HIST("QA/after/hPropTauSecondary"), trkkPropTau); + histos.fill(HIST("QA/after/hPropTauSecondary"), trkkPropTau); histos.fill(HIST("QA/after/hInvmassSecondary"), trkkMass); + + histos.fill(HIST("QA/after/k0sv2vsinvmass"), lResoSecondary.M(), v2K0s); + histos.fill(HIST("hInvmass_K0s"), lCentrality, lResoSecondary.Pt(), lResoSecondary.M(), v2K0s); } k0sIndicies.push_back(k0sCand.index()); } @@ -940,16 +847,13 @@ struct chk892flow { lResoSecondary.SetXYZM(k0sCand.px(), k0sCand.py(), k0sCand.pz(), MassK0Short); lResoKstar = lResoSecondary + lDecayDaughter_bach; - auto lPhiMinusPsiK0s = RecoDecay::constrainAngle(lResoSecondary.Phi() - lEPDet, 0.0, 2); // constrain angle to range 0, Pi - auto lPhiMinusPsiKstar = RecoDecay::constrainAngle(lResoKstar.Phi() - lEPDet, 0.0, 2); // constrain angle to range 0, Pi - auto v2K0s = std::cos(static_cast(nmode) * lPhiMinusPsiK0s); + auto lPhiMinusPsiKstar = RecoDecay::constrainAngle(lResoKstar.Phi() - lEPDet, 0.0, 2); // constrain angle to range 0, Pi auto v2Kstar = std::cos(static_cast(nmode) * lPhiMinusPsiKstar); // QA plots if constexpr (!IsMix) { histos.fill(HIST("QA/before/KstarRapidity"), lResoKstar.Rapidity()); histos.fill(HIST("QA/before/kstarinvmass"), lResoKstar.M()); - histos.fill(HIST("QA/before/k0sv2vsinvmass"), lResoSecondary.M(), v2K0s); histos.fill(HIST("QA/before/kstarv2vsinvmass"), lResoKstar.M(), v2Kstar); } @@ -957,11 +861,10 @@ struct chk892flow { continue; if constexpr (!IsMix) { - unsigned int typeKstar = bTrack.sign() > 0 ? binType::kKstarP : binType::kKstarN; + unsigned int typeKstar = bTrack.sign() > 0 ? BinType::kKstarP : BinType::kKstarN; histos.fill(HIST("QA/after/KstarRapidity"), lResoKstar.Rapidity()); histos.fill(HIST("QA/after/kstarinvmass"), lResoKstar.M()); - histos.fill(HIST("QA/after/k0sv2vsinvmass"), lResoSecondary.M(), v2K0s); histos.fill(HIST("QA/after/kstarv2vsinvmass"), lResoKstar.M(), v2Kstar); histos.fill(HIST("hInvmass_Kstar"), typeKstar, lCentrality, lResoKstar.Pt(), lResoKstar.M(), v2Kstar); @@ -980,11 +883,10 @@ struct chk892flow { } auto lPhiMinusPsiKstar = RecoDecay::constrainAngle(lResonanceRot.Phi() - lEPDet, 0.0, 1); // constrain angle to range 0, Pi auto v2Kstar = std::cos(static_cast(nmode) * lPhiMinusPsiKstar); - typeKstar = bTrack.sign() > 0 ? binType::kKstarP_RecRot : binType::kKstarN_RecRot; + typeKstar = bTrack.sign() > 0 ? BinType::kKstarP_RecRot : BinType::kKstarN_RecRot; histos.fill(HIST("hInvmass_Kstar"), typeKstar, lCentrality, lResonanceRot.Pt(), lResonanceRot.M(), v2Kstar); } } - } // IsMix } // k0sCand } // bTrack @@ -997,7 +899,7 @@ struct chk892flow { void processDummy(aod::Collisions const&) { } - PROCESS_SWITCH(chk892flow, processDummy, "process Dummy", true); + PROCESS_SWITCH(Chk892Flow, processDummy, "process Dummy", true); // process data void processData(EventCandidates::iterator const& collision, @@ -1014,21 +916,18 @@ struct chk892flow { fillHistograms(collision, tracks, v0s, 2); // second order } - PROCESS_SWITCH(chk892flow, processData, "Process Event for data without Partitioning", false); + PROCESS_SWITCH(Chk892Flow, processData, "Process Event for data without Partitioning", false); // process MC reconstructed level void processMC(EventCandidates::iterator const& collision, MCTrackCandidates const& tracks, MCV0Candidates const& v0s) { - - histos.fill(HIST("QAMC/hEvent"), 1.0); - fillHistograms(collision, tracks, v0s, 2); } - PROCESS_SWITCH(chk892flow, processMC, "Process Event for MC", false); + PROCESS_SWITCH(Chk892Flow, processMC, "Process Event for MC", false); }; WorkflowSpec defineDataProcessing(ConfigContext const& cfgc) { - return WorkflowSpec{adaptAnalysisTask(cfgc)}; + return WorkflowSpec{adaptAnalysisTask(cfgc)}; }