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

Public Member Functions

def __call__
 
def __init__
 
def getDefaultParameters
 
def toolCode
 

Private Attributes

 _comment
 
 _parameters
 

Static Private Attributes

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

Detailed Description

Create selected tracks and a candidate hypothesis on AOD:

Definition at line 237 of file trackTools.py.

Constructor & Destructor Documentation

def trackTools.MakeTrackCandidates.__init__ (   self)

Definition at line 243 of file trackTools.py.

References electronTools.AddElectronUserIsolation._defaultParameters, photonTools.AddPhotonUserIsolation._defaultParameters, editorTools.UserCodeTool._defaultParameters, muonTools.AddMuonUserIsolation._defaultParameters, metTools.AddTcMET._defaultParameters, trackTools.MakeAODTrackCandidates._defaultParameters, heavyIonTools.ConfigureHeavyIons._defaultParameters, coreTools.RestrictInputToAOD._defaultParameters, cmsswVersionTools.Run52xOn51xTrigger._defaultParameters, Vispa.Plugins.ConfigEditor.ToolDataAccessor.ImportTool._defaultParameters, heavyIonTools.ProductionDefaults._defaultParameters, editorTools.ChangeSource._defaultParameters, metTools.AddPfMET._defaultParameters, coreTools.RunOnData._defaultParameters, trackTools.MakePATTrackCandidates._defaultParameters, cmsswVersionTools.PickRelValInputFiles._defaultParameters, coreTools.RemoveMCMatching._defaultParameters, heavyIonTools.SelectionDefaults._defaultParameters, heavyIonTools.DisbaleMonteCarloDeps._defaultParameters, jetTools.RunBTagging._defaultParameters, trackTools.MakeTrackCandidates._defaultParameters, coreTools.RemoveAllPATObjectsBut._defaultParameters, coreTools.RemoveSpecificPATObjects._defaultParameters, tauTools.AddTauCollection._defaultParameters, coreTools.RemoveCleaning._defaultParameters, coreTools.AddCleaning._defaultParameters, jetTools.AddJetCollection._defaultParameters, jetTools.SwitchJetCollection._defaultParameters, jetTools.AddJetID._defaultParameters, jetTools.SetTagInfos._defaultParameters, jetTools.SwitchJetCorrLevels._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(), ConfigToolBase.ConfigToolBase.addParameter(), and edm::ParameterSet.addParameter().

244  def __init__(self):
245  ConfigToolBase.__init__(self)
246  self.addParameter(self._defaultParameters,'label','TrackCands', "output collection will be <'patAOD'+label>")
247  self.addParameter(self._defaultParameters,'tracks',cms.InputTag('generalTracks'), 'input tracks')
248  self.addParameter(self._defaultParameters,'particleType','pi+', 'particle type (for mass)')
249  self.addParameter(self._defaultParameters,'preselection','pt > 10', 'preselection cut on the AOD candidates')
250  self.addParameter(self._defaultParameters,'selection','pt > 10', 'selection cut on the PAT candidates (for the selectedLayer1Candidate collection)')
251  self.addParameter(self._defaultParameters,'isolation',{'tracker':0.3, 'ecalTowers':0.3, 'hcalTowers':0.3}, "isolation to use (as 'source': value of dR)\ntracker : as muon iso from tracks\necalTowers : as muon iso from calo tower\nhcalTowers : as muon iso from calo towers",allowedValues=['tracker','ecalTowers','hcalTowers'])
252  self.addParameter(self._defaultParameters,'isoDeposits',['tracker','ecalTowers','hcalTowers'], 'iso deposits')
253  self.addParameter(self._defaultParameters,'mcAs',None, "eplicate mc match as the one used by PAT on this AOD collection (None=no mc match); choose 'photon', 'electron', 'muon', 'tau','jet', 'met' as input string",Type=str,allowedValues=['photon', 'electron', 'muon', 'tau','jet', 'met', None], acceptNoneValue = True)
254 
255  self._parameters=copy.deepcopy(self._defaultParameters)
256  self._comment = ""

Member Function Documentation

def trackTools.MakeTrackCandidates.__call__ (   self,
  process,
  label = None,
  tracks = None,
  particleType = None,
  preselection = None,
  selection = None,
  isolation = None,
  isoDeposits = None,
  mcAs = None 
)

Definition at line 268 of file trackTools.py.

References electronTools.AddElectronUserIsolation._defaultParameters, photonTools.AddPhotonUserIsolation._defaultParameters, editorTools.UserCodeTool._defaultParameters, metTools.AddTcMET._defaultParameters, muonTools.AddMuonUserIsolation._defaultParameters, trackTools.MakeAODTrackCandidates._defaultParameters, heavyIonTools.ConfigureHeavyIons._defaultParameters, coreTools.RestrictInputToAOD._defaultParameters, cmsswVersionTools.Run52xOn51xTrigger._defaultParameters, Vispa.Plugins.ConfigEditor.ToolDataAccessor.ImportTool._defaultParameters, heavyIonTools.ProductionDefaults._defaultParameters, editorTools.ChangeSource._defaultParameters, metTools.AddPfMET._defaultParameters, coreTools.RunOnData._defaultParameters, trackTools.MakePATTrackCandidates._defaultParameters, cmsswVersionTools.PickRelValInputFiles._defaultParameters, coreTools.RemoveMCMatching._defaultParameters, heavyIonTools.SelectionDefaults._defaultParameters, heavyIonTools.DisbaleMonteCarloDeps._defaultParameters, jetTools.RunBTagging._defaultParameters, trackTools.MakeTrackCandidates._defaultParameters, coreTools.RemoveAllPATObjectsBut._defaultParameters, coreTools.RemoveSpecificPATObjects._defaultParameters, tauTools.AddTauCollection._defaultParameters, coreTools.RemoveCleaning._defaultParameters, coreTools.AddCleaning._defaultParameters, jetTools.AddJetCollection._defaultParameters, jetTools.SwitchJetCollection._defaultParameters, jetTools.AddJetID._defaultParameters, jetTools.SetTagInfos._defaultParameters, jetTools.SwitchJetCorrLevels._defaultParameters, SignedImpactParameter3D.apply(), gen::PhotosInterfaceBase.apply(), SignedTransverseImpactParameter.apply(), SignedDecayLength3D.apply(), SurveyParameters.apply(), FWPSetCellEditor.apply(), gen::PhotosInterface.apply(), gen::PhotosInterface53XLegacy.apply(), cmsswVersionTools.Run52xOn51xTrigger.apply(), FWGUIEventFilter.apply(), DeviationsFromFileSensor2D.apply(), BeamSpotAlignmentParameters.apply(), RigidBodyAlignmentParameters.apply(), ConfigToolBase.ConfigToolBase.apply(), AlignmentParameters.apply(), BowedSurfaceAlignmentParameters.apply(), Vispa.Plugins.ConfigEditor.ToolDataAccessor.ImportTool.apply(), Vispa.Plugins.ConfigEditor.ToolDataAccessor.ApplyTool.apply(), TwoBowedSurfacesAlignmentParameters.apply(), Vispa.Gui.BoxContentDialog.BoxContentDialog.apply(), reco::modules::TrackerTrackHitFilter::Rule.apply(), 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(), reco::Or< bool >.apply(), reco::Less< T >.apply(), cmsswVersionTools.PickRelValInputFiles.apply(), reco::LessEqual< T >.apply(), reco::More< T >.apply(), reco::MoreEqual< T >.apply(), reco::Equal< T >.apply(), jetTools.RunBTagging.apply(), ora::OraMainTable.setParameter(), ora::IMainTable.setParameter(), PedeReader.setParameter(), ora::PoolMainTable.setParameter(), fit::RootMinuit< Function >.setParameter(), and ConfigToolBase.ConfigToolBase.setParameter().

Referenced by trackTools.MakeTrackCandidates.getDefaultParameters().

269  mcAs = None) :
270  if label is None:
271  label=self._defaultParameters['label'].value
272  if tracks is None:
273  tracks=self._defaultParameters['tracks'].value
274  if particleType is None:
275  particleType=self._defaultParameters['particleType'].value
276  if preselection is None:
277  preselection=self._defaultParameters['preselection'].value
278  if selection is None:
279  selection=self._defaultParameters['selection'].value
280  if isolation is None:
281  isolation=self._defaultParameters['isolation'].value
282  if isoDeposits is None:
283  isoDeposits=self._defaultParameters['isoDeposits'].value
284  if mcAs is None:
285  mcAs=self._defaultParameters['mcAs'].value
286  self.setParameter('label',label)
287  self.setParameter('tracks',tracks)
288  self.setParameter('particleType',particleType)
289  self.setParameter('preselection',preselection)
290  self.setParameter('selection',selection)
291  self.setParameter('isolation',isolation)
292  self.setParameter('isoDeposits',isoDeposits)
293  self.setParameter('mcAs',mcAs,True)
294  self.apply(process)
def trackTools.MakeTrackCandidates.getDefaultParameters (   self)

Definition at line 257 of file trackTools.py.

References trackTools.MakeTrackCandidates.__call__(), electronTools.AddElectronUserIsolation._defaultParameters, photonTools.AddPhotonUserIsolation._defaultParameters, editorTools.UserCodeTool._defaultParameters, metTools.AddTcMET._defaultParameters, muonTools.AddMuonUserIsolation._defaultParameters, trackTools.MakeAODTrackCandidates._defaultParameters, heavyIonTools.ConfigureHeavyIons._defaultParameters, coreTools.RestrictInputToAOD._defaultParameters, cmsswVersionTools.Run52xOn51xTrigger._defaultParameters, Vispa.Plugins.ConfigEditor.ToolDataAccessor.ImportTool._defaultParameters, heavyIonTools.ProductionDefaults._defaultParameters, editorTools.ChangeSource._defaultParameters, metTools.AddPfMET._defaultParameters, coreTools.RunOnData._defaultParameters, trackTools.MakePATTrackCandidates._defaultParameters, cmsswVersionTools.PickRelValInputFiles._defaultParameters, coreTools.RemoveMCMatching._defaultParameters, heavyIonTools.SelectionDefaults._defaultParameters, heavyIonTools.DisbaleMonteCarloDeps._defaultParameters, jetTools.RunBTagging._defaultParameters, trackTools.MakeTrackCandidates._defaultParameters, coreTools.RemoveAllPATObjectsBut._defaultParameters, coreTools.RemoveSpecificPATObjects._defaultParameters, tauTools.AddTauCollection._defaultParameters, coreTools.RemoveCleaning._defaultParameters, coreTools.AddCleaning._defaultParameters, jetTools.AddJetCollection._defaultParameters, jetTools.SwitchJetCollection._defaultParameters, jetTools.AddJetID._defaultParameters, jetTools.SetTagInfos._defaultParameters, and jetTools.SwitchJetCorrLevels._defaultParameters.

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

258  def getDefaultParameters(self):
259  return self._defaultParameters
def trackTools.MakeTrackCandidates.toolCode (   self,
  process 
)

Definition at line 295 of file trackTools.py.

References editorTools.UserCodeTool._parameters, electronTools.AddElectronUserIsolation._parameters, photonTools.AddPhotonUserIsolation._parameters, heavyIonTools.ConfigureHeavyIons._parameters, metTools.AddTcMET._parameters, muonTools.AddMuonUserIsolation._parameters, coreTools.RestrictInputToAOD._parameters, trackTools.MakeAODTrackCandidates._parameters, Vispa.Plugins.ConfigEditor.ConfigDataAccessor.ConfigFolder._parameters, cmsswVersionTools.Run52xOn51xTrigger._parameters, Vispa.Plugins.ConfigEditor.ToolDataAccessor.ImportTool._parameters, heavyIonTools.ProductionDefaults._parameters, ConfigToolBase.ConfigToolBase._parameters, editorTools.ChangeSource._parameters, TAbsFitConstraint._parameters, metTools.AddPfMET._parameters, TAbsFitParticle._parameters, coreTools.RunOnData._parameters, trackTools.MakePATTrackCandidates._parameters, cmsswVersionTools.PickRelValInputFiles._parameters, coreTools.RemoveMCMatching._parameters, heavyIonTools.SelectionDefaults._parameters, heavyIonTools.DisbaleMonteCarloDeps._parameters, jetTools.RunBTagging._parameters, coreTools.RemoveAllPATObjectsBut._parameters, trackTools.MakeTrackCandidates._parameters, coreTools.RemoveSpecificPATObjects._parameters, coreTools.RemoveCleaning._parameters, tauTools.AddTauCollection._parameters, coreTools.AddCleaning._parameters, jetTools.AddJetCollection._parameters, jetTools.SwitchJetCollection._parameters, jetTools.AddJetID._parameters, jetTools.SetTagInfos._parameters, and jetTools.SwitchJetCorrLevels._parameters.

296  def toolCode(self, process):
297  label=self._parameters['label'].value
298  tracks=self._parameters['tracks'].value
299  particleType=self._parameters['particleType'].value
300  preselection=self._parameters['preselection'].value
301  selection=self._parameters['selection'].value
302  isolation=self._parameters['isolation'].value
303  isoDeposits=self._parameters['isoDeposits'].value
304  mcAs=self._parameters['mcAs'].value
305 
306  makeAODTrackCandidates(process,
307  tracks = tracks,
308  particleType = particleType,
309  candSelection = preselection,
310  label = label
311  )
312  makePATTrackCandidates(process,
313  label = label,
314  input = cms.InputTag('patAOD' + label),
315  isolation = isolation,
316  isoDeposits = isoDeposits,
317  mcAs = mcAs,
318  selection = selection
319  )
320 
321 makeTrackCandidates=MakeTrackCandidates()

Member Data Documentation

trackTools.MakeTrackCandidates._comment
private

Definition at line 255 of file trackTools.py.

Referenced by metUncertaintyTools.RunMEtUncertainties.__init__().

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

Definition at line 241 of file trackTools.py.

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

string trackTools.MakeTrackCandidates._label = 'makeTrackCandidates'
staticprivate

Definition at line 240 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.MakeTrackCandidates._parameters
private

Definition at line 254 of file trackTools.py.

Referenced by metUncertaintyTools.RunMEtUncertainties.__init__(), HiCoreTools.RestrictInputToAOD.toolCode(), HiCoreTools.RemoveMCMatching.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(), trigTools.RemoveCleaningFromTriggerMatching.toolCode(), and metUncertaintyTools.RunMEtUncertainties.toolCode().