Skip to content

Commit

Permalink
Merge pull request #17250 from pietverwilligen/90X_NewME0GeometryBuil…
Browse files Browse the repository at this point in the history
…der_bugfix

ME0ReDigitizer not using roll==0 to distinguish between M1 and M2 geometry
  • Loading branch information
cmsbuild committed Jan 30, 2017
2 parents ac3b59c + 78e8719 commit ac84363
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions SimMuon/GEMDigitizer/src/ME0ReDigiProducer.cc
Expand Up @@ -79,6 +79,7 @@ void ME0ReDigiProducer::beginRun(const edm::Run&, const edm::EventSetup& eventSe
<< "ME0DetId " << detId << " central TOF " << centralTOF << std::endl;
}
nPartitions_ = centralTOF_.size()/6;
LogDebug("ME0ReDigiProducer")<<" Number of partitions "<<nPartitions_<<std::endl;
}


Expand Down Expand Up @@ -147,7 +148,6 @@ void ME0ReDigiProducer::buildDigis(const ME0DigiPreRecoCollection & input_digis,
// arrival time in ns
//const float t0(centralTOF_[ nPartitions_ * (detId.layer() -1) + detId.roll() - 1 ]);
int index = nPartitions_ * (detId.layer() -1) + detId.roll() - 1;
if(detId.roll() == 0) index = nPartitions_ * (detId.layer() -1) + detId.roll();
edm::LogVerbatim("ME0ReDigiProducer")
<<"size "<<centralTOF_.size()<<" nPartitions "<<nPartitions_<<" layer "<<detId.layer()<<" roll "<<detId.roll()<<" index "<<index<<std::endl;

Expand Down Expand Up @@ -182,7 +182,7 @@ void ME0ReDigiProducer::buildDigis(const ME0DigiPreRecoCollection & input_digis,
const float oldR(oldGP.perp());

float newR = oldR;
if (me0Digi.prompt() and smearRadial_ and detId.roll() > 0)
if (me0Digi.prompt() and smearRadial_ and nPartitions_ > 1)
newR = CLHEP::RandGaussQ::shoot(engine, oldR, radialResolution_);

// calculate the new position in local coordinates
Expand Down Expand Up @@ -240,7 +240,7 @@ void ME0ReDigiProducer::buildDigis(const ME0DigiPreRecoCollection & input_digis,

float newY(newLP.y());
// new hit has y coordinate in the center of the roll when using discretizeY
if (discretizeY_ and detId.roll() > 0) newY = 0;
if (discretizeY_ and nPartitions_ > 1) newY = 0;
edm::LogVerbatim("ME0ReDigiProducer")
<< "\tnew Y " << newY << std::endl;

Expand Down

0 comments on commit ac84363

Please sign in to comment.