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/AODSIM/PU20bx25_PHYS14_25_V1-v1/00000/00CC714A-F86B-E411-B99A-0025904B5FB8.root',
0030     '/store/mc/Phys14DR/DYJetsToLL_M-50_13TeV-madgraph-pythia8/AODSIM/PU20bx25_PHYS14_25_V1-v1/00000/040D9AF7-FB6B-E411-8106-0025907DBA06.root',
0031     '/store/mc/Phys14DR/DYJetsToLL_M-50_13TeV-madgraph-pythia8/AODSIM/PU20bx25_PHYS14_25_V1-v1/00000/04442001-036C-E411-9C90-0025901D42C0.root'
0032 
0033  ),
0034             
0035                              
0036 )
0037 
0038 
0039 
0040 #
0041 # START ELECTRON ID SECTION
0042 #
0043 # Set up everything that is needed to compute electron IDs and
0044 # add the ValueMaps with ID decisions into the event data stream
0045 #
0046 
0047 # Load tools and function definitions
0048 from PhysicsTools.SelectorUtils.tools.vid_id_tools import *
0049 
0050 process.load("RecoEgamma.ElectronIdentification.egmGsfElectronIDs_cfi")
0051 
0052 from PhysicsTools.SelectorUtils.centralIDRegistry import central_id_registry
0053 process.egmGsfElectronIDSequence = cms.Sequence(process.egmGsfElectronIDs)
0054 
0055 
0056 #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
0057 process.load('RecoEgamma.ElectronIdentification.Identification.heepElectronID_HEEPV51_cff')
0058 setupVIDSelection(process.egmGsfElectronIDs,process.heepElectronID_HEEPV51)
0059 
0060 # Do not forget to add the egmGsfElectronIDSequence to the path,
0061 # as in the example below!
0062 
0063 #
0064 # END ELECTRON ID SECTION
0065 #
0066 
0067 process.idExample = cms.EDAnalyzer('VIDUsageExample',
0068      eles = cms.InputTag("gedGsfElectrons"),
0069      id = cms.InputTag("egmGsfElectronIDs:heepElectronID-HEEPV51"),
0070 )
0071 
0072 
0073 
0074 process.p = cms.Path(process.egmGsfElectronIDSequence * process.idExample)