CMS 3D CMS Logo

Functions
egammaObjectModifications_tools Namespace Reference

Functions

def makeEnergyScaleAndSmearingSysModifier (eleProdName, phoProdName)
 
def makeVIDBitsModifier (process, eleVIDModuleName, phoVIDModuleName)
 
def makeVIDinPATIDsModifier (process, eleVIDModuleName, phoVIDModuleName)
 

Function Documentation

def egammaObjectModifications_tools.makeEnergyScaleAndSmearingSysModifier (   eleProdName,
  phoProdName 
)

Definition at line 47 of file egammaObjectModifications_tools.py.

47 def makeEnergyScaleAndSmearingSysModifier(eleProdName,phoProdName):
48  energyScaleAndSmearing = cms.PSet(
49  modifierName = cms.string('EGExtraInfoModifierFromFloatValueMaps'),
50  electron_config = cms.PSet(),
51  photon_config = cms.PSet()
52  )
53 
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
62 
def makeEnergyScaleAndSmearingSysModifier(eleProdName, phoProdName)
def egammaObjectModifications_tools.makeVIDBitsModifier (   process,
  eleVIDModuleName,
  phoVIDModuleName 
)

Definition at line 7 of file egammaObjectModifications_tools.py.

References spr.find().

Referenced by miniAOD_tools.miniAOD_customizeCommon().

7 def makeVIDBitsModifier(process,eleVIDModuleName,phoVIDModuleName):
8  vidCutBitsModifier = cms.PSet(
9  modifierName = cms.string('EGExtraInfoModifierFromUIntToIntValueMaps'),
10  electron_config = cms.PSet(),
11  photon_config = cms.PSet()
12  )
13 
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"))
18 
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"))
23 
24  return vidCutBitsModifier
25 
26 """
27 make a modifer config to load all the VID ids into the pat::Electron/pat::Photon electron/photonIDs
28 """
void find(edm::Handle< EcalRecHitCollection > &hits, DetId thisDet, std::vector< EcalRecHitCollection::const_iterator > &hit, bool debug=false)
Definition: FindCaloHit.cc:19
def makeVIDBitsModifier(process, eleVIDModuleName, phoVIDModuleName)
def egammaObjectModifications_tools.makeVIDinPATIDsModifier (   process,
  eleVIDModuleName,
  phoVIDModuleName 
)

Definition at line 29 of file egammaObjectModifications_tools.py.

29 def makeVIDinPATIDsModifier(process,eleVIDModuleName,phoVIDModuleName):
30  vidInPATIDsModifier = cms.PSet(
31  modifierName = cms.string('EGExtraInfoModifierFromEGIDValueMaps'),
32  electron_config = cms.PSet(),
33  photon_config = cms.PSet()
34  )
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()))
38 
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()))
42 
43  return vidInPATIDsModifier
44 
45 
46 
def makeVIDinPATIDsModifier(process, eleVIDModuleName, phoVIDModuleName)