1 import FWCore.ParameterSet.Config
as cms
4 makes a modifier config to load all the cutbased VID bits into the pat::Electron/pat::Photon userdata
5 any ID which starts with "mva" will not be stored
8 vidCutBitsModifier = cms.PSet(
9 modifierName = cms.string(
'EGExtraInfoModifierFromUIntToIntValueMaps'),
10 electron_config = cms.PSet(),
11 photon_config = cms.PSet()
14 phoVIDModule = getattr(process,phoVIDModuleName)
15 for egid
in phoVIDModule.physicsObjectIDs:
16 if egid.idDefinition.idName.value().
find(
"mva")!=0:
17 setattr(vidCutBitsModifier.photon_config,egid.idDefinition.idName.value(),cms.InputTag(phoVIDModuleName+
':'+egid.idDefinition.idName.value()+
"Bitmap"))
19 eleVIDModule = getattr(process,eleVIDModuleName)
20 for egid
in eleVIDModule.physicsObjectIDs:
21 if egid.idDefinition.idName.value().
find(
"mva")!=0:
22 setattr(vidCutBitsModifier.electron_config,egid.idDefinition.idName.value(),cms.InputTag(eleVIDModuleName+
':'+egid.idDefinition.idName.value()+
"Bitmap"))
24 return vidCutBitsModifier
27 make a modifer config to load all the VID ids into the pat::Electron/pat::Photon electron/photonIDs
30 vidInPATIDsModifier = cms.PSet(
31 modifierName = cms.string(
'EGExtraInfoModifierFromEGIDValueMaps'),
32 electron_config = cms.PSet(),
33 photon_config = cms.PSet()
35 phoVIDModule = getattr(process,phoVIDModuleName)
36 for egid
in phoVIDModule.physicsObjectIDs:
37 setattr(vidInPATIDsModifier.photon_config,egid.idDefinition.idName.value(),cms.InputTag(phoVIDModuleName+
':'+egid.idDefinition.idName.value()))
39 eleVIDModule = getattr(process,eleVIDModuleName)
40 for egid
in eleVIDModule.physicsObjectIDs:
41 setattr(vidInPATIDsModifier.electron_config,egid.idDefinition.idName.value(),cms.InputTag(eleVIDModuleName+
':'+egid.idDefinition.idName.value()))
43 return vidInPATIDsModifier
48 energyScaleAndSmearing = cms.PSet(
49 modifierName = cms.string(
'EGExtraInfoModifierFromFloatValueMaps'),
50 electron_config = cms.PSet(),
51 photon_config = cms.PSet()
54 from RecoEgamma.EgammaTools.calibratedEgammas_cff
import prefixName
55 import RecoEgamma.EgammaTools.calibratedElectronProducer_cfi
56 for valueMapName
in RecoEgamma.EgammaTools.calibratedElectronProducer_cfi.calibratedElectronProducer.valueMapsStored:
57 setattr(energyScaleAndSmearing.electron_config,valueMapName,cms.InputTag(eleProdName,valueMapName))
58 import RecoEgamma.EgammaTools.calibratedPhotonProducer_cfi
59 for valueMapName
in RecoEgamma.EgammaTools.calibratedPhotonProducer_cfi.calibratedPhotonProducer.valueMapsStored:
60 setattr(energyScaleAndSmearing.photon_config,valueMapName,cms.InputTag(phoProdName,valueMapName))
61 return energyScaleAndSmearing
void find(edm::Handle< EcalRecHitCollection > &hits, DetId thisDet, std::vector< EcalRecHitCollection::const_iterator > &hit, bool debug=false)