CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
Functions
egammaObjectModifications_tools Namespace Reference

Functions

def makeEnergyScaleAndSmearingSysModifier
 
def makeVIDBitsModifier
 
def makeVIDinPATIDsModifier
 

Function Documentation

def egammaObjectModifications_tools.makeEnergyScaleAndSmearingSysModifier (   eleProdName,
  phoProdName 
)

Definition at line 47 of file egammaObjectModifications_tools.py.

47 
48 def makeEnergyScaleAndSmearingSysModifier(eleProdName,phoProdName):
49  energyScaleAndSmearing = cms.PSet(
50  modifierName = cms.string('EGExtraInfoModifierFromFloatValueMaps'),
51  electron_config = cms.PSet(),
52  photon_config = cms.PSet()
53  )
54 
55  from RecoEgamma.EgammaTools.calibratedEgammas_cff import prefixName
56  import RecoEgamma.EgammaTools.calibratedElectronProducer_cfi
57  for valueMapName in RecoEgamma.EgammaTools.calibratedElectronProducer_cfi.calibratedElectronProducer.valueMapsStored:
58  setattr(energyScaleAndSmearing.electron_config,valueMapName,cms.InputTag(eleProdName,valueMapName))
59  import RecoEgamma.EgammaTools.calibratedPhotonProducer_cfi
60  for valueMapName in RecoEgamma.EgammaTools.calibratedPhotonProducer_cfi.calibratedPhotonProducer.valueMapsStored:
61  setattr(energyScaleAndSmearing.photon_config,valueMapName,cms.InputTag(phoProdName,valueMapName))
62  return energyScaleAndSmearing
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 
8 def makeVIDBitsModifier(process,eleVIDModuleName,phoVIDModuleName):
9  vidCutBitsModifier = cms.PSet(
10  modifierName = cms.string('EGExtraInfoModifierFromUIntToIntValueMaps'),
11  electron_config = cms.PSet(),
12  photon_config = cms.PSet()
13  )
14 
15  phoVIDModule = getattr(process,phoVIDModuleName)
16  for egid in phoVIDModule.physicsObjectIDs:
17  if egid.idDefinition.idName.value().find("mva")!=0:
18  setattr(vidCutBitsModifier.photon_config,egid.idDefinition.idName.value(),cms.InputTag(phoVIDModuleName+':'+egid.idDefinition.idName.value()+"Bitmap"))
19 
20  eleVIDModule = getattr(process,eleVIDModuleName)
21  for egid in eleVIDModule.physicsObjectIDs:
22  if egid.idDefinition.idName.value().find("mva")!=0:
23  setattr(vidCutBitsModifier.electron_config,egid.idDefinition.idName.value(),cms.InputTag(eleVIDModuleName+':'+egid.idDefinition.idName.value()+"Bitmap"))
24 
25  return vidCutBitsModifier
26 
27 """
28 make a modifer config to load all the VID ids into the pat::Electron/pat::Photon electron/photonIDs
"""
void find(edm::Handle< EcalRecHitCollection > &hits, DetId thisDet, std::vector< EcalRecHitCollection::const_iterator > &hit, bool debug=false)
Definition: FindCaloHit.cc:19
def egammaObjectModifications_tools.makeVIDinPATIDsModifier (   process,
  eleVIDModuleName,
  phoVIDModuleName 
)

Definition at line 29 of file egammaObjectModifications_tools.py.

29 
30 def makeVIDinPATIDsModifier(process,eleVIDModuleName,phoVIDModuleName):
31  vidInPATIDsModifier = cms.PSet(
32  modifierName = cms.string('EGExtraInfoModifierFromEGIDValueMaps'),
33  electron_config = cms.PSet(),
34  photon_config = cms.PSet()
35  )
36  phoVIDModule = getattr(process,phoVIDModuleName)
37  for egid in phoVIDModule.physicsObjectIDs:
38  setattr(vidInPATIDsModifier.photon_config,egid.idDefinition.idName.value(),cms.InputTag(phoVIDModuleName+':'+egid.idDefinition.idName.value()))
39 
40  eleVIDModule = getattr(process,eleVIDModuleName)
41  for egid in eleVIDModule.physicsObjectIDs:
42  setattr(vidInPATIDsModifier.electron_config,egid.idDefinition.idName.value(),cms.InputTag(eleVIDModuleName+':'+egid.idDefinition.idName.value()))
43 
44  return vidInPATIDsModifier
45 
46