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 | 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 1694 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 1696 of file plotting.py.
|
private |
Create one histogram from a TDirectory.
Definition at line 1874 of file plotting.py.
References plotting._getOrCreateObject().
Referenced by plotting.Plot.create().
|
private |
Normalise histograms to unit area
Definition at line 1979 of file plotting.py.
References RunHistogramManager._histograms, and plotting.Plot._histograms.
Referenced by plotting.Plot.draw().
|
private |
Set stats box.
Definition at line 1938 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 2225 of file plotting.py.
References RunHistogramManager._histograms, plotting.Plot._histograms, and ComparisonHelper.zip().
def plotting.Plot.clone | ( | self, | |
** | kwargs | ||
) |
Definition at line 1836 of file plotting.py.
References GenericMVAComputerCache.isEmpty(), TkPhase2OTMeasurementDet.isEmpty(), TkPixelMeasurementDet.isEmpty(), TkStackMeasurementDet.isEmpty(), reco::PFDisplacedVertexSeed.isEmpty(), MultipleKinematicConstraint.isEmpty(), KinematicTree.isEmpty(), L1MuDTTrackAssembler.isEmpty(), L1MuGMTInputEvent.isEmpty(), L1MuBMTrackAssembler.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 1888 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, DrellYanValidation._name, WValidation._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.TaskPlaceholder._name, plotting.Plot._name, plotting.AggregateBins._scale, HistoParams< T >._title, HistoParams< TH2F >._title, SiStripHitEffFromCalibTree._title, HistoParams< TProfile2D >._title, html.PageSet._title, html.HtmlReport._title, plotting.Subtract._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 1992 of file plotting.py.
References RunHistogramManager._histograms, plotting.Plot._histograms, plotting._mergeBinLabelsX(), plotting._mergeBinLabelsY(), plotting.Plot._normalize(), plotting._th1IncludeOnlyBins(), HistoData.getName(), trklet::MemoryBase.getName(), emtf::Node.getName(), EcalLogicID.getName(), PCaloHit.getName(), trklet::ProcessBase.getName(), CocoaMaterialElementary.getName(), ecaldqm::DBReaderWorker.getName(), ParticleFlux.getName(), L1TUtmScale.getName(), ecaldqm::DBWriterWorker.getName(), hcaldqm::mapper::Mapper.getName(), FittedEntry.getName(), TkOfflineVariables.getName(), FieldHandlerBase< TOutput >.getName(), L1TUtmCondition.getName(), IdealResult.getName(), hcaldqm::mapper::HashMapper.getName(), L1TUtmAlgorithm.getName(), PassiveHit.getName(), jsoncollector::JsonMonitorable.getName(), TrackingRecHitAlgorithm.getName(), AnyMVAEstimatorRun2Base.getName(), QCriterion.getName(), CSGAction.getName(), MVAVariableManager< ParticleType >.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(), L1TUtmObject.getName(), L1TUtmTriggerMenu.getName(), RPCAMCLink.getName(), RPCDCCLink.getName(), ecaldqm::DQWorker.getName(), edm::ELseverityLevel.getName(), PhysicsTools::MVAModuleHelper< Record, Object, Filler >::Value.getName(), L1MuGMTRegMMConfig.getName(), JanAlignmentAlgorithm.getName(), cscdqm::HistoDef.getName(), FourVectorHLT::PathInfo.getName(), jsoncollector::DataPoint.getName(), RPCLBLink.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 1870 of file plotting.py.
def plotting.Plot.getName | ( | self | ) |
Definition at line 1862 of file plotting.py.
References FP420HitsObject._name, TrackerHitsObject._name, PGeometricDet::Item._name, TrackingRecHitAlgorithm._name, Logger._name, hcaldqm::DQModule._name, citk::IsolationConeDefinitionBase._name, DrellYanValidation._name, WValidation._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.TaskPlaceholder._name, plotting.Plot._name, and str.
Referenced by plotting.Plot.draw().
def plotting.Plot.getNumberOfHistograms | ( | self | ) |
Return number of existing histograms.
Definition at line 1843 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 1847 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 1857 of file plotting.py.
def plotting.Plot.isTGraph2D | ( | self | ) |
Definition at line 1851 of file plotting.py.
References RunHistogramManager._histograms, and plotting.Plot._histograms.
Referenced by plotting.Plot.draw().
def plotting.Plot.setProperties | ( | self, | |
** | kwargs | ||
) |
Definition at line 1830 of file plotting.py.
|
private |
Definition at line 2238 of file plotting.py.
|
private |
Definition at line 2223 of file plotting.py.
|
private |
Definition at line 1828 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 2093 of file plotting.py.
|
private |
Definition at line 1757 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(), and plotting.PlotGroup.remove().
|
private |
Definition at line 2094 of file plotting.py.
|
private |
Definition at line 2097 of file plotting.py.
|
private |
Definition at line 2057 of file plotting.py.
|
private |
Definition at line 2161 of file plotting.py.
|
private |
Definition at line 2171 of file plotting.py.