9 throw cms::Exception(
"FileNotFound",
"Ecal TB Crystal map file not found")
10 <<
"\n" << MapFileName <<
" could not be opened.\n";
35 int thisCrysIndex = 0;
37 CrystalTBIndexMap::const_iterator mapItr =
map_.find(std::make_pair(thisEta,thisPhi));
38 if ( mapItr !=
map_.end() ) {
39 thisCrysIndex = mapItr->second;
48 thisEta = thisPhi = 0.;
50 if ( thisCrysIndex < 1 || thisCrysIndex >
NCRYSTAL ) {
51 edm::LogError(
"OutOfBounds") <<
"Required crystal number " << thisCrysIndex <<
" outside range";
55 for ( CrystalTBIndexMap::const_iterator mapItr =
map_.begin() ; mapItr !=
map_.end() ; ++mapItr) {
56 int theCrysIndex = mapItr->second;
57 if ( theCrysIndex == thisCrysIndex ) {
58 thisEta = (mapItr->first).
first;
59 thisPhi = (mapItr->first).
second;
static const int NCRYSTAL
static std::string const input
U second(std::pair< T, U > const &p)
EcalTBCrystalMap(std::string const &MapFileName)
void findCrystalAngles(const int thisCrysIndex, double &thisEta, double &thisPhi)
int CrystalIndex(double thisEta, double thisPhi)