9#include "CaloDetDescr/CaloDetDescrElement.h"
25 const IInterface* parent )
28 declareInterface<TileRoI_Map>(
this );
45 std::vector<HWIdentifier>::const_iterator first =
m_tileHWID->adc_begin();
46 std::vector<HWIdentifier>::const_iterator last =
m_tileHWID->adc_end();
49 for ( ; first!=last; ++first) {
54 std::cout <<
" number of ADCs made in TileRoI_Map " << nADC<< std::endl;
59 return StatusCode::SUCCESS;
88 <<
" HW id " <<
m_tileHWID->to_string(adc_hwid)
89 <<
" id " <<
m_tileID->to_string(adc_id)
97 COLL_ID_VEC::const_iterator it = v.begin();
98 COLL_ID_VEC::const_iterator it_end = v.end();
104 for(; it != it_end; ++it)
105 if(frag == (*it) ) found =
true;
113 std::cout <<
" Failed to get Identifier in TileRoI_Map::add "<< std::endl;
126 OFFMAP::const_iterator it =
m_offmap.find(
id);
129 std::string err(
" TileRoI_Map: not entry for ID ");
144 ONLMAP::const_iterator it =
m_onlmap.find(
id );
147 std::string err(
" TileRoI_Map::TrigTowerID(const HWIdentifier&): no entry for HWID ");
160 ROIMAP::const_iterator it =
m_roimap.find(RoIid);
164 std::cout <<
" TileRoI_Map::CollectionID: can not find RoI" << std::endl;
172 ROIMAP::const_iterator it =
m_roimap.find(RoIid);
180 E_P_MAP::const_iterator it =
m_epmap.begin();
181 E_P_MAP::const_iterator it_end =
m_epmap.end();
183 std::cout <<
" COLLECTION ID , HASHID, ETAMIN, ETAMAX, PHIMIN, PHIMAX "<<std::endl ;
187 for(; it!=it_end;++it){
188 int frag = (*it).first;
197 std::cout <<std::hex<< frag
198 <<
" " <<hashid <<
" "
204 std::cout << std::dec << std::endl;
209 float& etamin,
float& etamax,
210 float& phimin,
float& phimax )
const
213 if( (
int)hashid >=
m_idhash.max() )
return false;
215 int frag =
m_idhash.identifier(hashid);
216 E_P_MAP::const_iterator it =
m_epmap.find(frag);
217 if(it ==
m_epmap.end())
return false;
219 etamin = (*it).second.etamin;
220 etamax = (*it).second.etamax;
221 phimin = (*it).second.phimin;
222 phimax = (*it).second.phimax;
#define ATH_CHECK
Evaluate an expression and check for errors.
static const InterfaceID IID_ITileRoI_Map("TileRoI_Map", 1, 0)
const ServiceHandle< StoreGateSvc > & detStore() const
This class groups all DetDescr information related to a CaloCell.
float eta() const
cell eta
float phi() const
cell phi
bool is_valid() const
Check if id is in a valid state.
static const TileCablingService * getInstance()
get pointer to service instance
Helper class for TileCal online (hardware) identifiers.
Exception class for Tile Identifiers.
TT_ID TrigTowerID(const Identifier &id) const
return TrigTowerID for various queries.
const TileDetDescrManager * m_tileMgr
const TileCablingService * m_cablingSvc
const std::vector< COLL_ID > & CollectionID(const TT_ID &id) const
reserve lookup.
StatusCode initialize()
define a RoI identifier type, two ints.
Gaudi::Property< bool > m_print
static const InterfaceID & interfaceID()
AlgTool InterfaceID.
bool validId(const TT_ID &tt_id) const
check validity
bool addEntry(const HWIdentifier &adc_hwid)
bool getEtaPhiRegion(unsigned int hashid, float &etamin, float &etamax, float &phimin, float &phimax) const
returns Eta-Phi Region for a hashed ID of the Collection.
std::vector< COLL_ID > COLL_ID_VEC
TileRoI_Map(const std::string &type, const std::string &name, const IInterface *parent)
constructor
void printEtaPhiRegions()
const TileHWID * m_tileHWID