CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
MuonAssociatorByHits_cfi.py
Go to the documentation of this file.
1 import FWCore.ParameterSet.Config as cms
2 
3 
4 muonAssociatorByHitsCommonParameters = cms.PSet(
5  dumpInputCollections = cms.untracked.bool(False),
6  #
7  #....... general input parameters
8  #
9  # include invalid muon hits
10  includeZeroHitMuons = cms.bool(True),
11  #
12  # accept mismatched association of tracker/muon stub of global hit patterns
13  acceptOneStubMatchings = cms.bool(False),
14  # reject bad global muons made of only tracker hits
15  rejectBadGlobal = cms.bool(True),
16  #
17  # switches to be set according to the input Track collection
18  UseTracker = cms.bool(True),
19  UseMuon = cms.bool(True),
20  #
21  # cuts for the muon stub
22  AbsoluteNumberOfHits_muon = cms.bool(False),
23  NHitCut_muon = cms.uint32(0),
24  EfficiencyCut_muon = cms.double(0.),
25  PurityCut_muon = cms.double(0.),
26  #
27  # cuts for the tracker stub
28  AbsoluteNumberOfHits_track = cms.bool(False),
29  NHitCut_track = cms.uint32(0),
30  EfficiencyCut_track = cms.double(0.),
31  PurityCut_track = cms.double(0.),
32  #
33  # switches for the tracker stub
34  UsePixels = cms.bool(True),
35  UseGrouped = cms.bool(True),
36  UseSplitting = cms.bool(True),
37  ThreeHitTracksAreSpecial = cms.bool(False),
38  #
39  # for DT Hit associator
40  crossingframe = cms.bool(False),
41  simtracksTag = cms.InputTag("g4SimHits"),
42  simtracksXFTag = cms.InputTag("mix","g4SimHits"),
43  #
44  DTsimhitsTag = cms.InputTag("g4SimHits","MuonDTHits"),
45  DTsimhitsXFTag = cms.InputTag("mix","g4SimHitsMuonDTHits"),
46  DTdigiTag = cms.InputTag("simMuonDTDigis"),
47  DTdigisimlinkTag = cms.InputTag("simMuonDTDigis"),
48  DTrechitTag = cms.InputTag("dt1DRecHits"),
49  #
50  dumpDT = cms.bool(False),
51  links_exist = cms.bool(True),
52  associatorByWire = cms.bool(False),
53  #
54  # for CSC Hit associator
55  CSCsimHitsTag = cms.InputTag("g4SimHits","MuonCSCHits"),
56  CSCsimHitsXFTag = cms.InputTag("mix","g4SimHitsMuonCSCHits"),
57  CSClinksTag = cms.InputTag("simMuonCSCDigis","MuonCSCStripDigiSimLinks"),
58  CSCwireLinksTag = cms.InputTag("simMuonCSCDigis","MuonCSCWireDigiSimLinks"),
59  #
60  # for RPC Hit associator
61  RPCsimhitsTag = cms.InputTag("g4SimHits","MuonRPCHits"),
62  RPCsimhitsXFTag = cms.InputTag("mix","g4SimHitsMuonRPCHits"),
63  RPCdigisimlinkTag = cms.InputTag("simMuonRPCDigis","RPCDigiSimLink"),
64  #
65  # for GEM Hit associator
66  useGEMs = cms.bool(False),
67  GEMsimhitsTag = cms.InputTag("g4SimHits","MuonGEMHits"),
68  GEMsimhitsXFTag = cms.InputTag("mix","g4SimHitsMuonGEMHits"),
69  GEMdigisimlinkTag = cms.InputTag("simMuonGEMDigis","GEM"),
70  #
71  # for Tracker Hit associator
72  #
73  associatePixel = cms.bool(True),
74  associateStrip = cms.bool(True),
75  usePhase2Tracker = cms.bool(False),
76  pixelSimLinkSrc = cms.InputTag("simSiPixelDigis"),
77  stripSimLinkSrc = cms.InputTag("simSiStripDigis"),
78  phase2TrackerSimLinkSrc = cms.InputTag("simSiPixelDigis","Tracker"),
79  associateRecoTracks = cms.bool(True),
80  #
81  ROUList = cms.vstring('TrackerHitsTIBLowTof',
82  'TrackerHitsTIBHighTof',
83  'TrackerHitsTIDLowTof',
84  'TrackerHitsTIDHighTof',
85  'TrackerHitsTOBLowTof',
86  'TrackerHitsTOBHighTof',
87  'TrackerHitsTECLowTof',
88  'TrackerHitsTECHighTof',
89  'TrackerHitsPixelBarrelLowTof',
90  'TrackerHitsPixelBarrelHighTof',
91  'TrackerHitsPixelEndcapLowTof',
92  'TrackerHitsPixelEndcapHighTof'),
93  #
94  # to associate to reco::Muon segments
95  inputDTRecSegment4DCollection = cms.InputTag("dt4DSegments"),
96  inputCSCSegmentCollection = cms.InputTag("cscSegments"),
97 )
98 
99 from Configuration.Eras.Modifier_run3_GEM_cff import run3_GEM
100 from Configuration.Eras.Modifier_phase2_tracker_cff import phase2_tracker
101 run3_GEM.toModify(muonAssociatorByHitsCommonParameters, useGEMs = True)
102 phase2_tracker.toModify(muonAssociatorByHitsCommonParameters,
103  usePhase2Tracker = True,
104  pixelSimLinkSrc = "simSiPixelDigis:Pixel",
105 )
106 
107 from Configuration.Eras.Modifier_fastSim_cff import fastSim
108 fastSim.toModify(muonAssociatorByHitsCommonParameters,
109  simtracksTag = "fastSimProducer",
110  DTsimhitsTag = "MuonSimHits:MuonDTHits",
111  CSCsimHitsTag = "MuonSimHits:MuonCSCHits",
112  RPCsimhitsTag = "MuonSimHits:MuonRPCHits",
113  simtracksXFTag = "mix:fastSimProducer",
114  DTsimhitsXFTag = "mix:MuonSimHitsMuonDTHits",
115  CSCsimHitsXFTag = "mix:MuonSimHitsMuonCSCHits",
116  RPCsimhitsXFTag = "mix:MuonSimHitsMuonRPCHits",
117  ROUList = ['fastSimProducerTrackerHits']
118 )
119 
120 from Configuration.ProcessModifiers.premix_stage2_cff import premix_stage2
121 premix_stage2.toModify(muonAssociatorByHitsCommonParameters,
122  pixelSimLinkSrc = "mixData:PixelDigiSimLink",
123  stripSimLinkSrc = "mixData:StripDigiSimLink",
124  phase2TrackerSimLinkSrc = "mixData:Phase2OTDigiSimLink",
125 )
126 
127 muonAssociatorByHits = cms.EDProducer("MuonAssociatorEDProducer",
128  # COMMON CONFIGURATION
129  muonAssociatorByHitsCommonParameters,
130  # for Muon Track association
131  #
132  # input collections
133  #
134  # ... reco::Track collection
135  tracksTag = cms.InputTag("globalMuons"),
136  ignoreMissingTrackCollection = cms.untracked.bool(False),
137  # ... TrackingParticle collection
138  tpTag = cms.InputTag("mix","MergedTrackTruth"),
139  tpRefVector = cms.bool(False)
140 )
141 
142 premix_stage2.toModify(muonAssociatorByHits, tpTag = "mixData:MergedTrackTruth")