48 std::vector< std::vector< map_element > >& tmap =
m_grandmap.payload();
54 for (
int i=0 ; i<
m_Neta ; i++ ) {
59 std::vector< map_element > row;
61 for (
int j=0 ; j<
m_Nphi ; j++ ) {
65 map_element m( tetamin, tetamax, tphimin, tphimax, empty_set );
71 tmap.push_back( std::move(row) );
91 std::vector< std::vector< map_element > >& tmap =
m_grandmap.payload();
103 if ( first_eta<0 ) first_eta = 0;
107 if ( first_phi<0 ) first_phi +=
m_Nphi;
110 if ( last_phi<0 ) last_phi +=
m_Nphi;
115 if ( first_phi<last_phi ) {
116 for (
int i=
int(first_eta) ; i<=last_eta ; i++ ) {
117 for (
int j=
int(first_phi) ; j<=last_phi ; j++ ) tmap[i][j].payload().insert( m );
121 for (
int i=
int(first_eta) ; i<=last_eta ; i++ ) {
122 for (
int j=0 ; j<=int(last_phi) ; j++ ) tmap[i][j].payload().insert( m );
123 for (
int j=first_phi ; j<
m_Nphi ; j++ ) tmap[i][j].payload().insert( m );
138 std::vector<IdentifierHash>& hashids,
143 std::set<EtaPhiModule> modules;
147 hashids.reserve( modules.size() );
149 std::set<EtaPhiModule>::iterator rpitr=modules.begin();
150 std::set<EtaPhiModule>::iterator rpend=modules.end();
152 while ( rpitr!=rpend ) {
153 hashids.push_back( rpitr->payload() );
168 std::set<EtaPhiModule>& modules,
169 double idradius )
const {
182 bool inmap =
m_grandmap.overlap( virtual_roi );
184 if ( !inmap )
return virtual_roi;
194 if ( first_eta<0 ) first_eta = 0;
198 if ( first_phi<0 ) first_phi +=
m_Nphi;
201 if ( last_phi<0 ) last_phi +=
m_Nphi;
204 const std::vector< std::vector< map_element > >& tmap =
map();
207 if ( first_phi<last_phi ) {
208 for (
int i=first_eta ; i<=last_eta ; i++ ) {
209 getRowElements( virtual_roi, tmap[i], first_phi, last_phi, modules );
213 for (
int i=first_eta ; i<=last_eta ; i++ ) {
base class, with just the eta-phi limits and the overlap functionality
double etamin() const
accessors
bool addModule(EtaPhiModule &m)
add an element, returns true if element added.
double m_ideta
inverse eta element size
const EtaPhiBase getElements(const RegSelRoI &roi, std::set< EtaPhiModule > &modules, double idradius=600) const
get the modules from the elements, returns the virtual eta-phi roi corresponding to the virtual eta -...
void getRowElements(const EtaPhiBase &virtual_roi, const std::vector< map_element > &row, int first_phi, int last_phi, std::set< EtaPhiModule > &modules) const
get the modules from the elements in the phi direction, called for each eta slice processed
const std::vector< std::vector< map_element > > & map() const
access the actual complete map - shouldn't be public really, is only so for the ostream streamer
virtual ~RegSelEtaPhiLUT()
destructor
TRegSelEtaPhiModule< std::vector< std::vector< map_element > > > m_grandmap
overall map, can get the limits from the object, can have different numbers and different ranges for ...
double m_idphi
inverse phi element size
TRegSelEtaPhiModule< IdentifierHash > EtaPhiModule
Concrete data type.
void getModules(const RegSelRoI &roi, std::vector< IdentifierHash > &hashids, double r=600) const
get back a vector of the payload for each of the eta-phi segments that overlap with this roi
TRegSelEtaPhiModule< moduleset > map_element
element type from which the look up table is built
std::set< EtaPhiModule > moduleset
tower of the actual modules assigned to each element of the lookup table
RegSelEtaPhiLUT(int Neta=3, int Nphi=32)
defines the number of elements in the internal eta-phi element storage NB: these numbers of internal ...
double m_etamin
eta and phi ranges and number of internal book keeping elements in eta and phi directions
double etaMinLimit(double r) const
find the min eta limits for an object fully contained within an roi, bounded with the specifed radius
double etaMaxLimit(double r) const
find the max eta limits for an object fully contained within an roi, bounded with the specifed radius