diff --git a/DataFormats/ForwardDetId/interface/HGCEEDetId.h b/DataFormats/ForwardDetId/interface/HGCEEDetId.h index 623f4a79525df..3ec401eed62f7 100644 --- a/DataFormats/ForwardDetId/interface/HGCEEDetId.h +++ b/DataFormats/ForwardDetId/interface/HGCEEDetId.h @@ -27,20 +27,20 @@ class HGCEEDetId : public DetId { int cell() const { return id_&0xFFFF; } /// get the sector # - int sector() const { return (id_>>16)&0x1F; } + int sector() const { return (id_>>16)&0x7F; } /// get the degree subsector - int subsector() const { return ( (id_>>21)&0x1 ? 1 : -1); } + int subsector() const { return ( (id_>>23)&0x1 ? 1 : -1); } /// get the layer # - int layer() const { return (id_>>22)&0x1F; } + int layer() const { return (id_>>24)&0x7F; } /// get the z-side of the cell (1/-1) - int zside() const { return ((id_>>27) & 0x1 ? 1 : -1); } + int zside() const { return ((id_>>31) & 0x1 ? 1 : -1); } - /// consistency check - bool isEE() const { return ((id_>>28) & 0x1); } - bool isForward() const { return (((id_>>29)& 0x7)==Forward); } + /// consistency check : no bits left => no overhead + bool isEE() const { return true; } + bool isForward() const { return true; } static const HGCEEDetId Undefined; diff --git a/DataFormats/ForwardDetId/interface/HGCHEDetId.h b/DataFormats/ForwardDetId/interface/HGCHEDetId.h index 4c9b50529ae15..9e480e6f85b49 100644 --- a/DataFormats/ForwardDetId/interface/HGCHEDetId.h +++ b/DataFormats/ForwardDetId/interface/HGCHEDetId.h @@ -27,20 +27,20 @@ class HGCHEDetId : public DetId { int cell() const { return id_&0xFFFF; } /// get the sector # - int sector() const { return (id_>>16)&0x1F; } + int sector() const { return (id_>>16)&0x7F; } /// get the degree subsector - int subsector() const { return ( (id_>>21)&0x1 ? 1 : -1); } + int subsector() const { return ( (id_>>23)&0x1 ? 1 : -1); } /// get the layer # - int layer() const { return (id_>>22)&0x1F; } + int layer() const { return (id_>>24)&0x7F; } /// get the z-side of the cell (1/-1) - int zside() const { return ((id_>>27) & 0x1 ? 1 : -1); } + int zside() const { return ((id_>>31) & 0x1 ? 1 : -1); } /// consistency check - bool isHE() const { return (((id_>>28) & 0x1)==0); } - bool isForward() const { return (((id_>>29)& 0x7)==Forward); } + bool isHE() const { return true; } + bool isForward() const { return true; } static const HGCHEDetId Undefined; diff --git a/DataFormats/ForwardDetId/src/HGCEEDetId.cc b/DataFormats/ForwardDetId/src/HGCEEDetId.cc index 392164fd21766..b17e0e5bb0f44 100644 --- a/DataFormats/ForwardDetId/src/HGCEEDetId.cc +++ b/DataFormats/ForwardDetId/src/HGCEEDetId.cc @@ -15,12 +15,10 @@ HGCEEDetId::HGCEEDetId(ForwardSubdetector subdet, int zp, int lay, int sec, int { uint32_t rawid=0; rawid |= ((cell & 0xffff) << 0 ); - rawid |= ((sec & 0x1f) << 16); - rawid |= ((subsec & 0x1) << 21); - rawid |= ((lay & 0x1f) << 22); - if(zp>0) rawid |= ((zp & 0x1) << 27); - rawid |= (1 << 28); - rawid |= ((Forward & 0x7) << 29); + rawid |= ((sec & 0x7f) << 16); + rawid |= ((subsec & 0x1) << 23); + rawid |= ((lay & 0x7f) << 24); + if(zp>0) rawid |= ((zp & 0x1) << 31); id_=rawid; } diff --git a/DataFormats/ForwardDetId/src/HGCHEDetId.cc b/DataFormats/ForwardDetId/src/HGCHEDetId.cc index 9901f5e49bb57..002cf5f3c959f 100644 --- a/DataFormats/ForwardDetId/src/HGCHEDetId.cc +++ b/DataFormats/ForwardDetId/src/HGCHEDetId.cc @@ -14,11 +14,10 @@ HGCHEDetId::HGCHEDetId(ForwardSubdetector subdet, int zp, int lay, int sec, int { uint32_t rawid=0; rawid |= ((cell & 0xffff) << 0 ); - rawid |= ((sec & 0x1f) << 16); - rawid |= ((subsec & 0x1) << 21); - rawid |= ((lay & 0x1f) << 22); - if(zp>0) rawid |= ((zp & 0x1) << 27); - rawid |= ((Forward & 0x7) << 29); + rawid |= ((sec & 0x7f) << 16); + rawid |= ((subsec & 0x1) << 23); + rawid |= ((lay & 0x7f) << 24); + if(zp>0) rawid |= ((zp & 0x1) << 31); id_=rawid; } diff --git a/Geometry/HGCalSimData/data/hgcsens.xml b/Geometry/HGCalSimData/data/hgcsens.xml index be112a5fc225e..2d6bec0b23451 100644 --- a/Geometry/HGCalSimData/data/hgcsens.xml +++ b/Geometry/HGCalSimData/data/hgcsens.xml @@ -22,7 +22,7 @@ - + --> diff --git a/IOPool/Input/src/RootInputFileSequence.cc b/IOPool/Input/src/RootInputFileSequence.cc index 8ac9032817360..c27e53bd95a3c 100644 --- a/IOPool/Input/src/RootInputFileSequence.cc +++ b/IOPool/Input/src/RootInputFileSequence.cc @@ -596,7 +596,7 @@ namespace edm { skipBadFiles_ = false; if(fileIter_ == fileIterEnd_ || !rootFile_) { if(fileIterEnd_ == fileIterBegin_) { - throw Exception(errors::Configuration) << "RootInputFileSequence::readOneSequential(): no input files specified.\n"; + throw Exception(errors::Configuration) << "RootInputFileSequence::readOneSequential(): no input files specified for secondary input source.\n"; } fileIter_ = fileIterBegin_; initFile(false); @@ -619,7 +619,7 @@ namespace edm { EventPrincipal* RootInputFileSequence::readOneSequentialWithID(EventPrincipal& cache, LuminosityBlockID const& id) { if(fileIterEnd_ == fileIterBegin_) { - throw Exception(errors::Configuration) << "RootInputFileSequence::readOneSequentialWithID(): no input files specified.\n"; + throw Exception(errors::Configuration) << "RootInputFileSequence::readOneSequentialWithID(): no input files specified for secondary input source.\n"; } skipBadFiles_ = false; if(fileIter_ == fileIterEnd_ || !rootFile_ || @@ -643,13 +643,15 @@ namespace edm { EventPrincipal* RootInputFileSequence::readOneSpecified(EventPrincipal& cache, EventID const& id) { + if(fileIterEnd_ == fileIterBegin_) { + throw Exception(errors::Configuration) << "RootInputFileSequence::readOneSpecified(): no input files specified for secondary input source.\n"; + } skipBadFiles_ = false; bool found = skipToItem(id.run(), id.luminosityBlock(), id.event()); if(!found) { - throw Exception(errors::NotFound) << - "RootInputFileSequence::readOneSpecified(): Secondary Input file " << - fileIter_->fileName() << - " does not contain specified event:\n" << id << "\n"; + throw Exception(errors::NotFound) << + "RootInputFileSequence::readOneSpecified(): Secondary Input files" << + " do not contain specified event:\n" << id << "\n"; } EventPrincipal* ep = rootFile_->readCurrentEvent(cache); assert(ep != 0); @@ -659,7 +661,7 @@ namespace edm { EventPrincipal* RootInputFileSequence::readOneRandom(EventPrincipal& cache) { if(fileIterEnd_ == fileIterBegin_) { - throw Exception(errors::Configuration) << "RootInputFileSequence::readOneRandom(): no input files specified.\n"; + throw Exception(errors::Configuration) << "RootInputFileSequence::readOneRandom(): no input files specified for secondary input source.\n"; } if(!flatDistribution_) { Service rng; @@ -699,7 +701,7 @@ namespace edm { EventPrincipal* RootInputFileSequence::readOneRandomWithID(EventPrincipal& cache, LuminosityBlockID const& id) { if(fileIterEnd_ == fileIterBegin_) { - throw Exception(errors::Configuration) << "RootInputFileSequence::readOneRandomWithID(): no input files specified.\n"; + throw Exception(errors::Configuration) << "RootInputFileSequence::readOneRandomWithID(): no input files specified for secondary input source.\n"; } if(!flatDistribution_) { Service rng;