CMS 3D CMS Logo

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__ (self, process, label=None, tracks=None, particleType=None, preselection=None, selection=None, isolation=None, isoDeposits=None, mcAs=None)
 
def __init__ (self)
 
def getDefaultParameters (self)
 
def toolCode (self, process)
 

Private Attributes

 _comment
 
 _parameters
 

Static Private Attributes

 _defaultParameters
 
 _label
 

Detailed Description

Create selected tracks and a candidate hypothesis on AOD:

Definition at line 233 of file trackTools.py.

Constructor & Destructor Documentation

def trackTools.MakeTrackCandidates.__init__ (   self)

Definition at line 239 of file trackTools.py.

References heavyIonTools.ConfigureHeavyIons._defaultParameters, metTools.AddMETCollection._defaultParameters, trackTools.MakeAODTrackCandidates._defaultParameters, coreTools.RunOnData._defaultParameters, heavyIonTools.ProductionDefaults._defaultParameters, cmsswVersionTools.PickRelValInputFiles._defaultParameters, coreTools.RemoveMCMatching._defaultParameters, trackTools.MakePATTrackCandidates._defaultParameters, heavyIonTools.SelectionDefaults._defaultParameters, heavyIonTools.DisbaleMonteCarloDeps._defaultParameters, trackTools.MakeTrackCandidates._defaultParameters, tauTools.AddTauCollection._defaultParameters, jetTools.AddJetCollection._defaultParameters, jetTools.SwitchJetCollection._defaultParameters, jetTools.UpdateJetCollection._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(), l1t::TriggerSystem.addParameter(), LutXml.addParameter(), ConfigToolBase.ConfigToolBase.addParameter(), and edm::ParameterSet.addParameter().

239  def __init__(self):
240  ConfigToolBase.__init__(self)
241  self.addParameter(self._defaultParameters,'label','TrackCands', "output collection will be <'patAOD'+label>")
242  self.addParameter(self._defaultParameters,'tracks',cms.InputTag('generalTracks'), 'input tracks')
243  self.addParameter(self._defaultParameters,'particleType','pi+', 'particle type (for mass)')
244  self.addParameter(self._defaultParameters,'preselection','pt > 10', 'preselection cut on the AOD candidates')
245  self.addParameter(self._defaultParameters,'selection','pt > 10', 'selection cut on the PAT candidates (for the selectedLayer1Candidate collection)')
246  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'])
247  self.addParameter(self._defaultParameters,'isoDeposits',['tracker','ecalTowers','hcalTowers'], 'iso deposits')
248  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)
249 
250  self._parameters=copy.deepcopy(self._defaultParameters)
251  self._comment = ""
252 

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

References heavyIonTools.ConfigureHeavyIons._defaultParameters, metTools.AddMETCollection._defaultParameters, trackTools.MakeAODTrackCandidates._defaultParameters, coreTools.RunOnData._defaultParameters, heavyIonTools.ProductionDefaults._defaultParameters, cmsswVersionTools.PickRelValInputFiles._defaultParameters, coreTools.RemoveMCMatching._defaultParameters, trackTools.MakePATTrackCandidates._defaultParameters, heavyIonTools.SelectionDefaults._defaultParameters, heavyIonTools.DisbaleMonteCarloDeps._defaultParameters, trackTools.MakeTrackCandidates._defaultParameters, tauTools.AddTauCollection._defaultParameters, jetTools.AddJetCollection._defaultParameters, jetTools.SwitchJetCollection._defaultParameters, jetTools.UpdateJetCollection._defaultParameters, jetTools.AddJetID._defaultParameters, jetTools.SetTagInfos._defaultParameters, SignedImpactParameter3D.apply(), gen::PhotosInterfaceBase.apply(), SignedTransverseImpactParameter.apply(), SignedDecayLength3D.apply(), DummyOOTPileupCorrection.apply(), MatrixReader.MatrixReader.apply, gen::PhotosppInterface.apply(), SurveyParameters.apply(), FWPSetCellEditor.apply(), gen::PhotosInterface.apply(), FWGUIEventFilter.apply(), DeviationsFromFileSensor2D.apply(), RigidBodyAlignmentParameters.apply(), BeamSpotAlignmentParameters.apply(), ConfigToolBase.ConfigToolBase.apply(), OOTPileupCorrData.apply(), AlignmentParameters.apply(), BowedSurfaceAlignmentParameters.apply(), Vispa.Plugins.ConfigEditor.ToolDataAccessor.ImportTool.apply(), Vispa.Plugins.ConfigEditor.ToolDataAccessor.ApplyTool.apply(), AbsOOTPileupCorrection.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(), cmsswVersionTools.PickRelValInputFiles.apply(), reco::And< bool >.apply(), models.RegExp.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< Num2, Len2, Dim2 >.apply(), ArrayND< Accumulator >.apply(), npstat::ArrayND< Num1, Len1, Dim1 >.apply(), ArrayND< Numeric, Len2, Dim2 >.apply(), npstat::ArrayND< Numeric >.apply(), npstat::ArrayND< Numeric, StackLen, StackDim >.apply(), ArrayND< Numeric, Len, Dim >.apply(), Config.ProcessModifier.apply(), PedeReader.setParameter(), QIE8Simulator.setParameter(), AbsElectronicODERHS.setParameter(), SiStripLorentzAngleCalibration.setParameter(), IntegratedCalibrationBase.setParameter(), SiPixelLorentzAngleCalibration.setParameter(), SiStripBackplaneCalibration.setParameter(), fit::RootMinuit< Function >.setParameter(), and ConfigToolBase.ConfigToolBase.setParameter().

Referenced by trackTools.MakeTrackCandidates.getDefaultParameters().

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

Definition at line 291 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, cmsswVersionTools.PickRelValInputFiles._parameters, coreTools.RemoveMCMatching._parameters, trackTools.MakePATTrackCandidates._parameters, heavyIonTools.SelectionDefaults._parameters, heavyIonTools.DisbaleMonteCarloDeps._parameters, trackTools.MakeTrackCandidates._parameters, tauTools.AddTauCollection._parameters, jetTools.AddJetCollection._parameters, jetTools.SwitchJetCollection._parameters, jetTools.UpdateJetCollection._parameters, jetTools.AddJetID._parameters, and jetTools.SetTagInfos._parameters.

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

Member Data Documentation

trackTools.MakeTrackCandidates._comment
private

Definition at line 251 of file trackTools.py.

trackTools.MakeTrackCandidates._defaultParameters
staticprivate

Definition at line 237 of file trackTools.py.

Referenced by HiCoreTools.RestrictInputToAOD.__call__(), runJetUncertainties.RunJetUncertainties.__call__(), editorTools.ChangeSource.__call__(), HiCoreTools.RemoveMCMatching.__call__(), trigTools.SwitchOnTrigger.__call__(), runMETCorrectionsAndUncertainties.RunMETCorrectionsAndUncertainties.__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__(), editorTools.UserCodeTool.__init__(), HiCoreTools.RestrictInputToAOD.__init__(), runJetUncertainties.RunJetUncertainties.__init__(), runMETCorrectionsAndUncertainties.RunMETCorrectionsAndUncertainties.__init__(), Vispa.Plugins.ConfigEditor.ToolDataAccessor.ImportTool.__init__(), editorTools.ChangeSource.__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__(), ConfigToolBase.ConfigToolBase.dumpPython(), ConfigToolBase.ConfigToolBase.getAllowedValues(), HiCoreTools.RestrictInputToAOD.getDefaultParameters(), editorTools.ChangeSource.getDefaultParameters(), HiCoreTools.RemoveMCMatching.getDefaultParameters(), trigTools.SwitchOnTrigger.getDefaultParameters(), runMETCorrectionsAndUncertainties.RunMETCorrectionsAndUncertainties.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(), runMETCorrectionsAndUncertainties.RunMETCorrectionsAndUncertainties.initializeInputTag(), ConfigToolBase.ConfigToolBase.reset(), and ConfigToolBase.ConfigToolBase.setParameter().

trackTools.MakeTrackCandidates._parameters
private

Definition at line 250 of file trackTools.py.

Referenced by runMETCorrectionsAndUncertainties.RunMETCorrectionsAndUncertainties.__call__(), runMETCorrectionsAndUncertainties.RunMETCorrectionsAndUncertainties.ak4JetReclustering(), runMETCorrectionsAndUncertainties.RunMETCorrectionsAndUncertainties.createMVAMETModule(), runMETCorrectionsAndUncertainties.RunMETCorrectionsAndUncertainties.createSmearedJetModule(), runMETCorrectionsAndUncertainties.RunMETCorrectionsAndUncertainties.extractMET(), runMETCorrectionsAndUncertainties.RunMETCorrectionsAndUncertainties.getCorrectedMET(), runMETCorrectionsAndUncertainties.RunMETCorrectionsAndUncertainties.getUnclusteredVariationsForMVAMET(), runMETCorrectionsAndUncertainties.RunMETCorrectionsAndUncertainties.getVariations(), runMETCorrectionsAndUncertainties.RunMETCorrectionsAndUncertainties.jetCleaning(), runMETCorrectionsAndUncertainties.RunMETCorrectionsAndUncertainties.jetConfiguration(), runMETCorrectionsAndUncertainties.RunMETCorrectionsAndUncertainties.miniAODConfiguration(), runMETCorrectionsAndUncertainties.RunMETCorrectionsAndUncertainties.miniAODConfigurationPost(), runMETCorrectionsAndUncertainties.RunMETCorrectionsAndUncertainties.produceMET(), runMETCorrectionsAndUncertainties.RunMETCorrectionsAndUncertainties.recomputeRawMetFromPfcs(), HiCoreTools.RestrictInputToAOD.toolCode(), runJetUncertainties.RunJetUncertainties.toolCode(), HiCoreTools.RemoveMCMatching.toolCode(), trigTools.SwitchOnTrigger.toolCode(), HiCoreTools.RemoveAllPATObjectsBut.toolCode(), HiCoreTools.RemoveSpecificPATObjects.toolCode(), trigTools.SwitchOnTriggerStandAlone.toolCode(), runMETCorrectionsAndUncertainties.RunMETCorrectionsAndUncertainties.toolCode(), trackTools.MakeTrackCandidates.toolCode(), HiCoreTools.RemoveCleaning.toolCode(), trigTools.SwitchOnTriggerMatching.toolCode(), HiCoreTools.AddCleaning.toolCode(), trigTools.SwitchOnTriggerMatchingStandAlone.toolCode(), trigTools.SwitchOnTriggerMatchEmbedding.toolCode(), and runMETCorrectionsAndUncertainties.RunMETCorrectionsAndUncertainties.updateJECs().