CMS 3D CMS Logo

List of all members | Public Member Functions | Private Member Functions | Private Attributes
trackingPlots.TimePerEventPlot Class Reference

Public Member Functions

def __init__ (self, name, timeHisto)
 
def __str__ (self)
 
def create (self, tdirectory)
 

Private Member Functions

def _create (self, tdirectory)
 

Private Attributes

 _cache
 
 _eventsHisto
 
 _name
 
 _timeHisto
 

Detailed Description

Definition at line 1562 of file trackingPlots.py.

Constructor & Destructor Documentation

def trackingPlots.TimePerEventPlot.__init__ (   self,
  name,
  timeHisto 
)

Definition at line 1563 of file trackingPlots.py.

1563  def __init__(self, name, timeHisto):
1564  self._name = name
1565  self._timeHisto = timeHisto
1566  self._eventsHisto = "path time_real"
1567  self._cache = {}
1568 
def __init__(self, name, timeHisto)

Member Function Documentation

def trackingPlots.TimePerEventPlot.__str__ (   self)

Definition at line 1569 of file trackingPlots.py.

References FP420HitsObject._name, TrackerHitsObject._name, PGeometricDet::Item._name, TrackingRecHitAlgorithm._name, LikelihoodSpecies._name, L1TMuon::PtAssignmentUnit._name, L1TMuon::PtRefinementUnit._name, LikelihoodPdfProduct._name, LikelihoodPdf._name, citk::IsolationConeDefinitionBase._name, Logger._name, hcaldqm::DQModule._name, DrellYanValidation._name, WValidation._name, HistoParams< T >._name, hcaldqm::flag::Flag._name, hcaldqm::quantity::Quantity._name, CutApplicatorBase._name, ElectronMVAEstimatorRun2Phys14NonTrig._name, PhotonMVAEstimatorRun2Spring15NonTrig._name, PhotonMVAEstimatorRun2Phys14NonTrig._name, ElectronMVAEstimatorRun2Spring15Trig._name, GeometricDetExtra._name, ElectronMVAEstimatorRun2Spring15NonTrig._name, HistoParams< TH2F >._name, HistoParams< TProfile2D >._name, Vispa.Views.PropertyView.Property._name, SequenceTypes.SequencePlaceholder._name, plotting.Subtract._name, plotting.Transform._name, plotting.FakeDuplicate._name, plotting.CutEfficiency._name, plotting.AggregateBins._name, plotting.AggregateHistos._name, plotting.ROC._name, trackingPlots.Iteration._name, trackingPlots.TimePerEventPlot._name, plotting.Plot._name, plotting.PlotGroup._name, plotting.PlotterFolder._name, and plotting.PlotterItem._name.

1569  def __str__(self):
1570  return self._name
1571 
def trackingPlots.TimePerEventPlot._create (   self,
  tdirectory 
)
private

Definition at line 1572 of file trackingPlots.py.

References trackingPlots.TimePerEventPlot._eventsHisto, plotting._getOrCreateObject(), FP420HitsObject._name, TrackerHitsObject._name, PGeometricDet::Item._name, TrackingRecHitAlgorithm._name, LikelihoodSpecies._name, L1TMuon::PtAssignmentUnit._name, L1TMuon::PtRefinementUnit._name, LikelihoodPdfProduct._name, LikelihoodPdf._name, citk::IsolationConeDefinitionBase._name, Logger._name, hcaldqm::DQModule._name, DrellYanValidation._name, WValidation._name, HistoParams< T >._name, hcaldqm::flag::Flag._name, hcaldqm::quantity::Quantity._name, CutApplicatorBase._name, ElectronMVAEstimatorRun2Phys14NonTrig._name, PhotonMVAEstimatorRun2Spring15NonTrig._name, PhotonMVAEstimatorRun2Phys14NonTrig._name, ElectronMVAEstimatorRun2Spring15Trig._name, GeometricDetExtra._name, ElectronMVAEstimatorRun2Spring15NonTrig._name, HistoParams< TH2F >._name, HistoParams< TProfile2D >._name, Vispa.Views.PropertyView.Property._name, SequenceTypes.SequencePlaceholder._name, plotting.Subtract._name, plotting.Transform._name, plotting.FakeDuplicate._name, plotting.CutEfficiency._name, plotting.AggregateBins._name, plotting.AggregateHistos._name, plotting.ROC._name, trackingPlots.Iteration._name, trackingPlots.TimePerEventPlot._name, plotting.Plot._name, plotting.PlotGroup._name, plotting.PlotterFolder._name, plotting.PlotterItem._name, trackingPlots.TimePerEventPlot._timeHisto, and python.rootplot.root2matplotlib.replace().

Referenced by trackingPlots.TimePerEventPlot.create().

1572  def _create(self, tdirectory):
1573  timeTh1 = plotting._getOrCreateObject(tdirectory, self._timeHisto)
1574  if timeTh1 is None:
1575  return None
1576 
1577  eventsTh1 = plotting._getOrCreateObject(tdirectory, self._eventsHisto)
1578  if eventsTh1 is None:
1579  return None
1580  nevents = eventsTh1.GetEntries()
1581  if nevents == 0:
1582  return None
1583 
1584  ret = timeTh1.Clone(self._name)
1585  xaxis = ret.GetXaxis()
1586  for i in xrange(1, ret.GetNbinsX()+1):
1587  ret.SetBinContent(i, ret.GetBinContent(i)/nevents)
1588  ret.SetBinError(i, ret.GetBinError(i)/nevents)
1589  xaxis.SetBinLabel(i, xaxis.GetBinLabel(i).replace(" (unscheduled)", ""))
1590  return ret
1591 
def _getOrCreateObject(tdirectory, nameOrCreator)
Definition: plotting.py:54
def replace(string, replacements)
def _create(self, tdirectory)
def trackingPlots.TimePerEventPlot.create (   self,
  tdirectory 
)

Definition at line 1592 of file trackingPlots.py.

References DTCache< T, Coll >._cache, mps_create_file_lists.FileListCreator._cache, L1MuDTTrackFinder._cache, L1MuBMTrackFinder._cache, DTTrig._cache, trackingPlots.TimePerEventPlot._cache, and trackingPlots.TimePerEventPlot._create().

1592  def create(self, tdirectory):
1593  path = tdirectory.GetPath()
1594  if path not in self._cache:
1595  self._cache[path] = self._create(tdirectory)
1596  return self._cache[path]
1597 
def create(self, tdirectory)
def _create(self, tdirectory)

Member Data Documentation

trackingPlots.TimePerEventPlot._cache
private
trackingPlots.TimePerEventPlot._eventsHisto
private

Definition at line 1566 of file trackingPlots.py.

Referenced by trackingPlots.TimePerEventPlot._create().

trackingPlots.TimePerEventPlot._name
private
trackingPlots.TimePerEventPlot._timeHisto
private