7 throw cms::Exception(
"FileNotFound",
"Ecal TB Crystal map file not found")
9 << MapFileName <<
" could not be opened.\n";
28 int thisCrysIndex = 0;
30 CrystalTBIndexMap::const_iterator mapItr =
map_.find(std::make_pair(thisEta, thisPhi));
31 if (mapItr !=
map_.end()) {
32 thisCrysIndex = mapItr->second;
39 thisEta = thisPhi = 0.;
41 if (thisCrysIndex < 1 || thisCrysIndex >
NCRYSTAL) {
42 edm::LogError(
"OutOfBounds") <<
"Required crystal number " << thisCrysIndex <<
" outside range";
46 for (CrystalTBIndexMap::const_iterator mapItr =
map_.begin(); mapItr !=
map_.end(); ++mapItr) {
47 int theCrysIndex = mapItr->second;
48 if (theCrysIndex == thisCrysIndex) {
49 thisEta = (mapItr->first).
first;
50 thisPhi = (mapItr->first).
second;
static const int NCRYSTAL
Log< level::Error, false > LogError
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)