Functions | |
def | TweakPlot |
Variables | |
tuple | arg_parser = optparse.OptionParser(description=desc_str) |
tuple | ax = fig.add_subplot(111) |
list | bin_edges |
tuple | cache_file_dir = cfg_parser.get("general", "cache_dir") |
dictionary | cfg_defaults |
tuple | cfg_parser = ConfigParser.SafeConfigParser(cfg_defaults) |
string | cmd = "pileupCalc.py -i %s --inputLumiJSON=%s %s %s" |
tuple | cms_energy_str = cfg_parser.get("general", "cms_energy_str") |
color_fill_pileup = color_scheme.color_fill_pileup | |
color_line_pileup = color_scheme.color_line_pileup | |
tuple | color_scheme = ColorScheme(color_scheme_name) |
list | color_scheme_names = [i.strip() for i in color_scheme_names_tmp.split(",")] |
tuple | color_scheme_names_tmp = cfg_parser.get("general", "color_schemes") |
list | config_file_name = args[0] |
string | desc_str = "This script creates the official CMS pileup plots " |
edgecolor = color_line_pileup, | |
tuple | exp = RoundAwayFromZero(math.log10(min_val)) |
facecolor = color_fill_pileup) | |
tuple | fig = plt.figure() |
file_suffix = color_scheme.file_suffix | |
fontproperties = FONT_PROPS_SUPTITLE) | |
string | help = "Ignore all cached PU results " |
string | histtype = "stepfilled" |
string | horizontalalignment = "right" |
ignore_cache = options.ignore_cache | |
tuple | in_file = TFile.Open(tmp_file_name, "READ") |
tuple | input_json = cfg_parser.get("general", "input_json") |
tuple | input_lumi_json = cfg_parser.get("general", "input_lumi_json") |
tuple | is_log = (type == "log") |
log_setting = False | |
string | log_suffix = "" |
logo_name = color_scheme.logo_name | |
tuple | min_val = min(weights) |
tuple | particle_type_str = cfg_parser.get("general", "particle_type_str") |
tuple | pileup_hist = in_file.Get("pileup") |
tuple | pileupcalc_flags_from_cfg = cfg_parser.get("general", "pileupcalc_flags") |
tuple | tmp_file_name = os.path.join(cache_file_dir,"pileup_calc_tmp.root") |
transform = ax.transAxes, | |
list | vals |
tuple | verbose = cfg_parser.getboolean("general", "verbose") |
For running on pre 3.6 files the current needed to determine the magnetic field is taken from Conditions DB. | |
list | weights |
tuple | year = int(cfg_parser.get("general", "year")) |
def create_public_pileup_plots::TweakPlot | ( | fig, | |
ax, | |||
add_extra_head_room = False |
|||
) |
Definition at line 61 of file create_public_pileup_plots.py.
00062 : 00063 00064 # Fiddle with axes ranges etc. 00065 ax.relim() 00066 ax.autoscale_view(False, True, True) 00067 for label in ax.get_xticklabels(): 00068 label.set_ha("right") 00069 label.set_rotation(30.) 00070 00071 # Bit of magic here: increase vertical scale by one tick to make 00072 # room for the legend. 00073 if add_extra_head_room: 00074 y_ticks = ax.get_yticks() 00075 (y_min, y_max) = ax.get_ylim() 00076 is_log = (ax.get_yscale() == "log") 00077 y_max_new = y_max 00078 if is_log: 00079 tmp = y_ticks[-1] / y_ticks[-2] 00080 y_max_new = y_max * math.pow(tmp, add_extra_head_room) 00081 else: 00082 tmp = y_ticks[-1] - y_ticks[-2] 00083 y_max_new = y_max + add_extra_head_room * tmp 00084 ax.set_ylim(y_min, y_max_new) 00085 00086 # Add a second vertical axis on the right-hand side. 00087 ax_sec = ax.twinx() 00088 ax_sec.set_ylim(ax.get_ylim()) 00089 ax_sec.set_yscale(ax.get_yscale()) 00090 00091 for ax_tmp in fig.axes: 00092 for sub_ax in [ax_tmp.xaxis, ax_tmp.yaxis]: 00093 for label in sub_ax.get_ticklabels(): 00094 label.set_font_properties(FONT_PROPS_TICK_LABEL) 00095 00096 if is_log: 00097 fig.subplots_adjust(top=.89, bottom=.125, left=.11, right=.925) 00098 else: 00099 fig.subplots_adjust(top=.89, bottom=.125, left=.1, right=.925) 00100 00101 # End of TweakPlot().
tuple create_public_pileup_plots::arg_parser = optparse.OptionParser(description=desc_str) |
Definition at line 108 of file create_public_pileup_plots.py.
tuple create_public_pileup_plots::ax = fig.add_subplot(111) |
Definition at line 232 of file create_public_pileup_plots.py.
00001 [pileup_hist.GetBinLowEdge(i) \ 00002 for i in xrange(1, pileup_hist.GetNbinsX() + 1)]
Definition at line 201 of file create_public_pileup_plots.py.
tuple create_public_pileup_plots::cache_file_dir = cfg_parser.get("general", "cache_dir") |
Definition at line 134 of file create_public_pileup_plots.py.
dictionary create_public_pileup_plots::cfg_defaults |
00001 { 00002 "pileupcalc_flags" : "", 00003 "color_schemes" : "Joe, Greg", 00004 "verbose" : False 00005 }
Definition at line 121 of file create_public_pileup_plots.py.
tuple create_public_pileup_plots::cfg_parser = ConfigParser.SafeConfigParser(cfg_defaults) |
Definition at line 126 of file create_public_pileup_plots.py.
string create_public_pileup_plots::cmd = "pileupCalc.py -i %s --inputLumiJSON=%s %s %s" |
Definition at line 171 of file create_public_pileup_plots.py.
tuple create_public_pileup_plots::cms_energy_str = cfg_parser.get("general", "cms_energy_str") |
Definition at line 150 of file create_public_pileup_plots.py.
create_public_pileup_plots::color_fill_pileup = color_scheme.color_fill_pileup |
Definition at line 217 of file create_public_pileup_plots.py.
create_public_pileup_plots::color_line_pileup = color_scheme.color_line_pileup |
Definition at line 216 of file create_public_pileup_plots.py.
tuple create_public_pileup_plots::color_scheme = ColorScheme(color_scheme_name) |
Definition at line 215 of file create_public_pileup_plots.py.
list create_public_pileup_plots::color_scheme_names = [i.strip() for i in color_scheme_names_tmp.split(",")] |
Definition at line 138 of file create_public_pileup_plots.py.
tuple create_public_pileup_plots::color_scheme_names_tmp = cfg_parser.get("general", "color_schemes") |
Definition at line 137 of file create_public_pileup_plots.py.
list create_public_pileup_plots::config_file_name = args[0] |
Definition at line 118 of file create_public_pileup_plots.py.
string create_public_pileup_plots::desc_str = "This script creates the official CMS pileup plots " |
Definition at line 106 of file create_public_pileup_plots.py.
Definition at line 236 of file create_public_pileup_plots.py.
tuple create_public_pileup_plots::exp = RoundAwayFromZero(math.log10(min_val)) |
Definition at line 228 of file create_public_pileup_plots.py.
Definition at line 237 of file create_public_pileup_plots.py.
tuple create_public_pileup_plots::fig = plt.figure() |
Definition at line 221 of file create_public_pileup_plots.py.
create_public_pileup_plots::file_suffix = color_scheme.file_suffix |
Definition at line 219 of file create_public_pileup_plots.py.
create_public_pileup_plots::fontproperties = FONT_PROPS_SUPTITLE) |
Definition at line 243 of file create_public_pileup_plots.py.
string create_public_pileup_plots::help = "Ignore all cached PU results " |
Definition at line 110 of file create_public_pileup_plots.py.
string create_public_pileup_plots::histtype = "stepfilled" |
Definition at line 235 of file create_public_pileup_plots.py.
string create_public_pileup_plots::horizontalalignment = "right" |
Definition at line 255 of file create_public_pileup_plots.py.
create_public_pileup_plots::ignore_cache = options.ignore_cache |
Definition at line 119 of file create_public_pileup_plots.py.
tuple create_public_pileup_plots::in_file = TFile.Open(tmp_file_name, "READ") |
Definition at line 185 of file create_public_pileup_plots.py.
tuple create_public_pileup_plots::input_json = cfg_parser.get("general", "input_json") |
Definition at line 144 of file create_public_pileup_plots.py.
tuple create_public_pileup_plots::input_lumi_json = cfg_parser.get("general", "input_lumi_json") |
Definition at line 145 of file create_public_pileup_plots.py.
tuple create_public_pileup_plots::is_log = (type == "log") |
Definition at line 224 of file create_public_pileup_plots.py.
tuple create_public_pileup_plots::log_setting = False |
Definition at line 225 of file create_public_pileup_plots.py.
string create_public_pileup_plots::log_suffix = "" |
Definition at line 262 of file create_public_pileup_plots.py.
create_public_pileup_plots::logo_name = color_scheme.logo_name |
Definition at line 218 of file create_public_pileup_plots.py.
tuple create_public_pileup_plots::min_val = min(weights) |
Definition at line 227 of file create_public_pileup_plots.py.
tuple create_public_pileup_plots::particle_type_str = cfg_parser.get("general", "particle_type_str") |
Definition at line 148 of file create_public_pileup_plots.py.
tuple create_public_pileup_plots::pileup_hist = in_file.Get("pileup") |
Definition at line 190 of file create_public_pileup_plots.py.
tuple create_public_pileup_plots::pileupcalc_flags_from_cfg = cfg_parser.get("general", "pileupcalc_flags") |
Definition at line 143 of file create_public_pileup_plots.py.
tuple create_public_pileup_plots::tmp_file_name = os.path.join(cache_file_dir,"pileup_calc_tmp.root") |
Definition at line 169 of file create_public_pileup_plots.py.
create_public_pileup_plots::transform = ax.transAxes, |
Definition at line 254 of file create_public_pileup_plots.py.
Referenced by AlignableObjectId::AlignableObjectId(), AlignableBeamSpot::alignments(), AlignableDet::alignments(), AlignableDetUnit::alignments(), AlphaT::AlphaT(), EcalBarrelMonitorClient::analyze(), SiStripRecHitsValid::analyze(), EcalEndcapMonitorClient::analyze(), edm::ContainerMask< T >::applyOrTo(), edm::ScheduleInfo::availableModuleLabels(), edm::Schedule::availablePaths(), reco::helper::JetIDHelper::classifyJetComponents(), reco::helper::JetIDHelper::classifyJetTowers(), TkGluedMeasurementDet::collectRecHits(), edmNew::copyDetSetRange(), ConstrainedTreeBuilder::covarianceMatrix(), ConstrainedTreeBuilderT::covarianceMatrix(), SiStripLorentzAngleGenerator::createObject(), align::createPoints(), evf::iDie::defaultWeb(), FWDetailViewManager::detailViewsFor(), RecoTauMVATransform::discriminate(), evf::iDie::dumpTable(), FWDetailViewManager::findViewersFor(), FWEveViewManager::FWEveViewManager(), EcalFedMap::getFedFromSlice(), edm::DetSetVector< T >::getIds(), CSCStripElectronicsSim::getKeyStripsFromMC(), reco::TaggingVariableList::getList(), edm::ParameterSet::getParameterNames(), edm::ParameterSet::getParameterSetNames(), pat::JetCorrFactors::jecFlavor(), ora::MappingRules::nameForSchema(), reco::tau::RecoTauDiscriminantInvariantWidth::operator()(), ato< bool >::operator()(), ThirdHitRZPrediction< Propagator >::operator()(), CSCStripData::operator*=(), GaussianSumUtilities1D::pdfComponents(), evf::iDie::postEntry(), SiStripProcessedRawDigiProducer::pr_process(), pat::MatcherByPulls< T >::produce(), EcalTrivialConditionRetriever::produceEcalAlignmentEB(), EcalTrivialConditionRetriever::produceEcalAlignmentEE(), EcalTrivialConditionRetriever::produceEcalAlignmentES(), edm::eventsetup::EventSetupRecordProvider::proxyProviderDescriptions(), QualityCutsAnalyzer::QualityCutsAnalyzer(), ctfseeding::range2SeedingHits(), RecoTauMVATransform::RecoTauMVATransform(), LMFColoredTable::setColor(), TransientTrackingRecHit::setPositionErrors(), gen::Pythia6Service::setSLHAFromHeader(), Herwig6Hadronizer::setSLHAFromHeader(), LMFPnPrimDat::setSystem(), LMFColoredTable::setSystem(), TrackerGeometryCompare::surveyToTracker(), TauDiscriminationProducerBase< TauType, TauDiscriminator >::TauDiscriminationProducerBase(), TrackerStablePhiSort(), TrackTransformer::transform(), upcaseString(), TrackingMaterialProducer::update(), and sistrip::FEDEmulator::zeroSuppress().
00001 [pileup_hist.GetBinCenter(i) \ 00002 for i in xrange(1, pileup_hist.GetNbinsX() + 1)]
Definition at line 203 of file create_public_pileup_plots.py.
Referenced by fwlite::ObjectCountSelector< Collection >::accept(), fwlite::Scanner< Collection >::count(), DDConstant::createConstantsFromEvaluator(), PhysicsTools::TrainProcessor::doTrainData(), fwlite::Scanner< Collection >::draw(), fwlite::Scanner< Collection >::draw2D(), fwlite::Scanner< Collection >::drawGraph(), fwlite::Scanner< Collection >::drawProf(), Vx3DHLTAnalyzer::endLuminosityBlock(), fwlite::Scanner< Collection >::fillDataSet(), CastorLEDMonitor::processEvent(), 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(), PhysicsTools::Spline::Spline(), and DDStreamer::vars_write().
tuple create_public_pileup_plots::verbose = cfg_parser.getboolean("general", "verbose") |
For running on pre 3.6 files the current needed to determine the magnetic field is taken from Conditions DB.
process.load("Configuration.StandardSequences.FrontierConditions_GlobalTag_cff") specify tag: process.GlobalTag.globaltag = 'START36_V10::All' or use auto-cond: from Configuration.AlCa.autoCond import autoCond process.GlobalTag.globaltag = autoCond['mc'] Request EveService Extractor of geometry needed to display it in Eve. Required for "DummyEvelyser".
For running on pre 3.6 files the current needed to determine the magnetic field is taken from Conditions DB.
Required for "DummyEvelyser".
Definition at line 140 of file create_public_pileup_plots.py.
00001 [pileup_hist.GetBinContent(i) \ 00002 for i in xrange(1, pileup_hist.GetNbinsX() + 1)]
Definition at line 205 of file create_public_pileup_plots.py.
Referenced by EcalTPGParamBuilder::analyze(), ZMuPtScaleAnalyzer::analyze(), zPdfUnc::analyze(), EWKSystUnc::analyze(), ZLONLOHistogrammer::analyze(), ZMCHistogrammer::analyze(), ecaldqm::SelectiveReadoutTask::beginRun(), CSCSegAlgoSK::calculateError(), CSCSegAlgoShowering::calculateError(), CSCSegAlgoST::calculateError(), CSCSegAlgoHitPruning::calculateError(), CSCSegAlgoDF::calculateError(), CSCSegAlgoTC::calculateError(), EcalSelectiveReadoutProducer::checkWeights(), GsfChi2MeasurementEstimator::estimate(), PdfSystematicsAnalyzer::filter(), EcalSelectiveReadoutValidation::frame2EnergyForTp(), PrimaryVertexValidation::getMAD(), popcon::EcalSRPHandler::getNewObjects(), MLP_Stochastic(), MuIsoByTrackPt::MuIsoByTrackPt(), PlotCombiner(), LHECOMWeightProducer::produce(), edm::BeamHaloProducer::produce(), EcalTBWeightUncalibRecHitProducer::produce(), PdfWeightProducer::produce(), edm::BeamHaloSource::produce(), EcalTrigPrimESProducer::produceWeight(), QuantileCalculator::QuantileCalculator(), EndcapPiZeroDiscriminatorAlgo::readWeightFile(), muonisolation::IsolatorByDeposit::setWeights(), GsfMultiStateUpdator::update(), GsfMaterialEffectsUpdator::updateState(), EcalDccWeightBuilder::writeWeightToAsciiFile(), EcalDccWeightBuilder::writeWeightToDB(), and EcalDccWeightBuilder::writeWeightToRootFile().
tuple create_public_pileup_plots::year = int(cfg_parser.get("general", "year")) |
Definition at line 149 of file create_public_pileup_plots.py.