Skip to content

Commit

Permalink
Merge pull request #104 from cms-sw/CMSSW_6_2_X_SLHC
Browse files Browse the repository at this point in the history
Cmssw 6 2 x slhc
  • Loading branch information
jshlee committed Mar 12, 2014
2 parents a628e62 + b5e760d commit 5b4b65a
Show file tree
Hide file tree
Showing 6 changed files with 32 additions and 33 deletions.
14 changes: 7 additions & 7 deletions DataFormats/ForwardDetId/interface/HGCEEDetId.h
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down
12 changes: 6 additions & 6 deletions DataFormats/ForwardDetId/interface/HGCHEDetId.h
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down
10 changes: 4 additions & 6 deletions DataFormats/ForwardDetId/src/HGCEEDetId.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down
9 changes: 4 additions & 5 deletions DataFormats/ForwardDetId/src/HGCHEDetId.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down
2 changes: 1 addition & 1 deletion Geometry/HGCalSimData/data/hgcsens.xml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
<PartSelector path="//.*HEGem1Sensitive.*"/>
<PartSelector path="//.*HEGem2Sensitive.*"/>
<Parameter name="SensitiveDetector" value="HGCSensitiveDetector" eval="false"/>
<Parameter name="ReadOutName" value="HGCHitsHEgem" eval="false"/>
<Parameter name="ReadOutName" value="HGCHitsHE" eval="false"/>
</SpecPar>
-->
</SpecParSection>
Expand Down
18 changes: 10 additions & 8 deletions IOPool/Input/src/RootInputFileSequence.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand All @@ -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_ ||
Expand All @@ -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);
Expand All @@ -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<RandomNumberGenerator> rng;
Expand Down Expand Up @@ -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<RandomNumberGenerator> rng;
Expand Down

0 comments on commit 5b4b65a

Please sign in to comment.