CTF for Cosmic Algorithm

Complete: 3

Goal of the page

This page describes the cosmic track reconstruction using the Combinatorial Track Finder (CTF), the same algorithm that is used to reconstruct tracks from LHC collisions


The Tracking is the right forum to ask for questions about the track reconstruction algorithm.

The Global Runs Hypernews is instead the place to ask for more generic information about the CMS cosmic datataking.


Cosmic reconstruction with the CTF algorithm is a three step process:

  • Seeds are reconstructed from the hits on the TOB and TEC: two different algorithms are used, one based on hit triplets for runs with magnetic field on, and one based on hit pairs for runs with no field.
  • The same [combinatorial track finder algorithm used for collision tracks is applied to reconstruct the track candidates from the seeds: the only main difference with respect to the collision tracking is that the navigation school, that allows to connect pairs of layers that would not be allowed for LHC collision tracks. In addition, the cuts on the number of valid and lost hits are relaxed.
  • The Kalman Filter fitter-smoother is used to fit the track candidates and produce tracks. The algorithm is the same as for collision tracks, again except for a relaxed cut on the number of valid and missing hits. Also, the pixel template CPE is not used to refit hits, because the templates are not optimized for the full range of crossing angles allowed for cosmics.

As the only real differences with respect to the collision tracking are limited to the seeding, that is the only part that will be described in detail here.

Seeding with magnetic field on: SimpleCosmicBONSeeder

The algorithm for cosmic seeding with magnetic field is based on hit triplets.

Triplets of hits in most of the tracker are considered, not only in the top part: this means that the same track will give rise to many different seeds, both from hits at the ends and in the middle of the track itself; this is not a problem, as after the CTF pattern recognition the tracks sharing too many hits are cleaned up leaving only the longest one.

Cluster filter

Just like all cosmic seeders, the SimpleCosmicBONSeeder performs a check on the total number of clusters in the event before trying to reconstruct seeds, and skips the event (producing an empty seed collection) if there are too many clusters (by default, 300, as given from parameter MaxNumberOfCosmicClusters)

An error message is also printed to the MessageLogger, and in release 3_1_X the error will be saved in the Event so that it can be found at analysis step.

As this seeder is able to skip noisy modules when making seeds, it's possible to exclude from the check on the total number of clusters those detectors with more than a given number of clusters (by default, 20). This is controlled by the parameter DontCountDetsAboveNClusters, and disabled if the parameter is set to 0.

Triplet finding

A large combination of ordered triplets of layers are considered to make the seeds:

  • triplets of TOB layers (sorted outside-in), both contiguous and skipping one layer (e.g. 6/5/3 or 6/4/3), from all layers but TOB1
  • triplets of TEC layers, contiguous or skipping one disk, both sorted inside-out and outside-in
  • mixed triplets from TOB6 + TEC1 + TEC2 and TOB6 + TOB5 + TEC1

To reduce the number of possible hit combinations, two basic requirements are applied:

  • the hits must be ordered consistently along the global Y and Z coordinate (i.e. (Y1-Y2)*(Y2-Y3) > 0), unless the difference in Y or Z is less than 10 cm (so that uncertainties on the hit position along the strip coordinate don't spoil the ordering).
  • the radius of the circle identified by the three hits in the transverse plane must correspond to a PT above a given threshold (normally, 0.5 GeV, controlled by parameter RegionPSet.ptMin).

This seeder has a protection on the total number of triplets: if the algorithm is producing more than a given number of seeds (50'000, by default, controlled by maxTriplets), it will abort and just return an empty seed collection. Just like for the protection on the total number of clusters, an error message is printed and archived in the event in CMSSW_3_1_X.

Noise protection

The main strength of this seed generator against localized noise is the possibility to recognize and ignore hits from noise on a per-event basis.

Every hit in the seeding can be considered "bad" if it comes from a module with too many hits, or if its associated cluster charge is below a threshold. When making hit triplets, the ones with too many bad hits are excluded immediately, to reduce the total number of triplets and seeds to consider.

In the default configuration no bad hits are allowed in the triplets, but this can be changed adjusting the minimumGoodHitsInSeed parameter.

Two techniques are to flag hits as bad:

  • A cut on the total number of rechits on a given detector. Note that for matched detectors it's the number of matched hits that matters, and it can be larger than the number of clusters. By default, all hits on modules with more than 20 hits are considered bad. This is controlled by the PSet HitsPerModuleCheck

    HitsPerModuleCheck = cms.PSet(
        checkHitsPerModule = cms.bool(True), # Apply cuts on the number of hits per module 
        Thresholds  = cms.PSet( # 
            TIB = cms.int32(20), #
            TID = cms.int32(20), # FIXME: to be optimized
            TOB = cms.int32(20), # 
            TEC = cms.int32(20), #
  • A cut on the cluster charge, which is often significanlty smaller for noise hits than for real ones. Different thresholds can be configured for TIB/TID/TOB/TEC. This feature is not used by default. It is controlled by the the PSet ClusterChargeCheck

    ClusterChargeCheck = cms.PSet(
        checkCharge                 = cms.bool(False), # Apply cuts on cluster charge
        matchedRecHitsUseAnd        = cms.bool(True), # If True, both clusters in the pair should pass the charge cut to declare the hit good
        Thresholds  = cms.PSet( # Thresholds on bare cluster charge, not corrected for track angle
            TIB = cms.int32(0), 
            TID = cms.int32(0), 
            TOB = cms.int32(0),
            TEC = cms.int32(0),

Seed fitting from triplet

Once a hit triplet is declared good, it the algorithm tries to fit him into a trajectory seed.

First, hits are sorted again to make sure that (Youter - Yinner)*Youter ≥ 0. This is necessary to come with the fact the inside-out ordering by layer in the TEC can be opposite to the inside-out ordering by hits.

A first estimate of the helix parameters is taken by fitting the three hits to a circle in the transverse plane, and by taking the slope in the rho-z plane from z coordinate of the first and the last hit.

If the estimated momentum is above 10 TeV or is "Not A Number", the seed is discarded (this should not happen unless the seeder is used with zero magnetic field)

The seed change and direction are set assuming that the momentum points downwards in the global Y coordinate.

The seed is then fitted using the Kalman Filter algebra just like in the TrackProducer. The starting state is taken from the outermost hit, using the the approximate helix parameters computed before and starting with very large errors on the trajectory parameters. The state is then propagated to the surface of each of the three hits, and updated with the hit information. If at any step the procedure fails, the seed is discarded.

If the KF fit succeeds, the resulting trajectory seed contains all three hits and is associated to the surface of the innermost hit. The propagation direction is set in a way so that CTF navigation will start outside-in.

Two cuts are applied on the seed parameters after the KF fit: one on the transverse momentum, and one on the total momentum. These are controlled by parameters RegionPSet.ptMin and RegionPSet.pMin (by default, 0.5 GeV and 1 GeV).

Two parameters can be used to change the way seed fitting is done, but neither of them was found to be useful in increasing the efficiency for real tracks:

  • seedOnMiddle: if set to true, the KF fit of the seed is made using only the two outermost hits (although the preliminary estimation of the helix uses all three hits)
  • rescaleError: is set to an amount different from 1.0, the covariance matrix of the seed is rescaled by that factor; anyway, setting it to large values was found only to increase the fake rate.

In this seeder there is also a protection on the total number of seeds. When more than a given number of seeds would be made, the module raises an error and produces an empty seed collection. By default the cut is at 20'000 seeds, and is controlled by parameter maxSeeds

Review status

Reviewer/Editor and Date (copy from screen) Comments
GiovanniPetrucciani - 17 May 2009 introduction and cosmic seeder with B on
Edit | Attach | Watch | Print version | History: r2 < r1 | Backlinks | Raw View | WYSIWYG | More topic actions
Topic revision: r2 - 2009-05-17 - GiovanniPetrucciani
    • 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-2019 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback