CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
multiTrackSelector_cfi.py
Go to the documentation of this file.
1 import FWCore.ParameterSet.Config as cms
2 from Configuration.StandardSequences.Eras import eras
3 
4 looseMTS = cms.PSet(
5  preFilterName=cms.string(''),
6  name= cms.string('TrkLoose'),
7 
8  # vertex selection
9  vtxNumber = cms.int32(-1),
10  vertexCut = cms.string('ndof>=2&!isFake'),
11 
12  #untracked bool copyTrajectories = true // when doing retracking before
13  copyTrajectories = cms.untracked.bool(False),
14  copyExtras = cms.untracked.bool(True), ## set to false on AOD
15  qualityBit = cms.string('loose'), ## set to '' or comment out if you dont want to set the bit
16 
17  # parameters for adapted optimal cuts on chi2 and primary vertex compatibility
18  chi2n_par = cms.double(1.6),
19  chi2n_no1Dmod_par = cms.double(9999),
20  res_par = cms.vdouble(0.003, 0.01),
21 # second param is actually an int
22  d0_par1 = cms.vdouble(0.55, 4.0),
23  dz_par1 = cms.vdouble(0.65, 4.0),
24  d0_par2 = cms.vdouble(0.55, 4.0),
25  dz_par2 = cms.vdouble(0.45, 4.0),
26  # Boolean indicating if adapted primary vertex compatibility cuts are to be applied.
27  applyAdaptedPVCuts = cms.bool(True),
28 
29  # Impact parameter absolute cuts.
30  max_d0 = cms.double(100.),
31  max_z0 = cms.double(100.),
32  nSigmaZ = cms.double(4.),
33 
34  # Cuts on numbers of layers with hits/3D hits/lost hits.
35  minNumberLayers = cms.uint32(0),
36  minNumber3DLayers = cms.uint32(0),
37  maxNumberLostLayers = cms.uint32(999),
38  minHitsToBypassChecks = cms.uint32(20),
39 
40  # Absolute cuts in case of no PV. If yes, please define also max_d0NoPV and max_z0NoPV
41  applyAbsCutsIfNoPV = cms.bool(False),
42  keepAllTracks= cms.bool(False),
43 
44  # parameters for cutting on pterror/pt and number of valid hits
45  max_relpterr = cms.double(9999.),
46  min_nhits = cms.uint32(0),
47 
48  max_minMissHitOutOrIn = cms.int32(99),
49  max_lostHitFraction = cms.double(1.0),
50 
51  # parameters for cutting on eta
52  min_eta = cms.double(-9999.),
53  max_eta = cms.double(9999.)
54 
55  ) # end of pset
56 
57 tightMTS=looseMTS.clone(
58  preFilterName='TrkLoose',
59 # second param is actually an int
60  d0_par1 = cms.vdouble(0.3, 4.0),
61  dz_par1 = cms.vdouble(0.35,4.0),
62  d0_par2 = cms.vdouble(0.4, 4.0),
63  dz_par2 = cms.vdouble(0.4, 4.0),
64  chi2n_par = cms.double(0.7),
65  chi2n_no1Dmod_par = cms.double(9999),
66  name= cms.string('TrkTight'),
67  minNumberLayers = cms.uint32(3),
68  minNumber3DLayers = cms.uint32(3),
69  maxNumberLostLayers = cms.uint32(2),
70  qualityBit = cms.string('tight'), ## set to '' or comment out if you dont want to set the bit
71  keepAllTracks= cms.bool(True)
72  )
73 
74 highpurityMTS= tightMTS.clone(
75  name= cms.string('TrkHighPurity'),
76  preFilterName='TrkTight',
77  res_par=cms.vdouble(0.003,0.001),
78  qualityBit = cms.string('highPurity') ## set to '' or comment out if you dont want to set the bit
79 )
80 
81 #typical configuration is six selectors... something like this to
82 #make cloning easier.
83 multiTrackSelector = cms.EDProducer("MultiTrackSelector",
84  src = cms.InputTag("generalTracks"),
85  beamspot = cms.InputTag("offlineBeamSpot"),
86  useVertices = cms.bool(True),
87  useVtxError = cms.bool(False),
88  vertices = cms.InputTag("firstStepPrimaryVertices"),
89  trackSelectors = cms.VPSet( looseMTS,
90  tightMTS,
91  highpurityMTS)
92  )
93 eras.trackingLowPU.toModify(multiTrackSelector,
94  vertices = "pixelVertices"
95 )