Skip to content

Commit

Permalink
Fixes of bugs in class mask calculation
Browse files Browse the repository at this point in the history
- 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
  • Loading branch information
mfasDa authored and sawenzel committed Jul 10, 2024
1 parent 206cf74 commit cf732d6
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Detectors/CTP/simulation/src/Digitizer.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ void Digitizer::calculateClassMask(const std::bitset<CTP_NINPUTS> ctpinpmask, st
if (clustername == "emc") {
tvxMBemc |= tcl.name.find("minbias_TVX_L0") != std::string::npos; // 2022
}
if (tcl.descriptor->getInputsMask() & ctpinpmask.to_ullong()) {
if (tvxMBemc || (ctpinpmask.to_ullong() & tcl.descriptor->getInputsMask()) == tcl.descriptor->getInputsMask()) {
// require real physics input in any case
if (tvxMBemc) {
// if the class is a min. bias class accept it only if the MB-accept bit is set in addition
Expand All @@ -168,7 +168,7 @@ void Digitizer::calculateClassMask(const std::bitset<CTP_NINPUTS> ctpinpmask, st
}
}
} else {
if (tcl.descriptor->getInputsMask() & ctpinpmask.to_ullong()) {
if ((ctpinpmask.to_ullong() & tcl.descriptor->getInputsMask()) == tcl.descriptor->getInputsMask()) {
classmask |= tcl.classMask;
}
}
Expand Down

0 comments on commit cf732d6

Please sign in to comment.