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  minRapidityTP = cms.double(-2.4),
31  maxRapidityTP = cms.double(2.4),
32  tipTP = cms.double(3.5),
33  lipTP = cms.double(30.0),
34  # collision-like tracks
35  parametersDefiner = cms.string('LhcParametersDefinerForTP'),
36  # cosmics tracks
37  # parametersDefiner = cms.string('CosmicParametersDefinerForTP'),
38  #
39  # map linking SimHits to TrackingParticles, needed for cosmics validation`
40  simHitTpMapTag = cms.InputTag("simHitTPAssocProducer"),
41  #
42  # if *not* uses associators, the TP-RecoTrack maps has to be specified
43  UseAssociators = cms.bool(False),
44  useGEMs = cms.bool(False),
45  useME0 = cms.bool(False),
46  associators = cms.vstring('a_MuonAssociator'),
47  associatormap = cms.InputTag("tpToMuonTrackAssociation"),
48  #
49  # BiDirectional Logic for RecoToSim association corrects the Fake rates (counting ghosts and split tracks as fakes)
50  # 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)
51  # the default setting is True: should NOT be changed !
52  BiDirectional_RecoToSim_association = cms.bool(True),
53  #
54  # Output File / Directory
55  outputFile = cms.string(''),
56  dirName = cms.string('Muons/RecoMuonV/MultiTrack/'),
57  #
58  # Parameters for plots
59  useFabsEta = cms.bool(False),
60  min = cms.double(-2.5),
61  max = cms.double(2.5),
62  nint = cms.int32(50),
63  #
64  ptRes_nbin = cms.int32(100),
65  ptRes_rangeMin = cms.double(-0.3),
66  ptRes_rangeMax = cms.double(0.3),
67  #
68  phiRes_nbin = cms.int32(100),
69  phiRes_rangeMin = cms.double(-0.05),
70  phiRes_rangeMax = cms.double(0.05),
71  #
72  etaRes_rangeMin = cms.double(-0.05),
73  etaRes_rangeMax = cms.double(0.05),
74  #
75  cotThetaRes_nbin = cms.int32(120),
76  cotThetaRes_rangeMin = cms.double(-0.01),
77  cotThetaRes_rangeMax = cms.double(0.01),
78  #
79  dxyRes_nbin = cms.int32(100),
80  dxyRes_rangeMin = cms.double(-0.02),
81  dxyRes_rangeMax = cms.double(0.02),
82  #
83  dzRes_nbin = cms.int32(150),
84  dzRes_rangeMin = cms.double(-0.05),
85  dzRes_rangeMax = cms.double(0.05),
86  #
87  minpT = cms.double(0.1),
88  maxpT = cms.double(1500),
89  nintpT = cms.int32(40),
90  useLogPt=cms.untracked.bool(False),
91  useInvPt = cms.bool(False),
92  #
93  minHit = cms.double(-0.5),
94  maxHit = cms.double(74.5),
95  nintHit = cms.int32(75),
96  #
97  minPhi = cms.double(-3.1416),
98  maxPhi = cms.double(3.1416),
99  nintPhi = cms.int32(36),
100  #
101  minDxy = cms.double(-3),
102  maxDxy = cms.double(3),
103  nintDxy = cms.int32(100),
104  #
105  minDz = cms.double(-10),
106  maxDz = cms.double(10),
107  nintDz = cms.int32(100),
108  # TP originating vertical position
109  minVertpos = cms.double(0),
110  maxVertpos = cms.double(5),
111  nintVertpos = cms.int32(100),
112  # TP originating z position
113  minZpos = cms.double(-10),
114  maxZpos = cms.double(10),
115  nintZpos = cms.int32(100)
116 )
117 
118 from Configuration.Eras.Modifier_run3_GEM_cff import run3_GEM
119 run3_GEM.toModify( muonTrackValidator, useGEMs = cms.bool(True) )
120 from Configuration.Eras.Modifier_phase2_muon_cff import phase2_muon
121 phase2_muon.toModify( muonTrackValidator, useME0 = cms.bool(True) )