diff --git a/PWGEM/Dilepton/Core/Dilepton.h b/PWGEM/Dilepton/Core/Dilepton.h index c6c01e23b2f..f0b0aa28156 100644 --- a/PWGEM/Dilepton/Core/Dilepton.h +++ b/PWGEM/Dilepton/Core/Dilepton.h @@ -70,7 +70,7 @@ using namespace o2::aod::pwgem::dilepton::utils; using namespace o2::aod::pwgem::dilepton::utils::emtrackutil; using namespace o2::aod::pwgem::dilepton::utils::pairutil; -using MyCollisions = soa::Join; +using MyCollisions = soa::Join; using MyCollision = MyCollisions::iterator; using MyElectrons = soa::Join; @@ -1604,28 +1604,28 @@ struct Dilepton { fRegistry.fill(HIST("Event/norm/hZvtx"), collision.posZ()); fRegistry.fill(HIST("Event/norm/hCollisionCounter"), 1.0); - if (collision.selection_bit(o2::aod::evsel::kIsTriggerTVX)) { + if (collision.selection_bit(o2::aod::emevsel::kIsTriggerTVX)) { fRegistry.fill(HIST("Event/norm/hCollisionCounter"), 2.0); } - if (collision.selection_bit(o2::aod::evsel::kNoTimeFrameBorder)) { + if (collision.selection_bit(o2::aod::emevsel::kNoTimeFrameBorder)) { fRegistry.fill(HIST("Event/norm/hCollisionCounter"), 3.0); } - if (collision.selection_bit(o2::aod::evsel::kNoITSROFrameBorder)) { + if (collision.selection_bit(o2::aod::emevsel::kNoITSROFrameBorder)) { fRegistry.fill(HIST("Event/norm/hCollisionCounter"), 4.0); } - if (collision.selection_bit(o2::aod::evsel::kNoSameBunchPileup)) { + if (collision.selection_bit(o2::aod::emevsel::kNoSameBunchPileup)) { fRegistry.fill(HIST("Event/norm/hCollisionCounter"), 5.0); } - if (collision.selection_bit(o2::aod::evsel::kIsGoodZvtxFT0vsPV)) { + if (collision.selection_bit(o2::aod::emevsel::kIsGoodZvtxFT0vsPV)) { fRegistry.fill(HIST("Event/norm/hCollisionCounter"), 6.0); } - if (collision.selection_bit(o2::aod::evsel::kIsVertexITSTPC)) { + if (collision.selection_bit(o2::aod::emevsel::kIsVertexITSTPC)) { fRegistry.fill(HIST("Event/norm/hCollisionCounter"), 7.0); } - if (collision.selection_bit(o2::aod::evsel::kIsVertexTRDmatched)) { + if (collision.selection_bit(o2::aod::emevsel::kIsVertexTRDmatched)) { fRegistry.fill(HIST("Event/norm/hCollisionCounter"), 8.0); } - if (collision.selection_bit(o2::aod::evsel::kIsVertexTOFmatched)) { + if (collision.selection_bit(o2::aod::emevsel::kIsVertexTOFmatched)) { fRegistry.fill(HIST("Event/norm/hCollisionCounter"), 9.0); } if (collision.sel8()) { @@ -1634,28 +1634,28 @@ struct Dilepton { if (std::fabs(collision.posZ()) < 10.0) { fRegistry.fill(HIST("Event/norm/hCollisionCounter"), 11.0); } - if (collision.selection_bit(o2::aod::evsel::kNoCollInTimeRangeStandard)) { + if (collision.selection_bit(o2::aod::emevsel::kNoCollInTimeRangeStandard)) { fRegistry.fill(HIST("Event/norm/hCollisionCounter"), 12.0); } - if (collision.selection_bit(o2::aod::evsel::kNoCollInTimeRangeStrict)) { + if (collision.selection_bit(o2::aod::emevsel::kNoCollInTimeRangeStrict)) { fRegistry.fill(HIST("Event/norm/hCollisionCounter"), 13.0); } - if (collision.selection_bit(o2::aod::evsel::kNoCollInRofStandard)) { + if (collision.selection_bit(o2::aod::emevsel::kNoCollInRofStandard)) { fRegistry.fill(HIST("Event/norm/hCollisionCounter"), 14.0); } - if (collision.selection_bit(o2::aod::evsel::kNoCollInRofStrict)) { + if (collision.selection_bit(o2::aod::emevsel::kNoCollInRofStrict)) { fRegistry.fill(HIST("Event/norm/hCollisionCounter"), 15.0); } - if (collision.selection_bit(o2::aod::evsel::kNoHighMultCollInPrevRof)) { + if (collision.selection_bit(o2::aod::emevsel::kNoHighMultCollInPrevRof)) { fRegistry.fill(HIST("Event/norm/hCollisionCounter"), 16.0); } - if (collision.selection_bit(o2::aod::evsel::kIsGoodITSLayer3)) { + if (collision.selection_bit(o2::aod::emevsel::kIsGoodITSLayer3)) { fRegistry.fill(HIST("Event/norm/hCollisionCounter"), 17.0); } - if (collision.selection_bit(o2::aod::evsel::kIsGoodITSLayer0123)) { + if (collision.selection_bit(o2::aod::emevsel::kIsGoodITSLayer0123)) { fRegistry.fill(HIST("Event/norm/hCollisionCounter"), 18.0); } - if (collision.selection_bit(o2::aod::evsel::kIsGoodITSLayersAll)) { + if (collision.selection_bit(o2::aod::emevsel::kIsGoodITSLayersAll)) { fRegistry.fill(HIST("Event/norm/hCollisionCounter"), 19.0); } if (!fEMEventCut.IsSelected(collision)) { @@ -1672,22 +1672,22 @@ struct Dilepton { void processBC(aod::EMBCs const& bcs) { for (const auto& bc : bcs) { - if (bc.selection_bit(o2::aod::evsel::kIsTriggerTVX)) { + if (bc.selection_bit(o2::aod::emevsel::kIsTriggerTVX)) { fRegistry.fill(HIST("BC/hTVXCounter"), 0.f); - if (bc.selection_bit(o2::aod::evsel::kNoTimeFrameBorder)) { + if (bc.selection_bit(o2::aod::emevsel::kNoTimeFrameBorder)) { fRegistry.fill(HIST("BC/hTVXCounter"), 1.f); } - if (bc.selection_bit(o2::aod::evsel::kNoITSROFrameBorder)) { + if (bc.selection_bit(o2::aod::emevsel::kNoITSROFrameBorder)) { fRegistry.fill(HIST("BC/hTVXCounter"), 2.f); } if (rctChecker(bc)) { fRegistry.fill(HIST("BC/hTVXCounter"), 3.f); } - if (bc.selection_bit(o2::aod::evsel::kNoTimeFrameBorder) && bc.selection_bit(o2::aod::evsel::kNoITSROFrameBorder)) { + if (bc.selection_bit(o2::aod::emevsel::kNoTimeFrameBorder) && bc.selection_bit(o2::aod::emevsel::kNoITSROFrameBorder)) { fRegistry.fill(HIST("BC/hTVXCounter"), 4.f); } - if (bc.selection_bit(o2::aod::evsel::kNoTimeFrameBorder) && bc.selection_bit(o2::aod::evsel::kNoITSROFrameBorder) && rctChecker(bc)) { + if (bc.selection_bit(o2::aod::emevsel::kNoTimeFrameBorder) && bc.selection_bit(o2::aod::emevsel::kNoITSROFrameBorder) && rctChecker(bc)) { fRegistry.fill(HIST("BC/hTVXCounter"), 5.f); } } diff --git a/PWGEM/Dilepton/Core/DileptonMC.h b/PWGEM/Dilepton/Core/DileptonMC.h index bcf9292ed02..e323fee60a9 100644 --- a/PWGEM/Dilepton/Core/DileptonMC.h +++ b/PWGEM/Dilepton/Core/DileptonMC.h @@ -2640,28 +2640,28 @@ struct DileptonMC { { for (const auto& collision : collisions) { fRegistry.fill(HIST("Event/norm/hCollisionCounter"), 1.0); - if (collision.selection_bit(o2::aod::evsel::kIsTriggerTVX)) { + if (collision.selection_bit(o2::aod::emevsel::kIsTriggerTVX)) { fRegistry.fill(HIST("Event/norm/hCollisionCounter"), 2.0); } - if (collision.selection_bit(o2::aod::evsel::kNoTimeFrameBorder)) { + if (collision.selection_bit(o2::aod::emevsel::kNoTimeFrameBorder)) { fRegistry.fill(HIST("Event/norm/hCollisionCounter"), 3.0); } - if (collision.selection_bit(o2::aod::evsel::kNoITSROFrameBorder)) { + if (collision.selection_bit(o2::aod::emevsel::kNoITSROFrameBorder)) { fRegistry.fill(HIST("Event/norm/hCollisionCounter"), 4.0); } - if (collision.selection_bit(o2::aod::evsel::kNoSameBunchPileup)) { + if (collision.selection_bit(o2::aod::emevsel::kNoSameBunchPileup)) { fRegistry.fill(HIST("Event/norm/hCollisionCounter"), 5.0); } - if (collision.selection_bit(o2::aod::evsel::kIsGoodZvtxFT0vsPV)) { + if (collision.selection_bit(o2::aod::emevsel::kIsGoodZvtxFT0vsPV)) { fRegistry.fill(HIST("Event/norm/hCollisionCounter"), 6.0); } - if (collision.selection_bit(o2::aod::evsel::kIsVertexITSTPC)) { + if (collision.selection_bit(o2::aod::emevsel::kIsVertexITSTPC)) { fRegistry.fill(HIST("Event/norm/hCollisionCounter"), 7.0); } - if (collision.selection_bit(o2::aod::evsel::kIsVertexTRDmatched)) { + if (collision.selection_bit(o2::aod::emevsel::kIsVertexTRDmatched)) { fRegistry.fill(HIST("Event/norm/hCollisionCounter"), 8.0); } - if (collision.selection_bit(o2::aod::evsel::kIsVertexTOFmatched)) { + if (collision.selection_bit(o2::aod::emevsel::kIsVertexTOFmatched)) { fRegistry.fill(HIST("Event/norm/hCollisionCounter"), 9.0); } if (collision.sel8()) { @@ -2670,28 +2670,28 @@ struct DileptonMC { if (std::fabs(collision.posZ()) < 10.0) { fRegistry.fill(HIST("Event/norm/hCollisionCounter"), 11.0); } - if (collision.selection_bit(o2::aod::evsel::kNoCollInTimeRangeStandard)) { + if (collision.selection_bit(o2::aod::emevsel::kNoCollInTimeRangeStandard)) { fRegistry.fill(HIST("Event/norm/hCollisionCounter"), 12.0); } - if (collision.selection_bit(o2::aod::evsel::kNoCollInTimeRangeStrict)) { + if (collision.selection_bit(o2::aod::emevsel::kNoCollInTimeRangeStrict)) { fRegistry.fill(HIST("Event/norm/hCollisionCounter"), 13.0); } - if (collision.selection_bit(o2::aod::evsel::kNoCollInRofStandard)) { + if (collision.selection_bit(o2::aod::emevsel::kNoCollInRofStandard)) { fRegistry.fill(HIST("Event/norm/hCollisionCounter"), 14.0); } - if (collision.selection_bit(o2::aod::evsel::kNoCollInRofStrict)) { + if (collision.selection_bit(o2::aod::emevsel::kNoCollInRofStrict)) { fRegistry.fill(HIST("Event/norm/hCollisionCounter"), 15.0); } - if (collision.selection_bit(o2::aod::evsel::kNoHighMultCollInPrevRof)) { + if (collision.selection_bit(o2::aod::emevsel::kNoHighMultCollInPrevRof)) { fRegistry.fill(HIST("Event/norm/hCollisionCounter"), 16.0); } - if (collision.selection_bit(o2::aod::evsel::kIsGoodITSLayer3)) { + if (collision.selection_bit(o2::aod::emevsel::kIsGoodITSLayer3)) { fRegistry.fill(HIST("Event/norm/hCollisionCounter"), 17.0); } - if (collision.selection_bit(o2::aod::evsel::kIsGoodITSLayer0123)) { + if (collision.selection_bit(o2::aod::emevsel::kIsGoodITSLayer0123)) { fRegistry.fill(HIST("Event/norm/hCollisionCounter"), 18.0); } - if (collision.selection_bit(o2::aod::evsel::kIsGoodITSLayersAll)) { + if (collision.selection_bit(o2::aod::emevsel::kIsGoodITSLayersAll)) { fRegistry.fill(HIST("Event/norm/hCollisionCounter"), 19.0); } if (!fEMEventCut.IsSelected(collision)) { @@ -2708,22 +2708,22 @@ struct DileptonMC { void processBC(aod::EMBCs const& bcs) { for (const auto& bc : bcs) { - if (bc.selection_bit(o2::aod::evsel::kIsTriggerTVX)) { + if (bc.selection_bit(o2::aod::emevsel::kIsTriggerTVX)) { fRegistry.fill(HIST("BC/hTVXCounter"), 0.f); - if (bc.selection_bit(o2::aod::evsel::kNoTimeFrameBorder)) { + if (bc.selection_bit(o2::aod::emevsel::kNoTimeFrameBorder)) { fRegistry.fill(HIST("BC/hTVXCounter"), 1.f); } - if (bc.selection_bit(o2::aod::evsel::kNoITSROFrameBorder)) { + if (bc.selection_bit(o2::aod::emevsel::kNoITSROFrameBorder)) { fRegistry.fill(HIST("BC/hTVXCounter"), 2.f); } if (rctChecker(bc)) { fRegistry.fill(HIST("BC/hTVXCounter"), 3.f); } - if (bc.selection_bit(o2::aod::evsel::kNoTimeFrameBorder) && bc.selection_bit(o2::aod::evsel::kNoITSROFrameBorder)) { + if (bc.selection_bit(o2::aod::emevsel::kNoTimeFrameBorder) && bc.selection_bit(o2::aod::emevsel::kNoITSROFrameBorder)) { fRegistry.fill(HIST("BC/hTVXCounter"), 4.f); } - if (bc.selection_bit(o2::aod::evsel::kNoTimeFrameBorder) && bc.selection_bit(o2::aod::evsel::kNoITSROFrameBorder) && rctChecker(bc)) { + if (bc.selection_bit(o2::aod::emevsel::kNoTimeFrameBorder) && bc.selection_bit(o2::aod::emevsel::kNoITSROFrameBorder) && rctChecker(bc)) { fRegistry.fill(HIST("BC/hTVXCounter"), 5.f); } } diff --git a/PWGEM/Dilepton/Core/DileptonProducer.h b/PWGEM/Dilepton/Core/DileptonProducer.h index 764914fe806..26b06061cb4 100644 --- a/PWGEM/Dilepton/Core/DileptonProducer.h +++ b/PWGEM/Dilepton/Core/DileptonProducer.h @@ -69,7 +69,7 @@ using namespace o2::aod::pwgem::dilepton::utils; using namespace o2::aod::pwgem::dilepton::utils::emtrackutil; using namespace o2::aod::pwgem::dilepton::utils::pairutil; -using MyCollisions = soa::Join; +using MyCollisions = soa::Join; using MyCollision = MyCollisions::iterator; using MyElectrons = soa::Join; @@ -774,7 +774,7 @@ struct DileptonProducer { continue; } - normTable(collision.selection_raw(), collision.rct_raw(), collision.posZint16(), collision.centFT0Cuint16()); + normTable(collision.selection_raw(), collision.rct_raw(), collision.posZint8(), collision.centFT0Muint8(), collision.centFT0Cuint8(), collision.centNTPVuint8() /*, collision.centNGlobaluint8()*/); } // end of collision loop } diff --git a/PWGEM/Dilepton/Core/EMEventCut.h b/PWGEM/Dilepton/Core/EMEventCut.h index 8dc1b7ef961..3cc785e80a8 100644 --- a/PWGEM/Dilepton/Core/EMEventCut.h +++ b/PWGEM/Dilepton/Core/EMEventCut.h @@ -16,6 +16,8 @@ #ifndef PWGEM_DILEPTON_CORE_EMEVENTCUT_H_ #define PWGEM_DILEPTON_CORE_EMEVENTCUT_H_ +#include "PWGEM/Dilepton/DataModel/dileptonTables.h" + #include "Common/CCDB/EventSelectionParams.h" #include "Common/CCDB/TriggerAliases.h" @@ -116,52 +118,52 @@ class EMEventCut : public TNamed return collision.sel8(); case EMEventCuts::kFT0AND: - return collision.selection_bit(o2::aod::evsel::kIsTriggerTVX); + return collision.selection_bit(o2::aod::emevsel::kIsTriggerTVX); case EMEventCuts::kZvtx: return mMinZvtx < collision.posZ() && collision.posZ() < mMaxZvtx; case EMEventCuts::kNoTFB: - return collision.selection_bit(o2::aod::evsel::kNoTimeFrameBorder); + return collision.selection_bit(o2::aod::emevsel::kNoTimeFrameBorder); case EMEventCuts::kNoITSROFB: - return collision.selection_bit(o2::aod::evsel::kNoITSROFrameBorder); + return collision.selection_bit(o2::aod::emevsel::kNoITSROFrameBorder); case EMEventCuts::kNoSameBunchPileup: - return collision.selection_bit(o2::aod::evsel::kNoSameBunchPileup); + return collision.selection_bit(o2::aod::emevsel::kNoSameBunchPileup); case EMEventCuts::kIsVertexITSTPC: - return collision.selection_bit(o2::aod::evsel::kIsVertexITSTPC); + return collision.selection_bit(o2::aod::emevsel::kIsVertexITSTPC); case EMEventCuts::kIsVertexTOFmatched: - return collision.selection_bit(o2::aod::evsel::kIsVertexTOFmatched); + return collision.selection_bit(o2::aod::emevsel::kIsVertexTOFmatched); case EMEventCuts::kIsGoodZvtxFT0vsPV: - return collision.selection_bit(o2::aod::evsel::kIsGoodZvtxFT0vsPV); + return collision.selection_bit(o2::aod::emevsel::kIsGoodZvtxFT0vsPV); case EMEventCuts::kNoCollInTimeRangeStandard: - return collision.selection_bit(o2::aod::evsel::kNoCollInTimeRangeStandard); + return collision.selection_bit(o2::aod::emevsel::kNoCollInTimeRangeStandard); case EMEventCuts::kNoCollInTimeRangeStrict: - return collision.selection_bit(o2::aod::evsel::kNoCollInTimeRangeStrict); + return collision.selection_bit(o2::aod::emevsel::kNoCollInTimeRangeStrict); case EMEventCuts::kNoCollInITSROFStandard: - return collision.selection_bit(o2::aod::evsel::kNoCollInRofStandard); + return collision.selection_bit(o2::aod::emevsel::kNoCollInRofStandard); case EMEventCuts::kNoCollInITSROFStrict: - return collision.selection_bit(o2::aod::evsel::kNoCollInRofStrict); + return collision.selection_bit(o2::aod::emevsel::kNoCollInRofStrict); case EMEventCuts::kNoHighMultCollInPrevRof: - return collision.selection_bit(o2::aod::evsel::kNoHighMultCollInPrevRof); + return collision.selection_bit(o2::aod::emevsel::kNoHighMultCollInPrevRof); case EMEventCuts::kIsGoodITSLayer3: - return collision.selection_bit(o2::aod::evsel::kIsGoodITSLayer3); + return collision.selection_bit(o2::aod::emevsel::kIsGoodITSLayer3); case EMEventCuts::kIsGoodITSLayer0123: - return collision.selection_bit(o2::aod::evsel::kIsGoodITSLayer0123); + return collision.selection_bit(o2::aod::emevsel::kIsGoodITSLayer0123); case EMEventCuts::kIsGoodITSLayersAll: - return collision.selection_bit(o2::aod::evsel::kIsGoodITSLayersAll); + return collision.selection_bit(o2::aod::emevsel::kIsGoodITSLayersAll); default: return true; diff --git a/PWGEM/Dilepton/Core/SingleTrackQC.h b/PWGEM/Dilepton/Core/SingleTrackQC.h index 403c3316ebf..ea22e1b3d0e 100644 --- a/PWGEM/Dilepton/Core/SingleTrackQC.h +++ b/PWGEM/Dilepton/Core/SingleTrackQC.h @@ -922,28 +922,28 @@ struct SingleTrackQC { { for (const auto& collision : collisions) { fRegistry.fill(HIST("Event/norm/hCollisionCounter"), 1.0); - if (collision.selection_bit(o2::aod::evsel::kIsTriggerTVX)) { + if (collision.selection_bit(o2::aod::emevsel::kIsTriggerTVX)) { fRegistry.fill(HIST("Event/norm/hCollisionCounter"), 2.0); } - if (collision.selection_bit(o2::aod::evsel::kNoTimeFrameBorder)) { + if (collision.selection_bit(o2::aod::emevsel::kNoTimeFrameBorder)) { fRegistry.fill(HIST("Event/norm/hCollisionCounter"), 3.0); } - if (collision.selection_bit(o2::aod::evsel::kNoITSROFrameBorder)) { + if (collision.selection_bit(o2::aod::emevsel::kNoITSROFrameBorder)) { fRegistry.fill(HIST("Event/norm/hCollisionCounter"), 4.0); } - if (collision.selection_bit(o2::aod::evsel::kNoSameBunchPileup)) { + if (collision.selection_bit(o2::aod::emevsel::kNoSameBunchPileup)) { fRegistry.fill(HIST("Event/norm/hCollisionCounter"), 5.0); } - if (collision.selection_bit(o2::aod::evsel::kIsGoodZvtxFT0vsPV)) { + if (collision.selection_bit(o2::aod::emevsel::kIsGoodZvtxFT0vsPV)) { fRegistry.fill(HIST("Event/norm/hCollisionCounter"), 6.0); } - if (collision.selection_bit(o2::aod::evsel::kIsVertexITSTPC)) { + if (collision.selection_bit(o2::aod::emevsel::kIsVertexITSTPC)) { fRegistry.fill(HIST("Event/norm/hCollisionCounter"), 7.0); } - if (collision.selection_bit(o2::aod::evsel::kIsVertexTRDmatched)) { + if (collision.selection_bit(o2::aod::emevsel::kIsVertexTRDmatched)) { fRegistry.fill(HIST("Event/norm/hCollisionCounter"), 8.0); } - if (collision.selection_bit(o2::aod::evsel::kIsVertexTOFmatched)) { + if (collision.selection_bit(o2::aod::emevsel::kIsVertexTOFmatched)) { fRegistry.fill(HIST("Event/norm/hCollisionCounter"), 9.0); } if (collision.sel8()) { @@ -952,28 +952,28 @@ struct SingleTrackQC { if (std::fabs(collision.posZ()) < 10.0) { fRegistry.fill(HIST("Event/norm/hCollisionCounter"), 11.0); } - if (collision.selection_bit(o2::aod::evsel::kNoCollInTimeRangeStandard)) { + if (collision.selection_bit(o2::aod::emevsel::kNoCollInTimeRangeStandard)) { fRegistry.fill(HIST("Event/norm/hCollisionCounter"), 12.0); } - if (collision.selection_bit(o2::aod::evsel::kNoCollInTimeRangeStrict)) { + if (collision.selection_bit(o2::aod::emevsel::kNoCollInTimeRangeStrict)) { fRegistry.fill(HIST("Event/norm/hCollisionCounter"), 13.0); } - if (collision.selection_bit(o2::aod::evsel::kNoCollInRofStandard)) { + if (collision.selection_bit(o2::aod::emevsel::kNoCollInRofStandard)) { fRegistry.fill(HIST("Event/norm/hCollisionCounter"), 14.0); } - if (collision.selection_bit(o2::aod::evsel::kNoCollInRofStrict)) { + if (collision.selection_bit(o2::aod::emevsel::kNoCollInRofStrict)) { fRegistry.fill(HIST("Event/norm/hCollisionCounter"), 15.0); } - if (collision.selection_bit(o2::aod::evsel::kNoHighMultCollInPrevRof)) { + if (collision.selection_bit(o2::aod::emevsel::kNoHighMultCollInPrevRof)) { fRegistry.fill(HIST("Event/norm/hCollisionCounter"), 16.0); } - if (collision.selection_bit(o2::aod::evsel::kIsGoodITSLayer3)) { + if (collision.selection_bit(o2::aod::emevsel::kIsGoodITSLayer3)) { fRegistry.fill(HIST("Event/norm/hCollisionCounter"), 17.0); } - if (collision.selection_bit(o2::aod::evsel::kIsGoodITSLayer0123)) { + if (collision.selection_bit(o2::aod::emevsel::kIsGoodITSLayer0123)) { fRegistry.fill(HIST("Event/norm/hCollisionCounter"), 18.0); } - if (collision.selection_bit(o2::aod::evsel::kIsGoodITSLayersAll)) { + if (collision.selection_bit(o2::aod::emevsel::kIsGoodITSLayersAll)) { fRegistry.fill(HIST("Event/norm/hCollisionCounter"), 19.0); } if (!fEMEventCut.IsSelected(collision)) { @@ -990,22 +990,22 @@ struct SingleTrackQC { void processBC(aod::EMBCs const& bcs) { for (const auto& bc : bcs) { - if (bc.selection_bit(o2::aod::evsel::kIsTriggerTVX)) { + if (bc.selection_bit(o2::aod::emevsel::kIsTriggerTVX)) { fRegistry.fill(HIST("BC/hTVXCounter"), 0.f); - if (bc.selection_bit(o2::aod::evsel::kNoTimeFrameBorder)) { + if (bc.selection_bit(o2::aod::emevsel::kNoTimeFrameBorder)) { fRegistry.fill(HIST("BC/hTVXCounter"), 1.f); } - if (bc.selection_bit(o2::aod::evsel::kNoITSROFrameBorder)) { + if (bc.selection_bit(o2::aod::emevsel::kNoITSROFrameBorder)) { fRegistry.fill(HIST("BC/hTVXCounter"), 2.f); } if (rctChecker(bc)) { fRegistry.fill(HIST("BC/hTVXCounter"), 3.f); } - if (bc.selection_bit(o2::aod::evsel::kNoTimeFrameBorder) && bc.selection_bit(o2::aod::evsel::kNoITSROFrameBorder)) { + if (bc.selection_bit(o2::aod::emevsel::kNoTimeFrameBorder) && bc.selection_bit(o2::aod::emevsel::kNoITSROFrameBorder)) { fRegistry.fill(HIST("BC/hTVXCounter"), 4.f); } - if (bc.selection_bit(o2::aod::evsel::kNoTimeFrameBorder) && bc.selection_bit(o2::aod::evsel::kNoITSROFrameBorder) && rctChecker(bc)) { + if (bc.selection_bit(o2::aod::emevsel::kNoTimeFrameBorder) && bc.selection_bit(o2::aod::emevsel::kNoITSROFrameBorder) && rctChecker(bc)) { fRegistry.fill(HIST("BC/hTVXCounter"), 5.f); } } diff --git a/PWGEM/Dilepton/Core/SingleTrackQCMC.h b/PWGEM/Dilepton/Core/SingleTrackQCMC.h index f60a66b1c81..888102d0090 100644 --- a/PWGEM/Dilepton/Core/SingleTrackQCMC.h +++ b/PWGEM/Dilepton/Core/SingleTrackQCMC.h @@ -1183,28 +1183,28 @@ struct SingleTrackQCMC { { for (const auto& collision : collisions) { fRegistry.fill(HIST("Event/norm/hCollisionCounter"), 1.0); - if (collision.selection_bit(o2::aod::evsel::kIsTriggerTVX)) { + if (collision.selection_bit(o2::aod::emevsel::kIsTriggerTVX)) { fRegistry.fill(HIST("Event/norm/hCollisionCounter"), 2.0); } - if (collision.selection_bit(o2::aod::evsel::kNoTimeFrameBorder)) { + if (collision.selection_bit(o2::aod::emevsel::kNoTimeFrameBorder)) { fRegistry.fill(HIST("Event/norm/hCollisionCounter"), 3.0); } - if (collision.selection_bit(o2::aod::evsel::kNoITSROFrameBorder)) { + if (collision.selection_bit(o2::aod::emevsel::kNoITSROFrameBorder)) { fRegistry.fill(HIST("Event/norm/hCollisionCounter"), 4.0); } - if (collision.selection_bit(o2::aod::evsel::kNoSameBunchPileup)) { + if (collision.selection_bit(o2::aod::emevsel::kNoSameBunchPileup)) { fRegistry.fill(HIST("Event/norm/hCollisionCounter"), 5.0); } - if (collision.selection_bit(o2::aod::evsel::kIsGoodZvtxFT0vsPV)) { + if (collision.selection_bit(o2::aod::emevsel::kIsGoodZvtxFT0vsPV)) { fRegistry.fill(HIST("Event/norm/hCollisionCounter"), 6.0); } - if (collision.selection_bit(o2::aod::evsel::kIsVertexITSTPC)) { + if (collision.selection_bit(o2::aod::emevsel::kIsVertexITSTPC)) { fRegistry.fill(HIST("Event/norm/hCollisionCounter"), 7.0); } - if (collision.selection_bit(o2::aod::evsel::kIsVertexTRDmatched)) { + if (collision.selection_bit(o2::aod::emevsel::kIsVertexTRDmatched)) { fRegistry.fill(HIST("Event/norm/hCollisionCounter"), 8.0); } - if (collision.selection_bit(o2::aod::evsel::kIsVertexTOFmatched)) { + if (collision.selection_bit(o2::aod::emevsel::kIsVertexTOFmatched)) { fRegistry.fill(HIST("Event/norm/hCollisionCounter"), 9.0); } if (collision.sel8()) { @@ -1213,28 +1213,28 @@ struct SingleTrackQCMC { if (std::fabs(collision.posZ()) < 10.0) { fRegistry.fill(HIST("Event/norm/hCollisionCounter"), 11.0); } - if (collision.selection_bit(o2::aod::evsel::kNoCollInTimeRangeStandard)) { + if (collision.selection_bit(o2::aod::emevsel::kNoCollInTimeRangeStandard)) { fRegistry.fill(HIST("Event/norm/hCollisionCounter"), 12.0); } - if (collision.selection_bit(o2::aod::evsel::kNoCollInTimeRangeStrict)) { + if (collision.selection_bit(o2::aod::emevsel::kNoCollInTimeRangeStrict)) { fRegistry.fill(HIST("Event/norm/hCollisionCounter"), 13.0); } - if (collision.selection_bit(o2::aod::evsel::kNoCollInRofStandard)) { + if (collision.selection_bit(o2::aod::emevsel::kNoCollInRofStandard)) { fRegistry.fill(HIST("Event/norm/hCollisionCounter"), 14.0); } - if (collision.selection_bit(o2::aod::evsel::kNoCollInRofStrict)) { + if (collision.selection_bit(o2::aod::emevsel::kNoCollInRofStrict)) { fRegistry.fill(HIST("Event/norm/hCollisionCounter"), 15.0); } - if (collision.selection_bit(o2::aod::evsel::kNoHighMultCollInPrevRof)) { + if (collision.selection_bit(o2::aod::emevsel::kNoHighMultCollInPrevRof)) { fRegistry.fill(HIST("Event/norm/hCollisionCounter"), 16.0); } - if (collision.selection_bit(o2::aod::evsel::kIsGoodITSLayer3)) { + if (collision.selection_bit(o2::aod::emevsel::kIsGoodITSLayer3)) { fRegistry.fill(HIST("Event/norm/hCollisionCounter"), 17.0); } - if (collision.selection_bit(o2::aod::evsel::kIsGoodITSLayer0123)) { + if (collision.selection_bit(o2::aod::emevsel::kIsGoodITSLayer0123)) { fRegistry.fill(HIST("Event/norm/hCollisionCounter"), 18.0); } - if (collision.selection_bit(o2::aod::evsel::kIsGoodITSLayersAll)) { + if (collision.selection_bit(o2::aod::emevsel::kIsGoodITSLayersAll)) { fRegistry.fill(HIST("Event/norm/hCollisionCounter"), 19.0); } if (!fEMEventCut.IsSelected(collision)) { @@ -1251,22 +1251,22 @@ struct SingleTrackQCMC { void processBC(aod::EMBCs const& bcs) { for (const auto& bc : bcs) { - if (bc.selection_bit(o2::aod::evsel::kIsTriggerTVX)) { + if (bc.selection_bit(o2::aod::emevsel::kIsTriggerTVX)) { fRegistry.fill(HIST("BC/hTVXCounter"), 0.f); - if (bc.selection_bit(o2::aod::evsel::kNoTimeFrameBorder)) { + if (bc.selection_bit(o2::aod::emevsel::kNoTimeFrameBorder)) { fRegistry.fill(HIST("BC/hTVXCounter"), 1.f); } - if (bc.selection_bit(o2::aod::evsel::kNoITSROFrameBorder)) { + if (bc.selection_bit(o2::aod::emevsel::kNoITSROFrameBorder)) { fRegistry.fill(HIST("BC/hTVXCounter"), 2.f); } if (rctChecker(bc)) { fRegistry.fill(HIST("BC/hTVXCounter"), 3.f); } - if (bc.selection_bit(o2::aod::evsel::kNoTimeFrameBorder) && bc.selection_bit(o2::aod::evsel::kNoITSROFrameBorder)) { + if (bc.selection_bit(o2::aod::emevsel::kNoTimeFrameBorder) && bc.selection_bit(o2::aod::emevsel::kNoITSROFrameBorder)) { fRegistry.fill(HIST("BC/hTVXCounter"), 4.f); } - if (bc.selection_bit(o2::aod::evsel::kNoTimeFrameBorder) && bc.selection_bit(o2::aod::evsel::kNoITSROFrameBorder) && rctChecker(bc)) { + if (bc.selection_bit(o2::aod::emevsel::kNoTimeFrameBorder) && bc.selection_bit(o2::aod::emevsel::kNoITSROFrameBorder) && rctChecker(bc)) { fRegistry.fill(HIST("BC/hTVXCounter"), 5.f); } } diff --git a/PWGEM/Dilepton/DataModel/dileptonTables.h b/PWGEM/Dilepton/DataModel/dileptonTables.h index 249af041973..e26f3ef9ab4 100644 --- a/PWGEM/Dilepton/DataModel/dileptonTables.h +++ b/PWGEM/Dilepton/DataModel/dileptonTables.h @@ -66,9 +66,93 @@ const std::unordered_map aliasLabels = { }; } // namespace pwgem::dilepton::swt -DECLARE_SOA_TABLE(EMBCs, "AOD", "EMBC", //! bc information for normalization - o2::soa::Index<>, evsel::Selection, evsel::Rct); -using EMBC = EMBCs::iterator; +namespace emevsel +{ +// Event selection criteria. See O2Physics/Common/CCDB/EventSelectionParams.h +enum EventSelectionFlags { + kIsTriggerTVX = 0, // FT0 vertex (acceptable FT0C-FT0A time difference) at trigger level + kNoITSROFrameBorder, // bunch crossing is far from ITS RO Frame border + kNoTimeFrameBorder, // bunch crossing is far from Time Frame borders + kNoSameBunchPileup, // reject collisions in case of pileup with another collision in the same foundBC + kIsGoodZvtxFT0vsPV, // small difference between z-vertex from PV and from FT0 + kIsVertexITSTPC, // at least one ITS-TPC track (reject vertices built from ITS-only tracks) + kIsVertexTOFmatched, // at least one of vertex contributors is matched to TOF + kIsVertexTRDmatched, // at least one of vertex contributors is matched to TRD + kNoCollInTimeRangeNarrow, // no other collisions in specified time range (narrower than Strict) + kNoCollInTimeRangeStrict, // no other collisions in specified time range + kNoCollInTimeRangeStandard, // no other collisions in specified time range with per-collision multiplicity above threshold + kNoCollInRofStrict, // no other collisions in this Readout Frame + kNoCollInRofStandard, // no other collisions in this Readout Frame with per-collision multiplicity above threshold + kNoHighMultCollInPrevRof, // veto an event if FT0C amplitude in previous ITS ROF is above threshold + kIsGoodITSLayer3, // number of inactive chips on ITS layer 3 is below maximum allowed value + kIsGoodITSLayer0123, // numbers of inactive chips on ITS layers 0-3 are below maximum allowed values + kIsGoodITSLayersAll, // numbers of inactive chips on all ITS layers are below maximum allowed values + kNsel // counter +}; + +DECLARE_SOA_BITMAP_COLUMN(Selection, selection, 32); //! Bitmask of selection flags +DECLARE_SOA_DYNAMIC_COLUMN(Sel8, sel8, [](uint32_t selection_bit) -> bool { return (selection_bit & BIT(o2::aod::emevsel::kIsTriggerTVX)) && (selection_bit & BIT(o2::aod::emevsel::kNoTimeFrameBorder)) && (selection_bit & BIT(o2::aod::emevsel::kNoITSROFrameBorder)); }); + +template +uint32_t reduceSelectionBit(TBC const& bc) +{ + // input should be aod::BcSels or aod::EvSels. + uint32_t bitMap = 0; + if (bc.selection_bit(o2::aod::evsel::kIsTriggerTVX)) { + SETBIT(bitMap, o2::aod::emevsel::kIsTriggerTVX); + } + if (bc.selection_bit(o2::aod::evsel::kNoTimeFrameBorder)) { + SETBIT(bitMap, o2::aod::emevsel::kNoTimeFrameBorder); + } + if (bc.selection_bit(o2::aod::evsel::kNoITSROFrameBorder)) { + SETBIT(bitMap, o2::aod::emevsel::kNoITSROFrameBorder); + } + if (bc.selection_bit(o2::aod::evsel::kNoSameBunchPileup)) { + SETBIT(bitMap, o2::aod::emevsel::kNoSameBunchPileup); + } + if (bc.selection_bit(o2::aod::evsel::kIsGoodZvtxFT0vsPV)) { + SETBIT(bitMap, o2::aod::emevsel::kIsGoodZvtxFT0vsPV); + } + if (bc.selection_bit(o2::aod::evsel::kIsVertexITSTPC)) { + SETBIT(bitMap, o2::aod::emevsel::kIsVertexITSTPC); + } + if (bc.selection_bit(o2::aod::evsel::kIsVertexTRDmatched)) { + SETBIT(bitMap, o2::aod::emevsel::kIsVertexTRDmatched); + } + if (bc.selection_bit(o2::aod::evsel::kIsVertexTOFmatched)) { + SETBIT(bitMap, o2::aod::emevsel::kIsVertexTOFmatched); + } + if (bc.selection_bit(o2::aod::evsel::kNoCollInTimeRangeStandard)) { + SETBIT(bitMap, o2::aod::emevsel::kNoCollInTimeRangeStandard); + } + if (bc.selection_bit(o2::aod::evsel::kNoCollInTimeRangeStrict)) { + SETBIT(bitMap, o2::aod::emevsel::kNoCollInTimeRangeStrict); + } + if (bc.selection_bit(o2::aod::evsel::kNoCollInTimeRangeNarrow)) { + SETBIT(bitMap, o2::aod::emevsel::kNoCollInTimeRangeNarrow); + } + if (bc.selection_bit(o2::aod::evsel::kNoCollInRofStandard)) { + SETBIT(bitMap, o2::aod::emevsel::kNoCollInRofStandard); + } + if (bc.selection_bit(o2::aod::evsel::kNoCollInRofStrict)) { + SETBIT(bitMap, o2::aod::emevsel::kNoCollInRofStrict); + } + if (bc.selection_bit(o2::aod::evsel::kNoHighMultCollInPrevRof)) { + SETBIT(bitMap, o2::aod::emevsel::kNoHighMultCollInPrevRof); + } + if (bc.selection_bit(o2::aod::evsel::kIsGoodITSLayer3)) { + SETBIT(bitMap, o2::aod::emevsel::kIsGoodITSLayer3); + } + if (bc.selection_bit(o2::aod::evsel::kIsGoodITSLayer0123)) { + SETBIT(bitMap, o2::aod::emevsel::kIsGoodITSLayer0123); + } + if (bc.selection_bit(o2::aod::evsel::kIsGoodITSLayersAll)) { + SETBIT(bitMap, o2::aod::emevsel::kIsGoodITSLayersAll); + } + return bitMap; +} + +} // namespace emevsel namespace emevent { @@ -129,12 +213,21 @@ DECLARE_SOA_COLUMN(Q4yBTot, q4ybtot, float); //! DECLARE_SOA_COLUMN(SpherocityPtWeighted, spherocity_ptweighted, float); //! transverse spherocity DECLARE_SOA_COLUMN(SpherocityPtUnWeighted, spherocity_ptunweighted, float); //! transverse spherocity DECLARE_SOA_COLUMN(NtrackSpherocity, ntspherocity, int); -DECLARE_SOA_COLUMN(IsSelected, isSelected, bool); //! MB event selection info -DECLARE_SOA_COLUMN(IsEoI, isEoI, bool); //! lepton or photon exists in MB event (not for CEFP) -DECLARE_SOA_COLUMN(PosX, posX, float); //! only for treeCreatetorML.cxx -DECLARE_SOA_COLUMN(PosY, posY, float); //! only for treeCreatetorML.cxx -DECLARE_SOA_COLUMN(PosZint16, posZint16, int16_t); //! this is only to reduce data size -DECLARE_SOA_COLUMN(CentFT0Cuint16, centFT0Cuint16, uint16_t); //! this is only to reduce data size +DECLARE_SOA_COLUMN(IsSelected, isSelected, bool); //! MB event selection info +DECLARE_SOA_COLUMN(IsEoI, isEoI, bool); //! lepton or photon exists in MB event (not for CEFP) +DECLARE_SOA_COLUMN(PosX, posX, float); //! only for treeCreatetorML.cxx +DECLARE_SOA_COLUMN(PosY, posY, float); //! only for treeCreatetorML.cxx +DECLARE_SOA_COLUMN(PosZint16, posZint16, int16_t); //! this is only to reduce data size +DECLARE_SOA_COLUMN(CentFT0Cuint16, centFT0Cuint16, uint16_t); //! this is only to reduce data size +DECLARE_SOA_COLUMN(PosZint8, posZint8, int8_t); //! this is only to reduce data size +DECLARE_SOA_COLUMN(CentFT0Cuint8, centFT0Cuint8, uint8_t); //! this is only to reduce data size +DECLARE_SOA_COLUMN(CentNTPVuint8, centNTPVuint8, uint8_t); //! this is only to reduce data size +DECLARE_SOA_COLUMN(CentNGlobaluint8, centNGlobaluint8, uint8_t); //! this is only to reduce data size +DECLARE_SOA_COLUMN(CentFT0Muint8, centFT0Muint8, uint8_t); //! this is only to reduce data size +DECLARE_SOA_COLUMN(CentFT0Auint8, centFT0Auint8, uint8_t); //! this is only to reduce data size +// DECLARE_SOA_COLUMN(CentFT0Cuint8, centFT0Cuint8, uint8_t); //! this is only to reduce data size +// DECLARE_SOA_COLUMN(CentNTPVuint8, centNTPVuint8, uint8_t); //! this is only to reduce data size +// DECLARE_SOA_COLUMN(CentNGlobaluint8, centNGlobaluint8, uint8_t); //! this is only to reduce data size DECLARE_SOA_DYNAMIC_COLUMN(PosZ, posZ, [](int16_t posZint16) -> float { return (posZint16 < 0 ? std::nextafter(posZint16 * 0.01f, -std::numeric_limits::infinity()) : std::nextafter(posZint16 * 0.01f, std::numeric_limits::infinity())); }); //! poZ is multiplied by 100 in createEMEventDileton.cxx DECLARE_SOA_DYNAMIC_COLUMN(CentFT0C, centFT0C, [](uint16_t centuint16) -> float { return std::nextafter(centuint16 * 0.002f, std::numeric_limits::infinity()); }); //! centrality is multiplied by 500 in createEMEventDilepton.cxx @@ -162,6 +255,47 @@ DECLARE_SOA_DYNAMIC_COLUMN(EP4BNeg, ep4bneg, [](float q4x, float q4y) -> float { DECLARE_SOA_DYNAMIC_COLUMN(EP4BTot, ep4btot, [](float q4x, float q4y) -> float { return std::atan2(q4y, q4x) / 4.0; }); } // namespace emevent +namespace emeventnorm +{ +DECLARE_SOA_DYNAMIC_COLUMN(PosZ, posZ, [](int8_t posZint8) -> float { return (posZint8 < 0 ? std::nextafter(posZint8 * 0.5f, -std::numeric_limits::infinity()) : std::nextafter(posZint8 * 0.5f, std::numeric_limits::infinity())); }); //! posZ is multiplied by 2 in createEMEventDileton.cxx +DECLARE_SOA_DYNAMIC_COLUMN(CentFT0M, centFT0M, [](uint8_t centuint8) -> float { return centuint8 < 100 ? std::nextafter(centuint8 * 0.01f, std::numeric_limits::infinity()) : std::nextafter(centuint8 - 110.f, std::numeric_limits::infinity()); }); //! centrality is multiplied by 100 in createEMEventDilepton.cxx +DECLARE_SOA_DYNAMIC_COLUMN(CentFT0A, centFT0A, [](uint8_t centuint8) -> float { return centuint8 < 100 ? std::nextafter(centuint8 * 0.01f, std::numeric_limits::infinity()) : std::nextafter(centuint8 - 110.f, std::numeric_limits::infinity()); }); //! centrality is multiplied by 100 in createEMEventDilepton.cxx +DECLARE_SOA_DYNAMIC_COLUMN(CentFT0C, centFT0C, [](uint8_t centuint8) -> float { return centuint8 < 100 ? std::nextafter(centuint8 * 0.01f, std::numeric_limits::infinity()) : std::nextafter(centuint8 - 110.f, std::numeric_limits::infinity()); }); //! centrality is multiplied by 100 in createEMEventDilepton.cxx +DECLARE_SOA_DYNAMIC_COLUMN(CentNTPV, centNTPV, [](uint8_t centuint8) -> float { return centuint8 < 100 ? std::nextafter(centuint8 * 0.01f, std::numeric_limits::infinity()) : std::nextafter(centuint8 - 110.f, std::numeric_limits::infinity()); }); //! centrality is multiplied by 100 in createEMEventDilepton.cxx +DECLARE_SOA_DYNAMIC_COLUMN(CentNGlobal, centNGlobal, [](uint8_t centuint8) -> float { return centuint8 < 100 ? std::nextafter(centuint8 * 0.01f, std::numeric_limits::infinity()) : std::nextafter(centuint8 - 110.f, std::numeric_limits::infinity()); }); //! centrality is multiplied by 100 in createEMEventDilepton.cxx +} // namespace emeventnorm + +// namespace emcent +// { +// DECLARE_SOA_COLUMN(CentFT0Muint8, centFT0Muint8, uint8_t); //! this is only to reduce data size +// DECLARE_SOA_COLUMN(CentFT0Auint8, centFT0Auint8, uint8_t); //! this is only to reduce data size +// DECLARE_SOA_COLUMN(CentFT0Cuint8, centFT0Cuint8, uint8_t); //! this is only to reduce data size +// DECLARE_SOA_COLUMN(CentNTPVuint8, centNTPVuint8, uint8_t); //! this is only to reduce data size +// DECLARE_SOA_COLUMN(CentNGlobaluint8, centNGlobaluint8, uint8_t); //! this is only to reduce data size +// +// DECLARE_SOA_EXPRESSION_COLUMN(CentFT0A, centFT0A, float, 1.f * centFT0Auint8); // this must be inverse of calculation in createEMEventDilepton.cxx +// DECLARE_SOA_EXPRESSION_COLUMN(CentFT0M, centFT0M, float, 1.f * centFT0Muint8); // this must be inverse of calculation in createEMEventDilepton.cxx +// DECLARE_SOA_EXPRESSION_COLUMN(CentFT0C, centFT0C, float, 1.f * centFT0Cuint8); // this must be inverse of calculation in createEMEventDilepton.cxx +// DECLARE_SOA_EXPRESSION_COLUMN(CentNTPV, centNTPV, float, 1.f * centNTPVuint8); // this must be inverse of calculation in createEMEventDilepton.cxx +// DECLARE_SOA_EXPRESSION_COLUMN(CentNGlobal, centNGlobal, float, 1.f * centNGlobaluint8); // this must be inverse of calculation in createEMEventDilepton.cxx +// +// // DECLARE_SOA_EXPRESSION_COLUMN(CentFT0A, centFT0A, float, (centFT0Auint8 < 100) ? std::nextafter((1.f * centFT0Auint8) / 100.f, std::numeric_limits::infinity()) : std::nextafter((1.f * centFT0Auint8) - 110.f, std::numeric_limits::infinity())); // this must be inverse of calculation in createEMEventDilepton.cxx +// // DECLARE_SOA_EXPRESSION_COLUMN(CentFT0M, centFT0M, float, (centFT0Muint8 < 100) ? std::nextafter((1.f * centFT0Muint8) / 100.f, std::numeric_limits::infinity()) : std::nextafter((1.f * centFT0Muint8) - 110.f, std::numeric_limits::infinity())); // this must be inverse of calculation in createEMEventDilepton.cxx +// // DECLARE_SOA_EXPRESSION_COLUMN(CentFT0C, centFT0C, float, (centFT0Cuint8 < 100) ? std::nextafter((1.f * centFT0Cuint8) / 100.f, std::numeric_limits::infinity()) : std::nextafter((1.f * centFT0Cuint8) - 110.f, std::numeric_limits::infinity())); // this must be inverse of calculation in createEMEventDilepton.cxx +// // DECLARE_SOA_EXPRESSION_COLUMN(CentNTPV, centNTPV, float, (centNTPVuint8 < 100) ? std::nextafter((1.f * centNTPVuint8) / 100.f, std::numeric_limits::infinity()) : std::nextafter((1.f * centNTPVuint8) - 110.f, std::numeric_limits::infinity())); // this must be inverse of calculation in createEMEventDilepton.cxx +// // DECLARE_SOA_EXPRESSION_COLUMN(CentNGlobal, centNGlobal, float, (centNGlobaluint8 < 100) ? std::nextafter((1.f * centNGlobaluint8) / 100.f, std::numeric_limits::infinity()) : std::nextafter((1.f * centNGlobaluint8) - 110.f, std::numeric_limits::infinity())); // this must be inverse of calculation in createEMEventDilepton.cxx +// +// } // namespace emcent + +DECLARE_SOA_TABLE(EMBCs_000, "AOD", "EMBC", //! bc information for normalization + o2::soa::Index<>, evsel::Selection, evsel::Rct); + +DECLARE_SOA_TABLE_VERSIONED(EMBCs_001, "AOD", "EMBC", 1, //! bc information for normalization + o2::soa::Index<>, emevsel::Selection, evsel::Rct); + +using EMBCs = EMBCs_001; +using EMBC = EMBCs::iterator; + DECLARE_SOA_TABLE_VERSIONED(EMEvents_001, "AOD", "EMEVENT", 1, //! Main event information table o2::soa::Index<>, emevent::CollisionId, bc::RunNumber, bc::GlobalBC, evsel::Alias, evsel::Selection, timestamp::Timestamp, collision::PosX, collision::PosY, collision::PosZ, @@ -182,7 +316,12 @@ DECLARE_SOA_TABLE_VERSIONED(EMEvents_004, "AOD", "EMEVENT", 4, //! Main event collision::PosZ, collision::NumContrib, evsel::NumTracksInTimeRange, evsel::SumAmpFT0CInTimeRange, emevent::Sel8); -using EMEvents = EMEvents_004; +DECLARE_SOA_TABLE_VERSIONED(EMEvents_005, "AOD", "EMEVENT", 5, //! Main event information table + o2::soa::Index<>, emevent::CollisionId, bc::RunNumber, bc::GlobalBC, emevsel::Selection, evsel::Rct, timestamp::Timestamp, + collision::PosZ, + collision::NumContrib, evsel::NumTracksInTimeRange, evsel::SumAmpFT0CInTimeRange, emevsel::Sel8); + +using EMEvents = EMEvents_005; using EMEvent = EMEvents::iterator; DECLARE_SOA_TABLE_VERSIONED(EMEventsAlias_000, "AOD", "EMEVENTALIAS", 0, evsel::Alias) //! joinable to EMEvents @@ -199,15 +338,38 @@ using EMEventCov = EMEventsCov::iterator; DECLARE_SOA_TABLE(EMEventsBz, "AOD", "EMEVENTBZ", emevent::Bz); // joinable to EMEvents using EMEventBz = EMEventsBz::iterator; -DECLARE_SOA_TABLE(EMEventsMult, "AOD", "EMEVENTMULT", //! event multiplicity table, joinable to EMEvents +DECLARE_SOA_TABLE(EMEventsMult_000, "AOD", "EMEVENTMULT", //! event multiplicity table, joinable to EMEvents mult::MultFT0A, mult::MultFT0C, mult::MultNTracksPV, mult::MultNTracksPVeta1, mult::MultNTracksPVetaHalf, mult::IsInelGt0, mult::IsInelGt1, mult::MultFT0M); + +DECLARE_SOA_TABLE_VERSIONED(EMEventsMult_001, "AOD", "EMEVENTMULT", 1, //! event multiplicity table, joinable to EMEvents + mult::MultFT0A, mult::MultFT0C, mult::MultNTracksPV, /*mult::MultNTracksGlobal,*/ + mult::MultFT0M); + +using EMEventsMult = EMEventsMult_001; using EMEventMult = EMEventsMult::iterator; -DECLARE_SOA_TABLE(EMEventsCent, "AOD", "EMEVENTCENT", //! event centrality table, joinable to EMEvents +DECLARE_SOA_TABLE(EMEventsCent_000, "AOD", "EMEVENTCENT", //! event centrality table, joinable to EMEvents cent::CentFT0M, cent::CentFT0A, cent::CentFT0C); + +DECLARE_SOA_TABLE_VERSIONED(EMEventsCent_001, "AOD", "EMEVENTCENT", 1, //! event centrality table stored in AO2D + cent::CentFT0M, cent::CentFT0A, cent::CentFT0C, cent::CentNTPV /*, cent::CentNGlobal*/); + +using EMEventsCent = EMEventsCent_001; using EMEventCent = EMEventsCent::iterator; +// DECLARE_SOA_TABLE_VERSIONED(EMEventsCentBase_001, "AOD", "EMEVENTCENT", 1, //! event centrality table stored in AO2D +// emcent::CentFT0Muint8, emcent::CentFT0Auint8, emcent::CentFT0Cuint8, emcent::CentNTPVuint8, emcent::CentNGlobaluint8); +// +// using EMEventsCentBase = EMEventsCentBase_001; +// using EMEventCentBase = EMEventsCentBase::iterator; +// +// // Extended table with expression columns that can be used for Filter. +// DECLARE_SOA_EXTENDED_TABLE_USER(EMEventsCent, EMEventsCentBase, "EMCENTEXT", +// emcent::CentFT0M, emcent::CentFT0A, emcent::CentFT0C, emcent::CentNTPV, emcent::CentNGlobal); +// +// using EMEventCent = EMEventsCent::iterator; + DECLARE_SOA_TABLE_VERSIONED(EMEventsQvec_000, "AOD", "EMEVENTQVEC", 0, //! event q vector table, joinable to EMEvents emevent::Q2xFT0M, emevent::Q2yFT0M, emevent::Q2xFT0A, emevent::Q2yFT0A, emevent::Q2xFT0C, emevent::Q2yFT0C, emevent::Q2xBPos, emevent::Q2yBPos, emevent::Q2xBNeg, emevent::Q2yBNeg, emevent::Q2xBTot, emevent::Q2yBTot, @@ -255,6 +417,38 @@ DECLARE_SOA_TABLE_VERSIONED(EMEventsQvec_001, "AOD", "EMEVENTQVEC", 1, //! Mai using EMEventsQvec = EMEventsQvec_001; using EMEventQvec = EMEventsQvec::iterator; +DECLARE_SOA_TABLE_VERSIONED(EMEventsQvec2_000, "AOD", "EMEVENTQVEC2", 0, //! Main event information table + emevent::Q2xFT0M, emevent::Q2yFT0M, emevent::Q2xFT0A, emevent::Q2yFT0A, emevent::Q2xFT0C, emevent::Q2yFT0C, + emevent::Q2xFV0A, emevent::Q2yFV0A, + emevent::Q2xBPos, emevent::Q2yBPos, emevent::Q2xBNeg, emevent::Q2yBNeg, emevent::Q2xBTot, emevent::Q2yBTot, + // Dynamic columns + emevent::EP2FT0M, + emevent::EP2FT0A, + emevent::EP2FT0C, + emevent::EP2FV0A, + emevent::EP2BPos, + emevent::EP2BNeg, + emevent::EP2BTot); + +using EMEventsQvec2 = EMEventsQvec2_000; +using EMEventQvec2 = EMEventsQvec2::iterator; + +DECLARE_SOA_TABLE_VERSIONED(EMEventsQvec3_000, "AOD", "EMEVENTQVEC3", 0, //! Main event information table + emevent::Q3xFT0M, emevent::Q3yFT0M, emevent::Q3xFT0A, emevent::Q3yFT0A, emevent::Q3xFT0C, emevent::Q3yFT0C, + emevent::Q3xFV0A, emevent::Q3yFV0A, + emevent::Q3xBPos, emevent::Q3yBPos, emevent::Q3xBNeg, emevent::Q3yBNeg, emevent::Q3xBTot, emevent::Q3yBTot, + // Dynamic columns + emevent::EP3FT0M, + emevent::EP3FT0A, + emevent::EP3FT0C, + emevent::EP3FV0A, + emevent::EP3BPos, + emevent::EP3BNeg, + emevent::EP3BTot); + +using EMEventsQvec3 = EMEventsQvec3_000; +using EMEventQvec3 = EMEventsQvec3::iterator; + DECLARE_SOA_TABLE(EMSWTriggerBits, "AOD", "EMSWTBIT", emevent::SWTAlias, o2::soa::Marker<1>); //! joinable to EMEvents using EMSWTriggerBit = EMSWTriggerBits::iterator; @@ -301,7 +495,12 @@ DECLARE_SOA_TABLE_VERSIONED(EMEventNormInfos_000, "AOD", "EMEVENTNORMINFO", 0, / DECLARE_SOA_TABLE_VERSIONED(EMEventNormInfos_001, "AOD", "EMEVENTNORMINFO", 1, //! event information for normalization o2::soa::Index<>, evsel::Selection, evsel::Rct, emevent::PosZint16, emevent::CentFT0Cuint16, emevent::Sel8, emevent::PosZ, emevent::CentFT0C, o2::soa::Marker<1>); -using EMEventNormInfos = EMEventNormInfos_001; + +DECLARE_SOA_TABLE_VERSIONED(EMEventNormInfos_002, "AOD", "EMEVENTNORMINFO", 2, //! event information for normalization + emevsel::Selection, evsel::Rct, emevent::PosZint8, emevent::CentFT0Muint8, emevent::CentFT0Cuint8, emevent::CentNTPVuint8, /*emevent::CentNGlobaluint8,*/ + emevsel::Sel8, emeventnorm::PosZ, emeventnorm::CentFT0M, emeventnorm::CentFT0C, emeventnorm::CentNTPV, /*emeventnorm::CentNTPV,*/ o2::soa::Marker<1>); + +using EMEventNormInfos = EMEventNormInfos_002; using EMEventNormInfo = EMEventNormInfos::iterator; namespace emmcevent @@ -960,9 +1159,9 @@ DECLARE_SOA_TABLE_VERSIONED(EMThinEvents_000, "AOD", "EMTHINEVENT", 0, //! Thin using EMThinEvents = EMThinEvents_000; using EMThinEvent = EMThinEvents::iterator; -DECLARE_SOA_TABLE_VERSIONED(EMThinEventNormInfos_000, "AOD", "EMTHINEVENTNORM", 0, //! event information for normalization - o2::soa::Index<>, evsel::Selection, evsel::Rct, emevent::PosZint16, emevent::CentFT0Cuint16, - emevent::Sel8, emevent::PosZ, emevent::CentFT0C, o2::soa::Marker<2>); +DECLARE_SOA_TABLE_VERSIONED(EMThinEventNormInfos_000, "AOD", "EMTHINEVENTNORM", 0, //! event information for normalization + o2::soa::Index<>, emevsel::Selection, evsel::Rct, emevent::PosZint8, emevent::CentFT0Muint8, emevent::CentFT0Cuint8, emevent::CentNTPVuint8, /*emevent::CentNGlobaluint8,*/ + emevsel::Sel8, emeventnorm::PosZ, emeventnorm::CentFT0M, emeventnorm::CentFT0C, emeventnorm::CentNTPV, /*emeventnorm::CentNGlobal,*/ o2::soa::Marker<2>); using EMThinEventNormInfos = EMThinEventNormInfos_000; using EMThinEventNormInfo = EMThinEventNormInfos::iterator; diff --git a/PWGEM/Dilepton/TableProducer/CMakeLists.txt b/PWGEM/Dilepton/TableProducer/CMakeLists.txt index 66715bbefa3..109248797d6 100644 --- a/PWGEM/Dilepton/TableProducer/CMakeLists.txt +++ b/PWGEM/Dilepton/TableProducer/CMakeLists.txt @@ -91,3 +91,13 @@ o2physics_add_dpl_workflow(qvector-dummy-otf PUBLIC_LINK_LIBRARIES O2::Framework O2Physics::AnalysisCore COMPONENT_NAME Analysis) +o2physics_add_dpl_workflow(qvector2-dummy-otf + SOURCES qVector2DummyOTF.cxx + PUBLIC_LINK_LIBRARIES O2::Framework O2Physics::AnalysisCore + COMPONENT_NAME Analysis) + +o2physics_add_dpl_workflow(qvector3-dummy-otf + SOURCES qVector3DummyOTF.cxx + PUBLIC_LINK_LIBRARIES O2::Framework O2Physics::AnalysisCore + COMPONENT_NAME Analysis) + diff --git a/PWGEM/Dilepton/TableProducer/Converters/CMakeLists.txt b/PWGEM/Dilepton/TableProducer/Converters/CMakeLists.txt index eea03e885e6..9d130209e72 100644 --- a/PWGEM/Dilepton/TableProducer/Converters/CMakeLists.txt +++ b/PWGEM/Dilepton/TableProducer/Converters/CMakeLists.txt @@ -25,6 +25,11 @@ o2physics_add_dpl_workflow(event-converter4 PUBLIC_LINK_LIBRARIES O2::Framework O2Physics::AnalysisCore COMPONENT_NAME Analysis) +o2physics_add_dpl_workflow(event-converter5 + SOURCES eventConverter5.cxx + PUBLIC_LINK_LIBRARIES O2::Framework O2Physics::AnalysisCore + COMPONENT_NAME Analysis) + o2physics_add_dpl_workflow(electron-converter2 SOURCES electronConverter2.cxx PUBLIC_LINK_LIBRARIES O2::Framework O2Physics::AnalysisCore @@ -70,3 +75,33 @@ o2physics_add_dpl_workflow(event-norm-converter1 PUBLIC_LINK_LIBRARIES O2::Framework O2Physics::AnalysisCore COMPONENT_NAME Analysis) +o2physics_add_dpl_workflow(event-norm-converter2 + SOURCES eventNormConverter2.cxx + PUBLIC_LINK_LIBRARIES O2::Framework O2Physics::AnalysisCore + COMPONENT_NAME Analysis) + +o2physics_add_dpl_workflow(event-mult-converter1 + SOURCES eventMultConverter1.cxx + PUBLIC_LINK_LIBRARIES O2::Framework O2Physics::AnalysisCore + COMPONENT_NAME Analysis) + +o2physics_add_dpl_workflow(event-cent-converter1 + SOURCES eventCentConverter1.cxx + PUBLIC_LINK_LIBRARIES O2::Framework O2Physics::AnalysisCore + COMPONENT_NAME Analysis) + +o2physics_add_dpl_workflow(qvec2-converter0 + SOURCES qvec2Converter0.cxx + PUBLIC_LINK_LIBRARIES O2::Framework O2Physics::AnalysisCore + COMPONENT_NAME Analysis) + +o2physics_add_dpl_workflow(qvec3-converter0 + SOURCES qvec3Converter0.cxx + PUBLIC_LINK_LIBRARIES O2::Framework O2Physics::AnalysisCore + COMPONENT_NAME Analysis) + +o2physics_add_dpl_workflow(bc-converter1 + SOURCES bcConverter1.cxx + PUBLIC_LINK_LIBRARIES O2::Framework O2Physics::AnalysisCore + COMPONENT_NAME Analysis) + diff --git a/PWGEM/PhotonMeson/Tasks/diphotonHadronMPCPCMDalitzEE.cxx b/PWGEM/Dilepton/TableProducer/Converters/bcConverter1.cxx similarity index 61% rename from PWGEM/PhotonMeson/Tasks/diphotonHadronMPCPCMDalitzEE.cxx rename to PWGEM/Dilepton/TableProducer/Converters/bcConverter1.cxx index a3a7b548894..43c3cf43e24 100644 --- a/PWGEM/PhotonMeson/Tasks/diphotonHadronMPCPCMDalitzEE.cxx +++ b/PWGEM/Dilepton/TableProducer/Converters/bcConverter1.cxx @@ -11,26 +11,33 @@ // // ======================== // -// This code loops over photons and makes pairs for neutral mesons analyses. +// This code runs loop over ULS ee pars for virtual photon QC. // Please write to: daiki.sekihata@cern.ch -#include "PWGEM/PhotonMeson/Core/DiphotonHadronMPC.h" -#include "PWGEM/PhotonMeson/DataModel/gammaTables.h" -#include "PWGEM/PhotonMeson/Utils/PairUtilities.h" - -#include "Common/Core/RecoDecay.h" +#include "PWGEM/Dilepton/DataModel/dileptonTables.h" #include "Framework/ASoAHelpers.h" -#include "Framework/AnalysisDataModel.h" #include "Framework/AnalysisTask.h" #include "Framework/runDataProcessing.h" using namespace o2; using namespace o2::aod; +using namespace o2::framework; +using namespace o2::framework::expressions; +using namespace o2::soa; + +struct bcConverter1 { + Produces bc_001; + + void process(aod::EMBCs_000 const& bcs) + { + for (const auto& bc : bcs) { + bc_001(o2::aod::emevsel::reduceSelectionBit(bc), bc.rct_raw()); + } // end of bc loop + } +}; WorkflowSpec defineDataProcessing(ConfigContext const& cfgc) { - return WorkflowSpec{ - adaptAnalysisTask>(cfgc, TaskName{"diphoton-hadron-mpc-pcmdalitzee"}), - }; + return WorkflowSpec{adaptAnalysisTask(cfgc, TaskName{"bc-converter1"})}; } diff --git a/PWGEM/Dilepton/TableProducer/Converters/eventCentConverter1.cxx b/PWGEM/Dilepton/TableProducer/Converters/eventCentConverter1.cxx new file mode 100644 index 00000000000..559c871dd1a --- /dev/null +++ b/PWGEM/Dilepton/TableProducer/Converters/eventCentConverter1.cxx @@ -0,0 +1,47 @@ +// Copyright 2019-2020 CERN and copyright holders of ALICE O2. +// See https://alice-o2.web.cern.ch/copyright for details of the copyright holders. +// All rights not expressly granted are reserved. +// +// This software is distributed under the terms of the GNU General Public +// License v3 (GPL Version 3), copied verbatim in the file "COPYING". +// +// In applying this license CERN does not waive the privileges and immunities +// granted to it by virtue of its status as an Intergovernmental Organization +// or submit itself to any jurisdiction. +// +// ======================== +// +// This code runs loop over ULS ee pars for virtual photon QC. +// Please write to: daiki.sekihata@cern.ch + +#include "PWGEM/Dilepton/DataModel/dileptonTables.h" + +#include "Framework/ASoAHelpers.h" +#include "Framework/AnalysisTask.h" +#include "Framework/runDataProcessing.h" + +using namespace o2; +using namespace o2::aod; +using namespace o2::framework; +using namespace o2::framework::expressions; +using namespace o2::soa; + +struct eventCentConverter1 { + Produces cent_001; + + void process(aod::EMEventsCent_000 const& collisions) + { + for (const auto& collision : collisions) { + cent_001( + collision.centFT0M(), + collision.centFT0A(), + collision.centFT0C(), + 105.f); + } // end of collision loop + } +}; + +WorkflowSpec defineDataProcessing(ConfigContext const& cfgc) +{ + return WorkflowSpec{adaptAnalysisTask(cfgc, TaskName{"event-cent-converter1"})}; +} diff --git a/PWGEM/Dilepton/TableProducer/Converters/eventConverter5.cxx b/PWGEM/Dilepton/TableProducer/Converters/eventConverter5.cxx new file mode 100644 index 00000000000..59227518b1a --- /dev/null +++ b/PWGEM/Dilepton/TableProducer/Converters/eventConverter5.cxx @@ -0,0 +1,113 @@ +// Copyright 2019-2020 CERN and copyright holders of ALICE O2. +// See https://alice-o2.web.cern.ch/copyright for details of the copyright holders. +// All rights not expressly granted are reserved. +// +// This software is distributed under the terms of the GNU General Public +// License v3 (GPL Version 3), copied verbatim in the file "COPYING". +// +// In applying this license CERN does not waive the privileges and immunities +// granted to it by virtue of its status as an Intergovernmental Organization +// or submit itself to any jurisdiction. +// +// ======================== +// +// This code runs loop over ULS ee pars for virtual photon QC. +// Please write to: daiki.sekihata@cern.ch + +#include "PWGEM/Dilepton/DataModel/dileptonTables.h" + +#include "Framework/ASoAHelpers.h" +#include "Framework/AnalysisTask.h" +#include "Framework/runDataProcessing.h" + +using namespace o2; +using namespace o2::aod; +using namespace o2::framework; +using namespace o2::framework::expressions; +using namespace o2::soa; + +struct eventConverter5 { + Produces event_005; + + // template + // uint32_t reduceSelectionBit(TBC const& bc) + // { + // //input should be aod::BcSels or aod::EvSels. + // uint32_t bitMap = 0; + // if (bc.selection_bit(o2::aod::evsel::kIsTriggerTVX)) { + // SETBIT(bitMap, o2::aod::emevsel::kIsTriggerTVX); + // } + // if (bc.selection_bit(o2::aod::evsel::kNoTimeFrameBorder)) { + // SETBIT(bitMap, o2::aod::emevsel::kNoTimeFrameBorder); + // } + // if (bc.selection_bit(o2::aod::evsel::kNoITSROFrameBorder)) { + // SETBIT(bitMap, o2::aod::emevsel::kNoITSROFrameBorder); + // } + // if (bc.selection_bit(o2::aod::evsel::kNoSameBunchPileup)) { + // SETBIT(bitMap, o2::aod::emevsel::kNoSameBunchPileup); + // } + // if (bc.selection_bit(o2::aod::evsel::kIsGoodZvtxFT0vsPV)) { + // SETBIT(bitMap, o2::aod::emevsel::kIsGoodZvtxFT0vsPV); + // } + // if (bc.selection_bit(o2::aod::evsel::kIsVertexITSTPC)) { + // SETBIT(bitMap, o2::aod::emevsel::kIsVertexITSTPC); + // } + // if (bc.selection_bit(o2::aod::evsel::kIsVertexTRDmatched)) { + // SETBIT(bitMap, o2::aod::emevsel::kIsVertexTRDmatched); + // } + // if (bc.selection_bit(o2::aod::evsel::kIsVertexTOFmatched)) { + // SETBIT(bitMap, o2::aod::emevsel::kIsVertexTOFmatched); + // } + // if (bc.selection_bit(o2::aod::evsel::kNoCollInTimeRangeStandard)) { + // SETBIT(bitMap, o2::aod::emevsel::kNoCollInTimeRangeStandard); + // } + // if (bc.selection_bit(o2::aod::evsel::kNoCollInTimeRangeStrict)) { + // SETBIT(bitMap, o2::aod::emevsel::kNoCollInTimeRangeStandard); + // } + // if (bc.selection_bit(o2::aod::evsel::kNoCollInTimeRangeNarrow)) { + // SETBIT(bitMap, o2::aod::emevsel::kNoCollInTimeRangeNarrow); + // } + // if (bc.selection_bit(o2::aod::evsel::kNoCollInRofStandard)) { + // SETBIT(bitMap, o2::aod::emevsel::kNoCollInRofStandard); + // } + // if (bc.selection_bit(o2::aod::evsel::kNoCollInRofStrict)) { + // SETBIT(bitMap, o2::aod::emevsel::kNoCollInRofStrict); + // } + // if (bc.selection_bit(o2::aod::evsel::kNoHighMultCollInPrevRof)) { + // SETBIT(bitMap, o2::aod::emevsel::kNoHighMultCollInPrevRof); + // } + // if (bc.selection_bit(o2::aod::evsel::kIsGoodITSLayer3)) { + // SETBIT(bitMap, o2::aod::emevsel::kIsGoodITSLayer3); + // } + // if (bc.selection_bit(o2::aod::evsel::kIsGoodITSLayer0123)) { + // SETBIT(bitMap, o2::aod::emevsel::kIsGoodITSLayer0123); + // } + // if (bc.selection_bit(o2::aod::evsel::kIsGoodITSLayersAll)) { + // SETBIT(bitMap, o2::aod::emevsel::kIsGoodITSLayersAll); + // } + // return bitMap; + // } + + void process004to005(aod::EMEvents_004 const& collisions) + { + for (const auto& collision : collisions) { + event_005( + collision.globalIndex(), + collision.runNumber(), + collision.globalBC(), + o2::aod::emevsel::reduceSelectionBit(collision), + collision.rct_raw(), + collision.timestamp(), + collision.posZ(), + collision.numContrib(), + collision.trackOccupancyInTimeRange(), + collision.ft0cOccupancyInTimeRange()); + } // end of collision loop + } + PROCESS_SWITCH(eventConverter5, process004to005, "convert from 004 into 005", true); +}; + +WorkflowSpec defineDataProcessing(ConfigContext const& cfgc) +{ + return WorkflowSpec{adaptAnalysisTask(cfgc, TaskName{"event-converter5"})}; +} diff --git a/PWGEM/Dilepton/TableProducer/Converters/eventMultConverter1.cxx b/PWGEM/Dilepton/TableProducer/Converters/eventMultConverter1.cxx new file mode 100644 index 00000000000..0682d607675 --- /dev/null +++ b/PWGEM/Dilepton/TableProducer/Converters/eventMultConverter1.cxx @@ -0,0 +1,46 @@ +// Copyright 2019-2020 CERN and copyright holders of ALICE O2. +// See https://alice-o2.web.cern.ch/copyright for details of the copyright holders. +// All rights not expressly granted are reserved. +// +// This software is distributed under the terms of the GNU General Public +// License v3 (GPL Version 3), copied verbatim in the file "COPYING". +// +// In applying this license CERN does not waive the privileges and immunities +// granted to it by virtue of its status as an Intergovernmental Organization +// or submit itself to any jurisdiction. +// +// ======================== +// +// This code runs loop over ULS ee pars for virtual photon QC. +// Please write to: daiki.sekihata@cern.ch + +#include "PWGEM/Dilepton/DataModel/dileptonTables.h" + +#include "Framework/ASoAHelpers.h" +#include "Framework/AnalysisTask.h" +#include "Framework/runDataProcessing.h" + +using namespace o2; +using namespace o2::aod; +using namespace o2::framework; +using namespace o2::framework::expressions; +using namespace o2::soa; + +struct eventMultConverter1 { + Produces mult_001; + + void process(aod::EMEventsMult_000 const& collisions) + { + for (const auto& collision : collisions) { + mult_001( + collision.multFT0A(), + collision.multFT0C(), + collision.multNTracksPV()); + } // end of mult row loop + } +}; + +WorkflowSpec defineDataProcessing(ConfigContext const& cfgc) +{ + return WorkflowSpec{adaptAnalysisTask(cfgc, TaskName{"event-mult-converter1"})}; +} diff --git a/PWGEM/Dilepton/TableProducer/Converters/eventNormConverter2.cxx b/PWGEM/Dilepton/TableProducer/Converters/eventNormConverter2.cxx new file mode 100644 index 00000000000..c782ef2cd4f --- /dev/null +++ b/PWGEM/Dilepton/TableProducer/Converters/eventNormConverter2.cxx @@ -0,0 +1,59 @@ +// Copyright 2019-2020 CERN and copyright holders of ALICE O2. +// See https://alice-o2.web.cern.ch/copyright for details of the copyright holders. +// All rights not expressly granted are reserved. +// +// This software is distributed under the terms of the GNU General Public +// License v3 (GPL Version 3), copied verbatim in the file "COPYING". +// +// In applying this license CERN does not waive the privileges and immunities +// granted to it by virtue of its status as an Intergovernmental Organization +// or submit itself to any jurisdiction. +// +// ======================== +// +// This code runs loop over ULS ee pars for virtual photon QC. +// Please write to: daiki.sekihata@cern.ch + +#include "PWGEM/Dilepton/DataModel/dileptonTables.h" + +#include "Framework/ASoAHelpers.h" +#include "Framework/AnalysisTask.h" +#include "Framework/runDataProcessing.h" + +using namespace o2; +using namespace o2::aod; +using namespace o2::framework; +using namespace o2::framework::expressions; +using namespace o2::soa; + +struct eventNormConverter2 { + Produces event_002; + + void process(aod::EMEventNormInfos_001 const& collisions) + { + for (const auto& collision : collisions) { + + int8_t posZint8 = static_cast(collision.posZ() * 2.f); + if (posZint8 == 0) { + if (collision.posZ() < 0.f) { + posZint8 = -1; + } else { + posZint8 = +1; + } + } + + event_002( + o2::aod::emevsel::reduceSelectionBit(collision), + collision.rct_raw(), + posZint8, + 105 + 110, + collision.centFT0C() < 1.f ? static_cast(collision.centFT0C() * 100.f) : static_cast(collision.centFT0C() + 110.f), + 105 + 110); + } // end of collision loop + } +}; + +WorkflowSpec defineDataProcessing(ConfigContext const& cfgc) +{ + return WorkflowSpec{adaptAnalysisTask(cfgc, TaskName{"event-norm-converter2"})}; +} diff --git a/PWGEM/Dilepton/TableProducer/Converters/qvec2Converter0.cxx b/PWGEM/Dilepton/TableProducer/Converters/qvec2Converter0.cxx new file mode 100644 index 00000000000..21342c4468b --- /dev/null +++ b/PWGEM/Dilepton/TableProducer/Converters/qvec2Converter0.cxx @@ -0,0 +1,50 @@ +// Copyright 2019-2020 CERN and copyright holders of ALICE O2. +// See https://alice-o2.web.cern.ch/copyright for details of the copyright holders. +// All rights not expressly granted are reserved. +// +// This software is distributed under the terms of the GNU General Public +// License v3 (GPL Version 3), copied verbatim in the file "COPYING". +// +// In applying this license CERN does not waive the privileges and immunities +// granted to it by virtue of its status as an Intergovernmental Organization +// or submit itself to any jurisdiction. +// +// ======================== +// +// This code converts q vector table into qvec2 table. +// Please write to: daiki.sekihata@cern.ch + +#include "PWGEM/Dilepton/DataModel/dileptonTables.h" + +#include "Framework/ASoAHelpers.h" +#include "Framework/AnalysisTask.h" +#include "Framework/runDataProcessing.h" + +using namespace o2; +using namespace o2::aod; +using namespace o2::framework; +using namespace o2::framework::expressions; +using namespace o2::soa; + +struct qvec2Converter0 { + Produces qvec2_000; + + void process(aod::EMEventsQvec_001 const& collisions) + { + for (const auto& collision : collisions) { + qvec2_000( + collision.q2xft0m(), collision.q2yft0m(), + collision.q2xft0a(), collision.q2yft0a(), + collision.q2xft0c(), collision.q2yft0c(), + collision.q2xfv0a(), collision.q2yfv0a(), + collision.q2xbpos(), collision.q2ybpos(), + collision.q2xbneg(), collision.q2ybneg(), + collision.q2xbtot(), collision.q2ybtot()); + } // end of collision loop + } +}; + +WorkflowSpec defineDataProcessing(ConfigContext const& cfgc) +{ + return WorkflowSpec{adaptAnalysisTask(cfgc, TaskName{"qvec2-converter0"})}; +} diff --git a/PWGEM/Dilepton/TableProducer/Converters/qvec3Converter0.cxx b/PWGEM/Dilepton/TableProducer/Converters/qvec3Converter0.cxx new file mode 100644 index 00000000000..cc35b94bec3 --- /dev/null +++ b/PWGEM/Dilepton/TableProducer/Converters/qvec3Converter0.cxx @@ -0,0 +1,50 @@ +// Copyright 2019-2020 CERN and copyright holders of ALICE O2. +// See https://alice-o2.web.cern.ch/copyright for details of the copyright holders. +// All rights not expressly granted are reserved. +// +// This software is distributed under the terms of the GNU General Public +// License v3 (GPL Version 3), copied verbatim in the file "COPYING". +// +// In applying this license CERN does not waive the privileges and immunities +// granted to it by virtue of its status as an Intergovernmental Organization +// or submit itself to any jurisdiction. +// +// ======================== +// +// This code converts q vector table into qvec3 table. +// Please write to: daiki.sekihata@cern.ch + +#include "PWGEM/Dilepton/DataModel/dileptonTables.h" + +#include "Framework/ASoAHelpers.h" +#include "Framework/AnalysisTask.h" +#include "Framework/runDataProcessing.h" + +using namespace o2; +using namespace o2::aod; +using namespace o2::framework; +using namespace o2::framework::expressions; +using namespace o2::soa; + +struct qvec3Converter0 { + Produces qvec3_000; + + void process(aod::EMEventsQvec_001 const& collisions) + { + for (const auto& collision : collisions) { + qvec3_000( + collision.q3xft0m(), collision.q3yft0m(), + collision.q3xft0a(), collision.q3yft0a(), + collision.q3xft0c(), collision.q3yft0c(), + collision.q3xfv0a(), collision.q3yfv0a(), + collision.q3xbpos(), collision.q3ybpos(), + collision.q3xbneg(), collision.q3ybneg(), + collision.q3xbtot(), collision.q3ybtot()); + } // end of collision loop + } +}; + +WorkflowSpec defineDataProcessing(ConfigContext const& cfgc) +{ + return WorkflowSpec{adaptAnalysisTask(cfgc, TaskName{"qvec3-converter0"})}; +} diff --git a/PWGEM/Dilepton/TableProducer/associateMCinfoDilepton.cxx b/PWGEM/Dilepton/TableProducer/associateMCinfoDilepton.cxx index 1b4044f4bf3..e60f9b54365 100644 --- a/PWGEM/Dilepton/TableProducer/associateMCinfoDilepton.cxx +++ b/PWGEM/Dilepton/TableProducer/associateMCinfoDilepton.cxx @@ -15,7 +15,7 @@ // Please write to: daiki.sekihata@cern.ch #include "PWGEM/Dilepton/DataModel/dileptonTables.h" -#include "PWGEM/PhotonMeson/DataModel/gammaTables.h" +// #include "PWGEM/PhotonMeson/DataModel/gammaTables.h" #include "Common/Core/TableHelper.h" @@ -39,7 +39,7 @@ struct AssociateMCInfoDilepton { enum SubSystem { kElectron = 0x1, kFwdMuon = 0x2, - kPCM = 0x4, + // kPCM = 0x4, }; using MyCollisionsMC = soa::Join; @@ -51,7 +51,7 @@ struct AssociateMCInfoDilepton { Produces mceventlabels; Produces emmcparticles; Produces emmcgenvms; - Produces v0legmclabels; + // Produces v0legmclabels; Produces emprimaryelectronmclabels; Produces emprimarymuonmclabels; Produces emmftmclabels; @@ -130,7 +130,7 @@ struct AssociateMCInfoDilepton { SliceCache cache; Preslice perMcCollision = aod::mcparticle::mcCollisionId; - Preslice perCollision_pcm = aod::v0photonkf::collisionId; + // Preslice perCollision_pcm = aod::v0photonkf::collisionId; Preslice perCollision_el = aod::emprimaryelectron::collisionId; Preslice perCollision_mu = aod::emprimarymuon::collisionId; @@ -140,7 +140,7 @@ struct AssociateMCInfoDilepton { Partition mcvectormesons = o2::aod::mcparticle::pdgCode == 223 || o2::aod::mcparticle::pdgCode == 333; template - void skimmingMC(MyCollisionsMC const& collisions, aod::BCs const&, aod::McCollisions const& mcCollisions, aod::McParticles const& mcTracks, TTracks const& o2tracks, TFwdTracks const& o2fwdtracks, TMFTTracks const&, TPCMs const& v0photons, TPCMLegs const&, TEMPrimaryElectrons const& emprimaryelectrons, TEMPrimaryMuons const& emprimarymuons) + void skimmingMC(MyCollisionsMC const& collisions, aod::BCs const&, aod::McCollisions const& mcCollisions, aod::McParticles const& mcTracks, TTracks const& o2tracks, TFwdTracks const& o2fwdtracks, TMFTTracks const&, TPCMs const&, TPCMLegs const&, TEMPrimaryElectrons const& emprimaryelectrons, TEMPrimaryMuons const& emprimarymuons) { // temporary variables used for the indexing of the skimmed MC stack std::map fNewLabels; @@ -359,68 +359,68 @@ struct AssociateMCInfoDilepton { } // end of mc collision loop - if constexpr (static_cast(system & kPCM)) { - for (const auto& v0 : v0photons) { - auto collision_from_v0 = collisions.iteratorAt(v0.collisionId()); - if (!collision_from_v0.has_mcCollision()) { - continue; - } - - auto ele = v0.template negTrack_as(); - auto pos = v0.template posTrack_as(); - - auto o2track_ele = o2tracks.iteratorAt(ele.trackId()); - auto o2track_pos = o2tracks.iteratorAt(pos.trackId()); - - if (!o2track_ele.has_mcParticle() || !o2track_pos.has_mcParticle()) { - continue; // If no MC particle is found, skip the v0 - } - - for (const auto& leg : {pos, ele}) { // be carefull of order {pos, ele}! - auto o2track = o2tracks.iteratorAt(leg.trackId()); - auto mctrack = o2track.template mcParticle_as(); - // LOGF(info, "mctrack.globalIndex() = %d, mctrack.index() = %d", mctrack.globalIndex(), mctrack.index()); // these are exactly the same. - - // if the MC truth particle corresponding to this reconstructed track which is not already written, add it to the skimmed MC stack - if (!(fNewLabels.find(mctrack.globalIndex()) != fNewLabels.end())) { - fNewLabels[mctrack.globalIndex()] = fCounters[0]; - fNewLabelsReversed[fCounters[0]] = mctrack.globalIndex(); - // fMCFlags[mctrack.globalIndex()] = mcflags; - fEventIdx[mctrack.globalIndex()] = fEventLabels.find(mctrack.mcCollisionId())->second; - fCounters[0]++; - } - v0legmclabels(fNewLabels.find(mctrack.index())->second, o2track.mcMask()); - - // Next, store mother-chain of this reconstructed track. - int motherid = -999; // first mother index - if (mctrack.has_mothers()) { - motherid = mctrack.mothersIds()[0]; // first mother index - } - while (motherid > -1) { - if (motherid < mcTracks.size()) { // protect against bad mother indices. why is this needed? - auto mp = mcTracks.iteratorAt(motherid); - - // if the MC truth particle corresponding to this reconstructed track which is not already written, add it to the skimmed MC stack - if (!(fNewLabels.find(mp.globalIndex()) != fNewLabels.end())) { - fNewLabels[mp.globalIndex()] = fCounters[0]; - fNewLabelsReversed[fCounters[0]] = mp.globalIndex(); - // fMCFlags[mp.globalIndex()] = mcflags; - fEventIdx[mp.globalIndex()] = fEventLabels.find(mp.mcCollisionId())->second; - fCounters[0]++; - } - - if (mp.has_mothers()) { - motherid = mp.mothersIds()[0]; // first mother index - } else { - motherid = -999; - } - } else { - motherid = -999; - } - } // end of mother chain loop - } // end of leg loop - } // end of v0 loop - } + // if constexpr (static_cast(system & kPCM)) { + // for (const auto& v0 : v0photons) { + // auto collision_from_v0 = collisions.iteratorAt(v0.collisionId()); + // if (!collision_from_v0.has_mcCollision()) { + // continue; + // } + + // auto ele = v0.template negTrack_as(); + // auto pos = v0.template posTrack_as(); + + // auto o2track_ele = o2tracks.iteratorAt(ele.trackId()); + // auto o2track_pos = o2tracks.iteratorAt(pos.trackId()); + + // if (!o2track_ele.has_mcParticle() || !o2track_pos.has_mcParticle()) { + // continue; // If no MC particle is found, skip the v0 + // } + + // for (const auto& leg : {pos, ele}) { // be carefull of order {pos, ele}! + // auto o2track = o2tracks.iteratorAt(leg.trackId()); + // auto mctrack = o2track.template mcParticle_as(); + // // LOGF(info, "mctrack.globalIndex() = %d, mctrack.index() = %d", mctrack.globalIndex(), mctrack.index()); // these are exactly the same. + + // // if the MC truth particle corresponding to this reconstructed track which is not already written, add it to the skimmed MC stack + // if (!(fNewLabels.find(mctrack.globalIndex()) != fNewLabels.end())) { + // fNewLabels[mctrack.globalIndex()] = fCounters[0]; + // fNewLabelsReversed[fCounters[0]] = mctrack.globalIndex(); + // // fMCFlags[mctrack.globalIndex()] = mcflags; + // fEventIdx[mctrack.globalIndex()] = fEventLabels.find(mctrack.mcCollisionId())->second; + // fCounters[0]++; + // } + // v0legmclabels(fNewLabels.find(mctrack.index())->second, o2track.mcMask()); + + // // Next, store mother-chain of this reconstructed track. + // int motherid = -999; // first mother index + // if (mctrack.has_mothers()) { + // motherid = mctrack.mothersIds()[0]; // first mother index + // } + // while (motherid > -1) { + // if (motherid < mcTracks.size()) { // protect against bad mother indices. why is this needed? + // auto mp = mcTracks.iteratorAt(motherid); + + // // if the MC truth particle corresponding to this reconstructed track which is not already written, add it to the skimmed MC stack + // if (!(fNewLabels.find(mp.globalIndex()) != fNewLabels.end())) { + // fNewLabels[mp.globalIndex()] = fCounters[0]; + // fNewLabelsReversed[fCounters[0]] = mp.globalIndex(); + // // fMCFlags[mp.globalIndex()] = mcflags; + // fEventIdx[mp.globalIndex()] = fEventLabels.find(mp.mcCollisionId())->second; + // fCounters[0]++; + // } + + // if (mp.has_mothers()) { + // motherid = mp.mothersIds()[0]; // first mother index + // } else { + // motherid = -999; + // } + // } else { + // motherid = -999; + // } + // } // end of mother chain loop + // } // end of leg loop + // } // end of v0 loop + // } if constexpr (static_cast(system & kElectron)) { // auto emprimaryelectrons_coll = emprimaryelectrons.sliceBy(perCollision_el, collision.globalIndex()); @@ -683,22 +683,22 @@ struct AssociateMCInfoDilepton { skimmingMC(collisions, bcs, mccollisions, mcTracks, o2tracks, o2fwdtracks, o2mfttracks, nullptr, nullptr, emprimaryelectrons, emprimarymuons); } - void processMC_Electron_FwdMuon_PCM(MyCollisionsMC const& collisions, aod::BCs const& bcs, aod::McCollisions const& mccollisions, aod::McParticles const& mcTracks, TracksMC const& o2tracks, FwdTracksMC const& o2fwdtracks, MFTTracksMC const& o2mfttracks, aod::V0PhotonsKF const& v0photons, aod::V0Legs const& v0legs, aod::EMPrimaryElectrons const& emprimaryelectrons, aod::EMPrimaryMuons const& emprimarymuons) - { - const uint8_t sysflag = kPCM | kElectron | kFwdMuon; - skimmingMC(collisions, bcs, mccollisions, mcTracks, o2tracks, o2fwdtracks, o2mfttracks, v0photons, v0legs, emprimaryelectrons, emprimarymuons); - } + // void processMC_Electron_FwdMuon_PCM(MyCollisionsMC const& collisions, aod::BCs const& bcs, aod::McCollisions const& mccollisions, aod::McParticles const& mcTracks, TracksMC const& o2tracks, FwdTracksMC const& o2fwdtracks, MFTTracksMC const& o2mfttracks, aod::V0PhotonsKF const& v0photons, aod::V0Legs const& v0legs, aod::EMPrimaryElectrons const& emprimaryelectrons, aod::EMPrimaryMuons const& emprimarymuons) + // { + // const uint8_t sysflag = kPCM | kElectron | kFwdMuon; + // skimmingMC(collisions, bcs, mccollisions, mcTracks, o2tracks, o2fwdtracks, o2mfttracks, v0photons, v0legs, emprimaryelectrons, emprimarymuons); + // } - void processMC_Electron_PCM(MyCollisionsMC const& collisions, aod::BCs const& bcs, aod::McCollisions const& mccollisions, aod::McParticles const& mcTracks, TracksMC const& o2tracks, aod::V0PhotonsKF const& v0photons, aod::V0Legs const& v0legs, aod::EMPrimaryElectrons const& emprimaryelectrons) - { - const uint8_t sysflag = kPCM | kElectron; - skimmingMC(collisions, bcs, mccollisions, mcTracks, o2tracks, nullptr, nullptr, v0photons, v0legs, emprimaryelectrons, nullptr); - } + // void processMC_Electron_PCM(MyCollisionsMC const& collisions, aod::BCs const& bcs, aod::McCollisions const& mccollisions, aod::McParticles const& mcTracks, TracksMC const& o2tracks, aod::V0PhotonsKF const& v0photons, aod::V0Legs const& v0legs, aod::EMPrimaryElectrons const& emprimaryelectrons) + // { + // const uint8_t sysflag = kPCM | kElectron; + // skimmingMC(collisions, bcs, mccollisions, mcTracks, o2tracks, nullptr, nullptr, v0photons, v0legs, emprimaryelectrons, nullptr); + // } - void processMC_PCM(MyCollisionsMC const& collisions, aod::BCs const& bcs, aod::McCollisions const& mccollisions, aod::McParticles const& mcTracks, TracksMC const& o2tracks, aod::V0PhotonsKF const& v0photons, aod::V0Legs const& v0legs) - { - skimmingMC(collisions, bcs, mccollisions, mcTracks, o2tracks, nullptr, nullptr, v0photons, v0legs, nullptr, nullptr); - } + // void processMC_PCM(MyCollisionsMC const& collisions, aod::BCs const& bcs, aod::McCollisions const& mccollisions, aod::McParticles const& mcTracks, TracksMC const& o2tracks, aod::V0PhotonsKF const& v0photons, aod::V0Legs const& v0legs) + // { + // skimmingMC(collisions, bcs, mccollisions, mcTracks, o2tracks, nullptr, nullptr, v0photons, v0legs, nullptr, nullptr); + // } void processGenDummy(MyCollisionsMC const&) { @@ -718,9 +718,9 @@ struct AssociateMCInfoDilepton { PROCESS_SWITCH(AssociateMCInfoDilepton, processMC_Electron, "create em mc event table for Electron", false); PROCESS_SWITCH(AssociateMCInfoDilepton, processMC_FwdMuon, "create em mc event table for Forward Muon", false); PROCESS_SWITCH(AssociateMCInfoDilepton, processMC_Electron_FwdMuon, "create em mc event table for Electron, FwdMuon", false); - PROCESS_SWITCH(AssociateMCInfoDilepton, processMC_Electron_FwdMuon_PCM, "create em mc event table for PCM, Electron, FwdMuon", false); - PROCESS_SWITCH(AssociateMCInfoDilepton, processMC_Electron_PCM, "create em mc event table for PCM, Electron", false); - PROCESS_SWITCH(AssociateMCInfoDilepton, processMC_PCM, "create em mc event table for PCM", false); + // PROCESS_SWITCH(AssociateMCInfoDilepton, processMC_Electron_FwdMuon_PCM, "create em mc event table for PCM, Electron, FwdMuon", false); + // PROCESS_SWITCH(AssociateMCInfoDilepton, processMC_Electron_PCM, "create em mc event table for PCM, Electron", false); + // PROCESS_SWITCH(AssociateMCInfoDilepton, processMC_PCM, "create em mc event table for PCM", false); PROCESS_SWITCH(AssociateMCInfoDilepton, processGenDummy, "produce dummy data", false); PROCESS_SWITCH(AssociateMCInfoDilepton, processDummy, "processDummy", true); }; diff --git a/PWGEM/Dilepton/TableProducer/createEMEventDilepton.cxx b/PWGEM/Dilepton/TableProducer/createEMEventDilepton.cxx index 608fd8afaf9..a4ab164a4b2 100644 --- a/PWGEM/Dilepton/TableProducer/createEMEventDilepton.cxx +++ b/PWGEM/Dilepton/TableProducer/createEMEventDilepton.cxx @@ -46,28 +46,32 @@ using namespace o2::framework::expressions; using namespace o2::soa; using MyBCs = soa::Join; +// using MyMults = soa::Join; +using MyCents = soa::Join; // centrality table has dependency on multiplicity table. using MyQvectors = soa::Join; using MyCollisions = soa::Join; -using MyCollisions_Cent = soa::Join; // centrality table has dependency on multiplicity table. -using MyCollisions_Cent_Qvec = soa::Join; +using MyCollisions_Cent = soa::Join; +using MyCollisions_Cent_Qvec = soa::Join; using MyCollisionsWithSWT = soa::Join; -using MyCollisionsWithSWT_Cent = soa::Join; // centrality table has dependency on multiplicity table. -using MyCollisionsWithSWT_Cent_Qvec = soa::Join; +using MyCollisionsWithSWT_Cent = soa::Join; +using MyCollisionsWithSWT_Cent_Qvec = soa::Join; using MyCollisionsMC = soa::Join; -using MyCollisionsMC_Cent = soa::Join; // centrality table has dependency on multiplicity table. -using MyCollisionsMC_Cent_Qvec = soa::Join; +using MyCollisionsMC_Cent = soa::Join; +using MyCollisionsMC_Cent_Qvec = soa::Join; struct CreateEMEventDilepton { - Produces embc; + Produces embc; Produces event; Produces eventXY; // Produces eventcov; Produces event_mult; Produces event_cent; - Produces event_qvec; + // Produces event_qvec; + Produces event_qvec2; + Produces event_qvec3; Produces event_norm_info; enum class EMEventType : int { @@ -79,7 +83,7 @@ struct CreateEMEventDilepton { // // CCDB options // Configurable ccdburl{"ccdb-url", "http://alice-ccdb.cern.ch", "url of the ccdb repository"}; - HistogramRegistry registry{"registry"}; + HistogramRegistry registry{"output", {}, OutputObjHandlingPolicy::AnalysisObject, false, false}; void init(o2::framework::InitContext&) { // ccdb->setURL(ccdburl); @@ -87,9 +91,15 @@ struct CreateEMEventDilepton { // ccdb->setLocalObjectValidityChecking(); // ccdb->setFatalWhenNull(false); - auto hEventCounter = registry.add("hEventCounter", "hEventCounter", kTH1I, {{7, 0.5f, 7.5f}}); + auto hEventCounter = registry.add("hEventCounter", "hEventCounter", kTH1D, {{7, 0.5f, 7.5f}}); hEventCounter->GetXaxis()->SetBinLabel(1, "all"); hEventCounter->GetXaxis()->SetBinLabel(2, "sel8"); + + registry.add("hCentFT0M", "hCentFT0M;centrality FT0M (%);Number of collisions", kTH1F, {{110, 0, 110}}, false); + registry.add("hCentFT0A", "hCentFT0A;centrality FT0A (%);Number of collisions", kTH1F, {{110, 0, 110}}, false); + registry.add("hCentFT0C", "hCentFT0C;centrality FT0C (%);Number of collisions", kTH1F, {{110, 0, 110}}, false); + registry.add("hCentNTPV", "hCentNTPV;centrality NTPV (%);Number of collisions", kTH1F, {{110, 0, 110}}, false); + registry.add("hCentNGlobal", "hCentNGlobal;centrality NGlobal (%);Number of collisions", kTH1F, {{110, 0, 110}}, false); } ~CreateEMEventDilepton() {} @@ -102,7 +112,8 @@ struct CreateEMEventDilepton { { for (const auto& bc : bcs) { if (bc.selection_bit(o2::aod::evsel::kIsTriggerTVX)) { - embc(bc.selection_raw(), bc.rct_raw()); // TVX is fired. + embc(o2::aod::emevsel::reduceSelectionBit(bc), bc.rct_raw()); // TVX is fired. + // embc(bc.selection_raw(), bc.rct_raw()); // TVX is fired. } } // end of bc loop @@ -118,20 +129,24 @@ struct CreateEMEventDilepton { auto bc = collision.template bc_as(); // use this for Zorro if (collision.selection_bit(o2::aod::evsel::kIsTriggerTVX)) { - int16_t posZint16 = static_cast(collision.posZ() * 100.f); - if (posZint16 == 0) { + int8_t posZint8 = static_cast(collision.posZ() * 2.f); + if (posZint8 == 0) { if (collision.posZ() < 0.f) { - posZint16 = -1; + posZint8 = -1; } else { - posZint16 = +1; + posZint8 = +1; } } if constexpr (eventtype == EMEventType::kEvent) { - event_norm_info(collision.selection_raw(), collision.rct_raw(), posZint16, static_cast(105.f * 500.f)); + event_norm_info(o2::aod::emevsel::reduceSelectionBit(collision), collision.rct_raw(), posZint8, static_cast(105.f + 110.f), static_cast(105.f + 110.f), static_cast(105.f + 110.f) /*, static_cast(105.f + 110.f)*/); } else if constexpr (eventtype == EMEventType::kEvent_Cent || eventtype == EMEventType::kEvent_Cent_Qvec) { - event_norm_info(collision.selection_raw(), collision.rct_raw(), posZint16, static_cast(collision.centFT0C() * 500.f)); + uint8_t centFT0Muint8 = collision.centFT0M() < 1.f ? static_cast(collision.centFT0M() * 100.f) : static_cast(collision.centFT0M() + 110.f); + uint8_t centFT0Cuint8 = collision.centFT0C() < 1.f ? static_cast(collision.centFT0C() * 100.f) : static_cast(collision.centFT0C() + 110.f); + uint8_t centNTPVuint8 = collision.centNTPV() < 1.f ? static_cast(collision.centNTPV() * 100.f) : static_cast(collision.centNTPV() + 110.f); + // uint8_t centNGlobaluint8 = collision.centNGlobal() < 1.f ? static_cast(collision.centNGlobal() * 100.f) : static_cast(collision.centNGlobal() + 110.f); + event_norm_info(o2::aod::emevsel::reduceSelectionBit(collision), collision.rct_raw(), posZint8, centFT0Muint8, centFT0Cuint8, centNTPVuint8 /*, centNGlobaluint8*/); } else { - event_norm_info(collision.selection_raw(), collision.rct_raw(), posZint16, static_cast(105.f * 500.f)); + event_norm_info(o2::aod::emevsel::reduceSelectionBit(collision), collision.rct_raw(), posZint8, static_cast(105.f + 110.f), static_cast(105.f + 110.f), static_cast(105.f + 110.f) /*, static_cast(105.f + 110.f)*/); } } @@ -147,14 +162,11 @@ struct CreateEMEventDilepton { if (collision.swtaliastmp_raw() == 0) { continue; } - // else { - // emswtbit(collision.swtaliastmp_raw()); - // } } registry.fill(HIST("hEventCounter"), 2); - event(collision.globalIndex(), bc.runNumber(), bc.globalBC(), collision.selection_raw(), collision.rct_raw(), bc.timestamp(), + event(collision.globalIndex(), bc.runNumber(), bc.globalBC(), o2::aod::emevsel::reduceSelectionBit(collision), collision.rct_raw(), bc.timestamp(), collision.posZ(), collision.numContrib(), collision.trackOccupancyInTimeRange(), collision.ft0cOccupancyInTimeRange()); @@ -162,20 +174,36 @@ struct CreateEMEventDilepton { // eventcov(collision.covXX(), collision.covXY(), collision.covXZ(), collision.covYY(), collision.covYZ(), collision.covZZ(), collision.chi2()); - event_mult(collision.multFT0A(), collision.multFT0C(), collision.multNTracksPV(), collision.multNTracksPVeta1(), collision.multNTracksPVetaHalf()); + event_mult(collision.multFT0A(), collision.multFT0C(), collision.multNTracksPV() /*, collision.multNTracksGlobal()*/); if constexpr (eventtype == EMEventType::kEvent) { - event_cent(105.f, 105.f, 105.f); - event_qvec( - 999.f, 999.f, 999.f, 999.f, 999.f, 999.f, 999.f, 999.f, 999.f, 999.f, 999.f, 999.f, 999.f, 999.f, - 999.f, 999.f, 999.f, 999.f, 999.f, 999.f, 999.f, 999.f, 999.f, 999.f, 999.f, 999.f, 999.f, 999.f); + event_cent(105.f, 105.f, 105.f, 105.f); + event_qvec2(999.f, 999.f, 999.f, 999.f, 999.f, 999.f, 999.f, 999.f, 999.f, 999.f, 999.f, 999.f, 999.f, 999.f); + event_qvec3(999.f, 999.f, 999.f, 999.f, 999.f, 999.f, 999.f, 999.f, 999.f, 999.f, 999.f, 999.f, 999.f, 999.f); + // event_qvec( + // 999.f, 999.f, 999.f, 999.f, 999.f, 999.f, 999.f, 999.f, 999.f, 999.f, 999.f, 999.f, 999.f, 999.f, + // 999.f, 999.f, 999.f, 999.f, 999.f, 999.f, 999.f, 999.f, 999.f, 999.f, 999.f, 999.f, 999.f, 999.f); } else if constexpr (eventtype == EMEventType::kEvent_Cent) { - event_cent(collision.centFT0M(), collision.centFT0A(), collision.centFT0C()); - event_qvec( - 999.f, 999.f, 999.f, 999.f, 999.f, 999.f, 999.f, 999.f, 999.f, 999.f, 999.f, 999.f, 999.f, 999.f, - 999.f, 999.f, 999.f, 999.f, 999.f, 999.f, 999.f, 999.f, 999.f, 999.f, 999.f, 999.f, 999.f, 999.f); + registry.fill(HIST("hCentFT0M"), collision.centFT0M()); + registry.fill(HIST("hCentFT0A"), collision.centFT0A()); + registry.fill(HIST("hCentFT0C"), collision.centFT0C()); + registry.fill(HIST("hCentNTPV"), collision.centNTPV()); + registry.fill(HIST("hCentNGlobal"), collision.centFT0M()); + + event_cent(collision.centFT0M(), collision.centFT0A(), collision.centFT0C(), collision.centNTPV() /*, collision.centNGlobal()*/); + event_qvec2(999.f, 999.f, 999.f, 999.f, 999.f, 999.f, 999.f, 999.f, 999.f, 999.f, 999.f, 999.f, 999.f, 999.f); + event_qvec3(999.f, 999.f, 999.f, 999.f, 999.f, 999.f, 999.f, 999.f, 999.f, 999.f, 999.f, 999.f, 999.f, 999.f); + // event_qvec( + // 999.f, 999.f, 999.f, 999.f, 999.f, 999.f, 999.f, 999.f, 999.f, 999.f, 999.f, 999.f, 999.f, 999.f, + // 999.f, 999.f, 999.f, 999.f, 999.f, 999.f, 999.f, 999.f, 999.f, 999.f, 999.f, 999.f, 999.f, 999.f); } else if constexpr (eventtype == EMEventType::kEvent_Cent_Qvec) { - event_cent(collision.centFT0M(), collision.centFT0A(), collision.centFT0C()); + registry.fill(HIST("hCentFT0M"), collision.centFT0M()); + registry.fill(HIST("hCentFT0A"), collision.centFT0A()); + registry.fill(HIST("hCentFT0C"), collision.centFT0C()); + registry.fill(HIST("hCentNTPV"), collision.centNTPV()); + registry.fill(HIST("hCentNGlobal"), collision.centFT0M()); + + event_cent(collision.centFT0M(), collision.centFT0A(), collision.centFT0C(), collision.centNTPV() /*, collision.centNGlobal()*/); float q2xft0m = 999.f, q2yft0m = 999.f, q2xft0a = 999.f, q2yft0a = 999.f, q2xft0c = 999.f, q2yft0c = 999.f, q2xfv0a = 999.f, q2yfv0a = 999.f, q2xbpos = 999.f, q2ybpos = 999.f, q2xbneg = 999.f, q2ybneg = 999.f, q2xbtot = 999.f, q2ybtot = 999.f; float q3xft0m = 999.f, q3yft0m = 999.f, q3xft0a = 999.f, q3yft0a = 999.f, q3xft0c = 999.f, q3yft0c = 999.f, q3xfv0a = 999.f, q3yfv0a = 999.f, q3xbpos = 999.f, q3ybpos = 999.f, q3xbneg = 999.f, q3ybneg = 999.f, q3xbtot = 999.f, q3ybtot = 999.f; @@ -188,14 +216,16 @@ struct CreateEMEventDilepton { q2xft0m = collision.qvecFT0MReVec()[0], q2xft0a = collision.qvecFT0AReVec()[0], q2xft0c = collision.qvecFT0CReVec()[0], q2xfv0a = collision.qvecFV0AReVec()[0], q2xbpos = collision.qvecBPosReVec()[0], q2xbneg = collision.qvecBNegReVec()[0], q2xbtot = collision.qvecBTotReVec()[0]; q2yft0m = collision.qvecFT0MImVec()[0], q2yft0a = collision.qvecFT0AImVec()[0], q2yft0c = collision.qvecFT0CImVec()[0], q2yfv0a = collision.qvecFV0AImVec()[0], q2ybpos = collision.qvecBPosImVec()[0], q2ybneg = collision.qvecBNegImVec()[0], q2ybtot = collision.qvecBTotImVec()[0]; } - event_qvec( - q2xft0m, q2yft0m, q2xft0a, q2yft0a, q2xft0c, q2yft0c, q2xfv0a, q2yfv0a, q2xbpos, q2ybpos, q2xbneg, q2ybneg, q2xbtot, q2ybtot, - q3xft0m, q3yft0m, q3xft0a, q3yft0a, q3xft0c, q3yft0c, q3xfv0a, q3yfv0a, q3xbpos, q3ybpos, q3xbneg, q3ybneg, q3xbtot, q3ybtot); + // event_qvec(q2xft0m, q2yft0m, q2xft0a, q2yft0a, q2xft0c, q2yft0c, q2xfv0a, q2yfv0a, q2xbpos, q2ybpos, q2xbneg, q2ybneg, q2xbtot, q2ybtot, + // q3xft0m, q3yft0m, q3xft0a, q3yft0a, q3xft0c, q3yft0c, q3xfv0a, q3yfv0a, q3xbpos, q3ybpos, q3xbneg, q3ybneg, q3xbtot, q3ybtot); + event_qvec2(q2xft0m, q2yft0m, q2xft0a, q2yft0a, q2xft0c, q2yft0c, q2xfv0a, q2yfv0a, q2xbpos, q2ybpos, q2xbneg, q2ybneg, q2xbtot, q2ybtot); + event_qvec3(q3xft0m, q3yft0m, q3xft0a, q3yft0a, q3xft0c, q3yft0c, q3xfv0a, q3yfv0a, q3xbpos, q3ybpos, q3xbneg, q3ybneg, q3xbtot, q3ybtot); } else { - event_cent(105.f, 105.f, 105.f); - event_qvec( - 999.f, 999.f, 999.f, 999.f, 999.f, 999.f, 999.f, 999.f, 999.f, 999.f, 999.f, 999.f, 999.f, 999.f, - 999.f, 999.f, 999.f, 999.f, 999.f, 999.f, 999.f, 999.f, 999.f, 999.f, 999.f, 999.f, 999.f, 999.f); + event_cent(105.f, 105.f, 105.f, 105.f); + // event_qvec( 999.f, 999.f, 999.f, 999.f, 999.f, 999.f, 999.f, 999.f, 999.f, 999.f, 999.f, 999.f, 999.f, 999.f, + // 999.f, 999.f, 999.f, 999.f, 999.f, 999.f, 999.f, 999.f, 999.f, 999.f, 999.f, 999.f, 999.f, 999.f); + event_qvec2(999.f, 999.f, 999.f, 999.f, 999.f, 999.f, 999.f, 999.f, 999.f, 999.f, 999.f, 999.f, 999.f, 999.f); + event_qvec3(999.f, 999.f, 999.f, 999.f, 999.f, 999.f, 999.f, 999.f, 999.f, 999.f, 999.f, 999.f, 999.f, 999.f); } } // end of collision loop } // end of skimEvent @@ -293,10 +323,10 @@ struct AssociateDileptonToEMEvent { // This struct is for both data and MC. // Note that reconstructed collisions without mc collisions are already rejected in CreateEMEventDilepton in MC. - void processPCM(aod::EMEvents const& collisions, aod::V0PhotonsKF const& photons) - { - fillEventId(collisions, photons, v0kfeventid, perCollision_pcm); - } + // void processPCM(aod::EMEvents const& collisions, aod::V0PhotonsKF const& photons) + // { + // fillEventId(collisions, photons, v0kfeventid, perCollision_pcm); + // } void processElectron(aod::EMEvents const& collisions, aod::EMPrimaryElectrons const& tracks) { @@ -309,14 +339,13 @@ struct AssociateDileptonToEMEvent { } void processChargedTrack(aod::EMEvents const& collisions, aod::EMPrimaryTracks const& tracks) - // void processChargedTrack(aod::EMEvents const& collisions, aod::EMPrimaryTrackEMEventIdsTMP const& tracks) { fillEventId(collisions, tracks, prmtrackeventid, perCollision_track); } void processDummy(aod::EMEvents const&) {} - PROCESS_SWITCH(AssociateDileptonToEMEvent, processPCM, "process indexing for PCM", false); + // PROCESS_SWITCH(AssociateDileptonToEMEvent, processPCM, "process indexing for PCM", false); PROCESS_SWITCH(AssociateDileptonToEMEvent, processElectron, "process indexing for electrons", false); PROCESS_SWITCH(AssociateDileptonToEMEvent, processFwdMuon, "process indexing for forward muons", false); PROCESS_SWITCH(AssociateDileptonToEMEvent, processChargedTrack, "process indexing for charged tracks", false); diff --git a/PWGEM/Dilepton/TableProducer/qVector2DummyOTF.cxx b/PWGEM/Dilepton/TableProducer/qVector2DummyOTF.cxx new file mode 100644 index 00000000000..260c6233e79 --- /dev/null +++ b/PWGEM/Dilepton/TableProducer/qVector2DummyOTF.cxx @@ -0,0 +1,46 @@ +// Copyright 2019-2020 CERN and copyright holders of ALICE O2. +// See https://alice-o2.web.cern.ch/copyright for details of the copyright holders. +// All rights not expressly granted are reserved. +// +// This software is distributed under the terms of the GNU General Public +// License v3 (GPL Version 3), copied verbatim in the file "COPYING". +// +// In applying this license CERN does not waive the privileges and immunities +// granted to it by virtue of its status as an Intergovernmental Organization +// or submit itself to any jurisdiction. +// +// ======================== +// +// This code produces on-the-fly dummy qvector table. +// Please write to: daiki.sekihata@cern.ch + +#include "PWGEM/Dilepton/DataModel/dileptonTables.h" + +#include "Framework/ASoAHelpers.h" +#include "Framework/AnalysisTask.h" +#include "Framework/runDataProcessing.h" + +using namespace o2; +using namespace o2::aod; +using namespace o2::soa; +using namespace o2::framework; +using namespace o2::framework::expressions; + +struct qVector2DummyOTF { + Produces event_qvec2; + + void init(InitContext&) {} + ~qVector2DummyOTF() {} + + void process(aod::EMEvents const& collisions) + { + for (int i = 0; i < collisions.size(); i++) { + event_qvec2(999.f, 999.f, 999.f, 999.f, 999.f, 999.f, 999.f, 999.f, 999.f, 999.f, 999.f, 999.f, 999.f, 999.f); + } // end of collision loop + } // end of process +}; + +WorkflowSpec defineDataProcessing(ConfigContext const& cfgc) +{ + return WorkflowSpec{adaptAnalysisTask(cfgc, TaskName{"qvector2-dummy-otf"})}; +} diff --git a/PWGEM/Dilepton/TableProducer/qVector3DummyOTF.cxx b/PWGEM/Dilepton/TableProducer/qVector3DummyOTF.cxx new file mode 100644 index 00000000000..864c4605462 --- /dev/null +++ b/PWGEM/Dilepton/TableProducer/qVector3DummyOTF.cxx @@ -0,0 +1,46 @@ +// Copyright 2019-2020 CERN and copyright holders of ALICE O2. +// See https://alice-o2.web.cern.ch/copyright for details of the copyright holders. +// All rights not expressly granted are reserved. +// +// This software is distributed under the terms of the GNU General Public +// License v3 (GPL Version 3), copied verbatim in the file "COPYING". +// +// In applying this license CERN does not waive the privileges and immunities +// granted to it by virtue of its status as an Intergovernmental Organization +// or submit itself to any jurisdiction. +// +// ======================== +// +// This code produces on-the-fly dummy qvector table. +// Please write to: daiki.sekihata@cern.ch + +#include "PWGEM/Dilepton/DataModel/dileptonTables.h" + +#include "Framework/ASoAHelpers.h" +#include "Framework/AnalysisTask.h" +#include "Framework/runDataProcessing.h" + +using namespace o2; +using namespace o2::aod; +using namespace o2::soa; +using namespace o2::framework; +using namespace o2::framework::expressions; + +struct qVector3DummyOTF { + Produces event_qvec3; + + void init(InitContext&) {} + ~qVector3DummyOTF() {} + + void process(aod::EMEvents const& collisions) + { + for (int i = 0; i < collisions.size(); i++) { + event_qvec3(999.f, 999.f, 999.f, 999.f, 999.f, 999.f, 999.f, 999.f, 999.f, 999.f, 999.f, 999.f, 999.f, 999.f); + } // end of collision loop + } // end of process +}; + +WorkflowSpec defineDataProcessing(ConfigContext const& cfgc) +{ + return WorkflowSpec{adaptAnalysisTask(cfgc, TaskName{"qvector3-dummy-otf"})}; +} diff --git a/PWGEM/Dilepton/Tasks/checkMCPairTemplate.cxx b/PWGEM/Dilepton/Tasks/checkMCPairTemplate.cxx index cda9e5da1b9..2c7ebf754c4 100644 --- a/PWGEM/Dilepton/Tasks/checkMCPairTemplate.cxx +++ b/PWGEM/Dilepton/Tasks/checkMCPairTemplate.cxx @@ -3234,28 +3234,28 @@ struct checkMCPairTemplate { { for (const auto& collision : collisions) { fRegistry.fill(HIST("Event/norm/hCollisionCounter"), 1.0); - if (collision.selection_bit(o2::aod::evsel::kIsTriggerTVX)) { + if (collision.selection_bit(o2::aod::emevsel::kIsTriggerTVX)) { fRegistry.fill(HIST("Event/norm/hCollisionCounter"), 2.0); } - if (collision.selection_bit(o2::aod::evsel::kNoTimeFrameBorder)) { + if (collision.selection_bit(o2::aod::emevsel::kNoTimeFrameBorder)) { fRegistry.fill(HIST("Event/norm/hCollisionCounter"), 3.0); } - if (collision.selection_bit(o2::aod::evsel::kNoITSROFrameBorder)) { + if (collision.selection_bit(o2::aod::emevsel::kNoITSROFrameBorder)) { fRegistry.fill(HIST("Event/norm/hCollisionCounter"), 4.0); } - if (collision.selection_bit(o2::aod::evsel::kNoSameBunchPileup)) { + if (collision.selection_bit(o2::aod::emevsel::kNoSameBunchPileup)) { fRegistry.fill(HIST("Event/norm/hCollisionCounter"), 5.0); } - if (collision.selection_bit(o2::aod::evsel::kIsGoodZvtxFT0vsPV)) { + if (collision.selection_bit(o2::aod::emevsel::kIsGoodZvtxFT0vsPV)) { fRegistry.fill(HIST("Event/norm/hCollisionCounter"), 6.0); } - if (collision.selection_bit(o2::aod::evsel::kIsVertexITSTPC)) { + if (collision.selection_bit(o2::aod::emevsel::kIsVertexITSTPC)) { fRegistry.fill(HIST("Event/norm/hCollisionCounter"), 7.0); } - if (collision.selection_bit(o2::aod::evsel::kIsVertexTRDmatched)) { + if (collision.selection_bit(o2::aod::emevsel::kIsVertexTRDmatched)) { fRegistry.fill(HIST("Event/norm/hCollisionCounter"), 8.0); } - if (collision.selection_bit(o2::aod::evsel::kIsVertexTOFmatched)) { + if (collision.selection_bit(o2::aod::emevsel::kIsVertexTOFmatched)) { fRegistry.fill(HIST("Event/norm/hCollisionCounter"), 9.0); } if (collision.sel8()) { @@ -3264,28 +3264,28 @@ struct checkMCPairTemplate { if (std::fabs(collision.posZ()) < 10.0) { fRegistry.fill(HIST("Event/norm/hCollisionCounter"), 11.0); } - if (collision.selection_bit(o2::aod::evsel::kNoCollInTimeRangeStandard)) { + if (collision.selection_bit(o2::aod::emevsel::kNoCollInTimeRangeStandard)) { fRegistry.fill(HIST("Event/norm/hCollisionCounter"), 12.0); } - if (collision.selection_bit(o2::aod::evsel::kNoCollInTimeRangeStrict)) { + if (collision.selection_bit(o2::aod::emevsel::kNoCollInTimeRangeStrict)) { fRegistry.fill(HIST("Event/norm/hCollisionCounter"), 13.0); } - if (collision.selection_bit(o2::aod::evsel::kNoCollInRofStandard)) { + if (collision.selection_bit(o2::aod::emevsel::kNoCollInRofStandard)) { fRegistry.fill(HIST("Event/norm/hCollisionCounter"), 14.0); } - if (collision.selection_bit(o2::aod::evsel::kNoCollInRofStrict)) { + if (collision.selection_bit(o2::aod::emevsel::kNoCollInRofStrict)) { fRegistry.fill(HIST("Event/norm/hCollisionCounter"), 15.0); } - if (collision.selection_bit(o2::aod::evsel::kNoHighMultCollInPrevRof)) { + if (collision.selection_bit(o2::aod::emevsel::kNoHighMultCollInPrevRof)) { fRegistry.fill(HIST("Event/norm/hCollisionCounter"), 16.0); } - if (collision.selection_bit(o2::aod::evsel::kIsGoodITSLayer3)) { + if (collision.selection_bit(o2::aod::emevsel::kIsGoodITSLayer3)) { fRegistry.fill(HIST("Event/norm/hCollisionCounter"), 17.0); } - if (collision.selection_bit(o2::aod::evsel::kIsGoodITSLayer0123)) { + if (collision.selection_bit(o2::aod::emevsel::kIsGoodITSLayer0123)) { fRegistry.fill(HIST("Event/norm/hCollisionCounter"), 18.0); } - if (collision.selection_bit(o2::aod::evsel::kIsGoodITSLayersAll)) { + if (collision.selection_bit(o2::aod::emevsel::kIsGoodITSLayersAll)) { fRegistry.fill(HIST("Event/norm/hCollisionCounter"), 19.0); } if (!fEMEventCut.IsSelected(collision)) { @@ -3302,22 +3302,22 @@ struct checkMCPairTemplate { void processBC(aod::EMBCs const& bcs) { for (const auto& bc : bcs) { - if (bc.selection_bit(o2::aod::evsel::kIsTriggerTVX)) { + if (bc.selection_bit(o2::aod::emevsel::kIsTriggerTVX)) { fRegistry.fill(HIST("BC/hTVXCounter"), 0.f); - if (bc.selection_bit(o2::aod::evsel::kNoTimeFrameBorder)) { + if (bc.selection_bit(o2::aod::emevsel::kNoTimeFrameBorder)) { fRegistry.fill(HIST("BC/hTVXCounter"), 1.f); } - if (bc.selection_bit(o2::aod::evsel::kNoITSROFrameBorder)) { + if (bc.selection_bit(o2::aod::emevsel::kNoITSROFrameBorder)) { fRegistry.fill(HIST("BC/hTVXCounter"), 2.f); } if (rctChecker(bc)) { fRegistry.fill(HIST("BC/hTVXCounter"), 3.f); } - if (bc.selection_bit(o2::aod::evsel::kNoTimeFrameBorder) && bc.selection_bit(o2::aod::evsel::kNoITSROFrameBorder)) { + if (bc.selection_bit(o2::aod::emevsel::kNoTimeFrameBorder) && bc.selection_bit(o2::aod::emevsel::kNoITSROFrameBorder)) { fRegistry.fill(HIST("BC/hTVXCounter"), 4.f); } - if (bc.selection_bit(o2::aod::evsel::kNoTimeFrameBorder) && bc.selection_bit(o2::aod::evsel::kNoITSROFrameBorder) && rctChecker(bc)) { + if (bc.selection_bit(o2::aod::emevsel::kNoTimeFrameBorder) && bc.selection_bit(o2::aod::emevsel::kNoITSROFrameBorder) && rctChecker(bc)) { fRegistry.fill(HIST("BC/hTVXCounter"), 5.f); } } diff --git a/PWGEM/Dilepton/Tasks/eventQC.cxx b/PWGEM/Dilepton/Tasks/eventQC.cxx index c6fe4e3689c..0b1f4b3e0ef 100644 --- a/PWGEM/Dilepton/Tasks/eventQC.cxx +++ b/PWGEM/Dilepton/Tasks/eventQC.cxx @@ -14,7 +14,7 @@ // This code is for event QC for PWG-EM. // Please write to: daiki.sekihata@cern.ch -#include "PWGEM/PhotonMeson/DataModel/gammaTables.h" +// #include "PWGEM/PhotonMeson/DataModel/gammaTables.h" #include "Common/Core/RecoDecay.h" #include "Common/Core/Zorro.h" diff --git a/PWGEM/Dilepton/Utils/EventHistograms.h b/PWGEM/Dilepton/Utils/EventHistograms.h index 3f123920339..74dd96bdb84 100644 --- a/PWGEM/Dilepton/Utils/EventHistograms.h +++ b/PWGEM/Dilepton/Utils/EventHistograms.h @@ -51,34 +51,13 @@ void addEventHistograms(HistogramRegistry* fRegistry) hCollisionCounter->GetXaxis()->SetBinLabel(20, "Calibrated Q vector"); hCollisionCounter->GetXaxis()->SetBinLabel(21, "accepted"); - const AxisSpec axis_cent_ft0m{{0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, - 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, - 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, - 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, - 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110}, - "centrality FT0M (%)"}; - - const AxisSpec axis_cent_ft0a{{0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, - 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, - 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, - 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, - 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110}, - "centrality FT0A (%)"}; - - const AxisSpec axis_cent_ft0c{{0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, - 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, - 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, - 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, - 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110}, - "centrality FT0C (%)"}; - fRegistry->add("Event/before/hZvtx", "vertex z; Z_{vtx} (cm)", kTH1D, {{100, -50, +50}}, false); fRegistry->add("Event/before/hMultNTracksPV", "hMultNTracksPV; N_{track} to PV", kTH1D, {{6001, -0.5, 6000.5}}, false); - fRegistry->add("Event/before/hMultNTracksPVeta1", "hMultNTracksPVeta1; N_{track} to PV", kTH1D, {{6001, -0.5, 6000.5}}, false); fRegistry->add("Event/before/hMultFT0", "hMultFT0;mult. FT0A;mult. FT0C", kTH2D, {{200, 0, 200000}, {60, 0, 60000}}, false); - fRegistry->add("Event/before/hCentFT0A", "hCentFT0A;centrality FT0A (%)", kTH1D, {{axis_cent_ft0a}}, false); - fRegistry->add("Event/before/hCentFT0C", "hCentFT0C;centrality FT0C (%)", kTH1D, {{axis_cent_ft0c}}, false); - fRegistry->add("Event/before/hCentFT0M", "hCentFT0M;centrality FT0M (%)", kTH1D, {{axis_cent_ft0m}}, false); + fRegistry->add("Event/before/hCentFT0A", "hCentFT0A;centrality FT0A (%)", kTH1D, {{110, 0, 110}}, false); + fRegistry->add("Event/before/hCentFT0C", "hCentFT0C;centrality FT0C (%)", kTH1D, {{110, 0, 110}}, false); + fRegistry->add("Event/before/hCentFT0M", "hCentFT0M;centrality FT0M (%)", kTH1D, {{110, 0, 110}}, false); + fRegistry->add("Event/before/hCentNTPV", "hCentNTPV;centrality NTPV (%)", kTH1D, {{110, 0, 110}}, false); fRegistry->add("Event/before/hCentFT0CvsMultNTracksPV", "hCentFT0CvsMultNTracksPV;centrality FT0C (%);N_{track} to PV", kTH2D, {{110, 0, 110}, {600, 0, 6000}}, false); fRegistry->add("Event/before/hMultFT0CvsMultNTracksPV", "hMultFT0CvsMultNTracksPV;mult. FT0C;N_{track} to PV", kTH2D, {{60, 0, 60000}, {600, 0, 6000}}, false); fRegistry->add("Event/before/hMultFT0CvsOccupancy", "hMultFT0CvsOccupancy;mult. FT0C;N_{track} in time range", kTH2D, {{60, 0, 60000}, {200, 0, 20000}}, false); @@ -170,28 +149,28 @@ void fillEventInfo(HistogramRegistry* fRegistry, TCollision const& collision, co { static constexpr std::string_view event_types[2] = {"before/", "after/"}; fRegistry->fill(HIST("Event/") + HIST(event_types[ev_id]) + HIST("hCollisionCounter"), 1.0); - if (collision.selection_bit(o2::aod::evsel::kIsTriggerTVX)) { + if (collision.selection_bit(o2::aod::emevsel::kIsTriggerTVX)) { fRegistry->fill(HIST("Event/") + HIST(event_types[ev_id]) + HIST("hCollisionCounter"), 2.0); } - if (collision.selection_bit(o2::aod::evsel::kNoTimeFrameBorder)) { + if (collision.selection_bit(o2::aod::emevsel::kNoTimeFrameBorder)) { fRegistry->fill(HIST("Event/") + HIST(event_types[ev_id]) + HIST("hCollisionCounter"), 3.0); } - if (collision.selection_bit(o2::aod::evsel::kNoITSROFrameBorder)) { + if (collision.selection_bit(o2::aod::emevsel::kNoITSROFrameBorder)) { fRegistry->fill(HIST("Event/") + HIST(event_types[ev_id]) + HIST("hCollisionCounter"), 4.0); } - if (collision.selection_bit(o2::aod::evsel::kNoSameBunchPileup)) { + if (collision.selection_bit(o2::aod::emevsel::kNoSameBunchPileup)) { fRegistry->fill(HIST("Event/") + HIST(event_types[ev_id]) + HIST("hCollisionCounter"), 5.0); } - if (collision.selection_bit(o2::aod::evsel::kIsGoodZvtxFT0vsPV)) { + if (collision.selection_bit(o2::aod::emevsel::kIsGoodZvtxFT0vsPV)) { fRegistry->fill(HIST("Event/") + HIST(event_types[ev_id]) + HIST("hCollisionCounter"), 6.0); } - if (collision.selection_bit(o2::aod::evsel::kIsVertexITSTPC)) { + if (collision.selection_bit(o2::aod::emevsel::kIsVertexITSTPC)) { fRegistry->fill(HIST("Event/") + HIST(event_types[ev_id]) + HIST("hCollisionCounter"), 7.0); } - if (collision.selection_bit(o2::aod::evsel::kIsVertexTRDmatched)) { + if (collision.selection_bit(o2::aod::emevsel::kIsVertexTRDmatched)) { fRegistry->fill(HIST("Event/") + HIST(event_types[ev_id]) + HIST("hCollisionCounter"), 8.0); } - if (collision.selection_bit(o2::aod::evsel::kIsVertexTOFmatched)) { + if (collision.selection_bit(o2::aod::emevsel::kIsVertexTOFmatched)) { fRegistry->fill(HIST("Event/") + HIST(event_types[ev_id]) + HIST("hCollisionCounter"), 9.0); } if (collision.sel8()) { @@ -200,38 +179,38 @@ void fillEventInfo(HistogramRegistry* fRegistry, TCollision const& collision, co if (abs(collision.posZ()) < 10.0) { fRegistry->fill(HIST("Event/") + HIST(event_types[ev_id]) + HIST("hCollisionCounter"), 11.0); } - if (collision.selection_bit(o2::aod::evsel::kNoCollInTimeRangeStandard)) { + if (collision.selection_bit(o2::aod::emevsel::kNoCollInTimeRangeStandard)) { fRegistry->fill(HIST("Event/") + HIST(event_types[ev_id]) + HIST("hCollisionCounter"), 12.0); } - if (collision.selection_bit(o2::aod::evsel::kNoCollInTimeRangeStrict)) { + if (collision.selection_bit(o2::aod::emevsel::kNoCollInTimeRangeStrict)) { fRegistry->fill(HIST("Event/") + HIST(event_types[ev_id]) + HIST("hCollisionCounter"), 13.0); } - if (collision.selection_bit(o2::aod::evsel::kNoCollInRofStandard)) { + if (collision.selection_bit(o2::aod::emevsel::kNoCollInRofStandard)) { fRegistry->fill(HIST("Event/") + HIST(event_types[ev_id]) + HIST("hCollisionCounter"), 14.0); } - if (collision.selection_bit(o2::aod::evsel::kNoCollInRofStrict)) { + if (collision.selection_bit(o2::aod::emevsel::kNoCollInRofStrict)) { fRegistry->fill(HIST("Event/") + HIST(event_types[ev_id]) + HIST("hCollisionCounter"), 15.0); } - if (collision.selection_bit(o2::aod::evsel::kNoHighMultCollInPrevRof)) { + if (collision.selection_bit(o2::aod::emevsel::kNoHighMultCollInPrevRof)) { fRegistry->fill(HIST("Event/") + HIST(event_types[ev_id]) + HIST("hCollisionCounter"), 16.0); } - if (collision.selection_bit(o2::aod::evsel::kIsGoodITSLayer3)) { + if (collision.selection_bit(o2::aod::emevsel::kIsGoodITSLayer3)) { fRegistry->fill(HIST("Event/") + HIST(event_types[ev_id]) + HIST("hCollisionCounter"), 17.0); } - if (collision.selection_bit(o2::aod::evsel::kIsGoodITSLayer0123)) { + if (collision.selection_bit(o2::aod::emevsel::kIsGoodITSLayer0123)) { fRegistry->fill(HIST("Event/") + HIST(event_types[ev_id]) + HIST("hCollisionCounter"), 18.0); } - if (collision.selection_bit(o2::aod::evsel::kIsGoodITSLayersAll)) { + if (collision.selection_bit(o2::aod::emevsel::kIsGoodITSLayersAll)) { fRegistry->fill(HIST("Event/") + HIST(event_types[ev_id]) + HIST("hCollisionCounter"), 19.0); } fRegistry->fill(HIST("Event/") + HIST(event_types[ev_id]) + HIST("hZvtx"), collision.posZ()); fRegistry->fill(HIST("Event/") + HIST(event_types[ev_id]) + HIST("hMultNTracksPV"), collision.multNTracksPV()); - fRegistry->fill(HIST("Event/") + HIST(event_types[ev_id]) + HIST("hMultNTracksPVeta1"), collision.multNTracksPVeta1()); fRegistry->fill(HIST("Event/") + HIST(event_types[ev_id]) + HIST("hMultFT0"), collision.multFT0A(), collision.multFT0C()); fRegistry->fill(HIST("Event/") + HIST(event_types[ev_id]) + HIST("hCentFT0A"), collision.centFT0A()); fRegistry->fill(HIST("Event/") + HIST(event_types[ev_id]) + HIST("hCentFT0C"), collision.centFT0C()); fRegistry->fill(HIST("Event/") + HIST(event_types[ev_id]) + HIST("hCentFT0M"), collision.centFT0M()); + fRegistry->fill(HIST("Event/") + HIST(event_types[ev_id]) + HIST("hCentNTPV"), collision.centNTPV()); fRegistry->fill(HIST("Event/") + HIST(event_types[ev_id]) + HIST("hCentFT0CvsMultNTracksPV"), collision.centFT0C(), collision.multNTracksPV()); fRegistry->fill(HIST("Event/") + HIST(event_types[ev_id]) + HIST("hMultFT0CvsMultNTracksPV"), collision.multFT0C(), collision.multNTracksPV()); fRegistry->fill(HIST("Event/") + HIST(event_types[ev_id]) + HIST("hMultFT0CvsOccupancy"), collision.multFT0C(), collision.trackOccupancyInTimeRange()); diff --git a/PWGEM/PhotonMeson/Core/DiphotonHadronMPC.h b/PWGEM/PhotonMeson/Core/DiphotonHadronMPC.h deleted file mode 100644 index 54381491765..00000000000 --- a/PWGEM/PhotonMeson/Core/DiphotonHadronMPC.h +++ /dev/null @@ -1,992 +0,0 @@ -// Copyright 2019-2020 CERN and copyright holders of ALICE O2. -// See https://alice-o2.web.cern.ch/copyright for details of the copyright holders. -// All rights not expressly granted are reserved. -// -// This software is distributed under the terms of the GNU General Public -// License v3 (GPL Version 3), copied verbatim in the file "COPYING". -// -// In applying this license CERN does not waive the privileges and immunities -// granted to it by virtue of its status as an Intergovernmental Organization -// or submit itself to any jurisdiction. - -/// \file DiphotonHadronMPC.h -/// \brief This code is to analyze diphoton-hadron correlation. Keep in mind that cumulant method does not require event mixing. -/// \author D. Sekihata, daiki.sekihata@cern.ch - -#ifndef PWGEM_PHOTONMESON_CORE_DIPHOTONHADRONMPC_H_ -#define PWGEM_PHOTONMESON_CORE_DIPHOTONHADRONMPC_H_ - -#include "PWGEM/Dilepton/Core/EMTrackCut.h" -#include "PWGEM/Dilepton/Utils/EMTrack.h" -#include "PWGEM/Dilepton/Utils/EventMixingHandler.h" -#include "PWGEM/PhotonMeson/Core/DalitzEECut.h" -#include "PWGEM/PhotonMeson/Core/EMPhotonEventCut.h" -#include "PWGEM/PhotonMeson/Core/V0PhotonCut.h" -#include "PWGEM/PhotonMeson/DataModel/gammaTables.h" -#include "PWGEM/PhotonMeson/Utils/EventHistograms.h" -#include "PWGEM/PhotonMeson/Utils/PairUtilities.h" - -#include -#include -#include -#include -#include - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include // IWYU pragma: keep -#include - -#include -#include -#include -#include -#include -#include -#include -#include -#include - -using namespace o2; -using namespace o2::aod; -using namespace o2::framework; -using namespace o2::framework::expressions; -using namespace o2::soa; -using namespace o2::aod::pwgem::photonmeson::photonpair; -using namespace o2::aod::pwgem::photon; -using namespace o2::aod::pwgem::dilepton::utils::emtrackutil; -using namespace o2::aod::pwgem::dilepton::utils; - -using MyCollisions = soa::Join; -using MyCollision = MyCollisions::iterator; - -using MyCollisionsWithSWT = soa::Join; -using MyCollisionWithSWT = MyCollisionsWithSWT::iterator; - -using MyV0Photons = soa::Filtered>; -using MyV0Photon = MyV0Photons::iterator; - -using MyPrimaryElectrons = soa::Filtered>; -using MyPrimaryElectron = MyPrimaryElectrons::iterator; - -template -struct DiphotonHadronMPC { - - 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_input", -999, "bz field in kG, -999 is automatic"}; - Configurable cfg_swt_name{"cfg_swt_name", "fHighTrackMult", "desired software trigger name"}; // 1 trigger name per 1 task. fHighTrackMult, fHighFt0Mult - - Configurable cfgCentEstimator{"cfgCentEstimator", 2, "FT0M:0, FT0A:1, FT0C:2"}; - Configurable cfgOccupancyEstimator{"cfgOccupancyEstimator", 0, "FT0C:0, Track:1"}; - Configurable cfgCentMin{"cfgCentMin", -1, "min. centrality"}; - Configurable cfgCentMax{"cfgCentMax", 999, "max. centrality"}; - Configurable maxY{"maxY", 0.8, "maximum rapidity for diphoton"}; - Configurable cfgDoMix{"cfgDoMix", true, "flag for event mixing"}; - Configurable ndepth_photon{"ndepth_photon", 100, "depth for event mixing between photon-photon"}; - Configurable ndepth_hadron{"ndepth_hadron", 2, "depth for event mixing between hadron-hadron"}; - Configurable ndiff_bc_mix{"ndiff_bc_mix", 594, "difference in global BC required in mixed events"}; - ConfigurableAxis ConfVtxBins{"ConfVtxBins", {VARIABLE_WIDTH, -10.0f, -8.f, -6.f, -4.f, -2.f, 0.f, 2.f, 4.f, 6.f, 8.f, 10.f}, "Mixing bins - z-vertex"}; - ConfigurableAxis ConfCentBins{"ConfCentBins", {VARIABLE_WIDTH, 0.0f, 0.1, 1, 5.0f, 10.0f, 20.0f, 30.0f, 40.0f, 50.0f, 60.0f, 70.0f, 80.0f, 90.0f, 100.f, 999.f}, "Mixing bins - centrality"}; - ConfigurableAxis ConfOccupancyBins{"ConfOccupancyBins", {VARIABLE_WIDTH, -1, 1e+10}, "Mixing bins - occupancy"}; - - ConfigurableAxis ConfMggBins{"ConfMggBins", {200, 0.0, 0.8}, "mgg bins for output histograms"}; - ConfigurableAxis ConfPtggBins{"ConfPtggBins", {VARIABLE_WIDTH, 0.0, 0.1, 0.2, 0.3, 0.4, 0.50, 1.00, 1.50, 2.00, 2.50, 3.00, 3.50, 4.00, 4.50, 5.00, 6.00, 7.00, 8.00, 9.00, 10.00}, "pTgg bins for output histograms"}; - - ConfigurableAxis ConfPtHadronBins{"ConfPtHadronBins", {VARIABLE_WIDTH, 0.00, 0.15, 0.2, 0.3, 0.4, 0.50, 1.00, 2.00, 3.00, 4.00, 5.00}, "pT,h bins for output histograms"}; - ConfigurableAxis ConfDEtaBins{"ConfDEtaBins", {120, -6, 6}, "deta bins for output histograms"}; - Configurable cfgNbinsDPhi{"cfgNbinsDPhi", 36, "nbins in dphi for output histograms"}; - // Configurable cfgNbinsCosNDPhi{"cfgNbinsCosNDPhi", 100, "nbins in cos(n(dphi)) for output histograms"}; - // Configurable cfgNmod{"cfgNmod", 2, "n-th harmonics"}; - - EMPhotonEventCut fEMEventCut; - struct : ConfigurableGroup { - std::string prefix = "eventcut_group"; - Configurable cfgZvtxMin{"cfgZvtxMin", -10.f, "min. Zvtx"}; - Configurable cfgZvtxMax{"cfgZvtxMax", +10.f, "max. Zvtx"}; - Configurable cfgRequireSel8{"cfgRequireSel8", true, "require sel8 in event cut"}; - Configurable cfgRequireFT0AND{"cfgRequireFT0AND", true, "require FT0AND in event cut"}; - Configurable cfgRequireNoTFB{"cfgRequireNoTFB", false, "require No time frame border in event cut"}; - Configurable cfgRequireNoITSROFB{"cfgRequireNoITSROFB", false, "require no ITS readout frame border in event cut"}; - Configurable cfgRequireNoSameBunchPileup{"cfgRequireNoSameBunchPileup", false, "require no same bunch pileup in event cut"}; - Configurable cfgRequireGoodZvtxFT0vsPV{"cfgRequireGoodZvtxFT0vsPV", false, "require good Zvtx between FT0 vs. PV in event cut"}; - Configurable cfgTrackOccupancyMin{"cfgTrackOccupancyMin", -2, "min. occupancy"}; - Configurable cfgTrackOccupancyMax{"cfgTrackOccupancyMax", 1000000000, "max. occupancy"}; - Configurable cfgFT0COccupancyMin{"cfgFT0COccupancyMin", -2, "min. FT0C occupancy"}; - Configurable cfgFT0COccupancyMax{"cfgFT0COccupancyMax", 1000000000, "max. FT0C occupancy"}; - // for RCT - Configurable cfgRequireGoodRCT{"cfgRequireGoodRCT", false, "require good detector flag in run condtion table"}; - Configurable cfgRCTLabel{"cfgRCTLabel", "CBT_hadronPID", "select 1 [CBT, CBT_hadronPID] see O2Physics/Common/CCDB/RCTSelectionFlags.h"}; - Configurable cfgCheckZDC{"cfgCheckZDC", false, "set ZDC flag for PbPb"}; - Configurable cfgTreatLimitedAcceptanceAsBad{"cfgTreatLimitedAcceptanceAsBad", false, "reject all events where the detectors relevant for the specified Runlist are flagged as LimitedAcceptance"}; - } eventcuts; - - V0PhotonCut fV0PhotonCut; - struct : ConfigurableGroup { - std::string prefix = "pcmcut_group"; - Configurable cfg_require_v0_with_itstpc{"cfg_require_v0_with_itstpc", false, "flag to select V0s with ITS-TPC matched tracks"}; - Configurable cfg_require_v0_with_itsonly{"cfg_require_v0_with_itsonly", false, "flag to select V0s with ITSonly tracks"}; - Configurable cfg_require_v0_with_tpconly{"cfg_require_v0_with_tpconly", false, "flag to select V0s with TPConly tracks"}; - Configurable cfg_min_pt_v0{"cfg_min_pt_v0", 0.1, "min pT for v0 photons at PV"}; - Configurable cfg_max_pt_v0{"cfg_max_pt_v0", 1e+10, "max pT for v0 photons at PV"}; - Configurable cfg_min_eta_v0{"cfg_min_eta_v0", -0.8, "min eta for v0 photons at PV"}; - Configurable cfg_max_eta_v0{"cfg_max_eta_v0", 0.8, "max eta for v0 photons at PV"}; - Configurable cfg_min_v0radius{"cfg_min_v0radius", 4.0, "min v0 radius"}; - Configurable cfg_max_v0radius{"cfg_max_v0radius", 90.0, "max v0 radius"}; - Configurable cfg_max_alpha_ap{"cfg_max_alpha_ap", 0.95, "max alpha for AP cut"}; - Configurable cfg_max_qt_ap{"cfg_max_qt_ap", 0.01, "max qT for AP cut"}; - Configurable cfg_min_cospa{"cfg_min_cospa", 0.997, "min V0 CosPA"}; - Configurable cfg_max_pca{"cfg_max_pca", 3.0, "max distance btween 2 legs"}; - Configurable cfg_max_chi2kf{"cfg_max_chi2kf", 1e+10, "max chi2/ndf with KF"}; - Configurable cfg_reject_v0_on_itsib{"cfg_reject_v0_on_itsib", true, "flag to reject V0s on ITSib"}; - Configurable cfg_apply_cuts_from_prefilter_derived{"cfg_apply_cuts_from_prefilter_derived", false, "flag to apply prefilter to V0"}; - - Configurable cfg_min_ncluster_tpc{"cfg_min_ncluster_tpc", 0, "min ncluster tpc"}; - Configurable cfg_min_ncrossedrows{"cfg_min_ncrossedrows", 40, "min ncrossed rows"}; - Configurable cfg_max_frac_shared_clusters_tpc{"cfg_max_frac_shared_clusters_tpc", 999.f, "max fraction of shared clusters in TPC"}; - Configurable cfg_max_chi2tpc{"cfg_max_chi2tpc", 4.0, "max chi2/NclsTPC"}; - Configurable cfg_max_chi2its{"cfg_max_chi2its", 36.0, "max chi2/NclsITS"}; - Configurable cfg_min_TPCNsigmaEl{"cfg_min_TPCNsigmaEl", -3.0, "min. TPC n sigma for electron"}; - Configurable cfg_max_TPCNsigmaEl{"cfg_max_TPCNsigmaEl", +3.0, "max. TPC n sigma for electron"}; - Configurable cfg_disable_itsonly_track{"cfg_disable_itsonly_track", false, "flag to disable ITSonly tracks"}; - Configurable cfg_disable_tpconly_track{"cfg_disable_tpconly_track", false, "flag to disable TPConly tracks"}; - } pcmcuts; - - DalitzEECut fDileptonCut; - struct : ConfigurableGroup { - std::string prefix = "dileptoncut_group"; - Configurable cfg_min_mass{"cfg_min_mass", 0.0, "min mass"}; - Configurable cfg_max_mass{"cfg_max_mass", 0.04, "max mass"}; - Configurable cfg_apply_phiv{"cfg_apply_phiv", true, "flag to apply phiv cut"}; - Configurable cfg_require_itsib_any{"cfg_require_itsib_any", false, "flag to require ITS ib any hits"}; - Configurable cfg_require_itsib_1st{"cfg_require_itsib_1st", true, "flag to require ITS ib 1st hit"}; - Configurable cfg_phiv_slope{"cfg_phiv_slope", 0.0185, "slope for m vs. phiv"}; - Configurable cfg_phiv_intercept{"cfg_phiv_intercept", -0.0280, "intercept for m vs. phiv"}; - - Configurable cfg_min_pt_track{"cfg_min_pt_track", 0.1, "min pT for single track"}; - Configurable cfg_max_eta_track{"cfg_max_eta_track", 2.0, "max eta for single track"}; - Configurable cfg_min_ncluster_tpc{"cfg_min_ncluster_tpc", 0, "min ncluster tpc"}; - Configurable cfg_min_ncluster_its{"cfg_min_ncluster_its", 5, "min ncluster its"}; - Configurable cfg_min_ncrossedrows{"cfg_min_ncrossedrows", 70, "min ncrossed rows"}; - Configurable cfg_max_chi2tpc{"cfg_max_chi2tpc", 4.0, "max chi2/NclsTPC"}; - Configurable cfg_max_chi2its{"cfg_max_chi2its", 36.0, "max chi2/NclsITS"}; - Configurable cfg_max_dcaxy{"cfg_max_dcaxy", 0.1, "max dca XY for single track in cm"}; - Configurable cfg_max_dcaz{"cfg_max_dcaz", 0.1, "max dca Z for single track in cm"}; - Configurable cfg_max_dca3dsigma_track{"cfg_max_dca3dsigma_track", 1e+10, "max DCA 3D in sigma"}; - Configurable cfg_max_frac_shared_clusters_tpc{"cfg_max_frac_shared_clusters_tpc", 0.7, "max fraction of shared clusters in TPC"}; - Configurable cfg_apply_cuts_from_prefilter_derived{"cfg_apply_cuts_from_prefilter_derived", false, "flag to apply prefilter to electron"}; - - Configurable cfg_pid_scheme{"cfg_pid_scheme", static_cast(DalitzEECut::PIDSchemes::kTOFif), "pid scheme [kTOFif : 0, kTPConly : 1]"}; - Configurable cfg_min_TPCNsigmaEl{"cfg_min_TPCNsigmaEl", -2.0, "min. TPC n sigma for electron inclusion"}; - Configurable cfg_max_TPCNsigmaEl{"cfg_max_TPCNsigmaEl", +3.0, "max. TPC n sigma for electron inclusion"}; - Configurable cfg_min_TPCNsigmaPi{"cfg_min_TPCNsigmaPi", -0.0, "min. TPC n sigma for pion exclusion"}; - Configurable cfg_max_TPCNsigmaPi{"cfg_max_TPCNsigmaPi", +0.0, "max. TPC n sigma for pion exclusion"}; - Configurable cfg_min_TOFNsigmaEl{"cfg_min_TOFNsigmaEl", -3.0, "min. TOF n sigma for electron inclusion"}; - Configurable cfg_max_TOFNsigmaEl{"cfg_max_TOFNsigmaEl", +3.0, "max. TOF n sigma for electron inclusion"}; - } dileptoncuts; - - EMTrackCut fEMTrackCut; - struct : ConfigurableGroup { - std::string prefix = "trackcut_group"; - Configurable cfg_min_pt_track{"cfg_min_pt_track", 0.2, "min pT for ref. track"}; - Configurable cfg_max_pt_track{"cfg_max_pt_track", 3.0, "max pT for ref. track"}; - Configurable cfg_min_eta_track{"cfg_min_eta_track", -0.8, "min eta for ref. track"}; - Configurable cfg_max_eta_track{"cfg_max_eta_track", +0.8, "max eta for ref. track"}; - // Configurable cfg_min_phi_track{"cfg_min_phi_track", 0.0, "min phi for ref. track"}; - // Configurable cfg_max_phi_track{"cfg_max_phi_track", 6.3, "max phi for ref. track"}; - // Configurable cfg_max_dcaxy{"cfg_max_dcaxy", 0.5, "max dca XY for single track in cm"}; - // Configurable cfg_max_dcaz{"cfg_max_dcaz", 0.5, "max dca Z for single track in cm"}; - Configurable cfg_track_bits{"cfg_track_bits", 645, "required track bits"}; // default:645, loose:0, tight:778 - } trackcuts; - - o2::aod::rctsel::RCTFlagsChecker rctChecker; - HistogramRegistry fRegistry{"output", {}, OutputObjHandlingPolicy::AnalysisObject, false, false}; - static constexpr std::string_view event_types[2] = {"before/", "after/"}; - static constexpr std::string_view event_pair_types[2] = {"same/", "mix/"}; - - std::vector zvtx_bin_edges; - std::vector cent_bin_edges; - std::vector occ_bin_edges; - - o2::ccdb::CcdbApi ccdbApi; - Service ccdb; - int mRunNumber; - float d_bz; - - void init(InitContext&) - { - zvtx_bin_edges = std::vector(ConfVtxBins.value.begin(), ConfVtxBins.value.end()); - zvtx_bin_edges.erase(zvtx_bin_edges.begin()); - - cent_bin_edges = std::vector(ConfCentBins.value.begin(), ConfCentBins.value.end()); - cent_bin_edges.erase(cent_bin_edges.begin()); - - LOGF(info, "cfgOccupancyEstimator = %d", cfgOccupancyEstimator.value); - occ_bin_edges = std::vector(ConfOccupancyBins.value.begin(), ConfOccupancyBins.value.end()); - occ_bin_edges.erase(occ_bin_edges.begin()); - - emh1 = new MyEMH(ndepth_photon); - emh2 = new MyEMH(ndepth_photon); - emh_diphoton = new MyEMH_track(ndepth_photon); - emh_ref = new MyEMH_track(ndepth_hadron); - - o2::aod::pwgem::photonmeson::utils::eventhistogram::addEventHistograms(&fRegistry); - addHistograms(); - - DefineEMEventCut(); - DefineEMTrackCut(); - DefinePCMCut(); - DefineDileptonCut(); - - fRegistry.add("Diphoton/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); - } - - mRunNumber = 0; - d_bz = 0; - - ccdb->setURL(ccdburl); - ccdb->setCaching(true); - ccdb->setLocalObjectValidityChecking(); - ccdb->setFatalWhenNull(false); - rctChecker.init(eventcuts.cfgRCTLabel.value, eventcuts.cfgCheckZDC.value, eventcuts.cfgTreatLimitedAcceptanceAsBad.value); - } - - template - void initCCDB(TCollision const& collision) - { - if (mRunNumber == collision.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 (std::fabs(d_bz) > 1e-5) { - grpmag.setL3Current(30000.f / (d_bz / 5.0f)); - } - mRunNumber = collision.runNumber(); - return; - } - - auto run3grp_timestamp = collision.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 = collision.runNumber(); - - 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()); - } - } - - ~DiphotonHadronMPC() - { - delete emh1; - emh1 = 0x0; - delete emh2; - emh2 = 0x0; - delete emh_diphoton; - emh_diphoton = 0x0; - delete emh_ref; - emh_ref = 0x0; - - used_photonIds_per_col.clear(); - used_photonIds_per_col.shrink_to_fit(); - used_dileptonIds_per_col.clear(); - used_dileptonIds_per_col.shrink_to_fit(); - used_diphotonIds_per_col.clear(); - used_diphotonIds_per_col.shrink_to_fit(); - - map_mixed_eventId_to_globalBC.clear(); - } - - void addHistograms() - { - std::string mass_axis_title = "m_{#gamma#gamma} (GeV/c^{2})"; - std::string pair_pt_axis_title = "p_{T,#gamma#gamma} (GeV/c)"; - std::string deta_axis_title = "#Delta#eta = #eta_{#gamma#gamma} - #eta_{h}"; - std::string dphi_axis_title = "#Delta#varphi = #varphi_{#gamma#gamma} - #varphi_{h} (rad.)"; - // std::string cosndphi_axis_title = std::format("cos({0:d}(#varphi_{{#gamma#gamma}} - #varphi_{{h}}))", cfgNmod.value); - - if constexpr (pairtype == PairType::kPCMDalitzEE) { - mass_axis_title = "m_{ee#gamma} (GeV/c^{2})"; - pair_pt_axis_title = "p_{T,ee#gamma} (GeV/c)"; - deta_axis_title = "#Delta#eta = #eta_{ee#gamma} - #eta_{h}"; - dphi_axis_title = "#Delta#varphi = #varphi_{ee#gamma} - #varphi_{h} (rad.)"; - // cosndphi_axis_title = std::format("cos({0:d}(#varphi_{{ee#gamma}} - #varphi_{{h}}))", cfgNmod.value); - } - - // diphoton info - const AxisSpec axis_mass{ConfMggBins, mass_axis_title}; - const AxisSpec axis_pt{ConfPtggBins, pair_pt_axis_title}; - - // diphoton-hadron info - const AxisSpec axis_deta{ConfDEtaBins, deta_axis_title}; - const AxisSpec axis_dphi{cfgNbinsDPhi, -o2::constants::math::PIHalf, +3 * o2::constants::math::PIHalf, dphi_axis_title}; - - const AxisSpec axis_pt_hadron{ConfPtHadronBins, "p_{T,h} (GeV/c)"}; - const AxisSpec axis_eta_hadron{40, -2, +2, "#eta_{h}"}; - const AxisSpec axis_phi_hadron{36, 0, o2::constants::math::TwoPI, "#varphi_{h} (rad.)"}; - - fRegistry.add("Hadron/hs", "hadron", kTHnSparseD, {axis_pt_hadron, axis_eta_hadron, axis_phi_hadron}, false); - fRegistry.add("Hadron/hTrackBit", "track bit", kTH1D, {{65536, -0.5, 65535.5}}, false); - - fRegistry.add("Diphoton/same/hs", "diphoton", kTHnSparseD, {axis_mass, axis_pt}, true); - fRegistry.addClone("Diphoton/same/", "Diphoton/mix/"); - - fRegistry.add("DiphotonHadron/same/hs", "diphoton-hadron 2PC", kTHnSparseD, {axis_mass, axis_pt, axis_deta, axis_dphi}, true); - fRegistry.addClone("DiphotonHadron/same/", "DiphotonHadron/mix/"); - - // hadron-hadron - const AxisSpec axis_deta_hh{60, -3, +3, "#Delta#eta = #eta_{h}^{ref1} - #eta_{h}^{ref2}"}; - const AxisSpec axis_dphi_hh{90, -o2::constants::math::PIHalf, +3 * o2::constants::math::PIHalf, "#Delta#varphi = #varphi_{h}^{ref1} - #varphi_{h}^{ref2} (rad.)"}; - // const AxisSpec axis_cosndphi_hh{cfgNbinsCosNDPhi, -1, +1, std::format("cos({0:d}(#varphi_{{h}}^{{ref1}} - #varphi_{{h}}^{{ref2}}))", cfgNmod.value)}; - fRegistry.add("HadronHadron/same/hDEtaDPhi", "hadron-hadron 2PC", kTH2D, {axis_dphi_hh, axis_deta_hh}, true); - fRegistry.addClone("HadronHadron/same/", "HadronHadron/mix/"); - } - - void DefineEMEventCut() - { - fEMEventCut = EMPhotonEventCut("fEMEventCut", "fEMEventCut"); - fEMEventCut.SetRequireSel8(eventcuts.cfgRequireSel8); - fEMEventCut.SetRequireFT0AND(eventcuts.cfgRequireFT0AND); - fEMEventCut.SetZvtxRange(eventcuts.cfgZvtxMin, +eventcuts.cfgZvtxMax); - fEMEventCut.SetRequireNoTFB(eventcuts.cfgRequireNoTFB); - fEMEventCut.SetRequireNoITSROFB(eventcuts.cfgRequireNoITSROFB); - fEMEventCut.SetRequireNoSameBunchPileup(eventcuts.cfgRequireNoSameBunchPileup); - fEMEventCut.SetRequireGoodZvtxFT0vsPV(eventcuts.cfgRequireGoodZvtxFT0vsPV); - } - - void DefinePCMCut() - { - fV0PhotonCut = V0PhotonCut("fV0PhotonCut", "fV0PhotonCut"); - - // for v0 - fV0PhotonCut.SetV0PtRange(pcmcuts.cfg_min_pt_v0, pcmcuts.cfg_max_pt_v0); - fV0PhotonCut.SetV0EtaRange(pcmcuts.cfg_min_eta_v0, pcmcuts.cfg_max_eta_v0); - fV0PhotonCut.SetMinCosPA(pcmcuts.cfg_min_cospa); - fV0PhotonCut.SetMaxPCA(pcmcuts.cfg_max_pca); - fV0PhotonCut.SetMaxChi2KF(pcmcuts.cfg_max_chi2kf); - fV0PhotonCut.SetRxyRange(pcmcuts.cfg_min_v0radius, pcmcuts.cfg_max_v0radius); - fV0PhotonCut.SetAPRange(pcmcuts.cfg_max_alpha_ap, pcmcuts.cfg_max_qt_ap); - fV0PhotonCut.RejectITSib(pcmcuts.cfg_reject_v0_on_itsib); - - // for track - fV0PhotonCut.SetMinNClustersTPC(pcmcuts.cfg_min_ncluster_tpc); - fV0PhotonCut.SetMinNCrossedRowsTPC(pcmcuts.cfg_min_ncrossedrows); - fV0PhotonCut.SetMinNCrossedRowsOverFindableClustersTPC(0.8); - fV0PhotonCut.SetMaxFracSharedClustersTPC(pcmcuts.cfg_max_frac_shared_clusters_tpc); - fV0PhotonCut.SetChi2PerClusterTPC(0.0, pcmcuts.cfg_max_chi2tpc); - fV0PhotonCut.SetTPCNsigmaElRange(pcmcuts.cfg_min_TPCNsigmaEl, pcmcuts.cfg_max_TPCNsigmaEl); - fV0PhotonCut.SetChi2PerClusterITS(-1e+10, pcmcuts.cfg_max_chi2its); - fV0PhotonCut.SetNClustersITS(0, 7); - fV0PhotonCut.SetMeanClusterSizeITSob(0.0, 16.0); - fV0PhotonCut.SetDisableITSonly(pcmcuts.cfg_disable_itsonly_track); - fV0PhotonCut.SetDisableTPConly(pcmcuts.cfg_disable_tpconly_track); - fV0PhotonCut.SetRequireITSTPC(pcmcuts.cfg_require_v0_with_itstpc); - fV0PhotonCut.SetRequireITSonly(pcmcuts.cfg_require_v0_with_itsonly); - fV0PhotonCut.SetRequireTPConly(pcmcuts.cfg_require_v0_with_tpconly); - } - - void DefineDileptonCut() - { - fDileptonCut = DalitzEECut("fDileptonCut", "fDileptonCut"); - - // for pair - fDileptonCut.SetMeeRange(dileptoncuts.cfg_min_mass, dileptoncuts.cfg_max_mass); - fDileptonCut.SetMaxPhivPairMeeDep([&](float mll) { return (mll - dileptoncuts.cfg_phiv_intercept) / dileptoncuts.cfg_phiv_slope; }); - fDileptonCut.ApplyPhiV(dileptoncuts.cfg_apply_phiv); - fDileptonCut.RequireITSibAny(dileptoncuts.cfg_require_itsib_any); - fDileptonCut.RequireITSib1st(dileptoncuts.cfg_require_itsib_1st); - - // for track - fDileptonCut.SetTrackPtRange(dileptoncuts.cfg_min_pt_track, 1e+10f); - fDileptonCut.SetTrackEtaRange(-dileptoncuts.cfg_max_eta_track, +dileptoncuts.cfg_max_eta_track); - fDileptonCut.SetMinNClustersTPC(dileptoncuts.cfg_min_ncluster_tpc); - fDileptonCut.SetMinNCrossedRowsTPC(dileptoncuts.cfg_min_ncrossedrows); - fDileptonCut.SetMinNCrossedRowsOverFindableClustersTPC(0.8); - fDileptonCut.SetMaxFracSharedClustersTPC(dileptoncuts.cfg_max_frac_shared_clusters_tpc); - fDileptonCut.SetChi2PerClusterTPC(0.0, dileptoncuts.cfg_max_chi2tpc); - fDileptonCut.SetChi2PerClusterITS(0.0, dileptoncuts.cfg_max_chi2its); - fDileptonCut.SetNClustersITS(dileptoncuts.cfg_min_ncluster_its, 7); - fDileptonCut.SetMaxDcaXY(dileptoncuts.cfg_max_dcaxy); - fDileptonCut.SetMaxDcaZ(dileptoncuts.cfg_max_dcaz); - fDileptonCut.SetTrackDca3DRange(0.f, dileptoncuts.cfg_max_dca3dsigma_track); // in sigma - fDileptonCut.IncludeITSsa(false, 0.15); - - // for eID - fDileptonCut.SetPIDScheme(dileptoncuts.cfg_pid_scheme); - fDileptonCut.SetTPCNsigmaElRange(dileptoncuts.cfg_min_TPCNsigmaEl, dileptoncuts.cfg_max_TPCNsigmaEl); - fDileptonCut.SetTPCNsigmaPiRange(dileptoncuts.cfg_min_TPCNsigmaPi, dileptoncuts.cfg_max_TPCNsigmaPi); - fDileptonCut.SetTOFNsigmaElRange(dileptoncuts.cfg_min_TOFNsigmaEl, dileptoncuts.cfg_max_TOFNsigmaEl); - } - - void DefineEMTrackCut() - { - fEMTrackCut = EMTrackCut("fEMTrackCut", "fEMTrackCut"); - fEMTrackCut.SetTrackPtRange(trackcuts.cfg_min_pt_track, trackcuts.cfg_max_pt_track); - fEMTrackCut.SetTrackEtaRange(trackcuts.cfg_min_eta_track, trackcuts.cfg_max_eta_track); - // fEMTrackCut.SetTrackPhiRange(trackcuts.cfg_min_phi_track, trackcuts.cfg_max_phi_track); - // fEMTrackCut.SetTrackMaxDcaXY(trackcuts.cfg_max_dcaxy); - // fEMTrackCut.SetTrackMaxDcaZ(trackcuts.cfg_max_dcaz); - fEMTrackCut.SetTrackBit(trackcuts.cfg_track_bits); - } - - SliceCache cache; - Preslice perCollision_pcm = aod::v0photonkf::emeventId; - - Preslice perCollision_electron = aod::emprimaryelectron::emeventId; - Partition positrons = o2::aod::emprimaryelectron::sign > int8_t(0) && static_cast(dileptoncuts.cfg_min_pt_track) < o2::aod::track::pt&& nabs(o2::aod::track::eta) < static_cast(dileptoncuts.cfg_max_eta_track) && static_cast(dileptoncuts.cfg_min_TPCNsigmaEl) < o2::aod::pidtpc::tpcNSigmaEl&& o2::aod::pidtpc::tpcNSigmaEl < static_cast(dileptoncuts.cfg_max_TPCNsigmaEl); - Partition electrons = o2::aod::emprimaryelectron::sign < int8_t(0) && static_cast(dileptoncuts.cfg_min_pt_track) < o2::aod::track::pt && nabs(o2::aod::track::eta) < static_cast(dileptoncuts.cfg_max_eta_track) && static_cast(dileptoncuts.cfg_min_TPCNsigmaEl) < o2::aod::pidtpc::tpcNSigmaEl && o2::aod::pidtpc::tpcNSigmaEl < static_cast(dileptoncuts.cfg_max_TPCNsigmaEl); - - using RefTracks = soa::Join; - using RefTrack = RefTracks::iterator; - Preslice perCollision_track = aod::emprimarytrack::emeventId; - Filter refTrackFilter = trackcuts.cfg_min_pt_track < 1 / nabs(o2::aod::emprimarytrack::signed1Pt) && 1 / nabs(o2::aod::emprimarytrack::signed1Pt) < trackcuts.cfg_max_pt_track && trackcuts.cfg_min_eta_track < o2::aod::emprimarytrack::eta && o2::aod::emprimarytrack::eta < trackcuts.cfg_max_eta_track; - using FilteredRefTracks = soa::Filtered; - using FilteredRefTrack = FilteredRefTracks::iterator; - - using MyEMH = o2::aod::pwgem::dilepton::utils::EventMixingHandler, std::pair, EMTrack>; - MyEMH* emh1 = nullptr; - MyEMH* emh2 = nullptr; - using MyEMH_track = o2::aod::pwgem::dilepton::utils::EventMixingHandler, std::pair, EMTrack>; // for charged track - MyEMH_track* emh_diphoton = nullptr; - MyEMH_track* emh_ref = nullptr; - - std::vector used_photonIds_per_col; // - std::vector> used_dileptonIds_per_col; // - std::vector> used_diphotonIds_per_col; // - std::map, uint64_t> map_mixed_eventId_to_globalBC; - - template - void run2PC(TCollisions const& collisions, - TPhotons1 const& photons1, TPhotons2 const& photons2, TSubInfos1 const&, TSubInfos2 const&, TPreslice1 const& perCollision1, TPreslice2 const& perCollision2, TCut1 const& cut1, TCut2 const& cut2, - TRefTracks const& refTracks) - { - for (const auto& collision : collisions) { - initCCDB(collision); - int ndiphoton = 0; - - const float centralities[3] = {collision.centFT0M(), collision.centFT0A(), collision.centFT0C()}; - if (centralities[cfgCentEstimator] < cfgCentMin || cfgCentMax < centralities[cfgCentEstimator]) { - continue; - } - - if constexpr (isTriggerAnalysis) { - if (!collision.swtalias_bit(o2::aod::pwgem::dilepton::swt::aliasLabels.at(cfg_swt_name.value))) { - continue; - } - } - - o2::aod::pwgem::photonmeson::utils::eventhistogram::fillEventInfo<0>(&fRegistry, collision, 1.f); - if (!fEMEventCut.IsSelected(collision)) { - continue; - } - if (eventcuts.cfgRequireGoodRCT && !rctChecker.checkTable(collision)) { - continue; - } - o2::aod::pwgem::photonmeson::utils::eventhistogram::fillEventInfo<1>(&fRegistry, collision, 1.f); - fRegistry.fill(HIST("Event/before/hCollisionCounter"), 12.0, 1.f); // accepted - fRegistry.fill(HIST("Event/after/hCollisionCounter"), 12.0, 1.f); // accepted - - int zbin = lower_bound(zvtx_bin_edges.begin(), zvtx_bin_edges.end(), collision.posZ()) - zvtx_bin_edges.begin() - 1; - if (zbin < 0) { - zbin = 0; - } else if (static_cast(zvtx_bin_edges.size()) - 2 < zbin) { - zbin = static_cast(zvtx_bin_edges.size()) - 2; - } - - float centrality = centralities[cfgCentEstimator]; - int centbin = lower_bound(cent_bin_edges.begin(), cent_bin_edges.end(), centrality) - cent_bin_edges.begin() - 1; - if (centbin < 0) { - centbin = 0; - } else if (static_cast(cent_bin_edges.size()) - 2 < centbin) { - centbin = static_cast(cent_bin_edges.size()) - 2; - } - - int epbin = 0; - - int occbin = -1; - if (cfgOccupancyEstimator == 0) { - occbin = lower_bound(occ_bin_edges.begin(), occ_bin_edges.end(), collision.ft0cOccupancyInTimeRange()) - occ_bin_edges.begin() - 1; - } else if (cfgOccupancyEstimator == 1) { - occbin = lower_bound(occ_bin_edges.begin(), occ_bin_edges.end(), collision.trackOccupancyInTimeRange()) - occ_bin_edges.begin() - 1; - } else { - occbin = lower_bound(occ_bin_edges.begin(), occ_bin_edges.end(), collision.ft0cOccupancyInTimeRange()) - occ_bin_edges.begin() - 1; - } - - if (occbin < 0) { - occbin = 0; - } else if (static_cast(occ_bin_edges.size()) - 2 < occbin) { - occbin = static_cast(occ_bin_edges.size()) - 2; - } - - // LOGF(info, "collision.globalIndex() = %d, collision.posZ() = %f, centrality = %f, ep2 = %f, collision.trackOccupancyInTimeRange() = %d, zbin = %d, centbin = %d, epbin = %d, occbin = %d", collision.globalIndex(), collision.posZ(), centrality, ep2, collision.trackOccupancyInTimeRange(), zbin, centbin, epbin, occbin); - - auto refTracks_per_collision = refTracks.sliceBy(perCollision_track, collision.globalIndex()); - - std::tuple key_bin = std::make_tuple(zbin, centbin, epbin, occbin); - std::pair key_df_collision = std::make_pair(ndf, collision.globalIndex()); - - if constexpr (pairtype == PairType::kPCMPCM) { // same kinds pairing - auto photons1_per_collision = photons1.sliceBy(perCollision1, collision.globalIndex()); - auto photons2_per_collision = photons2.sliceBy(perCollision2, collision.globalIndex()); - - for (const auto& [g1, g2] : combinations(CombinationsStrictlyUpperIndexPolicy(photons1_per_collision, photons2_per_collision))) { - if (!cut1.template IsSelected(g1) || !cut2.template IsSelected(g2)) { - continue; - } - - ROOT::Math::PtEtaPhiMVector v1(g1.pt(), g1.eta(), g1.phi(), 0.); - ROOT::Math::PtEtaPhiMVector v2(g2.pt(), g2.eta(), g2.phi(), 0.); - ROOT::Math::PtEtaPhiMVector v12 = v1 + v2; - if (std::fabs(v12.Rapidity()) > maxY) { - continue; - } - fRegistry.fill(HIST("Diphoton/same/hs"), v12.M(), v12.Pt()); - auto pos1 = g1.template posTrack_as(); - auto ele1 = g1.template negTrack_as(); - auto pos2 = g2.template posTrack_as(); - auto ele2 = g2.template negTrack_as(); - - int npair = 0; // the number of diphoton-h pairs - for (const auto& track : refTracks_per_collision) { - if (pos1.trackId() == track.trackId() || ele1.trackId() == track.trackId()) { - continue; - } - if (pos2.trackId() == track.trackId() || ele2.trackId() == track.trackId()) { - continue; - } - - if (fEMTrackCut.IsSelected(track)) { - ROOT::Math::PtEtaPhiMVector v3(track.pt(), track.eta(), track.phi(), 0.139); - float deta = v12.Eta() - v3.Eta(); - float dphi = v12.Phi() - v3.Phi(); - // o2::math_utils::bringTo02Pi(dphi); - dphi = RecoDecay::constrainAngle(dphi, -o2::constants::math::PIHalf, 1U); - fRegistry.fill(HIST("DiphotonHadron/same/hs"), v12.M(), v12.Pt(), deta, dphi); - npair++; - } - } // end of ref track loop - - if (npair > 0) { - std::tuple tuple_tmp_diphoton = std::make_tuple(g1.globalIndex(), g2.globalIndex(), -1); - if (std::find(used_diphotonIds_per_col.begin(), used_diphotonIds_per_col.end(), tuple_tmp_diphoton) == used_diphotonIds_per_col.end()) { - emh_diphoton->AddTrackToEventPool(key_df_collision, EMTrack(v12.Pt(), v12.Eta(), v12.Phi(), v12.M())); - used_diphotonIds_per_col.emplace_back(tuple_tmp_diphoton); - } - } - - if (std::find(used_photonIds_per_col.begin(), used_photonIds_per_col.end(), g1.globalIndex()) == used_photonIds_per_col.end()) { - emh1->AddTrackToEventPool(key_df_collision, EMTrack(g1.pt(), g1.eta(), g1.phi(), 0)); - used_photonIds_per_col.emplace_back(g1.globalIndex()); - } - if (std::find(used_photonIds_per_col.begin(), used_photonIds_per_col.end(), g2.globalIndex()) == used_photonIds_per_col.end()) { - emh1->AddTrackToEventPool(key_df_collision, EMTrack(g2.pt(), g2.eta(), g2.phi(), 0)); - used_photonIds_per_col.emplace_back(g2.globalIndex()); - } - ndiphoton++; - } // end of pairing loop - } else if constexpr (pairtype == PairType::kPCMDalitzEE) { - auto photons1_per_collision = photons1.sliceBy(perCollision1, collision.globalIndex()); - auto positrons_per_collision = positrons->sliceByCached(o2::aod::emprimaryelectron::emeventId, collision.globalIndex(), cache); - auto electrons_per_collision = electrons->sliceByCached(o2::aod::emprimaryelectron::emeventId, collision.globalIndex(), cache); - - for (const auto& g1 : photons1_per_collision) { - if (!cut1.template IsSelected(g1)) { - continue; - } - auto pos1 = g1.template posTrack_as(); - auto ele1 = g1.template negTrack_as(); - ROOT::Math::PtEtaPhiMVector v_gamma(g1.pt(), g1.eta(), g1.phi(), 0.); - - for (const auto& [pos2, ele2] : combinations(CombinationsFullIndexPolicy(positrons_per_collision, electrons_per_collision))) { - - if (pos2.trackId() == ele2.trackId()) { // this is protection against pairing identical 2 tracks. - continue; - } - if (pos1.trackId() == pos2.trackId() || ele1.trackId() == ele2.trackId()) { - continue; - } - - if (!cut2.template IsSelectedTrack(pos2, collision) || !cut2.template IsSelectedTrack(ele2, collision)) { - continue; - } - - if (!cut2.IsSelectedPair(pos2, ele2, d_bz)) { - continue; - } - - ROOT::Math::PtEtaPhiMVector v_pos(pos2.pt(), pos2.eta(), pos2.phi(), o2::constants::physics::MassElectron); - ROOT::Math::PtEtaPhiMVector v_ele(ele2.pt(), ele2.eta(), ele2.phi(), o2::constants::physics::MassElectron); - ROOT::Math::PtEtaPhiMVector v_ee = v_pos + v_ele; - ROOT::Math::PtEtaPhiMVector veeg = v_gamma + v_pos + v_ele; - if (std::fabs(veeg.Rapidity()) > maxY) { - continue; - } - fRegistry.fill(HIST("Diphoton/same/hs"), veeg.M(), veeg.Pt()); - - int npair = 0; // the number of diphoton-h pairs - for (const auto& track : refTracks_per_collision) { - if (pos1.trackId() == track.trackId() || ele1.trackId() == track.trackId()) { - continue; - } - if (pos2.trackId() == track.trackId() || ele2.trackId() == track.trackId()) { - continue; - } - - ROOT::Math::PtEtaPhiMVector v3(track.pt(), track.eta(), track.phi(), 0.139); - float deta = veeg.Eta() - v3.Eta(); - float dphi = veeg.Phi() - v3.Phi(); - // o2::math_utils::bringTo02Pi(dphi); - dphi = RecoDecay::constrainAngle(dphi, -o2::constants::math::PIHalf, 1U); - fRegistry.fill(HIST("DiphotonHadron/same/hs"), veeg.M(), veeg.Pt(), deta, dphi); - npair++; - - } // end of ref track loop - - if (npair > 0) { - std::tuple tuple_tmp_diphoton = std::make_tuple(g1.globalIndex(), pos2.trackId(), ele2.trackId()); - if (std::find(used_diphotonIds_per_col.begin(), used_diphotonIds_per_col.end(), tuple_tmp_diphoton) == used_diphotonIds_per_col.end()) { - emh_diphoton->AddTrackToEventPool(key_df_collision, EMTrack(veeg.Pt(), veeg.Eta(), veeg.Phi(), veeg.M())); - used_diphotonIds_per_col.emplace_back(tuple_tmp_diphoton); - } - } - - std::pair tuple_tmp_id2 = std::make_pair(pos2.trackId(), ele2.trackId()); - if (std::find(used_photonIds_per_col.begin(), used_photonIds_per_col.end(), g1.globalIndex()) == used_photonIds_per_col.end()) { - emh1->AddTrackToEventPool(key_df_collision, EMTrack(g1.pt(), g1.eta(), g1.phi(), 0)); - used_photonIds_per_col.emplace_back(g1.globalIndex()); - } - if (std::find(used_dileptonIds_per_col.begin(), used_dileptonIds_per_col.end(), tuple_tmp_id2) == used_dileptonIds_per_col.end()) { - emh2->AddTrackToEventPool(key_df_collision, EMTrack(v_ee.Pt(), v_ee.Eta(), v_ee.Phi(), v_ee.M())); - used_dileptonIds_per_col.emplace_back(tuple_tmp_id2); - } - ndiphoton++; - } // end of dielectron loop - } // end of g1 loop - } // end of pairing in same event - - used_photonIds_per_col.clear(); - used_photonIds_per_col.shrink_to_fit(); - used_dileptonIds_per_col.clear(); - used_dileptonIds_per_col.shrink_to_fit(); - used_diphotonIds_per_col.clear(); - used_diphotonIds_per_col.shrink_to_fit(); - - if (ndiphoton > 0) { - emh_ref->ReserveNTracksPerCollision(key_df_collision, refTracks_per_collision.size()); - for (const auto& track : refTracks_per_collision) { - if (fEMTrackCut.IsSelected(track)) { - fRegistry.fill(HIST("Hadron/hs"), track.pt(), track.eta(), track.phi()); - fRegistry.fill(HIST("Hadron/hTrackBit"), track.trackBit()); - emh_ref->AddTrackToEventPool(key_df_collision, EMTrack(track.pt(), track.eta(), track.phi(), 0.139)); - } - } - - for (const auto& [ref1, ref2] : combinations(CombinationsStrictlyUpperIndexPolicy(refTracks_per_collision, refTracks_per_collision))) { - if (fEMTrackCut.IsSelected(ref1) && fEMTrackCut.IsSelected(ref2)) { - float deta = ref1.eta() - ref2.eta(); - float dphi = ref1.phi() - ref2.phi(); - // o2::math_utils::bringTo02Pi(dphi); - dphi = RecoDecay::constrainAngle(dphi, -o2::constants::math::PIHalf, 1U); - fRegistry.fill(HIST("HadronHadron/same/hDEtaDPhi"), dphi, deta); - } - } - } - - // event mixing - if (!cfgDoMix || !(ndiphoton > 0)) { - continue; - } - - // make a vector of selected photons in this collision. - auto selected_photons1_in_this_event = emh1->GetTracksPerCollision(key_df_collision); - auto selected_photons2_in_this_event = emh2->GetTracksPerCollision(key_df_collision); - auto selected_refTracks_in_this_event = emh_ref->GetTracksPerCollision(key_df_collision); - auto selected_diphotons_in_this_event = emh_diphoton->GetTracksPerCollision(key_df_collision); - - auto collisionIds1_in_mixing_pool = emh1->GetCollisionIdsFromEventPool(key_bin); - auto collisionIds2_in_mixing_pool = emh2->GetCollisionIdsFromEventPool(key_bin); - auto collisionIdsRef_in_mixing_pool = emh_ref->GetCollisionIdsFromEventPool(key_bin); - auto collisionIdsDiphoton_in_mixing_pool = emh_diphoton->GetCollisionIdsFromEventPool(key_bin); - - if constexpr (pairtype == PairType::kPCMPCM) { // same kinds pairing - for (const auto& mix_dfId_collisionId : collisionIds1_in_mixing_pool) { - int mix_dfId = mix_dfId_collisionId.first; - int64_t mix_collisionId = mix_dfId_collisionId.second; - - if (collision.globalIndex() == mix_collisionId && ndf == mix_dfId) { // this never happens. only protection. - continue; - } - - auto globalBC_mix = map_mixed_eventId_to_globalBC[mix_dfId_collisionId]; - uint64_t diffBC = std::max(collision.globalBC(), globalBC_mix) - std::min(collision.globalBC(), globalBC_mix); - fRegistry.fill(HIST("Diphoton/mix/hDiffBC"), diffBC); - if (diffBC < ndiff_bc_mix) { - continue; - } - - auto photons1_from_event_pool = emh1->GetTracksPerCollision(mix_dfId_collisionId); - // LOGF(info, "Do event mixing: current event (%d, %d), ngamma = %d | event pool (%d, %d), ngamma = %d", ndf, collision.globalIndex(), selected_photons1_in_this_event.size(), mix_dfId, mix_collisionId, photons1_from_event_pool.size()); - - for (const auto& g1 : selected_photons1_in_this_event) { - for (const auto& g2 : photons1_from_event_pool) { - ROOT::Math::PtEtaPhiMVector v1(g1.pt(), g1.eta(), g1.phi(), 0.); - ROOT::Math::PtEtaPhiMVector v2(g2.pt(), g2.eta(), g2.phi(), 0.); - ROOT::Math::PtEtaPhiMVector v12 = v1 + v2; - if (std::fabs(v12.Rapidity()) > maxY) { - continue; - } - fRegistry.fill(HIST("Diphoton/mix/hs"), v12.M(), v12.Pt(), 1.f); - } - } - } // end of loop over mixed event pool between photon-photon - - for (const auto& mix_dfId_collisionId : collisionIdsRef_in_mixing_pool) { - int mix_dfId = mix_dfId_collisionId.first; - int64_t mix_collisionId = mix_dfId_collisionId.second; - - if (collision.globalIndex() == mix_collisionId && ndf == mix_dfId) { // this never happens. only protection. - continue; - } - - auto globalBC_mix = map_mixed_eventId_to_globalBC[mix_dfId_collisionId]; - uint64_t diffBC = std::max(collision.globalBC(), globalBC_mix) - std::min(collision.globalBC(), globalBC_mix); - if (diffBC < ndiff_bc_mix) { - continue; - } - - auto refTracks_from_event_pool = emh_ref->GetTracksPerCollision(mix_dfId_collisionId); - for (const auto& trg : selected_diphotons_in_this_event) { - for (const auto& ref : refTracks_from_event_pool) { - float deta = trg.eta() - ref.eta(); - float dphi = trg.phi() - ref.phi(); - // o2::math_utils::bringTo02Pi(dphi); - dphi = RecoDecay::constrainAngle(dphi, -o2::constants::math::PIHalf, 1U); - fRegistry.fill(HIST("DiphotonHadron/mix/hs"), trg.mass(), trg.pt(), deta, dphi); - } - } - } // end of loop over mixed event pool between diphoton-hadron - - } else { // [photon1 from event1, photon2 from event2] and [photon1 from event2, photon2 from event1] - for (const auto& mix_dfId_collisionId : collisionIds2_in_mixing_pool) { - int mix_dfId = mix_dfId_collisionId.first; - int64_t mix_collisionId = mix_dfId_collisionId.second; - - if (collision.globalIndex() == mix_collisionId && ndf == mix_dfId) { // this never happens. only protection. - continue; - } - - auto globalBC_mix = map_mixed_eventId_to_globalBC[mix_dfId_collisionId]; - uint64_t diffBC = std::max(collision.globalBC(), globalBC_mix) - std::min(collision.globalBC(), globalBC_mix); - fRegistry.fill(HIST("Diphoton/mix/hDiffBC"), diffBC); - if (diffBC < ndiff_bc_mix) { - continue; - } - - auto photons2_from_event_pool = emh2->GetTracksPerCollision(mix_dfId_collisionId); - // LOGF(info, "Do event mixing: current event (%d, %d), ngamma = %d | event pool (%d, %d), nll = %d", ndf, collision.globalIndex(), selected_photons1_in_this_event.size(), mix_dfId, mix_collisionId, photons2_from_event_pool.size()); - - for (const auto& g1 : selected_photons1_in_this_event) { - for (const auto& g2 : photons2_from_event_pool) { - ROOT::Math::PtEtaPhiMVector v1(g1.pt(), g1.eta(), g1.phi(), 0.); - ROOT::Math::PtEtaPhiMVector v2(g2.pt(), g2.eta(), g2.phi(), 0.); - if constexpr (pairtype == PairType::kPCMDalitzEE) { //[photon from event1, dilepton from event2] and [photon from event2, dilepton from event1] - v2.SetM(g2.mass()); - } - ROOT::Math::PtEtaPhiMVector v12 = v1 + v2; - if (std::fabs(v12.Rapidity()) > maxY) { - continue; - } - fRegistry.fill(HIST("Diphoton/mix/hs"), v12.M(), v12.Pt(), 1.f); - } - } - } // end of loop over mixed event pool between photon-photon - - for (const auto& mix_dfId_collisionId : collisionIds1_in_mixing_pool) { - int mix_dfId = mix_dfId_collisionId.first; - int64_t mix_collisionId = mix_dfId_collisionId.second; - - if (collision.globalIndex() == mix_collisionId && ndf == mix_dfId) { // this never happens. only protection. - continue; - } - - auto globalBC_mix = map_mixed_eventId_to_globalBC[mix_dfId_collisionId]; - uint64_t diffBC = std::max(collision.globalBC(), globalBC_mix) - std::min(collision.globalBC(), globalBC_mix); - fRegistry.fill(HIST("Diphoton/mix/hDiffBC"), diffBC); - if (diffBC < ndiff_bc_mix) { - continue; - } - - auto photons1_from_event_pool = emh1->GetTracksPerCollision(mix_dfId_collisionId); - // LOGF(info, "Do event mixing: current event (%d, %d), nll = %d | event pool (%d, %d), ngamma = %d", ndf, collision.globalIndex(), selected_photons2_in_this_event.size(), mix_dfId, mix_collisionId, photons1_from_event_pool.size()); - - for (const auto& g1 : selected_photons2_in_this_event) { - for (const auto& g2 : photons1_from_event_pool) { - ROOT::Math::PtEtaPhiMVector v1(g1.pt(), g1.eta(), g1.phi(), 0.); - ROOT::Math::PtEtaPhiMVector v2(g2.pt(), g2.eta(), g2.phi(), 0.); - if constexpr (pairtype == PairType::kPCMDalitzEE) { //[photon from event1, dilepton from event2] and [photon from event2, dilepton from event1] - v1.SetM(g1.mass()); - } - ROOT::Math::PtEtaPhiMVector v12 = v1 + v2; - if (std::fabs(v12.Rapidity()) > maxY) { - continue; - } - fRegistry.fill(HIST("Diphoton/mix/hs"), v12.M(), v12.Pt(), 1.f); - } - } - } // end of loop over mixed event pool between photon-photon - - for (const auto& mix_dfId_collisionId : collisionIdsRef_in_mixing_pool) { - int mix_dfId = mix_dfId_collisionId.first; - int64_t mix_collisionId = mix_dfId_collisionId.second; - - if (collision.globalIndex() == mix_collisionId && ndf == mix_dfId) { // this never happens. only protection. - continue; - } - - auto globalBC_mix = map_mixed_eventId_to_globalBC[mix_dfId_collisionId]; - uint64_t diffBC = std::max(collision.globalBC(), globalBC_mix) - std::min(collision.globalBC(), globalBC_mix); - if (diffBC < ndiff_bc_mix) { - continue; - } - - auto refTracks_from_event_pool = emh_ref->GetTracksPerCollision(mix_dfId_collisionId); - for (const auto& trg : selected_diphotons_in_this_event) { - for (const auto& ref : refTracks_from_event_pool) { - float deta = trg.eta() - ref.eta(); - float dphi = trg.phi() - ref.phi(); - // o2::math_utils::bringTo02Pi(dphi); - dphi = RecoDecay::constrainAngle(dphi, -o2::constants::math::PIHalf, 1U); - fRegistry.fill(HIST("DiphotonHadron/mix/hs"), trg.mass(), trg.pt(), deta, dphi); - } - } - } // end of loop over mixed event pool between diphoton-hadron - } - - // hadron-hadron mixed event - for (const auto& mix_dfId_collisionId : collisionIdsRef_in_mixing_pool) { - int mix_dfId = mix_dfId_collisionId.first; - int64_t mix_collisionId = mix_dfId_collisionId.second; - - if (collision.globalIndex() == mix_collisionId && ndf == mix_dfId) { // this never happens. only protection. - continue; - } - - auto globalBC_mix = map_mixed_eventId_to_globalBC[mix_dfId_collisionId]; - uint64_t diffBC = std::max(collision.globalBC(), globalBC_mix) - std::min(collision.globalBC(), globalBC_mix); - if (diffBC < ndiff_bc_mix) { - continue; - } - - auto refTracks_from_event_pool = emh_ref->GetTracksPerCollision(mix_dfId_collisionId); - for (const auto& ref1 : selected_refTracks_in_this_event) { - for (const auto& ref2 : refTracks_from_event_pool) { - float deta = ref1.eta() - ref2.eta(); - float dphi = ref1.phi() - ref2.phi(); - // o2::math_utils::bringTo02Pi(dphi); - dphi = RecoDecay::constrainAngle(dphi, -o2::constants::math::PIHalf, 1U); - fRegistry.fill(HIST("HadronHadron/mix/hDEtaDPhi"), dphi, deta); - } - } - } // end of loop over mixed event pool between hadron-hadron - - if (ndiphoton > 0) { - emh1->AddCollisionIdAtLast(key_bin, key_df_collision); - emh2->AddCollisionIdAtLast(key_bin, key_df_collision); - emh_diphoton->AddCollisionIdAtLast(key_bin, key_df_collision); - emh_ref->AddCollisionIdAtLast(key_bin, key_df_collision); - map_mixed_eventId_to_globalBC[key_df_collision] = collision.globalBC(); - } - - } // end of collision loop - } - - Filter collisionFilter_occupancy_track = eventcuts.cfgTrackOccupancyMin <= o2::aod::evsel::trackOccupancyInTimeRange && o2::aod::evsel::trackOccupancyInTimeRange < eventcuts.cfgTrackOccupancyMax; - Filter collisionFilter_occupancy_ft0c = eventcuts.cfgFT0COccupancyMin <= o2::aod::evsel::ft0cOccupancyInTimeRange && o2::aod::evsel::ft0cOccupancyInTimeRange < eventcuts.cfgFT0COccupancyMax; - Filter collisionFilter_centrality = (cfgCentMin < o2::aod::cent::centFT0M && o2::aod::cent::centFT0M < cfgCentMax) || (cfgCentMin < o2::aod::cent::centFT0A && o2::aod::cent::centFT0A < cfgCentMax) || (cfgCentMin < o2::aod::cent::centFT0C && o2::aod::cent::centFT0C < cfgCentMax); - using FilteredMyCollisions = soa::Filtered; - - Filter prefilter_pcm = ifnode(pcmcuts.cfg_apply_cuts_from_prefilter_derived.node(), o2::aod::v0photonkf::pfbderived == static_cast(0), true); - Filter prefilter_primaryelectron = ifnode(dileptoncuts.cfg_apply_cuts_from_prefilter_derived.node(), o2::aod::emprimaryelectron::pfbderived == static_cast(0), true); - - int ndf = 0; - void processAnalysis(FilteredMyCollisions const& collisions, FilteredRefTracks const& refTracks, Types const&... args) - { - // LOGF(info, "ndf = %d", ndf); - if constexpr (pairtype == PairType::kPCMPCM) { - auto v0photons = std::get<0>(std::tie(args...)); - auto v0legs = std::get<1>(std::tie(args...)); - run2PC(collisions, v0photons, v0photons, v0legs, v0legs, perCollision_pcm, perCollision_pcm, fV0PhotonCut, fV0PhotonCut, refTracks); - } else if constexpr (pairtype == PairType::kPCMDalitzEE) { - auto v0photons = std::get<0>(std::tie(args...)); - auto v0legs = std::get<1>(std::tie(args...)); - auto emprimaryelectrons = std::get<2>(std::tie(args...)); - // LOGF(info, "electrons.size() = %d, positrons.size() = %d", electrons.size(), positrons.size()); - run2PC(collisions, v0photons, emprimaryelectrons, v0legs, emprimaryelectrons, perCollision_pcm, perCollision_electron, fV0PhotonCut, fDileptonCut, refTracks); - } - ndf++; - } - PROCESS_SWITCH(DiphotonHadronMPC, processAnalysis, "process pair analysis", true); - - // 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) { - auto v0photons = std::get<0>(std::tie(args...)); - auto v0legs = std::get<1>(std::tie(args...)); - run2PC(collisions, v0photons, v0photons, v0legs, v0legs, perCollision_pcm, perCollision_pcm, fV0PhotonCut, fV0PhotonCut, refTracks); - } else if constexpr (pairtype == PairType::kPCMDalitzEE) { - auto v0photons = std::get<0>(std::tie(args...)); - auto v0legs = std::get<1>(std::tie(args...)); - auto emprimaryelectrons = std::get<2>(std::tie(args...)); - // LOGF(info, "electrons.size() = %d, positrons.size() = %d", electrons.size(), positrons.size()); - run2PC(collisions, v0photons, emprimaryelectrons, v0legs, emprimaryelectrons, perCollision_pcm, perCollision_electron, fV0PhotonCut, fDileptonCut, refTracks); - } - ndf++; - } - PROCESS_SWITCH(DiphotonHadronMPC, processTriggerAnalysis, "process pair analysis with software trigger", false); - - void processDummy(MyCollisions const&) {} - PROCESS_SWITCH(DiphotonHadronMPC, processDummy, "Dummy function", false); -}; -#endif // PWGEM_PHOTONMESON_CORE_DIPHOTONHADRONMPC_H_ diff --git a/PWGEM/PhotonMeson/Core/EMCPhotonCut.h b/PWGEM/PhotonMeson/Core/EMCPhotonCut.h index 95ca402c913..57ed3fb4a2b 100644 --- a/PWGEM/PhotonMeson/Core/EMCPhotonCut.h +++ b/PWGEM/PhotonMeson/Core/EMCPhotonCut.h @@ -295,9 +295,9 @@ class EMCPhotonCut : public TNamed const bool doQA = mDoQA && fRegistry != nullptr; nTotClusterPerColl = 0; - currentCollID = clusters.iteratorAt(0).emeventId(); + currentCollID = clusters.iteratorAt(0).emphotoneventId(); for (const auto& cluster : clusters) { - const auto collID = cluster.emeventId(); + const auto collID = cluster.emphotoneventId(); if (doQA) { fillBeforeClusterHistogram(cluster, fRegistry); } @@ -376,7 +376,7 @@ class EMCPhotonCut : public TNamed } return false; } - if (currentCollID == cluster.emeventId()) { + if (currentCollID == cluster.emphotoneventId()) { ++nAccClusterPerColl; } else { if (doQA) { diff --git a/PWGEM/PhotonMeson/Core/EMPhotonEventCut.cxx b/PWGEM/PhotonMeson/Core/EMPhotonEventCut.cxx index 285bf50eba4..253020c7d69 100644 --- a/PWGEM/PhotonMeson/Core/EMPhotonEventCut.cxx +++ b/PWGEM/PhotonMeson/Core/EMPhotonEventCut.cxx @@ -18,6 +18,108 @@ ClassImp(EMPhotonEventCut); +void EMPhotonEventCut::SetRequireSel8(bool flag) +{ + mRequireSel8 = flag; + LOG(info) << "EM Event Cut, require sel8: " << mRequireSel8; +} + +void EMPhotonEventCut::SetRequireFT0AND(bool flag) +{ + mRequireFT0AND = flag; + LOG(info) << "EM Event Cut, require FT0AND: " << mRequireFT0AND; +} + +void EMPhotonEventCut::SetZvtxRange(float min, float max) +{ + mMinZvtx = min; + mMaxZvtx = max; + LOG(info) << "EM Event Cut, set z vtx range: " << mMinZvtx << " - " << mMaxZvtx; +} + +void EMPhotonEventCut::SetRequireNoTFB(bool flag) +{ + mRequireNoTFB = flag; + LOG(info) << "EM Event Cut, require No TF border: " << mRequireNoTFB; +} + +void EMPhotonEventCut::SetRequireNoITSROFB(bool flag) +{ + mRequireNoITSROFB = flag; + LOG(info) << "EM Event Cut, require No ITS ROF border: " << mRequireNoITSROFB; +} + +void EMPhotonEventCut::SetRequireNoSameBunchPileup(bool flag) +{ + mRequireNoSameBunchPileup = flag; + LOG(info) << "EM Event Cut, require No same bunch pileup: " << mRequireNoSameBunchPileup; +} + +void EMPhotonEventCut::SetRequireVertexITSTPC(bool flag) +{ + mRequireVertexITSTPC = flag; + LOG(info) << "EM Event Cut, require vertex reconstructed by ITS-TPC matched track: " << mRequireVertexITSTPC; +} + +void EMPhotonEventCut::SetRequireVertexTOFmatched(bool flag) +{ + mRequireVertexTOFmatched = flag; + LOG(info) << "EM Event Cut, require vertex reconstructed by ITS-TPC-TOF matched track: " << mRequireVertexTOFmatched; +} + +void EMPhotonEventCut::SetRequireGoodZvtxFT0vsPV(bool flag) +{ + mRequireGoodZvtxFT0vsPV = flag; + LOG(info) << "EM Event Cut, require good Zvtx between FT0 vs. PV: " << mRequireGoodZvtxFT0vsPV; +} + +void EMPhotonEventCut::SetRequireNoCollInTimeRangeStandard(bool flag) +{ + mRequireNoCollInTimeRangeStandard = flag; + LOG(info) << "EM Event Cut, require No collision in time range standard: " << mRequireNoCollInTimeRangeStandard; +} + +void EMPhotonEventCut::SetRequireNoCollInTimeRangeStrict(bool flag) +{ + mRequireNoCollInTimeRangeStrict = flag; + LOG(info) << "EM Event Cut, require No collision in time range strict: " << mRequireNoCollInTimeRangeStrict; +} +void EMPhotonEventCut::SetRequireNoCollInITSROFStandard(bool flag) +{ + mRequireNoCollInITSROFStandard = flag; + LOG(info) << "EM Event Cut, require No collision in ITS TOF standard: " << mRequireNoCollInITSROFStandard; +} + +void EMPhotonEventCut::SetRequireNoCollInITSROFStrict(bool flag) +{ + mRequireNoCollInITSROFStrict = flag; + LOG(info) << "EM Event Cut, require No collision in ITS ROF strict: " << mRequireNoCollInITSROFStrict; +} + +void EMPhotonEventCut::SetRequireNoHighMultCollInPrevRof(bool flag) +{ + mRequireNoHighMultCollInPrevRof = flag; + LOG(info) << "EM Event Cut, require No HM collision in previous ITS ROF: " << mRequireNoHighMultCollInPrevRof; +} + +void EMPhotonEventCut::SetRequireGoodITSLayer3(bool flag) +{ + mRequireGoodITSLayer3 = flag; + LOG(info) << "EM Event Cut, require GoodITSLayer3: " << mRequireGoodITSLayer3; +} + +void EMPhotonEventCut::SetRequireGoodITSLayer0123(bool flag) +{ + mRequireGoodITSLayer0123 = flag; + LOG(info) << "EM Event Cut, require GoodITSLayer0123: " << mRequireGoodITSLayer0123; +} + +void EMPhotonEventCut::SetRequireGoodITSLayersAll(bool flag) +{ + mRequireGoodITSLayersAll = flag; + LOG(info) << "EM Event Cut, require GoodITSLayersAll: " << mRequireGoodITSLayersAll; +} + void EMPhotonEventCut::SetRequireEMCReadoutInMB(bool flag) { mRequireEMCReadoutInMB = flag; diff --git a/PWGEM/PhotonMeson/Core/EMPhotonEventCut.h b/PWGEM/PhotonMeson/Core/EMPhotonEventCut.h index 3b134ce882e..1121a6fd922 100644 --- a/PWGEM/PhotonMeson/Core/EMPhotonEventCut.h +++ b/PWGEM/PhotonMeson/Core/EMPhotonEventCut.h @@ -16,18 +16,38 @@ #ifndef PWGEM_PHOTONMESON_CORE_EMPHOTONEVENTCUT_H_ #define PWGEM_PHOTONMESON_CORE_EMPHOTONEVENTCUT_H_ -#include "PWGEM/Dilepton/Core/EMEventCut.h" +#include "Common/CCDB/EventSelectionParams.h" +#include "Common/CCDB/TriggerAliases.h" + +#include "TNamed.h" using namespace std; -class EMPhotonEventCut : public EMEventCut +class EMPhotonEventCut : public TNamed { public: EMPhotonEventCut() = default; - EMPhotonEventCut(const char* name, const char* title) : EMEventCut(name, title) {} + EMPhotonEventCut(const char* name, const char* title) : TNamed(name, title) {} enum class EMPhotonEventCuts : int { - kEMCReadoutInMB = 0, + kSel8 = 0, + kFT0AND, + kZvtx, + kNoTFB, + kNoITSROFB, + kNoSameBunchPileup, + kIsVertexITSTPC, + kIsVertexTOFmatched, + kIsGoodZvtxFT0vsPV, + kNoCollInTimeRangeStandard, + kNoCollInTimeRangeStrict, + kNoCollInITSROFStandard, + kNoCollInITSROFStrict, + kNoHighMultCollInPrevRof, + kIsGoodITSLayer3, + kIsGoodITSLayer0123, + kIsGoodITSLayersAll, + kEMCReadoutInMB, kEMCHardwareTriggered, kNCuts }; @@ -35,7 +55,55 @@ class EMPhotonEventCut : public EMEventCut template bool IsSelected(T const& collision) const { - if (!EMEventCut::IsSelected(collision)) { + if (mRequireSel8 && !IsSelected(collision, EMPhotonEventCuts::kSel8)) { + return false; + } + if (mRequireFT0AND && !IsSelected(collision, EMPhotonEventCuts::kFT0AND)) { + return false; + } + if (!IsSelected(collision, EMPhotonEventCuts::kZvtx)) { + return false; + } + if (mRequireNoTFB && !IsSelected(collision, EMPhotonEventCuts::kNoTFB)) { + return false; + } + if (mRequireNoITSROFB && !IsSelected(collision, EMPhotonEventCuts::kNoITSROFB)) { + return false; + } + if (mRequireNoSameBunchPileup && !IsSelected(collision, EMPhotonEventCuts::kNoSameBunchPileup)) { + return false; + } + if (mRequireVertexITSTPC && !IsSelected(collision, EMPhotonEventCuts::kIsVertexITSTPC)) { + return false; + } + if (mRequireVertexTOFmatched && !IsSelected(collision, EMPhotonEventCuts::kIsVertexTOFmatched)) { + return false; + } + if (mRequireGoodZvtxFT0vsPV && !IsSelected(collision, EMPhotonEventCuts::kIsGoodZvtxFT0vsPV)) { + return false; + } + if (mRequireNoCollInTimeRangeStandard && !IsSelected(collision, EMPhotonEventCuts::kNoCollInTimeRangeStandard)) { + return false; + } + if (mRequireNoCollInTimeRangeStrict && !IsSelected(collision, EMPhotonEventCuts::kNoCollInTimeRangeStrict)) { + return false; + } + if (mRequireNoCollInITSROFStandard && !IsSelected(collision, EMPhotonEventCuts::kNoCollInITSROFStandard)) { + return false; + } + if (mRequireNoCollInITSROFStrict && !IsSelected(collision, EMPhotonEventCuts::kNoCollInITSROFStrict)) { + return false; + } + if (mRequireNoHighMultCollInPrevRof && !IsSelected(collision, EMPhotonEventCuts::kNoHighMultCollInPrevRof)) { + return false; + } + if (mRequireGoodITSLayer3 && !IsSelected(collision, EMPhotonEventCuts::kIsGoodITSLayer3)) { + return false; + } + if (mRequireGoodITSLayer0123 && !IsSelected(collision, EMPhotonEventCuts::kIsGoodITSLayer0123)) { + return false; + } + if (mRequireGoodITSLayersAll && !IsSelected(collision, EMPhotonEventCuts::kIsGoodITSLayersAll)) { return false; } if (mRequireEMCReadoutInMB && !IsSelected(collision, EMPhotonEventCuts::kEMCReadoutInMB)) { @@ -51,6 +119,57 @@ class EMPhotonEventCut : public EMEventCut bool IsSelected(T const& collision, const EMPhotonEventCuts& cut) const { switch (cut) { + case EMPhotonEventCuts::kSel8: + return collision.sel8(); + + case EMPhotonEventCuts::kFT0AND: + return collision.selection_bit(o2::aod::evsel::kIsTriggerTVX); + + case EMPhotonEventCuts::kZvtx: + return mMinZvtx < collision.posZ() && collision.posZ() < mMaxZvtx; + + case EMPhotonEventCuts::kNoTFB: + return collision.selection_bit(o2::aod::evsel::kNoTimeFrameBorder); + + case EMPhotonEventCuts::kNoITSROFB: + return collision.selection_bit(o2::aod::evsel::kNoITSROFrameBorder); + + case EMPhotonEventCuts::kNoSameBunchPileup: + return collision.selection_bit(o2::aod::evsel::kNoSameBunchPileup); + + case EMPhotonEventCuts::kIsVertexITSTPC: + return collision.selection_bit(o2::aod::evsel::kIsVertexITSTPC); + + case EMPhotonEventCuts::kIsVertexTOFmatched: + return collision.selection_bit(o2::aod::evsel::kIsVertexTOFmatched); + + case EMPhotonEventCuts::kIsGoodZvtxFT0vsPV: + return collision.selection_bit(o2::aod::evsel::kIsGoodZvtxFT0vsPV); + + case EMPhotonEventCuts::kNoCollInTimeRangeStandard: + return collision.selection_bit(o2::aod::evsel::kNoCollInTimeRangeStandard); + + case EMPhotonEventCuts::kNoCollInTimeRangeStrict: + return collision.selection_bit(o2::aod::evsel::kNoCollInTimeRangeStrict); + + case EMPhotonEventCuts::kNoCollInITSROFStandard: + return collision.selection_bit(o2::aod::evsel::kNoCollInRofStandard); + + case EMPhotonEventCuts::kNoCollInITSROFStrict: + return collision.selection_bit(o2::aod::evsel::kNoCollInRofStrict); + + case EMPhotonEventCuts::kNoHighMultCollInPrevRof: + return collision.selection_bit(o2::aod::evsel::kNoHighMultCollInPrevRof); + + case EMPhotonEventCuts::kIsGoodITSLayer3: + return collision.selection_bit(o2::aod::evsel::kIsGoodITSLayer3); + + case EMPhotonEventCuts::kIsGoodITSLayer0123: + return collision.selection_bit(o2::aod::evsel::kIsGoodITSLayer0123); + + case EMPhotonEventCuts::kIsGoodITSLayersAll: + return collision.selection_bit(o2::aod::evsel::kIsGoodITSLayersAll); + case EMPhotonEventCuts::kEMCReadoutInMB: return (collision.alias_bit(kTVXinEMC)); @@ -63,10 +182,44 @@ class EMPhotonEventCut : public EMEventCut } // Setters + void SetRequireSel8(bool flag); + void SetRequireFT0AND(bool flag); + void SetZvtxRange(float min, float max); + void SetRequireNoTFB(bool flag); + void SetRequireNoITSROFB(bool flag); + void SetRequireNoSameBunchPileup(bool flag); + void SetRequireVertexITSTPC(bool flag); + void SetRequireVertexTOFmatched(bool flag); + void SetRequireGoodZvtxFT0vsPV(bool flag); + void SetRequireNoCollInTimeRangeStandard(bool flag); + void SetRequireNoCollInTimeRangeStrict(bool flag); + void SetRequireNoCollInITSROFStandard(bool flag); + void SetRequireNoCollInITSROFStrict(bool flag); + void SetRequireNoHighMultCollInPrevRof(bool flag); + void SetRequireGoodITSLayer3(bool flag); + void SetRequireGoodITSLayer0123(bool flag); + void SetRequireGoodITSLayersAll(bool flag); void SetRequireEMCReadoutInMB(bool flag); void SetRequireEMCHardwareTriggered(bool flag); private: + bool mRequireSel8{false}; + bool mRequireFT0AND{true}; + float mMinZvtx{-10.f}, mMaxZvtx{+10.f}; + bool mRequireNoTFB{false}; + bool mRequireNoITSROFB{false}; + bool mRequireNoSameBunchPileup{false}; + bool mRequireVertexITSTPC{false}; + bool mRequireVertexTOFmatched{false}; + bool mRequireGoodZvtxFT0vsPV{false}; + bool mRequireNoCollInTimeRangeStandard{false}; + bool mRequireNoCollInTimeRangeStrict{false}; + bool mRequireNoCollInITSROFStandard{false}; + bool mRequireNoCollInITSROFStrict{false}; + bool mRequireNoHighMultCollInPrevRof{false}; + bool mRequireGoodITSLayer3{false}; + bool mRequireGoodITSLayer0123{false}; + bool mRequireGoodITSLayersAll{false}; bool mRequireEMCReadoutInMB{false}; bool mRequireEMCHardwareTriggered{false}; diff --git a/PWGEM/PhotonMeson/Core/PhotonHBT.h b/PWGEM/PhotonMeson/Core/PhotonHBT.h index 08738ce8e07..060768cdfde 100644 --- a/PWGEM/PhotonMeson/Core/PhotonHBT.h +++ b/PWGEM/PhotonMeson/Core/PhotonHBT.h @@ -71,7 +71,7 @@ using namespace o2::soa; using namespace o2::aod::pwgem::dilepton::utils; using namespace o2::aod::pwgem::photon::core::photonhbt; -using MyCollisions = soa::Join; +using MyCollisions = soa::Join; using MyCollision = MyCollisions::iterator; using MyV0Photons = soa::Join; @@ -668,7 +668,7 @@ struct PhotonHBT { std::map, uint64_t> map_mixed_eventId_to_globalBC; SliceCache cache; - Preslice perCollision_pcm = aod::v0photonkf::emeventId; + Preslice perCollision_pcm = aod::v0photonkf::emphotoneventId; Filter collisionFilter_centrality = (cfgCentMin < o2::aod::cent::centFT0M && o2::aod::cent::centFT0M < cfgCentMax) || (cfgCentMin < o2::aod::cent::centFT0A && o2::aod::cent::centFT0A < cfgCentMax) || (cfgCentMin < o2::aod::cent::centFT0C && o2::aod::cent::centFT0C < cfgCentMax); Filter collisionFilter_occupancy_track = eventcuts.cfgTrackOccupancyMin <= o2::aod::evsel::trackOccupancyInTimeRange && o2::aod::evsel::trackOccupancyInTimeRange < eventcuts.cfgTrackOccupancyMax; diff --git a/PWGEM/PhotonMeson/Core/Pi0EtaToGammaGamma.h b/PWGEM/PhotonMeson/Core/Pi0EtaToGammaGamma.h index 83e934bbdd0..965d88ddcc0 100644 --- a/PWGEM/PhotonMeson/Core/Pi0EtaToGammaGamma.h +++ b/PWGEM/PhotonMeson/Core/Pi0EtaToGammaGamma.h @@ -226,16 +226,16 @@ struct Pi0EtaToGammaGamma { //--------------------------------------------------------------------------- // Preslices and partitions o2::framework::SliceCache cache; - o2::framework::PresliceOptional>> perCollision_pcm = o2::aod::v0photonkf::emeventId; - o2::framework::PresliceOptional> perCollision_emc = o2::aod::emccluster::emeventId; - o2::framework::PresliceOptional> perCollision_phos = o2::aod::phoscluster::emeventId; - o2::framework::PresliceOptional>> perCollision_electron = o2::aod::emprimaryelectron::emeventId; + o2::framework::PresliceOptional>> perCollision_pcm = o2::aod::v0photonkf::emphotoneventId; + o2::framework::PresliceOptional> perCollision_emc = o2::aod::emccluster::emphotoneventId; + o2::framework::PresliceOptional> perCollision_phos = o2::aod::phoscluster::emphotoneventId; + o2::framework::PresliceOptional>> perCollision_electron = o2::aod::emprimaryelectronda::emphotoneventId; o2::framework::PresliceOptional perEMCClusterMT = o2::aod::trackmatching::emEmcClusterId; o2::framework::PresliceOptional perEMCClusterMS = o2::aod::trackmatching::emEmcClusterId; - o2::framework::Partition>> positrons = o2::aod::emprimaryelectron::sign > int8_t(0) && dileptoncuts.cfg_min_pt_track < o2::aod::track::pt&& nabs(o2::aod::track::eta) < dileptoncuts.cfg_max_eta_track; - o2::framework::Partition>> electrons = o2::aod::emprimaryelectron::sign < int8_t(0) && dileptoncuts.cfg_min_pt_track < o2::aod::track::pt && nabs(o2::aod::track::eta) < dileptoncuts.cfg_max_eta_track; + o2::framework::Partition>> positrons = o2::aod::emprimaryelectron::sign > int8_t(0) && dileptoncuts.cfg_min_pt_track < o2::aod::track::pt&& nabs(o2::aod::track::eta) < dileptoncuts.cfg_max_eta_track; + o2::framework::Partition>> electrons = o2::aod::emprimaryelectron::sign < int8_t(0) && dileptoncuts.cfg_min_pt_track < o2::aod::track::pt && nabs(o2::aod::track::eta) < dileptoncuts.cfg_max_eta_track; o2::aod::pwgem::dilepton::utils::EventMixingHandler, std::pair, o2::aod::pwgem::dilepton::utils::EMTrack>* emh1 = nullptr; o2::aod::pwgem::dilepton::utils::EventMixingHandler, std::pair, o2::aod::pwgem::dilepton::utils::EMTrack>* emh2 = nullptr; @@ -262,7 +262,7 @@ struct Pi0EtaToGammaGamma { static auto& perCollision() { - static auto slice{o2::aod::v0photonkf::emeventId}; + static auto slice{o2::aod::v0photonkf::emphotoneventId}; return slice; } @@ -283,7 +283,7 @@ struct Pi0EtaToGammaGamma { static auto& perCollision() { - static auto slice{o2::aod::emccluster::emeventId}; + static auto slice{o2::aod::emccluster::emphotoneventId}; return slice; } @@ -317,7 +317,7 @@ struct Pi0EtaToGammaGamma { static auto& perCollision() { - static auto slice{o2::aod::phoscluster::emeventId}; + static auto slice{o2::aod::phoscluster::emphotoneventId}; return slice; } @@ -338,7 +338,7 @@ struct Pi0EtaToGammaGamma { static auto& perCollision() { - static auto slice{o2::aod::emprimaryelectron::emeventId}; + static auto slice{o2::aod::emprimaryelectronda::emphotoneventId}; return slice; } @@ -709,7 +709,7 @@ struct Pi0EtaToGammaGamma { } float weight = 1.f; - if constexpr (std::is_same_v, o2::soa::Filtered, o2::aod::EMEventsWeight>>>) { + if constexpr (std::is_same_v, o2::soa::Filtered, o2::aod::EMEventsWeight>>>) { weight = collision.weight(); } @@ -776,8 +776,8 @@ struct Pi0EtaToGammaGamma { if constexpr (pairtype == o2::aod::pwgem::photonmeson::photonpair::PairType::kPCMDalitzEE) { auto photons1_per_collision = photons1.sliceByCached(TDetectorTag1::perCollision(), collision.globalIndex(), cache); - auto positrons_per_collision = positrons->sliceByCached(o2::aod::emprimaryelectron::emeventId, collision.globalIndex(), cache); - auto electrons_per_collision = electrons->sliceByCached(o2::aod::emprimaryelectron::emeventId, collision.globalIndex(), cache); + auto positrons_per_collision = positrons->sliceByCached(o2::aod::emprimaryelectronda::emphotoneventId, collision.globalIndex(), cache); + auto electrons_per_collision = electrons->sliceByCached(o2::aod::emprimaryelectronda::emphotoneventId, collision.globalIndex(), cache); for (const auto& g1 : photons1_per_collision) { if constexpr (std::is_same_v) { @@ -1024,13 +1024,13 @@ struct Pi0EtaToGammaGamma { o2::framework::expressions::Filter collisionFilter_occupancy_track = eventcuts.cfgTrackOccupancyMin <= o2::aod::evsel::trackOccupancyInTimeRange && o2::aod::evsel::trackOccupancyInTimeRange < eventcuts.cfgTrackOccupancyMax; o2::framework::expressions::Filter collisionFilter_occupancy_ft0c = eventcuts.cfgFT0COccupancyMin <= o2::aod::evsel::ft0cOccupancyInTimeRange && o2::aod::evsel::ft0cOccupancyInTimeRange < eventcuts.cfgFT0COccupancyMax; o2::framework::expressions::Filter collisionFilter_centrality = (cfgCentMin < o2::aod::cent::centFT0M && o2::aod::cent::centFT0M < cfgCentMax) || (cfgCentMin < o2::aod::cent::centFT0A && o2::aod::cent::centFT0A < cfgCentMax) || (cfgCentMin < o2::aod::cent::centFT0C && o2::aod::cent::centFT0C < cfgCentMax); - // using FilteredMyCollisions = o2::soa::Filtered>; + // using FilteredMyCollisions = o2::soa::Filtered>; o2::framework::expressions::Filter prefilter_pcm = ifnode(pcmcuts.cfg_apply_cuts_from_prefilter_derived.node(), o2::aod::v0photonkf::pfbderived == static_cast(0), true); o2::framework::expressions::Filter prefilter_primaryelectron = ifnode(dileptoncuts.cfg_apply_cuts_from_prefilter_derived.node(), o2::aod::emprimaryelectron::pfbderived == static_cast(0), true); int ndf = 0; - void processAnalysis(o2::soa::Filtered> const& collisions, Types const&... args) + void processAnalysis(o2::soa::Filtered> const& collisions, Types const&... args) { // LOGF(info, "ndf = %d", ndf); if constexpr (pairtype == o2::aod::pwgem::photonmeson::photonpair::PairType::kPCMPCM) { @@ -1066,8 +1066,8 @@ struct Pi0EtaToGammaGamma { } PROCESS_SWITCH(Pi0EtaToGammaGamma, processAnalysis, "process pair analysis", true); - // using FilteredMyCollisionsWithJJMC = o2::soa::Filtered, o2::aod::EMEventsWeight>>; - void processAnalysisJJMC(o2::soa::Filtered, o2::aod::EMEventsWeight>> const& collisions, Types const&... args) + // using FilteredMyCollisionsWithJJMC = o2::soa::Filtered, o2::aod::EMEventsWeight>>; + void processAnalysisJJMC(o2::soa::Filtered, o2::aod::EMEventsWeight>> const& collisions, Types const&... args) { // LOGF(info, "ndf = %d", ndf); if constexpr (pairtype == o2::aod::pwgem::photonmeson::photonpair::PairType::kPCMPCM) { diff --git a/PWGEM/PhotonMeson/Core/Pi0EtaToGammaGammaMC.h b/PWGEM/PhotonMeson/Core/Pi0EtaToGammaGammaMC.h index 729f76ce5de..a67295b4227 100644 --- a/PWGEM/PhotonMeson/Core/Pi0EtaToGammaGammaMC.h +++ b/PWGEM/PhotonMeson/Core/Pi0EtaToGammaGammaMC.h @@ -423,16 +423,16 @@ struct Pi0EtaToGammaGammaMC { } o2::framework::SliceCache cache; - o2::framework::PresliceOptional>> perCollision_pcm = o2::aod::v0photonkf::emeventId; - o2::framework::PresliceOptional> perCollision_emc = o2::aod::emccluster::emeventId; - o2::framework::PresliceOptional> perCollision_phos = o2::aod::phoscluster::emeventId; - o2::framework::PresliceOptional>> perCollision_electron = o2::aod::emprimaryelectron::emeventId; + o2::framework::PresliceOptional>> perCollision_pcm = o2::aod::v0photonkf::emphotoneventId; + o2::framework::PresliceOptional> perCollision_emc = o2::aod::emccluster::emphotoneventId; + o2::framework::PresliceOptional> perCollision_phos = o2::aod::phoscluster::emphotoneventId; + o2::framework::PresliceOptional>> perCollision_electron = o2::aod::emprimaryelectronda::emphotoneventId; o2::framework::PresliceOptional perEMCClusterMT = o2::aod::trackmatching::emEmcClusterId; o2::framework::PresliceOptional perEMCClusterMS = o2::aod::trackmatching::emEmcClusterId; - o2::framework::Partition>> positrons = o2::aod::emprimaryelectron::sign > int8_t(0) && dileptoncuts.cfg_min_pt_track < o2::aod::track::pt&& nabs(o2::aod::track::eta) < dileptoncuts.cfg_max_eta_track; - o2::framework::Partition>> electrons = o2::aod::emprimaryelectron::sign < int8_t(0) && dileptoncuts.cfg_min_pt_track < o2::aod::track::pt && nabs(o2::aod::track::eta) < dileptoncuts.cfg_max_eta_track; + o2::framework::Partition>> positrons = o2::aod::emprimaryelectron::sign > int8_t(0) && dileptoncuts.cfg_min_pt_track < o2::aod::track::pt&& nabs(o2::aod::track::eta) < dileptoncuts.cfg_max_eta_track; + o2::framework::Partition>> electrons = o2::aod::emprimaryelectron::sign < int8_t(0) && dileptoncuts.cfg_min_pt_track < o2::aod::track::pt && nabs(o2::aod::track::eta) < dileptoncuts.cfg_max_eta_track; //--------------------------------------------------------------------------- // In the following are tags defined which help to select the correct preslice and cuts @@ -440,7 +440,7 @@ struct Pi0EtaToGammaGammaMC { static auto& perCollision() { - static auto slice{o2::aod::v0photonkf::emeventId}; + static auto slice{o2::aod::v0photonkf::emphotoneventId}; return slice; } @@ -461,7 +461,7 @@ struct Pi0EtaToGammaGammaMC { static auto& perCollision() { - static auto slice{o2::aod::emccluster::emeventId}; + static auto slice{o2::aod::emccluster::emphotoneventId}; return slice; } @@ -495,7 +495,7 @@ struct Pi0EtaToGammaGammaMC { static auto& perCollision() { - static auto slice{o2::aod::phoscluster::emeventId}; + static auto slice{o2::aod::phoscluster::emphotoneventId}; return slice; } @@ -515,7 +515,7 @@ struct Pi0EtaToGammaGammaMC { struct DalitzEETag { static auto& perCollision() { - static auto slice{o2::aod::emprimaryelectron::emeventId}; + static auto slice{o2::aod::emprimaryelectronda::emphotoneventId}; return slice; } @@ -566,7 +566,7 @@ struct Pi0EtaToGammaGammaMC { } float weight = 1.f; - if constexpr (std::is_same_v, o2::soa::Filtered, o2::aod::EMEventsWeight>>>) { + if constexpr (std::is_same_v, o2::soa::Filtered, o2::aod::EMEventsWeight>>>) { weight = collision.weight(); } @@ -703,8 +703,8 @@ struct Pi0EtaToGammaGammaMC { } else if constexpr (pairtype == o2::aod::pwgem::photonmeson::photonpair::PairType::kPCMDalitzEE) { auto photons1_per_collision = photons1.sliceByCached(TDetectorTag1::perCollision(), collision.globalIndex(), cache); - auto positrons_per_collision = positrons->sliceByCached(o2::aod::emprimaryelectron::emeventId, collision.globalIndex(), cache); - auto electrons_per_collision = electrons->sliceByCached(o2::aod::emprimaryelectron::emeventId, collision.globalIndex(), cache); + auto positrons_per_collision = positrons->sliceByCached(o2::aod::emprimaryelectronda::emphotoneventId, collision.globalIndex(), cache); + auto electrons_per_collision = electrons->sliceByCached(o2::aod::emprimaryelectronda::emphotoneventId, collision.globalIndex(), cache); for (const auto& g1 : photons1_per_collision) { if constexpr (std::is_same_v) { @@ -851,7 +851,7 @@ struct Pi0EtaToGammaGammaMC { } o2::framework::PresliceUnsorted perMcCollision = o2::aod::emmcparticle::emmceventId; - o2::framework::PresliceUnsorted> rec_perMcCollision = o2::aod::emmceventlabel::emmceventId; + o2::framework::PresliceUnsorted> rec_perMcCollision = o2::aod::emmceventlabel::emmceventId; template void runGenInfo(TCollisions const& collisions, TMCCollisions const& mccollisions, TMCParticles const& /*mcparticles*/) @@ -871,7 +871,7 @@ struct Pi0EtaToGammaGammaMC { } float weight = 1.f; - if constexpr (std::is_same_v, o2::soa::Filtered, o2::aod::EMEventsWeight>>>) { + if constexpr (std::is_same_v, o2::soa::Filtered, o2::aod::EMEventsWeight>>>) { weight = collision.weight(); } @@ -899,12 +899,12 @@ struct Pi0EtaToGammaGammaMC { o2::framework::expressions::Filter collisionFilter_occupancy_track = eventcuts.cfgTrackOccupancyMin <= o2::aod::evsel::trackOccupancyInTimeRange && o2::aod::evsel::trackOccupancyInTimeRange < eventcuts.cfgTrackOccupancyMax; o2::framework::expressions::Filter collisionFilter_occupancy_ft0c = eventcuts.cfgFT0COccupancyMin <= o2::aod::evsel::ft0cOccupancyInTimeRange && o2::aod::evsel::ft0cOccupancyInTimeRange < eventcuts.cfgFT0COccupancyMax; o2::framework::expressions::Filter collisionFilter_centrality = (cfgCentMin < o2::aod::cent::centFT0M && o2::aod::cent::centFT0M < cfgCentMax) || (cfgCentMin < o2::aod::cent::centFT0A && o2::aod::cent::centFT0A < cfgCentMax) || (cfgCentMin < o2::aod::cent::centFT0C && o2::aod::cent::centFT0C < cfgCentMax); - // using FilteredMyCollisions = o2::soa::Filtered>; + // using FilteredMyCollisions = o2::soa::Filtered>; o2::framework::expressions::Filter prefilter_pcm = ifnode(pcmcuts.cfg_apply_cuts_from_prefilter_derived.node(), o2::aod::v0photonkf::pfbderived == static_cast(0), true); o2::framework::expressions::Filter prefilter_primaryelectron = ifnode(dileptoncuts.cfg_apply_cuts_from_prefilter_derived.node(), o2::aod::emprimaryelectron::pfbderived == static_cast(0), true); - void processAnalysis(o2::soa::Filtered> const& collisions, o2::soa::Join const& mccollisions, o2::aod::EMMCParticles const& mcparticles, Types const&... args) + void processAnalysis(o2::soa::Filtered> const& collisions, o2::soa::Join const& mccollisions, o2::aod::EMMCParticles const& mcparticles, Types const&... args) { if constexpr (pairtype == o2::aod::pwgem::photonmeson::photonpair::PairType::kPCMPCM) { auto&& [v0photons, v0legs] = std::forward_as_tuple(args...); @@ -939,8 +939,8 @@ struct Pi0EtaToGammaGammaMC { } PROCESS_SWITCH(Pi0EtaToGammaGammaMC, processAnalysis, "process pair analysis", true); - // using FilteredMyCollisionsWithJJMC = o2::soa::Filtered, aod::EMEventsWeight>>; - void processAnalysisJJMC(o2::soa::Filtered, o2::aod::EMEventsWeight>> const& collisions, o2::soa::Join const& mccollisions, o2::aod::EMMCParticles const& mcparticles, Types const&... args) + // using FilteredMyCollisionsWithJJMC = o2::soa::Filtered, aod::EMEventsWeight>>; + void processAnalysisJJMC(o2::soa::Filtered, o2::aod::EMEventsWeight>> const& collisions, o2::soa::Join const& mccollisions, o2::aod::EMMCParticles const& mcparticles, Types const&... args) { if constexpr (pairtype == o2::aod::pwgem::photonmeson::photonpair::PairType::kPCMPCM) { auto&& [v0photons, v0legs] = std::forward_as_tuple(args...); diff --git a/PWGEM/PhotonMeson/Core/TaggingPi0.h b/PWGEM/PhotonMeson/Core/TaggingPi0.h index 681b9d9938d..4dd43e290bf 100644 --- a/PWGEM/PhotonMeson/Core/TaggingPi0.h +++ b/PWGEM/PhotonMeson/Core/TaggingPi0.h @@ -21,7 +21,7 @@ #include "PWGEM/PhotonMeson/Core/DalitzEECut.h" #include "PWGEM/PhotonMeson/Core/EMCPhotonCut.h" #include "PWGEM/PhotonMeson/Core/EMPhotonEventCut.h" -#include "PWGEM/PhotonMeson/Core/PHOSPhotonCut.h" +// #include "PWGEM/PhotonMeson/Core/PHOSPhotonCut.h" #include "PWGEM/PhotonMeson/Core/V0PhotonCut.h" #include "PWGEM/PhotonMeson/DataModel/gammaTables.h" #include "PWGEM/PhotonMeson/Utils/EventHistograms.h" @@ -73,7 +73,7 @@ using namespace o2::aod::pwgem::photon; using namespace o2::aod::pwgem::dilepton::utils::emtrackutil; using namespace o2::aod::pwgem::dilepton::utils; -using MyCollisions = soa::Join; +using MyCollisions = soa::Join; using MyCollision = MyCollisions::iterator; using MyCollisionsWithJJMC = soa::Join; @@ -82,14 +82,14 @@ using MyCollisionWithJJMC = MyCollisionsWithJJMC::iterator; using MyV0Photons = soa::Join; using MyV0Photon = MyV0Photons::iterator; -using MyPrimaryElectrons = soa::Join; +using MyPrimaryElectrons = soa::Join; using MyPrimaryElectron = MyPrimaryElectrons::iterator; using MyEMCClusters = soa::Join; using MyEMCCluster = MyEMCClusters::iterator; -using MyPHOSClusters = soa::Join; -using MyPHOSCluster = MyPHOSClusters::iterator; +// using MyPHOSClusters = soa::Join; +// using MyPHOSCluster = MyPHOSClusters::iterator; template struct TaggingPi0 { @@ -213,11 +213,11 @@ struct TaggingPi0 { Configurable cfgDistanceToEdge{"cfgDistanceToEdge", 1, "Distance to edge in cells required for rotated cluster to be accepted"}; } emccuts; - PHOSPhotonCut fPHOSCut; - struct : ConfigurableGroup { - std::string prefix = "phoscut_group"; - Configurable cfg_min_Ecluster{"cfg_min_Ecluster", 0.3, "Minimum cluster energy for PHOS in GeV"}; - } phoscuts; + // PHOSPhotonCut fPHOSCut; + // struct : ConfigurableGroup { + // std::string prefix = "phoscut_group"; + // Configurable cfg_min_Ecluster{"cfg_min_Ecluster", 0.3, "Minimum cluster energy for PHOS in GeV"}; + // } phoscuts; HistogramRegistry fRegistry{"output", {}, OutputObjHandlingPolicy::AnalysisObject, false, false}; static constexpr std::string_view event_types[2] = {"before/", "after/"}; @@ -258,7 +258,7 @@ struct TaggingPi0 { DefinePCMCut(); DefineDileptonCut(); DefineEMCCut(); - DefinePHOSCut(); + // DefinePHOSCut(); mRunNumber = 0; d_bz = 0; @@ -436,17 +436,17 @@ struct TaggingPi0 { fEMCCut.SetUseExoticCut(emccuts.EMC_UseExoticCut); } - void DefinePHOSCut() - { - fPHOSCut.SetEnergyRange(phoscuts.cfg_min_Ecluster, 1e+10); - } + // void DefinePHOSCut() + // { + // fPHOSCut.SetEnergyRange(phoscuts.cfg_min_Ecluster, 1e+10); + // } SliceCache cache; - Preslice perCollision_pcm = aod::v0photonkf::emeventId; - Preslice perCollision_emc = aod::emccluster::emeventId; - Preslice perCollision_phos = aod::phoscluster::emeventId; + Preslice perCollision_pcm = aod::v0photonkf::emphotoneventId; + Preslice perCollision_emc = aod::emccluster::emphotoneventId; + // Preslice perCollision_phos = aod::phoscluster::emphotoneventId; - Preslice perCollision_electron = aod::emprimaryelectron::emeventId; + Preslice perCollision_electron = aod::emprimaryelectronda::emphotoneventId; Partition positrons = o2::aod::emprimaryelectron::sign > int8_t(0) && static_cast(dileptoncuts.cfg_min_pt_track) < o2::aod::track::pt&& nabs(o2::aod::track::eta) < static_cast(dileptoncuts.cfg_max_eta_track) && static_cast(dileptoncuts.cfg_min_TPCNsigmaEl) < o2::aod::pidtpc::tpcNSigmaEl&& o2::aod::pidtpc::tpcNSigmaEl < static_cast(dileptoncuts.cfg_max_TPCNsigmaEl); Partition electrons = o2::aod::emprimaryelectron::sign < int8_t(0) && static_cast(dileptoncuts.cfg_min_pt_track) < o2::aod::track::pt && nabs(o2::aod::track::eta) < static_cast(dileptoncuts.cfg_max_eta_track) && static_cast(dileptoncuts.cfg_min_TPCNsigmaEl) < o2::aod::pidtpc::tpcNSigmaEl && o2::aod::pidtpc::tpcNSigmaEl < static_cast(dileptoncuts.cfg_max_TPCNsigmaEl); @@ -535,8 +535,8 @@ struct TaggingPi0 { if constexpr (pairtype == PairType::kPCMDalitzEE) { auto photons1_per_collision = photons1.sliceBy(perCollision1, collision.globalIndex()); // PCM - auto positrons_per_collision = positrons->sliceByCached(o2::aod::emprimaryelectron::emeventId, collision.globalIndex(), cache); // positrons - auto electrons_per_collision = electrons->sliceByCached(o2::aod::emprimaryelectron::emeventId, collision.globalIndex(), cache); // electrons + auto positrons_per_collision = positrons->sliceByCached(o2::aod::emprimaryelectronda::emphotoneventId, collision.globalIndex(), cache); // positrons + auto electrons_per_collision = electrons->sliceByCached(o2::aod::emprimaryelectronda::emphotoneventId, collision.globalIndex(), cache); // electrons for (const auto& g1 : photons1_per_collision) { if (!cut1.template IsSelected(g1)) { diff --git a/PWGEM/PhotonMeson/Core/TaggingPi0MC.h b/PWGEM/PhotonMeson/Core/TaggingPi0MC.h index fb9ba22d87f..38d7a8e70d3 100644 --- a/PWGEM/PhotonMeson/Core/TaggingPi0MC.h +++ b/PWGEM/PhotonMeson/Core/TaggingPi0MC.h @@ -21,7 +21,7 @@ #include "PWGEM/PhotonMeson/Core/DalitzEECut.h" #include "PWGEM/PhotonMeson/Core/EMCPhotonCut.h" #include "PWGEM/PhotonMeson/Core/EMPhotonEventCut.h" -#include "PWGEM/PhotonMeson/Core/PHOSPhotonCut.h" +// #include "PWGEM/PhotonMeson/Core/PHOSPhotonCut.h" #include "PWGEM/PhotonMeson/Core/V0PhotonCut.h" #include "PWGEM/PhotonMeson/DataModel/gammaTables.h" #include "PWGEM/PhotonMeson/Utils/EventHistograms.h" @@ -70,7 +70,7 @@ using namespace o2::aod::pwgem::photonmeson::photonpair; using namespace o2::aod::pwgem::photonmeson::utils::mcutil; using namespace o2::aod::pwgem::dilepton::utils::mcutil; -using MyCollisions = soa::Join; +using MyCollisions = soa::Join; using MyCollision = MyCollisions::iterator; using MyCollisionsWithJJMC = soa::Join; @@ -85,13 +85,13 @@ using MyV0Photon = MyV0Photons::iterator; using MyEMCClusters = soa::Join; using MyEMCCluster = MyEMCClusters::iterator; -using MyPHOSClusters = soa::Join; -using MyPHOSCluster = MyEMCClusters::iterator; +// using MyPHOSClusters = soa::Join; +// using MyPHOSCluster = MyEMCClusters::iterator; using MyMCV0Legs = soa::Join; using MyMCV0Leg = MyMCV0Legs::iterator; -using MyMCElectrons = soa::Join; +using MyMCElectrons = soa::Join; using MyMCElectron = MyMCElectrons::iterator; template @@ -210,11 +210,11 @@ struct TaggingPi0MC { Configurable EMC_UseExoticCut{"EMC_UseExoticCut", true, "FLag to use the EMCal exotic cluster cut"}; } emccuts; - PHOSPhotonCut fPHOSCut; - struct : ConfigurableGroup { - std::string prefix = "phoscut_group"; - Configurable cfg_min_Ecluster{"cfg_min_Ecluster", 0.3, "Minimum cluster energy for PHOS in GeV"}; - } phoscuts; + // PHOSPhotonCut fPHOSCut; + // struct : ConfigurableGroup { + // std::string prefix = "phoscut_group"; + // Configurable cfg_min_Ecluster{"cfg_min_Ecluster", 0.3, "Minimum cluster energy for PHOS in GeV"}; + // } phoscuts; HistogramRegistry fRegistry{"output", {}, OutputObjHandlingPolicy::AnalysisObject, false, false}; static constexpr std::string_view event_types[2] = {"before/", "after/"}; @@ -235,7 +235,7 @@ struct TaggingPi0MC { DefinePCMCut(); DefineDileptonCut(); DefineEMCCut(); - DefinePHOSCut(); + // DefinePHOSCut(); mRunNumber = 0; d_bz = 0; @@ -412,17 +412,17 @@ struct TaggingPi0MC { fEMCCut.SetUseExoticCut(emccuts.EMC_UseExoticCut); } - void DefinePHOSCut() - { - fPHOSCut.SetEnergyRange(phoscuts.cfg_min_Ecluster, 1e+10); - } + // void DefinePHOSCut() + // { + // fPHOSCut.SetEnergyRange(phoscuts.cfg_min_Ecluster, 1e+10); + // } SliceCache cache; - Preslice perCollision_pcm = aod::v0photonkf::emeventId; - Preslice perCollision_emc = aod::emccluster::emeventId; - Preslice perCollision_phos = aod::phoscluster::emeventId; + Preslice perCollision_pcm = aod::v0photonkf::emphotoneventId; + Preslice perCollision_emc = aod::emccluster::emphotoneventId; + // Preslice perCollision_phos = aod::phoscluster::emphotoneventId; - Preslice perCollision_electron = aod::emprimaryelectron::emeventId; + Preslice perCollision_electron = aod::emprimaryelectronda::emphotoneventId; Partition positrons = o2::aod::emprimaryelectron::sign > int8_t(0) && static_cast(dileptoncuts.cfg_min_pt_track) < o2::aod::track::pt&& nabs(o2::aod::track::eta) < static_cast(dileptoncuts.cfg_max_eta_track) && static_cast(dileptoncuts.cfg_min_TPCNsigmaEl) < o2::aod::pidtpc::tpcNSigmaEl&& o2::aod::pidtpc::tpcNSigmaEl < static_cast(dileptoncuts.cfg_max_TPCNsigmaEl); Partition electrons = o2::aod::emprimaryelectron::sign < int8_t(0) && static_cast(dileptoncuts.cfg_min_pt_track) < o2::aod::track::pt && nabs(o2::aod::track::eta) < static_cast(dileptoncuts.cfg_max_eta_track) && static_cast(dileptoncuts.cfg_min_TPCNsigmaEl) < o2::aod::pidtpc::tpcNSigmaEl && o2::aod::pidtpc::tpcNSigmaEl < static_cast(dileptoncuts.cfg_max_TPCNsigmaEl); @@ -461,8 +461,8 @@ struct TaggingPi0MC { if constexpr (pairtype == PairType::kPCMDalitzEE) { auto photons1_per_collision = photons1.sliceBy(perCollision1, collision.globalIndex()); - auto positrons_per_collision = positrons->sliceByCached(o2::aod::emprimaryelectron::emeventId, collision.globalIndex(), cache); - auto electrons_per_collision = electrons->sliceByCached(o2::aod::emprimaryelectron::emeventId, collision.globalIndex(), cache); + auto positrons_per_collision = positrons->sliceByCached(o2::aod::emprimaryelectronda::emphotoneventId, collision.globalIndex(), cache); + auto electrons_per_collision = electrons->sliceByCached(o2::aod::emprimaryelectronda::emphotoneventId, collision.globalIndex(), cache); for (const auto& g1 : photons1_per_collision) { if (!cut1.template IsSelected(g1)) { diff --git a/PWGEM/PhotonMeson/Core/V0PhotonCut.h b/PWGEM/PhotonMeson/Core/V0PhotonCut.h index 7f5ecaecb64..1be295b3235 100644 --- a/PWGEM/PhotonMeson/Core/V0PhotonCut.h +++ b/PWGEM/PhotonMeson/Core/V0PhotonCut.h @@ -367,10 +367,10 @@ class V0PhotonCut : public TNamed const bool doQA = mDoQA && fRegistry != nullptr; uint nTotV0PerColl = 0; - currentCollID = v0s.iteratorAt(0).emeventId(); + currentCollID = v0s.iteratorAt(0).emphotoneventId(); for (const auto& v0 : v0s) { - const auto collID = v0.emeventId(); + const auto collID = v0.emphotoneventId(); if (!IsSelected(v0, fRegistry)) { flags.set(iV0); } @@ -604,7 +604,7 @@ class V0PhotonCut : public TNamed } if (doQA) { fillAfterPhotonHistogram(v0, pos, ele, fRegistry); - if (v0.emeventId() != currentCollID) { + if (v0.emphotoneventId() != currentCollID) { fRegistry->fill(HIST("QA/V0Photon/after/hNgamma"), nAccV0PerColl); nAccV0PerColl = 0; } diff --git a/PWGEM/PhotonMeson/DataModel/gammaTables.h b/PWGEM/PhotonMeson/DataModel/gammaTables.h index f840f771db1..9b680aed2c9 100644 --- a/PWGEM/PhotonMeson/DataModel/gammaTables.h +++ b/PWGEM/PhotonMeson/DataModel/gammaTables.h @@ -36,6 +36,9 @@ namespace o2::aod { +using EMPhotonEvents = EMEvents_004; +using EMPhotonEvent = EMPhotonEvents::iterator; + namespace emmcbinnedgen { DECLARE_SOA_COLUMN(GeneratedGamma, generatedGamma, std::vector); //! gamma binned generated data @@ -263,6 +266,7 @@ using EMEventWeight = EMEventsWeight::iterator; namespace v0photonkf { DECLARE_SOA_INDEX_COLUMN(EMEvent, emevent); //! +DECLARE_SOA_INDEX_COLUMN(EMPhotonEvent, emphotonevent); //! DECLARE_SOA_COLUMN(CollisionId, collisionId, int); //! DECLARE_SOA_COLUMN(V0Id, v0Id, int); //! DECLARE_SOA_INDEX_COLUMN_FULL(PosTrack, posTrack, int, V0Legs, "_Pos"); //! @@ -341,8 +345,9 @@ using V0PhotonsKF = V0PhotonsKF_001; // iterators using V0PhotonKF = V0PhotonsKF::iterator; -DECLARE_SOA_TABLE(V0KFEMEventIds, "AOD", "V0KFEMEVENTID", v0photonkf::EMEventId); // To be joined with V0PhotonsKF table at analysis level. -// iterators +DECLARE_SOA_TABLE(V0KFEMEventIds_000, "AOD", "V0KFEMEVENTID", v0photonkf::EMEventId); // To be joined with V0PhotonsKF table at analysis level. +DECLARE_SOA_TABLE_VERSIONED(V0KFEMEventIds_001, "AOD", "V0KFEMEVENTID", 1, v0photonkf::EMPhotonEventId); // To be joined with V0PhotonsKF table at analysis level. +using V0KFEMEventIds = V0KFEMEventIds_001; using V0KFEMEventId = V0KFEMEventIds::iterator; DECLARE_SOA_TABLE(V0PhotonsKFCov, "AOD", "V0PHOTONKFCOV", //! To be joined with V0PhotonsKF table at analysis level. @@ -416,9 +421,20 @@ using EMPrimaryElectronsFromDalitz = EMPrimaryElectronsFromDalitz_001; // iterators using EMPrimaryElectronFromDalitz = EMPrimaryElectronsFromDalitz::iterator; +namespace emprimaryelectronda +{ +DECLARE_SOA_INDEX_COLUMN(EMEvent, emevent); //! +DECLARE_SOA_INDEX_COLUMN(EMPhotonEvent, emphotonevent); //! +} // namespace emprimaryelectronda + +DECLARE_SOA_TABLE_VERSIONED(EMPrimaryElectronDaEMEventIds_001, "AOD", "PRMELDAEVENTID", 1, emprimaryelectronda::EMPhotonEventId); // To be joined with EMPrimaryElectronsFromDalitz table at analysis level. +using EMPrimaryElectronDaEMEventIds = EMPrimaryElectronDaEMEventIds_001; +using EMPrimaryElectronDaEMEventId = EMPrimaryElectronDaEMEventIds::iterator; + namespace v0photonsphivpsi { DECLARE_SOA_INDEX_COLUMN(EMEvent, emevent); //! +DECLARE_SOA_INDEX_COLUMN(EMPhotonEvent, emphotonevent); //! DECLARE_SOA_COLUMN(PhiV, phiv, float); //! DECLARE_SOA_COLUMN(PsiPair, psipair, float); } // namespace v0photonsphivpsi @@ -430,6 +446,7 @@ using V0PhotonsPhiVPsi = V0PhotonsPhiVPsi; namespace dalitzee { DECLARE_SOA_INDEX_COLUMN(EMEvent, emevent); //! +DECLARE_SOA_INDEX_COLUMN(EMPhotonEvent, emphotonevent); //! DECLARE_SOA_INDEX_COLUMN_FULL(PosTrack, posTrack, int, EMPrimaryElectrons, "_Pos"); //! DECLARE_SOA_INDEX_COLUMN_FULL(NegTrack, negTrack, int, EMPrimaryElectrons, "_Neg"); //! DECLARE_SOA_COLUMN(CollisionId, collisionId, int); //! @@ -458,6 +475,7 @@ using DalitzEEEMEventId = DalitzEEEMEventIds::iterator; namespace pwgem::photon::swtinfo { DECLARE_SOA_INDEX_COLUMN(EMEvent, emevent); //! +DECLARE_SOA_INDEX_COLUMN(EMPhotonEvent, emphotonevent); //! DECLARE_SOA_COLUMN(CollisionId, collisionId, int); //! DECLARE_SOA_INDEX_COLUMN_FULL(TriggerV0PhotonHighPt, triggerV0PhotonHighPt, int, V0PhotonsKF, "_TriggerV0PhotonHighPt"); //! high pT PCM trigger is fired by this v0 photon DECLARE_SOA_INDEX_COLUMN_FULL(TriggerV0PhotonPair, triggerV0PhotonPair, int, V0PhotonsKF, "_TriggerV0PhotonPair"); //! PCM+EE trigger is fired by this v0 photon and dielectron @@ -557,6 +575,7 @@ DECLARE_SOA_TABLE(McGammasTrue, "AOD", "MCGATRUE", namespace skimmedcluster { DECLARE_SOA_INDEX_COLUMN(EMEvent, emevent); //! +DECLARE_SOA_INDEX_COLUMN(EMPhotonEvent, emphotonevent); //! DECLARE_SOA_COLUMN(CollisionId, collisionId, int); //! DECLARE_SOA_COLUMN(ID, id, int); //! cluster ID identifying cluster in event DECLARE_SOA_COLUMN(E, e, float); //! cluster energy (GeV) @@ -573,6 +592,7 @@ DECLARE_SOA_COLUMN(NLM, nlm, int); //! numbe namespace emccluster { DECLARE_SOA_INDEX_COLUMN(EMEvent, emevent); //! +DECLARE_SOA_INDEX_COLUMN(EMPhotonEvent, emphotonevent); //! DECLARE_SOA_COLUMN(CoreEnergy, coreEnergy, float); //! cluster core energy (GeV) DECLARE_SOA_COLUMN(Time, time, float); //! cluster time (ns) DECLARE_SOA_COLUMN(IsExotic, isExotic, bool); //! flag to mark cluster as exotic @@ -629,13 +649,15 @@ DECLARE_SOA_TABLE(EmEmcMTracks, "AOD", "EMEMCMTRACK", //! DECLARE_SOA_TABLE(EmEmcMSTracks, "AOD", "EMEMCMSTRACK", //! trackmatching::EmEmcClusterId, emctm::DeltaPhi, emctm::DeltaEta, emctm::TrackP, emctm::TrackPt); -DECLARE_SOA_TABLE(EMCEMEventIds, "AOD", "EMCEMEVENTID", emccluster::EMEventId); // To be joined with SkimEMCClusters table at analysis level. -// iterators +DECLARE_SOA_TABLE(EMCEMEventIds_000, "AOD", "EMCEMEVENTID", emccluster::EMEventId); // To be joined with SkimEMCClusters table at analysis level. +DECLARE_SOA_TABLE_VERSIONED(EMCEMEventIds_001, "AOD", "EMCEMEVENTID", 1, emccluster::EMPhotonEventId); // To be joined with SkimEMCClusters table at analysis level. +using EMCEMEventIds = EMCEMEventIds_001; using EMCEMEventId = EMCEMEventIds::iterator; namespace phoscluster { DECLARE_SOA_INDEX_COLUMN(EMEvent, emevent); //! +DECLARE_SOA_INDEX_COLUMN(EMPhotonEvent, emphotonevent); //! DECLARE_SOA_INDEX_COLUMN_FULL(MatchedTrack, matchedTrack, int, Tracks, "_Matched"); //! matched track index DECLARE_SOA_COLUMN(X, x, float); //! cluster hit position in ALICE global coordinate DECLARE_SOA_COLUMN(Y, y, float); //! cluster hit position in ALICE global coordinate @@ -670,8 +692,9 @@ DECLARE_SOA_TABLE(PHOSClusters, "AOD", "PHOSCLUSTERS", //! phoscluster::Phi); using PHOSCluster = PHOSClusters::iterator; -DECLARE_SOA_TABLE(PHOSEMEventIds, "AOD", "PHOSEMEVENTID", phoscluster::EMEventId); // To be joined with PHOSClusters table at analysis level. -// iterators +DECLARE_SOA_TABLE(PHOSEMEventIds_000, "AOD", "PHOSEMEVENTID", phoscluster::EMEventId); // To be joined with PHOSClusters table at analysis level. +DECLARE_SOA_TABLE_VERSIONED(PHOSEMEventIds_001, "AOD", "PHOSEMEVENTID", 1, phoscluster::EMPhotonEventId); // To be joined with PHOSClusters table at analysis level. +using PHOSEMEventIds = PHOSEMEventIds_001; using PHOSEMEventId = PHOSEMEventIds::iterator; namespace caloextra diff --git a/PWGEM/PhotonMeson/TableProducer/CMakeLists.txt b/PWGEM/PhotonMeson/TableProducer/CMakeLists.txt index 1e9c99c1cd5..20db3ba057e 100644 --- a/PWGEM/PhotonMeson/TableProducer/CMakeLists.txt +++ b/PWGEM/PhotonMeson/TableProducer/CMakeLists.txt @@ -9,6 +9,8 @@ # granted to it by virtue of its status as an Intergovernmental Organization # or submit itself to any jurisdiction. +add_subdirectory(Converters) + o2physics_add_dpl_workflow(skimmer-gamma-conversion SOURCES skimmerGammaConversion.cxx PUBLIC_LINK_LIBRARIES O2::Framework O2::DCAFitter O2Physics::AnalysisCore KFParticle::KFParticle diff --git a/PWGEM/PhotonMeson/TableProducer/Converters/CMakeLists.txt b/PWGEM/PhotonMeson/TableProducer/Converters/CMakeLists.txt new file mode 100644 index 00000000000..8ee98eb4d36 --- /dev/null +++ b/PWGEM/PhotonMeson/TableProducer/Converters/CMakeLists.txt @@ -0,0 +1,27 @@ +# Copyright 2019-2020 CERN and copyright holders of ALICE O2. +# See https://alice-o2.web.cern.ch/copyright for details of the copyright holders. +# All rights not expressly granted are reserved. +# +# This software is distributed under the terms of the GNU General Public +# License v3 (GPL Version 3), copied verbatim in the file "COPYING". +# +# In applying this license CERN does not waive the privileges and immunities +# granted to it by virtue of its status as an Intergovernmental Organization +# or submit itself to any jurisdiction. + + +o2physics_add_dpl_workflow(v0photonid-converter1 + SOURCES v0photonIdConverter1.cxx + PUBLIC_LINK_LIBRARIES O2::Framework O2Physics::AnalysisCore + COMPONENT_NAME Analysis) + +o2physics_add_dpl_workflow(emcid-converter1 + SOURCES emcIdConverter1.cxx + PUBLIC_LINK_LIBRARIES O2::Framework O2Physics::AnalysisCore + COMPONENT_NAME Analysis) + +o2physics_add_dpl_workflow(phosid-converter1 + SOURCES phosIdConverter1.cxx + PUBLIC_LINK_LIBRARIES O2::Framework O2Physics::AnalysisCore + COMPONENT_NAME Analysis) + diff --git a/PWGEM/PhotonMeson/Tasks/diphotonHadronMPCPCMPCM.cxx b/PWGEM/PhotonMeson/TableProducer/Converters/emcIdConverter1.cxx similarity index 63% rename from PWGEM/PhotonMeson/Tasks/diphotonHadronMPCPCMPCM.cxx rename to PWGEM/PhotonMeson/TableProducer/Converters/emcIdConverter1.cxx index 6f0dfff7c2f..bdfa1aac27c 100644 --- a/PWGEM/PhotonMeson/Tasks/diphotonHadronMPCPCMPCM.cxx +++ b/PWGEM/PhotonMeson/TableProducer/Converters/emcIdConverter1.cxx @@ -8,27 +8,31 @@ // In applying this license CERN does not waive the privileges and immunities // granted to it by virtue of its status as an Intergovernmental Organization // or submit itself to any jurisdiction. -// -// ======================== -// -// This code loops over photons and makes pairs for neutral mesons analyses. -// Please write to: daiki.sekihata@cern.ch -#include "PWGEM/PhotonMeson/Core/DiphotonHadronMPC.h" #include "PWGEM/PhotonMeson/DataModel/gammaTables.h" -#include "PWGEM/PhotonMeson/Utils/PairUtilities.h" #include "Framework/ASoAHelpers.h" -#include "Framework/AnalysisDataModel.h" #include "Framework/AnalysisTask.h" #include "Framework/runDataProcessing.h" using namespace o2; using namespace o2::aod; +using namespace o2::framework; +using namespace o2::framework::expressions; +using namespace o2::soa; + +struct emcIdConverter1 { + Produces id_001; + + void process(aod::EMCEMEventIds_000 const& ids) + { + for (const auto& id : ids) { + id_001(id.emeventId()); + } // end of id loop + } +}; WorkflowSpec defineDataProcessing(ConfigContext const& cfgc) { - return WorkflowSpec{ - adaptAnalysisTask>(cfgc, TaskName{"diphoton-hadron-mpc-pcmpcm"}), - }; + return WorkflowSpec{adaptAnalysisTask(cfgc, TaskName{"emcid-converter1"})}; } diff --git a/PWGEM/PhotonMeson/TableProducer/Converters/phosIdConverter1.cxx b/PWGEM/PhotonMeson/TableProducer/Converters/phosIdConverter1.cxx new file mode 100644 index 00000000000..102907e9547 --- /dev/null +++ b/PWGEM/PhotonMeson/TableProducer/Converters/phosIdConverter1.cxx @@ -0,0 +1,38 @@ +// Copyright 2019-2020 CERN and copyright holders of ALICE O2. +// See https://alice-o2.web.cern.ch/copyright for details of the copyright holders. +// All rights not expressly granted are reserved. +// +// This software is distributed under the terms of the GNU General Public +// License v3 (GPL Version 3), copied verbatim in the file "COPYING". +// +// In applying this license CERN does not waive the privileges and immunities +// granted to it by virtue of its status as an Intergovernmental Organization +// or submit itself to any jurisdiction. + +#include "PWGEM/PhotonMeson/DataModel/gammaTables.h" + +#include "Framework/ASoAHelpers.h" +#include "Framework/AnalysisTask.h" +#include "Framework/runDataProcessing.h" + +using namespace o2; +using namespace o2::aod; +using namespace o2::framework; +using namespace o2::framework::expressions; +using namespace o2::soa; + +struct phosIdConverter1 { + Produces id_001; + + void process(aod::PHOSEMEventIds_000 const& ids) + { + for (const auto& id : ids) { + id_001(id.emeventId()); + } // end of id loop + } +}; + +WorkflowSpec defineDataProcessing(ConfigContext const& cfgc) +{ + return WorkflowSpec{adaptAnalysisTask(cfgc, TaskName{"phosid-converter1"})}; +} diff --git a/PWGEM/PhotonMeson/TableProducer/Converters/v0photonIdConverter1.cxx b/PWGEM/PhotonMeson/TableProducer/Converters/v0photonIdConverter1.cxx new file mode 100644 index 00000000000..25230a2512e --- /dev/null +++ b/PWGEM/PhotonMeson/TableProducer/Converters/v0photonIdConverter1.cxx @@ -0,0 +1,38 @@ +// Copyright 2019-2020 CERN and copyright holders of ALICE O2. +// See https://alice-o2.web.cern.ch/copyright for details of the copyright holders. +// All rights not expressly granted are reserved. +// +// This software is distributed under the terms of the GNU General Public +// License v3 (GPL Version 3), copied verbatim in the file "COPYING". +// +// In applying this license CERN does not waive the privileges and immunities +// granted to it by virtue of its status as an Intergovernmental Organization +// or submit itself to any jurisdiction. + +#include "PWGEM/PhotonMeson/DataModel/gammaTables.h" + +#include "Framework/ASoAHelpers.h" +#include "Framework/AnalysisTask.h" +#include "Framework/runDataProcessing.h" + +using namespace o2; +using namespace o2::aod; +using namespace o2::framework; +using namespace o2::framework::expressions; +using namespace o2::soa; + +struct v0photonIdConverter1 { + Produces id_001; + + void process(aod::V0KFEMEventIds_000 const& ids) + { + for (const auto& id : ids) { + id_001(id.emeventId()); + } // end of id loop + } +}; + +WorkflowSpec defineDataProcessing(ConfigContext const& cfgc) +{ + return WorkflowSpec{adaptAnalysisTask(cfgc, TaskName{"v0photonid-converter1"})}; +} diff --git a/PWGEM/PhotonMeson/TableProducer/createEMEventPhoton.cxx b/PWGEM/PhotonMeson/TableProducer/createEMEventPhoton.cxx index fe6726d4d98..2c87cc3431d 100644 --- a/PWGEM/PhotonMeson/TableProducer/createEMEventPhoton.cxx +++ b/PWGEM/PhotonMeson/TableProducer/createEMEventPhoton.cxx @@ -66,14 +66,14 @@ using MyCollisionsMCCentQvec = soa::Join; struct CreateEMEventPhoton { // Produces embc; - Produces event; + Produces event; Produces eventalias; // Produces eventCov; - Produces eventMult; - Produces eventCent; - Produces eventQvec; + Produces eventMult; + Produces eventCent; + Produces eventQvec; Produces emswtbit; - Produces event_norm_info; + Produces event_norm_info; Produces eventWeights; enum class EMEventType : int { @@ -359,7 +359,7 @@ struct CreateEMEventPhoton { }; struct AssociatePhotonToEMEvent { Produces v0kfeventid; - Produces prmeleventid; + Produces prmeleventid; Produces phoseventid; Produces emceventid; Produces prmtrackeventid; @@ -407,10 +407,10 @@ struct AssociatePhotonToEMEvent { fillEventId(collisions, photons, emceventid, perCollisionEMC); } - void processChargedTrack(aod::EMEvents const& collisions, aod::EMPrimaryTracks const& tracks) - { - fillEventId(collisions, tracks, prmtrackeventid, perCollision_track); - } + // void processChargedTrack(aod::EMEvents const& collisions, aod::EMPrimaryTracks const& tracks) + // { + // fillEventId(collisions, tracks, prmtrackeventid, perCollision_track); + // } void processDummy(aod::EMEvents const&) {} @@ -418,7 +418,7 @@ struct AssociatePhotonToEMEvent { PROCESS_SWITCH(AssociatePhotonToEMEvent, processElectronFromDalitz, "process dalitzee-event indexing", false); PROCESS_SWITCH(AssociatePhotonToEMEvent, processPHOS, "process phos-event indexing", false); PROCESS_SWITCH(AssociatePhotonToEMEvent, processEMC, "process emc-event indexing", false); - PROCESS_SWITCH(AssociatePhotonToEMEvent, processChargedTrack, "process indexing for charged tracks", false); + // PROCESS_SWITCH(AssociatePhotonToEMEvent, processChargedTrack, "process indexing for charged tracks", false); PROCESS_SWITCH(AssociatePhotonToEMEvent, processDummy, "process dummy", true); }; WorkflowSpec defineDataProcessing(ConfigContext const& cfgc) diff --git a/PWGEM/PhotonMeson/TableProducer/nonLinProducer.cxx b/PWGEM/PhotonMeson/TableProducer/nonLinProducer.cxx index 6c8132fb0b6..9d3847ffb8a 100644 --- a/PWGEM/PhotonMeson/TableProducer/nonLinProducer.cxx +++ b/PWGEM/PhotonMeson/TableProducer/nonLinProducer.cxx @@ -59,7 +59,7 @@ struct NonLinProducer { using EMCalPhotons = soa::Join; using PcmPhotons = soa::Join; - using Colls = soa::Join; + using Colls = soa::Join; EMNonLin emNonLinEMC; EMNonLin emNonLinPCM; @@ -118,8 +118,8 @@ struct NonLinProducer { float nonLinFactor = 1.f; // check that we are at the correct collision - if (cluster.emeventId() != collIndex) { - collIndex = cluster.emeventId(); + if (cluster.emphotoneventId() != collIndex) { + collIndex = cluster.emphotoneventId(); collision.setCursor(collIndex); cent = getCentrality(collision); } @@ -155,8 +155,8 @@ struct NonLinProducer { float nonLinFactor = 1.f; // check that we are at the correct collision - if (v0.emeventId() != collIndex) { - collIndex = v0.emeventId(); + if (v0.emphotoneventId() != collIndex) { + collIndex = v0.emphotoneventId(); collision.setCursor(collIndex); cent = getCentrality(collision); } diff --git a/PWGEM/PhotonMeson/TableProducer/skimmerDalitzEE.cxx b/PWGEM/PhotonMeson/TableProducer/skimmerDalitzEE.cxx index c27bd6e64ab..c33a1e2020e 100644 --- a/PWGEM/PhotonMeson/TableProducer/skimmerDalitzEE.cxx +++ b/PWGEM/PhotonMeson/TableProducer/skimmerDalitzEE.cxx @@ -37,10 +37,10 @@ using namespace o2::framework; using namespace o2::framework::expressions; using namespace o2::constants::physics; -using MyCollisions = soa::Join; +using MyCollisions = soa::Join; using MyCollision = MyCollisions::iterator; -using MyTracks = soa::Join; +using MyTracks = soa::Join; using MyTrack = MyTracks::iterator; using MyTracksCEFP = soa::Join; @@ -54,7 +54,7 @@ struct skimmerDalitzEE { }; SliceCache cache; - Preslice perCol = o2::aod::emprimaryelectron::emeventId; + Preslice perCol = o2::aod::emprimaryelectronda::emphotoneventId; SliceCache cache_cefp; PresliceUnsorted perCol_cefp = o2::aod::emprimaryelectron::collisionId; @@ -337,8 +337,8 @@ struct skimmerDalitzEE { continue; } - auto posTracks_per_coll = posTracks->sliceByCached(o2::aod::emprimaryelectron::emeventId, collision.globalIndex(), cache); - auto negTracks_per_coll = negTracks->sliceByCached(o2::aod::emprimaryelectron::emeventId, collision.globalIndex(), cache); + auto posTracks_per_coll = posTracks->sliceByCached(o2::aod::emprimaryelectronda::emphotoneventId, collision.globalIndex(), cache); + auto negTracks_per_coll = negTracks->sliceByCached(o2::aod::emprimaryelectronda::emphotoneventId, collision.globalIndex(), cache); fRegistry.fill(HIST("hNpos"), collision.centFT0C(), posTracks_per_coll.size()); fRegistry.fill(HIST("hNele"), collision.centFT0C(), negTracks_per_coll.size()); // LOGF(info, "collision.centFT0C() = %f, posTracks_per_coll.size() = %d, negTracks_per_coll.size() = %d", collision.centFT0C() , posTracks_per_coll.size(), negTracks_per_coll.size()); @@ -375,7 +375,7 @@ struct skimmerDalitzEE { } PROCESS_SWITCH(skimmerDalitzEE, processCEFP, "Process dalitz ee for CEFP", false); // for central event filter processing - void processOnlyNee(soa::Join const& collisions) + void processOnlyNee(soa::Join const& collisions) { for (auto& collision : collisions) { float centralities[3] = {collision.centFT0M(), collision.centFT0A(), collision.centFT0C()}; diff --git a/PWGEM/PhotonMeson/Tasks/CMakeLists.txt b/PWGEM/PhotonMeson/Tasks/CMakeLists.txt index ba160a3080f..e0ce318628f 100644 --- a/PWGEM/PhotonMeson/Tasks/CMakeLists.txt +++ b/PWGEM/PhotonMeson/Tasks/CMakeLists.txt @@ -181,22 +181,11 @@ o2physics_add_dpl_workflow(tagging-pi0-mc-pcmdalitzee PUBLIC_LINK_LIBRARIES O2::Framework O2Physics::AnalysisCore O2Physics::PWGEMPhotonMesonCore COMPONENT_NAME Analysis) -o2physics_add_dpl_workflow(diphoton-hadron-mpc-pcmpcm - SOURCES diphotonHadronMPCPCMPCM.cxx - PUBLIC_LINK_LIBRARIES O2::Framework O2Physics::AnalysisCore O2Physics::PWGEMPhotonMesonCore - COMPONENT_NAME Analysis) - - o2physics_add_dpl_workflow(compconvbuilder SOURCES compconvbuilder.cxx PUBLIC_LINK_LIBRARIES O2::Framework O2Physics::AnalysisCore O2Physics::PWGEMPhotonMesonCore COMPONENT_NAME Analysis) -o2physics_add_dpl_workflow(diphoton-hadron-mpc-pcmdalitzee - SOURCES diphotonHadronMPCPCMDalitzEE.cxx - PUBLIC_LINK_LIBRARIES O2::Framework O2Physics::AnalysisCore O2Physics::PWGEMPhotonMesonCore - COMPONENT_NAME Analysis) - o2physics_add_dpl_workflow(calib-task-emc SOURCES calibTaskEmc.cxx PUBLIC_LINK_LIBRARIES O2::Framework O2Physics::AnalysisCore O2::EMCALBase O2::EMCALCalib O2Physics::PWGEMPhotonMesonCore diff --git a/PWGEM/PhotonMeson/Tasks/MaterialBudget.cxx b/PWGEM/PhotonMeson/Tasks/MaterialBudget.cxx index 298f05a1198..a023826777b 100644 --- a/PWGEM/PhotonMeson/Tasks/MaterialBudget.cxx +++ b/PWGEM/PhotonMeson/Tasks/MaterialBudget.cxx @@ -70,10 +70,10 @@ using namespace o2::aod::pwgem::dilepton::utils::mcutil; using namespace o2::aod::pwgem::dilepton::utils; using o2::constants::math::TwoPI; -using MyCollisions = soa::Join; +using MyCollisions = soa::Join; using MyCollision = MyCollisions::iterator; -using MyCollisionsMC = soa::Join; +using MyCollisionsMC = soa::Join; using MyCollisionMC = MyCollisionsMC::iterator; using MyMCCollisions = soa::Join; @@ -82,7 +82,7 @@ using MyMCCollision = MyMCCollisions::iterator; using MyV0Photons = soa::Join; using MyV0Photon = MyV0Photons::iterator; -using MyPrimaryElectrons = soa::Filtered>; +using MyPrimaryElectrons = soa::Filtered>; using MyPrimaryElectron = MyPrimaryElectrons::iterator; using MyMCV0Legs = soa::Join; @@ -831,8 +831,8 @@ struct MaterialBudget { } SliceCache cache; - Preslice perCollision = aod::v0photonkf::emeventId; - Preslice perCollisionElectron = aod::emprimaryelectron::emeventId; + Preslice perCollision = aod::v0photonkf::emphotoneventId; + Preslice perCollisionElectron = aod::emprimaryelectronda::emphotoneventId; Partition positrons = o2::aod::emprimaryelectron::sign > int8_t(0) && dileptoncuts.cfgMinPtTrack < o2::aod::track::pt&& nabs(o2::aod::track::eta) < dileptoncuts.cfgMaxEtaTrack; Partition electrons = o2::aod::emprimaryelectron::sign < int8_t(0) && dileptoncuts.cfgMinPtTrack < o2::aod::track::pt && nabs(o2::aod::track::eta) < dileptoncuts.cfgMaxEtaTrack; diff --git a/PWGEM/PhotonMeson/Tasks/MaterialBudgetMC.cxx b/PWGEM/PhotonMeson/Tasks/MaterialBudgetMC.cxx index a2cea8bd2b3..7956146ae89 100644 --- a/PWGEM/PhotonMeson/Tasks/MaterialBudgetMC.cxx +++ b/PWGEM/PhotonMeson/Tasks/MaterialBudgetMC.cxx @@ -57,7 +57,7 @@ using namespace o2::aod::pwgem::photonmeson::utils::mcutil; using namespace o2::aod::pwgem::dilepton::utils::mcutil; using namespace o2::aod::pwgem::photon; -using MyCollisions = soa::Join; +using MyCollisions = soa::Join; using MyCollision = MyCollisions::iterator; using MyV0Photons = soa::Join; @@ -227,7 +227,7 @@ struct MaterialBudgetMC { LOGF(info, "Number of Pair cuts = %d", fPairCuts.size()); } - Preslice perCollision_pcm = aod::v0photonkf::emeventId; + Preslice perCollision_pcm = aod::v0photonkf::emphotoneventId; template bool IsSelectedPair(TG1 const& g1, TG2 const& g2, TCut1 const& tagcut, TCut2 const& probecut) diff --git a/PWGEM/PhotonMeson/Tasks/Pi0EtaToGammaGammaMCPCMDalitzEE.cxx b/PWGEM/PhotonMeson/Tasks/Pi0EtaToGammaGammaMCPCMDalitzEE.cxx index e36da8a2556..573b8d0224e 100644 --- a/PWGEM/PhotonMeson/Tasks/Pi0EtaToGammaGammaMCPCMDalitzEE.cxx +++ b/PWGEM/PhotonMeson/Tasks/Pi0EtaToGammaGammaMCPCMDalitzEE.cxx @@ -28,7 +28,7 @@ using namespace o2::aod::pwgem::photonmeson::photonpair; using MyV0Photons = soa::Filtered>; using MyMCV0Legs = soa::Join; -using MyMCElectrons = soa::Filtered>; +using MyMCElectrons = soa::Filtered>; WorkflowSpec defineDataProcessing(ConfigContext const& cfgc) { diff --git a/PWGEM/PhotonMeson/Tasks/Pi0EtaToGammaGammaPCMDalitzEE.cxx b/PWGEM/PhotonMeson/Tasks/Pi0EtaToGammaGammaPCMDalitzEE.cxx index 27d1c1cca7d..aa9afe80489 100644 --- a/PWGEM/PhotonMeson/Tasks/Pi0EtaToGammaGammaPCMDalitzEE.cxx +++ b/PWGEM/PhotonMeson/Tasks/Pi0EtaToGammaGammaPCMDalitzEE.cxx @@ -29,7 +29,7 @@ using namespace o2::framework; using namespace o2::aod::pwgem::photonmeson::photonpair; using MyV0Photons = Filtered>; -using MyPrimaryElectrons = Filtered>; +using MyPrimaryElectrons = Filtered>; WorkflowSpec defineDataProcessing(ConfigContext const& cfgc) { diff --git a/PWGEM/PhotonMeson/Tasks/SinglePhoton.cxx b/PWGEM/PhotonMeson/Tasks/SinglePhoton.cxx index 5d5972e3685..1c536cf5751 100644 --- a/PWGEM/PhotonMeson/Tasks/SinglePhoton.cxx +++ b/PWGEM/PhotonMeson/Tasks/SinglePhoton.cxx @@ -53,7 +53,7 @@ using namespace o2::framework::expressions; using namespace o2::soa; using namespace o2::aod::pwgem::photon; -using MyCollisions = soa::Join; +using MyCollisions = soa::Join; using MyCollision = MyCollisions::iterator; using MyV0Photons = soa::Join; @@ -241,7 +241,7 @@ struct SinglePhoton { LOGF(info, "Number of EMCal cuts = %d", fEMCCuts.size()); } - Preslice perCollision = aod::v0photonkf::emeventId; + Preslice perCollision = aod::v0photonkf::emphotoneventId; // Preslice perCollision_phos = aod::skimmedcluster::collisionId; // Preslice perCollision_emc = aod::skimmedcluster::collisionId; diff --git a/PWGEM/PhotonMeson/Tasks/SinglePhotonMC.cxx b/PWGEM/PhotonMeson/Tasks/SinglePhotonMC.cxx index b9aeedf9ffa..f583890fd53 100644 --- a/PWGEM/PhotonMeson/Tasks/SinglePhotonMC.cxx +++ b/PWGEM/PhotonMeson/Tasks/SinglePhotonMC.cxx @@ -52,7 +52,7 @@ using namespace o2::aod::pwgem::photonmeson::utils::mcutil; using namespace o2::aod::pwgem::dilepton::utils::mcutil; using namespace o2::aod::pwgem::photon; -using MyCollisions = soa::Join; +using MyCollisions = soa::Join; using MyCollision = MyCollisions::iterator; using MyV0Photons = soa::Join; @@ -242,7 +242,7 @@ struct SinglePhotonMC { // LOGF(info, "Number of EMCal cuts = %d", fEMCCuts.size()); // } - Preslice perCollision = aod::v0photonkf::emeventId; + Preslice perCollision = aod::v0photonkf::emphotoneventId; // Preslice perCollision_phos = aod::skimmedcluster::collisionId; // Preslice perCollision_emc = aod::skimmedcluster::collisionId; diff --git a/PWGEM/PhotonMeson/Tasks/TagAndProbe.cxx b/PWGEM/PhotonMeson/Tasks/TagAndProbe.cxx index a2d09adcc0f..91b46605947 100644 --- a/PWGEM/PhotonMeson/Tasks/TagAndProbe.cxx +++ b/PWGEM/PhotonMeson/Tasks/TagAndProbe.cxx @@ -65,15 +65,12 @@ using namespace o2::soa; using namespace o2::aod::pwgem::photonmeson::photonpair; using namespace o2::aod::pwgem::photon; -using MyCollisions = soa::Join; +using MyCollisions = soa::Join; using MyCollision = MyCollisions::iterator; using MyV0Photons = soa::Join; using MyV0Photon = MyV0Photons::iterator; -using MyDalitzEEs = soa::Join; -using MyDalitzEE = MyDalitzEEs::iterator; - struct TagAndProbe { Configurable cfgCentEstimator{"cfgCentEstimator", 2, "FT0M:0, FT0A:1, FT0C:2"}; Configurable cfgCentMin{"cfgCentMin", 0, "min. centrality"}; @@ -248,7 +245,7 @@ struct TagAndProbe { LOGF(info, "Number of Pair cuts = %d", fPairCuts.size()); } - Preslice perCollision = aod::v0photonkf::emeventId; + Preslice perCollision = aod::v0photonkf::emphotoneventId; Preslice perCollision_phos = aod::skimmedcluster::collisionId; Preslice perCollision_emc = aod::skimmedcluster::collisionId; diff --git a/PWGEM/PhotonMeson/Tasks/calibTaskEmc.cxx b/PWGEM/PhotonMeson/Tasks/calibTaskEmc.cxx index 9520c3216e6..66d140bf308 100644 --- a/PWGEM/PhotonMeson/Tasks/calibTaskEmc.cxx +++ b/PWGEM/PhotonMeson/Tasks/calibTaskEmc.cxx @@ -228,12 +228,12 @@ struct CalibTaskEmc { Filter collisionFilter = (nabs(aod::collision::posZ) <= eventcuts.cfgZvtxMax) && (aod::evsel::ft0cOccupancyInTimeRange <= eventcuts.cfgFT0COccupancyMax) && (aod::evsel::ft0cOccupancyInTimeRange >= eventcuts.cfgFT0COccupancyMin); using EMCalPhotons = soa::Join; using PCMPhotons = soa::Join; - using FilteredCollsWithQvecs = soa::Filtered>; - using CollsWithQvecs = soa::Join; - using Colls = soa::Join; + using FilteredCollsWithQvecs = soa::Filtered>; + using CollsWithQvecs = soa::Join; + using Colls = soa::Join; - PresliceOptional perCollisionEMC = o2::aod::emccluster::emeventId; - PresliceOptional perCollisionPCM = aod::v0photonkf::emeventId; + PresliceOptional perCollisionEMC = o2::aod::emccluster::emphotoneventId; + PresliceOptional perCollisionPCM = aod::v0photonkf::emphotoneventId; PresliceOptional perEMCClusterMT = o2::aod::mintm::minClusterId; PresliceOptional perEMCClusterMS = o2::aod::mintm::minClusterId; diff --git a/PWGEM/PhotonMeson/Tasks/compconvbuilder.cxx b/PWGEM/PhotonMeson/Tasks/compconvbuilder.cxx index 3a080016299..be0e088e60d 100644 --- a/PWGEM/PhotonMeson/Tasks/compconvbuilder.cxx +++ b/PWGEM/PhotonMeson/Tasks/compconvbuilder.cxx @@ -57,7 +57,7 @@ using MyV0Photons = soa::Join; using MyMCV0Legs = soa::Join; using MyMCV0Leg = MyMCV0Legs::iterator; -using MyCollisions = soa::Join; +using MyCollisions = soa::Join; using MyCollision = MyCollisions::iterator; using MyMCCollisions = soa::Join; @@ -128,7 +128,7 @@ struct Compconvbuilder { } // Link V0-photons to their collision - Preslice perV0PhotonCollision = aod::v0photonkf::emeventId; + Preslice perV0PhotonCollision = aod::v0photonkf::emphotoneventId; void init(InitContext const& /*ctx*/) { @@ -656,7 +656,7 @@ struct Compconvbuilder { } } - Preslice perCollision = aod::v0photonkf::emeventId; + Preslice perCollision = aod::v0photonkf::emphotoneventId; void processEMV0sMC(MyV0Photons const& v0s, aod::EMMCParticles const& mcparticles, MyMCV0Legs const&, MyCollisions const& collisions) { diff --git a/PWGEM/PhotonMeson/Tasks/dalitzEEQC.cxx b/PWGEM/PhotonMeson/Tasks/dalitzEEQC.cxx index a0c6deb047d..4717c1d307b 100644 --- a/PWGEM/PhotonMeson/Tasks/dalitzEEQC.cxx +++ b/PWGEM/PhotonMeson/Tasks/dalitzEEQC.cxx @@ -43,10 +43,10 @@ using namespace o2::framework::expressions; using namespace o2::soa; using namespace o2::aod::pwgem::dilepton::utils::emtrackutil; -using MyCollisions = soa::Join; +using MyCollisions = soa::Join; using MyCollision = MyCollisions::iterator; -using MyTracks = soa::Join; +using MyTracks = soa::Join; using MyTrack = MyTracks::iterator; struct DalitzEEQC { @@ -332,7 +332,7 @@ struct DalitzEEQC { using FilteredMyCollisions = soa::Filtered; SliceCache cache; - Preslice perCollision_track = aod::emprimaryelectron::emeventId; + Preslice perCollision_track = aod::emprimaryelectronda::emphotoneventId; Filter trackFilter = dileptoncuts.cfg_min_pt_track < o2::aod::track::pt && nabs(o2::aod::track::eta) < dileptoncuts.cfg_max_eta_track && o2::aod::track::tpcChi2NCl < dileptoncuts.cfg_max_chi2tpc && o2::aod::track::itsChi2NCl < dileptoncuts.cfg_max_chi2its && nabs(o2::aod::track::dcaXY) < dileptoncuts.cfg_max_dcaxy && nabs(o2::aod::track::dcaZ) < dileptoncuts.cfg_max_dcaz; Filter pidFilter = dileptoncuts.cfg_min_TPCNsigmaEl < o2::aod::pidtpc::tpcNSigmaEl && o2::aod::pidtpc::tpcNSigmaEl < dileptoncuts.cfg_max_TPCNsigmaEl && (o2::aod::pidtpc::tpcNSigmaPi < dileptoncuts.cfg_min_TPCNsigmaPi || dileptoncuts.cfg_max_TPCNsigmaPi < o2::aod::pidtpc::tpcNSigmaPi); using FilteredMyTracks = soa::Filtered; @@ -360,8 +360,8 @@ struct DalitzEEQC { fRegistry.fill(HIST("Event/before/hCollisionCounter"), 12.0); // accepted fRegistry.fill(HIST("Event/after/hCollisionCounter"), 12.0); // accepted - auto posTracks_per_coll = posTracks->sliceByCached(o2::aod::emprimaryelectron::emeventId, collision.globalIndex(), cache); - auto negTracks_per_coll = negTracks->sliceByCached(o2::aod::emprimaryelectron::emeventId, collision.globalIndex(), cache); + auto posTracks_per_coll = posTracks->sliceByCached(o2::aod::emprimaryelectronda::emphotoneventId, collision.globalIndex(), cache); + auto negTracks_per_coll = negTracks->sliceByCached(o2::aod::emprimaryelectronda::emphotoneventId, collision.globalIndex(), cache); // LOGF(info, "centrality = %f , posTracks_per_coll.size() = %d, negTracks_per_coll.size() = %d", centralities[cfgCentEstimator], posTracks_per_coll.size(), negTracks_per_coll.size()); for (auto& [pos, ele] : combinations(CombinationsFullIndexPolicy(posTracks_per_coll, negTracks_per_coll))) { // ULS diff --git a/PWGEM/PhotonMeson/Tasks/dalitzEEQCMC.cxx b/PWGEM/PhotonMeson/Tasks/dalitzEEQCMC.cxx index 6b6ca3f6649..f5e202985be 100644 --- a/PWGEM/PhotonMeson/Tasks/dalitzEEQCMC.cxx +++ b/PWGEM/PhotonMeson/Tasks/dalitzEEQCMC.cxx @@ -46,10 +46,10 @@ using namespace o2::soa; using namespace o2::aod::pwgem::photonmeson::utils::mcutil; using namespace o2::aod::pwgem::dilepton::utils::mcutil; -using MyCollisions = soa::Join; +using MyCollisions = soa::Join; using MyCollision = MyCollisions::iterator; -using MyMCTracks = soa::Join; +using MyMCTracks = soa::Join; using MyMCTrack = MyMCTracks::iterator; struct DalitzEEQCMC { @@ -487,7 +487,7 @@ struct DalitzEEQCMC { std::vector used_trackIds; SliceCache cache; - Preslice perCollision_track = aod::emprimaryelectron::emeventId; + Preslice perCollision_track = aod::emprimaryelectronda::emphotoneventId; Filter trackFilter = dileptoncuts.cfg_min_pt_track < o2::aod::track::pt && nabs(o2::aod::track::eta) < dileptoncuts.cfg_max_eta_track && o2::aod::track::tpcChi2NCl < dileptoncuts.cfg_max_chi2tpc && o2::aod::track::itsChi2NCl < dileptoncuts.cfg_max_chi2its && nabs(o2::aod::track::dcaXY) < dileptoncuts.cfg_max_dcaxy && nabs(o2::aod::track::dcaZ) < dileptoncuts.cfg_max_dcaz; Filter pidFilter = dileptoncuts.cfg_min_TPCNsigmaEl < o2::aod::pidtpc::tpcNSigmaEl && o2::aod::pidtpc::tpcNSigmaEl < dileptoncuts.cfg_max_TPCNsigmaEl && (o2::aod::pidtpc::tpcNSigmaPi < dileptoncuts.cfg_min_TPCNsigmaPi || dileptoncuts.cfg_max_TPCNsigmaPi < o2::aod::pidtpc::tpcNSigmaPi); using FilteredMyMCTracks = soa::Filtered; @@ -520,8 +520,8 @@ struct DalitzEEQCMC { fRegistry.fill(HIST("Event/before/hCollisionCounter"), 12.0); // accepted fRegistry.fill(HIST("Event/after/hCollisionCounter"), 12.0); // accepted - auto posTracks_per_coll = posTracks->sliceByCached(o2::aod::emprimaryelectron::emeventId, collision.globalIndex(), cache); - auto negTracks_per_coll = negTracks->sliceByCached(o2::aod::emprimaryelectron::emeventId, collision.globalIndex(), cache); + auto posTracks_per_coll = posTracks->sliceByCached(o2::aod::emprimaryelectronda::emphotoneventId, collision.globalIndex(), cache); + auto negTracks_per_coll = negTracks->sliceByCached(o2::aod::emprimaryelectronda::emphotoneventId, collision.globalIndex(), cache); // LOGF(info, "centrality = %f , posTracks_per_coll.size() = %d, negTracks_per_coll.size() = %d", centralities[cfgCentEstimator], posTracks_per_coll.size(), negTracks_per_coll.size()); for (auto& [pos, ele] : combinations(CombinationsFullIndexPolicy(posTracks_per_coll, negTracks_per_coll))) { // ULS diff --git a/PWGEM/PhotonMeson/Tasks/emcalQC.cxx b/PWGEM/PhotonMeson/Tasks/emcalQC.cxx index 7c3fce2bd65..651828b8194 100644 --- a/PWGEM/PhotonMeson/Tasks/emcalQC.cxx +++ b/PWGEM/PhotonMeson/Tasks/emcalQC.cxx @@ -47,7 +47,7 @@ using namespace o2::framework::expressions; using namespace o2::soa; using namespace o2::aod::pwgem::photon; -using MyCollisions = soa::Join; +using MyCollisions = soa::Join; using MyCollision = MyCollisions::iterator; using EMCalPhotons = soa::Join; @@ -137,7 +137,7 @@ struct EmcalQC { PresliceOptional perEMCClusterMT = o2::aod::mintm::minClusterId; PresliceOptional perEMCClusterMS = o2::aod::mintm::minClusterId; - PresliceOptional perCollisionEMC = o2::aod::emccluster::emeventId; + PresliceOptional perCollisionEMC = o2::aod::emccluster::emphotoneventId; void init(InitContext&) { diff --git a/PWGEM/PhotonMeson/Tasks/gammaConversions.cxx b/PWGEM/PhotonMeson/Tasks/gammaConversions.cxx index b9268ab3907..c1a9eeed496 100644 --- a/PWGEM/PhotonMeson/Tasks/gammaConversions.cxx +++ b/PWGEM/PhotonMeson/Tasks/gammaConversions.cxx @@ -619,7 +619,7 @@ struct GammaConversions { } } - Preslice perCollision = aod::v0photonkf::emeventId; + Preslice perCollision = aod::v0photonkf::emphotoneventId; void processRec(aod::EMEvents::iterator const& theCollision, V0DatasAdditional const& theV0s, aod::V0Legs const&) diff --git a/PWGEM/PhotonMeson/Tasks/pcmQC.cxx b/PWGEM/PhotonMeson/Tasks/pcmQC.cxx index c741b283be3..4bb4e38f583 100644 --- a/PWGEM/PhotonMeson/Tasks/pcmQC.cxx +++ b/PWGEM/PhotonMeson/Tasks/pcmQC.cxx @@ -48,7 +48,7 @@ using namespace o2::framework::expressions; using namespace o2::soa; using namespace o2::aod::pwgem::photon; -using MyCollisions = soa::Join; +using MyCollisions = soa::Join; using MyCollision = MyCollisions::iterator; using MyV0Photons = soa::Join; diff --git a/PWGEM/PhotonMeson/Tasks/pcmQCMC.cxx b/PWGEM/PhotonMeson/Tasks/pcmQCMC.cxx index eb04bc86b88..0e3f56909ca 100644 --- a/PWGEM/PhotonMeson/Tasks/pcmQCMC.cxx +++ b/PWGEM/PhotonMeson/Tasks/pcmQCMC.cxx @@ -54,7 +54,7 @@ using namespace o2::aod::pwgem::photonmeson::utils::mcutil; using namespace o2::aod::pwgem::dilepton::utils::mcutil; using namespace o2::aod::pwgem::photon; -using MyCollisions = soa::Join; +using MyCollisions = soa::Join; using MyCollision = MyCollisions::iterator; using MyMCCollisions = soa::Join; diff --git a/PWGEM/PhotonMeson/Tasks/phosQC.cxx b/PWGEM/PhotonMeson/Tasks/phosQC.cxx index 4f5ef2ec075..8504be6ae8a 100644 --- a/PWGEM/PhotonMeson/Tasks/phosQC.cxx +++ b/PWGEM/PhotonMeson/Tasks/phosQC.cxx @@ -44,7 +44,7 @@ using namespace o2::framework::expressions; using namespace o2::soa; using namespace o2::aod::pwgem::photon; -using MyCollisions = soa::Join; +using MyCollisions = soa::Join; using MyCollision = MyCollisions::iterator; struct phosQC { diff --git a/PWGEM/PhotonMeson/Tasks/photonResoTask.cxx b/PWGEM/PhotonMeson/Tasks/photonResoTask.cxx index 238f5b77715..fe6ec07c476 100644 --- a/PWGEM/PhotonMeson/Tasks/photonResoTask.cxx +++ b/PWGEM/PhotonMeson/Tasks/photonResoTask.cxx @@ -202,13 +202,13 @@ struct PhotonResoTask { using PcmMcLegs = soa::Join; - using Colls = soa::Join; + using Colls = soa::Join; using McColls = o2::soa::Join; using McParticles = EMMCParticles; - PresliceOptional perCollisionEMC = o2::aod::emccluster::emeventId; - PresliceOptional perCollisionPCM = aod::v0photonkf::emeventId; + PresliceOptional perCollisionEMC = o2::aod::emccluster::emphotoneventId; + PresliceOptional perCollisionPCM = aod::v0photonkf::emphotoneventId; PresliceOptional perEMCClusterMT = o2::aod::mintm::minClusterId; PresliceOptional perEMCClusterMS = o2::aod::mintm::minClusterId; diff --git a/PWGEM/PhotonMeson/Tasks/prefilterPhoton.cxx b/PWGEM/PhotonMeson/Tasks/prefilterPhoton.cxx index cfaa5371cac..b7141518624 100644 --- a/PWGEM/PhotonMeson/Tasks/prefilterPhoton.cxx +++ b/PWGEM/PhotonMeson/Tasks/prefilterPhoton.cxx @@ -59,13 +59,13 @@ using namespace o2::framework::expressions; using namespace o2::soa; using namespace o2::aod::pwgem::photonmeson::photonpair; -using MyCollisions = soa::Join; +using MyCollisions = soa::Join; using MyCollision = MyCollisions::iterator; using MyV0Photons = soa::Join; using MyV0Photon = MyV0Photons::iterator; -using MyPrimaryElectrons = soa::Join; +using MyPrimaryElectrons = soa::Join; using MyPrimaryElectron = MyPrimaryElectrons::iterator; struct prefilterPhoton { @@ -389,8 +389,8 @@ struct prefilterPhoton { } auto photons1_per_collision = photons1.sliceBy(perCollision1, collision.globalIndex()); - auto positrons_per_collision = posTracks->sliceByCached(o2::aod::emprimaryelectron::emeventId, collision.globalIndex(), cache); - auto electrons_per_collision = negTracks->sliceByCached(o2::aod::emprimaryelectron::emeventId, collision.globalIndex(), cache); + auto positrons_per_collision = posTracks->sliceByCached(o2::aod::emprimaryelectronda::emphotoneventId, collision.globalIndex(), cache); + auto electrons_per_collision = negTracks->sliceByCached(o2::aod::emprimaryelectronda::emphotoneventId, collision.globalIndex(), cache); if (!fEMEventCut.IsSelected(collision) || !is_cent_ok) { for (const auto& photon1 : photons1_per_collision) { @@ -537,8 +537,8 @@ struct prefilterPhoton { } auto photons1_per_collision = photons1.sliceBy(perCollision1, collision.globalIndex()); - auto positrons_per_collision = posTracks->sliceByCached(o2::aod::emprimaryelectron::emeventId, collision.globalIndex(), cache); - auto electrons_per_collision = negTracks->sliceByCached(o2::aod::emprimaryelectron::emeventId, collision.globalIndex(), cache); + auto positrons_per_collision = posTracks->sliceByCached(o2::aod::emprimaryelectronda::emphotoneventId, collision.globalIndex(), cache); + auto electrons_per_collision = negTracks->sliceByCached(o2::aod::emprimaryelectronda::emphotoneventId, collision.globalIndex(), cache); for (const auto& [g1, g2] : combinations(CombinationsStrictlyUpperIndexPolicy(photons1_per_collision, photons1_per_collision))) { if (!cut1.template IsSelected(g1) || !cut1.template IsSelected(g2)) { @@ -600,8 +600,8 @@ struct prefilterPhoton { std::unordered_map map_pfb_ele; // map ele.globalIndex -> prefilter bit SliceCache cache; - Preslice perCollision_v0 = aod::v0photonkf::emeventId; - Preslice perCollision_electron = aod::emprimaryelectron::emeventId; + Preslice perCollision_v0 = aod::v0photonkf::emphotoneventId; + Preslice perCollision_electron = aod::emprimaryelectronda::emphotoneventId; Filter collisionFilter_centrality = (cfgCentMin < o2::aod::cent::centFT0M && o2::aod::cent::centFT0M < cfgCentMax) || (cfgCentMin < o2::aod::cent::centFT0A && o2::aod::cent::centFT0A < cfgCentMax) || (cfgCentMin < o2::aod::cent::centFT0C && o2::aod::cent::centFT0C < cfgCentMax); Filter collisionFilter_occupancy_track = eventcuts.cfgTrackOccupancyMin <= o2::aod::evsel::trackOccupancyInTimeRange && o2::aod::evsel::trackOccupancyInTimeRange < eventcuts.cfgTrackOccupancyMax; diff --git a/PWGEM/PhotonMeson/Tasks/taskFlowReso.cxx b/PWGEM/PhotonMeson/Tasks/taskFlowReso.cxx index 10731a2de42..936e5ea335b 100644 --- a/PWGEM/PhotonMeson/Tasks/taskFlowReso.cxx +++ b/PWGEM/PhotonMeson/Tasks/taskFlowReso.cxx @@ -118,7 +118,7 @@ struct TaskFlowReso { SliceCache cache; EventPlaneHelper epHelper; - using CollsWithQvecs = soa::Join; + using CollsWithQvecs = soa::Join; using CollWithQvec = CollsWithQvecs::iterator; static constexpr std::size_t NQVecEntries = 6; diff --git a/PWGEM/PhotonMeson/Tasks/taskPi0FlowEMC.cxx b/PWGEM/PhotonMeson/Tasks/taskPi0FlowEMC.cxx index 6126cd516b2..69c0dae38a8 100644 --- a/PWGEM/PhotonMeson/Tasks/taskPi0FlowEMC.cxx +++ b/PWGEM/PhotonMeson/Tasks/taskPi0FlowEMC.cxx @@ -257,14 +257,14 @@ struct TaskPi0FlowEMC { // using FilteredEMCalPhotons = soa::Filtered>; using EMCalPhotons = soa::Join; using PCMPhotons = soa::Join; - using FilteredCollsWithQvecs = soa::Filtered>; - using CollsWithQvecs = soa::Join; - using Colls = soa::Join; + using FilteredCollsWithQvecs = soa::Filtered>; + using CollsWithQvecs = soa::Join; + using Colls = soa::Join; static constexpr std::size_t NQVecEntries = 6; - PresliceOptional perCollisionEMC = o2::aod::emccluster::emeventId; - PresliceOptional perCollisionPCM = aod::v0photonkf::emeventId; + PresliceOptional perCollisionEMC = o2::aod::emccluster::emphotoneventId; + PresliceOptional perCollisionPCM = aod::v0photonkf::emphotoneventId; PresliceOptional perEMCClusterMT = o2::aod::mintm::minClusterId; PresliceOptional perEMCClusterMS = o2::aod::mintm::minClusterId;