Skip to content

Commit e3a7192

Browse files
mfasDachiarazampolli
authored andcommitted
Fixes of bugs in class mask calculation
- Bypass in EMCAL C0TVX case needed as the the input mask is manipulated to mimic trigger accept - Order of trigger mask check was wrong, ctpinuptmask is a superset of tcl input mask - Check of trigger class inpuyt mask was only based on bitwise and, missing the check for equalty with the class mask, making the condition always true (cherry picked from commit cf732d6)
1 parent 9c73016 commit e3a7192

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Detectors/CTP/simulation/src/Digitizer.cxx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -151,7 +151,7 @@ void Digitizer::calculateClassMask(const std::bitset<CTP_NINPUTS> ctpinpmask, st
151151
if (clustername == "emc") {
152152
tvxMBemc |= tcl.name.find("minbias_TVX_L0") != std::string::npos; // 2022
153153
}
154-
if (tcl.descriptor->getInputsMask() & ctpinpmask.to_ullong()) {
154+
if (tvxMBemc || (ctpinpmask.to_ullong() & tcl.descriptor->getInputsMask()) == tcl.descriptor->getInputsMask()) {
155155
// require real physics input in any case
156156
if (tvxMBemc) {
157157
// if the class is a min. bias class accept it only if the MB-accept bit is set in addition
@@ -168,7 +168,7 @@ void Digitizer::calculateClassMask(const std::bitset<CTP_NINPUTS> ctpinpmask, st
168168
}
169169
}
170170
} else {
171-
if (tcl.descriptor->getInputsMask() & ctpinpmask.to_ullong()) {
171+
if ((ctpinpmask.to_ullong() & tcl.descriptor->getInputsMask()) == tcl.descriptor->getInputsMask()) {
172172
classmask |= tcl.classMask;
173173
}
174174
}

0 commit comments

Comments
 (0)