diff --git a/PWGHF/TableProducer/CMakeLists.txt b/PWGHF/TableProducer/CMakeLists.txt index b9a51f9bda7..3faeb444925 100644 --- a/PWGHF/TableProducer/CMakeLists.txt +++ b/PWGHF/TableProducer/CMakeLists.txt @@ -37,12 +37,12 @@ o2physics_add_dpl_workflow(mc-pid-tof o2physics_add_dpl_workflow(candidate-creator-2prong SOURCES candidateCreator2Prong.cxx - PUBLIC_LINK_LIBRARIES O2Physics::AnalysisCore O2::DCAFitter KFParticle::KFParticle O2Physics::SGCutParHolder + PUBLIC_LINK_LIBRARIES O2Physics::AnalysisCore O2::DCAFitter KFParticle::KFParticle O2Physics::SGCutParHolder O2Physics::AnalysisCCDB COMPONENT_NAME Analysis) o2physics_add_dpl_workflow(candidate-creator-3prong SOURCES candidateCreator3Prong.cxx - PUBLIC_LINK_LIBRARIES O2Physics::AnalysisCore O2::DCAFitter KFParticle::KFParticle O2Physics::SGCutParHolder + PUBLIC_LINK_LIBRARIES O2Physics::AnalysisCore O2::DCAFitter KFParticle::KFParticle O2Physics::SGCutParHolder O2Physics::AnalysisCCDB COMPONENT_NAME Analysis) o2physics_add_dpl_workflow(candidate-creator-b0 @@ -62,12 +62,12 @@ o2physics_add_dpl_workflow(candidate-creator-bs o2physics_add_dpl_workflow(candidate-creator-cascade SOURCES candidateCreatorCascade.cxx - PUBLIC_LINK_LIBRARIES O2Physics::AnalysisCore O2::DCAFitter + PUBLIC_LINK_LIBRARIES O2Physics::AnalysisCore O2::DCAFitter O2Physics::AnalysisCCDB COMPONENT_NAME Analysis) o2physics_add_dpl_workflow(candidate-creator-dstar SOURCES candidateCreatorDstar.cxx - PUBLIC_LINK_LIBRARIES O2Physics::AnalysisCore + PUBLIC_LINK_LIBRARIES O2Physics::AnalysisCore O2Physics::AnalysisCCDB COMPONENT_NAME Analysis) o2physics_add_dpl_workflow(candidate-creator-lb @@ -87,12 +87,12 @@ o2physics_add_dpl_workflow(candidate-creator-sigmac0plusplus-cascade o2physics_add_dpl_workflow(candidate-creator-xic0-omegac0 SOURCES candidateCreatorXic0Omegac0.cxx - PUBLIC_LINK_LIBRARIES O2Physics::AnalysisCore O2::DCAFitter KFParticle::KFParticle + PUBLIC_LINK_LIBRARIES O2Physics::AnalysisCore O2::DCAFitter KFParticle::KFParticle O2Physics::AnalysisCCDB COMPONENT_NAME Analysis) o2physics_add_dpl_workflow(candidate-creator-xic-to-xi-pi-pi SOURCES candidateCreatorXicToXiPiPi.cxx - PUBLIC_LINK_LIBRARIES O2Physics::AnalysisCore O2::DCAFitter KFParticle::KFParticle + PUBLIC_LINK_LIBRARIES O2Physics::AnalysisCore O2::DCAFitter KFParticle::KFParticle O2Physics::AnalysisCCDB COMPONENT_NAME Analysis) o2physics_add_dpl_workflow(candidate-creator-xicc diff --git a/PWGHF/TableProducer/candidateCreator2Prong.cxx b/PWGHF/TableProducer/candidateCreator2Prong.cxx index cd262ce388b..d1dc8d7f88d 100644 --- a/PWGHF/TableProducer/candidateCreator2Prong.cxx +++ b/PWGHF/TableProducer/candidateCreator2Prong.cxx @@ -33,6 +33,7 @@ #include "PWGHF/Utils/utilsTrkCandHf.h" #include "PWGLF/DataModel/mcCentrality.h" +#include "Common/CCDB/ctpRateFetcher.h" #include "Common/Core/RecoDecay.h" #include "Common/Core/trackUtilities.h" #include "Common/DataModel/Centrality.h" @@ -112,10 +113,12 @@ struct HfCandidateCreator2Prong { Configurable ccdbUrl{"ccdbUrl", "http://alice-ccdb.cern.ch", "url of the ccdb repository"}; Configurable ccdbPathGrp{"ccdbPathGrp", "GLO/GRP/GRP", "Path of the grp file (Run 2)"}; Configurable ccdbPathGrpMag{"ccdbPathGrpMag", "GLO/Config/GRPMagField", "CCDB path of the GRPMagField object (Run 3)"}; + Configurable irSource{"irSource", "ZNC hadronic", "Estimator of the interaction rate (Recommended: pp --> T0VTX, Pb-Pb --> ZNC hadronic)"}; HfEventSelection hfEvSel; // event selection and monitoring o2::vertexing::DCAFitterN<2> df; // 2-prong vertex fitter Service ccdb; + ctpRateFetcher mRateFetcher; int runNumber{0}; double bz{0.}; @@ -742,9 +745,10 @@ struct HfCandidateCreator2Prong { float centrality{-1.f}; const auto occupancy = o2::hf_occupancy::getOccupancyColl(collision, hfEvSel.occEstimator); const auto rejectionMask = hfEvSel.getHfCollisionRejectionMask(collision, centrality, ccdb, registry); - + const auto bc = collision.template foundBC_as(); + const auto ir = mRateFetcher.fetch(ccdb.service, bc.timestamp(), bc.runNumber(), irSource, true); // Hz /// monitor the satisfied event selections - hfEvSel.fillHistograms(collision, rejectionMask, centrality, occupancy); + hfEvSel.fillHistograms(collision, rejectionMask, centrality, occupancy, ir); } /// end loop over collisions } @@ -760,9 +764,10 @@ struct HfCandidateCreator2Prong { float centrality{-1.f}; const auto occupancy = o2::hf_occupancy::getOccupancyColl(collision, hfEvSel.occEstimator); const auto rejectionMask = hfEvSel.getHfCollisionRejectionMask(collision, centrality, ccdb, registry); - + const auto bc = collision.template foundBC_as(); + const auto ir = mRateFetcher.fetch(ccdb.service, bc.timestamp(), bc.runNumber(), irSource, true); // Hz /// monitor the satisfied event selections - hfEvSel.fillHistograms(collision, rejectionMask, centrality, occupancy); + hfEvSel.fillHistograms(collision, rejectionMask, centrality, occupancy, ir); } /// end loop over collisions } @@ -778,9 +783,10 @@ struct HfCandidateCreator2Prong { float centrality{-1.f}; const auto occupancy = o2::hf_occupancy::getOccupancyColl(collision, hfEvSel.occEstimator); const auto rejectionMask = hfEvSel.getHfCollisionRejectionMask(collision, centrality, ccdb, registry); - + const auto bc = collision.template foundBC_as(); + const auto ir = mRateFetcher.fetch(ccdb.service, bc.timestamp(), bc.runNumber(), irSource, true); // Hz /// monitor the satisfied event selections - hfEvSel.fillHistograms(collision, rejectionMask, centrality, occupancy); + hfEvSel.fillHistograms(collision, rejectionMask, centrality, occupancy, ir); } /// end loop over collisions } @@ -801,9 +807,10 @@ struct HfCandidateCreator2Prong { float centrality{-1.f}; const auto occupancy = o2::hf_occupancy::getOccupancyColl(collision, hfEvSel.occEstimator); const auto rejectionMask = hfEvSel.getHfCollisionRejectionMaskWithUpc(collision, centrality, ccdb, registry, bcs); - + const auto bc = collision.template foundBC_as(); + const auto ir = mRateFetcher.fetch(ccdb.service, bc.timestamp(), bc.runNumber(), irSource, true); // Hz /// monitor the satisfied event selections - hfEvSel.fillHistograms(collision, rejectionMask, centrality, occupancy); + hfEvSel.fillHistograms(collision, rejectionMask, centrality, occupancy, ir); } /// end loop over collisions } diff --git a/PWGHF/TableProducer/candidateCreator3Prong.cxx b/PWGHF/TableProducer/candidateCreator3Prong.cxx index e3816128923..b1025ea728b 100644 --- a/PWGHF/TableProducer/candidateCreator3Prong.cxx +++ b/PWGHF/TableProducer/candidateCreator3Prong.cxx @@ -32,6 +32,7 @@ #include "PWGHF/Utils/utilsTrkCandHf.h" #include "PWGLF/DataModel/mcCentrality.h" +#include "Common/CCDB/ctpRateFetcher.h" #include "Common/Core/RecoDecay.h" #include "Common/Core/trackUtilities.h" #include "Common/DataModel/Centrality.h" @@ -120,6 +121,7 @@ struct HfCandidateCreator3Prong { Configurable ccdbUrl{"ccdbUrl", "http://alice-ccdb.cern.ch", "url of the ccdb repository"}; Configurable ccdbPathGrp{"ccdbPathGrp", "GLO/GRP/GRP", "Path of the grp file (Run 2)"}; Configurable ccdbPathGrpMag{"ccdbPathGrpMag", "GLO/Config/GRPMagField", "CCDB path of the GRPMagField object (Run 3)"}; + Configurable irSource{"irSource", "ZNC hadronic", "Estimator of the interaction rate (Recommended: pp --> T0VTX, Pb-Pb --> ZNC hadronic)"}; // flags to enable creation for different particle species separately Configurable createDplus{"createDplus", false, "enable D+/- candidate creation"}; Configurable createDs{"createDs", false, "enable Ds+/- candidate creation"}; @@ -133,6 +135,7 @@ struct HfCandidateCreator3Prong { HfEventSelection hfEvSel; // event selection and monitoring o2::vertexing::DCAFitterN<3> df; // 3-prong vertex fitter Service ccdb; + ctpRateFetcher mRateFetcher; int runNumber{0}; double bz{0.}; @@ -899,9 +902,10 @@ struct HfCandidateCreator3Prong { float centrality{-1.f}; const auto occupancy = o2::hf_occupancy::getOccupancyColl(collision, hfEvSel.occEstimator); const auto rejectionMask = hfEvSel.getHfCollisionRejectionMask(collision, centrality, ccdb, registry); - + const auto bc = collision.template foundBC_as(); + const auto ir = mRateFetcher.fetch(ccdb.service, bc.timestamp(), bc.runNumber(), irSource, true); // Hz /// monitor the satisfied event selections - hfEvSel.fillHistograms(collision, rejectionMask, centrality, occupancy); + hfEvSel.fillHistograms(collision, rejectionMask, centrality, occupancy, ir); } /// end loop over collisions } @@ -917,9 +921,10 @@ struct HfCandidateCreator3Prong { float centrality{-1.f}; const auto occupancy = o2::hf_occupancy::getOccupancyColl(collision, hfEvSel.occEstimator); const auto rejectionMask = hfEvSel.getHfCollisionRejectionMask(collision, centrality, ccdb, registry); - + const auto bc = collision.template foundBC_as(); + const auto ir = mRateFetcher.fetch(ccdb.service, bc.timestamp(), bc.runNumber(), irSource, true); // Hz /// monitor the satisfied event selections - hfEvSel.fillHistograms(collision, rejectionMask, centrality, occupancy); + hfEvSel.fillHistograms(collision, rejectionMask, centrality, occupancy, ir); } /// end loop over collisions } @@ -935,9 +940,10 @@ struct HfCandidateCreator3Prong { float centrality{-1.f}; const auto occupancy = o2::hf_occupancy::getOccupancyColl(collision, hfEvSel.occEstimator); const auto rejectionMask = hfEvSel.getHfCollisionRejectionMask(collision, centrality, ccdb, registry); - + const auto bc = collision.template foundBC_as(); + const auto ir = mRateFetcher.fetch(ccdb.service, bc.timestamp(), bc.runNumber(), irSource, true); // Hz /// monitor the satisfied event selections - hfEvSel.fillHistograms(collision, rejectionMask, centrality, occupancy); + hfEvSel.fillHistograms(collision, rejectionMask, centrality, occupancy, ir); } /// end loop over collisions } @@ -958,9 +964,10 @@ struct HfCandidateCreator3Prong { float centrality{-1.f}; const auto occupancy = o2::hf_occupancy::getOccupancyColl(collision, hfEvSel.occEstimator); const auto rejectionMask = hfEvSel.getHfCollisionRejectionMaskWithUpc(collision, centrality, ccdb, registry, bcs); - + const auto bc = collision.template foundBC_as(); + const auto ir = mRateFetcher.fetch(ccdb.service, bc.timestamp(), bc.runNumber(), irSource, true); // Hz /// monitor the satisfied event selections - hfEvSel.fillHistograms(collision, rejectionMask, centrality, occupancy); + hfEvSel.fillHistograms(collision, rejectionMask, centrality, occupancy, ir); } /// end loop over collisions } diff --git a/PWGHF/TableProducer/candidateCreatorCascade.cxx b/PWGHF/TableProducer/candidateCreatorCascade.cxx index 2d3132c1a43..32a06efe5a1 100644 --- a/PWGHF/TableProducer/candidateCreatorCascade.cxx +++ b/PWGHF/TableProducer/candidateCreatorCascade.cxx @@ -25,6 +25,7 @@ #include "PWGLF/DataModel/LFStrangenessTables.h" #include "PWGLF/DataModel/mcCentrality.h" +#include "Common/CCDB/ctpRateFetcher.h" #include "Common/Core/RecoDecay.h" #include "Common/Core/trackUtilities.h" #include "Common/DataModel/Centrality.h" @@ -88,12 +89,14 @@ struct HfCandidateCreatorCascade { Configurable ccdbPathLut{"ccdbPathLut", "GLO/Param/MatLUT", "Path for LUT parametrization"}; Configurable ccdbPathGrp{"ccdbPathGrp", "GLO/GRP/GRP", "Path of the grp file (Run 2)"}; Configurable ccdbPathGrpMag{"ccdbPathGrpMag", "GLO/Config/GRPMagField", "CCDB path of the GRPMagField object (Run 3)"}; + Configurable irSource{"irSource", "ZNC hadronic", "Estimator of the interaction rate (Recommended: pp --> T0VTX, Pb-Pb --> ZNC hadronic)"}; HfEventSelection hfEvSel; // event selection and monitoring o2::vertexing::DCAFitterN<2> df; // 2-prong vertex fitter Service ccdb; o2::base::MatLayerCylSet* lut{}; o2::base::Propagator::MatCorrType matCorr = o2::base::Propagator::MatCorrType::USEMatCorrLUT; + ctpRateFetcher mRateFetcher; int runNumber{0}; double massP{0.}; @@ -378,10 +381,12 @@ struct HfCandidateCreatorCascade { /// bitmask with event. selection info float centrality{-1.f}; + const auto occupancy = o2::hf_occupancy::getOccupancyColl(collision, hfEvSel.occEstimator); const auto rejectionMask = hfEvSel.getHfCollisionRejectionMask(collision, centrality, ccdb, registry); - + const auto bc = collision.template foundBC_as(); + const auto ir = mRateFetcher.fetch(ccdb.service, bc.timestamp(), bc.runNumber(), irSource, true); // Hz /// monitor the satisfied event selections - hfEvSel.fillHistograms(collision, rejectionMask, centrality); + hfEvSel.fillHistograms(collision, rejectionMask, centrality, occupancy, ir); } /// end loop over collisions } @@ -395,10 +400,12 @@ struct HfCandidateCreatorCascade { /// bitmask with event. selection info float centrality{-1.f}; + const auto occupancy = o2::hf_occupancy::getOccupancyColl(collision, hfEvSel.occEstimator); const auto rejectionMask = hfEvSel.getHfCollisionRejectionMask(collision, centrality, ccdb, registry); - + const auto bc = collision.template foundBC_as(); + const auto ir = mRateFetcher.fetch(ccdb.service, bc.timestamp(), bc.runNumber(), irSource, true); // Hz /// monitor the satisfied event selections - hfEvSel.fillHistograms(collision, rejectionMask, centrality); + hfEvSel.fillHistograms(collision, rejectionMask, centrality, occupancy, ir); } /// end loop over collisions } @@ -412,10 +419,12 @@ struct HfCandidateCreatorCascade { /// bitmask with event. selection info float centrality{-1.f}; + const auto occupancy = o2::hf_occupancy::getOccupancyColl(collision, hfEvSel.occEstimator); const auto rejectionMask = hfEvSel.getHfCollisionRejectionMask(collision, centrality, ccdb, registry); - + const auto bc = collision.template foundBC_as(); + const auto ir = mRateFetcher.fetch(ccdb.service, bc.timestamp(), bc.runNumber(), irSource, true); // Hz /// monitor the satisfied event selections - hfEvSel.fillHistograms(collision, rejectionMask, centrality); + hfEvSel.fillHistograms(collision, rejectionMask, centrality, occupancy, ir); } /// end loop over collisions } diff --git a/PWGHF/TableProducer/candidateCreatorDstar.cxx b/PWGHF/TableProducer/candidateCreatorDstar.cxx index d426776a293..85123ef6505 100644 --- a/PWGHF/TableProducer/candidateCreatorDstar.cxx +++ b/PWGHF/TableProducer/candidateCreatorDstar.cxx @@ -26,6 +26,7 @@ #include "PWGHF/Utils/utilsTrkCandHf.h" #include "PWGLF/DataModel/mcCentrality.h" +#include "Common/CCDB/ctpRateFetcher.h" #include "Common/Core/RecoDecay.h" #include "Common/Core/trackUtilities.h" #include "Common/DataModel/Centrality.h" @@ -94,6 +95,7 @@ struct HfCandidateCreatorDstar { Configurable isRun2{"isRun2", false, "enable Run 2 or Run 3 GRP objects for magnetic field"}; Configurable ccdbPathGrp{"ccdbPathGrp", "GLO/GRP/GRP", "Path of the grp file (Run 2)"}; Configurable ccdbPathGrpMag{"ccdbPathGrpMag", "GLO/Config/GRPMagField", "CCDB path of the GRPMagField object (Run 3)"}; + Configurable irSource{"irSource", "ZNC hadronic", "Estimator of the interaction rate (Recommended: pp --> T0VTX, Pb-Pb --> ZNC hadronic)"}; // vertexing Configurable propagateToPCA{"propagateToPCA", true, "create tracks version propagated to PCA"}; @@ -107,6 +109,7 @@ struct HfCandidateCreatorDstar { HfEventSelection hfEvSel; // event selection and monitoring Service ccdb; // From utilsBfieldCCDB.h o2::base::Propagator::MatCorrType noMatCorr = o2::base::Propagator::MatCorrType::USEMatCorrNONE; + ctpRateFetcher mRateFetcher; // D0-prong vertex fitter o2::vertexing::DCAFitterN<2> df; int runNumber{}; @@ -498,10 +501,12 @@ struct HfCandidateCreatorDstar { /// bitmask with event. selection info float centrality{-1.f}; + const auto occupancy = o2::hf_occupancy::getOccupancyColl(collision, hfEvSel.occEstimator); const auto rejectionMask = hfEvSel.getHfCollisionRejectionMask(collision, centrality, ccdb, registry); - + const auto bc = collision.template foundBC_as(); + const auto ir = mRateFetcher.fetch(ccdb.service, bc.timestamp(), bc.runNumber(), irSource, true); // Hz /// monitor the satisfied event selections - hfEvSel.fillHistograms(collision, rejectionMask, centrality); + hfEvSel.fillHistograms(collision, rejectionMask, centrality, occupancy, ir); } /// end loop over collisions } @@ -515,10 +520,12 @@ struct HfCandidateCreatorDstar { /// bitmask with event. selection info float centrality{-1.f}; + const auto occupancy = o2::hf_occupancy::getOccupancyColl(collision, hfEvSel.occEstimator); const auto rejectionMask = hfEvSel.getHfCollisionRejectionMask(collision, centrality, ccdb, registry); - + const auto bc = collision.template foundBC_as(); + const auto ir = mRateFetcher.fetch(ccdb.service, bc.timestamp(), bc.runNumber(), irSource, true); // Hz /// monitor the satisfied event selections - hfEvSel.fillHistograms(collision, rejectionMask, centrality); + hfEvSel.fillHistograms(collision, rejectionMask, centrality, occupancy, ir); } /// end loop over collisions } @@ -532,10 +539,12 @@ struct HfCandidateCreatorDstar { /// bitmask with event. selection info float centrality{-1.f}; + const auto occupancy = o2::hf_occupancy::getOccupancyColl(collision, hfEvSel.occEstimator); const auto rejectionMask = hfEvSel.getHfCollisionRejectionMask(collision, centrality, ccdb, registry); - + const auto bc = collision.template foundBC_as(); + const auto ir = mRateFetcher.fetch(ccdb.service, bc.timestamp(), bc.runNumber(), irSource, true); // Hz /// monitor the satisfied event selections - hfEvSel.fillHistograms(collision, rejectionMask, centrality); + hfEvSel.fillHistograms(collision, rejectionMask, centrality, occupancy, ir); } /// end loop over collisions } diff --git a/PWGHF/TableProducer/candidateCreatorXic0Omegac0.cxx b/PWGHF/TableProducer/candidateCreatorXic0Omegac0.cxx index 25cbd949fe9..cfffb20ef64 100644 --- a/PWGHF/TableProducer/candidateCreatorXic0Omegac0.cxx +++ b/PWGHF/TableProducer/candidateCreatorXic0Omegac0.cxx @@ -31,6 +31,7 @@ #include "PWGLF/DataModel/LFStrangenessTables.h" #include "PWGLF/DataModel/mcCentrality.h" +#include "Common/CCDB/ctpRateFetcher.h" #include "Common/Core/RecoDecay.h" #include "Common/Core/trackUtilities.h" #include "Common/DataModel/Centrality.h" @@ -127,6 +128,7 @@ struct HfCandidateCreatorXic0Omegac0 { Configurable ccdbPathLut{"ccdbPathLut", "GLO/Param/MatLUT", "Path for LUT parametrization"}; Configurable ccdbPathGrp{"ccdbPathGrp", "GLO/GRP/GRP", "Path of the grp file (Run 2)"}; Configurable ccdbPathGrpMag{"ccdbPathGrpMag", "GLO/Config/GRPMagField", "CCDB path of the GRPMagField object (Run 3)"}; + Configurable irSource{"irSource", "ZNC hadronic", "Estimator of the interaction rate (Recommended: pp --> T0VTX, Pb-Pb --> ZNC hadronic)"}; // KFParticle process setting // V0 cuts @@ -145,6 +147,7 @@ struct HfCandidateCreatorXic0Omegac0 { Service ccdb; o2::base::MatLayerCylSet* lut{}; o2::base::Propagator::MatCorrType matCorr = o2::base::Propagator::MatCorrType::USEMatCorrLUT; + ctpRateFetcher mRateFetcher; int runNumber{-1}; double magneticField{0.}; @@ -2233,10 +2236,12 @@ struct HfCandidateCreatorXic0Omegac0 { /// bitmask with event. selection info float centrality{-1.f}; + const auto occupancy = o2::hf_occupancy::getOccupancyColl(collision, hfEvSel.occEstimator); const auto rejectionMask = hfEvSel.getHfCollisionRejectionMask(collision, centrality, ccdb, registry); - + const auto bc = collision.template foundBC_as(); + const auto ir = mRateFetcher.fetch(ccdb.service, bc.timestamp(), bc.runNumber(), irSource, true); // Hz /// monitor the satisfied event selections - hfEvSel.fillHistograms(collision, rejectionMask, centrality); + hfEvSel.fillHistograms(collision, rejectionMask, centrality, occupancy, ir); } /// end loop over collisions } @@ -2250,10 +2255,12 @@ struct HfCandidateCreatorXic0Omegac0 { /// bitmask with event. selection info float centrality{-1.f}; + const auto occupancy = o2::hf_occupancy::getOccupancyColl(collision, hfEvSel.occEstimator); const auto rejectionMask = hfEvSel.getHfCollisionRejectionMask(collision, centrality, ccdb, registry); - + const auto bc = collision.template foundBC_as(); + const auto ir = mRateFetcher.fetch(ccdb.service, bc.timestamp(), bc.runNumber(), irSource, true); // Hz /// monitor the satisfied event selections - hfEvSel.fillHistograms(collision, rejectionMask, centrality); + hfEvSel.fillHistograms(collision, rejectionMask, centrality, occupancy, ir); } /// end loop over collisions } @@ -2267,10 +2274,12 @@ struct HfCandidateCreatorXic0Omegac0 { /// bitmask with event. selection info float centrality{-1.f}; + const auto occupancy = o2::hf_occupancy::getOccupancyColl(collision, hfEvSel.occEstimator); const auto rejectionMask = hfEvSel.getHfCollisionRejectionMask(collision, centrality, ccdb, registry); - + const auto bc = collision.template foundBC_as(); + const auto ir = mRateFetcher.fetch(ccdb.service, bc.timestamp(), bc.runNumber(), irSource, true); // Hz /// monitor the satisfied event selections - hfEvSel.fillHistograms(collision, rejectionMask, centrality); + hfEvSel.fillHistograms(collision, rejectionMask, centrality, occupancy, ir); } /// end loop over collisions } diff --git a/PWGHF/TableProducer/candidateCreatorXicToXiPiPi.cxx b/PWGHF/TableProducer/candidateCreatorXicToXiPiPi.cxx index 5984add510e..052e69377f4 100644 --- a/PWGHF/TableProducer/candidateCreatorXicToXiPiPi.cxx +++ b/PWGHF/TableProducer/candidateCreatorXicToXiPiPi.cxx @@ -31,6 +31,7 @@ #include "PWGLF/DataModel/LFStrangenessTables.h" #include "PWGLF/DataModel/mcCentrality.h" +#include "Common/CCDB/ctpRateFetcher.h" #include "Common/Core/RecoDecay.h" #include "Common/Core/trackUtilities.h" #include "Common/DataModel/Centrality.h" @@ -93,6 +94,7 @@ struct HfCandidateCreatorXicToXiPiPi { Configurable ccdbPathLut{"ccdbPathLut", "GLO/Param/MatLUT", "Path for LUT parametrization"}; Configurable ccdbPathGrp{"ccdbPathGrp", "GLO/GRP/GRP", "Path of the grp file (Run 2)"}; Configurable ccdbPathGrpMag{"ccdbPathGrpMag", "GLO/Config/GRPMagField", "CCDB path of the GRPMagField object (Run 3)"}; + Configurable irSource{"irSource", "ZNC hadronic", "Estimator of the interaction rate (Recommended: pp --> T0VTX, Pb-Pb --> ZNC hadronic)"}; // cascade preselections Configurable doCascadePreselection{"doCascadePreselection", true, "Use invariant mass and dcaXY cuts to preselect cascade candidates"}; Configurable massToleranceCascade{"massToleranceCascade", 0.01, "Invariant mass tolerance for cascade"}; @@ -114,6 +116,7 @@ struct HfCandidateCreatorXicToXiPiPi { Service ccdb; o2::base::MatLayerCylSet* lut{}; o2::base::Propagator::MatCorrType matCorr = o2::base::Propagator::MatCorrType::USEMatCorrLUT; + ctpRateFetcher mRateFetcher; o2::vertexing::DCAFitterN<3> df; @@ -802,9 +805,10 @@ struct HfCandidateCreatorXicToXiPiPi { float centrality{-1.f}; const auto occupancy = o2::hf_occupancy::getOccupancyColl(collision, hfEvSel.occEstimator); const auto rejectionMask = hfEvSel.getHfCollisionRejectionMask(collision, centrality, ccdb, registry); - + const auto bc = collision.template foundBC_as(); + const auto ir = mRateFetcher.fetch(ccdb.service, bc.timestamp(), bc.runNumber(), irSource, true); // Hz /// monitor the satisfied event selections - hfEvSel.fillHistograms(collision, rejectionMask, centrality, occupancy); + hfEvSel.fillHistograms(collision, rejectionMask, centrality, occupancy, ir); } /// end loop over collisions } @@ -819,9 +823,10 @@ struct HfCandidateCreatorXicToXiPiPi { float centrality{-1.f}; const auto occupancy = o2::hf_occupancy::getOccupancyColl(collision, hfEvSel.occEstimator); const auto rejectionMask = hfEvSel.getHfCollisionRejectionMask(collision, centrality, ccdb, registry); - + const auto bc = collision.template foundBC_as(); + const auto ir = mRateFetcher.fetch(ccdb.service, bc.timestamp(), bc.runNumber(), irSource, true); // Hz /// monitor the satisfied event selections - hfEvSel.fillHistograms(collision, rejectionMask, centrality, occupancy); + hfEvSel.fillHistograms(collision, rejectionMask, centrality, occupancy, ir); } /// end loop over collisions } @@ -836,9 +841,10 @@ struct HfCandidateCreatorXicToXiPiPi { float centrality{-1.f}; const auto occupancy = o2::hf_occupancy::getOccupancyColl(collision, hfEvSel.occEstimator); const auto rejectionMask = hfEvSel.getHfCollisionRejectionMask(collision, centrality, ccdb, registry); - + const auto bc = collision.template foundBC_as(); + const auto ir = mRateFetcher.fetch(ccdb.service, bc.timestamp(), bc.runNumber(), irSource, true); // Hz /// monitor the satisfied event selections - hfEvSel.fillHistograms(collision, rejectionMask, centrality, occupancy); + hfEvSel.fillHistograms(collision, rejectionMask, centrality, occupancy, ir); } /// end loop over collisions } diff --git a/PWGHF/Utils/utilsEvSelHf.h b/PWGHF/Utils/utilsEvSelHf.h index b1dc8ba8d71..bce9d4c32fd 100644 --- a/PWGHF/Utils/utilsEvSelHf.h +++ b/PWGHF/Utils/utilsEvSelHf.h @@ -25,6 +25,7 @@ #include "Common/CCDB/EventSelectionParams.h" #include "Common/CCDB/RCTSelectionFlags.h" +#include "Common/CCDB/ctpRateFetcher.h" #include "Common/Core/Zorro.h" #include "Common/Core/ZorroSummary.h" @@ -175,6 +176,7 @@ struct HfEventSelection : o2::framework::ConfigurableGroup { o2::framework::Configurable ccdbPathSoftwareTrigger{"ccdbPathSoftwareTrigger", "EventFiltering/Zorro/", "ccdb path for ZORRO objects"}; o2::framework::ConfigurableAxis th2ConfigAxisCent{"th2ConfigAxisCent", {100, 0., 100.}, ""}; o2::framework::ConfigurableAxis th2ConfigAxisOccupancy{"th2ConfigAxisOccupancy", {100, 0, 100000}, ""}; + o2::framework::ConfigurableAxis th2ConfigAxisInteractionRate{"th2ConfigAxisInteractionRate", {500, 0, 50000}, ""}; o2::framework::Configurable requireGoodRct{"requireGoodRct", false, "Flag to require good RCT"}; o2::framework::Configurable rctLabel{"rctLabel", "CBT_hadronPID", "RCT selection flag (CBT, CBT_hadronPID, CBT_electronPID, CBT_calo, CBT_muon, CBT_muon_glo)"}; o2::framework::Configurable rctCheckZDC{"rctCheckZDC", false, "RCT flag to check whether the ZDC is present or not"}; @@ -192,10 +194,12 @@ struct HfEventSelection : o2::framework::ConfigurableGroup { static constexpr char NameHistPosYAfterEvSel[] = "hPosYAfterEvSel"; static constexpr char NameHistNumPvContributorsAfterSel[] = "hNumPvContributorsAfterSel"; static constexpr char NameHistCollisionsCentOcc[] = "hCollisionsCentOcc"; + static constexpr char NameHistCollisionsCentIR[] = "hCollisionsCentIR"; static constexpr char NameHistUpCollisions[] = "hUpCollisions"; std::shared_ptr hCollisions, hSelCollisionsCent, hPosZBeforeEvSel, hPosZAfterEvSel, hPosXAfterEvSel, hPosYAfterEvSel, hNumPvContributorsAfterSel, hUpCollisions; std::shared_ptr hCollisionsCentOcc; + std::shared_ptr hCollisionsCentIR; // util to retrieve the RCT info from CCDB o2::aod::rctsel::RCTFlagsChecker rctChecker; @@ -235,7 +239,10 @@ struct HfEventSelection : o2::framework::ConfigurableGroup { hUpCollisions = registry.add(NameHistUpCollisions, "HF UPC counter;;# of UPC events", {o2::framework::HistType::kTH1D, {axisUpcEvents}}); const o2::framework::AxisSpec th2AxisCent{th2ConfigAxisCent, "Centrality"}; const o2::framework::AxisSpec th2AxisOccupancy{th2ConfigAxisOccupancy, "Occupancy"}; + const o2::framework::AxisSpec th2AxisInteractionRate{th2ConfigAxisInteractionRate, "Interaction Rate [Hz]"}; + hCollisionsCentOcc = registry.add(NameHistCollisionsCentOcc, "selected events;Centrality; Occupancy", {o2::framework::HistType::kTH2D, {th2AxisCent, th2AxisOccupancy}}); + hCollisionsCentIR = registry.add(NameHistCollisionsCentIR, "selected events;Centrality; Interaction Rate [Hz]", {o2::framework::HistType::kTH2D, {th2AxisCent, th2AxisInteractionRate}}); } /// \brief Inits the HF event selection object @@ -402,7 +409,8 @@ struct HfEventSelection : o2::framework::ConfigurableGroup { void fillHistograms(TCollision const& collision, const HfCollisionRejectionMask rejectionMask, const float centrality, - const float occupancy = -1.f) + const float occupancy = -1.f, + const float ir = -1.f) { hCollisions->Fill(EventRejection::None); const auto posZ = collision.posZ(); @@ -421,6 +429,7 @@ struct HfEventSelection : o2::framework::ConfigurableGroup { hNumPvContributorsAfterSel->Fill(collision.numContrib()); hSelCollisionsCent->Fill(centrality); hCollisionsCentOcc->Fill(centrality, occupancy); + hCollisionsCentIR->Fill(centrality, ir); } };