Skip to content

Commit

Permalink
Merge pull request #14506 from sarafiorendi/L2MuPropagateME2Fb_80X
Browse files Browse the repository at this point in the history
add tentative propagation to ME2 if MB2 fails (backport of #14505)
  • Loading branch information
cmsbuild committed May 18, 2016
2 parents f202b3a + 8874732 commit 89060f7
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions RecoMuon/L2MuonSeedGenerator/src/L2MuonSeedGeneratorFromL1T.cc
Expand Up @@ -217,6 +217,11 @@ void L2MuonSeedGeneratorFromL1T::produce(edm::Event& iEvent, const edm::EventSet
if( pt < 1.0) pt = 1.0;
}

// Fallback solution using ME2
DetId fallback_id;
theta < Geom::pi()/2. ? fallback_id = CSCDetId(1,2,0,0,0) : fallback_id = CSCDetId(2,2,0,0,0);
const DetLayer* ME2DetLayer = theService->detLayerGeometry()->idToLayer(fallback_id);

vec.setMag(radius);

GlobalPoint pos(vec.x(),vec.y(),vec.z());
Expand Down Expand Up @@ -292,6 +297,15 @@ void L2MuonSeedGeneratorFromL1T::produce(edm::Event& iEvent, const edm::EventSet
detsWithStates = detLayer->compatibleDets(tsos,
*theService->propagator(thePropagatorName),
*theEstimator);

if (detsWithStates.size() == 0 && barrel ) {
// try again to propagate but using ME2 as reference
tsos = theService->propagator(thePropagatorName)->propagate(state, ME2DetLayer->surface());
detsWithStates = ME2DetLayer->compatibleDets(tsos,
*theService->propagator(thePropagatorName),
*theEstimator);
}

if (detsWithStates.size()){

TrajectoryStateOnSurface newTSOS = detsWithStates.front().second;
Expand Down

0 comments on commit 89060f7

Please sign in to comment.