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 1673 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 1675 of file plotting.py.
|
private |
Create one histogram from a TDirectory.
Definition at line 1856 of file plotting.py.
References plotting._getOrCreateObject().
Referenced by plotting.Plot.create().
|
private |
Normalise histograms to unit area
Definition at line 1962 of file plotting.py.
References RunHistogramManager._histograms, and plotting.Plot._histograms.
Referenced by plotting.Plot.draw().
|
private |
Set stats box.
Definition at line 1920 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 2208 of file plotting.py.
References RunHistogramManager._histograms, plotting.Plot._histograms, and reco.zip().
def plotting.Plot.clone | ( | self, | |
kwargs | |||
) |
Definition at line 1815 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(), L1RegionData< T1 >.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 1870 of file plotting.py.
References plotting.Plot._createOne(), RunHistogramManager._histograms, plotting.Plot._histograms, ModulesProxy._ModuleProxy._name, FP420HitsObject._name, TrackerHitsObject._name, PGeometricDet::Item._name, TrackingRecHitAlgorithm._name, Logger._name, hcaldqm::DQModule._name, citk::IsolationConeDefinitionBase._name, condhdf5tohdf5.H5DataProduct._name, WValidation._name, DrellYanValidation._name, hcaldqm::flag::Flag._name, hcaldqm::quantity::Quantity._name, HistoParams< T >._name, condhdf5tohdf5.H5Tag._name, CutApplicatorBase._name, condhdf5tohdf5.H5GlobalTag._name, HistoParams< TH2F >._name, HistoParams< TProfile2D >._name, conddb2hdf5.DBGlobalTag._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, 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 isotrackApplyRegressor.range.
def plotting.Plot.draw | ( | self, | |
pad, | |||
ratio, | |||
ratioFactor, | |||
nrows | |||
) |
Draw the histograms using values for a given algorithm.
Definition at line 1975 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(), FittedEntry.getName(), hcaldqm::mapper::Mapper.getName(), ecaldqm::DBWriterWorker.getName(), FieldHandlerBase< TOutput >.getName(), IdealResult.getName(), TrackingRecHitAlgorithm.getName(), PassiveHit.getName(), jsoncollector::JsonMonitorable.getName(), QCriterion.getName(), hcaldqm::mapper::HashMapper.getName(), CSGAction.getName(), MVAVariableManager< ParticleType >.getName(), AnyMVAEstimatorRun2Base.getName(), DTTPGLutFile.getName(), AlignmentAlgorithm.getName(), L1TUtmCondition.getName(), L1TriggerLutFile.getName(), TkOfflineVariables.getName(), fastsim::InteractionModel.getName(), L1MuGMTReg.getName(), GenericMVAComputer::TaggingVariableIterator< Iter_t >::Value.getName(), pos::PixelPortcardMap.getName(), GEMStation.getName(), PhysicsTools::Variable::Value.getName(), edm::messagelogger::ELseverityLevel.getName(), edm::ELseverityLevel.getName(), RPCDCCLink.getName(), RPCAMCLink.getName(), L1TUtmAlgorithm.getName(), L1TUtmScale.getName(), L1MuGMTRegMMConfig.getName(), L1TUtmCut.getName(), JanAlignmentAlgorithm.getName(), L1TUtmObject.getName(), FourVectorHLT::PathInfo.getName(), cscdqm::HistoDef.getName(), L1TUtmTriggerMenu.getName(), jsoncollector::DataPoint.getName(), RPCLBLink.getName(), ecaldqm::DQWorker.getName(), PhysicsTools::Variable.getName(), PrepareDMRTrends.getName(), lutNN::LutNeuronLayerFixedPoint< input_I, input_F, inputSize, lut_I, lut_F, neurons, output_I >.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 1852 of file plotting.py.
def plotting.Plot.getName | ( | self | ) |
Definition at line 1844 of file plotting.py.
References ModulesProxy._ModuleProxy._name, FP420HitsObject._name, TrackerHitsObject._name, PGeometricDet::Item._name, TrackingRecHitAlgorithm._name, Logger._name, hcaldqm::DQModule._name, citk::IsolationConeDefinitionBase._name, condhdf5tohdf5.H5DataProduct._name, WValidation._name, DrellYanValidation._name, hcaldqm::flag::Flag._name, hcaldqm::quantity::Quantity._name, HistoParams< T >._name, condhdf5tohdf5.H5Tag._name, CutApplicatorBase._name, condhdf5tohdf5.H5GlobalTag._name, HistoParams< TH2F >._name, HistoParams< TProfile2D >._name, conddb2hdf5.DBGlobalTag._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 1822 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 1826 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 1836 of file plotting.py.
def plotting.Plot.isTGraph2D | ( | self | ) |
Definition at line 1830 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 1841 of file plotting.py.
References ModulesProxy._ModuleProxy._name, FP420HitsObject._name, TrackerHitsObject._name, PGeometricDet::Item._name, TrackingRecHitAlgorithm._name, Logger._name, hcaldqm::DQModule._name, citk::IsolationConeDefinitionBase._name, condhdf5tohdf5.H5DataProduct._name, WValidation._name, DrellYanValidation._name, hcaldqm::flag::Flag._name, hcaldqm::quantity::Quantity._name, HistoParams< T >._name, condhdf5tohdf5.H5Tag._name, CutApplicatorBase._name, condhdf5tohdf5.H5GlobalTag._name, HistoParams< TH2F >._name, HistoParams< TProfile2D >._name, conddb2hdf5.DBGlobalTag._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 1809 of file plotting.py.
|
private |
Definition at line 2221 of file plotting.py.
|
private |
Definition at line 2206 of file plotting.py.
|
private |
Definition at line 1807 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 2076 of file plotting.py.
|
private |
Definition at line 1736 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 2077 of file plotting.py.
|
private |
Definition at line 2080 of file plotting.py.
|
private |
Definition at line 2040 of file plotting.py.
|
private |
Definition at line 2144 of file plotting.py.
|
private |
Definition at line 2154 of file plotting.py.