Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2021-02-14 14:27:27

0001 import FWCore.ParameterSet.Config as cms
0002 
0003 process = cms.Process("TrackAlgoCompare")
0004 
0005 # keep message logger to a nice level
0006 process.MessageLogger = cms.Service("MessageLogger",
0007     default = cms.untracked.PSet(
0008         limit = cms.untracked.int32(10)
0009     )
0010 )
0011 
0012 ### input files
0013 process.source = cms.Source("PoolSource", 
0014     #fileNames = cms.untracked.vstring('file:${HOME}/samples/ttbar.root') 
0015     fileNames = cms.untracked.vstring('file:${HOME}/samples/ttbar2.root') 
0016 )
0017 process.maxEvents = cms.untracked.PSet( input = cms.untracked.int32(100) )
0018 
0019 # Track Associators
0020 process.load("SimTracker.TrackAssociatorProducers.trackAssociatorByChi2_cfi")
0021 process.load("SimTracker.TrackAssociatorProducers.trackAssociatorByHits_cfi")
0022 
0023 process.TrackAssociatorByHits.SimToRecoDenominator = 'reco'
0024 
0025 # Include MagneticField Record (note: you must have this module included for the association to work)
0026 process.load("Configuration.StandardSequences.MagneticField_cff")
0027 
0028 # load filters for recoTracks and trackingParticles 
0029 process.load("RecoTracker.DebugTools.cuts_cff")
0030 
0031 # filter for recoTracks algo A and B
0032 #process.cutsRTAlgoA.src   = cms.InputTag("generalTracks")
0033 #process.cutsRTAlgoA.ptMin = cms.double(1.0)
0034 #process.cutsRTAlgoB.src   = cms.InputTag("generalTracks")
0035 #process.cutsRTAlgoB.ptMin = cms.double(1.0)
0036 
0037 # filter for trackingParticles efficiency and fakes
0038 #process.cutsTPEffic.src   = cms.InputTag("mix","MergedTrackTruth")
0039 #process.cutsTPEffic.ptMin = cms.double(0.1)
0040 #process.cutsTPFake.src    = cms.InputTag("mix","MergedTrackTruth")
0041 #process.cutsTPFake.ptMin  = cms.double(0.1)
0042 
0043 # Include TrackAlgoCompareUtil cfi
0044 process.load("RecoTracker.DebugTools.TrackAlgoCompareUtil_cff")
0045 #process.trackAlgoCompareUtil.trackLabel_algoA = cms.InputTag("cutsRTAlgoA")
0046 #process.trackAlgoCompareUtil.trackLabel_algoB = cms.InputTag("cutsRTAlgoB")
0047 #process.trackAlgoCompareUtil.trackingParticleLabel_effic = cms.InputTag("cutsTPEffic")
0048 #process.trackAlgoCompareUtil.trackingParticleLabel_fakes = cms.InputTag("cutsTPFake")
0049 process.trackAlgoCompareUtil.UseAssociators = cms.bool(True)
0050 process.trackAlgoCompareUtil.assocLabel_algoA = cms.untracked.string("trackAssociationByHits"); 
0051 process.trackAlgoCompareUtil.assocLabel_algoB = cms.untracked.string("trackAssociationByHits"); 
0052 
0053 process.out = cms.OutputModule("PoolOutputModule", 
0054     outputCommands = cms.untracked.vstring(
0055         'drop *_*_*_*',
0056         'keep recoTracks_generalTracks_*_*',
0057         'keep recoTracks_cutsRTAlgoA_*_*',
0058         'keep recoTracks_cutsRTAlgoB_*_*',
0059         'keep TrackingParticles_mergedtruth_*_*',
0060         'keep TrackingParticles_cutsTPEffic_*_*',
0061         'keep TrackingParticles_cutsTPFake_*_*',
0062         'keep recoVertexs_offlinePrimaryVertices_*_*',
0063         'keep TrackingVertexs_mergedtruth_*_*',
0064         'keep recoBeamSpot_offlineBeamSpot_*_',
0065         'keep *_*_*_TrackAlgoCompare'
0066         ),
0067     fileName = cms.untracked.string('TrackAlgoCompareOutput.root')
0068 )
0069 
0070 process.p = cms.Path(process.trackAssociationByHits+process.trackAlgoCompareUtil)
0071 #process.p = cms.Path(process.cutsRTAlgoA + process.cutsRTAlgoB + process.cutsTPEffic + process.cutsTPFake + process.trackAlgoCompareUtil)
0072 process.ep = cms.EndPath(process.out)
0073 
0074