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