42 for ( ; itr!=
m_phimaps.end() ; ++itr ) (*itr).clear();
62 if ( mod_rmax<r_in ) r_in=mod_rmax;
72 double r2_in = 2*(r_in+4);
78 return cluster.
size();
91 double pmin =
m.phiMin();
92 double pmax =
m.phiMax();
96 double overlap = 0.2*std::fabs(pmax-pmin);
99 bool notoverlaping =
true;
111 notoverlaping =
false;
116 if ( notoverlaping ) {
170 std::vector<const RegSelModule*>::const_iterator mptr(
m_modules.begin());
171 for ( ; mptr!=
m_modules.end() ; ++mptr ) {
172 if ( !(*mptr)->enabled() )
m_disabled.push_back(*mptr);
206 std::vector<const RegSelModule*>::const_iterator mptr(
m_modules.begin());
208 for ( ; mptr!=
m_modules.end() ; mptr++ ) {
210 if ( (*mptr)->enabled() && (*mptr)->inRoI(roi) ) {
212 modules.push_back(*mptr);
226 int roi_phiWidth = roi_phiMax-roi_phiMin;
235 if ( roi_phiWidth>=
m_Nphi ) {
236 if ( roi_phiMin>roi_phiMax ) noswap =
false;
244 if ( roi_phiMax>=
m_Nphi ) { roi_phiMax -=
m_Nphi; noswap=
false; }
245 if ( roi_phiMin<0 ) { roi_phiMin +=
m_Nphi; noswap=
false; }
246 if ( roi_phiMin==0 && roi_phiMax<
m_Nphi-1 && roi_phiMax!=0 ) { roi_phiMin =
m_Nphi-1; noswap=
false; }
258 for (
int i=roi_phiMin ;
i<=roi_phiMax ;
i++ ) {
259 std::vector<const RegSelModule*>::const_iterator mptr(
m_phimaps[
i].
begin());
260 std::vector<const RegSelModule*>::const_iterator eptr(
m_phimaps[
i].
end());
261 for ( ; mptr!=eptr ; ++mptr ) {
262 if ( (*mptr)->enabled() && (*mptr)->inRoI(roi) ) modules.push_back(*mptr);
269 for (
int i=0 ;
i<=roi_phiMax ;
i++ ) {
270 std::vector<const RegSelModule*>::const_iterator mptr(
m_phimaps[
i].
begin());
271 std::vector<const RegSelModule*>::const_iterator eptr(
m_phimaps[
i].
end());
272 for ( ; mptr!=eptr ; ++mptr ) {
273 if ( (*mptr)->enabled() && (*mptr)->inRoI(roi) ) modules.push_back(*mptr);
279 int firstbin = (roi_phiMin<roi_phiMax?roi_phiMax+1:roi_phiMin);
280 for (
int i=firstbin ;
i<
m_Nphi ;
i++ ) {
281 std::vector<const RegSelModule*>::const_iterator mptr(
m_phimaps[
i].
begin());
282 std::vector<const RegSelModule*>::const_iterator eptr(
m_phimaps[
i].
end());
283 for ( ; mptr!=eptr ; ++mptr ) {
284 if ( (*mptr)->enabled() && (*mptr)->inRoI(roi) ) modules.push_back(*mptr);
296 std::vector<const RegSelModule*>::const_iterator mptr(
m_modules.begin());
297 std::vector<const RegSelModule*>::const_iterator eptr(
m_modules.end());
298 for ( ; mptr!=eptr ; ++mptr )
if ( (*mptr)->enabled() ) modules.push_back(*mptr);
319 std::vector<const RegSelModule*>::const_iterator mptr(
m_disabled.begin());
324 if ( (*mptr)->enabled()==
false && (*mptr)->inRoI(roi) ) {
326 modules.push_back(*mptr);
340 if (
m_Nphi == 0 )
return;
352 std::set<const RegSelModule*> tmap;
356 std::vector<const RegSelModule*>::const_iterator mptr(
m_modules.begin());
357 for ( ; mptr!=
m_modules.end() ; ++mptr ) {
359 double phicent = 0.5*((*mptr)->phiMax()+(*mptr)->phiMin());
361 if ( (*mptr)->rMax()>trmax ) trmax = (*mptr)->rMax();
364 if ( (*mptr)->phiMax()<(*mptr)->phiMin() ) phicent +=
M_PI;
366 if ( phicent>
M_PI ) phicent -= 2*
M_PI;
367 if ( phicent<-
M_PI ) phicent += 2*
M_PI;
376 if ( tmap.find(*mptr)!=tmap.end() )
continue;
392 return s <<
"[ layer ID=" <<
layer.ID()
393 <<
",\tNmodules=" <<
layer.size()
394 <<
",\tr=" <<
layer.rMin() <<
" - " <<
layer.rMax()
395 <<
",\tz=" <<
layer.zMin() <<
" - " <<
layer.zMax()