CMS 3D CMS Logo

Functions | Variables
create_public_pileup_plots Namespace Reference

Functions

def TweakPlot (fig, ax, add_extra_head_room=False)
 

Variables

 action
 
 arg_parser
 
 args
 
 ax
 
 bin_edges
 
 bins
 
 cache_file_dir
 
 cfg_defaults
 
 cfg_parser
 
 cmd
 
 cms_energy_str
 
 color_fill_pileup
 
 color_line_pileup
 
 color_scheme
 
 color_scheme_names
 
 color_scheme_names_tmp
 
 config_file_name
 
 desc_str
 
 description
 
 edgecolor
 
 exp
 
 facecolor
 
 fig
 
 file
 
 file_suffix
 
 fontproperties
 
 help
 
 hist
 
 histtype
 
 horizontalalignment
 
 ignore_cache
 
 IgnoreCommandLineOptions
 
 in_file
 
 input_json
 
 input_lumi_json
 
 is_log
 
 log
 
 log_setting
 
 log_suffix
 
 logo_name
 
 min_val
 
 options
 
 output
 
 particle_type_str
 
 pileup_hist
 
 pileupcalc_flags_from_cfg
 
 status
 
 tmp_file_name
 
 transform
 
 vals
 
 verbose
 
 weights
 
 year
 

Function Documentation

def create_public_pileup_plots.TweakPlot (   fig,
  ax,
  add_extra_head_room = False 
)

Definition at line 61 of file create_public_pileup_plots.py.

61 def TweakPlot(fig, ax, add_extra_head_room=False):
62 
63  # Fiddle with axes ranges etc.
64  ax.relim()
65  ax.autoscale_view(False, True, True)
66  for label in ax.get_xticklabels():
67  label.set_ha("right")
68  label.set_rotation(30.)
69 
70  # Bit of magic here: increase vertical scale by one tick to make
71  # room for the legend.
72  if add_extra_head_room:
73  y_ticks = ax.get_yticks()
74  (y_min, y_max) = ax.get_ylim()
75  is_log = (ax.get_yscale() == "log")
76  y_max_new = y_max
77  if is_log:
78  tmp = y_ticks[-1] / y_ticks[-2]
79  y_max_new = y_max * math.pow(tmp, add_extra_head_room)
80  else:
81  tmp = y_ticks[-1] - y_ticks[-2]
82  y_max_new = y_max + add_extra_head_room * tmp
83  ax.set_ylim(y_min, y_max_new)
84 
85  # Add a second vertical axis on the right-hand side.
86  ax_sec = ax.twinx()
87  ax_sec.set_ylim(ax.get_ylim())
88  ax_sec.set_yscale(ax.get_yscale())
89 
90  for ax_tmp in fig.axes:
91  for sub_ax in [ax_tmp.xaxis, ax_tmp.yaxis]:
92  for label in sub_ax.get_ticklabels():
93  label.set_font_properties(FONT_PROPS_TICK_LABEL)
94 
95  if is_log:
96  fig.subplots_adjust(top=.89, bottom=.125, left=.11, right=.925)
97  else:
98  fig.subplots_adjust(top=.89, bottom=.125, left=.1, right=.925)
99 
100  # End of TweakPlot().
101 
def TweakPlot(fig, ax, add_extra_head_room=False)

Variable Documentation

create_public_pileup_plots.action

Definition at line 109 of file create_public_pileup_plots.py.

create_public_pileup_plots.arg_parser

Definition at line 108 of file create_public_pileup_plots.py.

create_public_pileup_plots.args

Definition at line 113 of file create_public_pileup_plots.py.

create_public_pileup_plots.ax

Definition at line 228 of file create_public_pileup_plots.py.

create_public_pileup_plots.bin_edges

Definition at line 197 of file create_public_pileup_plots.py.

create_public_pileup_plots.bins

Definition at line 230 of file create_public_pileup_plots.py.

Referenced by egHLT::MonElemFuncs.addTightLooseTrigHist(), JetResolutionDemo.analyze(), PhysicsPerformanceDBWriterTFormula_fromfile_WPandPL.beginJob(), MuonTrackValidatorBase.BinLogX(), FSQ::HandlerTemplate< TInputCandidateType, TOutputCandidateType, filter >.book(), FastTimerService::PlotsPerPath.book(), SiPixelActionExecutor.bookEfficiency(), ME0DigisValidation.bookHistograms(), TopDiLeptonDQM.bookHistograms(), TauTagValidation.bookHistograms(), PrimaryVertexAnalyzer4PUSlimmed.bookHistograms(), HcalDDDRecConstants.dddConstants(), divide(), METTesterPostProcessor.dqmEndJob(), egHLT::EleHLTFilterMon.EleHLTFilterMon(), SimHitsValidationHcal::etaRange.etaRange(), HistogramManager.executeExtend(), CalibrationSummaryFactory.extract(), DaqScopeModeSummaryFactory.extract(), NoiseSummaryFactory.extract(), PedsFullNoiseSummaryFactory.extract(), PedestalsSummaryFactory.extract(), PedsOnlySummaryFactory.extract(), DaqScopeModeTask.fill(), CSCValHists.fill1DHist(), CSCValHists.fill1DHistByChamber(), CSCValHists.fill1DHistByCrate(), CSCValHists.fill1DHistByLayer(), CSCValHists.fill1DHistByStation(), CSCValHists.fill1DHistByType(), CSCValHists.fillCalibHist(), DiDispStaMuonMonitor.fillDescriptions(), NoBPTXMonitor.fillDescriptions(), DiJetMonitor.fillDescriptions(), METplusTrackMonitor.fillDescriptions(), PhotonMonitor.fillDescriptions(), TopMonitor.fillDescriptions(), MuonMonitor.fillDescriptions(), JetMonitor.fillDescriptions(), METMonitor.fillDescriptions(), HTMonitor.fillDescriptions(), RPCNoisyStripTest.fillGlobalME(), HTDQM.fillHtDescription(), JetDQM.fillJetDescription(), METDQM.fillMetDescription(), FastTimerServiceClient.fillPathSummaryPlots(), HcalQLPlotHistoMgr.GetAHistogramImpl(), HcalDDDRecConstants.getEtaBins(), egHLT::MonElemFuncs.getIB(), SimHitsValidationHcal.getLimits(), SiPixelQualityProbabilities.getPileUpBins(), JME::JetResolutionObject.getRecord(), HcalDDDRecConstants.getThickActive(), HFShowerLibraryEventInfo.HFShowerLibraryEventInfo(), CSCValidation.histoEfficiency(), identity(), egHLT::MonElemFuncs.initTightLooseTrigHists(), egHLT::MonElemFuncs.initTrigTagProbeHist(), egHLT::MonElemFuncs.initTrigTagProbeHist_2Leg(), egHLT::MonElemFuncs.initTrigTagProbeHists(), npstat.interpolateHistoND(), CastorLedAnalysis.LedTrendings(), HcalLedAnalysis.LedTrendings(), LA_Filler_Fitter.make_and_fit_symmchi2(), reco::tau::RecoTauDiscriminationBinnedIsolation.operator()(), egHLT::PhoHLTFilterMon.operator=(), egHLT::EleHLTFilterMon.operator=(), CastorPedestalAnalysis.per2CapsHists(), HcalPedestalAnalysis.per2CapsHists(), egHLT::PhoHLTFilterMon.PhoHLTFilterMon(), MuonResiduals6DOFFitter.plot(), ThroughputService.preGlobalBeginRun(), reco::tau::RecoTauDiscriminationBinnedIsolation.RecoTauDiscriminationBinnedIsolation(), LA_Filler_Fitter.rms_profile(), ecaldqm::MESetProjection.setBinContent(), ecaldqm::MESetProjection.setBinEntries(), ecaldqm::MESetProjection.setBinError(), TagProbeFitter.setBinnedFit(), TagProbeFitter.setBinsForMassPlots(), ESTrendTask.shift2Left(), ESTrendTask.shift2Right(), LA_Filler_Fitter.subset_probability(), CastorPedestalAnalysis.Trendings(), HcalPedestalAnalysis.Trendings(), Folder.update(), CSCEfficiency.~CSCEfficiency(), and ESTrendTask.~ESTrendTask().

create_public_pileup_plots.cache_file_dir

Definition at line 132 of file create_public_pileup_plots.py.

create_public_pileup_plots.cfg_defaults

Definition at line 120 of file create_public_pileup_plots.py.

create_public_pileup_plots.cfg_parser

Definition at line 125 of file create_public_pileup_plots.py.

create_public_pileup_plots.cmd

Definition at line 169 of file create_public_pileup_plots.py.

create_public_pileup_plots.cms_energy_str

Definition at line 148 of file create_public_pileup_plots.py.

create_public_pileup_plots.color_fill_pileup

Definition at line 213 of file create_public_pileup_plots.py.

create_public_pileup_plots.color_line_pileup

Definition at line 212 of file create_public_pileup_plots.py.

create_public_pileup_plots.color_scheme

Definition at line 211 of file create_public_pileup_plots.py.

create_public_pileup_plots.color_scheme_names

Definition at line 136 of file create_public_pileup_plots.py.

create_public_pileup_plots.color_scheme_names_tmp

Definition at line 135 of file create_public_pileup_plots.py.

create_public_pileup_plots.config_file_name

Definition at line 117 of file create_public_pileup_plots.py.

create_public_pileup_plots.desc_str

Definition at line 106 of file create_public_pileup_plots.py.

create_public_pileup_plots.description

Definition at line 108 of file create_public_pileup_plots.py.

create_public_pileup_plots.edgecolor

Definition at line 232 of file create_public_pileup_plots.py.

create_public_pileup_plots.exp

Definition at line 224 of file create_public_pileup_plots.py.

create_public_pileup_plots.facecolor

Definition at line 233 of file create_public_pileup_plots.py.

create_public_pileup_plots.fig

Definition at line 217 of file create_public_pileup_plots.py.

create_public_pileup_plots.file

Definition at line 31 of file create_public_pileup_plots.py.

create_public_pileup_plots.file_suffix

Definition at line 215 of file create_public_pileup_plots.py.

create_public_pileup_plots.fontproperties

Definition at line 239 of file create_public_pileup_plots.py.

create_public_pileup_plots.help

Definition at line 110 of file create_public_pileup_plots.py.

create_public_pileup_plots.hist

Definition at line 33 of file create_public_pileup_plots.py.

create_public_pileup_plots.histtype

Definition at line 231 of file create_public_pileup_plots.py.

create_public_pileup_plots.horizontalalignment

Definition at line 251 of file create_public_pileup_plots.py.

create_public_pileup_plots.ignore_cache

Definition at line 118 of file create_public_pileup_plots.py.

create_public_pileup_plots.IgnoreCommandLineOptions

Definition at line 39 of file create_public_pileup_plots.py.

create_public_pileup_plots.in_file

Definition at line 182 of file create_public_pileup_plots.py.

create_public_pileup_plots.input_json

Definition at line 142 of file create_public_pileup_plots.py.

create_public_pileup_plots.input_lumi_json

Definition at line 143 of file create_public_pileup_plots.py.

create_public_pileup_plots.is_log

Definition at line 220 of file create_public_pileup_plots.py.

create_public_pileup_plots.log

Definition at line 230 of file create_public_pileup_plots.py.

create_public_pileup_plots.log_setting

Definition at line 221 of file create_public_pileup_plots.py.

create_public_pileup_plots.log_suffix

Definition at line 258 of file create_public_pileup_plots.py.

create_public_pileup_plots.logo_name

Definition at line 214 of file create_public_pileup_plots.py.

create_public_pileup_plots.min_val

Definition at line 223 of file create_public_pileup_plots.py.

create_public_pileup_plots.options

Definition at line 113 of file create_public_pileup_plots.py.

create_public_pileup_plots.output

Definition at line 175 of file create_public_pileup_plots.py.

create_public_pileup_plots.particle_type_str

Definition at line 146 of file create_public_pileup_plots.py.

create_public_pileup_plots.pileup_hist

Definition at line 186 of file create_public_pileup_plots.py.

create_public_pileup_plots.pileupcalc_flags_from_cfg

Definition at line 141 of file create_public_pileup_plots.py.

create_public_pileup_plots.status

Definition at line 175 of file create_public_pileup_plots.py.

create_public_pileup_plots.tmp_file_name

Definition at line 167 of file create_public_pileup_plots.py.

create_public_pileup_plots.transform

Definition at line 250 of file create_public_pileup_plots.py.

create_public_pileup_plots.vals

Definition at line 199 of file create_public_pileup_plots.py.

Referenced by fwlite::ObjectCountSelector< Collection >.accept(), L1TMuonBarrelParamsHelper.configFromDB(), fwlite::Scanner< Collection >.count(), DDConstant.createConstantsFromEvaluator(), HcalDbASCIIIO.createObject< HcalElectronicsMap >(), DDStrVector.DDStrVector(), DDVector.DDVector(), CharmTagger.discriminator(), PhysicsTools::TrainProcessor.doTrainData(), fwlite::Scanner< Collection >.draw(), fwlite::Scanner< Collection >.draw2D(), fwlite::Scanner< Collection >.drawGraph(), fwlite::Scanner< Collection >.drawProf(), btagbtvdeep.dump_vector(), Vx3DHLTAnalyzer.endLuminosityBlock(), SimpleFlatTableProducerBase< T, TProd >::FuncVariable< StringFunctor, ValType >.fill(), SimpleFlatTableProducer< T >::ValueMapVariable< TIn, ValType >.fill(), fwlite::Scanner< Collection >.fillDataSet(), ReducedEGProducer.produce(), BetaStarVarProducer< T >.produce(), PFEGammaFilters.readEBEEParams_(), ElectronEnergyRegressionEvaluate.regressionUncertaintyNoTrkVar(), ElectronEnergyRegressionEvaluate.regressionUncertaintyNoTrkVarV1(), ElectronEnergyRegressionEvaluate.regressionUncertaintyWithSubClusters(), ElectronEnergyRegressionEvaluate.regressionUncertaintyWithTrkVar(), ElectronEnergyRegressionEvaluate.regressionUncertaintyWithTrkVarV1(), ElectronEnergyRegressionEvaluate.regressionUncertaintyWithTrkVarV2(), ElectronEnergyRegressionEvaluate.regressionValueNoTrkVar(), ElectronEnergyRegressionEvaluate.regressionValueNoTrkVarV1(), ElectronEnergyRegressionEvaluate.regressionValueWithSubClusters(), ElectronEnergyRegressionEvaluate.regressionValueWithTrkVar(), ElectronEnergyRegressionEvaluate.regressionValueWithTrkVarV1(), ElectronEnergyRegressionEvaluate.regressionValueWithTrkVarV2(), fwlite::Scanner< Collection >.scan(), edm::MultiAssociation< C >::LazyFiller.setValues(), and PhysicsTools::Spline.Spline().

create_public_pileup_plots.verbose

Definition at line 138 of file create_public_pileup_plots.py.

create_public_pileup_plots.weights

Definition at line 201 of file create_public_pileup_plots.py.

create_public_pileup_plots.year

Definition at line 147 of file create_public_pileup_plots.py.