Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #22428 from Sam-Harper/EGMIDsForReMiniAOD_101X
adding Egamma 2016/2017 IDs to MiniAOD and removing old ones
- Loading branch information
Showing
20 changed files
with
115 additions
and
1,987 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
43 changes: 43 additions & 0 deletions
43
RecoEgamma/EgammaTools/python/egammaObjectModifications_tools.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
import FWCore.ParameterSet.Config as cms | ||
|
||
""" | ||
makes a modifier config to load all the cutbased VID bits into the pat::Electron/pat::Photon userdata | ||
any ID which starts with "mva" will not be stored | ||
""" | ||
def makeVIDBitsModifier(process,eleVIDModuleName,phoVIDModuleName): | ||
vidCutBitsModifier = cms.PSet( | ||
modifierName = cms.string('EGExtraInfoModifierFromUIntToIntValueMaps'), | ||
electron_config = cms.PSet(), | ||
photon_config = cms.PSet() | ||
) | ||
|
||
phoVIDModule = getattr(process,phoVIDModuleName) | ||
for egid in phoVIDModule.physicsObjectIDs: | ||
if egid.idDefinition.idName.value().find("mva")!=0: | ||
setattr(vidCutBitsModifier.photon_config,egid.idDefinition.idName.value(),cms.InputTag(phoVIDModuleName+':'+egid.idDefinition.idName.value()+"Bitmap")) | ||
|
||
eleVIDModule = getattr(process,eleVIDModuleName) | ||
for egid in eleVIDModule.physicsObjectIDs: | ||
if egid.idDefinition.idName.value().find("mva")!=0: | ||
setattr(vidCutBitsModifier.electron_config,egid.idDefinition.idName.value(),cms.InputTag(eleVIDModuleName+':'+egid.idDefinition.idName.value()+"Bitmap")) | ||
|
||
return vidCutBitsModifier | ||
|
||
""" | ||
make a modifer config to load all the VID ids into the pat::Electron/pat::Photon electron/photonIDs | ||
""" | ||
def makeVIDinPATIDsModifier(process,eleVIDModuleName,phoVIDModuleName): | ||
vidInPATIDsModifier = cms.PSet( | ||
modifierName = cms.string('EGExtraInfoModifierFromEGIDValueMaps'), | ||
electron_config = cms.PSet(), | ||
photon_config = cms.PSet() | ||
) | ||
phoVIDModule = getattr(process,phoVIDModuleName) | ||
for egid in phoVIDModule.physicsObjectIDs: | ||
setattr(vidInPATIDsModifier.photon_config,egid.idDefinition.idName.value(),cms.InputTag(phoVIDModuleName+':'+egid.idDefinition.idName.value())) | ||
|
||
eleVIDModule = getattr(process,eleVIDModuleName) | ||
for egid in eleVIDModule.physicsObjectIDs: | ||
setattr(vidInPATIDsModifier.electron_config,egid.idDefinition.idName.value(),cms.InputTag(eleVIDModuleName+':'+egid.idDefinition.idName.value())) | ||
|
||
return vidInPATIDsModifier |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.