Further speedup of LArDigitalTrigger stuff
This MR contains two things:
-
Follow-up to !70903 (merged): For SuperCells, the logic to distinguish the EMEC Inner Wheel and Outer Wheel is fairly complicated and shows up in callgrind as hotspot. The default implementation of
LArOnlineIDBase::isEMECchannel
is the logical or ofisEMECIW
andisEMECOW
, so for SuperCells the complicated logic is used. But to answer just theisEMEC
question, a much simpler (and faster) logic can be used. This MR specializes the implementation of isEMECchannel for regular cells and super-cells to do that. -
The
LArLATOMEBuilderAlg
usedpow(2,integer)
that also showed up in callgrind as hotspot. The functionality can be easily implemented a bit-shifting operation that is much faster. Note that there are more uses ofpow(2,integer)
in the execute method, but the parameters are compile-time constants and the compiler seems to be smart enough not to calculate the same value over and over again. They do not show up as hotspot.