Skip to content

Commit a71327f

Browse files
authored
[PWGJE,EMCAL-670] Core/emcalCrossTalEmulation: fix cell ID outside li… (#12419)
1 parent e73282d commit a71327f

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

PWGJE/Core/emcalCrossTalkEmulation.cxx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -527,7 +527,7 @@ void EMCCrossTalk::addInducedEnergiesToNewCells()
527527
}
528528

529529
// Avoid cells out of SM
530-
if (ietai < 0 || ietai >= emcal::EMCAL_COLS || iphii < 0 || iphii >= emcal::EMCAL_ROWS) {
530+
if (ietai < 0 || ietai >= NColumns[iSM] || iphii < 0 || iphii >= NRows[iSM]) {
531531
continue;
532532
}
533533

PWGJE/Core/emcalCrossTalkEmulation.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -127,6 +127,9 @@ static constexpr int FirstDCal23SM = 12; // index of the first 2/3 DCal SM
127127
static constexpr int LastDCal23SM = 17; // index of the last 2/3 DCal SM
128128
static constexpr float MinCellEnergy = 0.01f; // Minimum energy a new cell needs to be added
129129

130+
static constexpr int NColumns[NSM] = {48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 32, 32, 32, 32, 32, 32, 48, 48};
131+
static constexpr int NRows[NSM] = {24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 8, 8, 24, 24, 24, 24, 24, 24, 8, 8};
132+
130133
// these labels are for later once labeledArrays work on hyperloop. Currently they sadly only allow fixed size not variable size.
131134
// static const std::vector<std::string> labelsSM{"SM0/all", "SM1", "SM2", "SM3", "SM4", "SM5", "SM6", "SM7", "SM8", "SM9", "SM10", "SM11", "SM12", "SM13", "SM14", "SM15", "SM16", "SM17", "SM18", "SM19"};
132135
// static const std::vector<std::string> labelsCells = {"Up&Down", "Up&Down x Left|Right", "Left|Right", "2Up&Down + 2Up&Down xLeft|Right"};

0 commit comments

Comments
 (0)