14 #include "GaudiKernel/EventIDRange.h"
17 #include "CLHEP/Units/SystemOfUnits.h"
55 if( !
manager.range( id_range ) ) {
65 std::vector<Identifier>::const_iterator idfirst =
helper->module_begin();
66 std::vector<Identifier>::const_iterator idlast =
helper->module_end();
76 for ( std::vector<Identifier>::const_iterator
i=idfirst ;
i!=idlast ; ++
i ) {
81 helper->get_hash( Id, hashId, &ModuleContext );
89 int multilayer =
helper->multilayer(Id);
91 char side =
mm->getStationEta() < 0 ?
'C' :
'A';
93 char sector_l =
stationName.substr(2,1)==
"L" ?
'L' :
'S';
103 double swidth = md->
sWidth();
104 double lwidth = md->
lWidth();
109 double moduleR = std::sqrt( mmPos.mag()*mmPos.mag() - mmPos.z()*mmPos.z());
116 double rmin = moduleR-0.5*
length;
117 double rmax = std::sqrt( (moduleR+0.5*
length)*(moduleR+0.5*
length) + 0.25*lwidth*lwidth );
122 double dphi = ( dphi1 > dphi2 ? dphi1 : dphi2 );
124 double phimin = mmPos.phi()-dphi;
125 double phimax = mmPos.phi()+dphi;
127 if ( phimin >
M_PI ) phimin -= 2*
M_PI;
128 if ( phimin < -
M_PI ) phimin += 2*
M_PI;
130 if ( phimax >
M_PI ) phimax -= 2*
M_PI;
131 if ( phimax < -
M_PI ) phimax += 2*
M_PI;
133 int layerid = multilayer;
134 int detid = (
side ==
'C' ? -1 : 1 );