CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
MultiTrackValidator_cfi.py
Go to the documentation of this file.
1 import FWCore.ParameterSet.Config as cms
2 
5 
6 from DQMServices.Core.DQMEDAnalyzer import DQMEDAnalyzer
7 multiTrackValidator = DQMEDAnalyzer(
8  "MultiTrackValidator",
9 
10  ### general settings ###
11  # selection of TP for evaluation of efficiency #
12  TrackingParticleSelectionForEfficiency,
13 
14  # HistoProducerAlgo. Defines the set of plots to be booked and filled
15  histoProducerAlgoBlock = MTVHistoProducerAlgoForTrackerBlock,
16 
17  # set true if you do not want that MTV launch an exception
18  # if the track collectio is missing (e.g. HLT):
19  ignoremissingtrackcollection=cms.untracked.bool(False),
20 
21  useGsf=cms.bool(False),
22 
23 
24  ### matching configuration ###
25  # Example of TP-Track map
26  associators = cms.untracked.VInputTag("trackingParticleRecoTrackAsssociation"),
27  # Example of associator
28  #associators = cms.untracked.VInputTag("quickTrackAssociatorByHits"),
29  # if False, the src's above should specify the TP-RecoTrack association
30  # if True, the src's above should specify the associator
31  UseAssociators = cms.bool(False),
32 
33  ### sim input configuration ###
34  label_tp_effic = cms.InputTag("mix","MergedTrackTruth"),
35  label_tp_fake = cms.InputTag("mix","MergedTrackTruth"),
36  label_tp_effic_refvector = cms.bool(False),
37  label_tp_fake_refvector = cms.bool(False),
38  label_tv = cms.InputTag("mix","MergedTrackTruth"),
39  label_pileupinfo = cms.InputTag("addPileupInfo"),
40  sim = cms.VInputTag(
41  cms.InputTag("g4SimHits", "TrackerHitsPixelBarrelLowTof"),
42  cms.InputTag("g4SimHits", "TrackerHitsPixelBarrelHighTof"),
43  cms.InputTag("g4SimHits", "TrackerHitsPixelEndcapLowTof"),
44  cms.InputTag("g4SimHits", "TrackerHitsPixelEndcapHighTof"),
45  cms.InputTag("g4SimHits", "TrackerHitsTIBLowTof"),
46  cms.InputTag("g4SimHits", "TrackerHitsTIBHighTof"),
47  cms.InputTag("g4SimHits", "TrackerHitsTIDLowTof"),
48  cms.InputTag("g4SimHits", "TrackerHitsTIDHighTof"),
49  cms.InputTag("g4SimHits", "TrackerHitsTOBLowTof"),
50  cms.InputTag("g4SimHits", "TrackerHitsTOBHighTof"),
51  cms.InputTag("g4SimHits", "TrackerHitsTECLowTof"),
52  cms.InputTag("g4SimHits", "TrackerHitsTECHighTof"),
53  ),
54  parametersDefiner = cms.string('LhcParametersDefinerForTP'), # collision like tracks
55  # parametersDefiner = cms.string('CosmicParametersDefinerForTP'), # cosmics tracks
56  simHitTpMapTag = cms.InputTag("simHitTPAssocProducer"), # needed by CosmicParametersDefinerForTP
57 
58  label_tp_nlayers = cms.InputTag("trackingParticleNumberOfLayersProducer", "trackerLayers"),
59  label_tp_npixellayers = cms.InputTag("trackingParticleNumberOfLayersProducer", "pixelLayers"),
60  label_tp_nstripstereolayers = cms.InputTag("trackingParticleNumberOfLayersProducer", "stripStereoLayers"),
61 
62  ### reco input configuration ###
63  label = cms.VInputTag(cms.InputTag("generalTracks")),
64  beamSpot = cms.InputTag("offlineBeamSpot"),
65 
66  ### selection MVA
67  mvaLabels = cms.untracked.PSet(),
68 
69  ### dE/dx configuration ###
70  dEdx1Tag = cms.InputTag("dedxHarmonic2"),
71  dEdx2Tag = cms.InputTag("dedxTruncated40"),
72 
73  ### output configuration
74  dirName = cms.string('Tracking/Track/'),
75 
76  ### for fake rate vs dR ###
77  # True=use collection below; False=use "label" collection itself
78  calculateDrSingleCollection = cms.untracked.bool(True),
79  trackCollectionForDrCalculation = cms.InputTag("generalTracks"),
80 
81  ### Do plots only if first reco vertex is from hard scatter?
82  doPlotsOnlyForTruePV = cms.untracked.bool(False),
83  label_vertex = cms.untracked.InputTag("offlinePrimaryVertices"),
84  vertexAssociator = cms.untracked.InputTag("VertexAssociatorByPositionAndTracks"),
85 
86  simPVMaxZ = cms.untracked.double(-1),
87 
88  ### Allow switching off particular histograms
89  doSummaryPlots = cms.untracked.bool(True),
90  doSimPlots = cms.untracked.bool(True),
91  doSimTrackPlots = cms.untracked.bool(True),
92  doRecoTrackPlots = cms.untracked.bool(True),
93  dodEdxPlots = cms.untracked.bool(False),
94  doPVAssociationPlots = cms.untracked.bool(False), # do plots that require true PV, if True, label_vertex and vertexAssociator are read
95  doSeedPlots = cms.untracked.bool(False), # input comes from TrackFromSeedProducer
96  doMVAPlots = cms.untracked.bool(False), # needs input from track MVA selectors
97 
98  ### do resolution plots only for these labels (or all if empty)
99  doResolutionPlotsForLabels = cms.VInputTag(),
100 
101  cores = cms.InputTag("highPtJetsForTrk"), #ak4CaloJets with pt>1 TeV
102 )
103 
104 from Configuration.Eras.Modifier_fastSim_cff import fastSim
105 fastSim.toModify(multiTrackValidator, sim = ['fastSimProducer:TrackerHits'])
106 
107 from Configuration.ProcessModifiers.premix_stage2_cff import premix_stage2
108 premix_stage2.toModify(multiTrackValidator,
109  label_tp_effic = "mixData:MergedTrackTruth",
110  label_tp_fake = "mixData:MergedTrackTruth",
111  label_tv = "mixData:MergedTrackTruth",
112 )