CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Member Functions | Private Attributes | Static Private Attributes
metTools.AddPfMET Class Reference
Inheritance diagram for metTools.AddPfMET:

Public Member Functions

def __call__
 
def __init__
 
def getDefaultParameters
 
def toolCode
 

Private Attributes

 _comment
 
 _parameters
 

Static Private Attributes

tuple _defaultParameters = dicttypes.SortedKeysDict()
 
string _label = 'addPfMET'
 

Detailed Description

Add pflow MET collection to patEventContent

Definition at line 51 of file metTools.py.

Constructor & Destructor Documentation

def metTools.AddPfMET.__init__ (   self)

Definition at line 58 of file metTools.py.

References electronTools.AddElectronUserIsolation._defaultParameters, metTools.AddTcMET._defaultParameters, python.editorTools.UserCodeTool._defaultParameters, heavyIonTools.ConfigureHeavyIons._defaultParameters, coreTools.RestrictInputToAOD._defaultParameters, jetTools.RunBTagging._defaultParameters, python.Vispa.Plugins.ConfigEditor.ToolDataAccessor.ImportTool._defaultParameters, heavyIonTools.ProductionDefaults._defaultParameters, python.editorTools.ChangeSource._defaultParameters, metTools.AddPfMET._defaultParameters, coreTools.RunOnData._defaultParameters, coreTools.RemoveMCMatching._defaultParameters, cmsswVersionTools.RunBTagging35X._defaultParameters, heavyIonTools.SelectionDefaults._defaultParameters, heavyIonTools.DisbaleMonteCarloDeps._defaultParameters, jetTools.AddJetCollection._defaultParameters, coreTools.RemoveAllPATObjectsBut._defaultParameters, coreTools.RemoveSpecificPATObjects._defaultParameters, cmsswVersionTools.AddJetCollection35X._defaultParameters, coreTools.RemoveCleaning._defaultParameters, coreTools.AddCleaning._defaultParameters, jetTools.SwitchJetCollection._defaultParameters, cmsswVersionTools.SwitchJetCollection35X._defaultParameters, jetTools.AddJetID._defaultParameters, jetTools.SetTagInfos._defaultParameters, jetTools.SwitchJetCorrLevels._defaultParameters, cmsswVersionTools.PickRelValInputFiles._defaultParameters, root::helper::RootFunctionAdapter< F, args >.addParameter(), root::helper::RootFunctionHelper< F, args, Tag >.addParameter(), ParameterMgr.addParameter(), fit::RootMinuit< Function >.addParameter(), DropBoxMetadata::Parameters.addParameter(), PythonParameterSet.addParameter(), LutXml.addParameter(), python.ConfigToolBase.ConfigToolBase.addParameter(), and edm::ParameterSet.addParameter().

58 
59  def __init__(self):
60  ConfigToolBase.__init__(self)
61  self.addParameter(self._defaultParameters,'postfixLabel','PF', '')
62  self._parameters=copy.deepcopy(self._defaultParameters)
63  self._comment = ''
tuple _defaultParameters
Definition: metTools.py:56

Member Function Documentation

def metTools.AddPfMET.__call__ (   self,
  process,
  postfixLabel = None 
)

Definition at line 67 of file metTools.py.

References electronTools.AddElectronUserIsolation._defaultParameters, python.editorTools.UserCodeTool._defaultParameters, metTools.AddTcMET._defaultParameters, heavyIonTools.ConfigureHeavyIons._defaultParameters, coreTools.RestrictInputToAOD._defaultParameters, jetTools.RunBTagging._defaultParameters, python.Vispa.Plugins.ConfigEditor.ToolDataAccessor.ImportTool._defaultParameters, heavyIonTools.ProductionDefaults._defaultParameters, python.editorTools.ChangeSource._defaultParameters, metTools.AddPfMET._defaultParameters, coreTools.RunOnData._defaultParameters, coreTools.RemoveMCMatching._defaultParameters, cmsswVersionTools.RunBTagging35X._defaultParameters, heavyIonTools.SelectionDefaults._defaultParameters, heavyIonTools.DisbaleMonteCarloDeps._defaultParameters, jetTools.AddJetCollection._defaultParameters, coreTools.RemoveAllPATObjectsBut._defaultParameters, coreTools.RemoveSpecificPATObjects._defaultParameters, cmsswVersionTools.AddJetCollection35X._defaultParameters, coreTools.RemoveCleaning._defaultParameters, coreTools.AddCleaning._defaultParameters, jetTools.SwitchJetCollection._defaultParameters, cmsswVersionTools.SwitchJetCollection35X._defaultParameters, jetTools.AddJetID._defaultParameters, jetTools.SetTagInfos._defaultParameters, jetTools.SwitchJetCorrLevels._defaultParameters, cmsswVersionTools.PickRelValInputFiles._defaultParameters, SignedImpactParameter3D.apply(), SignedTransverseImpactParameter.apply(), SignedDecayLength3D.apply(), SurveyParameters.apply(), gen::PhotosInterface.apply(), FWPSetCellEditor.apply(), FWGUIEventFilter.apply(), DeviationsFromFileSensor2D.apply(), jetTools.RunBTagging.apply(), BeamSpotAlignmentParameters.apply(), RigidBodyAlignmentParameters.apply(), python.ConfigToolBase.ConfigToolBase.apply(), AlignmentParameters.apply(), BowedSurfaceAlignmentParameters.apply(), python.Vispa.Plugins.ConfigEditor.ToolDataAccessor.ImportTool.apply(), python.Vispa.Plugins.ConfigEditor.ToolDataAccessor.ApplyTool.apply(), TwoBowedSurfacesAlignmentParameters.apply(), python.Vispa.Gui.BoxContentDialog.BoxContentDialog.apply(), reco::modules::TrackerTrackHitFilter::Rule.apply(), python.Vispa.Plugins.ConfigEditor.ToolDialog.ToolDialog.apply(), reco::Add< T >.apply(), reco::Sub< T >.apply(), reco::Mul< T >.apply(), reco::Div< T >.apply(), reco::And< bool >.apply(), cmsswVersionTools.RunBTagging35X.apply(), reco::Or< bool >.apply(), reco::Less< T >.apply(), reco::LessEqual< T >.apply(), reco::More< T >.apply(), reco::MoreEqual< T >.apply(), reco::Equal< T >.apply(), cmsswVersionTools.PickRelValInputFiles.apply(), PedeReader.setParameter(), fit::RootMinuit< Function >.setParameter(), and python.ConfigToolBase.ConfigToolBase.setParameter().

67 
68  def __call__(self,process,postfixLabel=None):
69  if postfixLabel is None:
70  postfixLabel=self._defaultParameters['postfixLabel'].value
71  self.setParameter('postfixLabel',postfixLabel)
72  self.apply(process)
tuple _defaultParameters
Definition: metTools.py:56
def metTools.AddPfMET.getDefaultParameters (   self)

Definition at line 64 of file metTools.py.

References electronTools.AddElectronUserIsolation._defaultParameters, python.editorTools.UserCodeTool._defaultParameters, metTools.AddTcMET._defaultParameters, heavyIonTools.ConfigureHeavyIons._defaultParameters, coreTools.RestrictInputToAOD._defaultParameters, jetTools.RunBTagging._defaultParameters, python.Vispa.Plugins.ConfigEditor.ToolDataAccessor.ImportTool._defaultParameters, heavyIonTools.ProductionDefaults._defaultParameters, python.editorTools.ChangeSource._defaultParameters, metTools.AddPfMET._defaultParameters, coreTools.RunOnData._defaultParameters, coreTools.RemoveMCMatching._defaultParameters, cmsswVersionTools.RunBTagging35X._defaultParameters, heavyIonTools.SelectionDefaults._defaultParameters, heavyIonTools.DisbaleMonteCarloDeps._defaultParameters, jetTools.AddJetCollection._defaultParameters, coreTools.RemoveAllPATObjectsBut._defaultParameters, coreTools.RemoveSpecificPATObjects._defaultParameters, cmsswVersionTools.AddJetCollection35X._defaultParameters, coreTools.RemoveCleaning._defaultParameters, coreTools.AddCleaning._defaultParameters, jetTools.SwitchJetCollection._defaultParameters, cmsswVersionTools.SwitchJetCollection35X._defaultParameters, jetTools.AddJetID._defaultParameters, jetTools.SetTagInfos._defaultParameters, jetTools.SwitchJetCorrLevels._defaultParameters, and cmsswVersionTools.PickRelValInputFiles._defaultParameters.

Referenced by trigTools.SwitchOnTrigger.toolCode(), trigTools.SwitchOnTriggerStandAlone.toolCode(), trigTools.SwitchOnTriggerMatching.toolCode(), and trigTools.SwitchOnTriggerMatchingStandAlone.toolCode().

64 
65  def getDefaultParameters(self):
66  return self._defaultParameters
def getDefaultParameters
Definition: metTools.py:64
tuple _defaultParameters
Definition: metTools.py:56
def metTools.AddPfMET.toolCode (   self,
  process 
)

Definition at line 73 of file metTools.py.

References python.editorTools.UserCodeTool._parameters, electronTools.AddElectronUserIsolation._parameters, heavyIonTools.ConfigureHeavyIons._parameters, metTools.AddTcMET._parameters, coreTools.RestrictInputToAOD._parameters, python.Vispa.Plugins.ConfigEditor.ConfigDataAccessor.ConfigFolder._parameters, jetTools.RunBTagging._parameters, python.Vispa.Plugins.ConfigEditor.ToolDataAccessor.ImportTool._parameters, heavyIonTools.ProductionDefaults._parameters, python.ConfigToolBase.ConfigToolBase._parameters, python.editorTools.ChangeSource._parameters, TAbsFitConstraint._parameters, metTools.AddPfMET._parameters, TAbsFitParticle._parameters, coreTools.RunOnData._parameters, coreTools.RemoveMCMatching._parameters, cmsswVersionTools.RunBTagging35X._parameters, heavyIonTools.SelectionDefaults._parameters, heavyIonTools.DisbaleMonteCarloDeps._parameters, jetTools.AddJetCollection._parameters, coreTools.RemoveAllPATObjectsBut._parameters, coreTools.RemoveSpecificPATObjects._parameters, cmsswVersionTools.AddJetCollection35X._parameters, coreTools.RemoveCleaning._parameters, coreTools.AddCleaning._parameters, jetTools.SwitchJetCollection._parameters, cmsswVersionTools.SwitchJetCollection35X._parameters, jetTools.AddJetID._parameters, jetTools.SetTagInfos._parameters, jetTools.SwitchJetCorrLevels._parameters, cmsswVersionTools.PickRelValInputFiles._parameters, and clone().

73 
74  def toolCode(self, process):
75  postfixLabel=self._parameters['postfixLabel'].value
76 
77 
78  ## add module as process to the default sequence
79  def addAlso (label,value):
80  existing = getattr(process, label)
81  setattr( process, label+postfixLabel, value)
82  process.patDefaultSequence.replace( existing, existing*value )
83 
84  ## clone and add a module as process to the
85  ## default sequence
86  def addClone(label,**replaceStatements):
87  new = getattr(process, label).clone(**replaceStatements)
88  addAlso(label, new)
89 
90  ## addClone('corMetType1Icone5Muons', uncorMETInputTag = cms.InputTag("tcMet"))
91  addClone('patMETs', metSource = cms.InputTag("pfMet"), addMuonCorrections = False)
92 
93  ## add new met collections output to the pat summary
94  process.patCandidateSummary.candidates += [ cms.InputTag('patMETs'+postfixLabel) ]
95 
96 
97 addPfMET=AddPfMET()
T * clone(const T *tp)
Definition: Ptr.h:42

Member Data Documentation

metTools.AddPfMET._comment
private

Definition at line 62 of file metTools.py.

tuple metTools.AddPfMET._defaultParameters = dicttypes.SortedKeysDict()
staticprivate

Definition at line 56 of file metTools.py.

Referenced by photonTools.AddPhotonUserIsolation.__call__(), muonTools.AddMuonUserIsolation.__call__(), HiCoreTools.RestrictInputToAOD.__call__(), trackTools.MakeAODTrackCandidates.__call__(), metTools.AddPfMET.__call__(), HiCoreTools.RemoveMCMatching.__call__(), trackTools.MakePATTrackCandidates.__call__(), trigTools.SwitchOnTrigger.__call__(), HiCoreTools.RemoveAllPATObjectsBut.__call__(), HiCoreTools.RemoveSpecificPATObjects.__call__(), trigTools.SwitchOnTriggerStandAlone.__call__(), trackTools.MakeTrackCandidates.__call__(), tauTools.AddTauCollection.__call__(), HiCoreTools.RemoveCleaning.__call__(), trigTools.SwitchOnTriggerMatching.__call__(), HiCoreTools.AddCleaning.__call__(), trigTools.SwitchOnTriggerMatchingStandAlone.__call__(), trigTools.SwitchOnTriggerMatchEmbedding.__call__(), trigTools.RemoveCleaningFromTriggerMatching.__call__(), photonTools.AddPhotonUserIsolation.__init__(), trackTools.MakeAODTrackCandidates.__init__(), muonTools.AddMuonUserIsolation.__init__(), HiCoreTools.RestrictInputToAOD.__init__(), HiCoreTools.RemoveMCMatching.__init__(), metTools.AddPfMET.__init__(), trackTools.MakePATTrackCandidates.__init__(), trigTools.SwitchOnTrigger.__init__(), HiCoreTools.RemoveAllPATObjectsBut.__init__(), HiCoreTools.RemoveSpecificPATObjects.__init__(), trigTools.SwitchOnTriggerStandAlone.__init__(), trackTools.MakeTrackCandidates.__init__(), tauTools.AddTauCollection.__init__(), HiCoreTools.RemoveCleaning.__init__(), trigTools.SwitchOnTriggerMatching.__init__(), HiCoreTools.AddCleaning.__init__(), trigTools.SwitchOnTriggerMatchingStandAlone.__init__(), trigTools.SwitchOnTriggerMatchEmbedding.__init__(), trigTools.RemoveCleaningFromTriggerMatching.__init__(), python.ConfigToolBase.ConfigToolBase.getAllowedValues(), photonTools.AddPhotonUserIsolation.getDefaultParameters(), muonTools.AddMuonUserIsolation.getDefaultParameters(), HiCoreTools.RestrictInputToAOD.getDefaultParameters(), trackTools.MakeAODTrackCandidates.getDefaultParameters(), metTools.AddPfMET.getDefaultParameters(), HiCoreTools.RemoveMCMatching.getDefaultParameters(), trackTools.MakePATTrackCandidates.getDefaultParameters(), trigTools.SwitchOnTrigger.getDefaultParameters(), HiCoreTools.RemoveAllPATObjectsBut.getDefaultParameters(), HiCoreTools.RemoveSpecificPATObjects.getDefaultParameters(), trigTools.SwitchOnTriggerStandAlone.getDefaultParameters(), trackTools.MakeTrackCandidates.getDefaultParameters(), tauTools.AddTauCollection.getDefaultParameters(), HiCoreTools.RemoveCleaning.getDefaultParameters(), trigTools.SwitchOnTriggerMatching.getDefaultParameters(), HiCoreTools.AddCleaning.getDefaultParameters(), trigTools.SwitchOnTriggerMatchingStandAlone.getDefaultParameters(), trigTools.SwitchOnTriggerMatchEmbedding.getDefaultParameters(), trigTools.RemoveCleaningFromTriggerMatching.getDefaultParameters(), python.ConfigToolBase.ConfigToolBase.reset(), and python.ConfigToolBase.ConfigToolBase.setParameter().

string metTools.AddPfMET._label = 'addPfMET'
staticprivate

Definition at line 55 of file metTools.py.

Referenced by trigTools.SwitchOnTrigger.toolCode(), trigTools.SwitchOnTriggerStandAlone.toolCode(), trigTools.SwitchOnTriggerMatching.toolCode(), trigTools.SwitchOnTriggerMatchingStandAlone.toolCode(), trigTools.SwitchOnTriggerMatchEmbedding.toolCode(), and trigTools.RemoveCleaningFromTriggerMatching.toolCode().

metTools.AddPfMET._parameters
private

Definition at line 61 of file metTools.py.

Referenced by photonTools.AddPhotonUserIsolation.toolCode(), muonTools.AddMuonUserIsolation.toolCode(), HiCoreTools.RestrictInputToAOD.toolCode(), trackTools.MakeAODTrackCandidates.toolCode(), metTools.AddPfMET.toolCode(), HiCoreTools.RemoveMCMatching.toolCode(), trackTools.MakePATTrackCandidates.toolCode(), trigTools.SwitchOnTrigger.toolCode(), HiCoreTools.RemoveAllPATObjectsBut.toolCode(), HiCoreTools.RemoveSpecificPATObjects.toolCode(), trigTools.SwitchOnTriggerStandAlone.toolCode(), trackTools.MakeTrackCandidates.toolCode(), HiCoreTools.RemoveCleaning.toolCode(), tauTools.AddTauCollection.toolCode(), trigTools.SwitchOnTriggerMatching.toolCode(), HiCoreTools.AddCleaning.toolCode(), trigTools.SwitchOnTriggerMatchingStandAlone.toolCode(), trigTools.SwitchOnTriggerMatchEmbedding.toolCode(), and trigTools.RemoveCleaningFromTriggerMatching.toolCode().