CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
customiseL1CustomReco.py
Go to the documentation of this file.
1 import FWCore.ParameterSet.Config as cms
2 
3 ## from CondCore.DBCommon.CondDBSetup_cfi import *
4 from CondCore.CondDB.CondDB_cfi import *
6 from PhysicsTools.SelectorUtils.centralIDRegistry import central_id_registry
8 
9 def L1NtupleCustomReco(process):
10 
11 
12 #### Custom Jet reco ####
13 
14  # load JEC from SQLite file
15  process.load("CondCore.DBCommon.CondDBCommon_cfi")
16 
17  ## process.jec = cms.ESSource(
18  ## "PoolDBESSource",
19  ## DBParameters = cms.PSet(
20  ## messageLevel = cms.untracked.int32(0)
21  ## ),
22  ## timetype = cms.string('runnumber'),
23  ## toGet = cms.VPSet(
24  ## cms.PSet(
25  ## record = cms.string('JetCorrectionsRecord'),
26  ## tag = cms.string('JetCorrectorParametersCollection_Summer15_25nsV6_DATA_AK4PFchs'),
27  ## label = cms.untracked.string('AK4PFCHS')
28  ## ),
29  ## ),
30  ## connect = cms.string('sqlite:Summer15_25nsV6_DATA.db')
31  ## # uncomment above tag lines and this comment to use MC JEC
32  ## # connect = cms.string('sqlite:Summer12_V7_MC.db')
33  ## )
34  ##
35  ## process.es_prefer_jec = cms.ESPrefer('PoolDBESSource','jec')
36 
37  # re-apply JEC for AK4 CHS PF jets
38  process.load('JetMETCorrections.Configuration.JetCorrectors_cff')
39  #process.load('JetMETCorrections.Configuration.JetCorrectionProducers_cff')
40  #process.load('JetMETCorrections.Configuration.CorrectedJetProducers_cff')
41 
42  #process.ak4PFCHSJetsL1FastL2L3Residual = process.ak4PFCHSJetsL1.clone(correctors = ['ak4PFCHSL1FastL2L3ResidualCorrector'])
43 
44 #### Custom Met Filter reco
45 
46  # load hbhe noise filter result producer
47  process.load('CommonTools/RecoAlgos/HBHENoiseFilterResultProducer_cfi')
48 
49 
50 #### Custom E/Gamma reco ####
51 
52  # turn on VID producer, indicate data format to be
53  # DataFormat.AOD or DataFormat.MiniAOD, as appropriate
54  dataFormat = DataFormat.AOD
55  switchOnVIDElectronIdProducer(process, dataFormat)
56  process.load("RecoEgamma.ElectronIdentification.egmGsfElectronIDs_cfi")
57  process.egmGsfElectronIDSequence = cms.Sequence(process.egmGsfElectronIDs)
58  # define which IDs we want to produce
59  idmod = 'RecoEgamma.ElectronIdentification.Identification.cutBasedElectronID_Spring15_25ns_V1_cff'
60  setupAllVIDIdsInModule(process,idmod,setupVIDElectronSelection)
61 
62 
63 
64 
65  process.l1CustomReco = cms.Path(
66  process.ak4PFCHSL1FastL2L3ResidualCorrectorChain
67  +process.HBHENoiseFilterResultProducer
68  +process.egmGsfElectronIDSequence
69  )
70 
71  process.schedule.append(process.l1CustomReco)
72 
73  return process
def setupAllVIDIdsInModule
Definition: vid_id_tools.py:50
def switchOnVIDElectronIdProducer
Definition: vid_id_tools.py:69