|
ATLAS Offline Software
|
#include <RegSelSiLUT.h>
|
| RegSelSiLUT () |
|
| RegSelSiLUT (DET id) |
|
| RegSelSiLUT (const RegSelSiLUT &r) |
|
| RegSelSiLUT (const std::string &s) |
|
virtual | ~RegSelSiLUT () override |
|
virtual void | HashIDList (const IRoiDescriptor &roi, std::vector< IdentifierHash > &idlist) const override |
| implementation of the IRegSelUT interface
hash id methods
More...
|
|
virtual void | HashIDList (long layer, const IRoiDescriptor &roi, std::vector< IdentifierHash > &idlist) const override |
| HashIDList interface declaration. return list of non-repeated IdentifierHash. More...
|
|
virtual void | ROBIDList (const IRoiDescriptor &roi, std::vector< uint32_t > &roblist) const override |
| rob methods
More...
|
|
virtual void | ROBIDList (long layer, const IRoiDescriptor &roi, std::vector< uint32_t > &roblist) const override |
| ROBIDList interface declaration. This interface can be used by the ID subdetectors. A list of non-repeated ROBIDs (uint_32_t) is returned by a reference. More...
|
|
void | addModule (RegSelModule &module) |
|
void | addModules (const std::vector< RegSelModule > &m) |
|
const std::vector< RegSelModule > & | getModules () const |
|
bool | getRoIData (const RegSelRoI &r, std::vector< const RegSelModule * > &modules) const |
|
bool | getRoIData (const RegSelRoI &r, unsigned layer, std::vector< const RegSelModule * > &modules) const |
| here if layer is of the format 1XYY where X=0 (barrel), X=2 (endcap) and YY is the layer within the sub-system then the specific layer in the sub-system is used. More...
|
|
bool | getRoIData (const RegSelRoI &r, unsigned subdetector, unsigned layer, std::vector< const RegSelModule * > &modules) const |
|
bool | getRoIData (const RegSelRoI &r, std::vector< const RegSelModule * > &modules, double x, double y) const |
|
bool | getRoIData (const RegSelRoI &r, unsigned subdetector, unsigned layer, std::vector< const RegSelModule * > &modules, double x, double y) const |
|
DET | ID () const |
|
void | reset () |
|
void | initialise () |
|
void | initialiseDisabledModules () |
|
void | initialiseFullScan () |
|
void | write (std::ostream &s=std::cout) const |
|
void | write (const std::string &filename) const |
|
bool | read (std::istream &s) |
|
bool | read (const std::string &s) |
|
const std::vector< RegSelSubDetector > & | getSubDet () const |
|
const RegSelModule * | Module (const IdentifierHash &h) const |
|
void | getModules (unsigned layer, std::vector< const RegSelModule * > &modules) const |
| here if layer is of the format 1XYY where X=0 (barrel), X=2 (endcap) and YY is the layer within the sub-system then the specific layer in the sub-system is used. More...
|
|
virtual void | getHashList (const RegSelRoI &roi, std::vector< IdentifierHash > &hashlist) const |
|
virtual void | getHashList (const RegSelRoI &roi, std::vector< IdentifierHash > &hashlist, double x, double y) const |
|
virtual void | getHashList (const RegSelRoI &roi, unsigned layer, std::vector< IdentifierHash > &hashlist) const |
|
virtual void | getHashList (std::vector< IdentifierHash > &hashlist) const |
|
virtual void | getHashList (unsigned layer, std::vector< IdentifierHash > &hashlist) const |
|
virtual void | getRobList (const RegSelRoI &roi, unsigned layer, std::vector< uint32_t > &roblist, bool removeduplicates=true) const |
|
virtual void | getRobList (const RegSelRoI &roi, std::vector< uint32_t > &roblist, bool removeduplicates=true) const |
|
virtual void | getRobList (const RegSelRoI &roi, std::vector< uint32_t > &roblist, double x, double y) const |
|
virtual void | getRobList (std::vector< uint32_t > &roblist) const |
|
virtual void | getRobList (unsigned layer, std::vector< uint32_t > &roblist) const |
|
virtual void | getRobHashList (std::vector< uint32_t > &roblist, std::vector< IdentifierHash > &hashlist) const |
|
virtual void | getRobHashList (const RegSelRoI &roi, std::vector< uint32_t > &roblist, std::vector< IdentifierHash > &hashlist) const |
|
virtual void | getRobHashList (const RegSelRoI &roi, unsigned layer, std::vector< uint32_t > &roblist, std::vector< IdentifierHash > &hashlist) const |
|
void | getDisabledHashList (const RegSelRoI &roi, unsigned layer, std::vector< IdentifierHash > &hashlist) const |
|
void | getDisabledLayers (const RegSelRoI &roi, int subdetector, std::vector< int > &layers) const |
|
void | enableRobs () |
|
void | disableRobs () |
|
void | enableModules () |
|
void | disableModules () |
|
void | enableRobList (const std::vector< uint32_t > &roblist) |
|
void | disableRobList (const std::vector< uint32_t > &roblist) |
|
void | enableModuleList (const std::vector< IdentifierHash > &hashlist) |
|
void | disableModuleList (const std::vector< IdentifierHash > &hashlist) |
|
void | disableSubDetector (int id) |
|
void | enableSubDetector (int id) |
|
void | disableLayer (int id, unsigned layer) |
|
void | enableLayer (int id, unsigned layer) |
|
void | drawlayers (std::vector< const ZRObject * > &c) const |
|
const std::string & | getName () const |
|
|
virtual void | construct () |
|
virtual void | HashIDList_internal (const IRoiDescriptor &roi, std::vector< IdentifierHash > &idlist) const |
| horrible internal interface methods More...
|
|
virtual void | HashIDList_internal (long layer, const IRoiDescriptor &roi, std::vector< IdentifierHash > &idlist) const |
|
virtual void | ROBIDList_internal (const IRoiDescriptor &roi, std::vector< uint32_t > &roblist) const |
| rob methods
More...
|
|
virtual void | ROBIDList_internal (long layer, const IRoiDescriptor &roi, std::vector< uint32_t > &roblist) const |
|
template<typename C , typename T > |
void | IDList (const IRoiDescriptor &roi, std::vector< T > &idlist, handler< C, T > lister) const |
|
template<typename C , typename T > |
void | IDList_layer (long layer, const IRoiDescriptor &roi, std::vector< T > &idlist, handler_layer< C, T > lister) const |
|
|
static void | cleanup (std::vector< IdentifierHash > &idvec) |
| annoying cleanup function specifically for the RPC, but we have to add it here since we have abstracted everything to use identical code - perhaps consider creating the RPC instance as a derived class ? More...
|
|
template<typename T > |
static void | removeDuplicates (std::vector< T > &vec) |
| useful for removing duplicates if required ... More...
|
|
Definition at line 41 of file RegSelSiLUT.h.
◆ handler
template<typename C , typename T >
◆ handler_layer
template<typename C , typename T >
◆ DET
Enumerator |
---|
UNDEF | |
PIXEL | |
SCT | |
TRT | |
FTK | |
MM | |
sTGC | |
RPC | |
Definition at line 45 of file RegSelSiLUT.h.
◆ RegSelSiLUT() [1/4]
RegSelSiLUT::RegSelSiLUT |
( |
| ) |
|
|
inline |
◆ RegSelSiLUT() [2/4]
RegSelSiLUT::RegSelSiLUT |
( |
DET |
id | ) |
|
◆ RegSelSiLUT() [3/4]
◆ RegSelSiLUT() [4/4]
RegSelSiLUT::RegSelSiLUT |
( |
const std::string & |
s | ) |
|
◆ ~RegSelSiLUT()
virtual RegSelSiLUT::~RegSelSiLUT |
( |
| ) |
|
|
inlineoverridevirtual |
◆ addModule()
◆ addModules()
◆ cleanup()
static void RegSelSiLUT::cleanup |
( |
std::vector< IdentifierHash > & |
idvec | ) |
|
|
inlinestaticprotected |
annoying cleanup function specifically for the RPC, but we have to add it here since we have abstracted everything to use identical code - perhaps consider creating the RPC instance as a derived class ?
Definition at line 246 of file RegSelSiLUT.h.
◆ construct()
void RegSelSiLUT::construct |
( |
| ) |
|
|
protectedvirtual |
Definition at line 119 of file RegSelSiLUT.cxx.
121 const std::string
s[8] = {
"",
"pixel",
"sct",
"trt",
"ftk",
"mm",
"stgc",
"rpc" };
◆ disableLayer()
void RegSelSiLUT::disableLayer |
( |
int |
id, |
|
|
unsigned |
layer |
|
) |
| |
◆ disableModuleList()
Definition at line 799 of file RegSelSiLUT.cxx.
801 std::set<IdentifierHash> hashset;
802 for (
unsigned i=0 ;
i<hashlist.size() ;
i++ ) hashset.insert(hashlist[
i]);
807 if ( hashset.find((*itr).hashID())!=hashset.end() ) (*itr).disable();
◆ disableModules()
void RegSelSiLUT::disableModules |
( |
| ) |
|
|
inline |
◆ disableRobList()
void RegSelSiLUT::disableRobList |
( |
const std::vector< uint32_t > & |
roblist | ) |
|
Definition at line 762 of file RegSelSiLUT.cxx.
764 std::set<uint32_t> robset;
765 for (
unsigned i=0 ;
i<roblist.size() ;
i++ ) robset.insert(roblist[
i]);
770 if ( robset.find((*itr).robID())!=robset.end() ) (*itr).disable();
◆ disableRobs()
void RegSelSiLUT::disableRobs |
( |
| ) |
|
◆ disableSubDetector()
void RegSelSiLUT::disableSubDetector |
( |
int |
id | ) |
|
◆ drawlayers()
void RegSelSiLUT::drawlayers |
( |
std::vector< const ZRObject * > & |
c | ) |
const |
|
inline |
◆ enableLayer()
void RegSelSiLUT::enableLayer |
( |
int |
id, |
|
|
unsigned |
layer |
|
) |
| |
◆ enableModuleList()
Definition at line 816 of file RegSelSiLUT.cxx.
818 std::set<IdentifierHash> hashset;
819 for (
unsigned i=0 ;
i<hashlist.size() ;
i++ ) hashset.insert(hashlist[
i]);
824 if ( hashset.find((*itr).hashID())!=hashset.end() ) (*itr).enable();
◆ enableModules()
void RegSelSiLUT::enableModules |
( |
| ) |
|
|
inline |
◆ enableRobList()
void RegSelSiLUT::enableRobList |
( |
const std::vector< uint32_t > & |
roblist | ) |
|
Definition at line 779 of file RegSelSiLUT.cxx.
781 std::set<uint32_t> robset;
782 for (
unsigned i=0 ;
i<roblist.size() ;
i++ ) robset.insert(roblist[
i]);
787 if ( robset.find((*itr).robID())!=robset.end() ) (*itr).enable();
◆ enableRobs()
void RegSelSiLUT::enableRobs |
( |
| ) |
|
◆ enableSubDetector()
void RegSelSiLUT::enableSubDetector |
( |
int |
id | ) |
|
◆ getDisabledHashList()
Definition at line 1115 of file RegSelSiLUT.cxx.
1117 std::vector<const RegSelModule*> modules;
1118 if ( modules.size()<256 ) modules.reserve(256);
1121 for ( std::vector<RegSelSubDetector>::const_iterator sptr(
m_SubDet.begin()) ;
1124 if ( (*sptr).inRoI(roi) ) {
1126 const std::vector<RegSelLayer>& lyrs = (*sptr).getLayers();
1128 if (
layer<lyrs.size() ) {
1139 while ( mptr!=modules.end() ) {
1140 hashlist.push_back((*mptr++)->hashID());
◆ getDisabledLayers()
void RegSelSiLUT::getDisabledLayers |
( |
const RegSelRoI & |
roi, |
|
|
int |
subdetector, |
|
|
std::vector< int > & |
layers |
|
) |
| const |
Definition at line 1146 of file RegSelSiLUT.cxx.
1150 std::set<int> disabled_layers;
1152 for ( std::vector<RegSelSubDetector>::const_iterator sptr(
m_SubDet.begin()) ;
1157 if ( subdetector!=sptr->ID() )
continue;
1159 if ( (*sptr).inRoI(roi) ) {
1161 const std::vector<RegSelLayer>& lyrs = (*sptr).getLayers();
1165 std::vector<const RegSelModule*> modules;
1166 if ( modules.size()<256 ) modules.reserve(256);
1171 if ( lyr.
inRoI(roi) ) {
1184 while ( bitr!=eitr ) {
layers.push_back(*bitr++); }
◆ getHashList() [1/5]
Definition at line 838 of file RegSelSiLUT.cxx.
842 std::vector<const RegSelModule*> modules;
843 if ( modules.size()<256 ) modules.reserve(256);
851 hashlist.reserve(modules.size());
852 for ( ; mptr!=modules.end() ; ++mptr ) {
853 hashlist.push_back((*mptr)->hashID());
◆ getHashList() [2/5]
Definition at line 868 of file RegSelSiLUT.cxx.
870 std::vector<const RegSelModule*> modules;
871 if ( modules.size()<256 ) modules.reserve(256);
881 hashlist.reserve(modules.size());
882 for ( ; mptr!=modules.end() ; ++mptr ) {
883 hashlist.push_back((*mptr)->hashID());
◆ getHashList() [3/5]
Definition at line 998 of file RegSelSiLUT.cxx.
1002 std::vector<const RegSelModule*> modules;
1003 if ( modules.size()<256 ) modules.reserve(256);
1012 hashlist.reserve(modules.size());
1014 while ( mptr!=modules.end() ) {
1015 hashlist.push_back((*mptr++)->hashID());
◆ getHashList() [4/5]
void RegSelSiLUT::getHashList |
( |
std::vector< IdentifierHash > & |
hashlist | ) |
const |
|
virtual |
Definition at line 895 of file RegSelSiLUT.cxx.
906 std::vector<RegSelModule>::const_iterator mptr(
m_modules.begin());
907 std::vector<RegSelModule>::const_iterator eptr(
m_modules.end());
908 for ( ; mptr!=eptr ; ++mptr ) {
909 if ( (*mptr).enabled() ) hashlist.push_back((*mptr).hashID());
◆ getHashList() [5/5]
void RegSelSiLUT::getHashList |
( |
unsigned |
layer, |
|
|
std::vector< IdentifierHash > & |
hashlist |
|
) |
| const |
|
virtual |
Definition at line 919 of file RegSelSiLUT.cxx.
921 std::vector<const RegSelModule*> modules;
927 hashlist.reserve(modules.size());
929 while ( mptr!=modules.end() ) {
930 hashlist.push_back((*mptr++)->hashID());
◆ getModules() [1/2]
◆ getModules() [2/2]
void RegSelSiLUT::getModules |
( |
unsigned |
layer, |
|
|
std::vector< const RegSelModule * > & |
modules |
|
) |
| const |
here if layer is of the format 1XYY where X=0 (barrel), X=2 (endcap) and YY is the layer within the sub-system then the specific layer in the sub-system is used.
If it is of the form YY, then simple layer number is used NB: ALL the layer IdentifierHash and uint32_t retreival methods use this format
determine whether an layer in a specific subdetector is requested
Definition at line 295 of file RegSelSiLUT.cxx.
296 modules.reserve(256);
299 bool subdetflag =
layer/1000;
301 int ilayer =
layer%100;
302 if ( subdetflag ) subdet = (
layer%1000)/100;
◆ getName()
const std::string& RegSelName::getName |
( |
| ) |
const |
|
inlineinherited |
◆ getRobHashList() [1/3]
void RegSelSiLUT::getRobHashList |
( |
const RegSelRoI & |
roi, |
|
|
std::vector< uint32_t > & |
roblist, |
|
|
std::vector< IdentifierHash > & |
hashlist |
|
) |
| const |
|
virtual |
Definition at line 588 of file RegSelSiLUT.cxx.
590 std::vector<const RegSelModule*> modules;
591 if ( modules.size()<256 ) modules.reserve(256);
598 std::set<uint32_t> uroblist;
600 hashlist.reserve(modules.size());
601 roblist.reserve(modules.size());
603 while ( mptr!=modules.end() ) {
604 hashlist.push_back((*mptr)->hashID());
605 roblist.push_back((*mptr++)->robID());
◆ getRobHashList() [2/3]
void RegSelSiLUT::getRobHashList |
( |
const RegSelRoI & |
roi, |
|
|
unsigned |
layer, |
|
|
std::vector< uint32_t > & |
roblist, |
|
|
std::vector< IdentifierHash > & |
hashlist |
|
) |
| const |
|
virtual |
Definition at line 621 of file RegSelSiLUT.cxx.
623 std::vector<const RegSelModule*> modules;
624 if ( modules.size()<256 ) modules.reserve(256);
631 std::set<uint32_t> uroblist;
633 hashlist.reserve(modules.size());
634 roblist.reserve(modules.size());
636 while ( mptr!=modules.end() ) {
637 hashlist.push_back((*mptr)->hashID());
638 roblist.push_back((*mptr++)->robID());
◆ getRobHashList() [3/3]
void RegSelSiLUT::getRobHashList |
( |
std::vector< uint32_t > & |
roblist, |
|
|
std::vector< IdentifierHash > & |
hashlist |
|
) |
| const |
|
virtual |
Definition at line 967 of file RegSelSiLUT.cxx.
976 roblist.reserve(256);
979 std::set<uint32_t> uroblist;
980 std::vector<RegSelModule>::const_iterator mptr(
m_modules.begin());
981 for ( ; mptr!=
m_modules.end() ; ++mptr ) {
982 if ( (*mptr).enabled() ) {
983 uroblist.insert((*mptr).robID());
984 hashlist.push_back((*mptr).hashID());
989 while ( rlist!=uroblist.end() ) {
990 roblist.push_back(*rlist++);
◆ getRobList() [1/5]
void RegSelSiLUT::getRobList |
( |
const RegSelRoI & |
roi, |
|
|
std::vector< uint32_t > & |
roblist, |
|
|
bool |
removeduplicates = true |
|
) |
| const |
|
virtual |
NB: using a vector and removing duplicates is faster than using a set
Definition at line 652 of file RegSelSiLUT.cxx.
654 std::vector<const RegSelModule*> modules;
655 if ( modules.size()<256 ) modules.reserve(256);
666 std::set<uint32_t> uroblist;
669 while ( mptr!=modules.end() ) {
670 uroblist.insert((*mptr++)->robID());
673 roblist.reserve(uroblist.size());
675 while ( plist!=uroblist.end() ) {
676 roblist.push_back(*plist++);
685 roblist.reserve(modules.size());
686 while ( mptr!=modules.end() ) roblist.push_back((*mptr++)->robID());
◆ getRobList() [2/5]
void RegSelSiLUT::getRobList |
( |
const RegSelRoI & |
roi, |
|
|
std::vector< uint32_t > & |
roblist, |
|
|
double |
x, |
|
|
double |
y |
|
) |
| const |
|
virtual |
Definition at line 703 of file RegSelSiLUT.cxx.
705 std::vector<const RegSelModule*> modules;
706 if ( modules.size()<256 ) modules.reserve(256);
713 std::set<uint32_t> uroblist;
716 while ( mptr!=modules.end() ) {
717 uroblist.insert((*mptr++)->robID());
720 roblist.reserve(uroblist.size());
722 while ( plist!=uroblist.end() ) {
723 roblist.push_back(*plist++);
728 roblist.reserve(modules.size());
730 while ( mptr!=modules.end() ) roblist.push_back((*mptr++)->robID());
◆ getRobList() [3/5]
void RegSelSiLUT::getRobList |
( |
const RegSelRoI & |
roi, |
|
|
unsigned |
layer, |
|
|
std::vector< uint32_t > & |
roblist, |
|
|
bool |
removeduplicates = true |
|
) |
| const |
|
virtual |
Definition at line 1032 of file RegSelSiLUT.cxx.
1034 std::vector<const RegSelModule*> modules;
1035 if ( modules.size()<256 ) modules.reserve(256);
1041 for ( std::vector<RegSelSubDetector>::const_iterator sptr(
m_SubDet.begin()) ;
1044 if ( (*sptr).inRoI(roi) ) {
1046 const std::vector<RegSelLayer>& lyrs = (*sptr).getLayers();
1048 if (
layer<lyrs.size() ) {
1062 while ( mptr!=modules.end() ) {
1063 roblist.push_back((*mptr++)->robID());
◆ getRobList() [4/5]
void RegSelSiLUT::getRobList |
( |
std::vector< uint32_t > & |
roblist | ) |
const |
|
virtual |
Definition at line 943 of file RegSelSiLUT.cxx.
950 roblist.reserve(256);
952 std::set<uint32_t> uroblist;
953 std::vector<RegSelModule>::const_iterator mptr(
m_modules.begin());
954 for ( ; mptr!=
m_modules.end() ; ++mptr ) {
955 if ( (*mptr).enabled() ) uroblist.insert((*mptr).robID());
959 while ( rlist!=uroblist.end() ) {
960 roblist.push_back(*rlist++);
◆ getRobList() [5/5]
void RegSelSiLUT::getRobList |
( |
unsigned |
layer, |
|
|
std::vector< uint32_t > & |
roblist |
|
) |
| const |
|
virtual |
Definition at line 1085 of file RegSelSiLUT.cxx.
1087 std::vector<const RegSelModule*> modules;
1091 roblist.reserve(256);
1093 std::set<uint32_t> uroblist;
1094 std::vector<const RegSelModule*>::const_iterator mptr(modules.begin());
1095 for ( ; mptr!=modules.end() ; ++mptr ) {
1096 if ( (*mptr)->enabled() ) roblist.push_back((*mptr)->robID());
◆ getRoIData() [1/5]
◆ getRoIData() [2/5]
Definition at line 438 of file RegSelSiLUT.cxx.
451 for (
unsigned j=0 ; j<
layers.size() ; j++ ) {
453 double rmin =
layers[j].rMin();
454 double rmax =
layers[j].rMax();
456 double phimin = roi.getphiMin();
457 double phimax = roi.getphiMax();
463 if (
philimits(
x,
y, rmin, rmax, phimin, phimax) ) {
467 RegSelRoI troi( roi.getzMin(), roi.getzMax(), phimin, phimax, roi.getetaMin(), roi.getetaMax() );
470 bool inLayer =
layers[j].inRoI(troi);
474 if ( inLayer )
layers[j].getModules(troi, modules);
486 double phimin = roi.getphiMin();
487 double phimax = roi.getphiMax();
495 RegSelRoI troi( roi.getzMin(), roi.getzMax(), phimin, phimax, roi.getetaMin(), roi.getetaMax() );
499 if ( inSubDet )
m_SubDet[
i].getModules(troi, modules);
◆ getRoIData() [3/5]
here if layer is of the format 1XYY where X=0 (barrel), X=2 (endcap) and YY is the layer within the sub-system then the specific layer in the sub-system is used.
If it is of the form YY, then simple layer number is used
determine whether an layer in a specific subdetector is requested
Definition at line 315 of file RegSelSiLUT.cxx.
322 int ilayer =
layer%100;
324 bool subdetflag =
layer/1000;
326 if ( subdetflag ) subdet = (
layer%1000)/100;
330 if ( !subdetflag || ( subdetflag && subdet==std::fabs(
m_SubDet[
i].
ID()) ) ) {
333 if ( inSubDet )
m_SubDet[
i].getModules(roi, ilayer, modules);
◆ getRoIData() [4/5]
◆ getRoIData() [5/5]
bool RegSelSiLUT::getRoIData |
( |
const RegSelRoI & |
r, |
|
|
unsigned |
subdetector, |
|
|
unsigned |
layer, |
|
|
std::vector< const RegSelModule * > & |
modules, |
|
|
double |
x, |
|
|
double |
y |
|
) |
| const |
Definition at line 514 of file RegSelSiLUT.cxx.
525 if ( subdetector<
m_SubDet.size() ) {
527 const std::vector<RegSelLayer>&
layers =
m_SubDet[subdetector].getLayers();
534 double phimin = roi.getphiMin();
535 double phimax = roi.getphiMax();
540 if (
philimits(
x,
y, rmin, rmax, phimin, phimax) ) {
545 RegSelRoI troi( roi.getzMin(), roi.getzMax(), phimin, phimax, roi.getetaMin(), roi.getetaMax() );
551 if ( inLayer )
layers[
layer].getModules(troi, modules);
◆ getSubDet()
◆ HashIDList() [1/2]
implementation of the IRegSelUT interface
hash id methods
interface implementation for the IRegSelLUT methods
hash id methods
Implements IRegSelLUT.
Definition at line 39 of file RegSelSiLUT.cxx.
◆ HashIDList() [2/2]
HashIDList interface declaration. return list of non-repeated IdentifierHash.
- Parameters
-
long | layer, long int to decide which layer within the detector. |
IRoiDescriptor | roi, the IRoiDescriptor for the roi, all enabled elements in the roi are found. |
- Returns
- std::vector<IdentifierHash> which is a list of non-repeated Offline Identifier Hash numbers.
Implements IRegSelLUT.
Definition at line 45 of file RegSelSiLUT.cxx.
◆ HashIDList_internal() [1/2]
horrible internal interface methods
protected single Roi mathods
hashid methods
hash id methods
Definition at line 68 of file RegSelSiLUT.cxx.
◆ HashIDList_internal() [2/2]
◆ ID()
DET RegSelSiLUT::ID |
( |
| ) |
const |
|
inline |
◆ IDList()
template<typename C , typename T >
Definition at line 88 of file IRegSelLUT.h.
92 for (
unsigned iroi=roi.
size() ; iroi-- ; ) IDList<C>( *(roi.
at(iroi)), idlist, lister );
97 (
dynamic_cast<const C*
>(
this)->*lister)( roi, idlist );
◆ IDList_layer()
template<typename C , typename T >
Definition at line 106 of file IRegSelLUT.h.
110 for (
unsigned iroi=roi.
size() ; iroi-- ; ) IDList_layer<C>(
layer, *(roi.
at(iroi)), idlist, lister );
115 (
dynamic_cast<const C*
>(
this)->*lister)(
layer, roi, idlist );
◆ initialise()
void RegSelSiLUT::initialise |
( |
| ) |
|
uncomment this if you want to print out the list of all the module ids assigned to each rob RegSelROBList roblist( m_modules );
Definition at line 139 of file RegSelSiLUT.cxx.
145 std::vector<int> subdetid;
149 int detid = mptr->detector();
152 for (
int j=subdetid.size() ; j-- ; )
if ( subdetid[j]==detid )
found =
true;
154 if ( !
found ) subdetid.push_back(detid);
164 for (
int i=subdetid.size() ;
i-- ; ) {
166 m_idmap.insert( std::map<int, int>::value_type(subdetid[
i],
i) );
186 m_map[(*mptr).hashID()] = &(*mptr);
◆ initialiseDisabledModules()
void RegSelSiLUT::initialiseDisabledModules |
( |
| ) |
|
◆ initialiseFullScan()
void RegSelSiLUT::initialiseFullScan |
( |
| ) |
|
Definition at line 204 of file RegSelSiLUT.cxx.
209 std::set<uint32_t> robids;
211 std::vector<RegSelModule>::const_iterator mptr(
m_modules.begin());
212 std::vector<RegSelModule>::const_iterator eptr(
m_modules.end());
213 for ( ; mptr!=eptr ; ++mptr ) {
214 if ( (*mptr).enabled() ) {
216 robids.insert((*mptr).robID());
221 while ( ritr!=robids.end() ) {
◆ Module()
Definition at line 242 of file RegSelSiLUT.cxx.
243 std::map<const IdentifierHash, const RegSelModule*>::const_iterator hptr(
m_map.find(
h));
244 if ( hptr!=
m_map.end() )
return hptr->second;
◆ read() [1/2]
bool RegSelSiLUT::read |
( |
const std::string & |
s | ) |
|
◆ read() [2/2]
bool RegSelSiLUT::read |
( |
std::istream & |
s | ) |
|
Definition at line 1204 of file RegSelSiLUT.cxx.
1206 unsigned Nmodules = 0;
1212 bool newformat =
false;
1219 if ( newformat )
s.clear();
1221 unsigned modcount=0;
1223 for ( ; newformat || modcount<Nmodules ; modcount++ ) {
1236 if ( (!newformat) && (modcount<Nmodules ) )
return false;
◆ removeDuplicates()
template<typename T >
static void IRegSelLUT::removeDuplicates |
( |
std::vector< T > & |
vec | ) |
|
|
inlinestaticprotectedinherited |
useful for removing duplicates if required ...
Definition at line 78 of file IRegSelLUT.h.
80 vec.erase(std::unique(
vec.begin(),
vec.end()),
vec.end());
◆ reset()
void RegSelSiLUT::reset |
( |
| ) |
|
◆ ROBIDList() [1/2]
void RegSelSiLUT::ROBIDList |
( |
const IRoiDescriptor & |
roi, |
|
|
std::vector< uint32_t > & |
roblist |
|
) |
| const |
|
overridevirtual |
◆ ROBIDList() [2/2]
void RegSelSiLUT::ROBIDList |
( |
long |
layer, |
|
|
const IRoiDescriptor & |
roi, |
|
|
std::vector< uint32_t > & |
roblist |
|
) |
| const |
|
overridevirtual |
ROBIDList interface declaration. This interface can be used by the ID subdetectors. A list of non-repeated ROBIDs (uint_32_t) is returned by a reference.
- Parameters
-
long | layer, long int to decide which layer within the detector. |
IRoiDescriptor | the IRoiDescriptor for the roi, all enabled elements in the roi are found. |
- Returns
- std::vector<uint32_t> which is a list of non-repeated ROBID numbers.
Implements IRegSelLUT.
Definition at line 58 of file RegSelSiLUT.cxx.
◆ ROBIDList_internal() [1/2]
void RegSelSiLUT::ROBIDList_internal |
( |
const IRoiDescriptor & |
roi, |
|
|
std::vector< uint32_t > & |
roblist |
|
) |
| const |
|
protectedvirtual |
◆ ROBIDList_internal() [2/2]
void RegSelSiLUT::ROBIDList_internal |
( |
long |
layer, |
|
|
const IRoiDescriptor & |
roi, |
|
|
std::vector< uint32_t > & |
roblist |
|
) |
| const |
|
protectedvirtual |
◆ write() [1/2]
void RegSelSiLUT::write |
( |
const std::string & |
filename | ) |
const |
◆ write() [2/2]
void RegSelSiLUT::write |
( |
std::ostream & |
s = std::cout | ) |
const |
◆ m_allHashes
◆ m_allROBids
std::vector<uint32_t> RegSelSiLUT::m_allROBids |
|
protected |
◆ m_disabled
◆ m_ID
◆ m_idmap
std::map<int, int> RegSelSiLUT::m_idmap |
|
protected |
◆ m_map
◆ m_modules
◆ m_name
std::string RegSelName::m_name |
|
protectedinherited |
◆ m_SubDet
The documentation for this class was generated from the following files:
JetConstituentVector::iterator iterator
std::vector< uint32_t > m_allROBids
virtual void ROBIDList_internal(const IRoiDescriptor &roi, std::vector< uint32_t > &roblist) const
rob methods
void initialiseDisabledModules()
void getDisabledModules(const RegSelRoI &roi, std::vector< const RegSelModule * > &modules) const
virtual double etaMinus() const =0
std::vector< IdentifierHash > m_allHashes
bool getRoIData(const RegSelRoI &r, std::vector< const RegSelModule * > &modules) const
virtual unsigned size() const =0
number of constituents
void initialiseFullScan()
std::vector< RegSelModule > m_modules
std::vector< size_t > vec
virtual double etaPlus() const =0
bool getModule(std::istream &s, RegSelModule &m)
void write(std::ostream &s=std::cout) const
virtual void getRobList(const RegSelRoI &roi, unsigned layer, std::vector< uint32_t > &roblist, bool removeduplicates=true) const
virtual double phiMinus() const =0
std::map< int, int > m_idmap
virtual void HashIDList_internal(const IRoiDescriptor &roi, std::vector< IdentifierHash > &idlist) const
horrible internal interface methods
virtual double phiPlus() const =0
extreme phi values
virtual void getHashList(const RegSelRoI &roi, std::vector< IdentifierHash > &hashlist) const
void addModules(const std::vector< RegSelModule > &m)
bool philimits(double x, double y, double rmin, double rmax, double &phimin, double &phimax)
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...
DataVector< Identifier > idvec
static void cleanup(std::vector< IdentifierHash > &idvec)
annoying cleanup function specifically for the RPC, but we have to add it here since we have abstract...
void addModule(RegSelModule &module)
virtual double zedPlus() const =0
the zed and eta values at the most forward and most rear ends of the RoI
void sort(typename std::reverse_iterator< DataModel_detail::iterator< DVL > > beg, typename std::reverse_iterator< DataModel_detail::iterator< DVL > > end, const Compare &comp)
Specialization of sort for DataVector/List.
virtual bool isFullscan() const =0
is this a full detector RoI?
RegSelName(const std::string &s="")
std::map< const IdentifierHash, const RegSelModule * > m_map
def removeduplicates(flags, cells_name, *args, **kw)
virtual double zedMinus() const =0
void drawlayers(std::vector< const ZRObject * > &c) const
const std::vector< RegSelModule > & getModules() const
This is a "hash" representation of an Identifier. This encodes a 32 bit index which can be used to lo...
bool read(std::istream &s)
virtual const IRoiDescriptor * at(int i) const =0
find an RoiDescriptor constituent
std::vector< RegSelSubDetector > m_SubDet
static void removeDuplicates(std::vector< T > &vec)
useful for removing duplicates if required ...
size_type size() const noexcept
Returns the number of elements in the collection.
virtual bool inRoI(const RegSelRoI &roi) const
virtual bool composite() const =0
Super RoI access methods.