Heavy Ion Tracking

Complete: 5

Goal of this page

The aim of this page is to document the track reconstruction used in heavy ion events—where the code lives, how to run it, the input and output, and details of the implementation.

Code and tags

The code lives in the package RecoHI/HiTracking.

Configuration files

The settings for the heavy ion track reconstruction are contained in the configuration file:

(Note that this simply modifies a few parameters. The main content can be found in the configuration file HighPtTracking_PbPb_cff.py)

How to run the track reconstruction

If your events already have a TrackCollection called hiSelectedTracks, then the heavy ion track reconstruction has already been run, and you do not need to do it yourself. You can check this by either

  • opening the file in ROOT, opening a TBrowser, clicking on the Root file, then Events, and looking for a branch called something like recoTracks_hiSelectedTracks__RECO., or
  • typing edmDumpEventContent filename.root at the command line, and searching for vector<reco::Track>     "hiSelectedTracks"    ""    "RECO." in the output.

If however your events don't contain this collection (e.g. you are generating your own Monte Carlo events) or you want to rerun the track reconstruction with different settings, follow the instructions below.

  • In your configuration file, include the lines

  • Then in the path in configuration file, include the modules offlineBeamSpot, trackerlocalreco and heavyIonTracking, e.g.

process.p = cms.Path(process.offlineBeamSpot*process.trackerlocalreco*process.heavyIonTracking)

  • In order to retain the reconstructed tracks in your output file, you should ensure that they are kept by the OutputModule. If your existing drop or keep statements don't cover this case , add the line process.output.outputCommands.append('keep *_hiSelectedTracks_*_*') to your configuration file, somewhere after
process.output = cms.OutputModule("PoolOutputModule",
 ...other settings...

  • By default these should be kept in the RECOEventContent, which can be specified by including the line process.load("Configuration.EventContent.EventContentHeavyIons_cff") and adding process.RECOEventContent, in the OutputModule as above.

If you are reconstructing the tracks, it is likely you will need to reconstruct the other objects in the event. Instead of following the instructions above, add the following to your configuration file:

  • Include the lines
  • Add the sequence process. reconstructionHeavyIons to your path
  • Add the appropriate parameter set to your OutputModule e.g. process.RECODEBUGEventContent

For an example of how this works in practice, see:


The heavy ion track reconstruction requires the following objects as input. If it does not find these in the event the reconstruction will crash.
Product type Module label
edm::DetSetVector<PixelDigi> siPixelDigis
edm::DetSetVector<SiStripRawDigi> siStripDigis

Parameter settings

Parameters for the heavy ion track reconstruction should not, in general, need changing. One exception is the minimum transverse momentum of the tracks to be reconstructed, which can be specified as in the low pt tracking configuration:
hiPixel3PrimTracks.RegionFactoryPSet.RegionPSet.ptMin = 0.9
hiPixel3PrimTracks.FilterPSet.ptMin = 0.9
ckfBaseTrajectoryFilter.filterPset.minPt = 0.9

Output and Quality Cuts

The output of the heavy ion track reconstruction are reco::Tracks, which are identical to the tracks produced by the track reconstruction in proton-proton events, and can be used in the same way. The final module in the heavy ion track reconstruction sequence produces the following five objects, of which the average user will only want the first.

Product type Module label Description
reco::TrackCollection hiSelectedTracks The reconstructed tracks
reco::TrackExtraCollection hiSelectedTracks Extra information about the tracks (the trajectory state at the inner and outer most measurements). Not kept in AOD
TrackingRecHitCollection hiSelectedTracks The reconstructed hits used for the final fit of the track candidates. Local position/error and module id. Not kept in AOD
std::vector<Trajectory> hiSelectedTracks The trajectory of the above tracks
TrajTrackAssociationCollection hiSelectedTracks The association map between trajectories and tracks

The intermediate stages of the heavy ion track reconstruction also produce objects in the event (with module labels hiPixel3ProtoTracks, hiPixel3PrimTracks, hiPixelTrackSeeds and hiPrimTrackCandidates ). These are also not of interest to the average user, and do not need to be kept.

Quality track selection:

Track quality cuts are applied as part of the default reconstruction chain based on the number of hits, the compatibility with the beamspot and primary vertex, and the track fit quality. The quality selections are defined in the module hiSelectedTracks, found in the configuration file:


Additional track quality cuts may be applied on top of this selection before use in certain physics analyses.

Accessing the tracks

Below is a short code fragment that indicates which header files (*.h) need to be included, and demonstrates how to access the reconstructed tracks from within the analyze function of an EDAnalyzer. You can find a tutorial about how to create an EDAnalyzer at WorkBookWriteFrameworkModule. A more detailed tutorial specifically relating to tracks can be found at WorkBookTrackAnalysis. (If using the tutorial you will need to substitute hiSelectedTracks in place of generalTracks; the latter is the name of the TrackCollection for the pp track reconstruction.)

#include "FWCore/Framework/interface/Event.h"
#include "DataFormats/Common/interface/Handle.h"

#include "DataFormats/TrackReco/interface/Track.h"
#include "DataFormats/TrackReco/interface/TrackFwd.h"


void DemoAnalyzer::analyze(const edm::Event& iEvent, const edm::EventSetup& iSetup){
   using namespace edm;
   using namespace std;
   using namespace reco;

   //Get a handle ("pointer") to the TrackCollection within the event
   Handle<TrackCollection> trackCollectionHandle;
   iEvent.getByLabel("hiGlobalPrimTracks", trackCollectionHandle);

  //Check if there was a problem accessing the TrackCollection
   if( !trackCollectionHandle.isValid() ){
     cout << "Error! Can't get selectTracks!" << endl;
     return ;

   //Loop over tracks
   for(TrackCollection::const_iterator track = trackCollectionHandle->begin(); track != trackCollectionHandle->end(); track++){
     double track_eta = track->eta();
     double track_phi = track->phi();
     double track_pt  = track->pt();
     cout << eta << " " << phi << " " << pt << endl;

  //Alternative method of looping over tracks
  for(size_t i=0; i<trackCollectionHandle->size(); i++){
    TrackRef theTrack = (*trackCollectionHandle)[i];
     double track_eta = theTrack->eta();
     double track_phi = theTrack->phi();
     double track_pt  = theTrack->pt();
     cout << "track " << i << ": " <<eta << " " << phi << " " << pt << endl;


Implementation details

The heavy ion track reconstruction is a modified version of the MinimumBiasTracking sequence. It uses pixel triplet track seeds constrained to originate from the reconstructed vertex position. Then, it uses the CKF algorithm written for track reconstruction in proton-proton events, with settings which are tuned for heavy ion collisions. This algorithm is described in SWGuideTrackReco, and the links therein, especially SWGuideTrackRecoSequences.

The main differences in the heavy ions implementation are

  • Due to the combinatorics in high multiplicity central heavy ion events, only pixel triplets (and not pixel pairs) are used in track seeding.
  • The tracking is currently done in a single pass, though recent studies have shown that the standard iterative procedure is very effective in peripheral heavy ion collisions (up to around b=10 fm when the jobs run out of memory). There are plans to develop a set of iterative steps customized to heavy ion needs.

The individual steps of the heavy-ion tracking and vertexing are described briefly below:

Collection Description
hiPixelClusterVertex A rough estimate of the z-vertex position obtained by maximizing the compatibility of the pixel cluster lengths with their z-positions. This vertex is used to constrain the tracking region for the following step.
hiPixel3ProtoTracks A collection of pixel triplet tracks (without primary vertex constraint and using a variable-size tracking region based on pixel hit multiplicity) that are inputted to the median vertex algorithm
hiPixelMedianVertex The median vertex calculated by the algorithm described in SWGuideHeavyIonVertexReco#Implementation_details
hiSelectedProtoTracks A subset of the prototrack collection consisting of those that are compatible with the median vertex z-position and beamspot transverse position. These are inputted to the slower but more precise 3-d adaptive vertex fitter. The PtMin of the selected prototracks is variably dropped from 1.0 to 0.075 GeV depending on the pixel hit multiplicity, so that peripheral events have more tracks from which to make the vertex
hiPixelAdaptiveVertex The collection of vertices returned by the adaptive offline vertexing algorithm described in SWGuideHeavyIonVertexReco#Implementation_details.
hiBestAdaptiveVertex contains only the adaptive vertex with the most associated tracks
hiSelectedVertex The same as above unless the adaptive algorithm failed (e.g. not enough prototracks), in which case the median vertex is used. If that fails the beamspot is copied as the "selected vertex". The associated errors are also copied over.
hiPixel3PrimTracks The collection of pixel triplet tracks that are constrained to originate from a tracking region around the selected vertex from the previous step. More details may be found in SWGuideSeedingFromHitTriplets.
hiPixelTrackSeeds Generated from the above pixel tracks and used to seed the full tracking.
hiPrimTrackCandidates The track candidates from the trajectory building through the strip tracker. More details may be found in SWGuideCkfTrajectoryBuilder.
hiGlobalPrimTracks The output of a global covariance fit to the above candidates. More details may be found in SWGuideKfTrackProducer.
hiSelectedTracks A subset of the above that pass the track quality cuts described above. The selection is based on the tools described in SWGuideFinalTrackSelectors.

Studies of regional tracking based on stand-alone muons or jets are discussed at SWGuideHeavyIonRegionalTracking

Implementation of low transverse momentum pixel tracking is discussed at HeavyIonLowPtPixelTrackReco

Further information


Review status

Reviewer/Editor and Date Comments
EdWenger - 19 Nov 2009 updated to reflect 34X feature set. remove obsolete content
EdWenger - 20 Aug 2009 reviewed and updated contents. added a few details
PhilipAllfrey - 17 Jul 2009 created page as part of documentation review

Responsible: EdWenger

Edit | Attach | Watch | Print version | History: r14 < r13 < r12 < r11 < r10 | Backlinks | Raw View | WYSIWYG | More topic actions
Topic revision: r14 - 2013-08-13 - RylanConway
    • 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