diff --git a/PWGLF/TableProducer/Nuspex/LFTreeCreatorClusterStudies.cxx b/PWGLF/TableProducer/Nuspex/LFTreeCreatorClusterStudies.cxx index 431bde57c5a..729ab2a6981 100644 --- a/PWGLF/TableProducer/Nuspex/LFTreeCreatorClusterStudies.cxx +++ b/PWGLF/TableProducer/Nuspex/LFTreeCreatorClusterStudies.cxx @@ -75,7 +75,7 @@ using CollisionsCustomMc = soa::Join, 1> defaultParams = {{{-1.e32, -1.e32, -1.e32, -1.e32, -1.e32, -1.e32}}}; static const std::vector parNames{"p0", "p1", "p2", "p3", "p4", "resolution"}; } // namespace BetheBloch @@ -145,7 +145,7 @@ enum PartID { all }; -static constexpr std::string_view cNames[] = {"none", "electron", "pion", "kaon", "proton", "deuteron", "He3"}; +static constexpr std::array cNames = {"none", "electron", "pion", "kaon", "proton", "deuteron", "He3"}; struct Candidate { float p = -999.f; // momentum * charge @@ -165,100 +165,96 @@ struct Candidate { struct LfTreeCreatorClusterStudies { - Service m_ccdb; - SliceCache m_cache; - int m_runNumber; - int m_collisionCounter = 0; - float m_d_bz; - uint32_t m_randomSeed = 0.; - - Configurable setting_fillV0{"fillV0", true, "Fill the V0 tree"}; - Configurable setting_fillExtraTable{"fillExtraTable", false, "Fill the extra table"}; - Configurable setting_fillCollTable{"fillCollTable", false, "Fill the collision table"}; - - Configurable setting_materialCorrection{"cfgMaterialCorrection", static_cast(o2::base::Propagator::MatCorrType::USEMatCorrNONE), "Type of material correction"}; - - Configurable setting_zVtxMax{"zVtxMax", 10.f, "Maximum z vertex position"}; - - Configurable setting_downscaleFactor{"downscaleFactor", 1.f, "Downscale factor for the V0 candidates"}; - Configurable setting_applyAdditionalEvSel{"applyAdditionalEvSel", false, "Apply additional event selection"}; - - Configurable track_nClsItsMin{"track_NclsItsMin", 0.f, "Minimum number of ITS clusters for the V0 daughters"}; - Configurable track_nClsTpcMin{"track_NclsTpcMin", 100.f, "Minimum number of TPC clusters for the V0 daughters"}; - Configurable track_nClsTpcMaxShared{"track_NclsTpcMaxShared", 5.f, "Maximum number of shared TPC clusters for the V0 daughters"}; - Configurable track_etaMax{"etaMax", 0.8f, "Maximum eta"}; - Configurable track_tpcChi2Min{"track_tpcChi2Min", 0.5f, "Minimum TPC chi2 per cluster"}; - - // Configurable v0setting_etaMaxV0{"etaMaxV0", 0.8f, "Maximum eta for the V0 daughters"}; - Configurable v0setting_dcaV0daughters{"v0setting_dcaV0daughters", 1.f, "DCA between the V0 daughters"}; - Configurable v0setting_dcaMinV0DaughterToPv{"v0setting_dcaMinV0DaughterToPv", 0.06f, "DCA of the daughters to the primary vertex"}; - Configurable v0setting_radiusV0{"v0setting_radiusV0", 0.5f, "Maximum radius of the V0 accepted"}; - Configurable v0setting_cosPA{"v0setting_cosPA", 0.98f, "Cosine of the pointing angle of the V0"}; - Configurable v0setting_massWindowLambda{"v0setting_massWindowLambda", 0.02f, "Mass window for the Lambda"}; - Configurable v0setting_massWindowK0s{"v0setting_massWindowK0s", 0.02f, "Mass window for the K0s"}; - Configurable v0setting_nsigmatpcPi{"v0setting_nsigmaTPCPi", 2.f, "Number of sigmas for the TPC PID for pions"}; - Configurable v0setting_nsigmatpcPr{"v0setting_nsigmaTPCPr", 2.f, "Number of sigmas for the TPC PID for protons"}; - Configurable lambdasetting_qtAPcut{"lambdasetting_qtAPcut", 0.02f, "Cut on the qt for the Armenteros-Podolanski plot for photon rejection"}; - Configurable lambdasetting_pmin{"lambdasetting_pmin", 0.0f, "Minimum momentum for the V0 daughters"}; - - Configurable cascsetting_dcaMinV0DaughterToPv{"cascsetting_dcaMinV0DaughterToPv", 0.03f, "DCA of one of the daugthers of Lambda to pv"}; - Configurable cascsetting_dcaMinProtonToPv{"cascsetting_dcaMinProtonToPv", 0.03f, "DCA of the proton coming from Lambda to pv"}; - Configurable cascsetting_dcaMinBachelorToPv{"cascsetting_dcaMinBachelorToPv", 0.04f, "DCA of the bachelor to pv"}; - Configurable cascsetting_dcaMinV0ToPv{"cascsetting_dcaMinV0ToPv", 0.04f, "DCA of the V0 to pv"}; - Configurable cascsetting_dcaV0Daughters{"cascsetting_dcaV0daughters", 0.4f, "DCA between the V0 daughters"}; - Configurable cascsetting_cascCosPA{"cascsetting_cascCosPA", 0.99f, "Minimum cCosine of the pointing angle of the cascade"}; - Configurable cascsetting_v0cosPA{"cascsetting_v0cosPA", 0.97f, "Minimum cCosine of the pointing angle of the v0"}; - Configurable cascsetting_dcaMaxBachelorToV0{"cascsetting_dcaMaxBachelorToV0", 0.8f, "DCA of the bachelor to V0"}; - // Configurable cascsetting_dcaMinBachelorToProton{"cascsetting_dcaMinBachelorToProton", 0.015f, "DCA of the bachelor to proton"}; - Configurable cascsetting_radiusV0{"cascsetting_radiusV0", 1.2f, "Minimum radius of the V0 accepted"}; - Configurable cascsetting_radiusCasc{"cascsetting_radiusCasc", 0.5f, "Minimum radius of the cascade accepted"}; - - Configurable cascsetting_massWindowOmega{"cascsetting_massWindowOmega", 0.01f, "Mass window for the Omega"}; - Configurable cascsetting_massWindowXi{"cascsetting_massWindowXi", 0.01f, "Mass window for the Xi"}; - Configurable cascsetting_nsigmatpc{"cascsetting_nsigmaTPC", 3.f, "Number of sigmas for the TPC PID"}; - - Configurable electronsetting_fromPhotonConversion{"electronsetting_fromPhotonConversion", false, "Flag to indicate if the electron is from photon conversion"}; - Configurable electronsetting_conversion_rmin{"electron_conversion_rmin", 1.76f, "Minimum radius for the photon conversion (cm)"}; - Configurable electronsetting_conversion_rmax{"electron_conversion_rmax", 19.77f, "Maximum radius for the photon conversion (cm)"}; - Configurable electronsetting_maxDcaxy{"electronsetting_maxDcaxy", 0.1f, "Maximum value for the DCAxy"}; - Configurable electronsetting_maxDcaz{"electronsetting_maxDcaz", 0.5f, "Maximum value for the DCAz"}; - Configurable electronsetting_minNsigmatpcEl{"electronsetting_minNsigmaTPCEl", -2.5f, "Minimum value for the number of sigmas for the TPC PID for electrons"}; - Configurable electronsetting_maxNsigmatpcEl{"electronsetting_maxNsigmaTPCEl", 3.5f, "Maximum number for the number of sigmas for the TPC PID for electrons"}; - Configurable electronsetting_maxNsigmatpcPi{"electronsetting_maxNsigmaTPCPi", 2.f, "Maximum number for the number of sigmas for pi rejection for the TPC PID for electrons"}; - Configurable electronsetting_maxNsigmatpcKa{"electronsetting_maxNsigmaTPCKa", 2.f, "Maximum number for the number of sigmas for K rejection for the TPC PID for electrons"}; - Configurable electronsetting_maxNsigmatpcPr{"electronsetting_maxNsigmaTPCPr", 2.f, "Maximum number for the number of sigmas for p rejection for the TPC PID for electrons"}; - Configurable electronsetting_maxNsigmatofEl{"electronsetting_maxNsigmaTOFEl", 4.f, "Minimum value for the number of sigmas for the TPC PID for electrons"}; - Configurable electronsetting_minPt{"electronsetting_minPt", 0.f, "Minimum pT accepted for electrons"}; - Configurable electronsetting_dcaV0daughters{"electronsetting_dcaV0daughters", 1.f, "DCA between the V0 daughters"}; - Configurable electronsetting_dcaMinV0DaughterToPv{"electronsetting_dcaMinV0DaughterToPv", 0.06f, "DCA of the daughters to the primary vertex"}; - Configurable electronsetting_radiusV0{"electronsetting_radiusV0", 0.5f, "Maximum radius of the V0 accepted"}; - Configurable electronsetting_cosPA{"electronsetting_cosPA", 0.98f, "Cosine of the pointing angle of the V0"}; - Configurable electronsetting_maxMassPi0{"electronsetting_maxMassPi0", o2::constants::physics::MassPi0, "Maximum mass for the Pi0"}; - Configurable electronsetting_minMassPi0{"electronsetting_minMassPi0", 0.08f, "Minimum mass for the Pi0"}; - Configurable electronsetting_maxPhiv{"electronsetting_maxPhiv", 1.5708f, "Maximum value for the Phiv"}; - Configurable electronsetting_minPhiv{"electronsetting_minPhiv", 0.f, "Minimum value for the Phiv"}; - Configurable electronsetting_maxMassPhoton{"electronsetting_maxMassPhoton", 0.f, "Maximum mass for the Photon"}; - Configurable electronsetting_minMassPhoton{"electronsetting_minMassPhoton", 0.005f, "Minimum mass for the Photon"}; - - Configurable desetting_nClsIts{"desetting_nClsIts", 6, "Minimum number of ITS clusters"}; - Configurable desetting_nsigmatpc{"desetting_nsigmaCutTPC", 2.f, "Number of sigmas for the TPC PID"}; - Configurable desetting_nsigmatof{"desetting_nsigmaCutTOF", 2.f, "Number of sigmas for the TOF PID"}; - Configurable he3setting_nClsIts{"he3setting_nClsIts", 6, "Minimum number of ITS clusters"}; - Configurable he3setting_compensatePIDinTracking{"he3setting_compensatePIDinTracking", true, "Compensate PID in tracking"}; - Configurable he3setting_nsigmatpc{"he3setting_nsigmaCutTPC", 2.f, "Number of sigmas for the TPC PID"}; - Configurable he3setting_tofmasslow{"he3setting_tofmasslow", 1.8f, "Lower limit for the TOF mass"}; - Configurable he3setting_tofmasshigh{"he3setting_tofmasshigh", 4.2f, "Upper limit for the TOF mass"}; + Service mccdb; + SliceCache mcache; + int mrunNumber = 0; + int mcollisionCounter = 0; + float md_bz = 0.f; + uint32_t mrandomSeed = 0.; + + Configurable settingFillExtraTable{"fillExtraTable", false, "Fill the extra table"}; + Configurable settingFillCollTable{"fillCollTable", false, "Fill the collision table"}; + + Configurable settingZvtxMax{"zVtxMax", 10.f, "Maximum z vertex position"}; + + // Configurable settingDownscaleFactor{"downscaleFactor", 1.f, "Downscale factor for the V0 candidates"}; + + Configurable trackNclsItsMin{"trackNclsItsMin", 0.f, "Minimum number of ITS clusters for the V0 daughters"}; + Configurable trackNclsTpcMin{"trackNclsTpcMin", 100.f, "Minimum number of TPC clusters for the V0 daughters"}; + Configurable trackNclsTpcMaxShared{"trackNclsTpcMaxShared", 5.f, "Maximum number of shared TPC clusters for the V0 daughters"}; + Configurable trackEtaMax{"etaMax", 0.8f, "Maximum eta"}; + Configurable trackTpcChi2Min{"trackTpcChi2Min", 0.5f, "Minimum TPC chi2 per cluster"}; + + // Configurable v0settingEtaMaxV0{"etaMaxV0", 0.8f, "Maximum eta for the V0 daughters"}; + Configurable v0settingDcaV0daughters{"v0settingDcaV0daughters", 1.f, "DCA between the V0 daughters"}; + Configurable v0settingDcaMinV0DaughterToPv{"v0settingDcaMinV0DaughterToPv", 0.06f, "DCA of the daughters to the primary vertex"}; + Configurable v0settingRadiusV0{"v0settingRadiusV0", 0.5f, "Maximum radius of the V0 accepted"}; + Configurable v0settingCosPA{"v0settingCosPA", 0.98f, "Cosine of the pointing angle of the V0"}; + Configurable v0settingMassWindowLambda{"v0settingMassWindowLambda", 0.02f, "Mass window for the Lambda"}; + Configurable v0settingMassWindowK0s{"v0settingMassWindowK0s", 0.02f, "Mass window for the K0s"}; + Configurable v0settingNsigmatpcPi{"v0settingNsigmaTPCPi", 2.f, "Number of sigmas for the TPC PID for pions"}; + Configurable v0settingNsigmatpcPr{"v0settingNsigmaTPCPr", 2.f, "Number of sigmas for the TPC PID for protons"}; + Configurable lambdasettingQtAPcut{"lambdasettingQtAPcut", 0.02f, "Cut on the qt for the Armenteros-Podolanski plot for photon rejection"}; + Configurable lambdasettingPmin{"lambdasettingPmin", 0.0f, "Minimum momentum for the V0 daughters"}; + + Configurable cascsettingDcaMinV0DaughterToPv{"cascsettingDcaMinV0DaughterToPv", 0.03f, "DCA of one of the daugthers of Lambda to pv"}; + Configurable cascsettingDcaMinProtonToPv{"cascsettingDcaMinProtonToPv", 0.03f, "DCA of the proton coming from Lambda to pv"}; + Configurable cascsettingDcaMinBachelorToPv{"cascsettingDcaMinBachelorToPv", 0.04f, "DCA of the bachelor to pv"}; + Configurable cascsettingDcaMinV0ToPv{"cascsettingDcaMinV0ToPv", 0.04f, "DCA of the V0 to pv"}; + Configurable cascsettingDcaV0Daughters{"cascsettingDcaV0Daughters", 0.4f, "DCA between the V0 daughters"}; + Configurable cascsettingCascCosPA{"cascsettingCascCosPA", 0.99f, "Minimum cCosine of the pointing angle of the cascade"}; + Configurable cascsettingV0CosPA{"cascsettingV0CosPA", 0.97f, "Minimum cCosine of the pointing angle of the v0"}; + Configurable cascsettingDcaMaxBachelorToV0{"cascsettingDcaMaxBachelorToV0", 0.8f, "DCA of the bachelor to V0"}; + // Configurable cascsettingDcaMinBachelorToProton{"cascsettingDcaMinBachelorToProton", 0.015f, "DCA of the bachelor to proton"}; + Configurable cascsettingRadiusV0{"cascsettingRadiusV0", 1.2f, "Minimum radius of the V0 accepted"}; + Configurable cascsettingRadiusCasc{"cascsettingRadiusCasc", 0.5f, "Minimum radius of the cascade accepted"}; + + Configurable cascsettingMassWindowOmega{"cascsettingMassWindowOmega", 0.01f, "Mass window for the Omega"}; + Configurable cascsettingMassWindowXi{"cascsettingMassWindowXi", 0.01f, "Mass window for the Xi"}; + Configurable cascsettingNsigmatpc{"cascsettingNsigmaTPC", 3.f, "Number of sigmas for the TPC PID"}; + + Configurable electronsettingFromPhotonConversion{"electronsettingFromPhotonConversion", false, "Flag to indicate if the electron is from photon conversion"}; + Configurable electronsettingConversion_rmin{"electronsettingConversion_rmin", 1.76f, "Minimum radius for the photon conversion (cm)"}; + Configurable electronsettingConversion_rmax{"electronsettingConversion_rmax", 19.77f, "Maximum radius for the photon conversion (cm)"}; + Configurable electronsettingMaxDcaxy{"electronsettingMaxDcaxy", 0.1f, "Maximum value for the DCAxy"}; + Configurable electronsettingMaxDcaz{"electronsettingMaxDcaz", 0.5f, "Maximum value for the DCAz"}; + Configurable electronsettingMinNsigmatpcEl{"electronsettingMinNsigmaTPCEl", -2.5f, "Minimum value for the number of sigmas for the TPC PID for electrons"}; + Configurable electronsettingMaxNsigmatpcEl{"electronsettingMaxNsigmaTPCEl", 3.5f, "Maximum number for the number of sigmas for the TPC PID for electrons"}; + Configurable electronsettingMaxNsigmatpcPi{"electronsettingMaxNsigmaTPCPi", 2.f, "Maximum number for the number of sigmas for pi rejection for the TPC PID for electrons"}; + Configurable electronsettingMaxNsigmatpcKa{"electronsettingMaxNsigmaTPCKa", 2.f, "Maximum number for the number of sigmas for K rejection for the TPC PID for electrons"}; + Configurable electronsettingMaxNsigmatpcPr{"electronsettingMaxNsigmaTPCPr", 2.f, "Maximum number for the number of sigmas for p rejection for the TPC PID for electrons"}; + Configurable electronsettingMaxNsigmatofEl{"electronsettingMaxNsigmaTOFEl", 4.f, "Minimum value for the number of sigmas for the TPC PID for electrons"}; + Configurable electronsettingMinPt{"electronsettingMinPt", 0.f, "Minimum pT accepted for electrons"}; + Configurable electronsettingDcaV0daughters{"electronsettingDcaV0daughters", 1.f, "DCA between the V0 daughters"}; + Configurable electronsettingDcaMinV0DaughterToPv{"electronsettingDcaMinV0DaughterToPv", 0.06f, "DCA of the daughters to the primary vertex"}; + Configurable electronsettingRadiusV0{"electronsettingRadiusV0", 0.5f, "Maximum radius of the V0 accepted"}; + Configurable electronsettingCosPA{"electronsettingCosPA", 0.98f, "Cosine of the pointing angle of the V0"}; + Configurable electronsettingMaxMassPi0{"electronsettingMaxMassPi0", o2::constants::physics::MassPi0, "Maximum mass for the Pi0"}; + Configurable electronsettingMinMassPi0{"electronsettingMinMassPi0", 0.08f, "Minimum mass for the Pi0"}; + Configurable electronsettingMaxPhiv{"electronsettingMaxPhiv", 1.5708f, "Maximum value for the Phiv"}; + Configurable electronsettingMinPhiv{"electronsettingMinPhiv", 0.f, "Minimum value for the Phiv"}; + Configurable electronsettingMaxMassPhoton{"electronsettingMaxMassPhoton", 0.f, "Maximum mass for the Photon"}; + Configurable electronsettingMinMassPhoton{"electronsettingMinMassPhoton", 0.005f, "Minimum mass for the Photon"}; + + Configurable desettingNclsIts{"desettingNclsIts", 6, "Minimum number of ITS clusters"}; + Configurable desettingNsigmatpc{"desettingNsigmaCutTPC", 2.f, "Number of sigmas for the TPC PID"}; + Configurable desettingNsigmatof{"desettingNsigmaCutTOF", 2.f, "Number of sigmas for the TOF PID"}; + Configurable he3settingNclsIts{"he3settingNclsIts", 6, "Minimum number of ITS clusters"}; + Configurable he3settingCompensatePIDinTracking{"he3settingCompensatePIDinTracking", true, "Compensate PID in tracking"}; + Configurable he3settingNsigmatpc{"he3settingNsigmaCutTPC", 2.f, "Number of sigmas for the TPC PID"}; + Configurable he3settingTofmasslow{"he3settingTofmasslow", 1.8f, "Lower limit for the TOF mass"}; + Configurable he3settingTofmasshigh{"he3settingTofmasshigh", 4.2f, "Upper limit for the TOF mass"}; // Bethe Bloch parameters - std::array m_BBparamsDe, m_BBparamsHe; - Configurable> setting_BetheBlochParams{"setting_BetheBlochParams", {BetheBloch::defaultParams[0], 2, 6, {"De", "He3"}, BetheBloch::parNames}, "TPC Bethe-Bloch parameterisation for nuclei"}; + std::array mBBparamsDe = {{0.f, 0.f, 0.f, 0.f, 0.f, 0.f}}, mBBparamsHe = {{0.f, 0.f, 0.f, 0.f, 0.f, 0.f}}; + Configurable> settingBetheBlochParams{"settingBetheBlochParams", {BetheBloch::defaultParams[0].data(), 2, 6, {"De", "He3"}, BetheBloch::parNames}, "TPC Bethe-Bloch parameterisation for nuclei"}; - Preslice m_perCollisionV0 = o2::aod::v0::collisionId; - Preslice m_perCollisionCascade = o2::aod::cascade::collisionId; - Preslice m_perCol = aod::track::collisionId; - Preslice m_perColMC = aod::track::collisionId; + Preslice mPerCollisionV0 = o2::aod::v0::collisionId; + Preslice mPerCollisionCascade = o2::aod::cascade::collisionId; + Preslice mPerCol = aod::track::collisionId; + Preslice mPerColMC = aod::track::collisionId; - HistogramRegistry m_hAnalysis{ + HistogramRegistry mHistograms{ "LFTreeCreator", { {"collision_selections", "Collision selection; selection; counts", {HistType::kTH1F, {{Selections::kAll, -0.5, static_cast(Selections::kAll) - 0.5}}}}, @@ -293,28 +289,28 @@ struct LfTreeCreatorClusterStudies { OutputObjHandlingPolicy::AnalysisObject, false}; - Produces m_ClusterStudiesTable; - Produces m_ClusterStudiesTableExtra; - Produces m_ClusterStudiesTableCollision; - Produces m_ClusterStudiesTableMc; + Produces mClusterStudiesTable; + Produces mClusterStudiesTableExtra; + Produces mClusterStudiesTableCollision; + Produces mClusterStudiesTableMc; - o2::aod::ITSResponse m_responseITS; + o2::aod::ITSResponse mresponseITS; template bool collisionSelection(const Tcollision& collision) { - m_hAnalysis.fill(HIST("collision_selections"), Selections::kNoCut); + mHistograms.fill(HIST("collision_selections"), Selections::kNoCut); if (!collision.sel8()) { return false; } - m_hAnalysis.fill(HIST("collision_selections"), Selections::kSel8); + mHistograms.fill(HIST("collision_selections"), Selections::kSel8); // if (!collision.selection_bit(aod::evsel::kNoSameBunchPileup)) { // return false; // } - if (std::abs(collision.posZ()) > setting_zVtxMax) { + if (std::abs(collision.posZ()) > settingZvtxMax) { return false; } - m_hAnalysis.fill(HIST("collision_selections"), Selections::kVtxZ); + mHistograms.fill(HIST("collision_selections"), Selections::kVtxZ); return true; } @@ -326,77 +322,94 @@ struct LfTreeCreatorClusterStudies { template bool qualityTrackSelection(const Track& track) { - if (std::abs(track.eta()) > track_etaMax || - track.itsNCls() < track_nClsItsMin || - track.tpcNClsFound() < track_nClsTpcMin || - track.tpcNClsCrossedRows() < track_nClsTpcMin || - track.tpcNClsCrossedRows() < 0.8 * track.tpcNClsFindable() || - track.tpcNClsShared() > track_nClsTpcMaxShared || - track.tpcChi2NCl() < track_tpcChi2Min || - track.tpcChi2NCl() > 4.0f) { - return false; - } - return true; + return (std::abs(track.eta()) < trackEtaMax && + track.itsNCls() >= trackNclsItsMin && + track.tpcNClsFound() >= trackNclsTpcMin && + track.tpcNClsCrossedRows() >= trackNclsTpcMin && + track.tpcNClsShared() <= trackNclsTpcMaxShared && + track.tpcChi2NCl() >= trackTpcChi2Min && + track.tpcChi2NCl() <= 4.0f); } bool qualitySelectionV0(aod::V0Datas::iterator const& v0) { - if (std::abs(v0.dcapostopv()) < v0setting_dcaMinV0DaughterToPv) + if (std::abs(v0.dcapostopv()) < v0settingDcaMinV0DaughterToPv) { return false; - if (std::abs(v0.dcanegtopv()) < v0setting_dcaMinV0DaughterToPv) + } + if (std::abs(v0.dcanegtopv()) < v0settingDcaMinV0DaughterToPv) { return false; - if (std::abs(v0.dcaV0daughters()) > v0setting_dcaV0daughters) + } + if (std::abs(v0.dcaV0daughters()) > v0settingDcaV0daughters) { return false; - if (v0.v0radius() < v0setting_radiusV0) + } + if (v0.v0radius() < v0settingRadiusV0) { return false; - if (std::abs(v0.v0cosPA()) < v0setting_cosPA) + } + if (std::abs(v0.v0cosPA()) < v0settingCosPA) { return false; + } return true; } bool qualitySelectionPhotons(aod::V0Datas::iterator const& v0) { - if (std::abs(v0.dcapostopv()) < electronsetting_dcaMinV0DaughterToPv) + if (std::abs(v0.dcapostopv()) < electronsettingDcaMinV0DaughterToPv) { return false; - if (std::abs(v0.dcanegtopv()) < electronsetting_dcaMinV0DaughterToPv) + } + if (std::abs(v0.dcanegtopv()) < electronsettingDcaMinV0DaughterToPv) { return false; - if (std::abs(v0.dcaV0daughters()) > electronsetting_dcaV0daughters) + } + if (std::abs(v0.dcaV0daughters()) > electronsettingDcaV0daughters) { return false; - if (v0.v0radius() < electronsetting_radiusV0) + } + if (v0.v0radius() < electronsettingRadiusV0) { return false; - if (std::abs(v0.v0cosPA()) < electronsetting_cosPA) + } + if (std::abs(v0.v0cosPA()) < electronsettingCosPA) { return false; - if (v0.qtarm() > lambdasetting_qtAPcut) + } + if (v0.qtarm() > lambdasettingQtAPcut) { return false; + } return true; } bool qualitySelectionCascade(aod::CascDatas::iterator const& cascade, const std::array& pv) { - if (std::abs(cascade.dcapostopv()) < cascsetting_dcaMinV0DaughterToPv) + if (std::abs(cascade.dcapostopv()) < cascsettingDcaMinV0DaughterToPv) { return false; - if (std::abs(cascade.dcanegtopv()) < cascsetting_dcaMinV0DaughterToPv) + } + if (std::abs(cascade.dcanegtopv()) < cascsettingDcaMinV0DaughterToPv) { return false; - if (std::abs(cascade.dcabachtopv()) < cascsetting_dcaMinBachelorToPv) + } + if (std::abs(cascade.dcabachtopv()) < cascsettingDcaMinBachelorToPv) { return false; - if (std::abs(cascade.dcav0topv(pv[0], pv[1], pv[2])) < cascsetting_dcaMinV0ToPv) + } + if (std::abs(cascade.dcav0topv(pv[0], pv[1], pv[2])) < cascsettingDcaMinV0ToPv) { return false; - if (std::abs(cascade.dcaV0daughters()) > cascsetting_dcaV0Daughters) + } + if (std::abs(cascade.dcaV0daughters()) > cascsettingDcaV0Daughters) { return false; - if (std::abs(cascade.casccosPA(pv[0], pv[1], pv[2])) < cascsetting_cascCosPA) + } + if (std::abs(cascade.casccosPA(pv[0], pv[1], pv[2])) < cascsettingCascCosPA) { return false; - if (std::abs(cascade.v0cosPA(pv[0], pv[1], pv[2])) < cascsetting_v0cosPA) + } + if (std::abs(cascade.v0cosPA(pv[0], pv[1], pv[2])) < cascsettingV0CosPA) { return false; - if (std::abs(cascade.v0radius()) < cascsetting_radiusV0) + } + if (std::abs(cascade.v0radius()) < cascsettingRadiusV0) { return false; - if (std::abs(cascade.cascradius()) < cascsetting_radiusCasc) + } + if (std::abs(cascade.cascradius()) < cascsettingRadiusCasc) { return false; + } - m_hAnalysis.fill(HIST("casc_dca_daughter_pairs"), cascade.dcacascdaughters()); - if (std::abs(cascade.dcacascdaughters()) > cascsetting_dcaMaxBachelorToV0) + mHistograms.fill(HIST("casc_dca_daughter_pairs"), cascade.dcacascdaughters()); + if (std::abs(cascade.dcacascdaughters()) > cascsettingDcaMaxBachelorToV0) { return false; + } return true; } @@ -404,13 +417,13 @@ struct LfTreeCreatorClusterStudies { uint8_t selectV0MotherHypothesis(aod::V0Datas::iterator const& v0) { uint8_t v0Bitmask(0); - if (std::abs(v0.mK0Short() - o2::constants::physics::MassK0Short) < v0setting_massWindowK0s) { + if (std::abs(v0.mK0Short() - o2::constants::physics::MassK0Short) < v0settingMassWindowK0s) { SETBIT(v0Bitmask, K0s); } - if ((std::abs(v0.mLambda() - o2::constants::physics::MassLambda0) < v0setting_massWindowLambda) && (v0.alpha() > 0)) { + if ((std::abs(v0.mLambda() - o2::constants::physics::MassLambda0) < v0settingMassWindowLambda) && (v0.alpha() > 0)) { SETBIT(v0Bitmask, Lambda); } - if ((std::abs(v0.mAntiLambda() - o2::constants::physics::MassLambda0) < v0setting_massWindowLambda) && (v0.alpha() < 0)) { + if ((std::abs(v0.mAntiLambda() - o2::constants::physics::MassLambda0) < v0settingMassWindowLambda) && (v0.alpha() < 0)) { SETBIT(v0Bitmask, AntiLambda); } return v0Bitmask; @@ -421,30 +434,36 @@ struct LfTreeCreatorClusterStudies { aod::V0Datas::iterator const& v0, const Track& posTrack, const Track& negTrack, uint8_t v0Bitmask) { if (TESTBIT(v0Bitmask, Lambda)) { - if (v0.qtarm() < lambdasetting_qtAPcut) + if (v0.qtarm() < lambdasettingQtAPcut) { return false; - if (std::abs(posTrack.tpcNSigmaPr()) > v0setting_nsigmatpcPr || std::abs(negTrack.tpcNSigmaPi()) > v0setting_nsigmatpcPi) + } + if (std::abs(posTrack.tpcNSigmaPr()) > v0settingNsigmatpcPr || std::abs(negTrack.tpcNSigmaPi()) > v0settingNsigmatpcPi) { return false; - if (v0.p() < lambdasetting_pmin) + } + if (v0.p() < lambdasettingPmin) { return false; + } candidatePos.partID = PartID::pr; candidateNeg.partID = PartID::pi; candidatePos.nsigmaTPC = posTrack.tpcNSigmaPr(); candidateNeg.nsigmaTPC = negTrack.tpcNSigmaPi(); - m_hAnalysis.fill(HIST("v0_type"), V0Type::Lambda); + mHistograms.fill(HIST("v0_type"), V0Type::Lambda); } else if (TESTBIT(v0Bitmask, AntiLambda)) { - if (v0.qtarm() < lambdasetting_qtAPcut) + if (v0.qtarm() < lambdasettingQtAPcut) { return false; - if (std::abs(posTrack.tpcNSigmaPi()) > v0setting_nsigmatpcPi || std::abs(negTrack.tpcNSigmaPr()) > v0setting_nsigmatpcPr) + } + if (std::abs(posTrack.tpcNSigmaPi()) > v0settingNsigmatpcPi || std::abs(negTrack.tpcNSigmaPr()) > v0settingNsigmatpcPr) { return false; - if (v0.p() < lambdasetting_pmin) + } + if (v0.p() < lambdasettingPmin) { return false; + } candidatePos.partID = PartID::pi; candidateNeg.partID = PartID::pr; candidatePos.nsigmaTPC = posTrack.tpcNSigmaPi(); candidateNeg.nsigmaTPC = negTrack.tpcNSigmaPr(); - m_hAnalysis.fill(HIST("v0_type"), V0Type::AntiLambda); + mHistograms.fill(HIST("v0_type"), V0Type::AntiLambda); } else { return false; @@ -462,19 +481,19 @@ struct LfTreeCreatorClusterStudies { float massV0{0.f}; if (TESTBIT(v0Bitmask, Lambda)) { massV0 = v0.mLambda(); - m_hAnalysis.fill(HIST("massLambda"), v0.pt(), v0.mLambda()); + mHistograms.fill(HIST("massLambda"), v0.pt(), v0.mLambda()); fillHistogramsParticle(trackPos); fillHistogramsParticle(trackNeg); } else if (TESTBIT(v0Bitmask, AntiLambda)) { massV0 = v0.mAntiLambda(); - m_hAnalysis.fill(HIST("massLambda"), v0.pt() * -1.f, v0.mAntiLambda()); + mHistograms.fill(HIST("massLambda"), v0.pt() * -1.f, v0.mAntiLambda()); fillHistogramsParticle(trackPos); fillHistogramsParticle(trackNeg); } - m_hAnalysis.fill(HIST("radiusV0"), v0.v0radius()); - m_hAnalysis.fill(HIST("armenteros_plot_lambda"), v0.alpha(), v0.qtarm()); - m_hAnalysis.fill(HIST("armenteros_plot"), v0.alpha(), v0.qtarm()); + mHistograms.fill(HIST("radiusV0"), v0.v0radius()); + mHistograms.fill(HIST("armenteros_plot_lambda"), v0.alpha(), v0.qtarm()); + mHistograms.fill(HIST("armenteros_plot"), v0.alpha(), v0.qtarm()); return massV0; } @@ -538,38 +557,37 @@ struct LfTreeCreatorClusterStudies { float nsigmaIts = -999.f; switch (partID) { case PartID::el: - nsigmaIts = m_responseITS.nSigmaITS(track); + nsigmaIts = mresponseITS.nSigmaITS(track); break; case PartID::pi: - nsigmaIts = m_responseITS.nSigmaITS(track); + nsigmaIts = mresponseITS.nSigmaITS(track); break; case PartID::ka: - nsigmaIts = m_responseITS.nSigmaITS(track); + nsigmaIts = mresponseITS.nSigmaITS(track); break; case PartID::pr: - nsigmaIts = m_responseITS.nSigmaITS(track); + nsigmaIts = mresponseITS.nSigmaITS(track); break; case PartID::de: - nsigmaIts = m_responseITS.nSigmaITS(track); + nsigmaIts = mresponseITS.nSigmaITS(track); break; case PartID::he: - nsigmaIts = m_responseITS.nSigmaITS(track); + nsigmaIts = mresponseITS.nSigmaITS(track); break; default: nsigmaIts = -999.f; break; } - float correctedTpcInnerParam = track.tpcInnerParam(); bool heliumPID = track.pidForTracking() == o2::track::PID::Helium3 || track.pidForTracking() == o2::track::PID::Alpha; - correctedTpcInnerParam = (partID == PartID::he && he3setting_compensatePIDinTracking && heliumPID) ? track.tpcInnerParam() / 2.f : track.tpcInnerParam(); + float correctedTpcInnerParam = (partID == PartID::he && he3settingCompensatePIDinTracking && heliumPID) ? track.tpcInnerParam() / 2.f : track.tpcInnerParam(); - m_hAnalysis.fill(HIST(cNames[partID]) + HIST("/nSigmaTPC"), track.p() * track.sign(), nsigmaTpc); - m_hAnalysis.fill(HIST(cNames[partID]) + HIST("/nSigmaITS"), track.p() * track.sign(), nsigmaIts); - m_hAnalysis.fill(HIST(cNames[partID]) + HIST("/nSigmaTOF"), track.p() * track.sign(), nsigmaTof); + mHistograms.fill(HIST(cNames[partID]) + HIST("/nSigmaTPC"), track.p() * track.sign(), nsigmaTpc); + mHistograms.fill(HIST(cNames[partID]) + HIST("/nSigmaITS"), track.p() * track.sign(), nsigmaIts); + mHistograms.fill(HIST(cNames[partID]) + HIST("/nSigmaTOF"), track.p() * track.sign(), nsigmaTof); if (partID == static_cast(PartID::de) || partID == static_cast(PartID::he)) - m_hAnalysis.fill(HIST(cNames[partID]) + HIST("/TOFmass"), track.p() * track.sign(), massTof); - m_hAnalysis.fill(HIST(cNames[partID]) + HIST("/pmatching"), correctedTpcInnerParam * track.sign(), (correctedTpcInnerParam - track.p()) / correctedTpcInnerParam); + mHistograms.fill(HIST(cNames[partID]) + HIST("/TOFmass"), track.p() * track.sign(), massTof); + mHistograms.fill(HIST(cNames[partID]) + HIST("/pmatching"), correctedTpcInnerParam * track.sign(), (correctedTpcInnerParam - track.p()) / correctedTpcInnerParam); } template @@ -590,9 +608,9 @@ struct LfTreeCreatorClusterStudies { } if (motherPdgCode == PDG_t::kLambda0) { - m_hAnalysis.fill(HIST("massLambdaMc"), v0.pt(), v0.mLambda()); + mHistograms.fill(HIST("massLambdaMc"), v0.pt(), v0.mLambda()); } else if (motherPdgCode == PDG_t::kLambda0Bar) { - m_hAnalysis.fill(HIST("massLambdaMc"), v0.pt() * -1.f, v0.mAntiLambda()); + mHistograms.fill(HIST("massLambdaMc"), v0.pt() * -1.f, v0.mAntiLambda()); } } @@ -621,31 +639,31 @@ struct LfTreeCreatorClusterStudies { } if (motherPdgCode == PDG_t::kOmegaMinus) { - m_hAnalysis.fill(HIST("massOmegaMc"), cascade.pt(), cascade.mOmega()); + mHistograms.fill(HIST("massOmegaMc"), cascade.pt(), cascade.mOmega()); } else if (motherPdgCode == -PDG_t::kOmegaMinus) { - m_hAnalysis.fill(HIST("massOmegaMc"), cascade.pt() * -1.f, cascade.mOmega()); + mHistograms.fill(HIST("massOmegaMc"), cascade.pt() * -1.f, cascade.mOmega()); } } template void fillTable(const Candidate& candidate) { - m_ClusterStudiesTable( + mClusterStudiesTable( candidate.p, candidate.eta, candidate.phi, candidate.itsClusterSize, static_cast(candidate.partID)); - if (setting_fillExtraTable) { - m_ClusterStudiesTableExtra( + if (settingFillExtraTable) { + mClusterStudiesTableExtra( candidate.pTPC, candidate.pidInTrk, candidate.nsigmaTPC, candidate.nsigmaTOF, candidate.tofMass, candidate.cosPAMother, candidate.massMother); } - if (setting_fillCollTable) { - m_ClusterStudiesTableCollision( - m_runNumber); + if (settingFillCollTable) { + mClusterStudiesTableCollision( + mrunNumber); } if constexpr (isMC) { - m_ClusterStudiesTableMc( + mClusterStudiesTableMc( candidate.pdgCode); } } @@ -663,9 +681,9 @@ struct LfTreeCreatorClusterStudies { float computeNSigmaTPCHe3(const Track& candidate) { bool heliumPID = candidate.pidForTracking() == o2::track::PID::Helium3 || candidate.pidForTracking() == o2::track::PID::Alpha; - float correctedTPCinnerParam = (heliumPID && he3setting_compensatePIDinTracking) ? candidate.tpcInnerParam() / 2.f : candidate.tpcInnerParam(); - float expTPCSignal = o2::common::BetheBlochAleph(static_cast(correctedTPCinnerParam * 2.f / constants::physics::MassHelium3), m_BBparamsHe[0], m_BBparamsHe[1], m_BBparamsHe[2], m_BBparamsHe[3], m_BBparamsHe[4]); - double resoTPC{expTPCSignal * m_BBparamsHe[5]}; + float correctedTPCinnerParam = (heliumPID && he3settingCompensatePIDinTracking) ? candidate.tpcInnerParam() / 2.f : candidate.tpcInnerParam(); + float expTPCSignal = o2::common::BetheBlochAleph(static_cast(correctedTPCinnerParam * 2.f / constants::physics::MassHelium3), mBBparamsHe[0], mBBparamsHe[1], mBBparamsHe[2], mBBparamsHe[3], mBBparamsHe[4]); + double resoTPC{expTPCSignal * mBBparamsHe[5]}; return static_cast((candidate.tpcSignal() - expTPCSignal) / resoTPC); } @@ -674,7 +692,7 @@ struct LfTreeCreatorClusterStudies { { float beta = o2::pid::tof::Beta::GetBeta(candidate); bool heliumPID = candidate.pidForTracking() == o2::track::PID::Helium3 || candidate.pidForTracking() == o2::track::PID::Alpha; - float correctedTPCinnerParamHe3 = (heliumPID && he3setting_compensatePIDinTracking) ? candidate.tpcInnerParam() / 2.f : candidate.tpcInnerParam(); + float correctedTPCinnerParamHe3 = (heliumPID && he3settingCompensatePIDinTracking) ? candidate.tpcInnerParam() / 2.f : candidate.tpcInnerParam(); return correctedTPCinnerParamHe3 * 2.f * std::sqrt(1.f / (beta * beta) - 1.f); } @@ -683,11 +701,11 @@ struct LfTreeCreatorClusterStudies { template bool electronPrimarySelection(const Track& track) { - m_hAnalysis.fill(HIST("electron/DCAxyBeforeSelection"), track.dcaXY()); - m_hAnalysis.fill(HIST("electron/DCAzBeforeSelection"), track.dcaZ()); + mHistograms.fill(HIST("electron/DCAxyBeforeSelection"), track.dcaXY()); + mHistograms.fill(HIST("electron/DCAzBeforeSelection"), track.dcaZ()); - if (track.dcaXY() > electronsetting_maxDcaxy || - track.dcaZ() > electronsetting_maxDcaz) { + if (track.dcaXY() > electronsettingMaxDcaxy || + track.dcaZ() > electronsettingMaxDcaz) { return false; } return true; @@ -696,16 +714,18 @@ struct LfTreeCreatorClusterStudies { template bool electronPidSelection(const Track& track) { - if (track.tpcNSigmaEl() < electronsetting_minNsigmatpcEl || - electronsetting_maxNsigmatpcEl < track.tpcNSigmaEl() || - std::abs(track.tpcNSigmaPi()) < electronsetting_maxNsigmatpcPi || - std::abs(track.tpcNSigmaKa()) < electronsetting_maxNsigmatpcKa || - std::abs(track.tpcNSigmaPr()) < electronsetting_maxNsigmatpcPr) + if (track.tpcNSigmaEl() < electronsettingMinNsigmatpcEl || + electronsettingMaxNsigmatpcEl < track.tpcNSigmaEl() || + std::abs(track.tpcNSigmaPi()) < electronsettingMaxNsigmatpcPi || + std::abs(track.tpcNSigmaKa()) < electronsettingMaxNsigmatpcKa || + std::abs(track.tpcNSigmaPr()) < electronsettingMaxNsigmatpcPr) { return false; + } - if (electronsetting_maxNsigmatofEl > 1e-7 && - std::abs(track.tofNSigmaEl()) < electronsetting_maxNsigmatofEl) + if (electronsettingMaxNsigmatofEl > 1e-7 && + std::abs(track.tofNSigmaEl()) < electronsettingMaxNsigmatofEl) { return false; + } return true; } @@ -715,7 +735,7 @@ struct LfTreeCreatorClusterStudies { template void initCCDB(Bc const& bc) { - if (m_runNumber == bc.runNumber()) { + if (mrunNumber == bc.runNumber()) { return; } @@ -723,113 +743,117 @@ struct LfTreeCreatorClusterStudies { o2::parameters::GRPMagField* grpmag = 0x0; auto grpmagPath{"GLO/Config/GRPMagField"}; - grpmag = m_ccdb->getForTimeStamp("GLO/Config/GRPMagField", timestamp); + grpmag = mccdb->getForTimeStamp("GLO/Config/GRPMagField", timestamp); if (!grpmag) { LOG(fatal) << "Got nullptr from CCDB for path " << grpmagPath << " of object GRPMagField for timestamp " << timestamp; } o2::base::Propagator::initFieldFromGRP(grpmag); // Fetch magnetic field from ccdb for current collision - m_d_bz = o2::base::Propagator::Instance()->getNominalBz(); - LOG(info) << "Retrieved GRP for timestamp " << timestamp << " with magnetic field of " << m_d_bz << " kG"; - m_runNumber = bc.runNumber(); + md_bz = o2::base::Propagator::Instance()->getNominalBz(); + LOG(info) << "Retrieved GRP for timestamp " << timestamp << " with magnetic field of " << md_bz << " kG"; + mrunNumber = bc.runNumber(); // o2::base::Propagator::Instance()->setMatLUT(lut); } void init(o2::framework::InitContext&) { - m_runNumber = 0; - m_d_bz = 0; + mrunNumber = 0; + md_bz = 0; - m_ccdb->setURL("http://alice-ccdb.cern.ch"); - m_ccdb->setCaching(true); - m_ccdb->setFatalWhenNull(false); + mccdb->setURL("http://alice-ccdb.cern.ch"); + mccdb->setCaching(true); + mccdb->setFatalWhenNull(false); // lut = o2::base::MatLayerCylSet::rectifyPtrFromFile(ccdb->get("GLO/Param/MatLUT")); for (int ipartid = 0; ipartid < static_cast(PartID::all); ipartid++) { - if (ipartid == 0) + if (ipartid == 0) { continue; + } - m_hAnalysis.add(fmt::format("{}/nSigmaITS", cNames[ipartid]).c_str(), (fmt::format("nSigma ITS {};", cNames[ipartid]) + std::string("signed #it{p} (GeV/#it{c}); n#sigma_{ITS}")).c_str(), HistType::kTH2F, {{100, -5.0f, 5.0f}, {100, -5.0f, 5.0f}}); - m_hAnalysis.add(fmt::format("{}/nSigmaTPC", cNames[ipartid]).c_str(), (fmt::format("nSigma TPC {};", cNames[ipartid]) + std::string("signed #it{p} (GeV/#it{c}); n#sigma_{TPC}")).c_str(), HistType::kTH2F, {{100, -5.0f, 5.0f}, {60, -3.0f, 3.0f}}); - m_hAnalysis.add(fmt::format("{}/nSigmaTOF", cNames[ipartid]).c_str(), (fmt::format("nSigma TOF {};", cNames[ipartid]) + std::string("signed #it{p} (GeV/#it{c}); n#sigma_{TOF}")).c_str(), HistType::kTH2F, {{100, -5.0f, 5.0f}, {60, -3.0f, 3.0f}}); + mHistograms.add(fmt::format("{}/nSigmaITS", cNames[ipartid]).c_str(), (fmt::format("nSigma ITS {};", cNames[ipartid]) + std::string("signed #it{p} (GeV/#it{c}); n#sigma_{ITS}")).c_str(), HistType::kTH2F, {{100, -5.0f, 5.0f}, {100, -5.0f, 5.0f}}); + mHistograms.add(fmt::format("{}/nSigmaTPC", cNames[ipartid]).c_str(), (fmt::format("nSigma TPC {};", cNames[ipartid]) + std::string("signed #it{p} (GeV/#it{c}); n#sigma_{TPC}")).c_str(), HistType::kTH2F, {{100, -5.0f, 5.0f}, {60, -3.0f, 3.0f}}); + mHistograms.add(fmt::format("{}/nSigmaTOF", cNames[ipartid]).c_str(), (fmt::format("nSigma TOF {};", cNames[ipartid]) + std::string("signed #it{p} (GeV/#it{c}); n#sigma_{TOF}")).c_str(), HistType::kTH2F, {{100, -5.0f, 5.0f}, {60, -3.0f, 3.0f}}); if (ipartid == static_cast(PartID::de) || ipartid == static_cast(PartID::he)) { - m_hAnalysis.add(fmt::format("{}/TOFmass", cNames[ipartid]).c_str(), (fmt::format("TOF mass {};", cNames[ipartid]) + std::string("signed #it{p} (GeV/#it{c}); #it{m}_{TOF} (GeV/#it{c}^{2})")).c_str(), HistType::kTH2F, {{100, -5.0f, 5.0f}, {100, 1.0f, 5.0f}}); - m_hAnalysis.add(fmt::format("{}/trackSelections", cNames[ipartid]).c_str(), (fmt::format("track selections {};", cNames[ipartid]) + std::string("Selections; Counts")).c_str(), HistType::kTH1F, {{NucleiSelections::kNucleiAll, -0.5, static_cast(NucleiSelections::kNucleiAll) - 0.5}}); + mHistograms.add(fmt::format("{}/TOFmass", cNames[ipartid]).c_str(), (fmt::format("TOF mass {};", cNames[ipartid]) + std::string("signed #it{p} (GeV/#it{c}); #it{m}_{TOF} (GeV/#it{c}^{2})")).c_str(), HistType::kTH2F, {{100, -5.0f, 5.0f}, {100, 1.0f, 5.0f}}); + mHistograms.add(fmt::format("{}/trackSelections", cNames[ipartid]).c_str(), (fmt::format("track selections {};", cNames[ipartid]) + std::string("Selections; Counts")).c_str(), HistType::kTH1F, {{NucleiSelections::kNucleiAll, -0.5, static_cast(NucleiSelections::kNucleiAll) - 0.5}}); } - m_hAnalysis.add(fmt::format("{}/pmatching", cNames[ipartid]).c_str(), (fmt::format("p matching {};", cNames[ipartid]) + std::string("signed #it{p}_{TPC} (GeV/#it{c}); #frac{#it{p}_{TPC} - #it{p}}{#it{p}_{TPC}}")).c_str(), HistType::kTH2F, {{100, -5.0f, 5.0f}, {100, -0.5f, 0.5f}}); + mHistograms.add(fmt::format("{}/pmatching", cNames[ipartid]).c_str(), (fmt::format("p matching {};", cNames[ipartid]) + std::string("signed #it{p}_{TPC} (GeV/#it{c}); #frac{#it{p}_{TPC} - #it{p}}{#it{p}_{TPC}}")).c_str(), HistType::kTH2F, {{100, -5.0f, 5.0f}, {100, -0.5f, 0.5f}}); } std::vector trackSelectionLabels = {"All", "n clusters ITS", "TPC", "TOF"}; for (int i = 0; i < NucleiSelections::kNucleiAll; i++) { - m_hAnalysis.get(HIST(cNames[static_cast(PartID::de)]) + HIST("/trackSelections"))->GetXaxis()->SetBinLabel(i + 1, trackSelectionLabels[i].c_str()); - m_hAnalysis.get(HIST(cNames[static_cast(PartID::he)]) + HIST("/trackSelections"))->GetXaxis()->SetBinLabel(i + 1, trackSelectionLabels[i].c_str()); + mHistograms.get(HIST(cNames[static_cast(PartID::de)]) + HIST("/trackSelections"))->GetXaxis()->SetBinLabel(i + 1, trackSelectionLabels[i].c_str()); + mHistograms.get(HIST(cNames[static_cast(PartID::he)]) + HIST("/trackSelections"))->GetXaxis()->SetBinLabel(i + 1, trackSelectionLabels[i].c_str()); } LOG(info) << "Bethe-Bloch parameters for He3:"; for (int i = 0; i < 5; i++) { - m_BBparamsHe[i] = setting_BetheBlochParams->get("He3", Form("p%i", i)); - LOG(info) << "p" << i << ": " << m_BBparamsHe[i]; + mBBparamsHe[i] = settingBetheBlochParams->get("He3", Form("p%i", i)); + LOG(info) << "p" << i << ": " << mBBparamsHe[i]; } - m_BBparamsHe[5] = setting_BetheBlochParams->get("He3", "resolution"); - LOG(info) << "resolution: " << m_BBparamsHe[5]; + mBBparamsHe[5] = settingBetheBlochParams->get("He3", "resolution"); + LOG(info) << "resolution: " << mBBparamsHe[5]; LOG(info) << "Bethe-Bloch parameters for De:"; for (int i = 0; i < 5; i++) { - m_BBparamsDe[i] = setting_BetheBlochParams->get("De", Form("p%i", i)); - LOG(info) << "p" << i << ": " << m_BBparamsDe[i]; + mBBparamsDe[i] = settingBetheBlochParams->get("De", Form("p%i", i)); + LOG(info) << "p" << i << ": " << mBBparamsDe[i]; } - m_BBparamsDe[5] = setting_BetheBlochParams->get("De", "resolution"); - LOG(info) << "resolution: " << m_BBparamsDe[5]; + mBBparamsDe[5] = settingBetheBlochParams->get("De", "resolution"); + LOG(info) << "resolution: " << mBBparamsDe[5]; - std::vector collision_selection_labels = {"All", "sel8", "z_{VTX} < 10 cm"}; + std::vector collisionSelectionLabels = {"All", "sel8", "z_{VTX} < 10 cm"}; for (int i = 0; i < Selections::kAll; i++) - m_hAnalysis.get(HIST("collision_selections"))->GetXaxis()->SetBinLabel(i + 1, collision_selection_labels[i].c_str()); + mHistograms.get(HIST("collision_selections"))->GetXaxis()->SetBinLabel(i + 1, collisionSelectionLabels[i].c_str()); - std::vector V0_selection_labels = {"All", "daughter track quality", "V0 topology", "V0 mass selection"}; + std::vector V0selectionLabels = {"All", "daughter track quality", "V0 topology", "V0 mass selection"}; for (int i = 0; i < V0Selections::kV0All; i++) - m_hAnalysis.get(HIST("v0_selections"))->GetXaxis()->SetBinLabel(i + 1, V0_selection_labels[i].c_str()); + mHistograms.get(HIST("v0_selections"))->GetXaxis()->SetBinLabel(i + 1, V0selectionLabels[i].c_str()); - std::vector Casc_selection_labels = {"All", "Topology", "Veto Xi", "Accepted Omega", "n#sigma_{TPC} K"}; + std::vector CascSelectionLabels = {"All", "Topology", "Veto Xi", "Accepted Omega", "n#sigma_{TPC} K"}; for (int i = 0; i < CascSelections::kCascAll; i++) - m_hAnalysis.get(HIST("casc_selections"))->GetXaxis()->SetBinLabel(i + 1, Casc_selection_labels[i].c_str()); + mHistograms.get(HIST("casc_selections"))->GetXaxis()->SetBinLabel(i + 1, CascSelectionLabels[i].c_str()); - std::vector E_selections_labels = {"All", "Track quality", "Primary", "Pid", "#pi^{0}"}; + std::vector ESelectionLabels = {"All", "Track quality", "Primary", "Pid", "#pi^{0}"}; for (int i = 0; i < ESelections::kEAll; i++) - m_hAnalysis.get(HIST("e_selections"))->GetXaxis()->SetBinLabel(i + 1, E_selections_labels[i].c_str()); + mHistograms.get(HIST("e_selections"))->GetXaxis()->SetBinLabel(i + 1, ESelectionLabels[i].c_str()); - std::vector V0Type_labels = {"K0s", "#Lambda", "#bar{#Lambda}", "Photon"}; + std::vector V0TypeLabels = {"K0s", "#Lambda", "#bar{#Lambda}", "Photon"}; for (int i = 0; i < V0Type::V0TypeAll; i++) - m_hAnalysis.get(HIST("v0_type"))->GetXaxis()->SetBinLabel(i + 1, V0Type_labels[i].c_str()); + mHistograms.get(HIST("v0_type"))->GetXaxis()->SetBinLabel(i + 1, V0TypeLabels[i].c_str()); } template void fillV0Cand(const std::array& /*pv*/, const aod::V0Datas::iterator& v0, const Tracks&) { - m_hAnalysis.fill(HIST("v0_selections"), V0Selections::kV0NoCut); + mHistograms.fill(HIST("v0_selections"), V0Selections::kV0NoCut); const auto& posTrack = v0.template posTrack_as(); const auto& negTrack = v0.template negTrack_as(); - if (!qualityTrackSelection(posTrack) || !qualityTrackSelection(negTrack)) + if (!qualityTrackSelection(posTrack) || !qualityTrackSelection(negTrack)) { return; - m_hAnalysis.fill(HIST("v0_selections"), V0Selections::kV0DaughterQuality); + } + mHistograms.fill(HIST("v0_selections"), V0Selections::kV0DaughterQuality); - if (!qualitySelectionV0(v0)) + if (!qualitySelectionV0(v0)) { return; - m_hAnalysis.fill(HIST("v0_selections"), V0Selections::kV0Topology); + } + mHistograms.fill(HIST("v0_selections"), V0Selections::kV0Topology); std::array momPos{v0.pxpos(), v0.pypos(), v0.pzpos()}, momNeg{v0.pxneg(), v0.pyneg(), v0.pzneg()}; - m_hAnalysis.fill(HIST("armenteros_plot_before_selections"), v0.alpha(), v0.qtarm()); - m_hAnalysis.fill(HIST("Lambda_vs_K0s"), v0.mK0Short(), v0.mAntiLambda()); + mHistograms.fill(HIST("armenteros_plot_before_selections"), v0.alpha(), v0.qtarm()); + mHistograms.fill(HIST("Lambda_vs_K0s"), v0.mK0Short(), v0.mAntiLambda()); uint8_t v0Bitmask = selectV0MotherHypothesis(v0); - if (v0Bitmask == 0 || (v0Bitmask & (v0Bitmask - 1)) != 0) + if (v0Bitmask == 0 || (v0Bitmask & (v0Bitmask - 1)) != 0) { return; - m_hAnalysis.fill(HIST("v0_selections"), V0Selections::kV0PID); + } + mHistograms.fill(HIST("v0_selections"), V0Selections::kV0PID); Candidate candidatePos(std::hypot(momPos[0], momPos[1], momPos[2]) * posTrack.sign(), RecoDecay::eta(momPos), RecoDecay::phi(momPos), posTrack.itsClusterSizes(), @@ -840,16 +864,18 @@ struct LfTreeCreatorClusterStudies { 0, negTrack.tpcInnerParam() * negTrack.sign(), negTrack.pidForTracking(), -999.f, -999.f, -999.f, v0.v0cosPA(), -999.f, 0); - if (!selectPidV0Daughters(candidatePos, candidateNeg, v0, posTrack, negTrack, v0Bitmask)) + if (!selectPidV0Daughters(candidatePos, candidateNeg, v0, posTrack, negTrack, v0Bitmask)) { return; + } const float massV0 = fillHistogramsV0(v0, posTrack, negTrack, v0Bitmask); candidatePos.massMother = massV0; candidateNeg.massMother = massV0; if constexpr (isMC) { // MC - if (!posTrack.has_mcParticle() || !negTrack.has_mcParticle()) + if (!posTrack.has_mcParticle() || !negTrack.has_mcParticle()) { return; + } const auto& posMcParticle = posTrack.mcParticle(); const auto& negMcParticle = negTrack.mcParticle(); @@ -863,14 +889,14 @@ struct LfTreeCreatorClusterStudies { fillTable(candidatePos); fillTable(candidateNeg); - m_hAnalysis.fill(HIST("isPositive"), true); - m_hAnalysis.fill(HIST("isPositive"), false); + mHistograms.fill(HIST("isPositive"), true); + mHistograms.fill(HIST("isPositive"), false); } template void fillKCand(const std::array& pv, aod::CascDatas::iterator const& cascade, const Track&) { - m_hAnalysis.fill(HIST("casc_selections"), CascSelections::kCascNoCut); + mHistograms.fill(HIST("casc_selections"), CascSelections::kCascNoCut); const auto& bachelorTrack = cascade.template bachelor_as(); std::array momBachelor{cascade.pxbach(), cascade.pybach(), cascade.pzbach()}; @@ -878,43 +904,43 @@ struct LfTreeCreatorClusterStudies { if (!qualitySelectionCascade(cascade, pv)) { return; } - m_hAnalysis.fill(HIST("casc_selections"), CascSelections::kCascTopology); + mHistograms.fill(HIST("casc_selections"), CascSelections::kCascTopology); const float& massXi = cascade.mXi(); const float& massOmega = cascade.mOmega(); - m_hAnalysis.fill(HIST("Xi_vs_Omega"), massOmega, massXi); + mHistograms.fill(HIST("Xi_vs_Omega"), massOmega, massXi); - if (std::abs(massXi - o2::constants::physics::MassXiMinus) < cascsetting_massWindowXi) { + if (std::abs(massXi - o2::constants::physics::MassXiMinus) < cascsettingMassWindowXi) { return; } - m_hAnalysis.fill(HIST("casc_selections"), CascSelections::kRejectedXi); + mHistograms.fill(HIST("casc_selections"), CascSelections::kRejectedXi); - m_hAnalysis.fill(HIST("massOmega"), cascade.pt() * bachelorTrack.sign(), massOmega); - if (std::abs(massOmega - o2::constants::physics::MassOmegaMinus) > cascsetting_massWindowOmega) { + mHistograms.fill(HIST("massOmega"), cascade.pt() * bachelorTrack.sign(), massOmega); + if (std::abs(massOmega - o2::constants::physics::MassOmegaMinus) > cascsettingMassWindowOmega) { return; } - m_hAnalysis.fill(HIST("casc_selections"), CascSelections::kAcceptedOmega); + mHistograms.fill(HIST("casc_selections"), CascSelections::kAcceptedOmega); - if (std::abs(bachelorTrack.tpcNSigmaKa()) > cascsetting_nsigmatpc) { + if (std::abs(bachelorTrack.tpcNSigmaKa()) > cascsettingNsigmatpc) { return; } - m_hAnalysis.fill(HIST("casc_selections"), CascSelections::kNSigmaTPC); + mHistograms.fill(HIST("casc_selections"), CascSelections::kNSigmaTPC); fillHistogramsParticle(bachelorTrack); - m_ClusterStudiesTable( + mClusterStudiesTable( std::hypot(momBachelor[0], momBachelor[1], momBachelor[2]) * bachelorTrack.sign(), RecoDecay::eta(momBachelor), RecoDecay::phi(momBachelor), bachelorTrack.itsClusterSizes(), PartID::ka); - if (setting_fillExtraTable) { - m_ClusterStudiesTableExtra( + if (settingFillExtraTable) { + mClusterStudiesTableExtra( bachelorTrack.tpcInnerParam() * bachelorTrack.sign(), bachelorTrack.pidForTracking(), bachelorTrack.tpcNSigmaKa(), /*TOF nsigma*/ -999.f, /*TOF mass*/ -999.f, cascade.casccosPA(pv[0], pv[1], pv[2]), massOmega); } - if (setting_fillCollTable) { - m_ClusterStudiesTableCollision( - m_runNumber); + if (settingFillCollTable) { + mClusterStudiesTableCollision( + mrunNumber); } if constexpr (isMC) { @@ -923,7 +949,7 @@ struct LfTreeCreatorClusterStudies { } const auto& mcParticle = bachelorTrack.mcParticle(); - m_ClusterStudiesTableMc( + mClusterStudiesTableMc( mcParticle.pdgCode()); const auto& posV0Daughter = cascade.template posTrack_as(); @@ -934,7 +960,7 @@ struct LfTreeCreatorClusterStudies { fillMcHistogramsCascade(cascade, mcParticle, mcPosParticleV0); } - m_hAnalysis.fill(HIST("isPositive"), bachelorTrack.sign() > 0); + mHistograms.fill(HIST("isPositive"), bachelorTrack.sign() > 0); } template @@ -942,50 +968,54 @@ struct LfTreeCreatorClusterStudies { { constexpr int kPartID = partID; - if (kPartID == static_cast(PartID::de) && track.sign() > 0) + if (kPartID == static_cast(PartID::de) && track.sign() > 0) { return; - m_hAnalysis.fill(HIST(cNames[kPartID]) + HIST("/trackSelections"), NucleiSelections::kNucleiNoCut); + } + mHistograms.fill(HIST(cNames[kPartID]) + HIST("/trackSelections"), NucleiSelections::kNucleiNoCut); - if (track.itsNCls() < desetting_nClsIts) + if (track.itsNCls() < desettingNclsIts) return; - m_hAnalysis.fill(HIST(cNames[kPartID]) + HIST("/trackSelections"), NucleiSelections::kNucleiNClsIts); + mHistograms.fill(HIST(cNames[kPartID]) + HIST("/trackSelections"), NucleiSelections::kNucleiNClsIts); const float tpcNsigma = kPartID == static_cast(PartID::de) ? track.tpcNSigmaDe() : computeNSigmaTPCHe3(track); - const float tpcNsigmaMax = kPartID == static_cast(PartID::de) ? desetting_nsigmatpc : he3setting_nsigmatpc; - if (std::abs(tpcNsigma) > tpcNsigmaMax) + const float tpcNsigmaMax = kPartID == static_cast(PartID::de) ? desettingNsigmatpc : he3settingNsigmatpc; + if (std::abs(tpcNsigma) > tpcNsigmaMax) { return; - m_hAnalysis.fill(HIST(cNames[kPartID]) + HIST("/trackSelections"), NucleiSelections::kNucleiPIDtpc); + } + mHistograms.fill(HIST(cNames[kPartID]) + HIST("/trackSelections"), NucleiSelections::kNucleiPIDtpc); const float tofMass = track.hasTOF() ? (kPartID == static_cast(PartID::de) ? computeTOFmassDe(track) : computeTOFmassHe3(track)) : -999.f; const float tofNsigma = kPartID == static_cast(PartID::de) ? track.tofNSigmaDe() : -999.f; float correctedTPCinnerParam = track.tpcInnerParam(); if (kPartID == static_cast(PartID::de)) { - if (!track.hasTOF() || std::abs(tofNsigma) > desetting_nsigmatof) + if (!track.hasTOF() || std::abs(tofNsigma) > desettingNsigmatof) { return; + } } else { - if (track.hasTOF() && (tofMass < he3setting_tofmasslow || tofMass > he3setting_tofmasshigh)) + if (track.hasTOF() && (tofMass < he3settingTofmasslow || tofMass > he3settingTofmasshigh)) { return; + } bool heliumPID = track.pidForTracking() == o2::track::PID::Helium3 || track.pidForTracking() == o2::track::PID::Alpha; - correctedTPCinnerParam = (heliumPID && he3setting_compensatePIDinTracking) ? track.tpcInnerParam() / 2.f : track.tpcInnerParam(); + correctedTPCinnerParam = (heliumPID && he3settingCompensatePIDinTracking) ? track.tpcInnerParam() / 2.f : track.tpcInnerParam(); } - m_hAnalysis.fill(HIST(cNames[kPartID]) + HIST("/trackSelections"), NucleiSelections::kNucleiPIDtof); + mHistograms.fill(HIST(cNames[kPartID]) + HIST("/trackSelections"), NucleiSelections::kNucleiPIDtof); fillHistogramsParticle(track); - m_ClusterStudiesTable( + mClusterStudiesTable( track.p() * track.sign(), track.eta(), track.phi(), track.itsClusterSizes(), kPartID); - if (setting_fillExtraTable) { - m_ClusterStudiesTableExtra( + if (settingFillExtraTable) { + mClusterStudiesTableExtra( correctedTPCinnerParam * track.sign(), track.pidForTracking(), tpcNsigma, tofNsigma, tofMass, /*cosPA*/ -999.f, /*mass mother*/ -999.f); } - if (setting_fillCollTable) { - m_ClusterStudiesTableCollision( - m_runNumber); + if (settingFillCollTable) { + mClusterStudiesTableCollision( + mrunNumber); } if constexpr (isMC) { @@ -995,135 +1025,137 @@ struct LfTreeCreatorClusterStudies { const auto& mcParticle = track.mcParticle(); - m_ClusterStudiesTableMc( + mClusterStudiesTableMc( mcParticle.pdgCode()); } - m_hAnalysis.fill(HIST("isPositive"), track.sign() > 0); + mHistograms.fill(HIST("isPositive"), track.sign() > 0); } void fillPKPiTable(const TracksFullIU::iterator& track) { uint8_t partID = 0; float tpcNSigma = 0.f; - if (std::abs(track.tpcNSigmaPi()) < v0setting_nsigmatpcPi && std::abs(track.tpcNSigmaKa()) > 3) { + if (std::abs(track.tpcNSigmaPi()) < v0settingNsigmatpcPi && std::abs(track.tpcNSigmaKa()) > 3) { partID = PartID::pi; tpcNSigma = track.tpcNSigmaPi(); - m_hAnalysis.fill(HIST("nSigmaTPCPi"), track.p() * track.sign(), tpcNSigma); - } else if (std::abs(track.tpcNSigmaKa()) < cascsetting_nsigmatpc && (std::abs(track.tpcNSigmaPi()) > 3 /*&& std::abs(track.tpcNSigmaPr()) > 3*/)) { + mHistograms.fill(HIST("nSigmaTPCPi"), track.p() * track.sign(), tpcNSigma); + } else if (std::abs(track.tpcNSigmaKa()) < cascsettingNsigmatpc && (std::abs(track.tpcNSigmaPi()) > 3 /*&& std::abs(track.tpcNSigmaPr()) > 3*/)) { partID = PartID::ka; tpcNSigma = track.tpcNSigmaKa(); - m_hAnalysis.fill(HIST("nSigmaTPCKa"), track.p() * track.sign(), tpcNSigma); - } else if (std::abs(track.tpcNSigmaPr()) < v0setting_nsigmatpcPr && std::abs(track.tpcNSigmaKa()) > 3) { + mHistograms.fill(HIST("nSigmaTPCKa"), track.p() * track.sign(), tpcNSigma); + } else if (std::abs(track.tpcNSigmaPr()) < v0settingNsigmatpcPr && std::abs(track.tpcNSigmaKa()) > 3) { partID = PartID::pr; tpcNSigma = track.tpcNSigmaPr(); - m_hAnalysis.fill(HIST("nSigmaTPCPr"), track.p() * track.sign(), tpcNSigma); + mHistograms.fill(HIST("nSigmaTPCPr"), track.p() * track.sign(), tpcNSigma); } else { return; } - m_ClusterStudiesTable( + mClusterStudiesTable( track.p() * track.sign(), track.eta(), track.phi(), track.itsClusterSizes(), partID); - if (setting_fillExtraTable) { - m_ClusterStudiesTableExtra( + if (settingFillExtraTable) { + mClusterStudiesTableExtra( track.tpcInnerParam() * track.sign(), track.pidForTracking(), tpcNSigma, /*TOF nsigma*/ -999.f, /*TOF mass*/ -999.f, /*cosPA*/ -999.f, /*mass mother*/ -999.f); } - if (setting_fillCollTable) { - m_ClusterStudiesTableCollision( - m_runNumber); + if (settingFillCollTable) { + mClusterStudiesTableCollision( + mrunNumber); } } template void fillElectronTableFromPi0Dalitz(const Track& posTrack, const Track& negTrack) { - m_hAnalysis.fill(HIST("e_selections"), ESelections::kENoCut); + mHistograms.fill(HIST("e_selections"), ESelections::kENoCut); if (!qualityTrackSelection(posTrack) || !qualityTrackSelection(negTrack)) { return; } - m_hAnalysis.fill(HIST("e_selections"), ESelections::kETrackQuality); + mHistograms.fill(HIST("e_selections"), ESelections::kETrackQuality); if (!electronPrimarySelection(posTrack) || !electronPrimarySelection(negTrack)) { return; } - m_hAnalysis.fill(HIST("e_selections"), ESelections::kEPrimary); + mHistograms.fill(HIST("e_selections"), ESelections::kEPrimary); if (!electronPidSelection(posTrack) || !electronPidSelection(negTrack)) { return; } - m_hAnalysis.fill(HIST("e_selections"), ESelections::kEPid); + mHistograms.fill(HIST("e_selections"), ESelections::kEPid); const float invariantMass = std::sqrt(RecoDecay::m2<2>(std::array, 2>{ std::array{posTrack.px(), posTrack.py(), posTrack.pz()}, std::array{negTrack.px(), negTrack.py(), negTrack.pz()}}, std::array{o2::constants::physics::MassElectron, o2::constants::physics::MassElectron})); - float phiv = o2::aod::pwgem::dilepton::utils::pairutil::getPhivPair(posTrack.px(), posTrack.py(), posTrack.pz(), negTrack.px(), negTrack.py(), negTrack.pz(), posTrack.sign(), negTrack.sign(), m_d_bz); + float phiv = o2::aod::pwgem::dilepton::utils::pairutil::getPhivPair(posTrack.px(), posTrack.py(), posTrack.pz(), negTrack.px(), negTrack.py(), negTrack.pz(), posTrack.sign(), negTrack.sign(), md_bz); - m_hAnalysis.fill(HIST("massPi0WithBkg"), invariantMass); - if (invariantMass > electronsetting_maxMassPi0 || invariantMass < electronsetting_minMassPi0) { + mHistograms.fill(HIST("massPi0WithBkg"), invariantMass); + if (invariantMass > electronsettingMaxMassPi0 || invariantMass < electronsettingMinMassPi0) { return; } - if (phiv > electronsetting_maxPhiv || phiv < electronsetting_minPhiv) { + if (phiv > electronsettingMaxPhiv || phiv < electronsettingMinPhiv) { return; } - m_hAnalysis.fill(HIST("e_selections"), ESelections::kEPi0); - m_hAnalysis.fill(HIST("massPi0"), invariantMass); + mHistograms.fill(HIST("e_selections"), ESelections::kEPi0); + mHistograms.fill(HIST("massPi0"), invariantMass); fillHistogramsParticle(posTrack); fillHistogramsParticle(negTrack); // float opangle = o2::aod::pwgem::dilepton::utils::pairutil::getOpeningAngle(t1.px(), t1.py(), t1.pz(), t2.px(), t2.py(), t2.pz()); - m_ClusterStudiesTable( + mClusterStudiesTable( posTrack.p(), posTrack.eta(), posTrack.phi(), posTrack.itsClusterSizes(), PartID::el); - if (setting_fillExtraTable) { - m_ClusterStudiesTableExtra( + if (settingFillExtraTable) { + mClusterStudiesTableExtra( posTrack.tpcInnerParam(), posTrack.pidForTracking(), posTrack.tpcNSigmaEl(), posTrack.tofNSigmaEl(), -999.f /* TofMass */, -999.f /* cosPA */, invariantMass); } - if (setting_fillCollTable) { - m_ClusterStudiesTableCollision( - m_runNumber); + if (settingFillCollTable) { + mClusterStudiesTableCollision( + mrunNumber); } - m_ClusterStudiesTable( + mClusterStudiesTable( negTrack.p(), negTrack.eta(), negTrack.phi(), negTrack.itsClusterSizes(), PartID::el); - if (setting_fillExtraTable) { - m_ClusterStudiesTableExtra( + if (settingFillExtraTable) { + mClusterStudiesTableExtra( negTrack.tpcInnerParam(), negTrack.pidForTracking(), negTrack.tpcNSigmaEl(), negTrack.tofNSigmaEl(), -999.f /* TofMass */, -999.f /* cosPA */, invariantMass); } - if (setting_fillCollTable) { - m_ClusterStudiesTableCollision( - m_runNumber); + if (settingFillCollTable) { + mClusterStudiesTableCollision( + mrunNumber); } if constexpr (isMC) { const auto& posMcParticle = posTrack.mcParticle(); const auto& negMcParticle = negTrack.mcParticle(); - m_ClusterStudiesTableMc( + mClusterStudiesTableMc( posMcParticle.pdgCode()); - m_ClusterStudiesTableMc( + mClusterStudiesTableMc( negMcParticle.pdgCode()); - if (!posMcParticle.has_mothers() || !negMcParticle.has_mothers()) + if (!posMcParticle.has_mothers() || !negMcParticle.has_mothers()) { return; + } for (const auto& posMother : posMcParticle.template mothers_as()) { for (const auto& negMother : negMcParticle.template mothers_as()) { - if (posMother.globalIndex() != negMother.globalIndex() || std::abs(posMother.pdgCode()) != PDG_t::kPi0) + if (posMother.globalIndex() != negMother.globalIndex() || std::abs(posMother.pdgCode()) != PDG_t::kPi0) { return; - m_hAnalysis.fill(HIST("massPi0Mc"), std::sqrt((posMcParticle.e() + negMcParticle.e()) * (posMcParticle.e() + negMcParticle.e()) - - (posMcParticle.px() + negMcParticle.px()) * (posMcParticle.px() + posMcParticle.px()) - - (posMcParticle.py() + negMcParticle.py()) * (posMcParticle.py() + posMcParticle.py()) - - (posMcParticle.pz() + negMcParticle.pz()) * (posMcParticle.pz() + posMcParticle.pz()))); + } + mHistograms.fill(HIST("massPi0Mc"), std::sqrt((posMcParticle.e() + negMcParticle.e()) * (posMcParticle.e() + negMcParticle.e()) - + (posMcParticle.px() + negMcParticle.px()) * (posMcParticle.px() + negMcParticle.px()) - + (posMcParticle.py() + negMcParticle.py()) * (posMcParticle.py() + negMcParticle.py()) - + (posMcParticle.pz() + negMcParticle.pz()) * (posMcParticle.pz() + negMcParticle.pz()))); break; } } @@ -1134,23 +1166,25 @@ struct LfTreeCreatorClusterStudies { void fillElectronTableFromPhotonConversion(const std::array& /*pv*/, const aod::V0Datas::iterator& v0, const Tracks&) { - m_hAnalysis.fill(HIST("v0_selections"), V0Selections::kV0NoCut); + mHistograms.fill(HIST("v0_selections"), V0Selections::kV0NoCut); const auto& posTrack = v0.template posTrack_as(); const auto& negTrack = v0.template negTrack_as(); - if (!qualityTrackSelection(posTrack) || !qualityTrackSelection(negTrack)) + if (!qualityTrackSelection(posTrack) || !qualityTrackSelection(negTrack)) { return; - m_hAnalysis.fill(HIST("v0_selections"), V0Selections::kV0DaughterQuality); + } + mHistograms.fill(HIST("v0_selections"), V0Selections::kV0DaughterQuality); - if (!qualitySelectionPhotons(v0)) + if (!qualitySelectionPhotons(v0)) { return; - m_hAnalysis.fill(HIST("v0_selections"), V0Selections::kV0Topology); + } + mHistograms.fill(HIST("v0_selections"), V0Selections::kV0Topology); std::array momPos{v0.pxpos(), v0.pypos(), v0.pzpos()}, momNeg{v0.pxneg(), v0.pyneg(), v0.pzneg()}; - m_hAnalysis.fill(HIST("armenteros_plot_before_selections"), v0.alpha(), v0.qtarm()); + mHistograms.fill(HIST("armenteros_plot_before_selections"), v0.alpha(), v0.qtarm()); Candidate candidatePos(std::hypot(momPos[0], momPos[1], momPos[2]) * posTrack.sign(), RecoDecay::eta(momPos), RecoDecay::phi(momPos), posTrack.itsClusterSizes(), @@ -1166,22 +1200,24 @@ struct LfTreeCreatorClusterStudies { std::array{negTrack.px(), negTrack.py(), negTrack.pz()}}, std::array{o2::constants::physics::MassElectron, o2::constants::physics::MassElectron})); - if (invariantMass > electronsetting_maxMassPhoton || invariantMass < electronsetting_minMassPhoton) { + if (invariantMass > electronsettingMaxMassPhoton || invariantMass < electronsettingMinMassPhoton) { return; } - if (!electronPidSelection(posTrack) || !electronPidSelection(negTrack)) + if (!electronPidSelection(posTrack) || !electronPidSelection(negTrack)) { return; - m_hAnalysis.fill(HIST("v0_selections"), V0Selections::kV0PID); + } + mHistograms.fill(HIST("v0_selections"), V0Selections::kV0PID); - m_hAnalysis.fill(HIST("armenteros_plot_gamma"), v0.alpha(), v0.qtarm()); - m_hAnalysis.fill(HIST("photon_radiusV0"), v0.v0radius()); + mHistograms.fill(HIST("armenteros_plot_gamma"), v0.alpha(), v0.qtarm()); + mHistograms.fill(HIST("photon_radiusV0"), v0.v0radius()); candidatePos.massMother = invariantMass; candidateNeg.massMother = invariantMass; if constexpr (isMC) { // MC - if (!posTrack.has_mcParticle() || !negTrack.has_mcParticle()) + if (!posTrack.has_mcParticle() || !negTrack.has_mcParticle()) { return; + } const auto& posMcParticle = posTrack.mcParticle(); const auto& negMcParticle = negTrack.mcParticle(); @@ -1189,10 +1225,12 @@ struct LfTreeCreatorClusterStudies { candidatePos.pdgCode = posMcParticle.pdgCode(); candidateNeg.pdgCode = negMcParticle.pdgCode(); - if (candidatePos.pdgCode != PDG_t::kElectron || candidateNeg.pdgCode != PDG_t::kElectron) + if (candidatePos.pdgCode != PDG_t::kElectron || candidateNeg.pdgCode != PDG_t::kElectron) { return; - if (!posMcParticle.has_mothers() || !negMcParticle.has_mothers()) + } + if (!posMcParticle.has_mothers() || !negMcParticle.has_mothers()) { return; + } } fillHistogramsParticle(posTrack); @@ -1201,8 +1239,8 @@ struct LfTreeCreatorClusterStudies { fillTable(candidatePos); fillTable(candidateNeg); - m_hAnalysis.fill(HIST("isPositive"), true); - m_hAnalysis.fill(HIST("isPositive"), false); + mHistograms.fill(HIST("isPositive"), true); + mHistograms.fill(HIST("isPositive"), false); } // ========================================================================================================= @@ -1216,7 +1254,7 @@ struct LfTreeCreatorClusterStudies { const auto& bc = collision.bc_as(); initCCDB(bc); - m_hAnalysis.fill(HIST("zVtx"), collision.posZ()); + mHistograms.fill(HIST("zVtx"), collision.posZ()); std::array PV = {collision.posX(), collision.posY(), collision.posZ()}; for (const auto& v0 : v0s) { @@ -1238,7 +1276,7 @@ struct LfTreeCreatorClusterStudies { const auto& bc = collision.bc_as(); initCCDB(bc); - m_hAnalysis.fill(HIST("zVtx"), collision.posZ()); + mHistograms.fill(HIST("zVtx"), collision.posZ()); std::array PV = {collision.posX(), collision.posY(), collision.posZ()}; for (const auto& v0 : v0s) { @@ -1258,10 +1296,10 @@ struct LfTreeCreatorClusterStudies { const auto& bc = collision.bc_as(); initCCDB(bc); - m_hAnalysis.fill(HIST("zVtx"), collision.posZ()); + mHistograms.fill(HIST("zVtx"), collision.posZ()); - const auto& posTracks_thisCollision = posTracks.sliceByCached(o2::aod::track::collisionId, collision.globalIndex(), m_cache); - const auto& negTracks_thisCollision = negTracks.sliceByCached(o2::aod::track::collisionId, collision.globalIndex(), m_cache); + const auto& posTracks_thisCollision = posTracks.sliceByCached(o2::aod::track::collisionId, collision.globalIndex(), mcache); + const auto& negTracks_thisCollision = negTracks.sliceByCached(o2::aod::track::collisionId, collision.globalIndex(), mcache); for (const auto& [posTrack, negTrack] : o2::soa::combinations(o2::soa::CombinationsFullIndexPolicy(posTracks_thisCollision, negTracks_thisCollision))) { fillElectronTableFromPi0Dalitz(posTrack, negTrack); @@ -1278,7 +1316,7 @@ struct LfTreeCreatorClusterStudies { const auto& bc = collision.bc_as(); initCCDB(bc); - m_hAnalysis.fill(HIST("zVtx"), collision.posZ()); + mHistograms.fill(HIST("zVtx"), collision.posZ()); for (const auto& track : tracks) { if (!qualityTrackSelection(track)) { @@ -1303,7 +1341,7 @@ struct LfTreeCreatorClusterStudies { const auto& bc = collision.bc_as(); initCCDB(bc); - m_hAnalysis.fill(HIST("zVtx"), collision.posZ()); + mHistograms.fill(HIST("zVtx"), collision.posZ()); for (const auto& track : tracks) { if (!qualityTrackSelection(track)) { @@ -1324,7 +1362,7 @@ struct LfTreeCreatorClusterStudies { const auto& bc = collision.template bc_as(); initCCDB(bc); - m_hAnalysis.fill(HIST("zVtx"), collision.posZ()); + mHistograms.fill(HIST("zVtx"), collision.posZ()); std::array PV = {collision.posX(), collision.posY(), collision.posZ()}; for (const auto& v0 : v0s) { @@ -1349,7 +1387,7 @@ struct LfTreeCreatorClusterStudies { const auto& bc = collision.bc_as(); initCCDB(bc); - m_hAnalysis.fill(HIST("zVtx"), collision.posZ()); + mHistograms.fill(HIST("zVtx"), collision.posZ()); std::array PV = {collision.posX(), collision.posY(), collision.posZ()}; for (const auto& v0 : v0s) { @@ -1371,10 +1409,10 @@ struct LfTreeCreatorClusterStudies { const auto& bc = collision.template bc_as(); initCCDB(bc); - m_hAnalysis.fill(HIST("zVtx"), collision.posZ()); + mHistograms.fill(HIST("zVtx"), collision.posZ()); - const auto& posTracks_thisCollision = posTracksMc.sliceByCached(o2::aod::track::collisionId, collision.globalIndex(), m_cache); - const auto& negTracks_thisCollision = negTracksMc.sliceByCached(o2::aod::track::collisionId, collision.globalIndex(), m_cache); + const auto& posTracks_thisCollision = posTracksMc.sliceByCached(o2::aod::track::collisionId, collision.globalIndex(), mcache); + const auto& negTracks_thisCollision = negTracksMc.sliceByCached(o2::aod::track::collisionId, collision.globalIndex(), mcache); for (const auto& [posTrack, negTrack] : o2::soa::combinations(o2::soa::CombinationsFullIndexPolicy(posTracks_thisCollision, negTracks_thisCollision))) { if (!posTrack.has_mcParticle() || !negTrack.has_mcParticle()) @@ -1395,7 +1433,7 @@ struct LfTreeCreatorClusterStudies { } const auto& bc = collision.template bc_as(); initCCDB(bc); - m_hAnalysis.fill(HIST("zVtx"), collision.posZ()); + mHistograms.fill(HIST("zVtx"), collision.posZ()); for (const auto& track : tracks) { if (!qualityTrackSelection(track)) {