CMS 3D CMS Logo

muonValidationHeavyIons_cff.py
Go to the documentation of this file.
1 import FWCore.ParameterSet.Config as cms
2 
5 
6 # MuonAssociation labels; hit-by-hit matching only,MuonAssociator
7 #
8 import SimMuon.MCTruth.MuonAssociatorByHits_cfi
9 hiMABH = SimMuon.MCTruth.MuonAssociatorByHits_cfi.muonAssociatorByHits.clone()
10 # DEFAULTS ###################################
11 # EfficiencyCut_track = cms.double(0.),
12 # PurityCut_track = cms.double(0.),
13 # EfficiencyCut_muon = cms.double(0.),
14 # PurityCut_muon = cms.double(0.),
15 # includeZeroHitMuons = cms.bool(True),
16 # acceptOneStubMatchings = cms.bool(False),
17 
18 hiMABH.tpTag = 'cutsTpMuons'
19 #hiMABH.acceptOneStubMatchings = cms.bool(True) # this was the OLD setting
20 hiMABH.PurityCut_track = 0.75
21 hiMABH.PurityCut_muon = 0.75
22 #hiMABH.EfficiencyCut_track = 0.5 # maybe this could be added
23 #hiMABH.EfficiencyCut_muon = 0.5 # maybe this could be added
24 #hiMABH.includeZeroHitMuons = False # maybe this could be added
25 
26 
27 # sim to tracker tracks,
28 tpToTkMuonAssociationHI = hiMABH.clone()
29 tpToTkMuonAssociationHI.tracksTag = 'cutsRecoTrkMuons'
30 tpToTkMuonAssociationHI.UseTracker = True
31 tpToTkMuonAssociationHI.UseMuon = False
32 
33 # sim to sta, and sta:updatedAtVtx
34 tpToStaMuonAssociationHI = hiMABH.clone()
35 tpToStaMuonAssociationHI.tracksTag = 'standAloneMuons'
36 tpToStaMuonAssociationHI.UseTracker = False
37 tpToStaMuonAssociationHI.UseMuon = True
38 
39 tpToStaUpdMuonAssociationHI = hiMABH.clone()
40 tpToStaUpdMuonAssociationHI.tracksTag = 'standAloneMuons:UpdatedAtVtx'
41 tpToStaUpdMuonAssociationHI.UseTracker = False
42 tpToStaUpdMuonAssociationHI.UseMuon = True
43 
44 # sim to glb track
45 tpToGlbMuonAssociationHI = hiMABH.clone()
46 tpToGlbMuonAssociationHI.tracksTag = 'globalMuons'
47 tpToGlbMuonAssociationHI.UseTracker = True
48 tpToGlbMuonAssociationHI.UseMuon = True
49 
50 
51 # Muon association sequences
52 # (some are commented out until timing is addressed)
53 hiMuonAssociation_seq = cms.Sequence(
54  tpToTkMuonAssociationHI+
55  tpToStaMuonAssociationHI+
56  tpToStaUpdMuonAssociationHI+
57  tpToGlbMuonAssociationHI
58  )
59 
60 #----------------------------------------
61 
63 
64 import Validation.RecoMuon.MuonTrackValidator_cfi
65 MTVhi = Validation.RecoMuon.MuonTrackValidator_cfi.muonTrackValidator.clone()
66 MTVhi.label_tp_effic = cms.InputTag("cutsTpMuons")
67 MTVhi.label_tp_fake = cms.InputTag("cutsTpMuons")
68 MTVhi.maxPt = cms.double(100)
69 
70 # MuonTrackValidator parameters
71 trkMuonTrackVMuonAssocHI = MTVhi.clone()
72 trkMuonTrackVMuonAssocHI.associatormap = 'tpToTkMuonAssociationHI'
73 trkMuonTrackVMuonAssocHI.label = ['cutsRecoTrkMuons']
74 trkMuonTrackVMuonAssocHI.muonHistoParameters = trkMuonHistoParameters
75 
76 glbMuonTrackVMuonAssocHI = MTVhi.clone()
77 glbMuonTrackVMuonAssocHI.associatormap = 'tpToGlbMuonAssociationHI'
78 glbMuonTrackVMuonAssocHI.label = ['globalMuons']
79 glbMuonTrackVMuonAssocHI.muonHistoParameters = glbMuonHistoParameters
80 
81 staMuonTrackVMuonAssocHI = MTVhi.clone()
82 staMuonTrackVMuonAssocHI.associatormap = 'tpToStaMuonAssociationHI'
83 staMuonTrackVMuonAssocHI.label = ('standAloneMuons',)
84 staMuonTrackVMuonAssocHI.muonHistoParameters = staMuonHistoParameters
85 
86 staUpdMuonTrackVMuonAssocHI = MTVhi.clone()
87 staUpdMuonTrackVMuonAssocHI.associatormap = 'tpToStaUpdMuonAssociationHI'
88 staUpdMuonTrackVMuonAssocHI.label = ('standAloneMuons:UpdatedAtVtx',)
89 staUpdMuonTrackVMuonAssocHI.muonHistoParameters = staUpdMuonHistoParameters
90 
91 
92 # Muon validation sequences
93 hiMuonValidation_seq = cms.Sequence(
94  trkMuonTrackVMuonAssocHI+
95  staMuonTrackVMuonAssocHI+
96  staUpdMuonTrackVMuonAssocHI+
97  glbMuonTrackVMuonAssocHI
98  )
99 
100 # HI muon prevalidation
101 hiRecoMuonPrevalidation = cms.Sequence(
102  cutsRecoTrkMuons
103  * cutsTpMuons
104  * hiMuonAssociation_seq
105 )
106 
107 # HI muon validation sequence
108 hiRecoMuonValidation = cms.Sequence( hiMuonValidation_seq )
histoParameters_cff
track_selectors_cff
muonValidation_cff