diff --git a/EventFiltering/Zorro.cxx b/EventFiltering/Zorro.cxx index 3f9ca800024..f10fbd66552 100644 --- a/EventFiltering/Zorro.cxx +++ b/EventFiltering/Zorro.cxx @@ -202,6 +202,7 @@ std::vector Zorro::initCCDB(o2::ccdb::BasicCCDBManager* ccdb, int runNumber mTOIidx.push_back(bin); } mTOIcounts.resize(mTOIs.size(), 0); + mATcounts.resize(mSelections->GetNbinsX() - 2, 0); LOGF(info, "Zorro initialized for run %d, triggers of interest:", runNumber); for (size_t i{0}; i < mTOIs.size(); ++i) { LOGF(info, ">>> %s : %i", mTOIs[i].data(), mTOIidx[i]); @@ -235,8 +236,11 @@ std::bitset<128> Zorro::fetch(uint64_t bcGlobalId, uint64_t tolerance) for (int iTOI{0}; iTOI < 64; ++iTOI) { if (mZorroHelpers->at(i).selMask[iMask] & (1ull << iTOI)) { mLastResult.set(iMask * 64 + iTOI, 1); - if (mAnalysedTriggers && !mAccountedBCranges[i]) { - mAnalysedTriggers->Fill(iMask * 64 + iTOI); + if (!mAccountedBCranges[i]) { + mATcounts[iMask * 64 + iTOI]++; + if (mAnalysedTriggers) { + mAnalysedTriggers->Fill(iMask * 64 + iTOI); + } } } } diff --git a/EventFiltering/Zorro.h b/EventFiltering/Zorro.h index 8cab70192c5..f5cb580061a 100644 --- a/EventFiltering/Zorro.h +++ b/EventFiltering/Zorro.h @@ -59,6 +59,7 @@ class Zorro TH1D* getInspectedTVX() const { return mInspectedTVX; } std::bitset<128> getLastResult() const { return mLastResult; } std::vector getTOIcounters() const { return mTOIcounts; } + std::vector getATcounters() const { return mATcounts; } std::vector getTriggerOfInterestResults(uint64_t bcGlobalId, uint64_t tolerance = 100); std::vector getTriggerOfInterestResults() const; int getNTOIs() const { return mTOIs.size(); } @@ -98,6 +99,7 @@ class Zorro std::vector mTOIs; std::vector mTOIidx; std::vector mTOIcounts; + std::vector mATcounts; o2::ccdb::BasicCCDBManager* mCCDB = nullptr; }; diff --git a/PWGEM/Dilepton/Core/Dilepton.h b/PWGEM/Dilepton/Core/Dilepton.h index 8fd18e97c56..18815b73ee0 100644 --- a/PWGEM/Dilepton/Core/Dilepton.h +++ b/PWGEM/Dilepton/Core/Dilepton.h @@ -72,7 +72,7 @@ using namespace o2::aod::pwgem::dilepton::utils::pairutil; using MyCollisions = soa::Join; using MyCollision = MyCollisions::iterator; -using MyCollisionsWithSWT = soa::Join; +using MyCollisionsWithSWT = soa::Join; using MyCollisionWithSWT = MyCollisionsWithSWT::iterator; using MyElectrons = soa::Join; @@ -427,7 +427,13 @@ struct Dilepton { fRegistry.addClone("Event/before/hCollisionCounter", "Event/norm/hCollisionCounter"); } if (doprocessTriggerAnalysis) { - fRegistry.add("Event/hNInspectedTVX", "N inspected TVX;run number;N_{TVX}", kTProfile, {{80000, 520000.5, 600000.5}}, true); + LOGF(info, "Trigger analysis is enabled. Desired trigger name = %s", cfg_swt_name.value); + fRegistry.add("NormTrigger/hInspectedTVX", "inspected TVX;run number;N_{TVX}", kTProfile, {{80000, 520000.5, 600000.5}}, true); + fRegistry.add("NormTrigger/hScalers", "trigger counter before DS;run number;counter", kTProfile, {{80000, 520000.5, 600000.5}}, true); + fRegistry.add("NormTrigger/hSelections", "trigger counter after DS;run number;counter", kTProfile, {{80000, 520000.5, 600000.5}}, true); + auto hTriggerCounter = fRegistry.add("NormTrigger/hTriggerCounter", Form("trigger counter of %s;run number;", cfg_swt_name.value.data()), kTH2D, {{80000, 520000.5, 600000.5}, {2, -0.5, 1.5}}, false); + hTriggerCounter->GetYaxis()->SetBinLabel(1, "Analyzed Trigger"); + hTriggerCounter->GetYaxis()->SetBinLabel(2, "Analyzed TOI"); } if (doprocessBC) { auto hTVXCounter = fRegistry.add("BC/hTVXCounter", "TVX counter", kTH1D, {{6, -0.5f, 5.5f}}); @@ -440,7 +446,7 @@ struct Dilepton { } } - template + template void initCCDB(TCollision const& collision) { if (mRunNumber == collision.runNumber()) { @@ -494,12 +500,6 @@ struct Dilepton { beamP2 = std::sqrt(std::pow(beamE2, 2) - std::pow(beamM2, 2)); LOGF(info, "beamZ1 = %d, beamZ2 = %d, beamA1 = %d, beamA2 = %d, beamE1 = %f (GeV), beamE2 = %f (GeV), beamM1 = %f (GeV), beamM2 = %f (GeV), beamP1 = %f (GeV), beamP2 = %f (GeV)", beamZ1, beamZ2, beamA1, beamA2, beamE1, beamE2, beamM1, beamM2, beamP1, beamP2); - if constexpr (isTriggerAnalysis) { - LOGF(info, "Trigger analysis is enabled. Desired trigger name = %s", cfg_swt_name.value); - LOGF(info, "total inspected TVX events = %d in run number %d", collision.nInspectedTVX(), collision.runNumber()); - fRegistry.fill(HIST("Event/hNInspectedTVX"), collision.runNumber(), collision.nInspectedTVX()); - } - if (cfgApplySPresolution) { auto list = ccdb->getForTimeStamp(spresoPath, collision.timestamp()); h2sp_resolution = reinterpret_cast(list->FindObject(spresoHistName.value.data())); @@ -1164,7 +1164,7 @@ struct Dilepton { void runPairing(TCollisions const& collisions, TLeptons const& posTracks, TLeptons const& negTracks, TPresilce const& perCollision, TCut const& cut, TAllTracks const& tracks) { for (const auto& collision : collisions) { - initCCDB(collision); + initCCDB(collision); const float centralities[3] = {collision.centFT0M(), collision.centFT0A(), collision.centFT0C()}; float centrality = centralities[cfgCentEstimator]; if (centralities[cfgCentEstimator] < cfgCentMin || cfgCentMax < centralities[cfgCentEstimator]) { @@ -1412,7 +1412,7 @@ struct Dilepton { passed_pairIds.reserve(posTracks.size() * negTracks.size()); for (const auto& collision : collisions) { - initCCDB(collision); + initCCDB(collision); const float centralities[3] = {collision.centFT0M(), collision.centFT0A(), collision.centFT0C()}; if (centralities[cfgCentEstimator] < cfgCentMin || cfgCentMax < centralities[cfgCentEstimator]) { continue; @@ -1531,8 +1531,8 @@ struct Dilepton { } PROCESS_SWITCH(Dilepton, processAnalysis, "run dilepton analysis", true); - // using FilteredMyCollisionsWithSWT = soa::Filtered; - void processTriggerAnalysis(MyCollisionsWithSWT const& collisions, Types const&... args) + using FilteredMyCollisionsWithSWT = soa::Filtered; + void processTriggerAnalysis(FilteredMyCollisionsWithSWT const& collisions, aod::EMSWTriggerInfos const& cefpinfos, aod::EMSWTriggerCounters const& counters, Types const&... args) { if constexpr (pairtype == o2::aod::pwgem::dilepton::utils::pairutil::DileptonPairType::kDielectron) { auto electrons = std::get<0>(std::tie(args...)); @@ -1549,6 +1549,23 @@ struct Dilepton { } map_weight.clear(); ndf++; + + // for nomalization + int emswtId = o2::aod::pwgem::dilepton::swt::aliasLabels.at(cfg_swt_name.value); + for (const auto& counter : counters) { + if (counter.isAnalyzed_bit(emswtId)) { + fRegistry.fill(HIST("NormTrigger/hTriggerCounter"), mRunNumber, 0); + } + if (counter.isAnalyzedToI_bit(emswtId)) { + fRegistry.fill(HIST("NormTrigger/hTriggerCounter"), mRunNumber, 1); + } + } + + for (const auto& info : cefpinfos) { + fRegistry.fill(HIST("NormTrigger/hInspectedTVX"), info.runNumber(), info.nInspectedTVX()); + fRegistry.fill(HIST("NormTrigger/hScalers"), info.runNumber(), info.nScalers()[emswtId]); + fRegistry.fill(HIST("NormTrigger/hSelections"), info.runNumber(), info.nSelections()[emswtId]); + } } PROCESS_SWITCH(Dilepton, processTriggerAnalysis, "run dilepton analysis on triggered data", false); diff --git a/PWGEM/Dilepton/Core/DileptonHadronMPC.h b/PWGEM/Dilepton/Core/DileptonHadronMPC.h index 28df971c52c..ae423fd7a68 100644 --- a/PWGEM/Dilepton/Core/DileptonHadronMPC.h +++ b/PWGEM/Dilepton/Core/DileptonHadronMPC.h @@ -74,7 +74,7 @@ using namespace o2::aod::pwgem::dilepton::utils::pairutil; using MyCollisions = soa::Join; using MyCollision = MyCollisions::iterator; -using MyCollisionsWithSWT = soa::Join; +using MyCollisionsWithSWT = soa::Join; using MyCollisionWithSWT = MyCollisionsWithSWT::iterator; using MyElectrons = soa::Join; @@ -390,7 +390,13 @@ struct DileptonHadronMPC { } if (doprocessTriggerAnalysis) { - fRegistry.add("Event/hNInspectedTVX", "N inspected TVX;run number;N_{TVX}", kTProfile, {{80000, 520000.5, 600000.5}}, true); + LOGF(info, "Trigger analysis is enabled. Desired trigger name = %s", cfg_swt_name.value); + fRegistry.add("NormTrigger/hInspectedTVX", "inspected TVX;run number;N_{TVX}", kTProfile, {{80000, 520000.5, 600000.5}}, true); + fRegistry.add("NormTrigger/hScalers", "trigger counter before DS;run number;counter", kTProfile, {{80000, 520000.5, 600000.5}}, true); + fRegistry.add("NormTrigger/hSelections", "trigger counter after DS;run number;counter", kTProfile, {{80000, 520000.5, 600000.5}}, true); + auto hTriggerCounter = fRegistry.add("NormTrigger/hTriggerCounter", Form("trigger counter of %s;run number;", cfg_swt_name.value.data()), kTH2D, {{80000, 520000.5, 600000.5}, {2, -0.5, 1.5}}, false); + hTriggerCounter->GetYaxis()->SetBinLabel(1, "Analyzed Trigger"); + hTriggerCounter->GetYaxis()->SetBinLabel(2, "Analyzed TOI"); } } @@ -437,8 +443,8 @@ struct DileptonHadronMPC { if constexpr (isTriggerAnalysis) { LOGF(info, "Trigger analysis is enabled. Desired trigger name = %s", cfg_swt_name.value); - LOGF(info, "total inspected TVX events = %d in run number %d", collision.nInspectedTVX(), collision.runNumber()); - fRegistry.fill(HIST("Event/hNInspectedTVX"), collision.runNumber(), collision.nInspectedTVX()); + // LOGF(info, "total inspected TVX events = %d in run number %d", collision.nInspectedTVX(), collision.runNumber()); + // fRegistry.fill(HIST("Event/hNInspectedTVX"), collision.runNumber(), collision.nInspectedTVX()); } } @@ -1431,8 +1437,8 @@ struct DileptonHadronMPC { } PROCESS_SWITCH(DileptonHadronMPC, processAnalysis, "run dilepton analysis", true); - // using FilteredMyCollisionsWithSWT = soa::Filtered; - void processTriggerAnalysis(MyCollisionsWithSWT const& collisions, FilteredRefTracks const& refTracks, Types const&... args) + using FilteredMyCollisionsWithSWT = soa::Filtered; + void processTriggerAnalysis(FilteredMyCollisionsWithSWT const& collisions, FilteredRefTracks const& refTracks, aod::EMSWTriggerInfos const& cefpinfos, aod::EMSWTriggerCounters const& counters, Types const&... args) { if constexpr (pairtype == o2::aod::pwgem::dilepton::utils::pairutil::DileptonPairType::kDielectron) { auto electrons = std::get<0>(std::tie(args...)); @@ -1449,6 +1455,23 @@ struct DileptonHadronMPC { } map_weight.clear(); ndf++; + + // for nomalization + int emswtId = o2::aod::pwgem::dilepton::swt::aliasLabels.at(cfg_swt_name.value); + for (const auto& counter : counters) { + if (counter.isAnalyzed_bit(emswtId)) { + fRegistry.fill(HIST("NormTrigger/hTriggerCounter"), mRunNumber, 0); + } + if (counter.isAnalyzedToI_bit(emswtId)) { + fRegistry.fill(HIST("NormTrigger/hTriggerCounter"), mRunNumber, 1); + } + } + + for (const auto& info : cefpinfos) { + fRegistry.fill(HIST("NormTrigger/hInspectedTVX"), info.runNumber(), info.nInspectedTVX()); + fRegistry.fill(HIST("NormTrigger/hScalers"), info.runNumber(), info.nScalers()[emswtId]); + fRegistry.fill(HIST("NormTrigger/hSelections"), info.runNumber(), info.nSelections()[emswtId]); + } } PROCESS_SWITCH(DileptonHadronMPC, processTriggerAnalysis, "run dilepton analysis on triggered data", false); diff --git a/PWGEM/Dilepton/Core/PhotonHBT.h b/PWGEM/Dilepton/Core/PhotonHBT.h index 796f0c5da2b..9948eac03a2 100644 --- a/PWGEM/Dilepton/Core/PhotonHBT.h +++ b/PWGEM/Dilepton/Core/PhotonHBT.h @@ -74,7 +74,7 @@ using namespace o2::aod::pwgem::dilepton::core::photonhbt; using MyCollisions = soa::Join; using MyCollision = MyCollisions::iterator; -using MyCollisionsWithSWT = soa::Join; +using MyCollisionsWithSWT = soa::Join; using MyCollisionWithSWT = MyCollisionsWithSWT::iterator; using MyV0Photons = soa::Join; @@ -390,7 +390,13 @@ struct PhotonHBT { fRegistry.add("Pair/mix/hDiffBC", "diff. global BC in mixed event;|BC_{current} - BC_{mixed}|", kTH1D, {{10001, -0.5, 10000.5}}, true); if (doprocessTriggerAnalysis) { - fRegistry.add("Event/hNInspectedTVX", "N inspected TVX;run number;N_{TVX}", kTProfile, {{80000, 520000.5, 600000.5}}, true); + LOGF(info, "Trigger analysis is enabled. Desired trigger name = %s", cfg_swt_name.value); + fRegistry.add("NormTrigger/hInspectedTVX", "inspected TVX;run number;N_{TVX}", kTProfile, {{80000, 520000.5, 600000.5}}, true); + fRegistry.add("NormTrigger/hScalers", "trigger counter before DS;run number;counter", kTProfile, {{80000, 520000.5, 600000.5}}, true); + fRegistry.add("NormTrigger/hSelections", "trigger counter after DS;run number;counter", kTProfile, {{80000, 520000.5, 600000.5}}, true); + auto hTriggerCounter = fRegistry.add("NormTrigger/hTriggerCounter", Form("trigger counter of %s;run number;", cfg_swt_name.value.data()), kTH2D, {{80000, 520000.5, 600000.5}, {2, -0.5, 1.5}}, false); + hTriggerCounter->GetYaxis()->SetBinLabel(1, "Analyzed Trigger"); + hTriggerCounter->GetYaxis()->SetBinLabel(2, "Analyzed TOI"); } } @@ -434,8 +440,8 @@ struct PhotonHBT { if constexpr (isTriggerAnalysis) { LOGF(info, "Trigger analysis is enabled. Desired trigger name = %s", cfg_swt_name.value); - LOGF(info, "total inspected TVX events = %d in run number %d", collision.nInspectedTVX(), collision.runNumber()); - fRegistry.fill(HIST("Event/hNInspectedTVX"), collision.runNumber(), collision.nInspectedTVX()); + // LOGF(info, "total inspected TVX events = %d in run number %d", collision.nInspectedTVX(), collision.runNumber()); + // fRegistry.fill(HIST("Event/hNInspectedTVX"), collision.runNumber(), collision.nInspectedTVX()); } } @@ -1454,7 +1460,7 @@ struct PhotonHBT { PROCESS_SWITCH(PhotonHBT, processAnalysis, "pairing for analysis", false); using FilteredMyCollisionsWithSWT = soa::Filtered; - void processTriggerAnalysis(FilteredMyCollisionsWithSWT const& collisions, Types const&... args) + void processTriggerAnalysis(FilteredMyCollisionsWithSWT const& collisions, aod::EMSWTriggerInfos const& cefpinfos, aod::EMSWTriggerCounters const& counters, Types const&... args) { if constexpr (pairtype == ggHBTPairType::kPCMPCM) { auto v0photons = std::get<0>(std::tie(args...)); @@ -1476,6 +1482,23 @@ struct PhotonHBT { runPairing(collisions, nullptr, nullptr, emprimaryelectrons, emprimaryelectrons, perCollision_electron, perCollision_electron, fDielectronCut, fDielectronCut); } ndf++; + + // for nomalization + int emswtId = o2::aod::pwgem::dilepton::swt::aliasLabels.at(cfg_swt_name.value); + for (const auto& counter : counters) { + if (counter.isAnalyzed_bit(emswtId)) { + fRegistry.fill(HIST("NormTrigger/hTriggerCounter"), mRunNumber, 0); + } + if (counter.isAnalyzedToI_bit(emswtId)) { + fRegistry.fill(HIST("NormTrigger/hTriggerCounter"), mRunNumber, 1); + } + } + + for (const auto& info : cefpinfos) { + fRegistry.fill(HIST("NormTrigger/hInspectedTVX"), info.runNumber(), info.nInspectedTVX()); + fRegistry.fill(HIST("NormTrigger/hScalers"), info.runNumber(), info.nScalers()[emswtId]); + fRegistry.fill(HIST("NormTrigger/hSelections"), info.runNumber(), info.nSelections()[emswtId]); + } } PROCESS_SWITCH(PhotonHBT, processTriggerAnalysis, "pairing analysis on trigger data", false); diff --git a/PWGEM/Dilepton/Core/SingleTrackQC.h b/PWGEM/Dilepton/Core/SingleTrackQC.h index 186efbd0e87..1af8b9f48fa 100644 --- a/PWGEM/Dilepton/Core/SingleTrackQC.h +++ b/PWGEM/Dilepton/Core/SingleTrackQC.h @@ -55,7 +55,7 @@ using namespace o2::aod::pwgem::dilepton::utils::emtrackutil; using MyCollisions = soa::Join; using MyCollision = MyCollisions::iterator; -using MyCollisionsWithSWT = soa::Join; +using MyCollisionsWithSWT = soa::Join; using MyCollisionWithSWT = MyCollisionsWithSWT::iterator; using MyElectrons = soa::Join; @@ -327,7 +327,13 @@ struct SingleTrackQC { fRegistry.addClone("Event/before/hCollisionCounter", "Event/norm/hCollisionCounter"); } if (doprocessQC_TriggeredData) { - fRegistry.add("Event/hNInspectedTVX", "N inspected TVX;run number;N_{TVX}", kTProfile, {{80000, 520000.5, 600000.5}}, true); + LOGF(info, "Trigger analysis is enabled. Desired trigger name = %s", cfg_swt_name.value); + fRegistry.add("NormTrigger/hInspectedTVX", "inspected TVX;run number;N_{TVX}", kTProfile, {{80000, 520000.5, 600000.5}}, true); + fRegistry.add("NormTrigger/hScalers", "trigger counter before DS;run number;counter", kTProfile, {{80000, 520000.5, 600000.5}}, true); + fRegistry.add("NormTrigger/hSelections", "trigger counter after DS;run number;counter", kTProfile, {{80000, 520000.5, 600000.5}}, true); + auto hTriggerCounter = fRegistry.add("NormTrigger/hTriggerCounter", Form("trigger counter of %s;run number;", cfg_swt_name.value.data()), kTH2D, {{80000, 520000.5, 600000.5}, {2, -0.5, 1.5}}, false); + hTriggerCounter->GetYaxis()->SetBinLabel(1, "Analyzed Trigger"); + hTriggerCounter->GetYaxis()->SetBinLabel(2, "Analyzed TOI"); } if (doprocessBC) { auto hTVXCounter = fRegistry.add("BC/hTVXCounter", "TVX counter", kTH1D, {{6, -0.5f, 5.5f}}); @@ -351,8 +357,8 @@ struct SingleTrackQC { if constexpr (isTriggerAnalysis) { LOGF(info, "Trigger analysis is enabled. Desired trigger name = %s", cfg_swt_name.value); - LOGF(info, "total inspected TVX events = %d in run number %d", collision.nInspectedTVX(), collision.runNumber()); - fRegistry.fill(HIST("Event/hNInspectedTVX"), collision.runNumber(), collision.nInspectedTVX()); + // LOGF(info, "total inspected TVX events = %d in run number %d", collision.nInspectedTVX(), collision.runNumber()); + // fRegistry.fill(HIST("Event/hNInspectedTVX"), collision.runNumber(), collision.nInspectedTVX()); } } @@ -806,8 +812,8 @@ struct SingleTrackQC { } PROCESS_SWITCH(SingleTrackQC, processQC, "run single track QC", true); - // using FilteredMyCollisionsWithSWT = soa::Filtered; - void processQC_TriggeredData(MyCollisionsWithSWT const& collisions, Types const&... args) + using FilteredMyCollisionsWithSWT = soa::Filtered; + void processQC_TriggeredData(FilteredMyCollisionsWithSWT const& collisions, aod::EMSWTriggerInfos const& cefpinfos, aod::EMSWTriggerCounters const& counters, Types const&... args) { if constexpr (pairtype == o2::aod::pwgem::dilepton::utils::pairutil::DileptonPairType::kDielectron) { auto electrons = std::get<0>(std::tie(args...)); @@ -822,8 +828,24 @@ struct SingleTrackQC { } runQC(collisions, muons, perCollision_muon, fDimuonCut); } - map_weight.clear(); + + // for nomalization + int emswtId = o2::aod::pwgem::dilepton::swt::aliasLabels.at(cfg_swt_name.value); + for (const auto& counter : counters) { + if (counter.isAnalyzed_bit(emswtId)) { + fRegistry.fill(HIST("NormTrigger/hTriggerCounter"), mRunNumber, 0); + } + if (counter.isAnalyzedToI_bit(emswtId)) { + fRegistry.fill(HIST("NormTrigger/hTriggerCounter"), mRunNumber, 1); + } + } + + for (const auto& info : cefpinfos) { + fRegistry.fill(HIST("NormTrigger/hInspectedTVX"), info.runNumber(), info.nInspectedTVX()); + fRegistry.fill(HIST("NormTrigger/hScalers"), info.runNumber(), info.nScalers()[emswtId]); + fRegistry.fill(HIST("NormTrigger/hSelections"), info.runNumber(), info.nSelections()[emswtId]); + } } PROCESS_SWITCH(SingleTrackQC, processQC_TriggeredData, "run single track QC on triggered data", false); diff --git a/PWGEM/Dilepton/DataModel/dileptonTables.h b/PWGEM/Dilepton/DataModel/dileptonTables.h index ae57b4cf69d..c19b5baa653 100644 --- a/PWGEM/Dilepton/DataModel/dileptonTables.h +++ b/PWGEM/Dilepton/DataModel/dileptonTables.h @@ -64,9 +64,13 @@ using EMBC = EMBCs::iterator; namespace emevent { DECLARE_SOA_COLUMN(CollisionId, collisionId, int); -DECLARE_SOA_BITMAP_COLUMN(SWTAliasTmp, swtaliastmp, 16); //! Bitmask of fired trigger aliases (see above for definitions) to be join to aod::Collisions for skimming -DECLARE_SOA_BITMAP_COLUMN(SWTAlias, swtalias, 16); //! Bitmask of fired trigger aliases (see above for definitions) to be join to aod::EMEvents for analysis -DECLARE_SOA_COLUMN(NInspectedTVX, nInspectedTVX, uint64_t); +DECLARE_SOA_BITMAP_COLUMN(SWTAliasTmp, swtaliastmp, 16); //! Bitmask of fired trigger aliases (see above for definitions) to be join to aod::Collisions for skimming +DECLARE_SOA_BITMAP_COLUMN(SWTAlias, swtalias, 16); //! Bitmask of fired trigger aliases (see above for definitions) to be join to aod::EMEvents for analysis +DECLARE_SOA_COLUMN(NInspectedTVX, nInspectedTVX, uint64_t); //! the number of inspected TVX bcs per run +DECLARE_SOA_COLUMN(NScalars, nScalers, std::vector); //! the number of triggered bcs before down scaling per run +DECLARE_SOA_COLUMN(NSelections, nSelections, std::vector); //! the number of triggered bcs after down scaling per run +DECLARE_SOA_BITMAP_COLUMN(IsAnalyzed, isAnalyzed, 16); +DECLARE_SOA_BITMAP_COLUMN(IsAnalyzedToI, isAnalyzedToI, 16); DECLARE_SOA_COLUMN(NeeULS, neeuls, int); DECLARE_SOA_COLUMN(NeeLSpp, neelspp, int); DECLARE_SOA_COLUMN(NeeLSmm, neelsmm, int); @@ -204,14 +208,24 @@ DECLARE_SOA_TABLE(EMEventsQvec, "AOD", "EMEVENTQVEC", //! event q vector table // emevent::EP4BTot using EMEventQvec = EMEventsQvec::iterator; -DECLARE_SOA_TABLE(EMSWTriggerInfos, "AOD", "EMSWTRIGGERINFO", //! joinable to EMEvents - emevent::SWTAlias, emevent::NInspectedTVX); +DECLARE_SOA_TABLE(EMSWTriggerBits, "AOD", "EMSWTBIT", emevent::SWTAlias, o2::soa::Marker<1>); //! joinable to EMEvents +using EMSWTriggerBit = EMSWTriggerBits::iterator; + +DECLARE_SOA_TABLE(EMSWTriggerInfos, "AOD", "EMSWTINFO", bc::RunNumber, emevent::NInspectedTVX, emevent::NScalars, emevent::NSelections, o2::soa::Marker<1>); //! independent table. Don't join anything. using EMSWTriggerInfo = EMSWTriggerInfos::iterator; -DECLARE_SOA_TABLE(EMSWTriggerInfosTMP, "AOD", "EMSWTTMP", //! joinable to aod::Collisions - emevent::SWTAliasTmp, emevent::NInspectedTVX); +DECLARE_SOA_TABLE(EMSWTriggerCounters, "AOD", "EMSWTCOUNTER", emevent::IsAnalyzed, emevent::IsAnalyzedToI, o2::soa::Marker<1>); //! independent table. Don't join anything. +using EMSWTriggerCounter = EMSWTriggerCounters::iterator; + +DECLARE_SOA_TABLE(EMSWTriggerBitsTMP, "AOD", "EMSWTBITTMP", emevent::SWTAliasTmp, o2::soa::Marker<2>); //! joinable to aod::Collisions +using EMSWTriggerBitTMP = EMSWTriggerBitsTMP::iterator; + +DECLARE_SOA_TABLE(EMSWTriggerInfosTMP, "AOD", "EMSWTINFOTMP", bc::RunNumber, emevent::NInspectedTVX, emevent::NScalars, emevent::NSelections, o2::soa::Marker<2>); using EMSWTriggerInfoTMP = EMSWTriggerInfosTMP::iterator; +DECLARE_SOA_TABLE(EMSWTriggerCountersTMP, "AOD", "EMSWTCOUNTERTMP", emevent::IsAnalyzed, emevent::IsAnalyzedToI, o2::soa::Marker<2>); //! independent table. Don't join anything. +using EMSWTriggerCounterTMP = EMSWTriggerCountersTMP::iterator; + DECLARE_SOA_TABLE(EMEventsProperty, "AOD", "EMEVENTPROP", //! joinable to EMEvents emevent::SpherocityPtWeighted, emevent::SpherocityPtUnWeighted, emevent::NtrackSpherocity); using EMEventProperty = EMEventsProperty::iterator; diff --git a/PWGEM/Dilepton/TableProducer/createEMEventDilepton.cxx b/PWGEM/Dilepton/TableProducer/createEMEventDilepton.cxx index fb1bf5da2a0..88de61009d3 100644 --- a/PWGEM/Dilepton/TableProducer/createEMEventDilepton.cxx +++ b/PWGEM/Dilepton/TableProducer/createEMEventDilepton.cxx @@ -29,7 +29,9 @@ #include "Framework/runDataProcessing.h" #include "ReconstructionDataFormats/Track.h" +#include #include +#include using namespace o2; using namespace o2::aod; @@ -44,7 +46,7 @@ using MyCollisions = soa::Join; // centrality table has dependency on multiplicity table. using MyCollisions_Cent_Qvec = soa::Join; -using MyCollisionsWithSWT = soa::Join; +using MyCollisionsWithSWT = soa::Join; using MyCollisionsWithSWT_Cent = soa::Join; // centrality table has dependency on multiplicity table. using MyCollisionsWithSWT_Cent_Qvec = soa::Join; @@ -60,7 +62,9 @@ struct CreateEMEventDilepton { Produces event_mult; Produces event_cent; Produces event_qvec; - Produces emswtbit; + Produces emswtbit; + Produces emswtinfo; + Produces emswtcounter; Produces event_norm_info; enum class EMEventType : int { @@ -69,77 +73,26 @@ struct CreateEMEventDilepton { kEvent_Cent_Qvec = 2, }; - // CCDB options - Configurable ccdburl{"ccdb-url", "http://alice-ccdb.cern.ch", "url of the ccdb repository"}; - Configurable grpPath{"grpPath", "GLO/GRP/GRP", "Path of the grp file"}; - Configurable grpmagPath{"grpmagPath", "GLO/Config/GRPMagField", "CCDB path of the GRPMagField object"}; - Configurable skipGRPOquery{"skipGRPOquery", true, "skip grpo query"}; - Configurable d_bz_input{"d_bz", -999, "bz field, -999 is automatic"}; + // // CCDB options + // Configurable ccdburl{"ccdb-url", "http://alice-ccdb.cern.ch", "url of the ccdb repository"}; HistogramRegistry registry{"registry"}; void init(o2::framework::InitContext&) { - ccdb->setURL(ccdburl); - ccdb->setCaching(true); - ccdb->setLocalObjectValidityChecking(); - ccdb->setFatalWhenNull(false); + // ccdb->setURL(ccdburl); + // ccdb->setCaching(true); + // ccdb->setLocalObjectValidityChecking(); + // ccdb->setFatalWhenNull(false); auto hEventCounter = registry.add("hEventCounter", "hEventCounter", kTH1I, {{7, 0.5f, 7.5f}}); hEventCounter->GetXaxis()->SetBinLabel(1, "all"); hEventCounter->GetXaxis()->SetBinLabel(2, "sel8"); - - registry.add("hNInspectedTVX", "N inspected TVX;run number;N_{TVX}", kTProfile, {{80000, 520000.5, 600000.5}}, true); } ~CreateEMEventDilepton() {} - int mRunNumber; - float d_bz; - Service ccdb; - - template - void initCCDB(TBC const& bc) - { - if (mRunNumber == bc.runNumber()) { - return; - } - - // In case override, don't proceed, please - no CCDB access required - if (d_bz_input > -990) { - d_bz = d_bz_input; - o2::parameters::GRPMagField grpmag; - if (fabs(d_bz) > 1e-5) { - grpmag.setL3Current(30000.f / (d_bz / 5.0f)); - } - mRunNumber = bc.runNumber(); - return; - } - - auto run3grp_timestamp = bc.timestamp(); - o2::parameters::GRPObject* grpo = 0x0; - o2::parameters::GRPMagField* grpmag = 0x0; - if (!skipGRPOquery) - grpo = ccdb->getForTimeStamp(grpPath, run3grp_timestamp); - if (grpo) { - // Fetch magnetic field from ccdb for current collision - d_bz = grpo->getNominalL3Field(); - LOG(info) << "Retrieved GRP for timestamp " << run3grp_timestamp << " with magnetic field of " << d_bz << " kZG"; - } else { - grpmag = ccdb->getForTimeStamp(grpmagPath, run3grp_timestamp); - if (!grpmag) { - LOG(fatal) << "Got nullptr from CCDB for path " << grpmagPath << " of object GRPMagField and " << grpPath << " of object GRPObject for timestamp " << run3grp_timestamp; - } - // Fetch magnetic field from ccdb for current collision - d_bz = std::lround(5.f * grpmag->getL3Current() / 30000.f); - LOG(info) << "Retrieved GRP for timestamp " << run3grp_timestamp << " with magnetic field of " << d_bz << " kZG"; - } - mRunNumber = bc.runNumber(); - } - - // Preslice perBC = aod::collision::bcId; - // Preslice perCollision_pcm = aod::v0photonkf::collisionId; - // PresliceUnsorted perCollision_el = aod::emprimaryelectron::collisionId; - // PresliceUnsorted perCollision_mu = aod::emprimarymuon::collisionId; + int mRunNumber{0}; + // Service ccdb; template void skimEvent(TCollisions const& collisions, TBCs const& bcs) @@ -161,7 +114,6 @@ struct CreateEMEventDilepton { registry.fill(HIST("hEventCounter"), 1); auto bc = collision.template foundBC_as(); - initCCDB(bc); if (collision.selection_bit(o2::aod::evsel::kIsTriggerTVX)) { if constexpr (eventtype == EMEventType::kEvent) { @@ -185,7 +137,7 @@ struct CreateEMEventDilepton { if (collision.swtaliastmp_raw() == 0) { continue; } else { - emswtbit(collision.swtaliastmp_raw(), collision.nInspectedTVX()); + emswtbit(collision.swtaliastmp_raw()); } } @@ -257,23 +209,65 @@ struct CreateEMEventDilepton { } PROCESS_SWITCH(CreateEMEventDilepton, processEvent_Cent_Qvec, "process event info", false); - //---------- for data with swt---------- + //---------- for data with swt ---------- - void processEvent_SWT(MyCollisionsWithSWT const& collisions, MyBCs const& bcs) + void processEvent_SWT(MyCollisionsWithSWT const& collisions, MyBCs const& bcs, aod::EMSWTriggerInfosTMP const& emswtinfostmp, aod::EMSWTriggerCountersTMP const& emswtcounterstmp) { skimEvent(collisions, bcs); + + for (const auto& info : emswtinfostmp) { + if (mRunNumber != info.runNumber()) { + std::vector scalers; + std::vector selections; + std::copy(info.nScalers().begin(), info.nScalers().end(), std::back_inserter(scalers)); + std::copy(info.nSelections().begin(), info.nSelections().end(), std::back_inserter(selections)); + emswtinfo(info.runNumber(), info.nInspectedTVX(), scalers, selections); + mRunNumber = info.runNumber(); + } + } + for (const auto& counter : emswtcounterstmp) { + emswtcounter(counter.isAnalyzed_raw(), counter.isAnalyzedToI_raw()); + } } PROCESS_SWITCH(CreateEMEventDilepton, processEvent_SWT, "process event info", false); - void processEvent_SWT_Cent(MyCollisionsWithSWT_Cent const& collisions, MyBCs const& bcs) + void processEvent_SWT_Cent(MyCollisionsWithSWT_Cent const& collisions, MyBCs const& bcs, aod::EMSWTriggerInfosTMP const& emswtinfostmp, aod::EMSWTriggerCountersTMP const& emswtcounterstmp) { skimEvent(collisions, bcs); + + for (const auto& info : emswtinfostmp) { + if (mRunNumber != info.runNumber()) { + std::vector scalers; + std::vector selections; + std::copy(info.nScalers().begin(), info.nScalers().end(), std::back_inserter(scalers)); + std::copy(info.nSelections().begin(), info.nSelections().end(), std::back_inserter(selections)); + emswtinfo(info.runNumber(), info.nInspectedTVX(), scalers, selections); + mRunNumber = info.runNumber(); + } + } + for (const auto& counter : emswtcounterstmp) { + emswtcounter(counter.isAnalyzed_raw(), counter.isAnalyzedToI_raw()); + } } PROCESS_SWITCH(CreateEMEventDilepton, processEvent_SWT_Cent, "process event info", false); - void processEvent_SWT_Cent_Qvec(MyCollisionsWithSWT_Cent_Qvec const& collisions, MyBCs const& bcs) + void processEvent_SWT_Cent_Qvec(MyCollisionsWithSWT_Cent_Qvec const& collisions, MyBCs const& bcs, aod::EMSWTriggerInfosTMP const& emswtinfostmp, aod::EMSWTriggerCountersTMP const& emswtcounterstmp) { skimEvent(collisions, bcs); + + for (const auto& info : emswtinfostmp) { + if (mRunNumber != info.runNumber()) { + std::vector scalers; + std::vector selections; + std::copy(info.nScalers().begin(), info.nScalers().end(), std::back_inserter(scalers)); + std::copy(info.nSelections().begin(), info.nSelections().end(), std::back_inserter(selections)); + emswtinfo(info.runNumber(), info.nInspectedTVX(), scalers, selections); + mRunNumber = info.runNumber(); + } + } + for (const auto& counter : emswtcounterstmp) { + emswtcounter(counter.isAnalyzed_raw(), counter.isAnalyzedToI_raw()); + } } PROCESS_SWITCH(CreateEMEventDilepton, processEvent_SWT_Cent_Qvec, "process event info", false); diff --git a/PWGEM/Dilepton/TableProducer/skimmerOTS.cxx b/PWGEM/Dilepton/TableProducer/skimmerOTS.cxx index ece9aef306d..37a3af0215b 100644 --- a/PWGEM/Dilepton/TableProducer/skimmerOTS.cxx +++ b/PWGEM/Dilepton/TableProducer/skimmerOTS.cxx @@ -34,15 +34,26 @@ using namespace o2::framework::expressions; using namespace o2::soa; struct skimmerOTS { - Produces swt_tmp; + Produces swtinfo_tmp; // Join aod::Collision later. + Produces swtbit_tmp; + Produces swtcounter_tmp; // CCDB options Configurable ccdburl{"ccdb-url", "http://alice-ccdb.cern.ch", "url of the ccdb repository"}; Configurable cfg_swt_names{"cfg_swt_names", "fHighTrackMult,fHighFt0Mult", "comma-separated software trigger names"}; // !trigger names have to be pre-registered in dileptonTable.h for bit operation! + o2::framework::Configurable ccdbPathSoftwareTrigger{"ccdbPathSoftwareTrigger", "EventFiltering/Zorro/", "ccdb path for ZORRO objects"}; + Configurable bcMarginForSoftwareTrigger{"bcMarginForSoftwareTrigger", 100, "Number of BCs of margin for software triggers"}; std::vector swt_names; int mRunNumber; Service ccdb; + Zorro zorro; + std::vector mTOIidx; + uint64_t mNinspectedTVX{0}; + std::vector mScalers; + std::vector mSelections; + std::vector mTOICounters; + std::vector mATCounters; HistogramRegistry registry{"registry"}; void init(o2::framework::InitContext&) @@ -51,6 +62,7 @@ struct skimmerOTS { ccdb->setCaching(true); ccdb->setLocalObjectValidityChecking(); ccdb->setFatalWhenNull(false); + mRunNumber = 0; LOGF(info, "enable software triggers : %s", cfg_swt_names.value.data()); std::stringstream tokenizer(cfg_swt_names.value); @@ -59,26 +71,37 @@ struct skimmerOTS { swt_names.emplace_back(token); } - const int nbin = swt_names.size(); - auto hEventCounter = registry.add("hEventCounter", "hEventCounter;;Number of Events", kTH1D, {{nbin + 1, 0.5f, nbin + 1 + 0.5f}}); - hEventCounter->GetXaxis()->SetBinLabel(1, "all"); - for (int idx = 0; idx < nbin; idx++) { - hEventCounter->GetXaxis()->SetBinLabel(idx + 2, swt_names[idx].data()); + int nbin = swt_names.size(); + auto hCollisionCounter = registry.add("hCollisionCounter", "hCollisionCounter;;Number of collisions", kTH1D, {{nbin + 1, 0.5f, nbin + 1 + 0.5f}}); + hCollisionCounter->GetXaxis()->SetBinLabel(1, "all"); + for (size_t idx = 0; idx < swt_names.size(); idx++) { + hCollisionCounter->GetXaxis()->SetBinLabel(idx + 2, swt_names[idx].data()); } - registry.add("hNInspectedTVX", "N inspected TVX;run number;N_{TVX}", kTProfile, {{80000, 520000.5, 600000.5}}, true); + const int ntrg = static_cast(o2::aod::pwgem::dilepton::swt::swtAliases::kNaliases); + mNinspectedTVX = 0; + mScalers.resize(ntrg); + mSelections.resize(ntrg); + mTOICounters.resize(ntrg); + mATCounters.resize(ntrg); + for (int idx = 0; idx < ntrg; idx++) { + mTOICounters[idx] = 0; + mATCounters[idx] = 0; + mScalers[idx] = 0; + mSelections[idx] = 0; + } } ~skimmerOTS() { swt_names.clear(); swt_names.shrink_to_fit(); + mTOICounters.clear(); + mTOICounters.shrink_to_fit(); + mATCounters.clear(); + mATCounters.shrink_to_fit(); } - Zorro zorro; - std::vector mTOIidx; - uint64_t mNinspectedTVX{0}; - template void initCCDB(TBC const& bc) { @@ -86,46 +109,74 @@ struct skimmerOTS { return; } + zorro.setCCDBpath(ccdbPathSoftwareTrigger); + zorro.setBCtolerance(bcMarginForSoftwareTrigger); // this does nothing. mTOIidx = zorro.initCCDB(ccdb.service, bc.runNumber(), bc.timestamp(), cfg_swt_names.value); - for (auto& idx : mTOIidx) { - LOGF(info, "Trigger of Interest : index = %d", idx); - } - mNinspectedTVX = zorro.getInspectedTVX()->GetBinContent(1); - LOGF(info, "total inspected TVX events = %d in run number %d", mNinspectedTVX, bc.runNumber()); - registry.fill(HIST("hNInspectedTVX"), bc.runNumber(), mNinspectedTVX); + zorro.populateHistRegistry(registry, bc.runNumber()); + mNinspectedTVX = zorro.getInspectedTVX()->GetBinContent(1); + LOGF(info, "total inspected TVX events = %llu in run number %d", mNinspectedTVX, bc.runNumber()); + + for (size_t idx = 0; idx < mTOIidx.size(); idx++) { + auto swtname = swt_names[idx]; + int emswtId = o2::aod::pwgem::dilepton::swt::aliasLabels.at(swtname); + mScalers[emswtId] = zorro.getScalers()->GetBinContent(mTOIidx[idx] + 2); + mSelections[emswtId] = zorro.getSelections()->GetBinContent(mTOIidx[idx] + 2); + LOGF(info, "Trigger of Interest : index = %d in Zorro, %d in EM, scaler = %llu, selection = %llu", mTOIidx[idx], emswtId, mScalers[emswtId], mSelections[emswtId]); + } + swtinfo_tmp(bc.runNumber(), mNinspectedTVX, mScalers, mSelections); mRunNumber = bc.runNumber(); } - using MyBCs = soa::Join; - using MyCollisions = soa::Join; - - void process(MyCollisions const& collisions, MyBCs const&) + void process(aod::Collisions const& collisions, aod::BCsWithTimestamps const&) { - for (auto& collision : collisions) { - auto bc = collision.template bc_as(); // don't use foundBC. + + for (const auto& collision : collisions) { + auto bc = collision.template bc_as(); // don't use foundBC. initCCDB(bc); uint16_t trigger_bitmap = 0; - registry.fill(HIST("hEventCounter"), 1); // all - zorro.populateHistRegistry(registry, bc.runNumber()); + uint16_t analyzed_bitmap = 0; + uint16_t analyzedToI_bitmap = 0; + registry.fill(HIST("hCollisionCounter"), 1); // all + + if (zorro.isSelected(bc.globalBC(), bcMarginForSoftwareTrigger)) { // triggered event + auto swt_bitset = zorro.getLastResult(); // this has to be called after zorro::isSelected, or simply call zorro.fetch + auto TOIcounters = zorro.getTOIcounters(); // this has to be called after zorro::isSelected, or simply call zorro.fetch + auto ATcounters = zorro.getATcounters(); // this has to be called after zorro::isSelected, or simply call zorro.fetch - if (zorro.isSelected(bc.globalBC())) { // triggered event - auto swt_bitset = zorro.getLastResult(); // this has to be called after zorro::isSelected, or simply call zorro.fetch // LOGF(info, "swt_bitset.to_string().c_str() = %s", swt_bitset.to_string().c_str()); for (size_t idx = 0; idx < mTOIidx.size(); idx++) { if (swt_bitset.test(mTOIidx[idx])) { auto swtname = swt_names[idx]; - trigger_bitmap |= BIT(o2::aod::pwgem::dilepton::swt::aliasLabels.at(swtname)); + int emswtId = o2::aod::pwgem::dilepton::swt::aliasLabels.at(swtname); + trigger_bitmap |= BIT(emswtId); // LOGF(info, "swtname = %s is fired. swt index in original swt table = %d, swt index for EM table = %d", swtname.data(), mTOIidx[idx], o2::aod::pwgem::dilepton::swt::aliasLabels.at(swtname)); - registry.fill(HIST("hEventCounter"), idx + 2); // fired trigger + registry.fill(HIST("hCollisionCounter"), idx + 2); // fired trigger + + if (ATcounters[mTOIidx[idx]] > mATCounters[emswtId]) { + analyzed_bitmap |= BIT(emswtId); + mATCounters[emswtId]++; + // mATCounters[emswtId] = ATcounters[mTOIidx[idx]]; // Dont' use this line. NOT always incremented by 1 in zorro!! + } + + if (TOIcounters[idx] > mTOICounters[emswtId]) { + analyzedToI_bitmap |= BIT(emswtId); + mTOICounters[emswtId] = TOIcounters[idx]; // always incremented by 1 in zorro!! + } + + // LOGF(info, "collision.globalIndex() = %d, bc.globalBC() = %llu, mTOICounters[%d] = %d, mATcounters[%d] = %d", collision.globalIndex(), bc.globalBC(), emswtId, mTOICounters[emswtId], emswtId, mATCounters[emswtId]); } - } + } // end of TOI loop + } + swtbit_tmp(trigger_bitmap); + if (analyzed_bitmap > 0 || analyzedToI_bitmap > 0) { // storing 0 is useless. + swtcounter_tmp(analyzed_bitmap, analyzedToI_bitmap); } - // LOGF(info, "trigger_bitmap = %d, mNinspectedTVX = %d", trigger_bitmap, mNinspectedTVX); - swt_tmp(trigger_bitmap, mNinspectedTVX); + } // end of collision loop - } + + } // end of process }; WorkflowSpec defineDataProcessing(ConfigContext const& cfgc) { diff --git a/PWGEM/Dilepton/TableProducer/skimmerPrimaryElectron.cxx b/PWGEM/Dilepton/TableProducer/skimmerPrimaryElectron.cxx index 68324a6b40a..4e1706aac6f 100644 --- a/PWGEM/Dilepton/TableProducer/skimmerPrimaryElectron.cxx +++ b/PWGEM/Dilepton/TableProducer/skimmerPrimaryElectron.cxx @@ -48,7 +48,7 @@ using namespace o2::framework::expressions; using namespace o2::constants::physics; using MyCollisions = soa::Join; -using MyCollisionsWithSWT = soa::Join; +using MyCollisionsWithSWT = soa::Join; using MyTracks = soa::Join; -using MyCollisionsWithSWT = soa::Join; +using MyCollisionsWithSWT = soa::Join; using MyTracks = soa::Join; - using MyCollisionsWithSWT = soa::Join; + using MyCollisionsWithSWT = soa::Join; using MyFwdTracks = soa::Join; // muon tracks are repeated. i.e. not exclusive. using MyFwdTrack = MyFwdTracks::iterator; diff --git a/PWGEM/Dilepton/TableProducer/skimmerPrimaryTrack.cxx b/PWGEM/Dilepton/TableProducer/skimmerPrimaryTrack.cxx index 094065b6256..14d965239fe 100644 --- a/PWGEM/Dilepton/TableProducer/skimmerPrimaryTrack.cxx +++ b/PWGEM/Dilepton/TableProducer/skimmerPrimaryTrack.cxx @@ -47,7 +47,7 @@ using namespace o2::constants::physics; using namespace o2::aod::pwgem::dilepton::utils::emtrackutil; using MyCollisions = soa::Join; -using MyCollisionsWithSWT = soa::Join; +using MyCollisionsWithSWT = soa::Join; using MyTracks = soa::Join; using MyTrack = MyTracks::iterator; diff --git a/PWGEM/PhotonMeson/Core/DiphotonHadronMPC.h b/PWGEM/PhotonMeson/Core/DiphotonHadronMPC.h index 7478a70a764..e189042abca 100644 --- a/PWGEM/PhotonMeson/Core/DiphotonHadronMPC.h +++ b/PWGEM/PhotonMeson/Core/DiphotonHadronMPC.h @@ -69,7 +69,7 @@ using namespace o2::aod::pwgem::dilepton::utils; using MyCollisions = soa::Join; using MyCollision = MyCollisions::iterator; -using MyCollisionsWithSWT = soa::Join; +using MyCollisionsWithSWT = soa::Join; using MyCollisionWithSWT = MyCollisionsWithSWT::iterator; using MyV0Photons = soa::Filtered>; @@ -305,8 +305,8 @@ struct DiphotonHadronMPC { if constexpr (isTriggerAnalysis) { LOGF(info, "Trigger analysis is enabled. Desired trigger name = %s", cfg_swt_name.value); - LOGF(info, "total inspected TVX events = %d in run number %d", collision.nInspectedTVX(), collision.runNumber()); - fRegistry.fill(HIST("Event/hNInspectedTVX"), collision.runNumber(), collision.nInspectedTVX()); + // LOGF(info, "total inspected TVX events = %d in run number %d", collision.nInspectedTVX(), collision.runNumber()); + // fRegistry.fill(HIST("Event/hNInspectedTVX"), collision.runNumber(), collision.nInspectedTVX()); } } @@ -955,8 +955,8 @@ struct DiphotonHadronMPC { } PROCESS_SWITCH(DiphotonHadronMPC, processAnalysis, "process pair analysis", true); - using FilteredMyCollisionsWithSWT = soa::Filtered; - void processTriggerAnalysis(FilteredMyCollisionsWithSWT const& collisions, FilteredRefTracks const& refTracks, Types const&... args) + // using FilteredMyCollisionsWithSWT = soa::Filtered; + void processTriggerAnalysis(MyCollisionsWithSWT const& collisions, FilteredRefTracks const& refTracks, Types const&... args) { // LOGF(info, "ndf = %d", ndf); if constexpr (pairtype == PairType::kPCMPCM) { diff --git a/PWGEM/PhotonMeson/TableProducer/createEMEventPhoton.cxx b/PWGEM/PhotonMeson/TableProducer/createEMEventPhoton.cxx index a4c42e37003..827153ecb26 100644 --- a/PWGEM/PhotonMeson/TableProducer/createEMEventPhoton.cxx +++ b/PWGEM/PhotonMeson/TableProducer/createEMEventPhoton.cxx @@ -43,7 +43,7 @@ using MyCollisions = soa::Join; // centrality table has dependency on multiplicity table. using MyCollisionsCentQvec = soa::Join; -using MyCollisionsWithSWT = soa::Join; +using MyCollisionsWithSWT = soa::Join; using MyCollisionsWithSWT_Cent = soa::Join; // centrality table has dependency on multiplicity table. using MyCollisionsWithSWT_Cent_Qvec = soa::Join; @@ -58,7 +58,7 @@ struct CreateEMEventPhoton { Produces eventMult; Produces eventCent; Produces eventQvec; - Produces emswtbit; + Produces emswtbit; Produces event_norm_info; Produces eventWeights; @@ -183,7 +183,7 @@ struct CreateEMEventPhoton { if (collision.swtaliastmp_raw() == 0) { continue; } else { - emswtbit(collision.swtaliastmp_raw(), collision.nInspectedTVX()); + emswtbit(collision.swtaliastmp_raw()); } } diff --git a/PWGEM/PhotonMeson/TableProducer/photonconversionbuilder.cxx b/PWGEM/PhotonMeson/TableProducer/photonconversionbuilder.cxx index c0eeeba224f..a1d1eb3ee5e 100644 --- a/PWGEM/PhotonMeson/TableProducer/photonconversionbuilder.cxx +++ b/PWGEM/PhotonMeson/TableProducer/photonconversionbuilder.cxx @@ -62,7 +62,7 @@ using namespace o2::pwgem::photonmeson; using std::array; using MyCollisions = soa::Join; -using MyCollisionsWithSWT = soa::Join; +using MyCollisionsWithSWT = soa::Join; using MyCollisionsMC = soa::Join; using MyTracksIU = soa::Join; diff --git a/PWGEM/PhotonMeson/TableProducer/skimmerPrimaryElectronFromDalitzEE.cxx b/PWGEM/PhotonMeson/TableProducer/skimmerPrimaryElectronFromDalitzEE.cxx index 435e9451a83..cb3452dc177 100644 --- a/PWGEM/PhotonMeson/TableProducer/skimmerPrimaryElectronFromDalitzEE.cxx +++ b/PWGEM/PhotonMeson/TableProducer/skimmerPrimaryElectronFromDalitzEE.cxx @@ -43,7 +43,7 @@ using namespace o2::constants::physics; using namespace o2::pwgem::photonmeson; using MyCollisions = soa::Join; -using MyCollisionsWithSWT = soa::Join; +using MyCollisionsWithSWT = soa::Join; using MyCollisionsMC = soa::Join; using MyTracks = soa::Join;