From 3fbd8c996d1d97ad0df4886c5961e169a429af97 Mon Sep 17 00:00:00 2001 From: Devdatta Date: Tue, 9 Jun 2015 12:48:41 +0200 Subject: [PATCH 1/2] python dump avoided --- test/runBTagAnalyzer_cfg.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/runBTagAnalyzer_cfg.py b/test/runBTagAnalyzer_cfg.py index 81bc523bc1266..600b7fde65e26 100644 --- a/test/runBTagAnalyzer_cfg.py +++ b/test/runBTagAnalyzer_cfg.py @@ -958,4 +958,4 @@ # Delete predefined output module (needed for running with CRAB) del process.out -open('pydump.py','w').write(process.dumpPython()) +#open('pydump.py','w').write(process.dumpPython()) From bd16768076329480265dc0f3404d915ba58a8d37 Mon Sep 17 00:00:00 2001 From: Devdatta Date: Tue, 9 Jun 2015 19:39:12 +0200 Subject: [PATCH 2/2] adding generalTrack replacement for miniAOD --- test/runBTagAnalyzer_cfg.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/test/runBTagAnalyzer_cfg.py b/test/runBTagAnalyzer_cfg.py index 600b7fde65e26..89b94bda9e2fe 100644 --- a/test/runBTagAnalyzer_cfg.py +++ b/test/runBTagAnalyzer_cfg.py @@ -253,6 +253,7 @@ muSource = 'muons' elSource = 'gedGsfElectrons' patMuons = 'selectedPatMuons' +trackSource = 'generalTracks' ## If running on miniAOD if options.miniAOD: genParticles = 'prunedGenParticles' @@ -261,6 +262,7 @@ pfCandidates = 'packedPFCandidates' pvSource = 'offlineSlimmedPrimaryVertices' svSource = 'slimmedSecondaryVertices' + trackSource = 'unpackedTracksAndVertices' muSource = 'slimmedMuons' elSource = 'slimmedElectrons' patMuons = 'slimmedMuons' @@ -828,6 +830,9 @@ process.candidateCombinedSecondaryVertexV2ComputerFat.trackPseudoSelection.jetDeltaRMax = cms.double(options.fatJetRadius) # default is 0.3 getattr(process,'pfCombinedInclusiveSecondaryVertexV2BJetTagsPFCHS'+postfix).jetTagComputer = cms.string('candidateCombinedSecondaryVertexV2ComputerFat') +if options.miniAOD: + process.load('PhysicsTools.PatAlgos.slimming.unpackedTracksAndVertices_cfi') + #------------------------------------- from RecoBTag.PerformanceMeasurements.BTagAnalyzer_cff import * process.btagana = bTagAnalyzer.clone() @@ -853,6 +858,7 @@ # process.btagana.produceAllTrackTree = True # process.btagana.producePtRelTemplate = False #------------------ +process.btagana.tracksColl = cms.InputTag(trackSource) process.btagana.useSelectedTracks = True ## False if you want to run on all tracks : for commissioning studies process.btagana.useTrackHistory = False ## Can only be used with GEN-SIM-RECODEBUG files process.btagana.fillsvTagInfo = False ## True if you want to store information relative to the svTagInfos, set to False if produceJetTrackTree is set to False @@ -860,7 +866,7 @@ process.btagana.produceAllTrackTree = False ## True if you want to keep info for all tracks : for commissioning studies process.btagana.producePtRelTemplate = options.producePtRelTemplate ## True for performance studies #------------------ -process.btagana.storeTagVariables = False ## True if you want to keep TagInfo TaggingVariables +process.btagana.storeTagVariables = True ## True if you want to keep TagInfo TaggingVariables process.btagana.storeCSVTagVariables = True ## True if you want to keep CSV TaggingVariables process.btagana.primaryVertexColl = cms.InputTag(pvSource) process.btagana.Jets = cms.InputTag('selectedPatJets'+postfix)