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 | |
Represents one plot, comparing one or more histograms.
Definition at line 1691 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 1693 of file plotting.py.
|
private |
Create one histogram from a TDirectory.
Definition at line 1871 of file plotting.py.
References plotting._getOrCreateObject().
Referenced by plotting.Plot.create().
|
private |
Normalise histograms to unit area
Definition at line 1976 of file plotting.py.
References RunHistogramManager._histograms, and plotting.Plot._histograms.
Referenced by plotting.Plot.draw().
|
private |
Set stats box.
Definition at line 1935 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 2218 of file plotting.py.
References RunHistogramManager._histograms, plotting.Plot._histograms, and ComparisonHelper.zip().
def plotting.Plot.clone | ( | self, | |
kwargs | |||
) |
Definition at line 1833 of file plotting.py.
References GenericMVAComputerCache.isEmpty(), TkPhase2OTMeasurementDet.isEmpty(), TkPixelMeasurementDet.isEmpty(), reco::PFDisplacedVertexSeed.isEmpty(), MultipleKinematicConstraint.isEmpty(), KinematicTree.isEmpty(), L1MuBMTrackAssembler.isEmpty(), L1MuDTTrackAssembler.isEmpty(), BPHKinematicFit.isEmpty(), L1MuGMTInputEvent.isEmpty(), BXVector< T >.isEmpty(), TkStripMeasurementDet.isEmpty(), cond::persistency::IOVProxy.isEmpty(), HistoData.isEmpty, DDXMLElement.isEmpty(), html.Page.isEmpty(), plotting.PlotEmpty.isEmpty(), and plotting.Plot.isEmpty().
Create histograms from list of TDirectories
Definition at line 1885 of file plotting.py.
References plotting.Plot._createOne(), RunHistogramManager._histograms, plotting.Plot._histograms, FP420HitsObject._name, TrackerHitsObject._name, PGeometricDet::Item._name, LikelihoodSpecies._name, TrackingRecHitAlgorithm._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, GeometricDetExtra._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, SequenceTypes.TaskPlaceholder._name, plotting.Plot._name, Vispa.Gui.VispaWidget.VispaWidget._scale, plotting.AggregateBins._scale, HistoParams< T >._title, HistoParams< TProfile >._title, HistoParams< TH1F >._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, and genParticles_cff.map.
def plotting.Plot.draw | ( | self, | |
pad, | |||
ratio, | |||
ratioFactor, | |||
nrows | |||
) |
Draw the histograms using values for a given algorithm.
Definition at line 1989 of file plotting.py.
References RunHistogramManager._histograms, plotting.Plot._histograms, plotting._mergeBinLabelsX(), plotting._mergeBinLabelsY(), plotting.Plot._normalize(), plotting._th1IncludeOnlyBins(), HistoData.getName(), PhysicsTools::Source.getName(), emtf::Node.getName(), PassiveHit.getName(), CocoaMaterialElementary.getName(), ecaldqm::DBReaderWorker.getName(), LikelihoodSpecies.getName(), EcalLogicID.getName(), PCaloHit.getName(), ParticleFlux.getName(), ElectronMVAEstimatorRun2.getName(), pftools::SpaceManager.getName(), ecaldqm::DBWriterWorker.getName(), AnyMVAEstimatorRun2Base.getName(), LikelihoodPdf.getName(), TkOfflineVariables.getName(), hcaldqm::mapper::Mapper.getName(), FieldHandlerBase< TOutput >.getName(), FittedEntry.getName(), TrackingRecHitAlgorithm.getName(), hcaldqm::mapper::HashMapper.getName(), jsoncollector::JsonMonitorable.getName(), CSGAction.getName(), PhotonMVAEstimator.getName(), L1TUtmAlgorithm.getName(), L1TUtmScale.getName(), DTTPGLutFile.getName(), PhysicsTools::MVATrainer.getName(), L1TriggerLutFile.getName(), L1TUtmCondition.getName(), pos::PixelPortcardMap.getName(), QCriterion.getName(), L1MuGMTReg.getName(), GenericMVAComputer::TaggingVariableIterator< Iter_t >::Value.getName(), fastsim::InteractionModel.getName(), GEMStation.getName(), PhysicsTools::Variable::Value.getName(), pftools::SpaceVoxel.getName(), MVAVariableManager< ParticleType >.getName(), ecaldqm::DQWorker.getName(), RPCAMCLink.getName(), RPCDCCLink.getName(), L1TUtmObject.getName(), L1TUtmTriggerMenu.getName(), L1TUtmCut.getName(), edm::ELslProxy< ELgen >.getName(), L1MuGMTRegMMConfig.getName(), PhysicsTools::MVAModuleHelper< Record, Object, Filler >::Value.getName(), cscdqm::HistoDef.getName(), FourVectorHLT::PathInfo.getName(), RPCLBLink.getName(), MonitorElement.getName(), jsoncollector::DataPoint.getName(), edm::ELseverityLevel.getName(), PhysicsTools::Variable.getName(), PhysicsTools::TrainerMonitoring::Object.getName(), L1MuGMTRegSortRankOffset.getName(), L1MuGMTRegCDLConfig.getName(), cscdqm::CSCHistoDef.getName(), plotting.PlotEmpty.getName(), plotting.Plot.getName(), and plotting.Plot.isTGraph2D().
def plotting.Plot.drawRatioUncertainty | ( | self | ) |
def plotting.Plot.getName | ( | self | ) |
Definition at line 1859 of file plotting.py.
References FP420HitsObject._name, TrackerHitsObject._name, PGeometricDet::Item._name, TrackingRecHitAlgorithm._name, LikelihoodSpecies._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, GeometricDetExtra._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, 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 1840 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 1844 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 1854 of file plotting.py.
def plotting.Plot.isTGraph2D | ( | self | ) |
Definition at line 1848 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 1827 of file plotting.py.
|
private |
Definition at line 2231 of file plotting.py.
|
private |
Definition at line 2216 of file plotting.py.
|
private |
Definition at line 1825 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 2090 of file plotting.py.
|
private |
Definition at line 1754 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 2091 of file plotting.py.
|
private |
Definition at line 2094 of file plotting.py.
|
private |
Definition at line 2054 of file plotting.py.