CMS 3D CMS Logo

List of all members | Public Member Functions | Public Attributes | Private Member Functions
python.rootplot.utilities.Hist Class Reference
Inheritance diagram for python.rootplot.utilities.Hist:
python.rootplot.root2matplotlib.Hist

Public Member Functions

def __add__ (self, b)
 
def __div__ (self, denominator)
 
def __getitem__ (self, index)
 
def __init__ (self, hist, label="__nolabel__", name=None, title=None, xlabel=None, ylabel=None)
 
def __iter__ (self)
 
def __len__ (self)
 
def __setitem__ (self, index, value)
 
def __sub__ (self, b)
 
def av_xerr (self)
 
def av_yerr (self)
 
def delete_bin (self, index)
 
def divide (self, denominator)
 
def divide_wilson (self, denominator)
 
def min (self, threshold=None)
 
def scale (self, factor)
 
def TGraph (self, name=None)
 
def TH1F (self, name=None)
 

Public Attributes

 binlabels
 
 entries
 
 label
 
 name
 
 nbins
 
 overflow
 
 rootclass
 
 title
 
 underflow
 
 width
 
 x
 
 xedges
 
 xerr
 
 xlabel
 
 y
 
 yerr
 
 ylabel
 

Private Member Functions

def __init_TGraph (self, hist)
 
def __init_TH1 (self, hist)
 

Detailed Description

A container to hold the parameters from a ROOT histogram.

Definition at line 106 of file utilities.py.

Constructor & Destructor Documentation

def python.rootplot.utilities.Hist.__init__ (   self,
  hist,
  label = "__nolabel__",
  name = None,
  title = None,
  xlabel = None,
  ylabel = None 
)

Definition at line 109 of file utilities.py.

References python.rootplot.utilities.Hist.__init_TGraph(), and python.rootplot.utilities.Hist.__init_TH1().

109  name=None, title=None, xlabel=None, ylabel=None):
110  try:
111  hist.GetNbinsX()
112  self.__init_TH1(hist)
113  except AttributeError:
114  try:
115  hist.GetN()
116  self.__init_TGraph(hist)
117  except AttributeError:
118  raise TypeError("%s is not a 1D histogram or TGraph" % hist)
119  self.rootclass = hist.ClassName()
120  self.name = name or hist.GetName()
121  self.title = title or hist.GetTitle().split(';')[0]
122  self.xlabel = xlabel or hist.GetXaxis().GetTitle()
123  self.ylabel = ylabel or hist.GetYaxis().GetTitle()
124  self.label = label
def __init_TH1(self, hist)
Definition: utilities.py:125
def __init_TGraph(self, hist)
Definition: utilities.py:144
double split
Definition: MVATrainer.cc:139

Member Function Documentation

def python.rootplot.utilities.Hist.__add__ (   self,
  b 
)
Return the sum of self and b: x.__add__(y) <==> x + y

Definition at line 164 of file utilities.py.

164  def __add__(self, b):
165  """Return the sum of self and b: x.__add__(y) <==> x + y"""
166  c = copy.copy(self)
167  for i in range(len(self)):
168  c.y[i] += b.y[i]
169  c.yerr[0][i] += b.yerr[0][i]
170  c.yerr[1][i] += b.yerr[1][i]
171  c.overflow += b.overflow
172  c.underflow += b.underflow
173  return c
def python.rootplot.utilities.Hist.__div__ (   self,
  denominator 
)

Definition at line 184 of file utilities.py.

References Histos.divide(), FlavourHistograms< T >.divide(), FlavourHistograms2D< T, G >.divide(), cuy.FindIssue.divide, and python.rootplot.utilities.Hist.divide().

184  def __div__(self, denominator):
185  return self.divide(denominator)
def divide(self, denominator)
Definition: utilities.py:269
def __div__(self, denominator)
Definition: utilities.py:184
def python.rootplot.utilities.Hist.__getitem__ (   self,
  index 
)
def python.rootplot.utilities.Hist.__init_TGraph (   self,
  hist 
)
private

Definition at line 144 of file utilities.py.

References python.rootplot.utilities.Hist.binlabels, protobuf_DQMServices_2fCore_2fsrc_2fROOTFilePB_2eproto::TableStruct.entries, SiStripMiscalibrate::Entry.entries, dataLoader.DataLoader.entries, SiStripPI::Entry.entries, LA_Filler_Fitter::Result.entries, python.rootplot.utilities.Hist2D.entries, TkOffTreeVariables.entries, PhysicsTools::TrainProcessor::SigBkg.entries, python.rootplot.utilities.Hist.entries, PhysicsTools::Calibration::MVAComputerContainer.entries, SiStripPI.max, TriggerDQMBase::MEbinning.nbins, MEbinning.nbins, sistrip::EnsembleCalibrationLA.nbins, MEPSet.nbins, SummationStep.nbins, ExpressionHisto< T >.nbins, JetMonitor::MEbinning.nbins, METMonitor::MEbinning.nbins, HTMonitor::MEHTbinning.nbins, HistogramGenerator.nbins, DiDispStaMuonMonitor::MEbinning.nbins, NoBPTXMonitor::NoBPTXbinning.nbins, ecaldqm::binning::AxisSpecs.nbins, PlotAlignmentValidation::DMRPlotInfo.nbins, python.rootplot.utilities.Hist.nbins, MuonAlignment.nbins, HLTObjectsMonitor::MEbinning.nbins, MuScleFitUtils.nbins, MuonAlignmentAnalyzer.nbins, PhysicsTools::TrainProcessor::SigBkg.overflow, python.rootplot.utilities.Hist.overflow, PhysicsTools::TrainProcessor::SigBkg.underflow, python.rootplot.utilities.Hist.underflow, TmModule.width, DDTIDAxialCableAlgo.width, DDTECAxialCableAlgo.width, reco::CastorJetID.width, function::ZMuStandaloneFunction.width, function::ZMuMuFunction.width, function::ZMuMuScaledFunction.width, btag::SimpleMatrix< T >.width, function::ZMuTrackFunction.width, function::ZMuStandaloneScaledFunction.width, function::ZMuTrackScaledFunction.width, function::ZMuTrackScaledNormalBack.width, presentation.PageLayout.width, ProcNormalize::Map.width, DaqFakeReader.width, ProcLikelihood::SplinePDF.width, SiStripMonitorCluster::ClusterProperties.width, python.rootplot.utilities.Hist.width, TkAlMap.TkAlMap.width, dqmTnP::VoigtianPlusExponentialFitter.width, svgfig.Plot.width, svgfig.Frame.width, svgfig.Dots.width, reco::MuonRPCHitMatch.x, RPFlatParams::EP.x, stAPVGain.x, TkLayerMap::XYbin.x, TwoBodyDecayParameters.x, SimplePixel.x, reco::MuonChamberMatch.x, online::BeamSpot_v1.x, HGCal_helpers::Coordinates.x, LHCInterpolatedOpticalFunctionsSet::Kinematics.x, Phase2ITPixelCluster::Pixel.x, reco::MuonSegmentMatch.x, SiPixelCluster::Pixel.x, PhiInterval.x, VertexType.x, Pixinfo.x, Hit.x, MonitorTrackResidualsBase< pixel_or_strip >::HistoXY.x, PixelModule.x, Clust.x, l1t::emtf::AMC13Header.x, python.rootplot.utilities.Hist2D.x, PixelUnpackingRegions::Module.x, Rechit.x, hit.x, CTPPSLocalTrackLite.x, MuonGeometryArrange::MGACollection.x, python.rootplot.utilities.Hist.x, BeamSpotOnlineRaw_v4.x, MuScleFitUtils.x, perftools::detail::Hist.x, edmStreamStallGrapher.Point.x, svgfig.Plot.x, svgfig.Frame.x, svgfig.Text.x, svgfig.TextGlobal.x, svgfig.VLine.x, python.rootplot.utilities.Hist2D.xedges, python.rootplot.utilities.Hist.xedges, PrimaryVertexMonitor.xerr, python.rootplot.utilities.Hist.xerr, RPFlatParams::EP.y, stAPVGain.y, TwoBodyDecayParameters.y, TkLayerMap::XYbin.y, SimplePixel.y, reco::MuonChamberMatch.y, online::BeamSpot_v1.y, HGCal_helpers::Coordinates.y, Phase2ITPixelCluster::Pixel.y, LHCInterpolatedOpticalFunctionsSet::Kinematics.y, reco::MuonSegmentMatch.y, PhiInterval.y, SiPixelCluster::Pixel.y, VertexType.y, Pixinfo.y, Hit.y, MonitorTrackResidualsBase< pixel_or_strip >::HistoXY.y, PixelModule.y, Clust.y, python.rootplot.utilities.Hist2D.y, PixelUnpackingRegions::Module.y, Rechit.y, hit.y, MuonGeometryArrange::MGACollection.y, CTPPSLocalTrackLite.y, python.rootplot.utilities.Hist.y, python.rootplot.root2matplotlib.Hist.y, BeamSpotOnlineRaw_v4.y, Exhume::CrossSection.y, edmStreamStallGrapher.Point.y, svgfig.Plot.y, svgfig.Frame.y, svgfig.Curve.Sample.y, svgfig.Text.y, svgfig.TextGlobal.y, svgfig.HLine.y, PrimaryVertexMonitor.yerr, and python.rootplot.utilities.Hist.yerr.

Referenced by python.rootplot.utilities.Hist.__init__().

144  def __init_TGraph(self, hist):
145  self.nbins = n = hist.GetN()
146  self.x, self.y = [], []
147  x, y = ROOT.Double(0), ROOT.Double(0)
148  for i in range(n):
149  hist.GetPoint(i, x, y)
150  self.x.append(copy.copy(x))
151  self.y.append(copy.copy(y))
152  lower = [max(0, hist.GetErrorXlow(i)) for i in range(n)]
153  upper = [max(0, hist.GetErrorXhigh(i)) for i in range(n)]
154  self.xerr = [lower[:], upper[:]]
155  lower = [max(0, hist.GetErrorYlow(i)) for i in range(n)]
156  upper = [max(0, hist.GetErrorYhigh(i)) for i in range(n)]
157  self.yerr = [lower[:], upper[:]]
158  self.xedges = [self.x[i] - self.xerr[0][i] for i in range(n)]
159  self.xedges.append(self.x[n - 1] + self.xerr[1][n - 1])
160  self.width = [self.xedges[i + 1] - self.xedges[i] for i in range(n)]
161  self.underflow, self.overflow = 0, 0
162  self.binlabels = None
163  self.entries = n
def __init_TGraph(self, hist)
Definition: utilities.py:144
def python.rootplot.utilities.Hist.__init_TH1 (   self,
  hist 
)
private

Definition at line 125 of file utilities.py.

Referenced by python.rootplot.utilities.Hist.__init__().

125  def __init_TH1(self, hist):
126  self.nbins = n = hist.GetNbinsX()
127  self.binlabels = process_bin_labels([hist.GetXaxis().GetBinLabel(i)
128  for i in range(1, n + 1)])
129  if self.binlabels and '' in self.binlabels:
130  # Get rid of extra non-labeled bins
131  self.nbins = n = self.binlabels.index('')
132  self.binlabels = self.binlabels[:n]
133  self.entries = hist.GetEntries()
134  self.xedges = [hist.GetBinLowEdge(i) for i in range(1, n + 2)]
135  self.x = [(self.xedges[i+1] + self.xedges[i])/2 for i in range(n)]
136  self.xerr = [(self.xedges[i+1] - self.xedges[i])/2 for i in range(n)]
137  self.xerr = [self.xerr[:], self.xerr[:]]
138  self.width = [(self.xedges[i+1] - self.xedges[i]) for i in range(n)]
139  self.y = [hist.GetBinContent(i) for i in range(1, n + 1)]
140  self.yerr = [hist.GetBinError( i) for i in range(1, n + 1)]
141  self.yerr = [self.yerr[:], self.yerr[:]]
142  self.underflow = hist.GetBinContent(0)
143  self.overflow = hist.GetBinContent(self.nbins + 1)
def __init_TH1(self, hist)
Definition: utilities.py:125
def process_bin_labels(binlabels)
Definition: utilities.py:486
def python.rootplot.utilities.Hist.__iter__ (   self)
def python.rootplot.utilities.Hist.__len__ (   self)
def python.rootplot.utilities.Hist.__setitem__ (   self,
  index,
  value 
)
def python.rootplot.utilities.Hist.__sub__ (   self,
  b 
)
Return the difference of self and b: x.__sub__(y) <==> x - y

Definition at line 174 of file utilities.py.

174  def __sub__(self, b):
175  """Return the difference of self and b: x.__sub__(y) <==> x - y"""
176  c = copy.copy(self)
177  for i in range(len(self)):
178  c.y[i] -= b.y[i]
179  c.yerr[0][i] -= b.yerr[0][i]
180  c.yerr[1][i] -= b.yerr[1][i]
181  c.overflow -= b.overflow
182  c.underflow -= b.underflow
183  return c
def python.rootplot.utilities.Hist.av_xerr (   self)
def python.rootplot.utilities.Hist.av_yerr (   self)
def python.rootplot.utilities.Hist.delete_bin (   self,
  index 
)
Delete a the contents of a bin, sliding all the other data one bin to
the left.  This can be useful for histograms with labeled bins.

Definition at line 223 of file utilities.py.

References python.rootplot.utilities.Hist.binlabels, TriggerDQMBase::MEbinning.nbins, MEbinning.nbins, sistrip::EnsembleCalibrationLA.nbins, MEPSet.nbins, SummationStep.nbins, ExpressionHisto< T >.nbins, JetMonitor::MEbinning.nbins, METMonitor::MEbinning.nbins, HTMonitor::MEHTbinning.nbins, HistogramGenerator.nbins, DiDispStaMuonMonitor::MEbinning.nbins, NoBPTXMonitor::NoBPTXbinning.nbins, ecaldqm::binning::AxisSpecs.nbins, PlotAlignmentValidation::DMRPlotInfo.nbins, python.rootplot.utilities.Hist.nbins, MuonAlignment.nbins, HLTObjectsMonitor::MEbinning.nbins, MuScleFitUtils.nbins, MuonAlignmentAnalyzer.nbins, PrimaryVertexMonitor.xerr, python.rootplot.utilities.Hist.xerr, PrimaryVertexMonitor.yerr, and python.rootplot.utilities.Hist.yerr.

223  def delete_bin(self, index):
224  """
225  Delete a the contents of a bin, sliding all the other data one bin to
226  the left. This can be useful for histograms with labeled bins.
227  """
228  self.nbins -= 1
229  self.xedges.pop()
230  self.x.pop()
231  self.width.pop()
232  self.y.pop(index)
233  self.xerr[0].pop(index)
234  self.xerr[1].pop(index)
235  self.yerr[0].pop(index)
236  self.yerr[1].pop(index)
237  if self.binlabels:
238  self.binlabels.pop(index)
def delete_bin(self, index)
Definition: utilities.py:223
def python.rootplot.utilities.Hist.divide (   self,
  denominator 
)
Return the simple quotient with errors added in quadrature.

This function is called by the division operator:
    hist3 = hist1.divide_wilson(hist2) <--> hist3 = hist1 / hist2

Definition at line 269 of file utilities.py.

References python.rootplot.utilities.Hist.av_yerr(), ElectronMVAID.ElectronMVAID.name, counter.Counter.name, average.Average.name, histograms.Histograms.name, AlignableObjectId::entry.name, TmModule.name, cond::persistency::TAG::NAME.name, cond::persistency::GLOBAL_TAG::NAME.name, cond::persistency::RUN_INFO::RUN_NUMBER.name, cond::persistency::TAG::TIME_TYPE.name, core.autovars.NTupleVariable.name, cond::persistency::RUN_INFO::START_TIME.name, cond::persistency::GLOBAL_TAG::VALIDITY.name, cond::persistency::TAG::OBJECT_TYPE.name, cond::persistency::GLOBAL_TAG::DESCRIPTION.name, cond::persistency::RUN_INFO::END_TIME.name, cond::persistency::TAG::SYNCHRONIZATION.name, cond::persistency::GLOBAL_TAG::RELEASE.name, cond::persistency::TAG::END_OF_VALIDITY.name, MEPSet.name, cond::persistency::GLOBAL_TAG::SNAPSHOT_TIME.name, cond::persistency::TAG::DESCRIPTION.name, cond::persistency::GTEditorData.name, cond::persistency::GLOBAL_TAG::INSERTION_TIME.name, cond::persistency::TAG::LAST_VALIDATED_TIME.name, cond::persistency::TAG::INSERTION_TIME.name, nanoaod::MergeableCounterTable::SingleColumn< T >.name, cond::persistency::TAG::MODIFICATION_TIME.name, FWTGeoRecoGeometry::Info.name, preexistingValidation.PreexistingValidation.name, OutputMEPSet.name, EventStringOutputBranches::NamedBranchPtr.name, SummaryTableOutputBranches::NamedBranchPtr.name, dataset.BaseDataset.name, personalPlayback.Applet.name, Types._Untracked.name, ParameterSet.name, PixelDCSObject< T >::Item.name, DQMRivetClient::LumiOption.name, MagCylinder.name, analyzer.Analyzer.name, production_tasks.Task.name, TriggerOutputBranches::NamedBranchPtr.name, ParSet.name, TableOutputBranches::NamedBranchPtr.name, edm::PathTimingSummary.name, DQMRivetClient::ScaleFactorOption.name, EgHLTOfflineSummaryClient::SumHistBinData.name, PhysicsTools::Source.name, SingleObjectCondition.name, cond::persistency::GTProxyData.name, MyWatcher.name, core.autovars.NTupleObjectType.name, edm::PathSummary.name, cond::TimeTypeSpecs.name, lumi::TriggerInfo.name, alignment.Alignment.name, PixelEndcapLinkMaker::Item.name, perftools::EdmEventSize::BranchRecord.name, cond::persistency::GLOBAL_TAG_MAP::GLOBAL_TAG_NAME.name, DQMGenericClient::EfficOption.name, FWTableViewManager::TableEntry.name, PixelBarrelLinkMaker::Item.name, cond::persistency::GLOBAL_TAG_MAP::RECORD.name, EcalLogicID.name, cond::persistency::GLOBAL_TAG_MAP::LABEL.name, cond::persistency::GLOBAL_TAG_MAP::TAG_NAME.name, MEtoEDM< T >::MEtoEDMObject.name, cms::DDAlgoArguments.name, ExpressionHisto< T >.name, XMLProcessor::_loaderBaseConfig.name, cond::persistency::PAYLOAD::HASH.name, python.rootplot.utilities.Hist2D.name, cond::persistency::PAYLOAD::OBJECT_TYPE.name, cond::persistency::PAYLOAD::DATA.name, cond::persistency::PAYLOAD::STREAMER_INFO.name, TreeCrawler.Package.name, genericValidation.GenericValidation.name, cond::persistency::PAYLOAD::VERSION.name, options.ConnectionHLTMenu.name, MagGeoBuilderFromDDD::volumeHandle.name, cond::persistency::PAYLOAD::INSERTION_TIME.name, DQMGenericClient::ProfileOption.name, dqmoffline::l1t::HistDefinition.name, nanoaod::MergeableCounterTable::VectorColumn< T >.name, DQMGenericClient::NormOption.name, emtf::Node.name, FastHFShowerLibrary.name, h4DSegm.name, PhysicsTools::Calibration::Variable.name, PhysicsTools::Variable::Value.name, core.TriggerMatchAnalyzer.TriggerMatchAnalyzer.name, DQMGenericClient::CDOption.name, TriggerObjectTableProducer::SelectedObject.name, CounterChecker.name, TrackerSectorStruct.name, cond::TagInfo_t.name, ProcTMVA::Method.name, TreeSaver::Var.name, DQMGenericClient::NoFlowOption.name, looper.Looper.name, python.rootplot.tree2hists.Plot.name, cond::persistency::IOV::TAG_NAME.name, EDMtoMEConverter.name, cond::persistency::IOV::SINCE.name, Mapper::definition< ScannerT >.name, cond::persistency::IOV::PAYLOAD_HASH.name, PhysicsTools::TreeReader::Value.name, classes.MonitorData.name, cond::persistency::IOV::INSERTION_TIME.name, HistogramManager.name, PhysicsTools::TrainProcessor.name, MuonGeometrySanityCheckPoint.name, classes.OutputData.name, PhysicsTools::MVAModuleHelper< Record, Object, Filler >::Value.name, PhysicsTools::ProcessRegistry< Base_t, CalibBase_t, Parent_t >.name, PhysicsTools::MVATrainer.name, options.HLTProcessOptions.name, h2DSegm.name, core.TriggerBitAnalyzer.TriggerBitAnalyzer.name, python.rootplot.utilities.Hist.name, nanoaod::FlatTable::Column.name, geometry.Structure.name, config.Analyzer.name, core.autovars.NTupleSubObject.name, DQMNet::WaitObject.name, AlpgenParameterName.name, SiStripMonitorDigi.name, NanoAODDQM::SelGroupConfig.name, core.autovars.NTupleObject.name, config.Service.name, PhysicsTools::Variable.name, cond::persistency::TAG_LOG::TAG_NAME.name, cond::persistency::TAG_LOG::EVENT_TIME.name, cond::persistency::TAG_LOG::USER_NAME.name, cond::persistency::TAG_LOG::HOST_NAME.name, cond::persistency::TAG_LOG::COMMAND.name, cond::persistency::TAG_LOG::ACTION.name, cond::persistency::TAG_LOG::USER_TEXT.name, PhysicsTools::TrainerMonitoring::Object.name, core.autovars.NTupleCollection.name, BPHRecoBuilder::BPHRecoSource.name, BPHRecoBuilder::BPHCompSource.name, personalPlayback.FrameworkJob.name, plotscripts.SawTeethFunction.name, crabFunctions.CrabTask.name, hTMaxCell.name, cscdqm::ParHistoDef.name, BeautifulSoup.Tag.name, Id.name, SummaryOutputProducer::GenericSummary.name, BeautifulSoup.SoupStrainer.name, TriggerDQMBase::MEbinning.nbins, MEbinning.nbins, sistrip::EnsembleCalibrationLA.nbins, MEPSet.nbins, SummationStep.nbins, ExpressionHisto< T >.nbins, JetMonitor::MEbinning.nbins, METMonitor::MEbinning.nbins, HTMonitor::MEHTbinning.nbins, HistogramGenerator.nbins, DiDispStaMuonMonitor::MEbinning.nbins, NoBPTXMonitor::NoBPTXbinning.nbins, ecaldqm::binning::AxisSpecs.nbins, PlotAlignmentValidation::DMRPlotInfo.nbins, python.rootplot.utilities.Hist.nbins, MuonAlignment.nbins, HLTObjectsMonitor::MEbinning.nbins, MuScleFitUtils.nbins, and MuonAlignmentAnalyzer.nbins.

Referenced by python.rootplot.utilities.Hist.__div__().

269  def divide(self, denominator):
270  """
271  Return the simple quotient with errors added in quadrature.
272 
273  This function is called by the division operator:
274  hist3 = hist1.divide_wilson(hist2) <--> hist3 = hist1 / hist2
275  """
276  if len(self) != len(denominator):
277  raise TypeError("Cannot divide %s with %i bins by "
278  "%s with %i bins." %
279  (denominator.name, len(denominator),
280  self.name, len(self)))
281  quotient = copy.deepcopy(self)
282  num_yerr = self.av_yerr()
283  den_yerr = denominator.av_yerr()
284  quotient.yerr = [0. for i in range(self.nbins)]
285  for i in range(self.nbins):
286  if denominator[i] == 0 or self[i] == 0:
287  quotient.y[i] = 0.
288  else:
289  quotient.y[i] = self[i] / denominator[i]
290  quotient.yerr[i] = quotient[i]
291  quotient.yerr[i] *= math.sqrt((num_yerr[i] / self[i]) ** 2 +
292  (den_yerr[i] / denominator[i]) ** 2)
293  if quotient.yerr[i] > quotient[i]:
294  quotient.yerr[i] = quotient[i]
295  quotient.yerr = [quotient.yerr, quotient.yerr]
296  return quotient
def divide(self, denominator)
Definition: utilities.py:269
def python.rootplot.utilities.Hist.divide_wilson (   self,
  denominator 
)
Return an efficiency plot with Wilson score interval errors.

Definition at line 297 of file utilities.py.

References ElectronMVAID.ElectronMVAID.name, counter.Counter.name, average.Average.name, histograms.Histograms.name, AlignableObjectId::entry.name, TmModule.name, cond::persistency::TAG::NAME.name, cond::persistency::GLOBAL_TAG::NAME.name, cond::persistency::RUN_INFO::RUN_NUMBER.name, cond::persistency::TAG::TIME_TYPE.name, core.autovars.NTupleVariable.name, cond::persistency::RUN_INFO::START_TIME.name, cond::persistency::GLOBAL_TAG::VALIDITY.name, cond::persistency::TAG::OBJECT_TYPE.name, cond::persistency::GLOBAL_TAG::DESCRIPTION.name, cond::persistency::RUN_INFO::END_TIME.name, cond::persistency::TAG::SYNCHRONIZATION.name, cond::persistency::GLOBAL_TAG::RELEASE.name, cond::persistency::TAG::END_OF_VALIDITY.name, MEPSet.name, cond::persistency::GLOBAL_TAG::SNAPSHOT_TIME.name, cond::persistency::TAG::DESCRIPTION.name, cond::persistency::GTEditorData.name, cond::persistency::GLOBAL_TAG::INSERTION_TIME.name, cond::persistency::TAG::LAST_VALIDATED_TIME.name, cond::persistency::TAG::INSERTION_TIME.name, nanoaod::MergeableCounterTable::SingleColumn< T >.name, cond::persistency::TAG::MODIFICATION_TIME.name, FWTGeoRecoGeometry::Info.name, preexistingValidation.PreexistingValidation.name, OutputMEPSet.name, EventStringOutputBranches::NamedBranchPtr.name, SummaryTableOutputBranches::NamedBranchPtr.name, dataset.BaseDataset.name, personalPlayback.Applet.name, Types._Untracked.name, ParameterSet.name, PixelDCSObject< T >::Item.name, DQMRivetClient::LumiOption.name, MagCylinder.name, analyzer.Analyzer.name, production_tasks.Task.name, TriggerOutputBranches::NamedBranchPtr.name, ParSet.name, TableOutputBranches::NamedBranchPtr.name, edm::PathTimingSummary.name, DQMRivetClient::ScaleFactorOption.name, EgHLTOfflineSummaryClient::SumHistBinData.name, PhysicsTools::Source.name, SingleObjectCondition.name, cond::persistency::GTProxyData.name, MyWatcher.name, core.autovars.NTupleObjectType.name, edm::PathSummary.name, cond::TimeTypeSpecs.name, lumi::TriggerInfo.name, alignment.Alignment.name, PixelEndcapLinkMaker::Item.name, perftools::EdmEventSize::BranchRecord.name, cond::persistency::GLOBAL_TAG_MAP::GLOBAL_TAG_NAME.name, DQMGenericClient::EfficOption.name, FWTableViewManager::TableEntry.name, PixelBarrelLinkMaker::Item.name, cond::persistency::GLOBAL_TAG_MAP::RECORD.name, EcalLogicID.name, cond::persistency::GLOBAL_TAG_MAP::LABEL.name, cond::persistency::GLOBAL_TAG_MAP::TAG_NAME.name, MEtoEDM< T >::MEtoEDMObject.name, cms::DDAlgoArguments.name, ExpressionHisto< T >.name, XMLProcessor::_loaderBaseConfig.name, cond::persistency::PAYLOAD::HASH.name, python.rootplot.utilities.Hist2D.name, cond::persistency::PAYLOAD::OBJECT_TYPE.name, cond::persistency::PAYLOAD::DATA.name, cond::persistency::PAYLOAD::STREAMER_INFO.name, TreeCrawler.Package.name, genericValidation.GenericValidation.name, cond::persistency::PAYLOAD::VERSION.name, options.ConnectionHLTMenu.name, MagGeoBuilderFromDDD::volumeHandle.name, cond::persistency::PAYLOAD::INSERTION_TIME.name, DQMGenericClient::ProfileOption.name, dqmoffline::l1t::HistDefinition.name, nanoaod::MergeableCounterTable::VectorColumn< T >.name, DQMGenericClient::NormOption.name, emtf::Node.name, FastHFShowerLibrary.name, h4DSegm.name, PhysicsTools::Calibration::Variable.name, PhysicsTools::Variable::Value.name, core.TriggerMatchAnalyzer.TriggerMatchAnalyzer.name, DQMGenericClient::CDOption.name, TriggerObjectTableProducer::SelectedObject.name, CounterChecker.name, TrackerSectorStruct.name, cond::TagInfo_t.name, ProcTMVA::Method.name, TreeSaver::Var.name, DQMGenericClient::NoFlowOption.name, looper.Looper.name, python.rootplot.tree2hists.Plot.name, cond::persistency::IOV::TAG_NAME.name, EDMtoMEConverter.name, cond::persistency::IOV::SINCE.name, Mapper::definition< ScannerT >.name, cond::persistency::IOV::PAYLOAD_HASH.name, classes.MonitorData.name, cond::persistency::IOV::INSERTION_TIME.name, PhysicsTools::TreeReader::Value.name, HistogramManager.name, PhysicsTools::TrainProcessor.name, MuonGeometrySanityCheckPoint.name, classes.OutputData.name, PhysicsTools::MVAModuleHelper< Record, Object, Filler >::Value.name, PhysicsTools::ProcessRegistry< Base_t, CalibBase_t, Parent_t >.name, PhysicsTools::MVATrainer.name, options.HLTProcessOptions.name, h2DSegm.name, core.TriggerBitAnalyzer.TriggerBitAnalyzer.name, nanoaod::FlatTable::Column.name, python.rootplot.utilities.Hist.name, geometry.Structure.name, config.Analyzer.name, core.autovars.NTupleSubObject.name, DQMNet::WaitObject.name, AlpgenParameterName.name, NanoAODDQM::SelGroupConfig.name, SiStripMonitorDigi.name, core.autovars.NTupleObject.name, PhysicsTools::Variable.name, config.Service.name, cond::persistency::TAG_LOG::TAG_NAME.name, cond::persistency::TAG_LOG::EVENT_TIME.name, cond::persistency::TAG_LOG::USER_NAME.name, cond::persistency::TAG_LOG::HOST_NAME.name, cond::persistency::TAG_LOG::COMMAND.name, cond::persistency::TAG_LOG::ACTION.name, PhysicsTools::TrainerMonitoring::Object.name, cond::persistency::TAG_LOG::USER_TEXT.name, core.autovars.NTupleCollection.name, BPHRecoBuilder::BPHRecoSource.name, BPHRecoBuilder::BPHCompSource.name, personalPlayback.FrameworkJob.name, plotscripts.SawTeethFunction.name, crabFunctions.CrabTask.name, hTMaxCell.name, cscdqm::ParHistoDef.name, BeautifulSoup.Tag.name, Id.name, SummaryOutputProducer::GenericSummary.name, BeautifulSoup.SoupStrainer.name, python.rootplot.utilities.wilson_interval(), RPFlatParams::EP.y, stAPVGain.y, TkLayerMap::XYbin.y, TwoBodyDecayParameters.y, SimplePixel.y, reco::MuonChamberMatch.y, online::BeamSpot_v1.y, HGCal_helpers::Coordinates.y, Phase2ITPixelCluster::Pixel.y, LHCInterpolatedOpticalFunctionsSet::Kinematics.y, reco::MuonSegmentMatch.y, PhiInterval.y, SiPixelCluster::Pixel.y, VertexType.y, Pixinfo.y, Hit.y, MonitorTrackResidualsBase< pixel_or_strip >::HistoXY.y, PixelModule.y, Clust.y, python.rootplot.utilities.Hist2D.y, PixelUnpackingRegions::Module.y, Rechit.y, hit.y, MuonGeometryArrange::MGACollection.y, CTPPSLocalTrackLite.y, python.rootplot.utilities.Hist.y, python.rootplot.root2matplotlib.Hist.y, BeamSpotOnlineRaw_v4.y, Exhume::CrossSection.y, edmStreamStallGrapher.Point.y, svgfig.Plot.y, svgfig.Frame.y, svgfig.Curve.Sample.y, svgfig.Text.y, svgfig.TextGlobal.y, and svgfig.HLine.y.

297  def divide_wilson(self, denominator):
298  """Return an efficiency plot with Wilson score interval errors."""
299  if len(self) != len(denominator):
300  raise TypeError("Cannot divide %s with %i bins by "
301  "%s with %i bins." %
302  (denominator.name, len(denominator),
303  self.name, len(self)))
304  eff, upper_err, lower_err = wilson_interval(self.y, denominator.y)
305  quotient = copy.deepcopy(self)
306  quotient.y = eff
307  quotient.yerr = [lower_err, upper_err]
308  return quotient
309 
def wilson_interval(numerator_array, denominator_array)
Definition: utilities.py:496
def divide_wilson(self, denominator)
Definition: utilities.py:297
def python.rootplot.utilities.Hist.min (   self,
  threshold = None 
)
Return the y-value of the bottom tip of the lowest errorbar.

Definition at line 198 of file utilities.py.

References RPFlatParams::EP.y, stAPVGain.y, TkLayerMap::XYbin.y, TwoBodyDecayParameters.y, SimplePixel.y, reco::MuonChamberMatch.y, online::BeamSpot_v1.y, HGCal_helpers::Coordinates.y, Phase2ITPixelCluster::Pixel.y, LHCInterpolatedOpticalFunctionsSet::Kinematics.y, reco::MuonSegmentMatch.y, PhiInterval.y, SiPixelCluster::Pixel.y, VertexType.y, Pixinfo.y, Hit.y, MonitorTrackResidualsBase< pixel_or_strip >::HistoXY.y, PixelModule.y, Clust.y, python.rootplot.utilities.Hist2D.y, PixelUnpackingRegions::Module.y, Rechit.y, hit.y, MuonGeometryArrange::MGACollection.y, CTPPSLocalTrackLite.y, python.rootplot.utilities.Hist.y, python.rootplot.root2matplotlib.Hist.y, BeamSpotOnlineRaw_v4.y, Exhume::CrossSection.y, edmStreamStallGrapher.Point.y, svgfig.Plot.y, svgfig.Frame.y, svgfig.Curve.Sample.y, svgfig.Text.y, svgfig.TextGlobal.y, svgfig.HLine.y, PrimaryVertexMonitor.yerr, python.rootplot.utilities.Hist.yerr, and ComparisonHelper.zip().

198  def min(self, threshold=None):
199  """Return the y-value of the bottom tip of the lowest errorbar."""
200  vals = [(yval - yerr) for yval, yerr in zip(self.y, self.yerr[0])
201  if (yval - yerr) > threshold]
202  if vals:
203  return min(vals)
204  else:
205  return threshold
OutputIterator zip(InputIterator1 first1, InputIterator1 last1, InputIterator2 first2, InputIterator2 last2, OutputIterator result, Compare comp)
def min(self, threshold=None)
Definition: utilities.py:198
def python.rootplot.utilities.Hist.scale (   self,
  factor 
)
Scale contents, errors, and over/underflow by the given scale factor.

Definition at line 214 of file utilities.py.

References PhysicsTools::TrainProcessor::SigBkg.overflow, python.rootplot.utilities.Hist.overflow, PhysicsTools::TrainProcessor::SigBkg.underflow, python.rootplot.utilities.Hist.underflow, RPFlatParams::EP.y, stAPVGain.y, TwoBodyDecayParameters.y, TkLayerMap::XYbin.y, SimplePixel.y, reco::MuonChamberMatch.y, online::BeamSpot_v1.y, HGCal_helpers::Coordinates.y, Phase2ITPixelCluster::Pixel.y, LHCInterpolatedOpticalFunctionsSet::Kinematics.y, reco::MuonSegmentMatch.y, PhiInterval.y, SiPixelCluster::Pixel.y, VertexType.y, Pixinfo.y, Hit.y, MonitorTrackResidualsBase< pixel_or_strip >::HistoXY.y, PixelModule.y, Clust.y, python.rootplot.utilities.Hist2D.y, PixelUnpackingRegions::Module.y, Rechit.y, hit.y, MuonGeometryArrange::MGACollection.y, CTPPSLocalTrackLite.y, python.rootplot.utilities.Hist.y, python.rootplot.root2matplotlib.Hist.y, BeamSpotOnlineRaw_v4.y, Exhume::CrossSection.y, edmStreamStallGrapher.Point.y, svgfig.Plot.y, svgfig.Frame.y, svgfig.Curve.Sample.y, svgfig.Text.y, svgfig.TextGlobal.y, svgfig.HLine.y, PrimaryVertexMonitor.yerr, and python.rootplot.utilities.Hist.yerr.

214  def scale(self, factor):
215  """
216  Scale contents, errors, and over/underflow by the given scale factor.
217  """
218  self.y = [x * factor for x in self.y]
219  self.yerr[0] = [x * factor for x in self.yerr[0]]
220  self.yerr[1] = [x * factor for x in self.yerr[1]]
221  self.overflow *= factor
222  self.underflow *= factor
def scale(self, factor)
Definition: utilities.py:214
def python.rootplot.utilities.Hist.TGraph (   self,
  name = None 
)
Return a ROOT.TGraphAsymmErrors object with contents of this Hist

Definition at line 257 of file utilities.py.

References ElectronMVAID.ElectronMVAID.name, average.Average.name, counter.Counter.name, AlignableObjectId::entry.name, histograms.Histograms.name, cond::persistency::TAG::NAME.name, cond::persistency::RUN_INFO::RUN_NUMBER.name, TmModule.name, cond::persistency::GLOBAL_TAG::NAME.name, cond::persistency::TAG::TIME_TYPE.name, cond::persistency::RUN_INFO::START_TIME.name, core.autovars.NTupleVariable.name, cond::persistency::GLOBAL_TAG::VALIDITY.name, cond::persistency::TAG::OBJECT_TYPE.name, cond::persistency::RUN_INFO::END_TIME.name, cond::persistency::GLOBAL_TAG::DESCRIPTION.name, cond::persistency::TAG::SYNCHRONIZATION.name, cond::persistency::GLOBAL_TAG::RELEASE.name, cond::persistency::TAG::END_OF_VALIDITY.name, MEPSet.name, cond::persistency::GLOBAL_TAG::SNAPSHOT_TIME.name, cond::persistency::TAG::DESCRIPTION.name, cond::persistency::GTEditorData.name, cond::persistency::GLOBAL_TAG::INSERTION_TIME.name, cond::persistency::TAG::LAST_VALIDATED_TIME.name, cond::persistency::TAG::INSERTION_TIME.name, cond::persistency::TAG::MODIFICATION_TIME.name, nanoaod::MergeableCounterTable::SingleColumn< T >.name, FWTGeoRecoGeometry::Info.name, preexistingValidation.PreexistingValidation.name, OutputMEPSet.name, EventStringOutputBranches::NamedBranchPtr.name, SummaryTableOutputBranches::NamedBranchPtr.name, personalPlayback.Applet.name, ParameterSet.name, Types._Untracked.name, dataset.BaseDataset.name, PixelDCSObject< T >::Item.name, DQMRivetClient::LumiOption.name, MagCylinder.name, analyzer.Analyzer.name, production_tasks.Task.name, TriggerOutputBranches::NamedBranchPtr.name, ParSet.name, TableOutputBranches::NamedBranchPtr.name, edm::PathTimingSummary.name, DQMRivetClient::ScaleFactorOption.name, EgHLTOfflineSummaryClient::SumHistBinData.name, SingleObjectCondition.name, PhysicsTools::Source.name, cond::persistency::GTProxyData.name, MyWatcher.name, core.autovars.NTupleObjectType.name, edm::PathSummary.name, cond::TimeTypeSpecs.name, lumi::TriggerInfo.name, alignment.Alignment.name, perftools::EdmEventSize::BranchRecord.name, PixelEndcapLinkMaker::Item.name, cond::persistency::GLOBAL_TAG_MAP::GLOBAL_TAG_NAME.name, DQMGenericClient::EfficOption.name, FWTableViewManager::TableEntry.name, PixelBarrelLinkMaker::Item.name, cond::persistency::GLOBAL_TAG_MAP::RECORD.name, EcalLogicID.name, cond::persistency::GLOBAL_TAG_MAP::LABEL.name, cond::persistency::GLOBAL_TAG_MAP::TAG_NAME.name, MEtoEDM< T >::MEtoEDMObject.name, cms::DDAlgoArguments.name, ExpressionHisto< T >.name, XMLProcessor::_loaderBaseConfig.name, cond::persistency::PAYLOAD::HASH.name, cond::persistency::PAYLOAD::OBJECT_TYPE.name, python.rootplot.utilities.Hist2D.name, cond::persistency::PAYLOAD::DATA.name, cond::persistency::PAYLOAD::STREAMER_INFO.name, TreeCrawler.Package.name, cond::persistency::PAYLOAD::VERSION.name, options.ConnectionHLTMenu.name, MagGeoBuilderFromDDD::volumeHandle.name, genericValidation.GenericValidation.name, cond::persistency::PAYLOAD::INSERTION_TIME.name, DQMGenericClient::ProfileOption.name, dqmoffline::l1t::HistDefinition.name, nanoaod::MergeableCounterTable::VectorColumn< T >.name, DQMGenericClient::NormOption.name, emtf::Node.name, FastHFShowerLibrary.name, h4DSegm.name, PhysicsTools::Calibration::Variable.name, core.TriggerMatchAnalyzer.TriggerMatchAnalyzer.name, PhysicsTools::Variable::Value.name, DQMGenericClient::CDOption.name, CounterChecker.name, TriggerObjectTableProducer::SelectedObject.name, TrackerSectorStruct.name, cond::TagInfo_t.name, ProcTMVA::Method.name, TreeSaver::Var.name, DQMGenericClient::NoFlowOption.name, looper.Looper.name, python.rootplot.tree2hists.Plot.name, cond::persistency::IOV::TAG_NAME.name, cond::persistency::IOV::SINCE.name, EDMtoMEConverter.name, cond::persistency::IOV::PAYLOAD_HASH.name, Mapper::definition< ScannerT >.name, cond::persistency::IOV::INSERTION_TIME.name, classes.MonitorData.name, PhysicsTools::TreeReader::Value.name, HistogramManager.name, MuonGeometrySanityCheckPoint.name, PhysicsTools::TrainProcessor.name, classes.OutputData.name, PhysicsTools::MVAModuleHelper< Record, Object, Filler >::Value.name, PhysicsTools::ProcessRegistry< Base_t, CalibBase_t, Parent_t >.name, options.HLTProcessOptions.name, PhysicsTools::MVATrainer.name, h2DSegm.name, core.TriggerBitAnalyzer.TriggerBitAnalyzer.name, nanoaod::FlatTable::Column.name, python.rootplot.utilities.Hist.name, geometry.Structure.name, config.Analyzer.name, core.autovars.NTupleSubObject.name, DQMNet::WaitObject.name, AlpgenParameterName.name, SiStripMonitorDigi.name, NanoAODDQM::SelGroupConfig.name, core.autovars.NTupleObject.name, config.Service.name, PhysicsTools::Variable.name, cond::persistency::TAG_LOG::TAG_NAME.name, cond::persistency::TAG_LOG::EVENT_TIME.name, cond::persistency::TAG_LOG::USER_NAME.name, cond::persistency::TAG_LOG::HOST_NAME.name, cond::persistency::TAG_LOG::COMMAND.name, cond::persistency::TAG_LOG::ACTION.name, cond::persistency::TAG_LOG::USER_TEXT.name, PhysicsTools::TrainerMonitoring::Object.name, core.autovars.NTupleCollection.name, BPHRecoBuilder::BPHRecoSource.name, BPHRecoBuilder::BPHCompSource.name, personalPlayback.FrameworkJob.name, plotscripts.SawTeethFunction.name, crabFunctions.CrabTask.name, hTMaxCell.name, cscdqm::ParHistoDef.name, BeautifulSoup.Tag.name, Id.name, SummaryOutputProducer::GenericSummary.name, BeautifulSoup.SoupStrainer.name, TriggerDQMBase::MEbinning.nbins, MEbinning.nbins, sistrip::EnsembleCalibrationLA.nbins, MEPSet.nbins, SummationStep.nbins, ExpressionHisto< T >.nbins, JetMonitor::MEbinning.nbins, METMonitor::MEbinning.nbins, HTMonitor::MEHTbinning.nbins, HistogramGenerator.nbins, DiDispStaMuonMonitor::MEbinning.nbins, NoBPTXMonitor::NoBPTXbinning.nbins, ecaldqm::binning::AxisSpecs.nbins, PlotAlignmentValidation::DMRPlotInfo.nbins, python.rootplot.utilities.Hist.nbins, MuonAlignment.nbins, HLTObjectsMonitor::MEbinning.nbins, MuScleFitUtils.nbins, MuonAlignmentAnalyzer.nbins, classes.PlotData.title, EventStringOutputBranches::NamedBranchPtr.title, TriggerOutputBranches::NamedBranchPtr.title, preexistingValidation.PreexistingValidation.title, DB_ME.title, TableOutputBranches::NamedBranchPtr.title, cscdqm::HistoBookRequest.title, FWTriggerTableView::Column.title, DQMGenericClient::EfficOption.title, alignment.Alignment.title, DQMGenericClient::ProfileOption.title, dqmoffline::l1t::HistDefinition.title, SiPixelGenErrorHeader.title, python.rootplot.utilities.Hist2D.title, ecaldqm::binning::AxisSpecs.title, big::bigHeader.title, HistogramManager.title, SiPixelTemplateHeader2D.title, presentation.SubsectionBase.title, python.rootplot.utilities.Hist.title, Geometry.title, TkAlMap.TkAlMap.title, TrackerMap.title, SiPixelTemplateHeader.title, reco::MuonRPCHitMatch.x, RPFlatParams::EP.x, stAPVGain.x, TwoBodyDecayParameters.x, TkLayerMap::XYbin.x, SimplePixel.x, reco::MuonChamberMatch.x, online::BeamSpot_v1.x, HGCal_helpers::Coordinates.x, LHCInterpolatedOpticalFunctionsSet::Kinematics.x, Phase2ITPixelCluster::Pixel.x, reco::MuonSegmentMatch.x, SiPixelCluster::Pixel.x, PhiInterval.x, VertexType.x, Pixinfo.x, Hit.x, MonitorTrackResidualsBase< pixel_or_strip >::HistoXY.x, PixelModule.x, Clust.x, l1t::emtf::AMC13Header.x, python.rootplot.utilities.Hist2D.x, PixelUnpackingRegions::Module.x, Rechit.x, hit.x, CTPPSLocalTrackLite.x, MuonGeometryArrange::MGACollection.x, python.rootplot.utilities.Hist.x, BeamSpotOnlineRaw_v4.x, MuScleFitUtils.x, perftools::detail::Hist.x, edmStreamStallGrapher.Point.x, svgfig.Plot.x, svgfig.Frame.x, svgfig.Text.x, svgfig.TextGlobal.x, svgfig.VLine.x, PrimaryVertexMonitor.xerr, python.rootplot.utilities.Hist.xerr, python.rootplot.utilities.Hist2D.xlabel, HistogramManager.xlabel, python.rootplot.utilities.Hist.xlabel, RPFlatParams::EP.y, stAPVGain.y, TkLayerMap::XYbin.y, TwoBodyDecayParameters.y, SimplePixel.y, reco::MuonChamberMatch.y, online::BeamSpot_v1.y, HGCal_helpers::Coordinates.y, Phase2ITPixelCluster::Pixel.y, LHCInterpolatedOpticalFunctionsSet::Kinematics.y, reco::MuonSegmentMatch.y, SiPixelCluster::Pixel.y, PhiInterval.y, VertexType.y, Pixinfo.y, Hit.y, MonitorTrackResidualsBase< pixel_or_strip >::HistoXY.y, PixelModule.y, Clust.y, python.rootplot.utilities.Hist2D.y, PixelUnpackingRegions::Module.y, Rechit.y, hit.y, MuonGeometryArrange::MGACollection.y, CTPPSLocalTrackLite.y, python.rootplot.utilities.Hist.y, python.rootplot.root2matplotlib.Hist.y, BeamSpotOnlineRaw_v4.y, Exhume::CrossSection.y, edmStreamStallGrapher.Point.y, svgfig.Plot.y, svgfig.Frame.y, svgfig.Curve.Sample.y, svgfig.Text.y, svgfig.TextGlobal.y, svgfig.HLine.y, PrimaryVertexMonitor.yerr, python.rootplot.utilities.Hist.yerr, python.rootplot.utilities.Hist2D.ylabel, HistogramManager.ylabel, python.rootplot.utilities.Hist.ylabel, and rpcdqm::utils.ylabel.

257  def TGraph(self, name=None):
258  """Return a ROOT.TGraphAsymmErrors object with contents of this Hist"""
259  x = array.array('f', self.x)
260  y = array.array('f', self.y)
261  xl = array.array('f', self.xerr[0])
262  xh = array.array('f', self.xerr[1])
263  yl = array.array('f', self.yerr[0])
264  yh = array.array('f', self.yerr[1])
265  tgraph = ROOT.TGraphAsymmErrors(self.nbins, x, y, xl, xh, yl, yh)
266  tgraph.SetName(name or self.name)
267  tgraph.SetTitle('%s;%s;%s' % (self.title, self.xlabel, self.ylabel))
268  return tgraph
def TGraph(self, name=None)
Definition: utilities.py:257
def python.rootplot.utilities.Hist.TH1F (   self,
  name = None 
)
Return a ROOT.TH1F object with contents of this Hist

Definition at line 239 of file utilities.py.

References python.rootplot.utilities.Hist.binlabels, protobuf_DQMServices_2fCore_2fsrc_2fROOTFilePB_2eproto::TableStruct.entries, SiStripMiscalibrate::Entry.entries, dataLoader.DataLoader.entries, SiStripPI::Entry.entries, LA_Filler_Fitter::Result.entries, python.rootplot.utilities.Hist2D.entries, TkOffTreeVariables.entries, PhysicsTools::TrainProcessor::SigBkg.entries, python.rootplot.utilities.Hist.entries, PhysicsTools::Calibration::MVAComputerContainer.entries, ElectronMVAID.ElectronMVAID.name, counter.Counter.name, average.Average.name, histograms.Histograms.name, AlignableObjectId::entry.name, TmModule.name, cond::persistency::TAG::NAME.name, cond::persistency::GLOBAL_TAG::NAME.name, cond::persistency::RUN_INFO::RUN_NUMBER.name, cond::persistency::TAG::TIME_TYPE.name, core.autovars.NTupleVariable.name, cond::persistency::RUN_INFO::START_TIME.name, cond::persistency::GLOBAL_TAG::VALIDITY.name, cond::persistency::TAG::OBJECT_TYPE.name, cond::persistency::GLOBAL_TAG::DESCRIPTION.name, cond::persistency::RUN_INFO::END_TIME.name, cond::persistency::TAG::SYNCHRONIZATION.name, cond::persistency::GLOBAL_TAG::RELEASE.name, cond::persistency::TAG::END_OF_VALIDITY.name, MEPSet.name, cond::persistency::GLOBAL_TAG::SNAPSHOT_TIME.name, cond::persistency::TAG::DESCRIPTION.name, cond::persistency::GTEditorData.name, cond::persistency::GLOBAL_TAG::INSERTION_TIME.name, cond::persistency::TAG::LAST_VALIDATED_TIME.name, cond::persistency::TAG::INSERTION_TIME.name, nanoaod::MergeableCounterTable::SingleColumn< T >.name, cond::persistency::TAG::MODIFICATION_TIME.name, FWTGeoRecoGeometry::Info.name, preexistingValidation.PreexistingValidation.name, OutputMEPSet.name, EventStringOutputBranches::NamedBranchPtr.name, SummaryTableOutputBranches::NamedBranchPtr.name, dataset.BaseDataset.name, personalPlayback.Applet.name, Types._Untracked.name, ParameterSet.name, PixelDCSObject< T >::Item.name, DQMRivetClient::LumiOption.name, MagCylinder.name, analyzer.Analyzer.name, production_tasks.Task.name, TriggerOutputBranches::NamedBranchPtr.name, ParSet.name, TableOutputBranches::NamedBranchPtr.name, edm::PathTimingSummary.name, DQMRivetClient::ScaleFactorOption.name, EgHLTOfflineSummaryClient::SumHistBinData.name, PhysicsTools::Source.name, SingleObjectCondition.name, cond::persistency::GTProxyData.name, MyWatcher.name, core.autovars.NTupleObjectType.name, edm::PathSummary.name, cond::TimeTypeSpecs.name, lumi::TriggerInfo.name, alignment.Alignment.name, PixelEndcapLinkMaker::Item.name, perftools::EdmEventSize::BranchRecord.name, cond::persistency::GLOBAL_TAG_MAP::GLOBAL_TAG_NAME.name, DQMGenericClient::EfficOption.name, FWTableViewManager::TableEntry.name, PixelBarrelLinkMaker::Item.name, cond::persistency::GLOBAL_TAG_MAP::RECORD.name, EcalLogicID.name, cond::persistency::GLOBAL_TAG_MAP::LABEL.name, cond::persistency::GLOBAL_TAG_MAP::TAG_NAME.name, MEtoEDM< T >::MEtoEDMObject.name, cms::DDAlgoArguments.name, ExpressionHisto< T >.name, XMLProcessor::_loaderBaseConfig.name, cond::persistency::PAYLOAD::HASH.name, python.rootplot.utilities.Hist2D.name, cond::persistency::PAYLOAD::OBJECT_TYPE.name, cond::persistency::PAYLOAD::DATA.name, cond::persistency::PAYLOAD::STREAMER_INFO.name, TreeCrawler.Package.name, genericValidation.GenericValidation.name, cond::persistency::PAYLOAD::VERSION.name, options.ConnectionHLTMenu.name, MagGeoBuilderFromDDD::volumeHandle.name, cond::persistency::PAYLOAD::INSERTION_TIME.name, DQMGenericClient::ProfileOption.name, dqmoffline::l1t::HistDefinition.name, nanoaod::MergeableCounterTable::VectorColumn< T >.name, DQMGenericClient::NormOption.name, emtf::Node.name, FastHFShowerLibrary.name, h4DSegm.name, PhysicsTools::Calibration::Variable.name, PhysicsTools::Variable::Value.name, core.TriggerMatchAnalyzer.TriggerMatchAnalyzer.name, DQMGenericClient::CDOption.name, TriggerObjectTableProducer::SelectedObject.name, CounterChecker.name, TrackerSectorStruct.name, cond::TagInfo_t.name, ProcTMVA::Method.name, TreeSaver::Var.name, DQMGenericClient::NoFlowOption.name, looper.Looper.name, python.rootplot.tree2hists.Plot.name, cond::persistency::IOV::TAG_NAME.name, EDMtoMEConverter.name, cond::persistency::IOV::SINCE.name, Mapper::definition< ScannerT >.name, cond::persistency::IOV::PAYLOAD_HASH.name, PhysicsTools::TreeReader::Value.name, classes.MonitorData.name, cond::persistency::IOV::INSERTION_TIME.name, HistogramManager.name, PhysicsTools::TrainProcessor.name, MuonGeometrySanityCheckPoint.name, classes.OutputData.name, PhysicsTools::MVAModuleHelper< Record, Object, Filler >::Value.name, PhysicsTools::ProcessRegistry< Base_t, CalibBase_t, Parent_t >.name, PhysicsTools::MVATrainer.name, options.HLTProcessOptions.name, h2DSegm.name, core.TriggerBitAnalyzer.TriggerBitAnalyzer.name, nanoaod::FlatTable::Column.name, python.rootplot.utilities.Hist.name, geometry.Structure.name, config.Analyzer.name, core.autovars.NTupleSubObject.name, DQMNet::WaitObject.name, AlpgenParameterName.name, NanoAODDQM::SelGroupConfig.name, SiStripMonitorDigi.name, core.autovars.NTupleObject.name, config.Service.name, PhysicsTools::Variable.name, cond::persistency::TAG_LOG::TAG_NAME.name, cond::persistency::TAG_LOG::EVENT_TIME.name, cond::persistency::TAG_LOG::USER_NAME.name, cond::persistency::TAG_LOG::HOST_NAME.name, cond::persistency::TAG_LOG::COMMAND.name, cond::persistency::TAG_LOG::ACTION.name, PhysicsTools::TrainerMonitoring::Object.name, cond::persistency::TAG_LOG::USER_TEXT.name, core.autovars.NTupleCollection.name, BPHRecoBuilder::BPHRecoSource.name, BPHRecoBuilder::BPHCompSource.name, personalPlayback.FrameworkJob.name, plotscripts.SawTeethFunction.name, crabFunctions.CrabTask.name, hTMaxCell.name, cscdqm::ParHistoDef.name, BeautifulSoup.Tag.name, Id.name, SummaryOutputProducer::GenericSummary.name, BeautifulSoup.SoupStrainer.name, TriggerDQMBase::MEbinning.nbins, MEbinning.nbins, sistrip::EnsembleCalibrationLA.nbins, MEPSet.nbins, SummationStep.nbins, ExpressionHisto< T >.nbins, JetMonitor::MEbinning.nbins, METMonitor::MEbinning.nbins, HTMonitor::MEHTbinning.nbins, HistogramGenerator.nbins, DiDispStaMuonMonitor::MEbinning.nbins, NoBPTXMonitor::NoBPTXbinning.nbins, ecaldqm::binning::AxisSpecs.nbins, PlotAlignmentValidation::DMRPlotInfo.nbins, python.rootplot.utilities.Hist.nbins, MuonAlignment.nbins, HLTObjectsMonitor::MEbinning.nbins, MuScleFitUtils.nbins, MuonAlignmentAnalyzer.nbins, PhysicsTools::TrainProcessor::SigBkg.overflow, python.rootplot.utilities.Hist.overflow, classes.PlotData.title, EventStringOutputBranches::NamedBranchPtr.title, preexistingValidation.PreexistingValidation.title, TriggerOutputBranches::NamedBranchPtr.title, DB_ME.title, TableOutputBranches::NamedBranchPtr.title, cscdqm::HistoBookRequest.title, FWTriggerTableView::Column.title, alignment.Alignment.title, DQMGenericClient::EfficOption.title, DQMGenericClient::ProfileOption.title, dqmoffline::l1t::HistDefinition.title, SiPixelGenErrorHeader.title, ecaldqm::binning::AxisSpecs.title, python.rootplot.utilities.Hist2D.title, big::bigHeader.title, HistogramManager.title, SiPixelTemplateHeader2D.title, presentation.SubsectionBase.title, python.rootplot.utilities.Hist.title, Geometry.title, TkAlMap.TkAlMap.title, TrackerMap.title, SiPixelTemplateHeader.title, PhysicsTools::TrainProcessor::SigBkg.underflow, python.rootplot.utilities.Hist.underflow, python.rootplot.utilities.Hist2D.xedges, python.rootplot.utilities.Hist.xedges, python.rootplot.utilities.Hist2D.xlabel, HistogramManager.xlabel, python.rootplot.utilities.Hist.xlabel, RPFlatParams::EP.y, stAPVGain.y, TkLayerMap::XYbin.y, TwoBodyDecayParameters.y, SimplePixel.y, reco::MuonChamberMatch.y, online::BeamSpot_v1.y, HGCal_helpers::Coordinates.y, Phase2ITPixelCluster::Pixel.y, LHCInterpolatedOpticalFunctionsSet::Kinematics.y, reco::MuonSegmentMatch.y, PhiInterval.y, SiPixelCluster::Pixel.y, VertexType.y, Pixinfo.y, Hit.y, MonitorTrackResidualsBase< pixel_or_strip >::HistoXY.y, PixelModule.y, Clust.y, python.rootplot.utilities.Hist2D.y, PixelUnpackingRegions::Module.y, Rechit.y, hit.y, MuonGeometryArrange::MGACollection.y, CTPPSLocalTrackLite.y, python.rootplot.utilities.Hist.y, python.rootplot.root2matplotlib.Hist.y, BeamSpotOnlineRaw_v4.y, Exhume::CrossSection.y, edmStreamStallGrapher.Point.y, svgfig.Plot.y, svgfig.Frame.y, svgfig.Curve.Sample.y, svgfig.Text.y, svgfig.TextGlobal.y, svgfig.HLine.y, PrimaryVertexMonitor.yerr, python.rootplot.utilities.Hist.yerr, python.rootplot.utilities.Hist2D.ylabel, HistogramManager.ylabel, python.rootplot.utilities.Hist.ylabel, and rpcdqm::utils.ylabel.

239  def TH1F(self, name=None):
240  """Return a ROOT.TH1F object with contents of this Hist"""
241  th1f = ROOT.TH1F(name or self.name, "", self.nbins,
242  array.array('f', self.xedges))
243  th1f.Sumw2()
244  th1f.SetTitle("%s;%s;%s" % (self.title, self.xlabel, self.ylabel))
245  for i in range(self.nbins):
246  th1f.SetBinContent(i + 1, self.y[i])
247  try:
248  th1f.SetBinError(i + 1, (self.yerr[0][i] + self.yerr[1][i]) / 2)
249  except TypeError:
250  th1f.SetBinError(i + 1, self.yerr[i])
251  if self.binlabels:
252  th1f.GetXaxis().SetBinLabel(i + 1, self.binlabels[i])
253  th1f.SetBinContent(0, self.underflow)
254  th1f.SetBinContent(self.nbins + 2, self.overflow)
255  th1f.SetEntries(self.entries)
256  return th1f
def TH1F(self, name=None)
Definition: utilities.py:239

Member Data Documentation

python.rootplot.utilities.Hist.binlabels
python.rootplot.utilities.Hist.entries
python.rootplot.utilities.Hist.label
python.rootplot.utilities.Hist.name
python.rootplot.utilities.Hist.nbins
python.rootplot.utilities.Hist.overflow
python.rootplot.utilities.Hist.rootclass

Definition at line 119 of file utilities.py.

python.rootplot.utilities.Hist.title
python.rootplot.utilities.Hist.underflow
python.rootplot.utilities.Hist.width
python.rootplot.utilities.Hist.x
python.rootplot.utilities.Hist.xedges
python.rootplot.utilities.Hist.xerr
python.rootplot.utilities.Hist.xlabel
python.rootplot.utilities.Hist.y
python.rootplot.utilities.Hist.yerr
python.rootplot.utilities.Hist.ylabel