ME0 Simulation and Reconstruction

Status Summary

As of Nov 5 (and earlier): ME0s in full reco code (STA muon production) works in testing in 76X, porting complete, details below.

As of Sep 23 2015: PR #11398 is sent (for reco::ME0Muons)

Work to begin on testing the ME0-in-full-reco with the same customized digitizers as the reco::ME0Muon code.

As of Oct 6 2015: PR #11398 close to merging (waited for new IB, reviewed, review responded to, followup comments responded to)

Work on ME0s in full reco under way with customized digitizers and reco configs as in the reco::ME0Muon code. Runs fine, working on missing component to include ME0 hits in track trajectory.

Dedicated reco::ME0Muons

Working in 62X versions

reco::ME0Muons are dedicated objects which are matched track-ME0Segment pairs. The matching code is in later 6_2_0_SLHC releases, although the later update to make them configurable and selectable offline is still pending for 76X. To re-run the reconstruction on existing files, do this:

cmsrel CMSSW_6_2_0_SLHC25_patch1
cd CMSSW_6_2_0_SLHC25_patch1/src/
git cms-merge-topic dnash86:ME0GlobalReco-Selectors
scram b -j 16

Then the ME0Muons can be remade via these lines in a config:

process.p = cms.Path(process.me0MuonReco)

Offline selection is done using the ME0MuonSelectors module:

#include "RecoMuon/MuonIdentification/plugins/"

And currently there are three available options, which also need the me0geometry (this reliance is removed in the pending update to 76X):

edm::ESHandle<ME0Geometry> me0Geom;
muon::isGoodMuon(me0Geom, *thisMuon, muon::Tight)
muon::isGoodMuon(me0Geom, *thisMuon, muon::Loose)
muon::isGoodMuon(me0Geom, *thisMuon, muon::VeryLoose)

The user could of course add further options in RecoMuon/MuonIdentification/plugins/

ME0Muons in 76X

Work is ongoing for ME0Muons in 76X, standalone configs very tricky to produce.

Thanks to work from Piet to help create the necessary configs in RecoLocalMuon/GEMRecHit, we have a standalone configs to test ME0Muons in 76X. Working branch for ME0Muon production here:

To produce ME0Muons do this:

cmsrel CMSSW_7_6_0_pre4
cd CMSSW_7_6_0_pre4/src/
git cms-merge-topic dnash86:ME0Muons-In-76X_v2
scram b -j 16
cd RecoLocalMuon/GEMRecHit/test/

Analyzer used for studies in 62X also available, at RecoMuon/MuonIdentification/test/

ME0Muons checked, look good, so PR is ready and sent:

These changes are necessary to run the dedicated ME0Muon code in 76X, and are not included in PR #11398:


TrackingTools/TrackAssociator/interface/TrackDetectorAssociator.h TrackingTools/TrackAssociator/src/

ME0 in Full Reco

Set up and testing in SLHC releases

The following tests were passed.

In CMSSW_6_2_0_SLHC21, where the packages were developed:

cmsrel CMSSW_6_2_0_SLHC21
cd CMSSW_6_2_0_SLHC21/src/
git cms-merge-topic dnash86:ME0-In-Full-MuonReco
scram b -j 16 -w upgrade -l 13007

And in a later release:

cmsrel CMSSW_6_2_0_SLHC24
cd CMSSW_6_2_0_SLHC24/src/
git cms-merge-topic dnash86:ME0-In-Full-MuonReco
scram b -j 16 -w upgrade -l 13007

Either set of commands can be used to check out all the necessary packages for ME0s in full reco. Note: Many dependent packages are checked out, so compilation is heavy and takes some time.

Packages that were updated for ME0s

The following packages had changes to include ME0s:

Category Package/SubPackage Comments
  DQM/DTMonitorModule Very small change to MuonDetLayerMeasurements calls to match changes
  DataFormats/GEMDigi ME0Digis
  DataFormats/GEMRecHit ME0RecHits, RecSegments
  DataFormats/MuonDetId ME0DetId
  DataFormats/TrackReco ME0s added to HitPattern
  Geometry/GEMGeometry ME0EtaPartitions and ME0Chambers (needed for proper accessing of ME0s by chamberId) implemented
  Geometry/GEMGeometryBuilder ME0GeometryBuilder (must build ME0Chambers in order to access ME0-dependent objects by chamberId)
  RecoMuon/DetLayers MuonME0DetLayerGeometryBuilder (builds the layer of ME0 chambers)
  RecoMuon/MeasurementDet MuonDetLayerMeasurements updated to include ME0s
  RecoMuon/CosmicMuonProducer Very small change to MuonDetLayerMeasurements calls to match changes
  RecoMuon/MuonSeedGenerator Very small change to MuonDetLayerMeasurements calls to match changes
  RecoMuon/MuonIdentification Previous ME0Muon work (dedicated ME0Muon object)
  RecoMuon/Navigation ME0s included in the Navigation
  RecoMuon/StandAloneTrackFinder ME0s included in LogTrace
  RecoMuon/TrackingTools ME0s included in subdetectors
  RecoLocalMuon/GEMRecHit ME0SegmentBuilder edited to refer to ME0Chambers by the correct DetId
  RecoTracker/TrackProducer ME0s included in LogTrace
  SLHCUpgradeSimulations/Configuration ME0 customs files
  TrackingTools/TrackFitters ME0s included in LogTrace
  Validation/RecoMuon Some tools for ME0 analyzers

Porting to 75X releases

The same packages that were changed in SLHC releases to include ME0s must be ported to 75X. Changes will need to include use of "consumes" and changing "getByLabel" functionality to "getByToken".

This procedure is done for the smaller "reco::ME0Muon" functionality, and is available in this branch (Note: Still pending testing pre-PR):

The porting procedure for ME0s in full reconstruction is planned to proceed starting from a GEM porting working area here (thanks to Archie):

The branch for this porting work is here:

The packages listed above will have their porting status reported below:

Category Package/SubPackage Porting status
  DQM/DTMonitorModule Yes
  DQM/./DQM/DataScouting Work in progress test/HLTvsRECOstudies/, added disables
  DataFormats/GEMDigi Yes
  DataFormats/GEMRecHit Yes
  DataFormats/MuonDetId Yes
  DataFormats/TrackReco Yes
  Geometry/GEMGeometry Yes
  Geometry/GEMGeometryBuilder Yes
  RecoMuon/DetLayers Yes
  RecoMuon/MeasurementDet Yes
  RecoMuon/CosmicMuonProducer Yes
  RecoMuon/GlobalTrackingTools Yes
  RecoMuon/MuonSeedGenerator Yes
  RecoMuon/MuonIdentification Covered by ME0Muon PR
  RecoMuon/Navigation Yes
  RecoMuon/StandAloneMuonProducer Yes
  RecoMuon/StandAloneTrackFinder Yes
  RecoMuon/TrackingTools Yes
  RecoLocalMuon/GEMRecHit Yes
  RecoTracker/TrackProducer Okay - LogDebug lines removed, no differences w.r.t. ME0 now
  SLHCUpgradeSimulations/Configuration Covered by ME0Muon PR
  TrackingTools/TrackFitters Yes
  Validation/RecoMuon Covered by ME0Muon PR
Additional packages
  RecoMuon/L2MuonProducer Yes

Working on 76X, issues with ECAL preshower

Developing began in:

Trying tests with -l 21.0, editing the geometry to this:


and including these customs files:

from SLHCUpgradeSimulations.Configuration.me0Customs import customise 
#call to customisation function customise imported from SLHCUpgradeSimulations.Configuration.me0Customs
process = customise(process)

When trying out removing the ECAL preshower via customization, like so:

    process.CaloGeometryBuilder.SelectedCalos = cms.vstring('HCAL',

, experiencing this error in runtime:

cmsRun: /build/cmsbuild/jenkins-workarea/workspace/build-cache/cms.week0/w/tmp/BUILDROOT/4ac4c9b2bbce774434666a6fac2d296d/opt/cmssw/slc6_amd64_gcc491/cms/cmssw/CMSSW_7_6_X_2015-08-02-1000/src/SimCalorimetry/EcalSimAlgos/src/ void ESDigitizer::setGain(int): Assertion `0 = m_detIds && 0 = m_detIds->size()' failed.

Piggy-backing off of testing changes to reco::ME0Muon code listed above, included the changes to the tracker code and testing now with this config:

(in branch:

Config works and produces standalone muons, however current testing shows ME0 enabled and geometry created but not ME0 hits in the track trajectory. Looking in to changes in HitPattern (from 6_2_0_SLHCX versions), etc...

Working version of ME0 inclusion in STA muons

Working version here:

Some records of testing, package checkout:

cmsrel CMSSW_7_6_0_pre4
cd CMSSW_7_6_0_pre4/src
git cms-merge-topic dnash86:ME0-InFullMuonReco-For76X-Port-v2
scram b -j 16
cmsRun RecoLocalMuon/GEMRecHit/test/
cmsRun RecoLocalMuon/GEMRecHit/test/
cmsRun RecoLocalMuon/GEMRecHit/test/

ME0 analysis strategies

Association by hits, an overview

Overall the section of the analyzer that deals with chi2/hits association is here:

although portions of that are commented out. I tried to comment inside those lines what is going on, but I'll try to explain further here (broken down by set up and by use):

> Set up:
To set the associators (by chi2 or by hits) up, one must set the "consumes" up:

and then get them from the event:

> Use:
While I do loop over the associators here:

I do not ever use more than one at a time.

First, one must build the collection of "simtoreco" and "recotosim" associations:

Those are collections of reco tracks associated to each sim track, and vice versa.

But probably you want to check for a one-to-one "best" match. So, then, for each reco track you should check for any sim tracks (gen particles) associated to it:

and then you take the list of associated gen particles, picking the "best" one, and check the collection of RECO tracks associated with the gen:

and finally check if the "best" reco track for the gen particle is the same one you started with:

The above walkthrough used a release for 76X development, the version in SLHC is here:

and the version with the ME0-Selectors available:

(Note: the version in ME0GlobalReco-Selectors has been merged in SLHCDEV)

Association by hits, to run existing analyzer

To check out the package (other CMSSW versions should work):

cmsrel CMSSW_6_2_0_SLHC25_patch1
cd CMSSW_6_2_0_SLHC25_patch1/src/
git cms-merge-topic dnash86:ME0GlobalReco-Selectors
scram b -j 16

Edit RecoMuon/MuonIdentification/test/, replacing "OUTPUTTEMPLATE" with the output name you'd like, and "FILETEMPLATE" with the input file you that has ME0Muons that you'd like to run on. You will also need to check that the geometry and global tag is the same as the geometry and global tag used in production of the input root file.

Note: Default parameters in the config are:

  • A pT cut of 5 GeV
  • A matching window for the Delta_R matching of 0.15
  • Association by Hits turned on
    • Efficiency cut for Assoc by Hits of 0.0
    • Purity cut for Assoc by Hits of 0.0
  • Geometry: GeometryExtended2023HGCalMuonReco
  • GT: PH2_1K_FB_V6::All

Then, of course:

cmsRun RecoMuon/MuonIdentification/test/

Note: Many histos produced are "legacy" histos, needed once and left in the analyzer. Significant ones are:

Histo Name Description
Chi2MatchedME0Muon_Eta The "numerator" of the Chi2MuonRecoEff_Eta plot - it is actually for matching by hits if that is on, as well.
TPMuon_Eta The "denominator" of the Chi2MuonRecoEff_Eta plot- it is all tracking particles considered for association
MatchedME0Muon_Eta The "numerator" of MuonRecoEff_Eta, for matching by delta R
GenMuon_Eta The "denominator" of the MuonRecoEff_Eta plot - all gen muons considered for matching by delta R
Chi2MuonRecoEff_Eta The efficiency of the association by chi2/hits
MuonRecoEff_Eta The efficiency of the matching by delta R
Chi2UnmatchedMEMuon_Eta The tracks that failed association by chi2/hits
UnmatchedMEMuon_Cuts_Eta The tracks that failed matching by delta R

-- DavidNash - 2015-03-04

Edit | Attach | Watch | Print version | History: r34 < r33 < r32 < r31 < r30 | Backlinks | Raw View | WYSIWYG | More topic actions
Topic revision: r34 - 2016-03-18 - ArchieSharma
    • Cern Search Icon Cern Search
    • TWiki Search Icon TWiki Search
    • Google Search Icon Google Search

    Main All webs login

This site is powered by the TWiki collaboration platform Powered by PerlCopyright & 2008-2020 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback