Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2021-08-18 22:30:59

0001 import FWCore.ParameterSet.Config as cms
0002 
0003 from Validation.RecoTrack.TrackingParticleSelectionForEfficiency_cfi import *
0004 from Validation.RecoTrack.MTVHistoProducerAlgoForTrackerBlock_cfi import *
0005 
0006 from DQMServices.Core.DQMEDAnalyzer import DQMEDAnalyzer
0007 multiTrackValidator = DQMEDAnalyzer(
0008     "MultiTrackValidator",
0009 
0010     ### general settings ###
0011     # selection of TP for evaluation of efficiency #
0012     TrackingParticleSelectionForEfficiency,
0013 
0014     # HistoProducerAlgo. Defines the set of plots to be booked and filled
0015     histoProducerAlgoBlock = MTVHistoProducerAlgoForTrackerBlock,
0016 
0017     # set true if you do not want that MTV launch an exception
0018     # if the track collectio is missing (e.g. HLT):
0019     ignoremissingtrackcollection=cms.untracked.bool(False),
0020 
0021     useGsf=cms.bool(False),
0022 
0023 
0024     ### matching configuration ###
0025     # Example of TP-Track map
0026     associators = cms.untracked.VInputTag("trackingParticleRecoTrackAsssociation"),
0027     # Example of associator
0028     #associators = cms.untracked.VInputTag("quickTrackAssociatorByHits"),
0029     # if False, the src's above should specify the TP-RecoTrack association
0030     # if True, the src's above should specify the associator
0031     UseAssociators = cms.bool(False),
0032 
0033     ### sim input configuration ###
0034     label_tp_effic = cms.InputTag("mix","MergedTrackTruth"),
0035     label_tp_fake = cms.InputTag("mix","MergedTrackTruth"),
0036     label_tp_effic_refvector = cms.bool(False),
0037     label_tp_fake_refvector = cms.bool(False),
0038     label_tv = cms.InputTag("mix","MergedTrackTruth"),
0039     label_pileupinfo = cms.InputTag("addPileupInfo"),
0040     sim = cms.VInputTag(
0041       cms.InputTag("g4SimHits", "TrackerHitsPixelBarrelLowTof"),
0042       cms.InputTag("g4SimHits", "TrackerHitsPixelBarrelHighTof"),
0043       cms.InputTag("g4SimHits", "TrackerHitsPixelEndcapLowTof"),
0044       cms.InputTag("g4SimHits", "TrackerHitsPixelEndcapHighTof"),
0045       cms.InputTag("g4SimHits", "TrackerHitsTIBLowTof"),
0046       cms.InputTag("g4SimHits", "TrackerHitsTIBHighTof"),
0047       cms.InputTag("g4SimHits", "TrackerHitsTIDLowTof"),
0048       cms.InputTag("g4SimHits", "TrackerHitsTIDHighTof"),
0049       cms.InputTag("g4SimHits", "TrackerHitsTOBLowTof"),
0050       cms.InputTag("g4SimHits", "TrackerHitsTOBHighTof"),
0051       cms.InputTag("g4SimHits", "TrackerHitsTECLowTof"),
0052       cms.InputTag("g4SimHits", "TrackerHitsTECHighTof"),
0053     ),
0054     parametersDefiner = cms.string('LhcParametersDefinerForTP'),          # collision like tracks
0055     # parametersDefiner = cms.string('CosmicParametersDefinerForTP'),     # cosmics tracks
0056     simHitTpMapTag = cms.InputTag("simHitTPAssocProducer"),               # needed by CosmicParametersDefinerForTP
0057 
0058     label_tp_nlayers = cms.InputTag("trackingParticleNumberOfLayersProducer", "trackerLayers"),
0059     label_tp_npixellayers = cms.InputTag("trackingParticleNumberOfLayersProducer", "pixelLayers"),
0060     label_tp_nstripstereolayers = cms.InputTag("trackingParticleNumberOfLayersProducer", "stripStereoLayers"),
0061 
0062     ### reco input configuration ###
0063     label = cms.VInputTag(cms.InputTag("generalTracks")),
0064     beamSpot = cms.InputTag("offlineBeamSpot"),
0065 
0066     ### selection MVA
0067     mvaLabels = cms.untracked.PSet(),
0068 
0069     ### dE/dx configuration ###
0070     dEdx1Tag = cms.InputTag("dedxHarmonic2"),
0071     dEdx2Tag = cms.InputTag("dedxTruncated40"),
0072 
0073     ### output configuration
0074     dirName = cms.string('Tracking/Track/'),
0075 
0076     ### for fake rate vs dR ###
0077     # True=use collection below; False=use "label" collection itself
0078     calculateDrSingleCollection = cms.untracked.bool(True),
0079     trackCollectionForDrCalculation = cms.InputTag("generalTracks"),
0080 
0081     ### Do plots only if first reco vertex is from hard scatter?
0082     doPlotsOnlyForTruePV = cms.untracked.bool(False),
0083     label_vertex = cms.untracked.InputTag("offlinePrimaryVertices"),
0084     vertexAssociator = cms.untracked.InputTag("VertexAssociatorByPositionAndTracks"),
0085 
0086     simPVMaxZ = cms.untracked.double(-1),
0087 
0088     ### Allow switching off particular histograms
0089     doSummaryPlots = cms.untracked.bool(True),
0090     doSimPlots = cms.untracked.bool(True),
0091     doSimTrackPlots = cms.untracked.bool(True),
0092     doRecoTrackPlots = cms.untracked.bool(True),
0093     dodEdxPlots = cms.untracked.bool(False),
0094     doPVAssociationPlots = cms.untracked.bool(False), # do plots that require true PV, if True, label_vertex and vertexAssociator are read
0095     doSeedPlots = cms.untracked.bool(False), # input comes from TrackFromSeedProducer    
0096     doMVAPlots = cms.untracked.bool(False), # needs input from track MVA selectors
0097 
0098     ### do resolution plots only for these labels (or all if empty)
0099     doResolutionPlotsForLabels = cms.VInputTag(),
0100 
0101     cores = cms.InputTag("highPtJetsForTrk"), #ak4CaloJets with pt>1 TeV
0102 )
0103 
0104 from Configuration.Eras.Modifier_fastSim_cff import fastSim
0105 fastSim.toModify(multiTrackValidator, sim = ['fastSimProducer:TrackerHits'])
0106 
0107 from Configuration.ProcessModifiers.premix_stage2_cff import premix_stage2
0108 premix_stage2.toModify(multiTrackValidator,
0109     label_tp_effic = "mixData:MergedTrackTruth",
0110     label_tp_fake = "mixData:MergedTrackTruth",
0111     label_tv = "mixData:MergedTrackTruth",
0112 )