Complete: 5

Goal of this page

The aim of this page is to document muon reconstruction in heavy ion events—where the code lives, how to run it, the input and output, and details of the implementation. The page is divided into two sections: the first describing the dimuon high-level trigger (HLT) algorithm, and the second describing the offline muon reconstruction code.

HLT for dimuons

In the heavy-ion HLT, muons are reconstructed only for the HIDoubleMu filter. This takes the L2 muon candidates (formed from hits in the muon chambers) and combines them with the vertex (determined from pixel tracks) and the hits in the silicon strips to build tracks, which are then examined to see if pairs of muons come from the same vertex.

Code and tags

The code for CMSSW 3_3_X and 3_4_X versions lives in the package RecoHI/HiMuonAlgos.

The code for CMSSW 3_1_X is in RecoHIMuon/HiMuSeed, RecoHIMuon/HiMuTracking, and RecoHIMuon/HiMuPropagator

The relevant tags for the various release series are listed below:

  • CMSSW 34X:
     cvs co -r V00-00-14 RecoHI/HiMuonAlgos
  • CMSSW 33X:
     cvs co -r V00-00-10 RecoHI/HiMuonAlgos
  • CMSSW 31X:
     cvs co -r V00-03-06 RecoHIMuon/HiMuTracking
     cvs co -r V00-03-02 RecoHIMuon/HiMuSeed
     cvs co -r V00-02-00 RecoHIMuon/HiMuPropagator

Configuration files

For the HLT, configuration files may be created for a particular release using the procedure described in the section below:

  • Open the webpage
  • Find and click on the the desired CMSSW version under /dev, for example CMSSW_3_4_0 pre6, then click on HIon from the list of options. This will bring up the corresponding configuration file in the right-hand panel of the webpage. The name of this file is at the top, and looks like /dev/CMSSW_3_4_0/pre6/HIon/V10. Make a note of this string.
  • To get a copy of this configuration file without copying and pasting from the webpage, use the edmConfigFromDB command as shown below, using the name of the configuration file that you found in the previous step. This creates a configuration file called
     edmConfigFromDB --configName  /dev/CMSSW_3_4_0/pre6/HIon/V10 --format Python --services -PrescaleService >
  • Note that if the command edmConfigFromDB does not exist, make sure that you have typed eval `scramv1 runtime -csh`, or its synonym cmsenv, in your project area first
  • Find the dataset you want to run over with the DBS web interface, and add the names of the files to as in the example below:
     process.source = cms.Source( "PoolSource",
         fileNames = cms.untracked.vstring( 

  • Run CMSSW:

In addition, the HI HLT configuration is periodically pulled from ConfDB into HLTrigger/Configuration/python/ A full configuration can be generated with the appropriate trigger table using cmsDriver as follows: -s GEN,SIM,DIGI,L1,DIGI2RAW,HLT:HIon \
-n 1 --conditions MC_3XY_V14::All --datatier 'GEN-SIM-RAW' --eventcontent RAWDEBUGHLT \
--scenario CMS.HeavyIons --no_exec


The HLT requires RAW-level event content as input i.e. FEDRawDataCollection


The output of the HLT HIDoubleMu filter is just a decision on whether the event contains a dimuon or not. This information is stored in TriggerResults and TriggerEvent objects. More information about how to access them can be found at SWGuideHighLevelTrigger.

Implementation details

The code is located in RecoHI/HiMuonAlgos (for CMSSW versions > 32X) or in RecoHIMuon (CMSSW versions<=32x). The main HLT object, TestMuL1L2Filter, is an EDFilter. It lives in the directory plugins. It will be changed to HLTHIMuL1L2L3Filter in the near future. It calls the Dimuon reconstructor: HITrackVertexMaker which in turn calls the SeedGeneration starting from L2 muon objects and TrajectoryBuilder. The last step in HITrackVertexMaker is the Dimuon vertex construction and applying the corresponding constraints. TestMuL1L2Filter returns true if there are a pair of muons consistent with coming from the same vertex.

Offline reconstruction for muons

Code and tags

The core code is the standard p+p algorithm. The HI modifications are included via the configuration file that lives in RecoHI/HiMuonAlgos


DO NOT use CMSSW_3_4_0_pre4! : The STA muon reconstruction had several problems: compiler nan's in the seed finding algo-s-> less seeds and also CSC digis were not there for several CSC modules” validation plots for 340_pre4.

If you use particle gun sample (or any input sample with small (1,2) number of tracks), patch your code in any CMSSW version <3_4_0_pre5! The heavy-ion vertexing (on which the tracking depends and affects hence the global muon reconstruction) was not well-optimized for very peripheral collisions (e.g. 1-2 tracks) until 3_4_0_pre4.


cvs co -r V01-01-04 RecoHI/HiTracking
cvs co -r V01-02-24 RecoPixelVertexing/PixelTrackFitting

How to run the muon code

The full heavy-ion reconstruction chain contains muonRecoPbPb = cms.Sequence(muonreco_plus_isolation), the sequence that will produce all related muon collections. In order to run the whole chain, follow the steps:
  • include ReconstructionHeavyIons_cff in your python configuration file: process.load('Configuration.StandardSequences.ReconstructionHeavyIons_cff')
  • add the reconstructionHeavyIons in the Path/Sequence:
         process.recoHI= cms.Path(process.reconstructionHeavyIons)
         process.schedule = cms.Schedule(process.recoHI)

Configuration files

The configuration file which contains all the modifications to the standard pp muon sequence is RecoHI/HiMuonAlgos/


The output of the muon heavy ion reconstruction is the same as for pp:

A detailed description of all the muon collections obtained and available after running the whole muon chain can be found in the Reco Muon Data Format Guide.

In addition, the heavy-ion PAT sequence takes reco::Muons as input, embeds some information into them, and produces a std::vector<pat::Muon> with the label selectedlayer1Muons. More information can be found at SWGuideHeavyIonPAT.

Implementation details

The heavy ion offline muon reconstruction is a modified version of the p+p standard reconstruction algorithm. The modifications are done in order to be able to deal with the high-density track environment of the heavy-ion collisions.

The 2 only differences are:

  • The globalMuons, trackerMuons and caloMuons use the heavy-ion track collection as input from the silicon tracker detector. Details of the heavy-ion track-finding algorithm can be found at SWGuideHeavyIonTrackReco.
  • For any calorimetric isolation cuts, iterativeConePu5CaloJets are used; these are jets obtained with the heavy-ion modified jet finding algorithm that includes pileup subtraction.

Further information


Review status

Reviewer/Editor and Date Comments
EdWenger - 20 Nov 2009 minor tidying up and editing
CameliaMironov - 20 Nov 2009 flesh out offline details
PhilipAllfrey - 16 Nov 2009 split page into separate sections for HLT and offline
OlgaKodolova - 20 Aug 2009 created page as part of documentation review

Responsible: OlgaKodolova and CameliaMironov

Edit | Attach | Watch | Print version | History: r7 < r6 < r5 < r4 < r3 | Backlinks | Raw View | WYSIWYG | More topic actions
Topic revision: r7 - 2009-11-26 - PhilipAllfrey
    • Cern Search Icon Cern Search
    • TWiki Search Icon TWiki Search
    • Google Search Icon Google Search

    CMSPublic All webs login

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