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 224 of file trackTools.py.

Constructor & Destructor Documentation

def trackTools.MakeTrackCandidates.__init__ (   self)

Definition at line 230 of file trackTools.py.

References metTools.AddMETCollection._defaultParameters, editorTools.UserCodeTool._defaultParameters, trackTools.MakeAODTrackCandidates._defaultParameters, heavyIonTools.ConfigureHeavyIons._defaultParameters, coreTools.RunOnData._defaultParameters, jetTools.AddJetCollection._defaultParameters, Vispa.Plugins.ConfigEditor.ToolDataAccessor.ImportTool._defaultParameters, heavyIonTools.ProductionDefaults._defaultParameters, editorTools.ChangeSource._defaultParameters, cmsswVersionTools.PickRelValInputFiles._defaultParameters, coreTools.RemoveMCMatching._defaultParameters, trackTools.MakePATTrackCandidates._defaultParameters, heavyIonTools.SelectionDefaults._defaultParameters, heavyIonTools.DisbaleMonteCarloDeps._defaultParameters, trackTools.MakeTrackCandidates._defaultParameters, tauTools.AddTauCollection._defaultParameters, jetTools.SwitchJetCollection._defaultParameters, jetTools.AddJetID._defaultParameters, jetTools.SetTagInfos._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().

231  def __init__(self):
232  ConfigToolBase.__init__(self)
233  self.addParameter(self._defaultParameters,'label','TrackCands', "output collection will be <'patAOD'+label>")
234  self.addParameter(self._defaultParameters,'tracks',cms.InputTag('generalTracks'), 'input tracks')
235  self.addParameter(self._defaultParameters,'particleType','pi+', 'particle type (for mass)')
236  self.addParameter(self._defaultParameters,'preselection','pt > 10', 'preselection cut on the AOD candidates')
237  self.addParameter(self._defaultParameters,'selection','pt > 10', 'selection cut on the PAT candidates (for the selectedLayer1Candidate collection)')
238  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'])
239  self.addParameter(self._defaultParameters,'isoDeposits',['tracker','ecalTowers','hcalTowers'], 'iso deposits')
240  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)
242  self._parameters=copy.deepcopy(self._defaultParameters)
243  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 255 of file trackTools.py.

References metTools.AddMETCollection._defaultParameters, trackTools.MakeAODTrackCandidates._defaultParameters, editorTools.UserCodeTool._defaultParameters, heavyIonTools.ConfigureHeavyIons._defaultParameters, coreTools.RunOnData._defaultParameters, jetTools.AddJetCollection._defaultParameters, Vispa.Plugins.ConfigEditor.ToolDataAccessor.ImportTool._defaultParameters, heavyIonTools.ProductionDefaults._defaultParameters, editorTools.ChangeSource._defaultParameters, cmsswVersionTools.PickRelValInputFiles._defaultParameters, coreTools.RemoveMCMatching._defaultParameters, trackTools.MakePATTrackCandidates._defaultParameters, heavyIonTools.SelectionDefaults._defaultParameters, heavyIonTools.DisbaleMonteCarloDeps._defaultParameters, trackTools.MakeTrackCandidates._defaultParameters, tauTools.AddTauCollection._defaultParameters, jetTools.SwitchJetCollection._defaultParameters, jetTools.AddJetID._defaultParameters, jetTools.SetTagInfos._defaultParameters, SignedImpactParameter3D.apply(), gen::PhotosInterfaceBase.apply(), SignedTransverseImpactParameter.apply(), SignedDecayLength3D.apply(), MatrixReader.MatrixReader.apply, DummyOOTPileupCorrection.apply(), gen::PhotosppInterface.apply(), SurveyParameters.apply(), FWPSetCellEditor.apply(), gen::PhotosInterface.apply(), FWGUIEventFilter.apply(), DeviationsFromFileSensor2D.apply(), RigidBodyAlignmentParameters.apply(), BeamSpotAlignmentParameters.apply(), MatRepSparse< T, D1, D2, S, F >.apply(), ConfigToolBase.ConfigToolBase.apply(), BowedSurfaceAlignmentParameters.apply(), OOTPileupCorrData.apply(), AlignmentParameters.apply(), Vispa.Plugins.ConfigEditor.ToolDataAccessor.ImportTool.apply(), Vispa.Plugins.ConfigEditor.ToolDataAccessor.ApplyTool.apply(), AbsOOTPileupCorrection.apply(), TwoBowedSurfacesAlignmentParameters.apply(), reco::modules::TrackerTrackHitFilter::Rule.apply(), Vispa.Gui.BoxContentDialog.BoxContentDialog.apply(), Vispa.Plugins.ConfigEditor.ToolDialog.ToolDialog.apply(), reco::Add< T >.apply(), reco::Sub< T >.apply(), reco::Mul< T >.apply(), reco::Div< T >.apply(), cmsswVersionTools.PickRelValInputFiles.apply(), reco::And< bool >.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(), ArrayND< Numeric, Len, Dim >.apply(), ArrayND< Accumulator >.apply(), npstat::ArrayND< Numeric >.apply(), npstat::ArrayND< Num1, Len1, Dim1 >.apply(), ArrayND< Num2, Len2, Dim2 >.apply(), ArrayND< Numeric, Len2, Dim2 >.apply(), npstat::ArrayND< Numeric, StackLen, StackDim >.apply(), ora::OraMainTable.setParameter(), ora::IMainTable.setParameter(), PedeReader.setParameter(), ora::PoolMainTable.setParameter(), IntegratedCalibrationBase.setParameter(), SiStripLorentzAngleCalibration.setParameter(), SiPixelLorentzAngleCalibration.setParameter(), SiStripBackplaneCalibration.setParameter(), fit::RootMinuit< Function >.setParameter(), and ConfigToolBase.ConfigToolBase.setParameter().

Referenced by trackTools.MakeTrackCandidates.getDefaultParameters().

256  mcAs = None) :
257  if label is None:
258  label=self._defaultParameters['label'].value
259  if tracks is None:
260  tracks=self._defaultParameters['tracks'].value
261  if particleType is None:
262  particleType=self._defaultParameters['particleType'].value
263  if preselection is None:
264  preselection=self._defaultParameters['preselection'].value
265  if selection is None:
266  selection=self._defaultParameters['selection'].value
267  if isolation is None:
268  isolation=self._defaultParameters['isolation'].value
269  if isoDeposits is None:
270  isoDeposits=self._defaultParameters['isoDeposits'].value
271  if mcAs is None:
272  mcAs=self._defaultParameters['mcAs'].value
273  self.setParameter('label',label)
274  self.setParameter('tracks',tracks)
275  self.setParameter('particleType',particleType)
276  self.setParameter('preselection',preselection)
277  self.setParameter('selection',selection)
278  self.setParameter('isolation',isolation)
279  self.setParameter('isoDeposits',isoDeposits)
280  self.setParameter('mcAs',mcAs,True)
281  self.apply(process)
def trackTools.MakeTrackCandidates.getDefaultParameters (   self)

Definition at line 244 of file trackTools.py.

References trackTools.MakeTrackCandidates.__call__(), metTools.AddMETCollection._defaultParameters, trackTools.MakeAODTrackCandidates._defaultParameters, editorTools.UserCodeTool._defaultParameters, heavyIonTools.ConfigureHeavyIons._defaultParameters, coreTools.RunOnData._defaultParameters, jetTools.AddJetCollection._defaultParameters, Vispa.Plugins.ConfigEditor.ToolDataAccessor.ImportTool._defaultParameters, heavyIonTools.ProductionDefaults._defaultParameters, editorTools.ChangeSource._defaultParameters, cmsswVersionTools.PickRelValInputFiles._defaultParameters, coreTools.RemoveMCMatching._defaultParameters, trackTools.MakePATTrackCandidates._defaultParameters, heavyIonTools.SelectionDefaults._defaultParameters, heavyIonTools.DisbaleMonteCarloDeps._defaultParameters, trackTools.MakeTrackCandidates._defaultParameters, tauTools.AddTauCollection._defaultParameters, jetTools.SwitchJetCollection._defaultParameters, jetTools.AddJetID._defaultParameters, and jetTools.SetTagInfos._defaultParameters.

245  def getDefaultParameters(self):
246  return self._defaultParameters
def trackTools.MakeTrackCandidates.toolCode (   self,
  process 
)

Definition at line 282 of file trackTools.py.

References editorTools.UserCodeTool._parameters, heavyIonTools.ConfigureHeavyIons._parameters, coreTools.RunOnData._parameters, trackTools.MakeAODTrackCandidates._parameters, metTools.AddMETCollection._parameters, Vispa.Plugins.ConfigEditor.ConfigDataAccessor.ConfigFolder._parameters, Vispa.Plugins.ConfigEditor.ToolDataAccessor.ImportTool._parameters, heavyIonTools.ProductionDefaults._parameters, ConfigToolBase.ConfigToolBase._parameters, editorTools.ChangeSource._parameters, TAbsFitConstraint._parameters, TAbsFitParticle._parameters, jetTools.AddJetCollection._parameters, cmsswVersionTools.PickRelValInputFiles._parameters, coreTools.RemoveMCMatching._parameters, trackTools.MakePATTrackCandidates._parameters, heavyIonTools.SelectionDefaults._parameters, heavyIonTools.DisbaleMonteCarloDeps._parameters, trackTools.MakeTrackCandidates._parameters, tauTools.AddTauCollection._parameters, jetTools.SwitchJetCollection._parameters, jetTools.AddJetID._parameters, and jetTools.SetTagInfos._parameters.

283  def toolCode(self, process):
284  label=self._parameters['label'].value
285  tracks=self._parameters['tracks'].value
286  particleType=self._parameters['particleType'].value
287  preselection=self._parameters['preselection'].value
288  selection=self._parameters['selection'].value
289  isolation=self._parameters['isolation'].value
290  isoDeposits=self._parameters['isoDeposits'].value
291  mcAs=self._parameters['mcAs'].value
292 
293  makeAODTrackCandidates(process,
294  tracks = tracks,
295  particleType = particleType,
296  candSelection = preselection,
297  label = label
298  )
299  makePATTrackCandidates(process,
300  label = label,
301  input = cms.InputTag('patAOD' + label),
302  isolation = isolation,
303  isoDeposits = isoDeposits,
304  mcAs = mcAs,
305  selection = selection
306  )
307 
308 makeTrackCandidates=MakeTrackCandidates()

Member Data Documentation

trackTools.MakeTrackCandidates._comment
private

Definition at line 242 of file trackTools.py.

Referenced by metUncertaintyTools.RunMEtUncertainties.__init__().

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

Definition at line 228 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__(), trigTools.SwitchOnTriggerMatching.__call__(), HiCoreTools.RemoveCleaning.__call__(), HiCoreTools.AddCleaning.__call__(), trigTools.SwitchOnTriggerMatchingStandAlone.__call__(), trigTools.SwitchOnTriggerMatchEmbedding.__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__(), trigTools.SwitchOnTriggerMatching.__init__(), HiCoreTools.RemoveCleaning.__init__(), HiCoreTools.AddCleaning.__init__(), trigTools.SwitchOnTriggerMatchingStandAlone.__init__(), trigTools.SwitchOnTriggerMatchEmbedding.__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(), trigTools.SwitchOnTriggerMatching.getDefaultParameters(), HiCoreTools.RemoveCleaning.getDefaultParameters(), HiCoreTools.AddCleaning.getDefaultParameters(), trigTools.SwitchOnTriggerMatchingStandAlone.getDefaultParameters(), trigTools.SwitchOnTriggerMatchEmbedding.getDefaultParameters(), ConfigToolBase.ConfigToolBase.reset(), and ConfigToolBase.ConfigToolBase.setParameter().

string trackTools.MakeTrackCandidates._label = 'makeTrackCandidates'
staticprivate

Definition at line 227 of file trackTools.py.

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

trackTools.MakeTrackCandidates._parameters
private

Definition at line 241 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(), and metUncertaintyTools.RunMEtUncertainties.toolCode().