52 if( !manager.range( id_range ) ) {
53 ATH_MSG_ERROR(
"Failed to retrieve validity range for " << manager.key());
59 const MmIdHelper* helper = manager->mmIdHelper();
62 std::vector<Identifier>::const_iterator idfirst = helper->module_begin();
63 std::vector<Identifier>::const_iterator idlast = helper->module_end();
66 const IdContext ModuleContext = helper->module_context();
70 std::unique_ptr<RegSelSiLUT> lut = std::make_unique<RegSelSiLUT>(
RegSelSiLUT::MM);
72 for ( std::vector<Identifier>::const_iterator i=idfirst ; i!=idlast ; ++i ) {
77 helper->get_hash( Id, hashId, &ModuleContext );
82 std::string stationName=mm->getStationName();
83 int stationEta=mm->getStationEta();
84 int stationPhi=mm->getStationPhi();
85 int multilayer = helper->multilayer(Id);
87 char side = mm->getStationEta() < 0 ?
'C' :
'A';
92 double swidth = mm->getSsize();
93 double lwidth = mm->getLongSsize();
95 double length = mm->getRsize();
96 double depth = mm->getZsize();
98 double moduleR = std::sqrt( mmPos.mag()*mmPos.mag() - mmPos.z()*mmPos.z());
100 double zmin = mmPos.z()-0.5*
depth;
101 double zmax = mmPos.z()+0.5*
depth;
105 double rmin = moduleR-0.5*
length;
106 double rmax = std::sqrt( (moduleR+0.5*
length)*(moduleR+0.5*
length) + 0.25*lwidth*lwidth );
108 double dphi1 = std::atan( (0.5*lwidth)/(moduleR+0.5*
length) );
109 double dphi2 = std::atan( (0.5*swidth)/(moduleR-0.5*
length) );
111 double dphi = ( dphi1 > dphi2 ? dphi1 : dphi2 );
113 double phimin = mmPos.phi()-dphi;
114 double phimax = mmPos.phi()+dphi;
116 if ( phimin >
M_PI ) phimin -= 2*
M_PI;
117 if ( phimin < -
M_PI ) phimin += 2*
M_PI;
119 if ( phimax >
M_PI ) phimax -= 2*
M_PI;
120 if ( phimax < -
M_PI ) phimax += 2*
M_PI;
122 int layerid = multilayer;
123 int detid = ( side ==
'C' ? -1 : 1 );
127 for(uint32_t robId : robIdHelper.
get_ids()){
128 RegSelModule m( zmin, zmax, rmin, rmax, phimin, phimax, layerid, detid, robId, hashId );
This class saves the "context" of an expanded identifier (ExpandedIdentifier) for compact or hash ver...