19 #include "CLHEP/Units/SystemOfUnits.h"
51 if( !
manager.range( id_range ) ) {
58 std::vector<Identifier>::const_iterator idfirst =
helper->module_begin();
59 std::vector<Identifier>::const_iterator idlast =
helper->module_end();
69 for ( std::vector<Identifier>::const_iterator
i=idfirst ;
i!=idlast ; ++
i ) {
74 helper->get_hash( Id, hashId, &ModuleContext );
84 int multilayer =
helper->multilayer(Id);
88 char sector_l =
stationName.substr(2,1)==
"L" ?
'L' :
'S';
95 double swidth = md->
sWidth();
96 double lwidth = md->
lWidth();
103 double moduleR = std::sqrt( mmPos.mag()*mmPos.mag() - mmPos.z()*mmPos.z());
108 double rmin = moduleR-0.5*
length;
109 double rmax = std::sqrt( (moduleR+0.5*
length)*(moduleR+0.5*
length) + lwidth*lwidth/4 );
114 double dphi = ( dphi1 > dphi2 ? dphi1 : dphi2 );
117 double rcutout = moduleR+0.5*
length - ycutout;
118 double dphicutout =
std::atan( (0.5*lwidth)/rcutout );
119 if ( dphi < dphicutout ) dphi = dphicutout;
122 double phimin = mmPos.phi()-dphi;
123 double phimax = mmPos.phi()+dphi;
125 if ( phimin >
M_PI ) phimin -= 2*
M_PI;
126 if ( phimin < -
M_PI ) phimin += 2*
M_PI;
128 int layerid = multilayer;
129 int detid = (
side ==
'C' ? -1 : 1 );