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
trackTools.MakeAODTrackCandidates Class Reference
Inheritance diagram for trackTools.MakeAODTrackCandidates:

Public Member Functions

def __call__
 
def __init__
 
def getDefaultParameters
 
def toolCode
 

Private Attributes

 _comment
 
 _parameters
 

Static Private Attributes

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

Detailed Description

Create selected tracks and a candidate hypothesis on AOD:

Definition at line 4 of file trackTools.py.

Constructor & Destructor Documentation

def trackTools.MakeAODTrackCandidates.__init__ (   self)

Definition at line 11 of file trackTools.py.

References electronTools.AddElectronUserIsolation._defaultParameters, photonTools.AddPhotonUserIsolation._defaultParameters, python.editorTools.UserCodeTool._defaultParameters, muonTools.AddMuonUserIsolation._defaultParameters, metTools.AddTcMET._defaultParameters, trackTools.MakeAODTrackCandidates._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, tauTools.AddTauCollection._defaultParameters, coreTools.RemoveCleaning._defaultParameters, coreTools.AddCleaning._defaultParameters, jetTools.SwitchJetCollection._defaultParameters, cmsswVersionTools.SwitchJetCollection35X._defaultParameters, jetTools.AddJetID._defaultParameters, jetTools.SetTagInfos._defaultParameters, cmsswVersionTools.PickRelValInputFiles._defaultParameters, root::helper::RootFunctionAdapter< F, args >.addParameter(), root::helper::RootFunctionHelper< F, args, Tag >.addParameter(), ParameterMgr.addParameter(), fit::RootMinuit< Function >.addParameter(), PythonParameterSet.addParameter(), LutXml.addParameter(), python.ConfigToolBase.ConfigToolBase.addParameter(), and edm::ParameterSet.addParameter().

11 
12  def __init__(self):
13  ConfigToolBase.__init__(self)
14  self.addParameter(self._defaultParameters,'label','TrackCands', "output collection will be <'patAOD'+label>")
15  self.addParameter(self._defaultParameters,'tracks',cms.InputTag('generalTracks'), 'input tracks')
16  self.addParameter(self._defaultParameters,'particleType','pi+', 'particle type (for mass)')
17  self.addParameter(self._defaultParameters,'candSelection','pt > 10', 'preselection cut on the candidates')
18 
19  self._parameters=copy.deepcopy(self._defaultParameters)
20  self._comment = ""

Member Function Documentation

def trackTools.MakeAODTrackCandidates.__call__ (   self,
  process,
  label = None,
  tracks = None,
  particleType = None,
  candSelection = None 
)

Definition at line 28 of file trackTools.py.

References electronTools.AddElectronUserIsolation._defaultParameters, photonTools.AddPhotonUserIsolation._defaultParameters, metTools.AddTcMET._defaultParameters, muonTools.AddMuonUserIsolation._defaultParameters, python.editorTools.UserCodeTool._defaultParameters, trackTools.MakeAODTrackCandidates._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, tauTools.AddTauCollection._defaultParameters, coreTools.RemoveCleaning._defaultParameters, coreTools.AddCleaning._defaultParameters, jetTools.SwitchJetCollection._defaultParameters, cmsswVersionTools.SwitchJetCollection35X._defaultParameters, jetTools.AddJetID._defaultParameters, jetTools.SetTagInfos._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().

Referenced by trackTools.MakeAODTrackCandidates.getDefaultParameters().

28 
29  candSelection = None) :
30  if label is None:
31  label=self._defaultParameters['label'].value
32  if tracks is None:
33  tracks=self._defaultParameters['tracks'].value
34  if particleType is None:
35  particleType=self._defaultParameters['particleType'].value
36  if candSelection is None:
37  candSelection=self._defaultParameters['candSelection'].value
38  self.setParameter('label',label)
39  self.setParameter('tracks',tracks)
40  self.setParameter('particleType',particleType)
41  self.setParameter('candSelection',candSelection)
42  self.apply(process)
def trackTools.MakeAODTrackCandidates.getDefaultParameters (   self)

Definition at line 21 of file trackTools.py.

References trackTools.MakeAODTrackCandidates.__call__(), electronTools.AddElectronUserIsolation._defaultParameters, photonTools.AddPhotonUserIsolation._defaultParameters, metTools.AddTcMET._defaultParameters, muonTools.AddMuonUserIsolation._defaultParameters, trackTools.MakeAODTrackCandidates._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, tauTools.AddTauCollection._defaultParameters, coreTools.RemoveCleaning._defaultParameters, coreTools.AddCleaning._defaultParameters, jetTools.SwitchJetCollection._defaultParameters, cmsswVersionTools.SwitchJetCollection35X._defaultParameters, jetTools.AddJetID._defaultParameters, jetTools.SetTagInfos._defaultParameters, and cmsswVersionTools.PickRelValInputFiles._defaultParameters.

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

21 
22  def getDefaultParameters(self):
23  return self._defaultParameters
def trackTools.MakeAODTrackCandidates.toolCode (   self,
  process 
)

Definition at line 43 of file trackTools.py.

References python.editorTools.UserCodeTool._parameters, electronTools.AddElectronUserIsolation._parameters, photonTools.AddPhotonUserIsolation._parameters, heavyIonTools.ConfigureHeavyIons._parameters, metTools.AddTcMET._parameters, muonTools.AddMuonUserIsolation._parameters, coreTools.RestrictInputToAOD._parameters, trackTools.MakeAODTrackCandidates._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, tauTools.AddTauCollection._parameters, coreTools.RemoveCleaning._parameters, coreTools.AddCleaning._parameters, jetTools.SwitchJetCollection._parameters, cmsswVersionTools.SwitchJetCollection35X._parameters, jetTools.AddJetID._parameters, jetTools.SetTagInfos._parameters, and cmsswVersionTools.PickRelValInputFiles._parameters.

43 
44  def toolCode(self, process):
45  label=self._parameters['label'].value
46  tracks=self._parameters['tracks'].value
47  particleType=self._parameters['particleType'].value
48  candSelection=self._parameters['candSelection'].value
49 
50  process.load("SimGeneral.HepPDTESSource.pythiapdt_cfi");
51  ## add ChargedCandidateProducer from track
52  setattr(process, 'patAOD' + label + 'Unfiltered', cms.EDProducer("ConcreteChargedCandidateProducer",
53  src = tracks,
54  particleType = cms.string(particleType)
55  )
56  )
57  ## add CandViewSelector with preselection string
58  setattr(process, 'patAOD' + label, cms.EDFilter("CandViewSelector",
59  src = cms.InputTag('patAOD' + label + 'Unfiltered'),
60  cut = cms.string(candSelection)
61  )
62  )
63  ## run production of TrackCandidates at the very beginning of the sequence
64  process.patDefaultSequence.replace(process.patCandidates, getattr(process, 'patAOD' + label + 'Unfiltered') * getattr(process, 'patAOD' + label) * process.patCandidates)
65 
66 makeAODTrackCandidates=MakeAODTrackCandidates()
67 

Member Data Documentation

trackTools.MakeAODTrackCandidates._comment
private

Definition at line 19 of file trackTools.py.

tuple trackTools.MakeAODTrackCandidates._defaultParameters = dicttypes.SortedKeysDict()
staticprivate

Definition at line 9 of file trackTools.py.

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

string trackTools.MakeAODTrackCandidates._label = 'makeAODTrackCandidates'
staticprivate

Definition at line 8 of file trackTools.py.

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

trackTools.MakeAODTrackCandidates._parameters
private

Definition at line 18 of file trackTools.py.

Referenced by HiCoreTools.RestrictInputToAOD.toolCode(), trackTools.MakeAODTrackCandidates.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(), trigTools.SwitchOnTriggerMatching.toolCode(), HiCoreTools.AddCleaning.toolCode(), trigTools.SwitchOnTriggerMatchingStandAlone.toolCode(), trigTools.SwitchOnTriggerMatchEmbedding.toolCode(), and trigTools.RemoveCleaningFromTriggerMatching.toolCode().