CMS 3D CMS Logo

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 to match only tracker/muon stub of globalMuons
13  acceptOneStubMatchings = cms.bool(False),
14  #
15  # switches to be set according to the input Track collection
16  UseTracker = cms.bool(True),
17  UseMuon = cms.bool(True),
18  #
19  # cuts for the muon stub
20  AbsoluteNumberOfHits_muon = cms.bool(False),
21  NHitCut_muon = cms.uint32(0),
22  EfficiencyCut_muon = cms.double(0.),
23  PurityCut_muon = cms.double(0.),
24  #
25  # cuts for the tracker stub
26  AbsoluteNumberOfHits_track = cms.bool(False),
27  NHitCut_track = cms.uint32(0),
28  EfficiencyCut_track = cms.double(0.),
29  PurityCut_track = cms.double(0.),
30  #
31  # switches for the tracker stub
32  UsePixels = cms.bool(True),
33  UseGrouped = cms.bool(True),
34  UseSplitting = cms.bool(True),
35  ThreeHitTracksAreSpecial = cms.bool(False),
36  #
37  # for DT Hit associator
38  crossingframe = cms.bool(False),
39  simtracksTag = cms.InputTag("g4SimHits"),
40  simtracksXFTag = cms.InputTag("mix","g4SimHits"),
41  #
42  DTsimhitsTag = cms.InputTag("g4SimHits","MuonDTHits"),
43  DTsimhitsXFTag = cms.InputTag("mix","g4SimHitsMuonDTHits"),
44  DTdigiTag = cms.InputTag("simMuonDTDigis"),
45  DTdigisimlinkTag = cms.InputTag("simMuonDTDigis"),
46  DTrechitTag = cms.InputTag("dt1DRecHits"),
47  #
48  dumpDT = cms.bool(False),
49  links_exist = cms.bool(True),
50  associatorByWire = cms.bool(False),
51  #
52  # for CSC Hit associator
53  CSCsimHitsTag = cms.InputTag("g4SimHits","MuonCSCHits"),
54  CSCsimHitsXFTag = cms.InputTag("mix","g4SimHitsMuonCSCHits"),
55  CSClinksTag = cms.InputTag("simMuonCSCDigis","MuonCSCStripDigiSimLinks"),
56  CSCwireLinksTag = cms.InputTag("simMuonCSCDigis","MuonCSCWireDigiSimLinks"),
57  #
58  # for RPC Hit associator
59  RPCsimhitsTag = cms.InputTag("g4SimHits","MuonRPCHits"),
60  RPCsimhitsXFTag = cms.InputTag("mix","g4SimHitsMuonRPCHits"),
61  RPCdigisimlinkTag = cms.InputTag("simMuonRPCDigis","RPCDigiSimLink"),
62  #
63  # for GEM Hit associator
64  useGEMs = cms.bool(False),
65  GEMsimhitsTag = cms.InputTag("g4SimHits","MuonGEMHits"),
66  GEMsimhitsXFTag = cms.InputTag("mix","g4SimHitsMuonGEMHits"),
67  GEMdigisimlinkTag = cms.InputTag("simMuonGEMDigis","GEM"),
68  #
69  # for Tracker Hit associator
70  #
71  associatePixel = cms.bool(True),
72  associateStrip = cms.bool(True),
73  usePhase2Tracker = cms.bool(False),
74  pixelSimLinkSrc = cms.InputTag("simSiPixelDigis"),
75  stripSimLinkSrc = cms.InputTag("simSiStripDigis"),
76  phase2TrackerSimLinkSrc = cms.InputTag("simSiPixelDigis","Tracker"),
77  associateRecoTracks = cms.bool(True),
78  #
79  ROUList = cms.vstring('TrackerHitsTIBLowTof',
80  'TrackerHitsTIBHighTof',
81  'TrackerHitsTIDLowTof',
82  'TrackerHitsTIDHighTof',
83  'TrackerHitsTOBLowTof',
84  'TrackerHitsTOBHighTof',
85  'TrackerHitsTECLowTof',
86  'TrackerHitsTECHighTof',
87  'TrackerHitsPixelBarrelLowTof',
88  'TrackerHitsPixelBarrelHighTof',
89  'TrackerHitsPixelEndcapLowTof',
90  'TrackerHitsPixelEndcapHighTof'),
91  #
92  # to associate to reco::Muon segments
93  inputDTRecSegment4DCollection = cms.InputTag("dt4DSegments"),
94  inputCSCSegmentCollection = cms.InputTag("cscSegments"),
95 )
96 
97 from Configuration.Eras.Modifier_run3_GEM_cff import run3_GEM
98 from Configuration.Eras.Modifier_phase2_tracker_cff import phase2_tracker
99 run3_GEM.toModify(muonAssociatorByHitsCommonParameters, useGEMs = True)
100 phase2_tracker.toModify(muonAssociatorByHitsCommonParameters,
101  usePhase2Tracker = True,
102  pixelSimLinkSrc = "simSiPixelDigis:Pixel",
103 )
104 
105 from Configuration.Eras.Modifier_fastSim_cff import fastSim
106 fastSim.toModify(muonAssociatorByHitsCommonParameters,
107  simtracksTag = "fastSimProducer",
108  DTsimhitsTag = "MuonSimHits:MuonDTHits",
109  CSCsimHitsTag = "MuonSimHits:MuonCSCHits",
110  RPCsimhitsTag = "MuonSimHits:MuonRPCHits",
111  simtracksXFTag = "mix:fastSimProducer",
112  DTsimhitsXFTag = "mix:MuonSimHitsMuonDTHits",
113  CSCsimHitsXFTag = "mix:MuonSimHitsMuonCSCHits",
114  RPCsimhitsXFTag = "mix:MuonSimHitsMuonRPCHits",
115  ROUList = ['fastSimProducerTrackerHits']
116 )
117 
118 from Configuration.ProcessModifiers.premix_stage2_cff import premix_stage2
119 premix_stage2.toModify(muonAssociatorByHitsCommonParameters,
120  DTdigisimlinkTag = "mixData:simMuonDTDigis",
121  CSClinksTag = "mixData:MuonCSCStripDigiSimLinks",
122  CSCwireLinksTag = "mixData:MuonCSCWireDigiSimLinks",
123  RPCdigisimlinkTag = "mixData:RPCDigiSimLink",
124  pixelSimLinkSrc = "mixData:PixelDigiSimLink",
125  stripSimLinkSrc = "mixData:StripDigiSimLink",
126  phase2TrackerSimLinkSrc = "mixData:Phase2OTDigiSimLink",
127  GEMdigisimlinkTag = "mixData:GEMStripDigiSimLink",
128 )
129 
130 muonAssociatorByHits = cms.EDProducer("MuonAssociatorEDProducer",
131  # COMMON CONFIGURATION
132  muonAssociatorByHitsCommonParameters,
133  # for Muon Track association
134  #
135  # input collections
136  #
137  # ... reco::Track collection
138  # tracksTag = cms.InputTag("standAloneMuons"),
139  # tracksTag = cms.InputTag("standAloneMuons","UpdatedAtVtx"),
140  # tracksTag = cms.InputTag("standAloneSETMuons"),
141  # tracksTag = cms.InputTag("standAloneSETMuons","UpdatedAtVtx"),
142  # tracksTag = cms.InputTag("cosmicMuons"),
143  tracksTag = cms.InputTag("globalMuons"),
144  # tracksTag = cms.InputTag("tevMuons","firstHit"),
145  # tracksTag = cms.InputTag("tevMuons","picky"),
146  # tracksTag = cms.InputTag("globalSETMuons"),
147  # tracksTag = cms.InputTag("globalCosmicMuons"),
148  # tracksTag = cms.InputTag("generalTracks"),
149  # tracksTag = cms.InputTag("ctfWithMaterialTracksP5LHCNavigation"),
150  # tracksTag = cms.InputTag("hltL2Muons"),
151  # tracksTag = cms.InputTag("hltL2Muons","UpdatedAtVtx"),
152  # tracksTag = cms.InputTag("hltL3Muons")
153  # tracksTag = cms.InputTag("hltL3Muons","L2Seeded")
154  # tracksTag = cms.InputTag("hltL3TkTracksFromL2")
155  #
156  # ... TrackingParticle collection
157  tpTag = cms.InputTag("mix","MergedTrackTruth"),
158  ignoreMissingTrackCollection = cms.untracked.bool(False),
159 )
160 
161 premix_stage2.toModify(muonAssociatorByHits, tpTag = "mixData:MergedTrackTruth")