CMS 3D CMS Logo

MuonTrackValidator_cfi.py
Go to the documentation of this file.
1 import FWCore.ParameterSet.Config as cms
2 
5 
6 muonTrackValidator = cms.EDAnalyzer("MuonTrackValidator",
7  # input TrackingParticle collections
8  label_tp_effic = cms.InputTag("mix","MergedTrackTruth"),
9  label_tp_fake = cms.InputTag("mix","MergedTrackTruth"),
10  # input reco::Track collection
11  label = cms.VInputTag(cms.InputTag("globalMuons")),
12  # switches to be set according to the input Track collection to properly count SimHits
13  usetracker = cms.bool(True),
14  usemuon = cms.bool(True),
15  #
16  useGsf=cms.bool(False),
17  beamSpot = cms.InputTag("offlineBeamSpot"),
18  # set true if you do not want that MTV launch an exception
19  # if the track collection is missing (e.g. HLT):
20  ignoremissingtrackcollection=cms.untracked.bool(False),
21  #
22  # selection of TP for evaluation of efficiency, from "TrackingParticleSelectionForEfficiency"
23  signalOnlyTP = cms.bool(True),
24  intimeOnlyTP = cms.bool(False),
25  stableOnlyTP = cms.bool(False),
26  chargedOnlyTP = cms.bool(True),
27  pdgIdTP = cms.vint32(13,-13),
28  minHitTP = cms.int32(0),
29  ptMinTP = cms.double(0.9),
30  ptMaxTP = cms.double(1e100),
31  minRapidityTP = cms.double(-2.4),
32  maxRapidityTP = cms.double(2.4),
33  tipTP = cms.double(3.5),
34  lipTP = cms.double(30.0),
35  # collision-like tracks
36  parametersDefiner = cms.string('LhcParametersDefinerForTP'),
37  # cosmics tracks
38  # parametersDefiner = cms.string('CosmicParametersDefinerForTP'),
39  #
40  # map linking SimHits to TrackingParticles, needed for cosmics validation`
41  simHitTpMapTag = cms.InputTag("simHitTPAssocProducer"),
42  #
43  # if *not* uses associators, the TP-RecoTrack maps has to be specified
44  UseAssociators = cms.bool(False),
45  useGEMs = cms.bool(False),
46  useME0 = cms.bool(False),
47  associators = cms.vstring('a_MuonAssociator'),
48  associatormap = cms.InputTag("tpToMuonTrackAssociation"),
49  #
50  # BiDirectional Logic for RecoToSim association corrects the Fake rates (counting ghosts and split tracks as fakes)
51  # setting it to False the ghost and split tracks are counted as good ones (old setting of Muon Validation up to CMSSW_3_6_0_pre4)
52  # the default setting is True: should NOT be changed !
53  BiDirectional_RecoToSim_association = cms.bool(True),
54  #
55  # Output File / Directory
56  outputFile = cms.string(''),
57  dirName = cms.string('Muons/RecoMuonV/MultiTrack/'),
58  #
59  # Parameters for plots
60  useFabsEta = cms.bool(False),
61  min = cms.double(-2.5),
62  max = cms.double(2.5),
63  nint = cms.int32(50),
64  #
65  ptRes_nbin = cms.int32(100),
66  ptRes_rangeMin = cms.double(-0.3),
67  ptRes_rangeMax = cms.double(0.3),
68  #
69  phiRes_nbin = cms.int32(100),
70  phiRes_rangeMin = cms.double(-0.05),
71  phiRes_rangeMax = cms.double(0.05),
72  #
73  etaRes_rangeMin = cms.double(-0.05),
74  etaRes_rangeMax = cms.double(0.05),
75  #
76  cotThetaRes_nbin = cms.int32(120),
77  cotThetaRes_rangeMin = cms.double(-0.01),
78  cotThetaRes_rangeMax = cms.double(0.01),
79  #
80  dxyRes_nbin = cms.int32(100),
81  dxyRes_rangeMin = cms.double(-0.02),
82  dxyRes_rangeMax = cms.double(0.02),
83  #
84  dzRes_nbin = cms.int32(150),
85  dzRes_rangeMin = cms.double(-0.05),
86  dzRes_rangeMax = cms.double(0.05),
87  #
88  minpT = cms.double(0.1),
89  maxpT = cms.double(1500),
90  nintpT = cms.int32(40),
91  useLogPt=cms.untracked.bool(False),
92  useInvPt = cms.bool(False),
93  #
94  minHit = cms.double(-0.5),
95  maxHit = cms.double(74.5),
96  nintHit = cms.int32(75),
97  #
98  minPhi = cms.double(-3.1416),
99  maxPhi = cms.double(3.1416),
100  nintPhi = cms.int32(36),
101  #
102  minDxy = cms.double(-3),
103  maxDxy = cms.double(3),
104  nintDxy = cms.int32(100),
105  #
106  minDz = cms.double(-10),
107  maxDz = cms.double(10),
108  nintDz = cms.int32(100),
109  # TP originating vertical position
110  minVertpos = cms.double(0),
111  maxVertpos = cms.double(5),
112  nintVertpos = cms.int32(100),
113  # TP originating z position
114  minZpos = cms.double(-10),
115  maxZpos = cms.double(10),
116  nintZpos = cms.int32(100)
117 )
118 
119 from Configuration.Eras.Modifier_run3_GEM_cff import run3_GEM
120 run3_GEM.toModify( muonTrackValidator, useGEMs = cms.bool(True) )
121 from Configuration.Eras.Modifier_phase2_muon_cff import phase2_muon
122 phase2_muon.toModify( muonTrackValidator, useME0 = cms.bool(True) )