Skip to content

Commit 14b08ec

Browse files
committed
[EMCAL] adding zorro to emc correction framework
1 parent 653ea43 commit 14b08ec

File tree

2 files changed

+24
-4
lines changed

2 files changed

+24
-4
lines changed

PWGJE/TableProducer/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ endif()
9393

9494
o2physics_add_dpl_workflow(emcal-correction-task
9595
SOURCES emcalCorrectionTask.cxx
96-
PUBLIC_LINK_LIBRARIES O2::Framework O2Physics::AnalysisCore O2::DetectorsBase O2::EMCALBase O2::EMCALReconstruction O2::EMCALCalibration O2Physics::PWGJECore
96+
PUBLIC_LINK_LIBRARIES O2::Framework O2Physics::AnalysisCore O2::DetectorsBase O2::EMCALBase O2::EMCALReconstruction O2::EMCALCalibration O2Physics::PWGJECore O2Physics::EventFilteringUtils
9797
COMPONENT_NAME Analysis)
9898

9999
o2physics_add_dpl_workflow(emcal-matchedtracks-writer

PWGJE/TableProducer/emcalCorrectionTask.cxx

Lines changed: 23 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ using namespace o2::framework::expressions;
7777
using namespace o2::emccrosstalk;
7878
using namespace tmemcutilities;
7979
using MyGlobTracks = o2::soa::Join<o2::aod::FullTracks, o2::aod::TrackSelection>;
80-
using BcEvSels = o2::soa::Join<o2::aod::BCs, o2::aod::BcSels>;
80+
using BcEvSels = soa::Join<aod::BCs, aod::Timestamps, aod::BcSels>;
8181
using CollEventSels = o2::soa::Join<o2::aod::Collisions, o2::aod::EvSels>;
8282
using FilteredCells = o2::soa::Filtered<aod::Calos>;
8383
using McCells = o2::soa::Join<aod::Calos, aod::McCaloLabels_001>;
@@ -497,6 +497,11 @@ struct EmcalCorrectionTask {
497497

498498
// Loop through all collisions and fill emcalcollisionmatch with a boolean stating, whether the collision was ambiguous (not the only collision in its BC)
499499
for (const auto& collision : collisions) {
500+
if (applySoftwareTriggerSelection) {
501+
if (!zorro.isSelected(collision.foundBC_as<BcEvSels>().globalBC())) {
502+
continue;
503+
}
504+
}
500505
auto globalbcid = collision.foundBC_as<BcEvSels>().globalIndex();
501506
auto foundColls = numberCollsInBC.find(globalbcid);
502507
auto foundCells = numberCellsInBC.find(globalbcid);
@@ -637,6 +642,11 @@ struct EmcalCorrectionTask {
637642

638643
// Loop through all collisions and fill emcalcollisionmatch with a boolean stating, whether the collision was ambiguous (not the only collision in its BC)
639644
for (const auto& collision : collisions) {
645+
if (applySoftwareTriggerSelection) {
646+
if (!zorro.isSelected(collision.foundBC_as<BcEvSels>().globalBC())) {
647+
continue;
648+
}
649+
}
640650
auto globalbcid = collision.foundBC_as<BcEvSels>().globalIndex();
641651
auto foundColls = numberCollsInBC.find(globalbcid);
642652
auto foundCells = numberCellsInBC.find(globalbcid);
@@ -805,6 +815,11 @@ struct EmcalCorrectionTask {
805815

806816
// Loop through all collisions and fill emcalcollisionmatch with a boolean stating, whether the collision was ambiguous (not the only collision in its BC)
807817
for (const auto& collision : collisions) {
818+
if (applySoftwareTriggerSelection) {
819+
if (!zorro.isSelected(collision.foundBC_as<BcEvSels>().globalBC())) {
820+
continue;
821+
}
822+
}
808823
auto globalbcid = collision.foundBC_as<BcEvSels>().globalIndex();
809824
auto foundColls = numberCollsInBC.find(globalbcid);
810825
auto foundCells = numberCellsInBC.find(globalbcid);
@@ -977,6 +992,11 @@ struct EmcalCorrectionTask {
977992

978993
// Loop through all collisions and fill emcalcollisionmatch with a boolean stating, whether the collision was ambiguous (not the only collision in its BC)
979994
for (const auto& collision : collisions) {
995+
if (applySoftwareTriggerSelection) {
996+
if (!zorro.isSelected(collision.foundBC_as<BcEvSels>().globalBC())) {
997+
continue;
998+
}
999+
}
9801000
auto globalbcid = collision.foundBC_as<BcEvSels>().globalIndex();
9811001
auto foundColls = numberCollsInBC.find(globalbcid);
9821002
auto foundCells = numberCellsInBC.find(globalbcid);
@@ -991,7 +1011,7 @@ struct EmcalCorrectionTask {
9911011
}
9921012
PROCESS_SWITCH(EmcalCorrectionTask, processMCWithSecondaries, "run full analysis with MC info", false);
9931013

994-
void processStandalone(aod::BCs const& bcs, aod::Collisions const& collisions, FilteredCells const& cells)
1014+
void processStandalone(BcEvSels const& bcs, aod::Collisions const& collisions, FilteredCells const& cells)
9951015
{
9961016
LOG(debug) << "Starting process standalone.";
9971017
int previousCollisionId = 0; // Collision ID of the last unique BC. Needed to skip unordered collisions to ensure ordered collisionIds in the cluster table
@@ -1085,7 +1105,7 @@ struct EmcalCorrectionTask {
10851105
hasCollision = true;
10861106
mHistManager.fill(HIST("hCollisionType"), 2);
10871107
}
1088-
fillAmbigousClusterTable<aod::BC>(bc, iClusterizer, cellIndicesBC, hasCollision);
1108+
fillAmbigousClusterTable<BcEvSels::iterator>(bc, iClusterizer, cellIndicesBC, hasCollision);
10891109
}
10901110

10911111
mClusterPhi.clear();

0 commit comments

Comments
 (0)