Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-04-06 12:25:08

0001 #modifed from Ilya's Kravchenko example
0002 
0003 import FWCore.ParameterSet.Config as cms
0004 
0005 process = cms.Process("TestID")
0006 
0007 process.load("FWCore.MessageService.MessageLogger_cfi")
0008 process.MessageLogger.cerr.FwkReport = cms.untracked.PSet(
0009     reportEvery = cms.untracked.int32(1),
0010     limit = cms.untracked.int32(10000000)
0011 )
0012 
0013 
0014 process.load('Configuration.StandardSequences.FrontierConditions_GlobalTag_cff')
0015 # NOTE: the pick the right global tag!
0016 #    for PHYS14 scenario PU4bx50 : global tag is ???
0017 #    for PHYS14 scenario PU20bx25: global tag is PHYS14_25_V1
0018 #  as a rule, find the global tag in the DAS under the Configs for given dataset
0019 process.GlobalTag.globaltag = 'PHYS14_25_V1'
0020 
0021 #
0022 # Define input data to read
0023 #
0024 process.maxEvents = cms.untracked.PSet( input = cms.untracked.int32(100) )
0025 process.source = cms.Source ("PoolSource",fileNames = cms.untracked.vstring(
0026    #
0027    # Just a handful of files from the dataset are listed below, for testing
0028    #
0029        '/store/mc/Phys14DR/DYJetsToLL_M-50_13TeV-madgraph-pythia8/MINIAODSIM/PU20bx25_PHYS14_25_V1-v1/00000/0432E62A-7A6C-E411-87BB-002590DB92A8.root',
0030       '/store/mc/Phys14DR/DYJetsToLL_M-50_13TeV-madgraph-pythia8/MINIAODSIM/PU20bx25_PHYS14_25_V1-v1/00000/06C61714-7E6C-E411-9205-002590DB92A8.root',
0031        '/store/mc/Phys14DR/DYJetsToLL_M-50_13TeV-madgraph-pythia8/MINIAODSIM/PU20bx25_PHYS14_25_V1-v1/00000/0EAD09A8-7C6C-E411-B903-0025901D493E.root'
0032  ),
0033             
0034                              
0035 )
0036 
0037 
0038 
0039 #
0040 # START ELECTRON ID SECTION
0041 #
0042 # Set up everything that is needed to compute electron IDs and
0043 # add the ValueMaps with ID decisions into the event data stream
0044 #
0045 
0046 # Load tools and function definitions
0047 from PhysicsTools.SelectorUtils.tools.vid_id_tools import *
0048 
0049 process.load("RecoEgamma.ElectronIdentification.egmGsfElectronIDs_cfi")
0050 # overwrite a default parameter: for miniAOD, the collection name is a slimmed one
0051 process.egmGsfElectronIDs.physicsObjectSrc = cms.InputTag('slimmedElectrons')
0052 
0053 from PhysicsTools.SelectorUtils.centralIDRegistry import central_id_registry
0054 process.egmGsfElectronIDSequence = cms.Sequence(process.egmGsfElectronIDs)
0055 
0056 
0057 #add in the heep ID to the producer. You can run with other IDs but heep ID must be loaded with setupVIDSelection, not setupAllVIDSelection as heep works differently because mini-aod and aod are defined in the same file to ensure consistancy (you cant change cuts of aod without changing miniaod
0058 process.load('RecoEgamma.ElectronIdentification.Identification.heepElectronID_HEEPV51_cff')
0059 setupVIDSelection(process.egmGsfElectronIDs,process.heepElectronID_HEEPV51)
0060 
0061 # Do not forget to add the egmGsfElectronIDSequence to the path,
0062 # as in the example below!
0063 
0064 #
0065 # END ELECTRON ID SECTION
0066 #
0067 
0068 process.idExample = cms.EDAnalyzer('VIDUsageExample',
0069      eles = cms.InputTag("slimmedElectrons"),
0070      id = cms.InputTag("egmGsfElectronIDs:heepElectronID-HEEPV51"),
0071 )
0072 
0073 
0074 
0075 process.p = cms.Path(process.egmGsfElectronIDSequence * process.idExample)