egmGsfElectronIDs.physicsObjectSrc = cms.InputTag('slimmedElectrons') # define which IDs we want to produce _electron_id_vid_modules = [ 'RecoEgamma.ElectronIdentification.Identification.cutBasedElectronID_Summer16_80X_V1_cff', 'RecoEgamma.ElectronIdentification.Identification.heepElectronID_HEEPV60_cff' ] _bitmapVIDForEle_WorkingPoints = cms.vstring( "egmGsfElectronIDs:cutBasedElectronID-Summer16-80X-V1-veto", ) _bitmapVIDForEle_docstring = '' for modname in _electron_id_vid_modules: ids = __import__(modname, globals(), locals(), ['idName', 'cutFlow']) for name in dir(ids): _id = getattr(ids, name) if hasattr(_id, 'idName') and hasattr(_id, 'cutFlow'): setupVIDSelection(egmGsfElectronIDs, _id) if (len(_bitmapVIDForEle_WorkingPoints) > 0 and _id.idName == _bitmapVIDForEle_WorkingPoints[0].split(':')[-1]): _bitmapVIDForEle_docstring = 'VID compressed bitmap (%s), %d bits per cut' % ( ','.join([cut.cutName.value() for cut in _id.cutFlow]), int(ceil(log(len(_bitmapVIDForEle_WorkingPoints) + 1, 2)))) if RUN_ON_MINIAOD: slimmedElectronsWithUserData = cms.EDProducer( "PATElectronUserDataEmbedder", src=cms.InputTag("slimmedElectrons"), userIntFromBools=cms.PSet(cutbasedID_veto=cms.InputTag( "egmGsfElectronIDs:cutBasedElectronID-Summer16-80X-V1-veto"), ), ) goodZeeElectrons = cms.EDFilter( "PATElectronRefSelector",
'RecoEgamma.PhotonIdentification.Identification.cutBasedPhotonID_Spring16_V2p2_cff', 'RecoEgamma.PhotonIdentification.Identification.mvaPhotonID_Spring16_nonTrig_V1_cff', ), WorkingPoints=cms.vstring( "egmPhotonIDs:cutBasedPhotonID-Spring16-V2p2-loose", "egmPhotonIDs:cutBasedPhotonID-Spring16-V2p2-medium", "egmPhotonIDs:cutBasedPhotonID-Spring16-V2p2-tight", )) _bitmapVIDForPho_docstring = '' for modname in _photon_id_vid_modules_WorkingPoints.modules: ids = __import__(modname, globals(), locals(), ['idName', 'cutFlow']) for name in dir(ids): _id = getattr(ids, name) if hasattr(_id, 'idName') and hasattr(_id, 'cutFlow'): setupVIDSelection(egmPhotonIDs, _id) if (len(_photon_id_vid_modules_WorkingPoints.WorkingPoints) > 0 and _id.idName == _photon_id_vid_modules_WorkingPoints. WorkingPoints[0].split(':')[-1]): _bitmapVIDForPho_docstring = 'VID compressed bitmap (%s), %d bits per cut' % ( ','.join([cut.cutName.value() for cut in _id.cutFlow]), int( ceil( log( len(_photon_id_vid_modules_WorkingPoints. WorkingPoints) + 1, 2)))) bitmapVIDForPho = cms.EDProducer( "PhoVIDNestedWPBitmapProducer", src=cms.InputTag("slimmedPhotons"), WorkingPoints=_photon_id_vid_modules_WorkingPoints.WorkingPoints,
'RecoEgamma.PhotonIdentification.Identification.mvaPhotonID_Spring16_nonTrig_V1_cff', ), WorkingPoints = cms.vstring( "egmPhotonIDs:cutBasedPhotonID-Spring16-V2p2-loose", "egmPhotonIDs:cutBasedPhotonID-Spring16-V2p2-medium", "egmPhotonIDs:cutBasedPhotonID-Spring16-V2p2-tight", ) ) _bitmapVIDForPho_docstring = '' for modname in _photon_id_vid_modules_WorkingPoints.modules: ids= __import__(modname, globals(), locals(), ['idName','cutFlow']) for name in dir(ids): _id = getattr(ids,name) if hasattr(_id,'idName') and hasattr(_id,'cutFlow'): setupVIDSelection(egmPhotonIDs,_id) if (len(_photon_id_vid_modules_WorkingPoints.WorkingPoints)>0 and _id.idName==_photon_id_vid_modules_WorkingPoints.WorkingPoints[0].split(':')[-1]): _bitmapVIDForPho_docstring = 'VID compressed bitmap (%s), %d bits per cut'%(','.join([cut.cutName.value() for cut in _id.cutFlow]),int(ceil(log(len(_photon_id_vid_modules_WorkingPoints.WorkingPoints)+1,2)))) bitmapVIDForPho = cms.EDProducer("PhoVIDNestedWPBitmapProducer", src = cms.InputTag("slimmedPhotons"), WorkingPoints = _photon_id_vid_modules_WorkingPoints.WorkingPoints, ) isoForPho = cms.EDProducer("PhoIsoValueMapProducer", src = cms.InputTag("slimmedPhotons"), relative = cms.bool(False), rho_PFIso = cms.InputTag("fixedGridRhoFastjetAll"), mapIsoChg = cms.InputTag("photonIDValueMapProducer:phoChargedIsolation"), mapIsoNeu = cms.InputTag("photonIDValueMapProducer:phoNeutralHadronIsolation"), mapIsoPho = cms.InputTag("photonIDValueMapProducer:phoPhotonIsolation"),
#'RecoEgamma.ElectronIdentification.Identification.heepElectronID_HEEPV70_cff', # add heepIDVarValueMaps to sequence when uncomment 'RecoEgamma.ElectronIdentification.Identification.mvaElectronID_Spring16_GeneralPurpose_V1_cff', 'RecoEgamma.ElectronIdentification.Identification.mvaElectronID_Spring16_HZZ_V1_cff', ] _bitmapVIDForEle_WorkingPoints = cms.vstring( "egmGsfElectronIDs:cutBasedElectronID-Summer16-80X-V1-loose", "egmGsfElectronIDs:cutBasedElectronID-Summer16-80X-V1-medium", "egmGsfElectronIDs:cutBasedElectronID-Summer16-80X-V1-tight", ) _bitmapVIDForEle_docstring = '' for modname in _electron_id_vid_modules: ids= __import__(modname, globals(), locals(), ['idName','cutFlow']) for name in dir(ids): _id = getattr(ids,name) if hasattr(_id,'idName') and hasattr(_id,'cutFlow'): setupVIDSelection(egmGsfElectronIDs,_id) if (len(_bitmapVIDForEle_WorkingPoints)>0 and _id.idName==_bitmapVIDForEle_WorkingPoints[0].split(':')[-1]): _bitmapVIDForEle_docstring = 'VID compressed bitmap (%s), %d bits per cut'%(','.join([cut.cutName.value() for cut in _id.cutFlow]),int(ceil(log(len(_bitmapVIDForEle_WorkingPoints)+1,2)))) from RecoEgamma.ElectronIdentification.heepIdVarValueMapProducer_cfi import * bitmapVIDForEle = cms.EDProducer("EleVIDNestedWPBitmapProducer", src = cms.InputTag("slimmedElectrons"), WorkingPoints = _bitmapVIDForEle_WorkingPoints, ) isoForEle = cms.EDProducer("EleIsoValueMapProducer", src = cms.InputTag("slimmedElectrons"), relative = cms.bool(False), rho_MiniIso = cms.InputTag("fixedGridRhoFastjetCentralNeutral"), rho_PFIso = cms.InputTag("fixedGridRhoFastjetAll"), EAFile_MiniIso = cms.FileInPath("RecoEgamma/ElectronIdentification/data/Spring15/effAreaElectrons_cone03_pfNeuHadronsAndPhotons_25ns.txt"),
), ) B2GegHLTDQMOfflineTnPSource = cms.EDAnalyzer( "HLTEleTagAndProbeOfflineSource", tagAndProbeCollections=cms.VPSet( cms.PSet( tagAndProbeConfigEle50CaloIdVTGsfTrkIdT, histConfigs=egammaStdHistConfigs, baseHistName=cms.string("eleWPTightTag_"), filterConfigs=egammaStdFiltersToMonitor, ), )) from RecoEgamma.ElectronIdentification.egmGsfElectronIDs_cff import egmGsfElectronIDs B2GegmGsfElectronIDsForDQM = egmGsfElectronIDs.clone() B2GegmGsfElectronIDsForDQM.physicsObjectsIDs = cms.VPSet() B2GegmGsfElectronIDsForDQM.physicsObjectSrc == cms.InputTag('gedGsfElectrons') #note: be careful here to when selecting new ids that the vid tools doesnt do extra setup for them #for example the HEEP cuts need an extra producer which vid tools automatically handles from PhysicsTools.SelectorUtils.tools.vid_id_tools import setupVIDSelection my_id_modules = [ 'RecoEgamma.ElectronIdentification.Identification.cutBasedElectronID_Summer16_80X_V1_cff' ] for id_module_name in my_id_modules: idmod = __import__(id_module_name, globals(), locals(), ['idName', 'cutFlow']) for name in dir(idmod): item = getattr(idmod, name) if hasattr(item, 'idName') and hasattr(item, 'cutFlow'): setupVIDSelection(B2GegmGsfElectronIDsForDQM, item)
egmGsfElectronIDsForDQM = egmGsfElectronIDs.clone() egmGsfElectronIDsForDQM.physicsObjectsIDs = cms.VPSet() egmGsfElectronIDsForDQM.physicsObjectSrc == cms.InputTag('gedGsfElectrons') #note: be careful here to when selecting new ids that the vid tools dont do extra setup for them #for example the HEEP cuts need an extra producer which vid tools automatically handles from PhysicsTools.SelectorUtils.tools.vid_id_tools import setupVIDSelection my_id_modules = [ 'RecoEgamma.ElectronIdentification.Identification.cutBasedElectronID_Summer16_80X_V1_cff' ] for id_module_name in my_id_modules: idmod = __import__(id_module_name, globals(), locals(), ['idName', 'cutFlow']) for name in dir(idmod): item = getattr(idmod, name) if hasattr(item, 'idName') and hasattr(item, 'cutFlow'): setupVIDSelection(egmGsfElectronIDsForDQM, item) from RecoEgamma.PhotonIdentification.PhotonIDValueMapProducer_cfi import photonIDValueMapProducer from RecoEgamma.PhotonIdentification.egmPhotonIDs_cfi import egmPhotonIDs egmPhotonIDsForDQM = egmPhotonIDs.clone() egmPhotonIDsForDQM.physicsObjectsIDs = cms.VPSet() egmPhotonIDsForDQM.physicsObjectSrc == cms.InputTag('gedPhotons') #note: be careful here to when selecting new ids that the vid tools dont do extra setup for them #for example the HEEP cuts need an extra producer which vid tools automatically handles from PhysicsTools.SelectorUtils.tools.vid_id_tools import setupVIDSelection my_id_modules = [ 'RecoEgamma.PhotonIdentification.Identification.cutBasedPhotonID_Spring16_V2p2_cff' ] for id_module_name in my_id_modules: idmod = __import__(id_module_name, globals(), locals(), ['idName', 'cutFlow'])
B2GegHLTDQMOfflineTnPSource = cms.EDAnalyzer("HLTEleTagAndProbeOfflineSource", tagAndProbeCollections = cms.VPSet( cms.PSet( tagAndProbeConfigEle50CaloIdVTGsfTrkIdT, histConfigs = egammaStdHistConfigs, baseHistName = cms.string("eleWPTightTag_"), filterConfigs = egammaStdFiltersToMonitor, ), ) ) from RecoEgamma.ElectronIdentification.egmGsfElectronIDs_cff import egmGsfElectronIDs B2GegmGsfElectronIDsForDQM = egmGsfElectronIDs.clone() B2GegmGsfElectronIDsForDQM.physicsObjectsIDs = cms.VPSet() B2GegmGsfElectronIDsForDQM.physicsObjectSrc == cms.InputTag('gedGsfElectrons') #note: be careful here to when selecting new ids that the vid tools doesnt do extra setup for them #for example the HEEP cuts need an extra producer which vid tools automatically handles from PhysicsTools.SelectorUtils.tools.vid_id_tools import setupVIDSelection my_id_modules = ['RecoEgamma.ElectronIdentification.Identification.cutBasedElectronID_Summer16_80X_V1_cff'] for id_module_name in my_id_modules: idmod= __import__(id_module_name, globals(), locals(), ['idName','cutFlow']) for name in dir(idmod): item = getattr(idmod,name) if hasattr(item,'idName') and hasattr(item,'cutFlow'): setupVIDSelection(B2GegmGsfElectronIDsForDQM,item)
from RecoEgamma.ElectronIdentification.egmGsfElectronIDs_cff import egmGsfElectronIDs egmGsfElectronIDsForDQM = egmGsfElectronIDs.clone() egmGsfElectronIDsForDQM.physicsObjectsIDs = cms.VPSet() egmGsfElectronIDsForDQM.physicsObjectSrc == cms.InputTag('gedGsfElectrons') #note: be careful here to when selecting new ids that the vid tools dont do extra setup for them #for example the HEEP cuts need an extra producer which vid tools automatically handles from PhysicsTools.SelectorUtils.tools.vid_id_tools import setupVIDSelection my_id_modules = ['RecoEgamma.ElectronIdentification.Identification.cutBasedElectronID_Summer16_80X_V1_cff'] for id_module_name in my_id_modules: idmod= __import__(id_module_name, globals(), locals(), ['idName','cutFlow']) for name in dir(idmod): item = getattr(idmod,name) if hasattr(item,'idName') and hasattr(item,'cutFlow'): setupVIDSelection(egmGsfElectronIDsForDQM,item) from RecoEgamma.PhotonIdentification.PhotonIDValueMapProducer_cfi import photonIDValueMapProducer from RecoEgamma.PhotonIdentification.egmPhotonIDs_cfi import egmPhotonIDs egmPhotonIDsForDQM = egmPhotonIDs.clone() egmPhotonIDsForDQM.physicsObjectsIDs = cms.VPSet() egmPhotonIDsForDQM.physicsObjectSrc == cms.InputTag('gedPhotons') #note: be careful here to when selecting new ids that the vid tools dont do extra setup for them #for example the HEEP cuts need an extra producer which vid tools automatically handles from PhysicsTools.SelectorUtils.tools.vid_id_tools import setupVIDSelection my_id_modules = ['RecoEgamma.PhotonIdentification.Identification.cutBasedPhotonID_Spring16_V2p2_cff'] for id_module_name in my_id_modules: idmod= __import__(id_module_name, globals(), locals(), ['idName','cutFlow']) for name in dir(idmod): item = getattr(idmod,name)