Common Selector Modules

Complete: 4

Purpose

Common selector modules are common analysis modules written using the Generic Selector mechanism, and are specialized for a number of different cases. Common selectors are located in the package:

  • CMS.PhysicsTools/RecoSelectors

(in release 1_3_0 selectors were located in CMS.PhysicsTools/RecoAlgos).

How to create new selectors

The Generic Selector mechanism provides a way to easily create new selector modules for all RECO object types with a large variety of selection criteria. Selectors of general utility can be requested to the Analysis Tools group and will be released as soon as it is compatible with the release schedule.

Configurable selectors

Configurable selectors select objects of a specified type on the basis of a selections specified with a string that is parsed by a specific cut parser utility.

Though the string parsing is only done once at the begin of the job, applying the specified cut requires calling a number of virtual functions that increase with the complexity of the specified expression. So, a (small) performance overhead may be present in configurable selectors w.r.t. other selectors where the selection is defined via compiled C++ code.

As example, the following module selects tracks:

ConfigTrackSelector

TrackSelector selects tracks on the basis of a cut specified with a text string and saves a collection of clones of selected tracks.

An example of usage is the following:

  module selectedTracks = ConfigTrackSelector {
    InputTag src = ctfWithMaterialTracks
    string cut = "pt > 15 & abs( eta ) < 2"
  }

Supported Configurable Selectors

The following selectors are supported, selecting objects of the types that can be understood from the selector name:

  • TrackSelector
  • MuonSelector
  • PixelMatchGsfElectronSelector
  • SuperClusterSelector

The following selectors save references, instead of clones, of the selected objects. The output collection is of type edm::RefVector<C&gt>:

  • TrackRefSelector
  • MuonRefSelector
  • PixelMatchGsfElectronRefSelector
  • SuperClusterRefSelector

Warning: the above selectors are all supported from release 1.6.0 on.

Track selectors

RecoTrackSelector and RecoTrackRefSelector

recoTrackSelector_cfi.py and recoTrackRefSelector_cfi.py

This is a very flexible track selector, allowing you to cut on the track's helix parameters, number of hits, chi2, quality flag etc. It has access to the beam-spot position, so making its impact parameter cuts rather precise. The RecoTrackSelector copies the selected tracks (and associated TrackingRecHits) to a new collection, whereas the RefTrackRefSelector simply creates a RefVector containing references to the selected tracks in the original collection. The latter is therefore faster (but only available from CMSSW 3.4 onwards).

PtMinTrackSelector

PtMinTrackSelector selects tracks having pt larger than a configurable threshold and saves a vector of clones of selected objects.

An example of usage is the following:

  module selectedTracks= PtMinTrackSelector {
    InputTag src = ctfWithMaterialTracks
    double ptMin = 10
  }

LargestPtTackSelector

LargestPtTackSelector selects a configurable number of tracks having the largest pt and saves a vector of clones of selected objects.

An example of usage is the following, selecting the three jets with the largest Et:

  module selectedTracks = LargestPtTackSelector{
    InputTag src = ctfWithMaterialTracks
    uint32 minNumber = 3
  }

AnyTrackSelector

AnyTrackSelector selects all tracks found in a collection and saves a collection of clones of such tracks. It is mainly provided for testing purpose.

An example of usage is the following:

  module selectedTracks = AnyTrackSelector {
    InputTag src = ctfWithMaterialTracks
  }

MassWindowTrackSelector

MassWindowTrackSelector selects tracks pairs having invariant mass within a specified range and saves a collection of clones of selected tracks. The mass of the particle detected as track is assumed negligible.

An example of usage is the following:

  module selectedTracks = MassWindowTrackSelector{
    InputTag src = ctfWithMaterialTracks
    massMin = 87
    massMax = 95
  }

Muon Selectors

PtMinMuonSelector

PtMinMuonSelector selects muons having pt larger than a configurable threshold and saves a vector of clones of selected objects.

An example of usage is the following:

  module selectedMuons = PtMinMuonSelector {
    InputTag src = globalMuons
    double ptMin = 10
  }

Electron Selectors

EtaPtMinPixelMatchGsfElectronSelector

EtaPtMinPixelMatchGsfElectronSelector

selects Gsf electrons having pt larger than a configurable threshold and η in a configurable range, and saves a vector of clones of selected objects.

An example of usage is the following:

  module selectedElectrons =  EtaPtMinPixelMatchGsfElectronSelector {
    InputTag src = pixelMatchGsfElectrons
    double ptMin = 10
    double etaMin = -2
    double etaMax = 2
  }

PtMinElectronSelector

PtMinElectronSelector selects electrons having pt larger than a configurable threshold and saves a vector of clones of selected objects.

An example of usage is the following:

  module selectedElectrons= PtMinElectronSelector {
    InputTag src = electrons
    double ptMin = 10
  }

Warning: from release 1_3_0 on, reco::PixelMatchGsfElectron is be the recommended electron collection, so this module should be relaced by an equivalent PtMinPixelMatchGsfElectronSelector not implemented yet.

Photon Selectors

EtMinPhotonSelector

EtMinPhotonSelector selects photons having Et larger than a configurable threshold and saves a vector of clones of selected objects.

An example of usage is the following:

  module selectedPhotons = EtMinPhotonSelector {
    InputTag src = photons
    double etMin = 10
  }

CaloJet Selectors

EtMinCaloJetSelector

EtMinCaloJetSelector selects calorimetric jets having Et larger than a configurable threshold and saves a vector of clones of selected objects.

An example of usage is the following:

  module selectedJets = EtMinCaloJetSelector {
    InputTag src = ktJets
    double etMin = 20
  }

EtMinCaloJetRefVectorSelector

EtMinCaloJetRefVectorSelector selects calorimetric jets having Et larger than a configurable threshold and saves a vector of references (RefVector) to selected objects.

An example of usage is the following:

  module selectedJetRefs = EtMinCaloJetRefVectorSelector {
    InputTag src = ktJets
    double etMin = 20
  }

EtMinCaloJetShallowCloneSelector

EtMinCaloJetShallowCloneSelector selects calorimetric jets having Et larger than a configurable threshold and saves a vector of candidates (ShallowCloneCandidate) having a reference to selected objects as "master clone".

An example of usage is the following:

  module selectedJetCandidates = EtMinCaloJetShallowCloneSelector {
    InputTag src = ktJets
    double etMin = 20
  }

LargestEtCaloJetSelector

LargestEtCaloJetSelector selects a configurable number of jets having the largest Et and saves a vector of clones of selected objects.

An example of usage is the following, selecting the three jets with the largest Et:

  module selectedJets = LargestEtCaloJetSelector {
    InputTag src = ktJets
    uint32 minNumber = 3
  }

LargestEtCaloJetShallowCloneSelector

LargestEtCaloJetShallowCloneSelector selects a configurable number of jets having the largest Et and saves a vector of candidates (ShallowCloneCandidate) having a reference to selected objects as "master clone".

An example of usage is the following, selecting the three jets with the largest Et:

  module selectedJets = LargestEtCaloJetShallowCloneSelector {
    InputTag src = ktJets
    uint32 minNumber = 3
  }

Review Status

Editor/Reviewer and date Comments
LucaLista - 08 Jun 2007 Page content last edited
| IanTomalin - 19 Oct 2009 | Added doc for recoTrackSelector

Responsible: LucaLista %RB% Last reviewed by:

Edit | Attach | Watch | Print version | History: r7 < r6 < r5 < r4 < r3 | Backlinks | Raw View | WYSIWYG | More topic actions
Topic revision: r7 - 2009-10-19 - IRTomalin



 
    • 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