15 #include "GaudiKernel/EventIDRange.h"
18 #include "CLHEP/Units/SystemOfUnits.h"
50 if( !
manager.range( id_range ) ) {
60 if ( service(
"MuonTGC_CablingSvc",
cabling ).isFailure() ) {
73 std::unique_ptr<RegSelSiLUT>
lut = std::make_unique<RegSelSiLUT>();
76 for (
auto i =
helper->module_begin();
i !=
helper->module_end(); ++
i) {
81 helper->get_module_hash(Id, hashId);
84 if (
helper->get_expanded_id( Id, exp_id, &ModuleContext)) {
85 ATH_MSG_DEBUG(
"Failed retrieving ExpandedIdentifier for PRD Identifier = " << Id.
getString() <<
". Skipping to the next PRD.");
89 int detid = ( exp_id[2]<0 ? -1 : 1 );
90 int layerid = exp_id[1]+1;
97 constexpr
int gapMin = 1;
103 chId =
helper -> channelID(Id,gapMax,0,1);
104 constexpr
int chmin = 1;
110 double activeheight = tgc->
length();
112 const double zmin = posmin.z();
113 const double zmax = posmax.z();
115 const double rmin = posctr.perp()-0.5*activeheight;
116 const double rmax = posctr.perp()+0.5*activeheight;
118 const double minTheta = std::atan2(std::abs(
zmin), rmin);
119 const double maxTheta = std::atan2(std::abs(
zmax), rmax);
123 if (
helper->stationEta(Id) < 0) {
133 double phimin = std::atan2(posctr.y(),posctr.x()) - std::atan2(activelongside/2.,posctr.perp()+activeheight/2.);
134 double phimax = std::atan2(posctr.y(),posctr.x()) + std::atan2(activelongside/2.,posctr.perp()+activeheight/2.);
136 if (phimin < 0) phimin += 2.*
M_PI;
137 if (phimax < 0) phimax += 2.*
M_PI;
140 int subDetectorId = 0;
142 cabling->getReadoutIDfromElementID(Id, subDetectorId, rodId);
143 uint32_t robId = ( ((0x0ff) & subDetectorId)<<16 ) | (rodId);