CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
benchmark_cfg.py
Go to the documentation of this file.
1 # Runs PFBenchmarkAnalyzer and PFJetBenchmark on PFJet sample to
2 # monitor performance of PFJets
3 
4 import FWCore.ParameterSet.Config as cms
5 
6 process = cms.Process("TEST")
7 process.load("DQMServices.Core.DQM_cfg")
8 
9 
10 process.source = cms.Source (
11  "PoolSource",
12  fileNames = cms.untracked.vstring(
13  # Fast
14  'rfio:/castor/cern.ch/user/p/pjanot/CMSSW3110pre3/aod_QCDForPF_Fast_0.root',
15  'rfio:/castor/cern.ch/user/p/pjanot/CMSSW3110pre3/aod_QCDForPF_Fast_1.root',
16  'rfio:/castor/cern.ch/user/p/pjanot/CMSSW3110pre3/aod_QCDForPF_Fast_2.root',
17  'rfio:/castor/cern.ch/user/p/pjanot/CMSSW3110pre3/aod_QCDForPF_Fast_3.root',
18  'rfio:/castor/cern.ch/user/p/pjanot/CMSSW3110pre3/aod_QCDForPF_Fast_4.root',
19  'rfio:/castor/cern.ch/user/p/pjanot/CMSSW3110pre3/aod_QCDForPF_Fast_5.root',
20  'rfio:/castor/cern.ch/user/p/pjanot/CMSSW3110pre3/aod_QCDForPF_Fast_6.root',
21  'rfio:/castor/cern.ch/user/p/pjanot/CMSSW3110pre3/aod_QCDForPF_Fast_7.root',
22  'rfio:/castor/cern.ch/user/p/pjanot/CMSSW3110pre3/aod_QCDForPF_Fast_8.root',
23  #'rfio:/castor/cern.ch/user/p/pjanot/CMSSW3110pre3/aod_QCDForPF_Fast_9.root',
24  'rfio:/castor/cern.ch/user/p/pjanot/CMSSW3110pre3/aod_QCDForPF_Fast_10.root',
25  'rfio:/castor/cern.ch/user/p/pjanot/CMSSW3110pre3/aod_QCDForPF_Fast_11.root',
26  'rfio:/castor/cern.ch/user/p/pjanot/CMSSW3110pre3/aod_QCDForPF_Fast_12.root',
27  'rfio:/castor/cern.ch/user/p/pjanot/CMSSW3110pre3/aod_QCDForPF_Fast_13.root',
28  'rfio:/castor/cern.ch/user/p/pjanot/CMSSW3110pre3/aod_QCDForPF_Fast_14.root',
29  'rfio:/castor/cern.ch/user/p/pjanot/CMSSW3110pre3/aod_QCDForPF_Fast_15.root'
30  # Full
31  #'rfio:/castor/cern.ch/user/p/pjanot/CMSSW3110pre3/aod_QCDForPF_Full_001.root',
32  #'rfio:/castor/cern.ch/user/p/pjanot/CMSSW3110pre3/aod_QCDForPF_Full_002.root',
33  #'rfio:/castor/cern.ch/user/p/pjanot/CMSSW3110pre3/aod_QCDForPF_Full_003.root',
34  #'rfio:/castor/cern.ch/user/p/pjanot/CMSSW3110pre3/aod_QCDForPF_Full_004.root',
35  #'rfio:/castor/cern.ch/user/p/pjanot/CMSSW3110pre3/aod_QCDForPF_Full_005.root',
36  ),
37  secondaryFileNames = cms.untracked.vstring(),
38  noEventSort = cms.untracked.bool(True),
39  duplicateCheckMode = cms.untracked.string('noDuplicateCheck')
40 
41  )
42 
43 process.maxEvents = cms.untracked.PSet(
44  input = cms.untracked.int32(-1)
45 )
46 
47 process.load("Validation.RecoParticleFlow.pfJetBenchmark_cfi")
48 process.load("RecoJets.Configuration.GenJetParticles_cff")
49 process.load("RecoJets.Configuration.RecoGenJets_cff")
50 process.load("RecoJets.Configuration.RecoPFJets_cff")
51 process.load("PhysicsTools.HepMCCandAlgos.genParticles_cfi")
52 process.load("SimGeneral.HepPDTESSource.pythiapdt_cfi")
53 
54 #process.iterativeCone5PFJets.inputEtMin = 0.0
55 process.ak4PFJets.inputEtMin = 0.0
56 
57 # should do a cloning
58 process.genParticlesForJets.ignoreParticleIDs.append(14)
59 process.genParticlesForJets.ignoreParticleIDs.append(12)
60 process.genParticlesForJets.ignoreParticleIDs.append(16)
61 # The following 7 lines is to cure a bug in Generators/Pythi6Interface
62 # for the pythia jet gun
63 process.genParticlesForJets.ignoreParticleIDs.append(1)
64 process.genParticlesForJets.ignoreParticleIDs.append(2)
65 process.genParticlesForJets.ignoreParticleIDs.append(3)
66 process.genParticlesForJets.ignoreParticleIDs.append(4)
67 process.genParticlesForJets.ignoreParticleIDs.append(5)
68 process.genParticlesForJets.ignoreParticleIDs.append(6)
69 process.genParticlesForJets.ignoreParticleIDs.append(21)
70 process.genParticlesForJets.excludeResonances = False
71 
72 
73 process.pfJetBenchmark.OutputFile = cms.untracked.string('JetBenchmark_Fast_3110pre3.root')
74 process.pfJetBenchmark.deltaRMax = 0.1
75 process.pfJetBenchmark.OnlyTwoJets = cms.bool(True)
76 process.pfJetBenchmark.InputTruthLabel = cms.InputTag('ak4GenJets')
77 
78 process.p =cms.Path(
79  process.genJetParticles+
80  process.ak4GenJets+
81  #process.iterativeCone5GenJets+
82  #process.ak4PFJets+
83  process.pfJetBenchmark
84  )
85 
86 
87 process.schedule = cms.Schedule(process.p)
88 
89 
90 
91 process.load("FWCore.MessageLogger.MessageLogger_cfi")
92 process.options = cms.untracked.PSet(
93  makeTriggerResults = cms.untracked.bool(True),
94  wantSummary = cms.untracked.bool(True),
95  Rethrow = cms.untracked.vstring('Unknown',
96  'ProductNotFound',
97  'DictionaryNotFound',
98  'InsertFailure',
99  'Configuration',
100  'LogicError',
101  'UnimplementedFeature',
102  'InvalidReference',
103  'NullPointerError',
104  'NoProductSpecified',
105  'EventTimeout',
106  'EventCorruption',
107  'ModuleFailure',
108  'ScheduleExecutionFailure',
109  'EventProcessorFailure',
110  'FileInPathError',
111  'FatalRootError',
112  'NotFound')
113 )
114 
115 process.MessageLogger.cerr.FwkReport.reportEvery = 1000