Functions
genie::utils::style Namespace Reference

GENIE style! More...

Functions

void SetDefaultStyle (bool black_n_white=false)
 
void Format (TGraph *gr, int lcol, int lsty, int lwid, int mcol, int msty, double msiz)
 
void Format (TH1 *hst, int lcol, int lsty, int lwid, int mcol, int msty, double msiz)
 

Detailed Description

GENIE style!

Author
Costas Andreopoulos <costas.andreopoulos stfc.ac.uk> University of Liverpool & STFC Rutherford Appleton Lab

July 29, 2010

Copyright (c) 2003-2019, The GENIE Collaboration For the full text of the license visit http://copyright.genie-mc.org or see $GENIE/LICENSE

Function Documentation

void genie::utils::style::Format ( TGraph *  gr,
int  lcol,
int  lsty,
int  lwid,
int  mcol,
int  msty,
double  msiz 
)

Definition at line 154 of file Style.cxx.

References SetLineColor(), SetLineStyle(), SetLineWidth(), SetMarkerColor(), SetMarkerSize(), and SetMarkerStyle().

Referenced by accum_nue_numu_equivalent(), accum_nue_numu_equivalent_fhc(), accum_nue_numu_equivalent_rhc(), ana::DataMCPair::AddExposure(), DataMCPair::AddExposureArea(), DataMCPair::AddExposurePOT(), ana::FCCollection::AddFiles(), calib::ADCShapeFitAna::analyze(), cmf::AnalyzeWeighters::analyze(), fnex::AnalyzeWeighters::analyze(), calib::ThresholdAna::beginRun(), BuildMetricsTree(), BuildMetricsTree_OnMon(), caf_nue_data_mc(), calcAlphaBetaEachBin(), calculateComponentsNumu(), calculateWrongSignNue(), calculateWrongSignNumuQ1(), calculateWrongSignNumuQ2(), calculateWrongSignNumuQ3(), calculateWrongSignNumuQ4(), check_file_success_rate(), ana::CombineMetadata(), CompareHistos(), CompareHistos_Here(), ana::CompareNDDataMCFromVector(), ana::CompareNDDataTwoMC(), ana::ComparisonTableNbins(), ana::ComparisonTableOne(), ana::ComparisonTableOneNbins(), CondenseDetCfg(), CondenseRunList(), convert_g4lbne(), convert_g4minerva(), CorrectRange(), calib::CosmicCalib::CosmicCalib(), count_library_stats(), datamc_ND_numu_kinematics(), datamc_ND_numu_kinematics_FHC(), datamc_ND_numu_kinematics_FHC_pTBins(), datamc_ND_numu_kinematics_FHC_REW(), datamc_ND_numu_kinematics_FHC_REW_pTBins(), datamc_ND_numu_kinematics_REW(), datamc_ND_numu_kinematics_RHC(), datamc_ND_numu_kinematics_RHC_pTBins(), datamc_ND_numu_kinematics_RHC_REW(), datamc_ND_numu_kinematics_RHC_REW_pTBins(), ana::PredictionInterp::DebugPlot(), ana::PredictionInterp::DebugPlots(), ana::PredictionInterp::DebugPlotsColz(), demoFitSlices(), lem::EventSummary::Description(), Draw(), drawLabel(), drawLabelRatio(), drawLabelUnosc(), DrawLegendBF(), DrawLegendBF2(), DrawLegendBF3(), drawQuantLabel(), ana::DrawQuantLabel(), DrawSignMarker(), calib::SumSubrunsCalib::endRun(), calib::AttenFit::endRun(), calib::SumSubrunsCalib::endSubRun(), calib::CosmicCalib::endSubRun(), calib::AttenFit::endSubRun(), ana::ISurface::EnsureAxes(), ana::SAMQuerySource::EnsureDataset(), ana::SAMQuerySource::EnsureSnapshot(), fake_future_data(), FCTutorial2020(), fd_plot(), FDDataMC(), febrates(), febshutoff(), FillFlavorContainers(), calib::AttenFit::fit_channel_prof(), calib::AttenuationFit::fit_channel_prof(), fit_thresh_corrs(), fit_thresh_corrs_fb(), ana::FixMeSummary(), cmf::ShifterAndWeighter::FluxPCAWeight(), fnex::ShifterAndWeighter::FluxPCAWeight(), for(), ana::Progress::FormatTime(), fragmentYields(), fragmentYieldsPlot(), lem::dec::Forest::FromFile(), futureSig_reach_singlePOTcombo_syst(), genie_syst_shifts(), cmf::ShifterAndWeighter::GeniePCASystWeight(), fnex::ShifterAndWeighter::GeniePCASystWeight(), get_data_and_cosmic(), lem::get_http_response_internal(), caldp::AttenProfilesMap::GetAllProfilesByPlaneAndCell(), calib::CosmicCalib::GetChannelHists(), calib::MakeAttenuationProfiles::GetChannelHists(), align::Alignment::GetChannelHists(), calib::AttenCache::GetCSVPath(), GetFCPath(), GetFileName(), ana::GetFluxPrincipals2018(), ana::GetFluxPrincipals2020(), ana::GetFluxPrincipalsND2018(), ana::GetGeniePrincipals2018(), ana::GetGeniePrincipals2018Small(), ana::GetGeniePrincipals2020Small(), GetHist(), GetManualSubruns(), ana::SpectrumLoaderBase::GetNextFile(), GetPartList(), GetPartList_4DB(), ana::GetPPFXFluxUnivWgtSmooth_NT(), ana::GetPPFXPrincipals(), ana::GetPPFXPrincipalsSBAna(), ana::GetPPFXUnivSyst(), GetProcessed(), evgen::CORSIKAGen::GetSample(), GetSubrunSets(), lem::LEMWorker::GetWork(), ana::SpectrumLoader::Go(), ana::FileReducer::Go(), GoodDataSelDate(), GoodDataSelDuration(), GoodDataSelEmptySpillFrac(), GoodDataSelGoodDB(), GoodDataSelLiveTime(), GoodDataSelMipRate(), GoodDataSelNumSlices(), GoodDataSelRuns(), GoodDataSelTimingPeakEnd(), GoodDataSelTimingPeakStart(), GoodDataSelTrkFrac(), GoodRuns(), ana::NuWROSyst::InitializeHistograms(), ana::CutOptimization::Integrate(), ana::InteractionSpectra::InteractionSpectra(), InvestigatePeriods(), joint_fit_2017_slices(), joint_fit_2018_slices(), joint_fit_2019_bestfit(), joint_fit_2019_slices(), joint_fit_future_bestfit_univ(), ksTest(), ana::SystShifts::LatexName(), lem::LEMClient::LEMClient(), lem::LEMMixer::LEMPartFor(), lem::LEMWorker::LEMWorker(), lem::LEMWorkerOutput::LEMWorkerOutput(), chaninfo::BadChanList::LoadCosmicEff(), cmf::ShifterAndWeighter::LoadFluxBeamSystHists(), fnex::ShifterAndWeighter::LoadFluxBeamSystHists(), ana::Binning::LoadFrom(), ana::MultiExperiment::LoadFrom(), ana::PredictionCombinePeriods::LoadFrom(), ana::FrequentistSurface::LoadFrom(), ana::CutOptimization::LoadFrom(), ana::Multiverse::LoadFrom(), ana::ReweightableSpectrum::LoadFrom(), ana::OscillatableSpectrum::LoadFrom(), ana::Spectrum::LoadFrom(), ana::PredictionInterp::LoadFromBody(), calib::TimingCache::LoadFromDatabase(), calib::AbsCache::LoadFromVldDatabase(), cmf::ShifterAndWeighter::LoadGeniePCASystHists(), fnex::ShifterAndWeighter::LoadGeniePCASystHists(), gibuu::GiBUURegen::LoadGiBUUCorrs(), gibuu::GiBUURegen::LoadGiBUURecords(), ana::Nus17SystFromHist::LoadHists(), ana::NusSystFromHist::LoadHists(), ana::Nus18SystFromHist::LoadHists(), fnex::ShifterAndWeighter::LoadNueSystHists(), ana::SAMQuerySource::LocateSAMFiles(), ana::SAMQuerySource::LocationsForSAMQuery(), make_cosmic_eff_table(), make_fc_mass_and_oct_nersc_2018(), make_fc_mass_and_oct_nersc_2019(), MakeCSV(), MakeDetCfgCSV(), MakeDQValidityCSV(), MakeDQValidityCSVND(), MakePlots(), makeRatioPlot(), makeResolutionPlots(), MakeRunList(), cmf::StarPlot::MakeStarPlot(), fnex::StarPlot::MakeStarPlot(), MakeSummaryTable(), MakeTimeSeries(), airshower::AirSlicer::MakeTrackSlices(), monoprob(), mrbrem_get_initial_spectra(), mrbrem_get_reweighted_spectra(), mrbrem_plots(), mre_blessed(), mre_comp_split(), NDDataMC(), neutron_evd(), nova_official_data_release(), nue_data_mc_validation(), nue_fd_mc_validation(), nue_fnex_vs_caf_events(), nuebar_signif(), numu_data_mc_validation(), ana::CutOptimization::OptimizedSigmaOverSigma(), ana::NuePlotStyle::PIDBinLabels(), PIDBinLabels(), PIDBinLabelsShortAxis(), plot(), Plot(), plot_3NDvsFD(), plot_3NDvsFD_FHC(), plot_3NDvsFD_RHC(), plot_BEN(), plot_cosmic_eff(), plot_datamc_ND_numu(), plot_datamc_ND_numu_REW(), plot_nd_data_mc(), plot_ND_numu_NOMvsREW(), plot_nd_spectra_2018(), plot_NDvsFD_REW(), plot_NDvsFD_weights(), plot_NDvsFD_weights_FHC(), plot_NDvsFD_weights_RHC(), plot_nue_filesyst_pred(), plot_nueFD_Signal_REWvsNOM(), plot_nueFD_Signal_REWvsNOM_FHC(), plot_nueFD_Signal_REWvsNOM_pTExtrap_FHC(), plot_nueFD_Signal_REWvsNOM_pTExtrap_RHC(), plot_nueFD_Signal_REWvsNOM_RHC(), plot_nuTree(), plot_shifts(), plot_xsecs(), ana::PlotAll(), ana::PlotAllSignalEstimates(), PlotCSV(), ana::PlotDataMC(), PlotDataMC(), PlotDB_Web(), PlotEfficiency(), plotmodulewise(), PlotNDDataTotalMCComparison(), PlotNueDecompFourBins(), PlotNuePredictionFourBins(), plotNumuWrongSign(), PlotOnMon(), PlotPionPlots(), PlotSignificanceVsYear_FixDelta(), PlotSpectra(), plotWrongSignFraction(), evdb::EventDisplay::postProcessEvent(), POTstr(), POTtag(), ppfx_make_systs(), ana::PredictionScaleComp::PredictionScaleComp(), PrintAllSlices(), ana::PrintOscilationParameters(), PrintTime(), prob_biprob_pedagogical(), hv::HoughVertex::produce(), lem::LEMClient::produce(), ProducingSA(), reach_2018_dCPfractions(), filter::Filter::reconfigure(), ResolutionBars(), ResolutionPlot(), lem::LEMWorkerOutput::ReturnResults(), rock(), run_joint_fit_2020_bestfit(), run_joint_fit_2020_slices(), RunCalibration(), TMVAEIDTraining::runDiagnostics(), ana::SAMDefinitionExists(), ana::SAMProjectSource::SAMProjectSource(), SavePCAForCAFAna(), ana::Binning::SaveTo(), ana::MultiExperiment::SaveTo(), ana::PredictionCombinePeriods::SaveTo(), ana::FrequentistSurface::SaveTo(), ana::CutOptimization::SaveTo(), ana::Multiverse::SaveTo(), ana::PredictionInterp::SaveTo(), ana::ReweightableSpectrum::SaveTo(), ana::OscillatableSpectrum::SaveTo(), ana::Spectrum::SaveTo(), selection_story_plots(), TMVAEIDTraining::setupTrainingAndTestTrees(), ana::SystShifts::ShortName(), evd::SliceButtonBar::SliceButtonBar(), calib::SumSubrunsCalib::SumSubrunsCalib(), syst_table_from_preds(), syst_test(), ana::TableNum(), test_flux(), lem::dec::Forest::ToFile(), tree_maker_simple(), trimvar(), ana::UnfoldTikhonov::Truth(), Tutorial2019Fit(), ana::UniqueName(), evd::SliceButtonBar::Update(), UpdateStamp(), useBDTG(), and wrong_sign_uncertainty().

156 {
157  if(!gr) return;
158 
159  if (lcol >= 0) gr -> SetLineColor (lcol);
160  if (lsty >= 0) gr -> SetLineStyle (lsty);
161  if (lwid >= 0) gr -> SetLineWidth (lwid);
162 
163  if (mcol >= 0) gr -> SetMarkerColor (mcol);
164  if (msty >= 0) gr -> SetMarkerStyle (msty);
165  if (msiz >= 0) gr -> SetMarkerSize (msiz);
166 }
hmean SetLineStyle(2)
fVtxDx SetMarkerStyle(20)
hmean SetLineWidth(2)
hmean SetLineColor(4)
h1 SetMarkerColor(4)
GRdata SetMarkerSize(1.0)
void genie::utils::style::Format ( TH1 *  hst,
int  lcol,
int  lsty,
int  lwid,
int  mcol,
int  msty,
double  msiz 
)

Definition at line 168 of file Style.cxx.

References SetLineColor(), SetLineStyle(), SetLineWidth(), SetMarkerColor(), SetMarkerSize(), and SetMarkerStyle().

170 {
171  if(!hst) return;
172 
173  if (lcol >= 0) hst -> SetLineColor (lcol);
174  if (lsty >= 0) hst -> SetLineStyle (lsty);
175  if (lwid >= 0) hst -> SetLineWidth (lwid);
176 
177  if (mcol >= 0) hst -> SetMarkerColor (mcol);
178  if (msty >= 0) hst -> SetMarkerStyle (msty);
179  if (msiz >= 0) hst -> SetMarkerSize (msiz);
180 }
hmean SetLineStyle(2)
fVtxDx SetMarkerStyle(20)
hmean SetLineWidth(2)
hmean SetLineColor(4)
h1 SetMarkerColor(4)
GRdata SetMarkerSize(1.0)
void genie::utils::style::SetDefaultStyle ( bool  black_n_white = false)

Definition at line 28 of file Style.cxx.

References rootlogon::blue, Munits::gray, rootlogon::green, calib::j, SetHistLineWidth(), SetMarkerSize(), SetMarkerStyle(), SetOptFit(), SetOptStat(), SetPadBottomMargin(), SetPadLeftMargin(), SetPalette(), SetTitleBorderSize(), and rootlogon::stops.

Referenced by main().

29 {
30  gROOT->SetStyle("Plain");
31 
32  gStyle -> SetPadTickX (1);
33  gStyle -> SetPadTickY (1);
34 
35  //
36  // Turn off all borders
37  //
38  gStyle -> SetCanvasBorderMode (0);
39  gStyle -> SetFrameBorderMode (0);
40  gStyle -> SetPadBorderMode (0);
41  gStyle -> SetDrawBorder (0);
42  gStyle -> SetCanvasBorderSize (0);
43  gStyle -> SetFrameBorderSize (0);
44  gStyle -> SetPadBorderSize (0);
45  gStyle -> SetTitleBorderSize (0);
46 
47  //
48  // Set the size of the default canvas
49  //
50  gStyle -> SetCanvasDefH (600);
51  gStyle -> SetCanvasDefW (730);
52  gStyle -> SetCanvasDefX (10);
53  gStyle -> SetCanvasDefY (10);
54 
55  //
56  // Set marker style
57  //
58  gStyle -> SetMarkerStyle (20);
59  gStyle -> SetMarkerSize (1);
60 
61  //
62  // Set line widths
63  //
64  gStyle -> SetFrameLineWidth (1);
65  gStyle -> SetFuncWidth (2);
66  gStyle -> SetHistLineWidth (3);
67  gStyle -> SetFuncColor (2);
68  gStyle -> SetFuncWidth (3);
69 
70  //
71  // Set margins
72  //
73  gStyle -> SetPadTopMargin (0.10);
74  gStyle -> SetPadBottomMargin (0.20);
75  gStyle -> SetPadLeftMargin (0.15);
76  gStyle -> SetPadRightMargin (0.03);
77 
78  //
79  // Set tick marks and turn off grids
80  //
81  gStyle -> SetNdivisions (505,"xyz");
82 
83  //
84  // Adjust size and placement of axis labels
85  //
86  gStyle -> SetLabelSize (0.050, "xyz");
87  gStyle -> SetLabelOffset (0.005, "x" );
88  gStyle -> SetLabelOffset (0.005, "y" );
89  gStyle -> SetLabelOffset (0.005, "z" );
90  gStyle -> SetTitleSize (0.060, "xyz");
91  gStyle -> SetTitleOffset (1.200, "xz" );
92  gStyle -> SetTitleOffset (1.000, "y" );
93 
94  // Set Data/Stat/... and other options
95  //
96  gStyle -> SetOptDate (0);
97  gStyle -> SetOptFile (0);
98  gStyle -> SetOptStat (0);
99  gStyle -> SetStatFormat ("6.2f");
100  gStyle -> SetFitFormat ("8.4f");
101  gStyle -> SetOptFit (1);
102  gStyle -> SetStatH (0.20);
103  gStyle -> SetStatStyle (0);
104  gStyle -> SetStatW (0.30);
105  gStyle -> SetStatX (0.845);
106  gStyle -> SetStatY (0.845);
107  gStyle -> SetOptTitle (0);
108  gStyle -> SetTitleX (0.15);
109  gStyle -> SetTitleW (0.75);
110  gStyle -> SetTitleY (0.90);
111  gStyle -> SetPalette (1);
112  gStyle -> SetLegendBorderSize (0);
113 
114  //
115  // Set paper size for life in the US or EU
116  //
117  gStyle -> SetPaperSize (TStyle::kA4); //<-- tartes aux fraises
118 //gStyle -> SetPaperSize (TStyle::kUSLetter); //<-- donuts
119 
120  //
121  // In B&W (papers)
122  //
123  if(black_n_white){
124  const int ncol = 7;
125 
126  double red [ncol];
127  double green [ncol];
128  double blue [ncol];
129  double stops [ncol];
130 
131  double dcol = -1/double(ncol);
132  double gray = 1;
133  for (int j = 0; j < ncol; j++) {
134  // Define color with RGB equal to : gray, gray, gray
135  stops[j] = double(j)/double(ncol-1);
136  red [j] = gray;
137  blue [j] = gray;
138  green[j] = gray;
139 
140  gray += dcol;
141  }
142  UInt_t totcol=50;
143  TColor::CreateGradientColorTable(ncol,stops,red,green,blue,totcol);
144 
145  gStyle -> SetFuncWidth (1);
146  gStyle -> SetHistLineWidth (1);
147  gStyle -> SetFuncColor (1);
148  gStyle -> SetFuncWidth (1);
149  }//bw
150 
151  gROOT->ForceStyle();
152 }
gStyle SetOptFit(1)
fVtxDx SetMarkerStyle(20)
hipStyle SetTitleBorderSize(0)
tuple blue
Definition: rootlogon.py:65
hipStyle SetHistLineWidth(2)
const double j
Definition: BetheBloch.cxx:29
hipStyle SetPadLeftMargin(0.20)
gStyle SetPalette(1)
hipStyle SetPadBottomMargin(0.10)
GRdata SetMarkerSize(1.0)
static constexpr Double_t gray
Definition: Munits.h:390
gStyle SetOptStat(111111)