Public Member Functions | |
def | __init__ (self, name, kwargs) |
def | addToLegend (self, legend, legendLabels, denomUncertainty) |
def | clone (self, kwargs) |
def | create (self, tdirNEvents, requireAllHistograms=False) |
def | draw (self, pad, ratio, ratioFactor, nrows) |
def | drawRatioUncertainty (self) |
def | getName (self) |
def | getNumberOfHistograms (self) |
def | isEmpty (self) |
def | isRatio (self, ratio) |
def | isTGraph2D (self) |
def | setName (self, name) |
def | setProperties (self, kwargs) |
Private Member Functions | |
def | _createOne (self, name, index, tdir, nevents) |
def | _normalize (self) |
def | _setStats (self, histos, startingX, startingY) |
Private Attributes | |
_forLegend | |
_frame | |
_histograms | |
_mainAdditional | |
_name | |
_ratioAdditional | |
_ratios | |
_tmp_histos | |
_xtitle | |
_ytitle | |
Represents one plot, comparing one or more histograms.
Definition at line 1695 of file plotting.py.
def plotting.Plot.__init__ | ( | self, | |
name, | |||
kwargs | |||
) |
Constructor. Arguments: name -- String for name of the plot, or Efficiency object Keyword arguments: fallback -- Dictionary for specifying fallback (default None) outname -- String for an output name of the plot (default None for the same as 'name') title -- String for a title of the plot (default None) xtitle -- String for x axis title (default None) xtitlesize -- Float for x axis title size (default None) xtitleoffset -- Float for x axis title offset (default None) xlabelsize -- Float for x axis label size (default None) ytitle -- String for y axis title (default None) ytitlesize -- Float for y axis title size (default None) ytitleoffset -- Float for y axis title offset (default None) ztitle -- String for z axis title (default None) ztitleoffset -- Float for z axis title offset (default None) xmin -- Float for x axis minimum (default None, i.e. automatic) xmax -- Float for x axis maximum (default None, i.e. automatic) ymin -- Float for y axis minimum (default 0) ymax -- Float for y axis maximum (default None, i.e. automatic) xlog -- Bool for x axis log status (default False) ylog -- Bool for y axis log status (default False) xgrid -- Bool for x axis grid status (default True) ygrid -- Bool for y axis grid status (default True) stat -- Draw stat box? (default False) fit -- Do gaussian fit? (default False) statx -- Stat box x coordinate (default 0.65) staty -- Stat box y coordinate (default 0.8) statyadjust -- List of floats for stat box y coordinate adjustments (default None) normalizeToUnitArea -- Normalize histograms to unit area? (default False) normalizeToNumberOfEvents -- Normalize histograms to number of events? If yes, the PlotFolder needs 'numberOfEventsHistogram' set to a histogram filled once per event (default False) profileX -- Take histograms via ProfileX()? (default False) fitSlicesY -- Take histograms via FitSlicesY() (default False) rebinX -- rebin x axis (default None) scale -- Scale histograms by a number (default None) xbinlabels -- List of x axis bin labels (if given, default None) xbinlabelsize -- Size of x axis bin labels (default None) xbinlabeloption -- Option string for x axis bin labels (default None) removeEmptyBins -- Bool for removing empty bins, but only if histogram has bin labels (default False) printBins -- Bool for printing bin values, but only if histogram has bin labels (default False) drawStyle -- If "hist", draw as line instead of points (default None) drawCommand -- Deliver this to Draw() (default: None for same as drawStyle) lineWidth -- If drawStyle=="hist", the width of line (default 2) legendDx -- Float for moving TLegend in x direction for separate=True (default None) legendDy -- Float for moving TLegend in y direction for separate=True (default None) legendDw -- Float for changing TLegend width for separate=True (default None) legendDh -- Float for changing TLegend height for separate=True (default None) legend -- Bool to enable/disable legend (default True) adjustMarginLeft -- Float for adjusting left margin (default None) adjustMarginRight -- Float for adjusting right margin (default None) ratio -- Possibility to disable ratio for this particular plot (default None) ratioYmin -- Float for y axis minimum in ratio pad (default: list of values) ratioYmax -- Float for y axis maximum in ratio pad (default: list of values) ratioFit -- Fit straight line in ratio? (default None) ratioUncertainty -- Plot uncertainties on ratio? (default True) ratioCoverageXrange -- Range of x axis values (xmin,xmax) to limit the automatic ratio y axis range calculation to (default None for disabled) histogramModifier -- Function to be called in create() to modify the histograms (default None)
Definition at line 1697 of file plotting.py.
|
private |
Create one histogram from a TDirectory.
Definition at line 1878 of file plotting.py.
References plotting._getOrCreateObject().
Referenced by plotting.Plot.create().
|
private |
Normalise histograms to unit area
Definition at line 1984 of file plotting.py.
References RunHistogramManager._histograms, and plotting.Plot._histograms.
Referenced by plotting.Plot.draw().
|
private |
Set stats box.
Definition at line 1942 of file plotting.py.
References DTSC._stat, and DTTrigGeom._stat.
def plotting.Plot.addToLegend | ( | self, | |
legend, | |||
legendLabels, | |||
denomUncertainty | |||
) |
Add histograms to a legend. Arguments: legend -- TLegend legendLabels -- List of strings for the legend labels
Definition at line 2230 of file plotting.py.
References RunHistogramManager._histograms, plotting.Plot._histograms, and ComparisonHelper.zip().
def plotting.Plot.clone | ( | self, | |
kwargs | |||
) |
Definition at line 1837 of file plotting.py.
References GenericMVAComputerCache.isEmpty(), TkPhase2OTMeasurementDet.isEmpty(), TkPixelMeasurementDet.isEmpty(), TkStackMeasurementDet.isEmpty(), reco::PFDisplacedVertexSeed.isEmpty(), MultipleKinematicConstraint.isEmpty(), KinematicTree.isEmpty(), L1MuDTTrackAssembler.isEmpty(), L1MuBMTrackAssembler.isEmpty(), L1MuGMTInputEvent.isEmpty(), cond::TagInfo_t.isEmpty(), BPHKinematicFit.isEmpty(), cond::persistency::IOVArray.isEmpty(), TkStripMeasurementDet.isEmpty(), BXVector< T >.isEmpty(), HistoData.isEmpty, FWGeometry.isEmpty(), DDXMLElement.isEmpty(), html.Page.isEmpty(), plotting.PlotEmpty.isEmpty(), and plotting.Plot.isEmpty().
def plotting.Plot.create | ( | self, | |
tdirNEvents, | |||
requireAllHistograms = False |
|||
) |
Create histograms from list of TDirectories
Definition at line 1892 of file plotting.py.
References plotting.Plot._createOne(), RunHistogramManager._histograms, plotting.Plot._histograms, FP420HitsObject._name, TrackerHitsObject._name, PGeometricDet::Item._name, TrackingRecHitAlgorithm._name, Logger._name, hcaldqm::DQModule._name, citk::IsolationConeDefinitionBase._name, WValidation._name, DrellYanValidation._name, hcaldqm::flag::Flag._name, hcaldqm::quantity::Quantity._name, HistoParams< T >._name, CutApplicatorBase._name, HistoParams< TH2F >._name, HistoParams< TProfile2D >._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, SequenceTypes._TaskBasePlaceholder._name, plotting.Plot._name, plotting.AggregateBins._scale, HistoParams< TH1F >._title, HistoParams< TProfile >._title, HistoParams< T >._title, HistoParams< TH2F >._title, SiStripHitEffFromCalibTree._title, HistoParams< TProfile2D >._title, html.PageSet._title, plotting.Subtract._title, html.HtmlReport._title, plotting.Transform._title, plotting.FakeDuplicate._title, plotting.CutEfficiency._title, genParticles_cff.map, and FastTimerService_cff.range.
def plotting.Plot.draw | ( | self, | |
pad, | |||
ratio, | |||
ratioFactor, | |||
nrows | |||
) |
Draw the histograms using values for a given algorithm.
Definition at line 1997 of file plotting.py.
References RunHistogramManager._histograms, plotting.Plot._histograms, plotting._mergeBinLabelsX(), plotting._mergeBinLabelsY(), plotting.Plot._normalize(), plotting._th1IncludeOnlyBins(), HistoData.getName(), MaterialInformation.getName(), trklet::MemoryBase.getName(), EcalLogicID.getName(), PCaloHit.getName(), emtf::Node.getName(), CocoaMaterialElementary.getName(), trklet::ProcessBase.getName(), ecaldqm::DBReaderWorker.getName(), ParticleFlux.getName(), L1TUtmScale.getName(), FittedEntry.getName(), hcaldqm::mapper::Mapper.getName(), ecaldqm::DBWriterWorker.getName(), TkOfflineVariables.getName(), FieldHandlerBase< TOutput >.getName(), L1TUtmCondition.getName(), IdealResult.getName(), TrackingRecHitAlgorithm.getName(), L1TUtmAlgorithm.getName(), PassiveHit.getName(), jsoncollector::JsonMonitorable.getName(), QCriterion.getName(), hcaldqm::mapper::HashMapper.getName(), CSGAction.getName(), MVAVariableManager< ParticleType >.getName(), AnyMVAEstimatorRun2Base.getName(), DTTPGLutFile.getName(), AlignmentAlgorithm.getName(), L1TriggerLutFile.getName(), fastsim::InteractionModel.getName(), L1MuGMTReg.getName(), GenericMVAComputer::TaggingVariableIterator< Iter_t >::Value.getName(), pos::PixelPortcardMap.getName(), L1TUtmCut.getName(), GEMStation.getName(), PhysicsTools::Variable::Value.getName(), edm::messagelogger::ELseverityLevel.getName(), L1TUtmObject.getName(), L1TUtmTriggerMenu.getName(), edm::ELseverityLevel.getName(), RPCDCCLink.getName(), RPCAMCLink.getName(), L1MuGMTRegMMConfig.getName(), JanAlignmentAlgorithm.getName(), cscdqm::HistoDef.getName(), FourVectorHLT::PathInfo.getName(), RPCLBLink.getName(), jsoncollector::DataPoint.getName(), ecaldqm::DQWorker.getName(), PhysicsTools::Variable.getName(), dqm::impl::MonitorElement.getName(), L1MuGMTRegSortRankOffset.getName(), L1MuGMTRegCDLConfig.getName(), cscdqm::CSCHistoDef.getName(), plotting.PlotEmpty.getName(), plotting.Plot.getName(), plotting.Plot.isTGraph2D(), and print().
def plotting.Plot.drawRatioUncertainty | ( | self | ) |
Return true if the ratio uncertainty should be drawn
Definition at line 1874 of file plotting.py.
def plotting.Plot.getName | ( | self | ) |
Definition at line 1866 of file plotting.py.
References FP420HitsObject._name, TrackerHitsObject._name, PGeometricDet::Item._name, TrackingRecHitAlgorithm._name, Logger._name, hcaldqm::DQModule._name, citk::IsolationConeDefinitionBase._name, WValidation._name, DrellYanValidation._name, hcaldqm::flag::Flag._name, hcaldqm::quantity::Quantity._name, HistoParams< T >._name, CutApplicatorBase._name, HistoParams< TH2F >._name, HistoParams< TProfile2D >._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, SequenceTypes._TaskBasePlaceholder._name, plotting.Plot._name, and str.
Referenced by plotting.Plot.draw().
def plotting.Plot.getNumberOfHistograms | ( | self | ) |
Return number of existing histograms.
Definition at line 1844 of file plotting.py.
References RunHistogramManager._histograms, and plotting.Plot._histograms.
Referenced by plotting.Plot.isEmpty().
def plotting.Plot.isEmpty | ( | self | ) |
Return true if there are no histograms created for the plot
Definition at line 1848 of file plotting.py.
References plotting.PlotEmpty.getNumberOfHistograms(), and plotting.Plot.getNumberOfHistograms().
Referenced by plotting.Plot.clone().
def plotting.Plot.isRatio | ( | self, | |
ratio | |||
) |
Definition at line 1858 of file plotting.py.
def plotting.Plot.isTGraph2D | ( | self | ) |
Definition at line 1852 of file plotting.py.
References RunHistogramManager._histograms, and plotting.Plot._histograms.
Referenced by plotting.Plot.draw().
def plotting.Plot.setName | ( | self, | |
name | |||
) |
Definition at line 1863 of file plotting.py.
References FP420HitsObject._name, TrackerHitsObject._name, PGeometricDet::Item._name, TrackingRecHitAlgorithm._name, Logger._name, hcaldqm::DQModule._name, citk::IsolationConeDefinitionBase._name, WValidation._name, DrellYanValidation._name, hcaldqm::flag::Flag._name, hcaldqm::quantity::Quantity._name, HistoParams< T >._name, CutApplicatorBase._name, HistoParams< TH2F >._name, HistoParams< TProfile2D >._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, SequenceTypes._TaskBasePlaceholder._name, and plotting.Plot._name.
def plotting.Plot.setProperties | ( | self, | |
kwargs | |||
) |
Definition at line 1831 of file plotting.py.
|
private |
Definition at line 2243 of file plotting.py.
|
private |
Definition at line 2228 of file plotting.py.
|
private |
Definition at line 1829 of file plotting.py.
Referenced by plotting.Plot._normalize(), plotting.Plot.addToLegend(), plotting.Plot.create(), plotting.Plot.draw(), plotting.Plot.getNumberOfHistograms(), and plotting.Plot.isTGraph2D().
|
private |
Definition at line 2098 of file plotting.py.
|
private |
Definition at line 1758 of file plotting.py.
Referenced by trackingPlots.TimePerEventPlot.__str__(), trackingPlots.TimePerTrackPlot.__str__(), trackingPlots.TimePerEventPlot._create(), plotting.PlotGroup._drawSeparate(), plotting.PlotGroup._save(), trackingPlots.TimePerTrackPlot.create(), plotting.Plot.create(), plotting.PlotGroup.draw(), plotting.Plot.getName(), plotting.PlotGroup.getName(), plotting.PlotterFolder.getName(), plotting.PlotterItem.getName(), plotting.PlotterFolder.getSelectionNameIterator(), validation.SimpleSample.name(), trackingPlots.Iteration.name(), plotting.PlotterItem.readDirs(), plotting.PlotGroup.remove(), and plotting.Plot.setName().
|
private |
Definition at line 2099 of file plotting.py.
|
private |
Definition at line 2102 of file plotting.py.
|
private |
Definition at line 2062 of file plotting.py.
|
private |
Definition at line 2166 of file plotting.py.
|
private |
Definition at line 2176 of file plotting.py.