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);
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;
void getModules(const RegSelRoI &roi, std::vector< const RegSelModule * > &modules) const
Fixme: This is the completely correct solution, where each module is allowed to be at a completely di...