Public Member Functions | |
def | __init__ (self, name, plots, kwargs) |
def | append (self, plot) |
def | clear (self) |
def | create (self, tdirectoryNEvents, requireAllHistograms=False) |
def | draw (self, legendLabels, prefix=None, separate=False, saveFormat=".pdf", ratio=True, directory="") |
def | getName (self) |
def | getPlot (self, name) |
def | getPlots (self) |
def | onlyForPileup (self) |
def | remove (self, name) |
def | setProperties (self, kwargs) |
Private Member Functions | |
def | _createLegend (self, plot, legendLabels, lx1, ly1, lx2, ly2, textSize=0.016, denomUncertainty=True) |
def | _drawSeparate (self, legendLabels, prefix, saveFormat, ratio, directory) |
def | _modifyPadForRatio (self, pad) |
def | _save (self, canvas, saveFormat, prefix=None, postfix=None, single=False, directory="") |
Private Attributes | |
_name | |
_plots | |
_ratioFactor | |
Group of plots, results a TCanvas
Definition at line 2239 of file plotting.py.
def plotting.PlotGroup.__init__ | ( | self, | |
name, | |||
plots, | |||
kwargs | |||
) |
Constructor. Arguments: name -- String for name of the TCanvas, used also as the basename of the picture files plots -- List of Plot objects Keyword arguments: ncols -- Number of columns (default 2) legendDx -- Float for moving TLegend in x direction (default None) legendDy -- Float for moving TLegend in y direction (default None) legendDw -- Float for changing TLegend width (default None) legendDh -- Float for changing TLegend height (default None) legend -- Bool for disabling legend (default True for legend being enabled) overrideLegendLabels -- List of strings for legend labels, if given, these are used instead of the ones coming from Plotter (default None) onlyForPileup -- Plots this group only for pileup samples
Definition at line 2241 of file plotting.py.
|
private |
Definition at line 2468 of file plotting.py.
References GeometryComparisonPlotter._legend.
Referenced by plotting.PlotGroup._drawSeparate(), and plotting.PlotGroup.draw().
|
private |
Internal method to do the drawing to separate files per Plot instead of a file per PlotGroup
Definition at line 2402 of file plotting.py.
References plotting._createCanvas(), plotting.PlotGroup._createLegend(), plotting.PlotGroup._modifyPadForRatio(), 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, ElectronMVAEstimatorRun2Phys14NonTrig._name, CutApplicatorBase._name, PhotonMVAEstimatorRun2Spring15NonTrig._name, PhotonMVAEstimatorRun2Phys14NonTrig._name, ElectronMVAEstimatorRun2Spring15Trig._name, ElectronMVAEstimatorRun2Spring15NonTrig._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, plotting.PlotGroup._name, plotting.PlotGroup._plots, plotting.PlotGroup._ratioFactor, plotting.PlotGroup._save(), and createfilelist.int.
Referenced by plotting.PlotGroup.draw().
|
private |
Internal method to set divide a pad to two for ratio plots
Definition at line 2464 of file plotting.py.
References plotting.PlotGroup._ratioFactor.
Referenced by plotting.PlotGroup._drawSeparate(), and plotting.PlotGroup.draw().
|
private |
Definition at line 2484 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, ElectronMVAEstimatorRun2Phys14NonTrig._name, CutApplicatorBase._name, PhotonMVAEstimatorRun2Spring15NonTrig._name, PhotonMVAEstimatorRun2Phys14NonTrig._name, ElectronMVAEstimatorRun2Spring15Trig._name, ElectronMVAEstimatorRun2Spring15NonTrig._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 plotting.PlotGroup._name.
Referenced by plotting.PlotGroup._drawSeparate(), and plotting.PlotGroup.draw().
def plotting.PlotGroup.append | ( | self, | |
plot | |||
) |
def plotting.PlotGroup.clear | ( | self | ) |
Create histograms from a list of TDirectories. Arguments: tdirectoryNEvents -- List of (TDirectory, nevents) pairs requireAllHistograms -- If True, a plot is produced if histograms from all files are present (default: False)
Definition at line 2315 of file plotting.py.
References plotting.PlotGroup._plots.
def plotting.PlotGroup.draw | ( | self, | |
legendLabels, | |||
prefix = None , |
|||
separate = False , |
|||
saveFormat = ".pdf" , |
|||
ratio = True , |
|||
directory = "" |
|||
) |
Draw the histograms using values for a given algorithm. Arguments: legendLabels -- List of strings for legend labels (corresponding to the tdirectories in create()) prefix -- Optional string for file name prefix (default None) separate -- Save the plots of a group to separate files instead of a file per group (default False) saveFormat -- String specifying the plot format (default '.pdf') ratio -- Add ratio to the plot (default True) directory -- Directory where to save the file (default "")
Definition at line 2325 of file plotting.py.
References plotting._createCanvas(), plotting.PlotGroup._createLegend(), plotting.PlotGroup._drawSeparate(), plotting.PlotGroup._modifyPadForRatio(), 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, ElectronMVAEstimatorRun2Phys14NonTrig._name, CutApplicatorBase._name, PhotonMVAEstimatorRun2Spring15NonTrig._name, PhotonMVAEstimatorRun2Phys14NonTrig._name, ElectronMVAEstimatorRun2Spring15Trig._name, ElectronMVAEstimatorRun2Spring15NonTrig._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, plotting.PlotGroup._name, plotting.PlotGroup._plots, plotting.PlotGroup._ratioFactor, plotting.PlotGroup._save(), createfilelist.int, and SiStripPI.max.
def plotting.PlotGroup.getName | ( | self | ) |
Definition at line 2286 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, ElectronMVAEstimatorRun2Phys14NonTrig._name, CutApplicatorBase._name, PhotonMVAEstimatorRun2Spring15NonTrig._name, PhotonMVAEstimatorRun2Phys14NonTrig._name, ElectronMVAEstimatorRun2Spring15Trig._name, ElectronMVAEstimatorRun2Spring15NonTrig._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 plotting.PlotGroup._name.
def plotting.PlotGroup.getPlot | ( | self, | |
name | |||
) |
def plotting.PlotGroup.getPlots | ( | self | ) |
def plotting.PlotGroup.onlyForPileup | ( | self | ) |
Return True if the PlotGroup is intended only for pileup samples
Definition at line 2311 of file plotting.py.
References plotting.PlotFolder._onlyForPileup.
def plotting.PlotGroup.remove | ( | self, | |
name | |||
) |
Definition at line 2292 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, ElectronMVAEstimatorRun2Phys14NonTrig._name, CutApplicatorBase._name, PhotonMVAEstimatorRun2Spring15NonTrig._name, PhotonMVAEstimatorRun2Phys14NonTrig._name, ElectronMVAEstimatorRun2Spring15Trig._name, ElectronMVAEstimatorRun2Spring15NonTrig._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, plotting.PlotGroup._name, and plotting.PlotGroup._plots.
def plotting.PlotGroup.setProperties | ( | self, | |
kwargs | |||
) |
Definition at line 2280 of file plotting.py.
|
private |
Definition at line 2260 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.PlotGroup.draw(), 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 2261 of file plotting.py.
Referenced by plotting.PlotGroup._drawSeparate(), plotting.Plotter.appendTable(), plotting.PlotGroup.clear(), plotting.Plotter.clear(), trackingPlots.TrackingSeedingLayerTable.create(), plotting.PlotGroup.create(), trackingPlots.TrackingSeedingLayerTable.draw(), plotting.PlotGroup.draw(), plotting.PlotGroup.getPlot(), plotting.Plotter.getPlotFolder(), plotting.Plotter.getPlotFolderNames(), plotting.Plotter.getPlotFolders(), plotting.PlotGroup.getPlots(), plotting.Plotter.readDirs(), and plotting.PlotGroup.remove().
|
private |
Definition at line 2278 of file plotting.py.
Referenced by plotting.PlotGroup._drawSeparate(), plotting.PlotGroup._modifyPadForRatio(), and plotting.PlotGroup.draw().