Skip to content

Commit

Permalink
Merge pull request #21146 from jshlee/GEM-bugfix-94x
Browse files Browse the repository at this point in the history
GEM bugfix for issue #20772
  • Loading branch information
cmsbuild committed Nov 13, 2017
2 parents 3e40de1 + 31d95ff commit 5686e5c
Show file tree
Hide file tree
Showing 5 changed files with 134 additions and 239 deletions.
6 changes: 3 additions & 3 deletions RecoLocalMuon/GEMSegment/plugins/GEMSegmentBuilder.cc
Expand Up @@ -32,7 +32,7 @@ void GEMSegmentBuilder::build(const GEMRecHitCollection* recHits, GEMSegmentColl
// Let's define the ensemble of GEM devices having the same region, chambers number (phi)
// different eta partitions and different layers are allowed

std::map<uint32_t, std::vector<GEMRecHit*> > ensembleRH;
std::map<uint32_t, std::vector<const GEMRecHit*> > ensembleRH;

// Loop on the GEM rechit and select the different GEM Ensemble
for(GEMRecHitCollection::const_iterator it2 = recHits->begin(); it2 != recHits->end(); ++it2) {
Expand All @@ -47,9 +47,9 @@ void GEMSegmentBuilder::build(const GEMRecHitCollection* recHits, GEMSegmentColl
// this reference id serves to link all GEMEtaPartitions
// and will also be used to determine the GEMSuperChamber
// to which the GEMSegment is assigned (done inside GEMSegAlgoXX)
GEMDetId id(it2->gemId().region(),1,it2->gemId().station(),0,it2->gemId().chamber(),0);
GEMDetId id(it2->gemId().superChamberId());
// save current GEMRecHit in vector associated to the reference id
ensembleRH[id.rawId()].push_back(it2->clone());
ensembleRH[id.rawId()].push_back(&(*it2));
}

// Loop on the entire map <ref id, vector of GEMRecHits>
Expand Down
11 changes: 6 additions & 5 deletions RecoLocalMuon/GEMSegment/plugins/ME0SegAlgoRU.cc
Expand Up @@ -126,10 +126,11 @@ std::vector<ME0Segment> ME0SegAlgoRU::run(const ME0Chamber * chamber, const HitA
for(unsigned int n_seg_min = 6u; n_seg_min >= displacedParameters.minNumberOfHits; --n_seg_min)
lookForSegments(displacedParameters,n_seg_min,rechits,recHits_per_layer, used,segments);
};
auto doWide = [&] () {
for(unsigned int n_seg_min = 6u; n_seg_min >= wideParameters.minNumberOfHits; --n_seg_min)
lookForSegments(wideParameters,n_seg_min,rechits,recHits_per_layer, used,segments);
};
// Not currently used
// auto doWide = [&] () {
// for(unsigned int n_seg_min = 6u; n_seg_min >= wideParameters.minNumberOfHits; --n_seg_min)
// lookForSegments(wideParameters,n_seg_min,rechits,recHits_per_layer, used,segments);
// };
auto printSegments = [&] {
#ifdef EDM_ML_DEBUG // have lines below only compiled when in debug mode
for(unsigned int iS = 0; iS < segments.size(); ++iS) {
Expand Down Expand Up @@ -165,7 +166,7 @@ std::vector<ME0Segment> ME0SegAlgoRU::run(const ME0Chamber * chamber, const HitA
doDisplaced();
return segments;
}
doWide();
//doWide();
doDisplaced();
}
printSegments();
Expand Down
6 changes: 0 additions & 6 deletions RecoMuon/Configuration/python/RecoMuonPPonly_cff.py
Expand Up @@ -87,11 +87,5 @@
# 6th - Run the remnant part of the muon sequence (muonGlobalReco)

########################################################

from RecoMuon.MuonIdentification.me0MuonReco_cff import *
_phase2_muonGlobalReco = muonGlobalReco.copy()
_phase2_muonGlobalReco += me0MuonReco
phase2_muon.toReplaceWith( muonGlobalReco, _phase2_muonGlobalReco )

# not commisoned and not relevant in FastSim (?):
fastSim.toReplaceWith(muonGlobalReco, muonGlobalReco.copyAndExclude([muonreco_with_SET,muonSelectionTypeSequence]))
9 changes: 0 additions & 9 deletions RecoMuon/Configuration/python/RecoMuon_EventContent_cff.py
Expand Up @@ -82,12 +82,3 @@
RecoMuonFEVT.outputCommands.extend(RecoMuonIsolationFEVT.outputCommands)
RecoMuonRECO.outputCommands.extend(RecoMuonIsolationRECO.outputCommands)
RecoMuonAOD.outputCommands.extend(RecoMuonIsolationAOD.outputCommands)

def _modifyRecoMuonEventContentForPhase2( object ):
object.outputCommands.append('keep *_me0SegmentMatching_*_*')
object.outputCommands.append('keep *_me0MuonConverting_*_*')

from Configuration.Eras.Modifier_phase2_muon_cff import phase2_muon
phase2_muon.toModify( RecoMuonFEVT, func=_modifyRecoMuonEventContentForPhase2 )
phase2_muon.toModify( RecoMuonRECO, func=_modifyRecoMuonEventContentForPhase2 )
phase2_muon.toModify( RecoMuonAOD, func=_modifyRecoMuonEventContentForPhase2 )

0 comments on commit 5686e5c

Please sign in to comment.