ATLAS Offline Software
RegSelSiLUT.cxx
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
3 */
4 
5 /**************************************************************************
6  **
7  ** File: RegSelSiLUT.cxx
8  **
9  ** Description: RegionSelector Si LUT code
10  **
11  **
12  **
13  ** Author: M.Sutton
14  **
15  ** Created: Wed Apr 4 16:04:30 BST 2007
16  ** Modified:
17  **
18  **
19  **
20  **************************************************************************/
21 
22 #include "RegSelLUT/RegSelSiLUT.h"
23 #include "RegSelLUT/RegSelModule.h"
24 #include "RegSelLUT/RegSelTimer.h"
25 
26 #include "RegSelLUT/RegSelROB.h"
27 
28 #include <iostream>
29 #include <fstream>
30 #include <set>
31 
32 
33 
34 
36 
38 
39 void RegSelSiLUT::HashIDList( const IRoiDescriptor& roi, std::vector<IdentifierHash>& idlist ) const {
40  if ( roi.isFullscan() ) return getHashList( idlist );
41  RegSelRoI roitmp( roi.zedMinus(), roi.zedPlus(), roi.phiMinus(), roi.phiPlus(), roi.etaMinus(), roi.etaPlus() );
42  getHashList( roitmp, idlist );
43  if ( m_ID == MM || m_ID == sTGC ) removeDuplicates( idlist );
44 }
45 
46 
47 void RegSelSiLUT::HashIDList( long layer, const IRoiDescriptor& roi, std::vector<IdentifierHash>& idlist ) const {
48  if ( roi.isFullscan() ) return getHashList( layer, idlist );
49  RegSelRoI roitmp( roi.zedMinus(), roi.zedPlus(), roi.phiMinus(), roi.phiPlus(), roi.etaMinus(), roi.etaPlus() );
50  getHashList( roitmp, layer, idlist );
51  if ( m_ID == MM || m_ID == sTGC ) removeDuplicates( idlist );
52 }
53 
55 
56 void RegSelSiLUT::ROBIDList( const IRoiDescriptor& roi, std::vector<uint32_t>& roblist ) const {
57  if ( roi.isFullscan() ) return getRobList( roblist );
58  RegSelRoI roitmp( roi.zedMinus(), roi.zedPlus(), roi.phiMinus(), roi.phiPlus(), roi.etaMinus(), roi.etaPlus() );
59  getRobList( roitmp, roblist);
60 }
61 
62 
63 void RegSelSiLUT::ROBIDList( long layer, const IRoiDescriptor& roi, std::vector<uint32_t>& roblist ) const {
64  if ( roi.isFullscan() ) return getRobList( layer, roblist );
65  RegSelRoI roitmp( roi.zedMinus(), roi.zedPlus(), roi.phiMinus(), roi.phiPlus(), roi.etaMinus(), roi.etaPlus() );
66  getRobList( roitmp, layer, roblist);
67 }
68 
69 
70 
72 
74  RegSelName(r.getName()), m_ID(r.ID()) {
75  construct();
76  addModules(r.getModules());
77  initialise();
78 }
79 
80 RegSelSiLUT::RegSelSiLUT(const std::string& s) :
81  m_ID(UNDEF) {
82  read(s);
83 }
84 
85 
86 // this is no longer needed, since the RegSelSiLUT now configures
87 // the number of subdetectors and layers for each subdetector
88 // automatically
89 
91 {
92  const std::string s[7] = { "", "pixel", "sct", "trt", "ftk", "mm", "stgc" };
93  m_name = s[m_ID];
94 }
95 
96 
97 
98 
99 // clear the look up table
101  for ( unsigned i=0 ; i<m_SubDet.size() ; i++ ) m_SubDet[i].reset();
102  m_map.clear();
103 }
104 
105 
106 
107 
108 // initialise the look up table from the main vector of RegSelModules
109 
111 
112  // struct timeval inittimer = gtttimer_start();
113 
114  // find out how many subdetectors there are
115 
116  std::vector<int> subdetid;
117 
118  for ( std::vector<RegSelModule>::iterator mptr = m_modules.begin() ;
119  mptr!=m_modules.end() ; ++mptr ) {
120  int detid = mptr->detector();
121 
122  bool found = false;
123  for ( int j=subdetid.size() ; j-- ; ) if ( subdetid[j]==detid ) found = true;
124 
125  if ( !found ) subdetid.push_back(detid);
126  }
127 
128  // std::cout << "\tRegSelSiLUT::initialise() creating detector with " << subdetid.size() << " subdetectors" << std::endl;
129 
130  // std::cout << "RegSelSiLUT::initialise()" << std::endl;
131 
132  m_SubDet.reserve(subdetid.size());
133 
134  // push each one to the list
135  for ( int i=subdetid.size() ; i-- ; ) {
136  m_SubDet.push_back( RegSelSubDetector(subdetid[i]) );
137  m_idmap.insert( std::map<int, int>::value_type(subdetid[i], i) );
138 
139  //int ii = subdetid.size()-1-i;
140  //std::cout << "\tsubdet " << ii << "\tid " << subdetid[ii] << std::endl;
141  }
142 
143 
144 
145 
146  // initialise the subdetector look up tables
147  for ( unsigned i=0 ; i<m_SubDet.size() ; i++ ) m_SubDet[i].addModules(m_modules);
148 
149  // std::cout << "\tRegSelSiLUT " << getName() << std::endl;
150  // write(getName()+".map");
151 
152  // std::cout << "RegSelSiLUT::initialise() creating hash map" << std::endl;
153 
154  // and save pointers to all the modules in a map by hashid
155  for ( std::vector<RegSelModule>::iterator mptr = m_modules.begin() ;
156  mptr!=m_modules.end() ; ++mptr ) {
157  m_map[(*mptr).hashID()] = &(*mptr);
158  }
159 
160  // std::cout << "RegSelSiLUT::initialise() exiting" << std::endl;
161 
162  // double inittime = gtttimer_stop(inittimer);
163  // std::cout << "initialise time=" << inittime << std::endl;
164 
167 
171 
172 }
173 
174 
176 
177  m_allHashes.clear();
178  m_allROBids.clear();
179 
180  std::set<uint32_t> robids;
181 
182  std::vector<RegSelModule>::const_iterator mptr(m_modules.begin());
183  std::vector<RegSelModule>::const_iterator eptr(m_modules.end());
184  for ( ; mptr!=eptr ; ++mptr ) {
185  if ( (*mptr).enabled() ) {
186  m_allHashes.push_back((*mptr).hashID());
187  robids.insert((*mptr).robID());
188  }
189  }
190 
191  std::set<uint32_t>::iterator ritr(robids.begin());
192  while ( ritr!=robids.end() ) {
193  m_allROBids.push_back(*ritr++);
194  }
195 
196 }
197 
198 
199 
200 // initialise the disabled module lists for
201 // each subdetector layer
202 
205  sptr!=m_SubDet.end() ; ++sptr ) {
206  (*sptr).setupDisabledModules();
207  }
208 }
209 
210 
211 
212 // find a module from it's hashID
214  std::map<const IdentifierHash, const RegSelModule*>::const_iterator hptr(m_map.find(h));
215  if ( hptr!=m_map.end() ) return hptr->second;
216  else return NULL;
217 }
218 
219 
220 
221 
223  std::map<int,int>::iterator sitr = m_idmap.find(id);
224  if ( sitr!=m_idmap.end() ) m_SubDet[sitr->second].disable();
225 }
226 
228  std::map<int,int>::iterator sitr = m_idmap.find(id);
229  if ( sitr!=m_idmap.end() ) m_SubDet[sitr->second].enable();
230 }
231 
232 void RegSelSiLUT::disableLayer(int id, unsigned layer) {
233  std::map<int,int>::iterator sitr = m_idmap.find(id);
234  if ( sitr!=m_idmap.end() ) m_SubDet[sitr->second].disableLayer(layer);
235 }
236 
237 void RegSelSiLUT::enableLayer(int id, unsigned layer) {
238  std::map<int,int>::iterator sitr = m_idmap.find(id);
239  if ( sitr!=m_idmap.end() ) m_SubDet[sitr->second].enableLayer(layer);
240 }
241 
242 
243 
244 bool RegSelSiLUT::getRoIData(const RegSelRoI& roi, std::vector<const RegSelModule*>& modules) const
245 {
246  // std::cout << "RegSelSiLUT::getRoIData() ID=" << ID() << "\t" << roi << std::endl;
247 
248  bool inDet = false;
249 
250  for ( unsigned i=0 ; i<m_SubDet.size() ; i++ ) {
251  bool inSubDet = m_SubDet[i].inRoI(roi);
252  inDet |= inSubDet;
253  // std::cout << "\tRegSelSiLUT::getRoIData() SubDet id " << m_SubDet[i].ID() << std::endl;
254  if ( inSubDet ) m_SubDet[i].getModules(roi, modules);
255  }
256 
257  // std::cout << "RegSelSiLUT::getRoIData() Nmodules=" << modules.size() << std::endl;
258  // for ( int i=0 ; i<modules.size() ; i++ ) modules[i]->paw();
259 
260  return inDet;
261 }
262 
263 
264 
265 
266 void RegSelSiLUT::getModules( unsigned layer, std::vector<const RegSelModule*>& modules) const {
267  modules.reserve(256);
268 
270  bool subdetflag = layer/1000;
271  int subdet = 0;
272  int ilayer = layer%100;
273  if ( subdetflag ) subdet = (layer%1000)/100;
274 
275  for ( unsigned i=0 ; i<m_SubDet.size() ; i++ ) {
276  if ( !subdetflag || ( subdetflag && subdet==std::fabs(m_SubDet[i].ID()) ) ) m_SubDet[i].getModules( ilayer, modules);
277  }
278  }
279 
280 
281 
285 
286 bool RegSelSiLUT::getRoIData(const RegSelRoI& roi, unsigned layer, std::vector<const RegSelModule*>& modules) const
287 {
288  // std::cout << "RegSelSiLUT::getRoIData() ID=" << ID() << std::endl;
289 
290  bool inDet = false;
291 
292 
293  int ilayer = layer%100;
295  bool subdetflag = layer/1000;
296  int subdet = 0;
297  if ( subdetflag ) subdet = (layer%1000)/100;
298 
299  for ( unsigned i=0 ; i<m_SubDet.size() ; i++ ) {
300 
301  if ( !subdetflag || ( subdetflag && subdet==std::fabs(m_SubDet[i].ID()) ) ) {
302  bool inSubDet = m_SubDet[i].inRoI(roi);
303  inDet |= inSubDet;
304  if ( inSubDet ) m_SubDet[i].getModules(roi, ilayer, modules);
305  }
306  }
307 
308 
309 
310 
311  // std::cout << "RegSelSiLUT::getRoIData() Nmodules=" << modules.size() << std::endl;
312  // for ( int i=0 ; i<modules.size() ; i++ ) modules[i]->paw();
313 
314  return inDet;
315 }
316 
317 
318 
319 
320 
321 bool RegSelSiLUT::getRoIData(const RegSelRoI& roi, unsigned subdetector, unsigned layer, std::vector<const RegSelModule*>& modules) const
322 {
323  // std::cout << "RegSelSiLUT::getRoIData() ID=" << ID() << std::endl;
324 
325  bool inDet = false;
326 
327  if ( subdetector<m_SubDet.size() ) {
328  inDet = m_SubDet[subdetector].inRoI(roi);
329  if ( inDet ) m_SubDet[subdetector].getModules(roi, layer, modules);
330  }
331  // std::cout << "RegSelSiLUT::getRoIData() Nmodules=" << modules.size() << std::endl;
332  // for ( int i=0 ; i<modules.size() ; i++ ) modules[i]->paw();
333 
334  return inDet;
335 }
336 
337 
338 
339 
340 
341 
342 double phiprime(double x, double y, double phi, double r, bool& status) {
343 
344  if ( x*x+y*y>r*r ) {
345  // std::cerr << "duffer x=" << x << "\ty=" << y << "\tr=" << r << std::endl;
346  status = false;
347  return 0;
348  }
349 
350  double a = (y*cos(phi)-x*sin(phi))/r;
351 
352  // this is bad, getting the return value to issue an error code.
353  // ouch! should maybe define an exception and catch it?
354  // this should never happen
355  if ( fabs(a)>1 ) { status = false; return 0; }
356 
357  status &= true;
358 
359  double phip = asin(a)+phi;
360 
361  // std::cout << "phiprime()\tx=" << x << "\ty=" << y << "\tphi=" << phi << "\tr=" << r << "\tphiprime=" << phip << " before" << std::endl;
362 
363  // make sure wrapped between -pi to pi
364  if ( phip>M_PI ) phip = phip-2*M_PI;
365  if ( phip<-M_PI ) phip = phip+2*M_PI;
366 
367  // std::cout << "phiprime()\tx=" << x << "\ty=" << y << "\tphi=" << phi << "\tr=" << r << "\tphiprime=" << phip << std::endl;
368 
369  return phip;
370 
371 }
372 
373 
374 bool philimits( double x, double y, double rmin, double rmax, double& phimin, double& phimax ) {
375 
376  double phi[4];
377 
378  bool status = true;
379 
380  // std::cout << "phimin=" << phimin << "\tphimax=" << phimax << "\tlimits" << std::endl;
381 
382  phi[0] = phiprime(x, y, phimin, rmin, status);
383  phi[1] = phiprime(x, y, phimin, rmax, status);
384 
385  phi[2] = phiprime(x, y, phimax, rmin, status);
386  phi[3] = phiprime(x, y, phimax, rmax, status);
387 
388  // for ( int i=0 ; i<4 ; i++ ) std::cout << "phi[" << i << "]=" << phi[i] << std::endl;
389 
390  if ( status ) {
391 
392  // this is needed to take account of the phi=pi boundary, it's not rigorous, but it works
393 
394  if ( phi[0]*phi[1]<0 && (phi[0]>0.5*M_PI||phi[1]>0.5*M_PI) ) phimin = ( phi[0]<phi[1] ? phi[1] : phi[0] );
395  else phimin = ( phi[0]<phi[1] ? phi[0] : phi[1] );
396 
397  if ( phi[2]*phi[3]<0 && (phi[2]>0.5*M_PI||phi[3]>0.5*M_PI) ) phimax = ( phi[2]>phi[3] ? phi[3] : phi[2] );
398  else phimax = ( phi[2]>phi[3] ? phi[2] : phi[3] );
399 
400  }
401 
402  // std::cout << "phimin=" << phimin << "\tphimax=" << phimax << "\tlimits (out)" << std::endl;
403 
404  return status;
405 
406 }
407 
408 
409 bool RegSelSiLUT::getRoIData(const RegSelRoI& roi, std::vector<const RegSelModule*>& modules, double x, double y) const
410 {
411 
412  if ( x==0 && y==0 ) return getRoIData(roi, modules);
413 
414  bool inDet = false;
415 
416  for ( unsigned i=0 ; i<m_SubDet.size() ; i++ ) {
417 
418 #if 1
419 
420  const std::vector<RegSelLayer>& layers = m_SubDet[i].getLayers();
421 
422  for ( unsigned j=0 ; j<layers.size() ; j++ ) {
423 
424  double rmin = layers[j].rMin();
425  double rmax = layers[j].rMax();
426 
427  double phimin = roi.getphiMin();
428  double phimax = roi.getphiMax();
429 
430  // std::cout << layers[j] << "\t" << rmin << " " << rmax << std::endl;
431 
432  // std::cout << "lyr[" << j << "] " << "\tphimin=" << phimin << "\tphimax=" << phimax << "\tbefore" << std::endl;
433 
434  if ( philimits(x, y, rmin, rmax, phimin, phimax) ) {
435 
436  // std::cout << layers[j] << "\tphimin=" << phimin << "\tphimax=" << phimax << std::endl;
437 
438  RegSelRoI troi( roi.getzMin(), roi.getzMax(), phimin, phimax, roi.getetaMin(), roi.getetaMax() );
439 
440 
441  bool inLayer = layers[j].inRoI(troi);
442 
443  inDet |= inLayer;
444 
445  if ( inLayer ) layers[j].getModules(troi, modules);
446 
447  }
448 
449  }
450 
451 #else
452 
453 
454  double rmin = m_SubDet[i].rMin();
455  double rmax = m_SubDet[i].rMax();
456 
457  double phimin = roi.getphiMin();
458  double phimax = roi.getphiMax();
459 
460  // std::cout << layers[j] << "\t" << rmin << " " << rmax << std::endl;
461 
462  philimits(x, y, rmin, rmax, phimin, phimax);
463 
464  // std::cout << layers[j] << "\tphimin=" << phimin << "\tphimax=" << phimax << std::endl;
465 
466  RegSelRoI troi( roi.getzMin(), roi.getzMax(), phimin, phimax, roi.getetaMin(), roi.getetaMax() );
467 
468  bool inSubDet = m_SubDet[i].inRoI(troi);
469  inDet |= inSubDet;
470  if ( inSubDet ) m_SubDet[i].getModules(troi, modules);
471 
472 #endif
473 
474  }
475  // std::cout << "getRoIData() time=" << _time << " ms (shifted)" << std::endl;
476 
477  // std::cout << "RegSelSiLUT::getRoIData() Nmodules=" << modules.size() << std::endl;
478 
479  return inDet;
480 }
481 
482 
483 
484 
485 bool RegSelSiLUT::getRoIData(const RegSelRoI& roi, unsigned subdetector, unsigned layer, std::vector<const RegSelModule*>& modules, double x, double y) const
486 {
487 
488  if ( x==0 && y==0 ) return getRoIData(roi, subdetector, layer, modules);
489 
490  // std::cout << "RegSelSiLUT::getRoIData() ID=" << ID() << std::endl;
491 
492  // struct timeval _timer = gtttimer_start();
493 
494  bool inDet = false;
495 
496  if ( subdetector<m_SubDet.size() ) {
497 
498  const std::vector<RegSelLayer>& layers = m_SubDet[subdetector].getLayers();
499 
500  if ( layer<layers.size() ) {
501 
502  double rmin = layers[layer].rMin();
503  double rmax = layers[layer].rMax();
504 
505  double phimin = roi.getphiMin();
506  double phimax = roi.getphiMax();
507 
508  // std::cout << layers[j] << "\t" << rmin << " " << rmax << std::endl;
509  // std::cout << "lyr[" << subdetector << "] " << "\tphimin=" << phimin << "\tphimax=" << phimax << "\tbefore" << std::endl;
510 
511  if ( philimits(x, y, rmin, rmax, phimin, phimax) ) {
512 
513  // std::cout << layers[j] << "\tphimin=" << phimin << "\tphimax=" << phimax << std::endl;
514  // std::cout << "lyr[" << subdetector << "] " << "\tphimin=" << phimin << "\tphimax=" << phimax << std::endl;
515 
516  RegSelRoI troi( roi.getzMin(), roi.getzMax(), phimin, phimax, roi.getetaMin(), roi.getetaMax() );
517 
518  bool inLayer = layers[layer].inRoI(troi);
519 
520  inDet |= inLayer;
521 
522  if ( inLayer ) layers[layer].getModules(troi, modules);
523 
524  }
525  }
526  }
527 
528  // double _time = gtttimer_stop(_timer);
529 
530  // std::cout << "getRoIData() time=" << _time << " ms (shifted)" << std::endl;
531 
532  // std::cout << "RegSelSiLUT::getRoIData() Nmodules=" << modules.size() << std::endl;
533  // for ( int i=0 ; i<modules.size() ; i++ ) modules[i]->paw();
534 
535  return inDet;
536 }
537 
538 
539 
540 
541 
542 
543 void RegSelSiLUT::write(std::ostream& s) const {
544  s << m_modules.size() << std::endl;
545  for ( unsigned i=0 ; i<m_modules.size() ; i++ ) {
546  s << m_modules[i] << std::endl;
547  }
548 }
549 
550 void RegSelSiLUT::write(const std::string& s) const {
551  std::ofstream outfile(s.c_str());
552  write(outfile);
553 }
554 
555 
556 
557 
558 // get the rob list and hash id's for an roi
559 void RegSelSiLUT::getRobHashList(const RegSelRoI& roi, std::vector<uint32_t>& roblist, std::vector<IdentifierHash>& hashlist) const
560 {
561  std::vector<const RegSelModule*> modules;
562  if ( modules.size()<256 ) modules.reserve(256);
563 
564  // get the modules
565  getRoIData(roi,modules);
566 
567  // fill the rob and hashid lists
568 
569  std::set<uint32_t> uroblist;
570 
571  hashlist.reserve(modules.size());
572  roblist.reserve(modules.size());
573  std::vector<const RegSelModule*>::iterator mptr(modules.begin());
574  while ( mptr!=modules.end() ) {
575  hashlist.push_back((*mptr)->hashID());
576  roblist.push_back((*mptr++)->robID());
577  }
578  // removeDuplicates( hashlist );
579  removeDuplicates( roblist );
580 
581  // roblist.reserve(uroblist.size());
582  // std::set<uint32_t>::iterator plist(uroblist.begin());
583  // while ( plist!=uroblist.end() ) {
584  // roblist.push_back(*plist++);
585  // }
586 
587 }
588 
589 
590 
591 // get the rob list and hash id's for an roi
592 void RegSelSiLUT::getRobHashList(const RegSelRoI& roi, unsigned layer, std::vector<uint32_t>& roblist, std::vector<IdentifierHash>& hashlist) const
593 {
594  std::vector<const RegSelModule*> modules;
595  if ( modules.size()<256 ) modules.reserve(256);
596 
597  // get the modules
598  getRoIData(roi, layer, modules);
599 
600  // fill the rob and hashid lists
601 
602  std::set<uint32_t> uroblist;
603 
604  hashlist.reserve(modules.size());
605  roblist.reserve(modules.size());
606  std::vector<const RegSelModule*>::iterator mptr(modules.begin());
607  while ( mptr!=modules.end() ) {
608  hashlist.push_back((*mptr)->hashID());
609  roblist.push_back((*mptr++)->robID());
610  }
611  // removeDuplicates( hashlist );
612  removeDuplicates( roblist );
613 
614  // roblist.reserve(uroblist.size());
615  // std::set<uint32_t>::iterator plist(uroblist.begin());
616  // while ( plist!=uroblist.end() ) {
617  // roblist.push_back(*plist++);
618  // }
619 
620 }
621 
622 
623 void RegSelSiLUT::getRobList(const RegSelRoI& roi, std::vector<uint32_t>& roblist, bool removeduplicates ) const {
624 
625  std::vector<const RegSelModule*> modules;
626  if ( modules.size()<256 ) modules.reserve(256);
627 
628  // struct timeval datatimer = gtttimer_start();
629  getRoIData(roi,modules);
630  // double datatime = gtttimer_stop(datatimer);
631 
632 #if 0
633  // get the list of unique rob identifiers
634  // FIXME: this uses a set, sould be *much* faster
635  // with a seperate list of robids with their modules'
636  // corresponding extents in r, phi and z etc
637  std::set<uint32_t> uroblist;
638 
639  std::vector<const RegSelModule*>::iterator mptr(modules.begin());
640  while ( mptr!=modules.end() ) {
641  uroblist.insert((*mptr++)->robID());
642  }
643 
644  roblist.reserve(uroblist.size());
645  std::set<uint32_t>::iterator plist(uroblist.begin());
646  while ( plist!=uroblist.end() ) {
647  roblist.push_back(*plist++);
648  }
649 
650 #endif
651 
654  std::vector<const RegSelModule*>::iterator mptr(modules.begin());
655 
656  roblist.reserve(modules.size());
657  while ( mptr!=modules.end() ) roblist.push_back((*mptr++)->robID());
658  if ( removeduplicates || roblist.size()>2000 ) removeDuplicates( roblist );
659 
660  // double vectortime = gtttimer_stop(datatimer);
661 
662  // std::cout << "RegSelSiLUT::getRobList() datatime=" << datatime
663  // << "\tvectortime=" << vectortime << "\tf="
664  // << 100*(vectortime-datatime)/vectortime << std::endl;
665 
666 }
667 
668 
669 
670 
671 
672 
673 
674 void RegSelSiLUT::getRobList(const RegSelRoI& roi, std::vector<uint32_t>& roblist, double x, double y ) const {
675 
676  std::vector<const RegSelModule*> modules;
677  if ( modules.size()<256 ) modules.reserve(256);
678 
679  // struct timeval datatimer = gtttimer_start();
680  getRoIData( roi, modules, x, y );
681  // double datatime = gtttimer_stop(datatimer);
682 
683 #if 0
684  std::set<uint32_t> uroblist;
685 
686  std::vector<const RegSelModule*>::iterator mptr(modules.begin());
687  while ( mptr!=modules.end() ) {
688  uroblist.insert((*mptr++)->robID());
689  }
690 
691  roblist.reserve(uroblist.size());
692  std::set<uint32_t>::iterator plist(uroblist.begin());
693  while ( plist!=uroblist.end() ) {
694  roblist.push_back(*plist++);
695  }
696 
697 #endif
698 
699  roblist.reserve(modules.size());
700  std::vector<const RegSelModule*>::iterator mptr(modules.begin());
701  while ( mptr!=modules.end() ) roblist.push_back((*mptr++)->robID());
702  removeDuplicates( roblist );
703 
704 }
705 
706 
707 
708 
709 
710 
711 // enable all the modules
714  while ( itr!=m_modules.end() ) (*itr++).enable();
717 }
718 
719 
720 
721 // disable all the modules
724  while ( itr!=m_modules.end() ) (*itr++).disable();
727 }
728 
729 
730 
731 
732 // disable the modules from requested robs in the look up tables
733 void RegSelSiLUT::disableRobList(const std::vector<uint32_t>& roblist) {
734 
735  std::set<uint32_t> robset;
736  for ( unsigned i=0 ; i<roblist.size() ; i++ ) robset.insert(roblist[i]);
737 
739  for ( ; itr!=m_modules.end() ; ++itr ) {
740  // this module's rob is on the list, so disable it
741  if ( robset.find((*itr).robID())!=robset.end() ) (*itr).disable();
742  }
745 }
746 
747 
748 
749 // enable modules from the robs in the look up tables
750 void RegSelSiLUT::enableRobList(const std::vector<uint32_t>& roblist) {
751 
752  std::set<uint32_t> robset;
753  for ( unsigned i=0 ; i<roblist.size() ; i++ ) robset.insert(roblist[i]);
754 
756  for ( ; itr!=m_modules.end() ; ++itr ) {
757  // this module's rob is on the list, so enable it
758  if ( robset.find((*itr).robID())!=robset.end() ) (*itr).enable();
759  }
762 }
763 
764 
765 
766 
767 
768 
769 // disable modules in the look up tables
770 void RegSelSiLUT::disableModuleList(const std::vector<IdentifierHash>& hashlist) {
771 
772  std::set<IdentifierHash> hashset;
773  for ( unsigned i=0 ; i<hashlist.size() ; i++ ) hashset.insert(hashlist[i]);
774 
776  for ( ; itr!=m_modules.end() ; ++itr ) {
777  // this module is on the list, so disable it
778  if ( hashset.find((*itr).hashID())!=hashset.end() ) (*itr).disable();
779  }
782 }
783 
784 
785 
786 // enable modules in the look up tables
787 void RegSelSiLUT::enableModuleList(const std::vector<IdentifierHash>& hashlist) {
788 
789  std::set<IdentifierHash> hashset;
790  for ( unsigned i=0 ; i<hashlist.size() ; i++ ) hashset.insert(hashlist[i]);
791 
793  for ( ; itr!=m_modules.end() ; ++itr ) {
794  // this module is on the list, so enable it
795  if ( hashset.find((*itr).hashID())!=hashset.end() ) (*itr).enable();
796  }
799 }
800 
801 
802 
803 
804 
805 
806 
807 // get hash id's for all enabled modules in the roi
808 
809 void RegSelSiLUT::getHashList(const RegSelRoI& roi, std::vector<IdentifierHash>& hashlist) const {
810 
811  // bool hashempty = hashlist.empty();
812 
813  std::vector<const RegSelModule*> modules;
814  if ( modules.size()<256 ) modules.reserve(256);
815 
816  // struct timeval datatimer = gtttimer_start();
817  getRoIData(roi,modules);
818  // double datatime = gtttimer_stop(datatimer);
819 
820  std::vector<const RegSelModule*>::iterator mptr(modules.begin());
821 
822  hashlist.reserve(modules.size());
823  for ( ; mptr!=modules.end() ; ++mptr ) {
824  hashlist.push_back((*mptr)->hashID());
825  }
826 
827  // if ( !hashempty ) removeDuplicates( hashlist );
828 
829  // double vectortime = gtttimer_stop(datatimer);
830 
831  // std::cout << "RegSelSiLUT::getHashList() datatime=" << datatime << "\tvectortime=" << vectortime << "\tf="
832  // << 100*(vectortime-datatime)/vectortime << std::endl;
833 
834 }
835 
836 
837 
838 
839 void RegSelSiLUT::getHashList(const RegSelRoI& roi, std::vector<IdentifierHash>& hashlist, double x, double y ) const {
840 
841  std::vector<const RegSelModule*> modules;
842  if ( modules.size()<256 ) modules.reserve(256);
843 
844  // struct timeval datatimer = gtttimer_start();
845  getRoIData( roi, modules, x, y );
846  // double datatime = gtttimer_stop(datatimer);
847 
848  // bool hashempty = hashlist.empty();
849 
850  std::vector<const RegSelModule*>::iterator mptr(modules.begin());
851 
852  hashlist.reserve(modules.size());
853  for ( ; mptr!=modules.end() ; ++mptr ) {
854  hashlist.push_back((*mptr)->hashID());
855  }
856 
857  // if ( !hashempty ) removeDuplicates( hashlist );
858 
859 }
860 
861 
862 
863 
864 // get hash id's for all enabled modules
865 
866 void RegSelSiLUT::getHashList(std::vector<IdentifierHash>& hashlist) const {
867 
868 #ifndef OLDFULLSCAN
869  hashlist.reserve(m_allHashes.size());
870  hashlist = m_allHashes;
871  return;
872 #else
873 
874  hashlist.clear();
875  hashlist.reserve(m_modules.size());
876 
877  std::vector<RegSelModule>::const_iterator mptr(m_modules.begin());
878  std::vector<RegSelModule>::const_iterator eptr(m_modules.end());
879  for ( ; mptr!=eptr ; ++mptr ) {
880  if ( (*mptr).enabled() ) hashlist.push_back((*mptr).hashID());
881  }
882 #endif
883 }
884 
885 
886 
887 
888 // get hash id's for all enabled modules in a layer
889 
890 void RegSelSiLUT::getHashList( unsigned layer, std::vector<IdentifierHash>& hashlist) const {
891 
892  std::vector<const RegSelModule*> modules;
893 
894  // bool hashempty = hashlist.empty();
895 
896  getModules( layer, modules );
897 
898  hashlist.reserve(modules.size());
899  std::vector<const RegSelModule*>::iterator mptr(modules.begin());
900  while ( mptr!=modules.end() ) {
901  hashlist.push_back((*mptr++)->hashID());
902  }
903 
904  // if ( !hashempty ) removeDuplicates( hashlist );
905 
906 }
907 
908 
909 
910 
911 
912 // get robs corresponding to all enabled modules
913 
914 void RegSelSiLUT::getRobList(std::vector<uint32_t>& roblist) const {
915 
916 #ifndef OLDFULLSCAN
917  roblist.reserve(m_allROBids.size());
918  roblist = m_allROBids;
919  return;
920 #else
921  roblist.reserve(256);
922 
923  std::set<uint32_t> uroblist;
924  std::vector<RegSelModule>::const_iterator mptr(m_modules.begin());
925  for ( ; mptr!=m_modules.end() ; ++mptr ) {
926  if ( (*mptr).enabled() ) uroblist.insert((*mptr).robID());
927  }
928 
929  std::set<uint32_t>::iterator rlist(uroblist.begin());
930  while ( rlist!=uroblist.end() ) {
931  roblist.push_back(*rlist++);
932  }
933 #endif
934 }
935 
936 // get robs and hash id's for all enabled modules
937 
938 void RegSelSiLUT::getRobHashList(std::vector<uint32_t>& roblist, std::vector<IdentifierHash>& hashlist) const {
939 
940 #ifndef OLDFULLSCAN
941  hashlist.reserve(m_allHashes.size());
942  roblist.reserve(m_allROBids.size());
943  roblist = m_allROBids;
944  hashlist = m_allHashes;
945  return;
946 #else
947  roblist.reserve(256);
948  hashlist.reserve(m_modules.size());
949 
950  std::set<uint32_t> uroblist;
951  std::vector<RegSelModule>::const_iterator mptr(m_modules.begin());
952  for ( ; mptr!=m_modules.end() ; ++mptr ) {
953  if ( (*mptr).enabled() ) {
954  uroblist.insert((*mptr).robID());
955  hashlist.push_back((*mptr).hashID());
956  }
957  }
958 
959  std::set<uint32_t>::iterator rlist(uroblist.begin());
960  while ( rlist!=uroblist.end() ) {
961  roblist.push_back(*rlist++);
962  }
963 #endif
964 }
965 
966 
967 // get modules in the roi for a specified layer
968 
969 void RegSelSiLUT::getHashList(const RegSelRoI& roi, unsigned layer, std::vector<IdentifierHash>& hashlist) const {
970 
971  // bool hashempty = hashlist.empty();
972 
973  std::vector<const RegSelModule*> modules;
974  if ( modules.size()<256 ) modules.reserve(256);
975 
976 
977  getRoIData( roi, layer, modules);
978 
979  // struct timeval datatimer = gtttimer_start();
980 
981  // double datatime = gtttimer_stop(datatimer);
982 
983  hashlist.reserve(modules.size());
984  std::vector<const RegSelModule*>::iterator mptr(modules.begin());
985  while ( mptr!=modules.end() ) {
986  hashlist.push_back((*mptr++)->hashID());
987  }
988 
989  // if ( !hashempty ) removeDuplicates( hashlist );
990 
991  // double vectortime = gtttimer_stop(datatimer);
992 
993  // std::cout << "RegSelSiLUT::getHashList() datatime=" << datatime << "\tvectortime=" << vectortime << "\tf="
994  // << 100*(vectortime-datatime)/vectortime << std::endl;
995 
996 }
997 
998 
999 
1000 
1001 // get robs in the roi for a specified layer
1002 
1003 void RegSelSiLUT::getRobList(const RegSelRoI& roi, unsigned layer, std::vector<uint32_t>& roblist, bool removeduplicates ) const {
1004 
1005  std::vector<const RegSelModule*> modules;
1006  if ( modules.size()<256 ) modules.reserve(256);
1007 
1008 
1009  getRoIData( roi, layer, modules);
1010 
1011 #if 0
1012  for ( std::vector<RegSelSubDetector>::const_iterator sptr(m_SubDet.begin()) ;
1013  sptr!=m_SubDet.end() ; sptr++ ) {
1014 
1015  if ( (*sptr).inRoI(roi) ) {
1016 
1017  const std::vector<RegSelLayer>& lyrs = (*sptr).getLayers();
1018 
1019  if ( layer<lyrs.size() ) {
1020  const RegSelLayer& lyr = lyrs[layer];
1021  if ( lyr.inRoI(roi) ) lyr.getModules(roi,modules);
1022  }
1023  }
1024  }
1025 #endif
1026 
1027  // struct timeval datatimer = gtttimer_start();
1028 
1029  // double datatime = gtttimer_stop(datatimer);
1030 
1031  // std::vector<uint32_t> uroblist;
1032  std::vector<const RegSelModule*>::iterator mptr(modules.begin());
1033  while ( mptr!=modules.end() ) {
1034  roblist.push_back((*mptr++)->robID());
1035  }
1036 
1037  // std::set<uint32_t>::iterator rlist(uroblist.begin());
1038  // while ( rlist!=uroblist.end() ) {
1039  // roblist.push_back(*rlist++);
1040  // }
1041 
1042  if ( removeduplicates || roblist.size()>4000 ) removeDuplicates( roblist );
1043 
1044 }
1045 
1046 
1047 
1048 
1049 
1050 
1051 
1052 
1053 
1054 // get robs in the roi for a specified layer
1055 
1056 void RegSelSiLUT::getRobList( unsigned layer, std::vector<uint32_t>& roblist) const {
1057 
1058  std::vector<const RegSelModule*> modules;
1059 
1060  getModules( layer, modules );
1061 
1062  roblist.reserve(256);
1063 
1064  std::set<uint32_t> uroblist;
1065  std::vector<const RegSelModule*>::const_iterator mptr(modules.begin());
1066  for ( ; mptr!=modules.end() ; ++mptr ) {
1067  if ( (*mptr)->enabled() ) roblist.push_back((*mptr)->robID());
1068  }
1069  removeDuplicates( roblist );
1070 
1071  // std::set<uint32_t>::iterator rlist(uroblist.begin());
1072  // while ( rlist!=uroblist.end() ) roblist.push_back(*rlist++);
1073 
1074 }
1075 
1076 
1077 
1078 
1079 
1080 
1081 
1082 
1083 
1084 // get disabled modules in the roi for a specified layer
1085 
1086 void RegSelSiLUT::getDisabledHashList(const RegSelRoI& roi, unsigned layer, std::vector<IdentifierHash>& hashlist) const {
1087 
1088  std::vector<const RegSelModule*> modules;
1089  if ( modules.size()<256 ) modules.reserve(256);
1090 
1091  // for ( std::vector<RegSelSubDetector>::const_iterator sptr(getSubDet().begin()) ;
1092  for ( std::vector<RegSelSubDetector>::const_iterator sptr(m_SubDet.begin()) ;
1093  sptr!=m_SubDet.end() ; ++sptr ) {
1094 
1095  if ( (*sptr).inRoI(roi) ) {
1096 
1097  const std::vector<RegSelLayer>& lyrs = (*sptr).getLayers();
1098 
1099  if ( layer<lyrs.size() ) {
1100  // const RegSelLayer& lyr = lyrs.at(layer);
1101  const RegSelLayer& lyr = lyrs[layer];
1102 
1103  if ( lyr.inRoI(roi) ) lyr.getDisabledModules(roi,modules);
1104  }
1105  }
1106  }
1107 
1108  hashlist.reserve(m_modules.size());
1109  std::vector<const RegSelModule*>::iterator mptr(modules.begin());
1110  while ( mptr!=modules.end() ) {
1111  hashlist.push_back((*mptr++)->hashID());
1112  }
1113 }
1114 
1115 
1116 
1117 void RegSelSiLUT::getDisabledLayers(const RegSelRoI& roi, int subdetector, std::vector<int>& layers) const {
1118 
1119  // layers.clear();
1120 
1121  std::set<int> disabled_layers;
1122 
1123  for ( std::vector<RegSelSubDetector>::const_iterator sptr(m_SubDet.begin()) ;
1124  sptr!=m_SubDet.end() ; ++sptr ) {
1125 
1126  // std::cout << "subdet id = " << sptr->ID() << std::endl;
1127 
1128  if ( subdetector!=sptr->ID() ) continue;
1129 
1130  if ( (*sptr).inRoI(roi) ) {
1131 
1132  const std::vector<RegSelLayer>& lyrs = (*sptr).getLayers();
1133 
1134  for ( int layer=lyrs.size() ; layer-- ; ) {
1135 
1136  std::vector<const RegSelModule*> modules;
1137  if ( modules.size()<256 ) modules.reserve(256);
1138 
1139  // const RegSelLayer& lyr = lyrs.at(layer);
1140  const RegSelLayer& lyr = lyrs[layer];
1141 
1142  if ( lyr.inRoI(roi) ) {
1143  lyr.getDisabledModules(roi,modules);
1144  // if ( modules.size() ) disabled_layers.insert(layer);
1145  if ( modules.size() ) layers.push_back(layer);
1146  }
1147  }
1148  }
1149  }
1150 
1151 #if 0
1152  // copy to output
1153  std::set<int>::iterator bitr(disabled_layers.begin());
1154  std::set<int>::iterator eitr(disabled_layers.end());
1155  while ( bitr!=eitr ) { layers.push_back(*bitr++); }
1156 #endif
1157 
1158 }
1159 
1160 
1161 
1162 
1163 
1164 
1165 
1166 
1167 
1168 bool RegSelSiLUT::read(const std::string& s) {
1169  std::ifstream infile(s.c_str());
1170  // std::cout << "RegSelSiLUT::read() from file " << s << std::endl;
1171  return read(infile);
1172 }
1173 
1174 
1175 bool RegSelSiLUT::read(std::istream& s) {
1176 
1177  unsigned Nmodules = 0;
1178 
1179  // old method - read number of modules and try tp read them in
1180  // new method - just read until module list exhausted,
1181  // this code will allow either
1182 
1183  bool newformat = false;
1184 
1185  s >> Nmodules;
1186 
1187  newformat=s.fail();
1188 
1189  // couldn't read number of modules - try new format
1190  if ( newformat ) s.clear();
1191 
1192  unsigned modcount=0;
1193 
1194  for ( ; newformat || modcount<Nmodules ; modcount++ ) {
1195  RegSelModule m;
1196  if ( !getModule(s, m) ) break;
1197  addModule(m);
1198  }
1199 
1200  // std::cout << "read() newformat " << newformat << std::endl;
1201  // std::cout << "read() read " << modcount << " modules" << std::endl;
1202  // std::cout << "read() Nmodules " << Nmodules << "\tsize " << m_modules.size() << std::endl;
1203 
1204  // std::cout << "RegSelSiLUT::read() creating tables" << std::endl;
1205  initialise();
1206 
1207  if ( (!newformat) && (modcount<Nmodules ) ) return false;
1208 
1209  return true;
1210 }
1211 
1212 
1213 
xAOD::iterator
JetConstituentVector::iterator iterator
Definition: JetConstituentVector.cxx:68
RegSelSiLUT::m_allROBids
std::vector< uint32_t > m_allROBids
Definition: RegSelSiLUT.h:244
beamspotman.r
def r
Definition: beamspotman.py:676
RegSelModule
Definition: RegSelModule.h:38
python.SystemOfUnits.s
int s
Definition: SystemOfUnits.py:131
python.SystemOfUnits.m
int m
Definition: SystemOfUnits.py:91
run.infile
string infile
Definition: run.py:13
phi
Scalar phi() const
phi method
Definition: AmgMatrixBasePlugin.h:64
RegSelName::m_name
std::string m_name
Definition: RegSelName.h:60
ID
std::vector< Identifier > ID
Definition: CalibHitIDCheck.h:24
RegSelSiLUT::initialiseDisabledModules
void initialiseDisabledModules()
Definition: RegSelSiLUT.cxx:203
RegSelLayer::getDisabledModules
void getDisabledModules(const RegSelRoI &roi, std::vector< const RegSelModule * > &modules) const
Definition: RegSelLayer.cxx:314
RegSelSiLUT::DET
DET
Definition: RegSelSiLUT.h:45
IRoiDescriptor::etaMinus
virtual double etaMinus() const =0
RegSelROB.h
RegSelSiLUT::m_allHashes
std::vector< IdentifierHash > m_allHashes
Definition: RegSelSiLUT.h:243
RegSelSiLUT::getRoIData
bool getRoIData(const RegSelRoI &r, std::vector< const RegSelModule * > &modules) const
Definition: RegSelSiLUT.cxx:244
module_driven_slicing.layers
layers
Definition: module_driven_slicing.py:114
RegSelSiLUT::initialiseFullScan
void initialiseFullScan()
Definition: RegSelSiLUT.cxx:175
M_PI
#define M_PI
Definition: ActiveFraction.h:11
RegSelSiLUT.h
emacs: this is -*- c++ -*-
RegSelLayer
Definition: RegSelLayer.h:39
TrigConf::JetWindowSize::UNDEF
@ UNDEF
Definition: TriggerThresholdValue.h:17
RegSelTimer.h
RegSelSiLUT::m_modules
std::vector< RegSelModule > m_modules
Definition: RegSelSiLUT.h:236
drawFromPickle.cos
cos
Definition: drawFromPickle.py:36
IRoiDescriptor::etaPlus
virtual double etaPlus() const =0
RegSelSiLUT::disableSubDetector
void disableSubDetector(int id)
Definition: RegSelSiLUT.cxx:222
RegSelRoI::getetaMin
double getetaMin() const
Definition: RegSelRoI.h:63
RegSelSiLUT::getDisabledLayers
void getDisabledLayers(const RegSelRoI &roi, int subdetector, std::vector< int > &layers) const
Definition: RegSelSiLUT.cxx:1117
RegSelModule.h
x
#define x
getModule
bool getModule(std::istream &s, RegSelModule &m)
Definition: RegSelModule.cxx:110
RegSelSiLUT::MM
@ MM
Definition: RegSelSiLUT.h:45
RegSelSiLUT::RegSelSiLUT
RegSelSiLUT()
Definition: RegSelSiLUT.h:49
RegSelSiLUT::enableSubDetector
void enableSubDetector(int id)
Definition: RegSelSiLUT.cxx:227
RegSelRoI::getphiMax
double getphiMax() const
Definition: RegSelRoI.h:62
RegSelRoI::getetaMax
double getetaMax() const
Definition: RegSelRoI.h:64
RegSelSiLUT::write
void write(std::ostream &s=std::cout) const
Definition: RegSelSiLUT.cxx:543
RegSelSiLUT::initialise
void initialise()
Definition: RegSelSiLUT.cxx:110
RegSelName
Definition: RegSelName.h:33
RegSelSiLUT::enableRobs
void enableRobs()
Definition: RegSelSiLUT.cxx:712
lumiFormat.i
int i
Definition: lumiFormat.py:92
RegSelSiLUT::getDisabledHashList
void getDisabledHashList(const RegSelRoI &roi, unsigned layer, std::vector< IdentifierHash > &hashlist) const
Definition: RegSelSiLUT.cxx:1086
RegSelSiLUT::Module
const RegSelModule * Module(const IdentifierHash &h) const
Definition: RegSelSiLUT.cxx:213
IRoiDescriptor
Describes the API of the Region of Ineterest geometry.
Definition: IRoiDescriptor.h:23
TRT::Hit::layer
@ layer
Definition: HitInfo.h:79
RegSelSiLUT::getRobList
virtual void getRobList(const RegSelRoI &roi, unsigned layer, std::vector< uint32_t > &roblist, bool removeduplicates=true) const
Definition: RegSelSiLUT.cxx:1003
RegSelSiLUT::HashIDList
virtual void HashIDList(const IRoiDescriptor &roi, std::vector< IdentifierHash > &idlist) const override
implementation of the IRegSelUT interface hash id methods
Definition: RegSelSiLUT.cxx:39
RegSelSiLUT::disableLayer
void disableLayer(int id, unsigned layer)
Definition: RegSelSiLUT.cxx:232
RegSelSiLUT::m_ID
DET m_ID
Definition: RegSelSiLUT.h:233
RegSelSiLUT::enableRobList
void enableRobList(const std::vector< uint32_t > &roblist)
Definition: RegSelSiLUT.cxx:750
RegSelSiLUT::enableModuleList
void enableModuleList(const std::vector< IdentifierHash > &hashlist)
Definition: RegSelSiLUT.cxx:787
IRoiDescriptor::phiMinus
virtual double phiMinus() const =0
RegSelSiLUT::m_idmap
std::map< int, int > m_idmap
Definition: RegSelSiLUT.h:246
RegSelRoI::getzMax
double getzMax() const
Definition: RegSelRoI.h:60
RegSelSiLUT::enableLayer
void enableLayer(int id, unsigned layer)
Definition: RegSelSiLUT.cxx:237
phiprime
double phiprime(double x, double y, double phi, double r, bool &status)
Definition: RegSelSiLUT.cxx:342
RegSelRoI
Definition: RegSelRoI.h:32
RegSelRoI::getphiMin
double getphiMin() const
Definition: RegSelRoI.h:61
RegSelRoI::getzMin
double getzMin() const
Definition: RegSelRoI.h:59
IRoiDescriptor::phiPlus
virtual double phiPlus() const =0
extreme phi values
RegSelSiLUT::getHashList
virtual void getHashList(const RegSelRoI &roi, std::vector< IdentifierHash > &hashlist) const
Definition: RegSelSiLUT.cxx:809
RegSelSiLUT::addModules
void addModules(const std::vector< RegSelModule > &m)
Definition: RegSelSiLUT.h:72
philimits
bool philimits(double x, double y, double rmin, double rmax, double &phimin, double &phimax)
Definition: RegSelSiLUT.cxx:374
RegSelLayer::getModules
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...
Definition: RegSelLayer.cxx:197
id
SG::auxid_t id
Definition: Control/AthContainers/Root/debug.cxx:194
RegSelSubDetector
Definition: RegSelSubDetector.h:44
RegSelSiLUT::ROBIDList
virtual void ROBIDList(const IRoiDescriptor &roi, std::vector< uint32_t > &roblist) const override
rob methods
Definition: RegSelSiLUT.cxx:56
RegSelSiLUT::construct
virtual void construct()
Definition: RegSelSiLUT.cxx:90
RegSelSiLUT::addModule
void addModule(RegSelModule &module)
Definition: RegSelSiLUT.h:71
RegSelSiLUT::reset
void reset()
Definition: RegSelSiLUT.cxx:100
a
TList * a
Definition: liststreamerinfos.cxx:10
y
#define y
h
RegSelSiLUT::disableModuleList
void disableModuleList(const std::vector< IdentifierHash > &hashlist)
Definition: RegSelSiLUT.cxx:770
CondAlgsOpts.found
int found
Definition: CondAlgsOpts.py:101
IRoiDescriptor::zedPlus
virtual double zedPlus() const =0
the zed and eta values at the most forward and most rear ends of the RoI
IRoiDescriptor::isFullscan
virtual bool isFullscan() const =0
is this a full detector RoI?
RegSelSiLUT::disableRobList
void disableRobList(const std::vector< uint32_t > &roblist)
Definition: RegSelSiLUT.cxx:733
RegSelSiLUT::m_map
std::map< const IdentifierHash, const RegSelModule * > m_map
Definition: RegSelSiLUT.h:240
RegSelSiLUT
Definition: RegSelSiLUT.h:41
CaloSwCorrections.removeduplicates
def removeduplicates(flags, cells_name, *args, **kw)
Definition: CaloSwCorrections.py:233
IRoiDescriptor::zedMinus
virtual double zedMinus() const =0
RegSelSiLUT::removeDuplicates
static void removeDuplicates(std::vector< T > &vec)
useful for removing duplicates if required ...
Definition: RegSelSiLUT.h:222
merge.status
status
Definition: merge.py:17
RegSelSiLUT::getRobHashList
virtual void getRobHashList(std::vector< uint32_t > &roblist, std::vector< IdentifierHash > &hashlist) const
Definition: RegSelSiLUT.cxx:938
drawFromPickle.sin
sin
Definition: drawFromPickle.py:36
RegSelSiLUT::getModules
const std::vector< RegSelModule > & getModules() const
Definition: RegSelSiLUT.h:75
IdentifierHash
Definition: IdentifierHash.h:38
RegSelSiLUT::read
bool read(std::istream &s)
Definition: RegSelSiLUT.cxx:1175
RegSelSiLUT::sTGC
@ sTGC
Definition: RegSelSiLUT.h:45
RegSelSiLUT::m_SubDet
std::vector< RegSelSubDetector > m_SubDet
Definition: RegSelSiLUT.h:235
PrepareReferenceFile.outfile
outfile
Definition: PrepareReferenceFile.py:42
RegSelSiLUT::disableRobs
void disableRobs()
Definition: RegSelSiLUT.cxx:722
ZRObject::inRoI
virtual bool inRoI(const RegSelRoI &roi) const
Definition: ZRObject.h:71
RegSelSiLUT::ID
DET ID() const
Definition: RegSelSiLUT.h:84