Classes | Public Types | Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes | Private Types | Private Member Functions | Static Private Member Functions | Private Attributes | List of all members
ana::GenieMultiverseSpectra Class Reference

#include "/cvmfs/nova-development.opensciencegrid.org/novasoft/releases/N20-12-03/CAFAna/XSec/GenieMultiverseSyst.h"

Inheritance diagram for ana::GenieMultiverseSpectra:
ana::GenieMultiverseNormalizedSpectra

Classes

struct  id
 
struct  knob_sampling_mode
 declarations for knob configuration table More...
 
struct  name
 

Public Types

enum  BandOptions {
  kNoBand, kBandFromMean, kBandFromNominal, kBandFromMPV,
  kBandFromMedian
}
 

Public Member Functions

 GenieMultiverseSpectra ()
 
 GenieMultiverseSpectra (unsigned int nuniverses, SpectrumLoaderBase &loader, const HistAxis &axis, const Cut &cut, const SystShifts &shift, const Var &wei=kUnweighted, std::string config_pathname="knob_config.txt")
 
 GenieMultiverseSpectra (unsigned int nuniverses, SpectrumLoaderBase &loader, const HistAxis &axis, const Cut &cut, const SystShifts &shift, const Var &wei, std::vector< const ISyst * > systs)
 
 GenieMultiverseSpectra (unsigned int nuniverses, SpectrumLoaderBase &loader, const NuTruthHistAxis &axis, const NuTruthCut &cut, const SystShifts &shift, const NuTruthVar &wei=kNuTruthUnweighted, std::string config_pathname="knob_config.txt")
 Multi-universe constructor for spill truch variables. More...
 
 GenieMultiverseSpectra (unsigned int nuniverses, SpectrumLoaderBase &loader, const NuTruthHistAxis &axis, const NuTruthCut &cut, const SystShifts &shift, const NuTruthVar &wei, std::vector< const ISyst * > systs)
 Multi-universe constructor for spill truch variables. More...
 
 GenieMultiverseSpectra (unsigned int nuniverses, std::vector< std::unique_ptr< ana::Spectrum >> &spectra, bool fromfile=false)
 
 GenieMultiverseSpectra (std::vector< std::unique_ptr< ana::Spectrum >> &spectra)
 
 ~GenieMultiverseSpectra ()
 
TH1 * ToTH1 () const
 
TH1 * ToTH1 (double pot) const
 
TGraphAsymmErrors * ToAreaNormalizedTH1 (double pot, int col=-1, int errCol=-1, float headroom=1.3, bool newaxis=true) const
 
TH2 * ToTH2 () const
 
TH2 * ToTH2 (double pot) const
 
const SpectrumNominal () const
 return the nominal universe More...
 
std::vector< const Spectrum * > AllUniverses () const
 return all universes More...
 
const SpectrumUpperRMS () const
 return RMS extremes More...
 
const SpectrumLowerRMS () const
 
const SpectrumMean () const
 
const SpectrumUpperSigma (BandOptions opt=kBandFromNominal) const
 
const SpectrumLowerSigma (BandOptions opt=kBandFromNominal) const
 
void SaveTo (TDirectory *dir, const std::string &name) const
 Save the Spectrum structure of all universe to a TFile directory. More...
 
unsigned int GetNUniverses ()
 Get the number of universes in an object of this class. More...
 
const auto & GetShiftTable () const
 

Static Public Member Functions

static std::unique_ptr< GenieMultiverseSpectraLoadFrom (TDirectory *dir, const std::string &name)
 Load the Spectrum structure of all universe from a TFile directory. More...
 
static std::pair< TH2 *, TH2 * > GetSigmaHistograms (std::vector< TH2 * >, BandOptions opt=kBandFromNominal)
 Calculate error band given 2D histograms. More...
 

Protected Member Functions

void BuildKnobConfigTable (std::string config_pathname)
 
SpectrumCreateUniverse (SpectrumLoaderBase &loader, const HistAxis &axis, const Cut &cut, const SystShifts &shift=kNoShift, const Var &wei=kUnweighted)
 
SpectrumCreateUniverse (SpectrumLoaderBase &loader, const HistAxis &axis, const Cut &cut, std::vector< const ISyst * > systs, const Var &wei=kUnweighted)
 
SpectrumCreateUniverse (SpectrumLoaderBase &loader, const NuTruthHistAxis &axis, const NuTruthCut &cut, const SystShifts &shift=kNoShift, const NuTruthVar &wei=kNuTruthUnweighted)
 
SpectrumCreateUniverse (SpectrumLoaderBase &loader, const NuTruthHistAxis &axis, const NuTruthCut &cut, std::vector< const ISyst * > systs, const NuTruthVar &wei=kNuTruthUnweighted)
 

Protected Attributes

std::vector< Spectrum * > fSpectra
 
int fUniverseSeed = 1001
 
BandOptions fCurBandOpt = kNoBand
 
knob_sampling_mode_set fKnobConfigTable
 

Private Types

typedef multi_index_container< knob_sampling_mode, indexed_by< ordered_unique< tag< id >, BOOST_MULTI_INDEX_MEMBER(knob_sampling_mode, int, id)>, ordered_unique< tag< name >, BOOST_MULTI_INDEX_MEMBER(knob_sampling_mode, std::string, name)> > > knob_sampling_mode_set
 

Private Member Functions

void FindBandBoundaries (BandOptions opt=kBandFromNominal) const
 

Static Private Member Functions

static float BinSigma (std::vector< float > events, float nsigmas, float mean=-1)
 

Private Attributes

unsigned int fNUniverses
 number of universes to generate More...
 
bool fLoadFromFile = false
 
std::set< intfModes = {0, 1, 2}
 modes of valid configuration. More...
 
std::vector< std::map< const ISyst *, double > > fShiftTable
 
SpectrumfUpperRMS = NULL
 spectra for upper rms More...
 
SpectrumfLowerRMS = NULL
 spectra for lower rms More...
 
SpectrumfMean = NULL
 spectra for mean More...
 
SpectrumfUpperSigma = NULL
 spectra for upper sigma More...
 
SpectrumfLowerSigma = NULL
 spectra for lower sigma More...
 
bool fBoundariesFound = false
 

Detailed Description

Obtain GENIE systematic band by randomly varying the number of sigmas pulled out from a normal distribution for all the enabled GENIE tunable parameters. Originally the json format was chosen as the format of knob configuration file. Due to this bug: https://svn.boost.org/trac/boost/ticket/6785, turned to pure text file instead.

Definition at line 33 of file GenieMultiverseSyst.h.

Member Typedef Documentation

typedef multi_index_container< knob_sampling_mode, indexed_by< ordered_unique< tag<id>, BOOST_MULTI_INDEX_MEMBER(knob_sampling_mode,int,id)>, ordered_unique< tag<name>,BOOST_MULTI_INDEX_MEMBER(knob_sampling_mode,std::string,name)> > > ana::GenieMultiverseSpectra::knob_sampling_mode_set
private

Definition at line 226 of file GenieMultiverseSyst.h.

Member Enumeration Documentation

Constructor & Destructor Documentation

ana::GenieMultiverseSpectra::GenieMultiverseSpectra ( )
inline
ana::GenieMultiverseSpectra::GenieMultiverseSpectra ( unsigned int  nuniverses,
SpectrumLoaderBase loader,
const HistAxis axis,
const Cut cut,
const SystShifts shift,
const Var wei = kUnweighted,
std::string  config_pathname = "knob_config.txt" 
)
ana::GenieMultiverseSpectra::GenieMultiverseSpectra ( unsigned int  nuniverses,
SpectrumLoaderBase loader,
const HistAxis axis,
const Cut cut,
const SystShifts shift,
const Var wei,
std::vector< const ISyst * >  systs 
)

Definition at line 122 of file GenieMultiverseSyst.cxx.

References BuildKnobConfigTable(), CreateUniverse(), fNUniverses, fSpectra, GenieMultiverseSpectra(), and MECModelEnuComparisons::i.

130  {
131  // universe with index 0 is the nominal universe
132  fSpectra.push_back(new Spectrum(loader, axis, cut, shift, wei));
133  for(unsigned int i = 0; i < nuniverses-1; i++)
134  fSpectra.push_back(CreateUniverse(loader, axis, cut, systs, wei));
135  }
std::vector< Spectrum * > fSpectra
std::vector< SystGroupDef > systs
Definition: syst_header.h:385
Spectrum * CreateUniverse(SpectrumLoaderBase &loader, const HistAxis &axis, const Cut &cut, const SystShifts &shift=kNoShift, const Var &wei=kUnweighted)
loader
Definition: demo0.py:10
std::vector< float > Spectrum
Definition: Constants.h:610
const Cut cut
Definition: exporter_fd.C:30
const int nuniverses
unsigned int fNUniverses
number of universes to generate
ana::GenieMultiverseSpectra::GenieMultiverseSpectra ( unsigned int  nuniverses,
SpectrumLoaderBase loader,
const NuTruthHistAxis axis,
const NuTruthCut cut,
const SystShifts shift,
const NuTruthVar wei = kNuTruthUnweighted,
std::string  config_pathname = "knob_config.txt" 
)

Multi-universe constructor for spill truch variables.

ana::GenieMultiverseSpectra::GenieMultiverseSpectra ( unsigned int  nuniverses,
SpectrumLoaderBase loader,
const NuTruthHistAxis axis,
const NuTruthCut cut,
const SystShifts shift,
const NuTruthVar wei,
std::vector< const ISyst * >  systs 
)

Multi-universe constructor for spill truch variables.

Definition at line 154 of file GenieMultiverseSyst.cxx.

References CreateUniverse(), fSpectra, and MECModelEnuComparisons::i.

162  {
163  // universe with index 0 is the nominal universe
164  fSpectra.push_back(new Spectrum(loader, axis, cut, shift, wei));
165  for(unsigned int i = 0; i < nuniverses-1; i++)
166  fSpectra.push_back(CreateUniverse(loader, axis, cut, systs, wei));
167  }
std::vector< Spectrum * > fSpectra
std::vector< SystGroupDef > systs
Definition: syst_header.h:385
Spectrum * CreateUniverse(SpectrumLoaderBase &loader, const HistAxis &axis, const Cut &cut, const SystShifts &shift=kNoShift, const Var &wei=kUnweighted)
loader
Definition: demo0.py:10
std::vector< float > Spectrum
Definition: Constants.h:610
const Cut cut
Definition: exporter_fd.C:30
const int nuniverses
unsigned int fNUniverses
number of universes to generate
ana::GenieMultiverseSpectra::GenieMultiverseSpectra ( unsigned int  nuniverses,
std::vector< std::unique_ptr< ana::Spectrum >> &  spectra,
bool  fromfile = false 
)

Definition at line 169 of file GenieMultiverseSyst.cxx.

References fNUniverses, fSpectra, GenieMultiverseSpectra(), it, and nuniverses.

171  {
173  for(auto& it: spectra)
174  fSpectra.push_back(it.release());
175  }
std::vector< Spectrum * > fSpectra
set< int >::iterator it
const int nuniverses
unsigned int fNUniverses
number of universes to generate
ana::GenieMultiverseSpectra::GenieMultiverseSpectra ( std::vector< std::unique_ptr< ana::Spectrum >> &  spectra)
ana::GenieMultiverseSpectra::~GenieMultiverseSpectra ( )

Definition at line 229 of file GenieMultiverseSyst.cxx.

References fLoadFromFile, fLowerRMS, fMean, fSpectra, fUpperRMS, and it.

230  {
231  if(!fLoadFromFile)
232  for (auto it = fSpectra.begin(); it != fSpectra.end(); ++it) delete *it;
233  delete fUpperRMS;
234  delete fLowerRMS;
235  delete fMean;
236  }
std::vector< Spectrum * > fSpectra
Spectrum * fLowerRMS
spectra for lower rms
set< int >::iterator it
Spectrum * fMean
spectra for mean
Spectrum * fUpperRMS
spectra for upper rms

Member Function Documentation

std::vector<const Spectrum*> ana::GenieMultiverseSpectra::AllUniverses ( ) const
inline

return all universes

Definition at line 104 of file GenieMultiverseSyst.h.

References dir, ana::LoadFrom(), MECModelEnuComparisons::opt, ana::SaveTo(), and string.

Referenced by make_muonid_opt(), and make_vertex_optimiz().

104 {return {fSpectra.begin(), fSpectra.end()};}
std::vector< Spectrum * > fSpectra
float ana::GenieMultiverseSpectra::BinSigma ( std::vector< float >  events,
float  nsigmas,
float  mean = -1 
)
staticprivate

Find +/- 1 sigma around the mean for a bin of the Spectrum. A sigma is defined as enclosing 34% of area with the mean.

Definition at line 395 of file GenieMultiverseSyst.cxx.

References MECModelEnuComparisons::i, allTimeWatchdog::index, makeTrainCVSamples::int, cet::sqlite::max(), min(), and stan::math::normal_cdf().

Referenced by FindBandBoundaries(), and GetSigmaHistograms().

396  {
397  int pivotbin = 0;
398  double pivotbincenter = 0;
399  sort(events.begin(), events.end());
400  for(unsigned int i = 0; i < events.size()-1; i++)
401  if(pivot >= events[i] && pivot < events[i+1]){
402  pivotbin = i;
403  break;
404  }
405  pivotbincenter = pivotbin+0.5;
406  double count_fraction = 2.0 * (ROOT::Math::normal_cdf(nsigmas)-ROOT::Math::normal_cdf(0));
407 
408  int nsideevents = 0;
409  int lastbinindex = (int)events.size() - 1;
410  if (nsigmas >= 0) nsideevents = lastbinindex - pivotbin;
411  else nsideevents = pivotbin;
412  int boundIdx = pivotbincenter + count_fraction*(double)nsideevents;
413 
414  int index = 0;
415  if(nsigmas >= 0) index = min(boundIdx, (int)events.size()-1);
416  else index = max(boundIdx, 0);
417 
418  return events.at(index);
419  }
static float min(const float a, const float b, const float c)
Definition: absgeo.cxx:45
T max(sqlite3 *const db, std::string const &table_name, std::string const &column_name)
Definition: statistics.h:68
return_type< T_y, T_loc, T_scale >::type normal_cdf(const T_y &y, const T_loc &mu, const T_scale &sigma)
Definition: normal_cdf.hpp:39
void events(int which)
Definition: Cana.C:52
void ana::GenieMultiverseSpectra::BuildKnobConfigTable ( std::string  config_pathname)
protected

function for building knob configuration table

Definition at line 422 of file GenieMultiverseSyst.cxx.

References om::cerr, allTimeWatchdog::endl, exit(), MakeMiniprodValidationCuts::f, fKnobConfigTable, and allTimeWatchdog::index.

Referenced by GenieMultiverseSpectra().

423  {
424  // Create an empty property tree object
425  //~ using boost::property_tree::ptree;
426  //~ ptree pt;
427 
428  // check file existence
429  ifstream f(fpn.c_str());
430  if(!f.good()){
431  cerr << "ERROR: GENIE knob configuration file \033[1;31m" << fpn << "\033[0m is not found." << endl;
432  exit(0);
433  }
434 
435  // read configuration from the json file
436  // This line is where the boost bug emerges.
437  //~ boost::property_tree::json_parser::read_json(fpn, pt);
438 
439  string knobname;
440  int sample_mode;
441  int index = 0;
442  while(f >> knobname >> sample_mode)
443  fKnobConfigTable.insert(knob_sampling_mode(index++,knobname,sample_mode));
444 
445  // print out key values
446  //~ for(auto& nameIt: fKnobConfigTable.get<0>()) cout << nameIt.id << " " << nameIt.name << " " << nameIt.mode << endl;
447  }
OStream cerr
Definition: OStream.cxx:7
knob_sampling_mode_set fKnobConfigTable
exit(0)
Spectrum * ana::GenieMultiverseSpectra::CreateUniverse ( SpectrumLoaderBase loader,
const HistAxis axis,
const Cut cut,
const SystShifts shift = kNoShift,
const Var wei = kUnweighted 
)
protected

function to create one universe

Definition at line 450 of file GenieMultiverseSyst.cxx.

References fKnobConfigTable, fShiftTable, fUniverseSeed, ana::getAllXsecNuTruthSysts_2018(), ana::GetGenieKnobSyst(), central_limit::rand, and systs.

Referenced by ana::GenieMultiverseNormalizedSpectra::GenieMultiverseNormalizedSpectra(), and GenieMultiverseSpectra().

455  {
456  const vector<const ISyst*> systs = getAllXsecNuTruthSysts_2018();
457 
458  map<const ISyst*, double> knob_weight_table;
459  for(auto& idIt: fKnobConfigTable.get<0>())
460  {
461  TRandom3 rand(fUniverseSeed++);
462  rwgt::ReweightLabel_t knoblabel = (rwgt::ReweightLabel_t)idIt.id;
463  double nsigma = 0;
464  if(idIt.mode == 0) continue;
465  else if(idIt.mode == 1) nsigma = rand.Gaus();
466  else if(idIt.mode == 2) nsigma = rand.Integer(2);
467  // For tags later than 2017/08/14, when the underlying framework
468  // underwent an overhaul, this conditional check is needed.
469 
470  // Note that in GetGenieKnobSyst function in XSecSysts.cxx,
471  // rwgt::kReweightNull is excluded. Therefore a call with argument
472  // rwgt::kReweightNull will lead to seg fault. Skip it!
473  if(knoblabel == rwgt::kReweightNull) continue;
474  if(find(systs.begin(), systs.end(), GetGenieKnobSyst(knoblabel)) != systs.end())
475  knob_weight_table[GetGenieKnobSyst(knoblabel)] = nsigma;
476 
477  }
478  //~ for(auto& it: knob_weight_table) cout << "number of sigmas: " << it.second << endl;
479 
480  auto spec = new Spectrum(loader, axis, cut, knob_weight_table, wei);
481  fShiftTable.push_back(std::move(knob_weight_table));
482  return spec;
483  }
std::vector< const ISyst * > getAllXsecNuTruthSysts_2018()
std::vector< SystGroupDef > systs
Definition: syst_header.h:385
std::vector< std::map< const ISyst *, double > > fShiftTable
knob_sampling_mode_set fKnobConfigTable
loader
Definition: demo0.py:10
std::vector< float > Spectrum
Definition: Constants.h:610
const Cut cut
Definition: exporter_fd.C:30
const NOvARwgtSyst * GetGenieKnobSyst(rwgt::ReweightLabel_t knobIdx, std::string altName, std::string altLabel)
Convenience function to get a GENIE knob syst. (Allows using the GENIE knob name & description as the...
Definition: XSecSysts.cxx:119
Spectrum * ana::GenieMultiverseSpectra::CreateUniverse ( SpectrumLoaderBase loader,
const HistAxis axis,
const Cut cut,
std::vector< const ISyst * >  systs,
const Var wei = kUnweighted 
)
protected

Function to create one universe

Definition at line 486 of file GenieMultiverseSyst.cxx.

References fShiftTable, fUniverseSeed, and central_limit::rand.

491  {
492  map<const ISyst*, double> knob_weight_table;
493 
494  for (const auto & syst: systs)
495  {
496  TRandom3 rand(fUniverseSeed++);
497  knob_weight_table[syst] = rand.Gaus();
498  }
499 
500  auto spec = new Spectrum(loader, axis, cut, knob_weight_table, wei);
501  fShiftTable.push_back(std::move(knob_weight_table));
502  return spec;
503  }
std::vector< SystGroupDef > systs
Definition: syst_header.h:385
std::vector< std::map< const ISyst *, double > > fShiftTable
loader
Definition: demo0.py:10
std::vector< float > Spectrum
Definition: Constants.h:610
const Cut cut
Definition: exporter_fd.C:30
Spectrum * ana::GenieMultiverseSpectra::CreateUniverse ( SpectrumLoaderBase loader,
const NuTruthHistAxis axis,
const NuTruthCut cut,
const SystShifts shift = kNoShift,
const NuTruthVar wei = kNuTruthUnweighted 
)
protected

Function to create one universe for NuTruth variables.

Definition at line 506 of file GenieMultiverseSyst.cxx.

References fKnobConfigTable, fUniverseSeed, ana::getAllXsecNuTruthSysts_2017(), ana::GetGenieKnobSyst(), central_limit::rand, and systs.

511  {
512  const vector<const ISyst*> systs = getAllXsecNuTruthSysts_2017();
513 
514  map<const ISyst*, double> knob_weight_table;
515  for(auto& idIt: fKnobConfigTable.get<0>())
516  {
517  TRandom3 rand(fUniverseSeed++);
518  rwgt::ReweightLabel_t knoblabel = (rwgt::ReweightLabel_t)idIt.id;
519  double nsigma = 0;
520  if(idIt.mode == 0) continue;
521  else if(idIt.mode == 1) nsigma = rand.Gaus();
522  else if(idIt.mode == 2) nsigma = rand.Integer(2);
523  // For tags later than 2017/08/14, when the underlying framework
524  // underwent an overhaul, this conditional check is needed.
525 
526  // Note that in GetGenieKnobSyst function in XSecSysts.cxx,
527  // rwgt::kReweightNull is excluded. Therefore a call with argument
528  // rwgt::kReweightNull will lead to seg fault. Skip it!
529  if(knoblabel == rwgt::kReweightNull) continue;
530  if(find(systs.begin(), systs.end(), GetGenieKnobSyst(knoblabel)) != systs.end())
531  knob_weight_table[GetGenieKnobSyst(knoblabel)] = nsigma;
532  }
533 
534  return new Spectrum(loader, axis, cut, SystShifts(knob_weight_table), wei);
535  }
std::vector< SystGroupDef > systs
Definition: syst_header.h:385
knob_sampling_mode_set fKnobConfigTable
loader
Definition: demo0.py:10
std::vector< float > Spectrum
Definition: Constants.h:610
const Cut cut
Definition: exporter_fd.C:30
std::vector< const ISyst * > getAllXsecNuTruthSysts_2017()
Get master XSec syst list for 2017 analyses (NuTruthSyst variant)
const NOvARwgtSyst * GetGenieKnobSyst(rwgt::ReweightLabel_t knobIdx, std::string altName, std::string altLabel)
Convenience function to get a GENIE knob syst. (Allows using the GENIE knob name & description as the...
Definition: XSecSysts.cxx:119
Spectrum * ana::GenieMultiverseSpectra::CreateUniverse ( SpectrumLoaderBase loader,
const NuTruthHistAxis axis,
const NuTruthCut cut,
std::vector< const ISyst * >  systs,
const NuTruthVar wei = kNuTruthUnweighted 
)
protected

Function to create one universe for NuTruth variables.

Definition at line 538 of file GenieMultiverseSyst.cxx.

References fUniverseSeed, ana::GetGenieKnobSyst(), ana::kReweightLabels(), and central_limit::rand.

543  {
544  map<const ISyst*, double> knob_weight_table;
545  for(auto knoblabel : ana::kReweightLabels)
546  {
547  TRandom3 rand(fUniverseSeed++);
548  // Note that in GetGenieKnobSyst function in XSecSysts.cxx,
549  // rwgt::kReweightNull is excluded. Therefore a call with argument
550  // rwgt::kReweightNull will lead to seg fault. Skip it!
551  if(knoblabel == rwgt::kReweightNull) continue;
552  if(find(systs.begin(), systs.end(), GetGenieKnobSyst(knoblabel)) != systs.end())
553  knob_weight_table[GetGenieKnobSyst(knoblabel)] = rand.Gaus();
554  }
555 
556  return new Spectrum(loader, axis, cut, SystShifts(knob_weight_table), wei);
557  }
std::vector< SystGroupDef > systs
Definition: syst_header.h:385
const std::list< rwgt::ReweightLabel_t > kReweightLabels({rwgt::fReweightMaNCEL, rwgt::fReweightEtaNCEL, rwgt::fReweightNormCCQE, rwgt::fReweightNormCCQEenu, rwgt::fReweightMaCCQEshape, rwgt::fReweightMaCCQE, rwgt::fReweightVecCCQEshape, rwgt::fReweightNormCCRES, rwgt::fReweightMaCCRESshape, rwgt::fReweightMvCCRESshape, rwgt::fReweightMaCCRES, rwgt::fReweightMvCCRES, rwgt::fReweightNormNCRES, rwgt::fReweightMaNCRESshape, rwgt::fReweightMvNCRESshape, rwgt::fReweightMaNCRES, rwgt::fReweightMvNCRES, rwgt::fReweightMaCOHpi, rwgt::fReweightR0COHpi, rwgt::fReweightRvpCC1pi, rwgt::fReweightRvpCC2pi, rwgt::fReweightRvpNC1pi, rwgt::fReweightRvpNC2pi, rwgt::fReweightRvnCC1pi, rwgt::fReweightRvnCC2pi, rwgt::fReweightRvnNC1pi, rwgt::fReweightRvnNC2pi, rwgt::fReweightRvbarpCC1pi, rwgt::fReweightRvbarpCC2pi, rwgt::fReweightRvbarpNC1pi, rwgt::fReweightRvbarpNC2pi, rwgt::fReweightRvbarnCC1pi, rwgt::fReweightRvbarnCC2pi, rwgt::fReweightRvbarnNC1pi, rwgt::fReweightRvbarnNC2pi, rwgt::fReweightAhtBY, rwgt::fReweightBhtBY, rwgt::fReweightCV1uBY, rwgt::fReweightCV2uBY, rwgt::fReweightAhtBYshape, rwgt::fReweightBhtBYshape, rwgt::fReweightCV1uBYshape, rwgt::fReweightCV2uBYshape, rwgt::fReweightNormDISCC, rwgt::fReweightRnubarnuCC, rwgt::fReweightDISNuclMod, rwgt::fReweightNC, rwgt::fReweightAGKY_xF1pi, rwgt::fReweightAGKY_pT1pi, rwgt::fReweightFormZone, rwgt::fReweightMFP_pi, rwgt::fReweightMFP_N, rwgt::fReweightFrCEx_pi, rwgt::fReweightFrInel_pi, rwgt::fReweightFrAbs_pi, rwgt::fReweightFrPiProd_pi, rwgt::fReweightFrCEx_N, rwgt::fReweightFrInel_N, rwgt::fReweightFrAbs_N, rwgt::fReweightFrPiProd_N, rwgt::fReweightCCQEPauliSupViaKF, rwgt::fReweightCCQEMomDistroFGtoSF, rwgt::fReweightBR1gamma, rwgt::fReweightBR1eta, rwgt::fReweightTheta_Delta2Npi, rwgt::fReweightZNormCCQE, rwgt::fReweightZExpA1CCQE, rwgt::fReweightZExpA2CCQE, rwgt::fReweightZExpA3CCQE, rwgt::fReweightZExpA4CCQE, rwgt::fReweightAxFFCCQEshape})
loader
Definition: demo0.py:10
std::vector< float > Spectrum
Definition: Constants.h:610
const Cut cut
Definition: exporter_fd.C:30
const NOvARwgtSyst * GetGenieKnobSyst(rwgt::ReweightLabel_t knobIdx, std::string altName, std::string altLabel)
Convenience function to get a GENIE knob syst. (Allows using the GENIE knob name & description as the...
Definition: XSecSysts.cxx:119
void ana::GenieMultiverseSpectra::FindBandBoundaries ( BandOptions  opt = kBandFromNominal) const
private

find the boundaries from RMS/sigma of all universes and store results to fUpperRMS, fLowerRMS, fUpperSigma, fLowerSigma, etc.

Definition at line 560 of file GenieMultiverseSyst.cxx.

References a, visualisationForPaperMasterPlot::ax, BinSigma(), fBoundariesFound, fCurBandOpt, fLowerRMS, fLowerSigma, fMean, fNUniverses, fSpectra, fUpperRMS, fUpperSigma, MECModelEnuComparisons::i, it, kBandFromMean, kBandFromMedian, kBandFromMPV, kBandFromNominal, kNoBand, cet::sqlite::max(), extractScale::mean, min(), nbinsx, MECModelEnuComparisons::opt, POT, push_back(), and extractScale::rms.

Referenced by LowerRMS(), LowerSigma(), Mean(), UpperRMS(), and UpperSigma().

561  {
562  Eigen::ArrayXd aNominal = fSpectra[0]->GetEigen(fSpectra[0]->POT());
563  map<int, vector<float> > events_in_bins;
564  for(auto& it: fSpectra)
565  {
566  Eigen::ArrayXd curhist = it->GetEigen(it->POT());
567  int nbinsx = curhist.size()-2;
568  for(int i = 1; i <= nbinsx; i++)
569  events_in_bins[i].push_back(curhist[i]);
570  }
571 
572  Eigen::ArrayXd aUpRMS = aNominal;
573  Eigen::ArrayXd aUpSigma = aNominal;
574  Eigen::ArrayXd aLowRMS = aNominal;
575  Eigen::ArrayXd aLowSigma = aNominal;
576  Eigen::ArrayXd aMean = aNominal;
577  int binIt = 1;
578  for(auto& it: events_in_bins){
579 
580  // Find the pivot point from which the boundaries are calculated.
581  double pivot = 0;
582  double mean = TMath::Mean(it.second.begin(), it.second.end());
583  if(opt == kBandFromMean)
584  pivot = mean;
585  else if(opt == kBandFromNominal)
586  pivot = aNominal[binIt];
587  else if(opt == kBandFromMedian){
588  float* a = &it.second[0];
589  pivot = TMath::Median(it.second.size(), a);
590  }
591  else if(opt == kBandFromMPV){
592  double a[it.second.size()];
593  for(unsigned int i = 0; i < it.second.size(); i++) a[i] = it.second[i];
594  double min = *min_element(it.second.begin(), it.second.end());
595  double max = *max_element(it.second.begin(), it.second.end());
596  TKDE kde(fNUniverses, a, min, max, "kUnbinned");
597  pivot = kde.GetFunction(fNUniverses, min, max)->GetMaximumX();
598  }
599 
600  // Deal with no band option
601  if(opt != kNoBand){
602  double rms = TMath::RMS(it.second.begin(), it.second.end());
603  aUpRMS[binIt] = mean+rms;
604  aUpSigma[binIt] = BinSigma(it.second, 1, pivot);
605  aLowRMS[binIt] = mean-rms;
606  aLowSigma[binIt] = BinSigma(it.second, -1, pivot);
607  }
608  else{
609  aUpRMS[binIt] = aNominal[binIt];
610  aUpSigma[binIt] = aNominal[binIt];
611  aLowRMS[binIt] = aNominal[binIt];
612  aLowSigma[binIt] = aNominal[binIt];
613  }
614  aMean[binIt] = mean;
615 
616  binIt++;
617  }
618 
619  // release memory if they are already allocated
620  if(fUpperRMS) delete fUpperRMS;
621  if(fLowerRMS) delete fLowerRMS;
622  if(fMean) delete fMean;
623  if(fUpperSigma) delete fUpperSigma;
624  if(fLowerSigma) delete fLowerSigma;
625  HistAxis ax(fSpectra[0]->GetLabels(), fSpectra[0]->GetBinnings());
626  fUpperRMS = new Spectrum(std::move(aUpRMS), ax, fSpectra[0]->POT(), fSpectra[0]->Livetime());
627  fLowerRMS = new Spectrum(std::move(aLowRMS), ax, fSpectra[0]->POT(), fSpectra[0]->Livetime());
628  fMean = new Spectrum(std::move(aMean), ax, fSpectra[0]->POT(), fSpectra[0]->Livetime());
629  fUpperSigma = new Spectrum(std::move(aUpSigma), ax, fSpectra[0]->POT(), fSpectra[0]->Livetime());
630  fLowerSigma = new Spectrum(std::move(aLowSigma), ax, fSpectra[0]->POT(), fSpectra[0]->Livetime());
631  fBoundariesFound = true;
632  fCurBandOpt = opt;
633  // area normalized spectra
634  // Based on Kirk Bay's code
635  // http://nusoft.fnal.gov/nova/novasoft/doxygen/html/sa__nd__data__mc__systs_8C_source.html
636  // function DrawMCNormSyst()
637  // Actual code removed. The class GenieMultiverseNormalizedSpectra will take care of this automatically.
638  }
std::vector< Spectrum * > fSpectra
static float BinSigma(std::vector< float > events, float nsigmas, float mean=-1)
_HistAxis< Var > HistAxis
Definition: HistAxis.h:103
Spectrum * fLowerRMS
spectra for lower rms
set< int >::iterator it
Spectrum * fMean
spectra for mean
const double a
base_types push_back(int_type())
Spectrum * fLowerSigma
spectra for lower sigma
Spectrum * fUpperRMS
spectra for upper rms
std::vector< float > Spectrum
Definition: Constants.h:610
std::vector< double > POT
static float min(const float a, const float b, const float c)
Definition: absgeo.cxx:45
Spectrum * fUpperSigma
spectra for upper sigma
Int_t nbinsx
Definition: plot.C:23
T max(sqlite3 *const db, std::string const &table_name, std::string const &column_name)
Definition: statistics.h:68
unsigned int fNUniverses
number of universes to generate
unsigned int ana::GenieMultiverseSpectra::GetNUniverses ( )
inline

Get the number of universes in an object of this class.

Definition at line 119 of file GenieMultiverseSyst.h.

References MECModelEnuComparisons::opt.

119 {return fNUniverses;};
unsigned int fNUniverses
number of universes to generate
const auto& ana::GenieMultiverseSpectra::GetShiftTable ( ) const
inline

Definition at line 124 of file GenieMultiverseSyst.h.

124 { return fShiftTable; };
std::vector< std::map< const ISyst *, double > > fShiftTable
pair< TH2 *, TH2 * > ana::GenieMultiverseSpectra::GetSigmaHistograms ( std::vector< TH2 * >  huniv,
BandOptions  opt = kBandFromNominal 
)
static

Calculate error band given 2D histograms.

Definition at line 185 of file GenieMultiverseSyst.cxx.

References a, BinSigma(), plot_validation_datamc::Clone(), MECModelEnuComparisons::i, kBandFromMean, kBandFromMedian, kBandFromMPV, kBandFromNominal, kNoBand, cet::sqlite::max(), extractScale::mean, min(), and nbinsx.

186  {
187  // create up and down histograms
188  TH2* hup = (TH2*)huniv[0]->Clone("hup");
189  TH2* hdown = (TH2*)huniv[0]->Clone("hdown");
190 
191  // loop through all bins
192  int nbinsx = hup->GetNbinsX();
193  int nbinsy = hup->GetNbinsY();
194  for(int ix = 0; ix <= nbinsx; ix++){
195  for(int iy = 0; iy <= nbinsy; iy++)
196  {
197  // collect counts from all universes
198  vector<float> counts_in_one_bin;
199  for(unsigned int iu = 0; iu < huniv.size(); iu++)
200  counts_in_one_bin.push_back(huniv[iu]->GetBinContent(ix, iy));
201 
202  // determine from where the error band is drawn
203  double pivot = 0.;
204  double mean = TMath::Mean(counts_in_one_bin.begin(), counts_in_one_bin.end());
205  if(opt == kBandFromMean) pivot = mean;
206  else if(opt == kBandFromNominal || opt == kNoBand) pivot = huniv[0]->GetBinContent(ix, iy);
207  else if(opt == kBandFromMedian){
208  float* a = &counts_in_one_bin[0];
209  pivot = TMath::Median(counts_in_one_bin.size(), a);
210  }
211  else if(opt == kBandFromMPV){
212  double a[counts_in_one_bin.size()];
213  for(unsigned int i = 0; i < counts_in_one_bin.size(); i++) a[i] = counts_in_one_bin[i];
214  double min = *min_element(counts_in_one_bin.begin(), counts_in_one_bin.end());
215  double max = *max_element(counts_in_one_bin.begin(), counts_in_one_bin.end());
216  TKDE kde(counts_in_one_bin.size(), a, min, max, "kUnbinned");
217  pivot = kde.GetFunction(counts_in_one_bin.size(), min, max)->GetMaximumX();
218  }
219 
220  // draw band
221  hup->SetBinContent(ix, iy, BinSigma(counts_in_one_bin, 1, pivot));
222  hdown->SetBinContent(ix, iy, BinSigma(counts_in_one_bin, -1, pivot));
223  }
224  }
225 
226  return pair<TH2*, TH2*>(hup, hdown);
227  }
static float BinSigma(std::vector< float > events, float nsigmas, float mean=-1)
const double a
static float min(const float a, const float b, const float c)
Definition: absgeo.cxx:45
Int_t nbinsx
Definition: plot.C:23
T max(sqlite3 *const db, std::string const &table_name, std::string const &column_name)
Definition: statistics.h:68
std::unique_ptr< GenieMultiverseSpectra > ana::GenieMultiverseSpectra::LoadFrom ( TDirectory *  dir,
const std::string name 
)
static

Load the Spectrum structure of all universe from a TFile directory.

Definition at line 684 of file GenieMultiverseSyst.cxx.

References ana::assert(), dir, MECModelEnuComparisons::i, and art::to_string().

685  {
686  dir = dir->GetDirectory(name.c_str()); // switch to subdir
687  assert(dir);
688 
689  //~ TObjString* tag = (TObjString*)dir->Get("type");
690  //~ assert(tag);
691  //~ assert(tag->GetString() == "GenieMultiverseSpectra");
692  // The above code is departure from the Spectrum::LoadFrom implementation.
693  // In multiverse root directory the only information needed is the number
694  // of universes created.
695 
696  TObjString* universes = (TObjString*)dir->Get("nUniverses");
697  unsigned int nUniverses = universes->GetString().Atoi();
698 
699 
700  std::vector<std::unique_ptr<ana::Spectrum>> spectra;
701  for(unsigned int i = 0; i < nUniverses; i++){
702  spectra.push_back(ana::LoadFrom<Spectrum>(dir, "universe_"+std::to_string(i)));
703  }
704 
705  delete dir;
706 
707  return std::make_unique<GenieMultiverseSpectra>(nUniverses, spectra, true);
708  }// end of LoadFrom
const XML_Char * name
Definition: expat.h:151
TDirectory * dir
Definition: macro.C:5
assert(nhit_max >=nhit_nbins)
std::string to_string(ModuleType mt)
Definition: ModuleType.h:32
const Spectrum * ana::GenieMultiverseSpectra::LowerRMS ( ) const

Definition at line 641 of file GenieMultiverseSyst.cxx.

References fBoundariesFound, FindBandBoundaries(), and fLowerRMS.

642  {
644  return fLowerRMS;
645  }
Spectrum * fLowerRMS
spectra for lower rms
void FindBandBoundaries(BandOptions opt=kBandFromNominal) const
const Spectrum * ana::GenieMultiverseSpectra::LowerSigma ( BandOptions  opt = kBandFromNominal) const
const Spectrum * ana::GenieMultiverseSpectra::Mean ( ) const

Definition at line 238 of file GenieMultiverseSyst.cxx.

References fBoundariesFound, FindBandBoundaries(), and fMean.

239  {
241  return fMean;
242  }
Spectrum * fMean
spectra for mean
void FindBandBoundaries(BandOptions opt=kBandFromNominal) const
const Spectrum * ana::GenieMultiverseSpectra::Nominal ( ) const

return the nominal universe

Definition at line 244 of file GenieMultiverseSyst.cxx.

References om::cerr, e, allTimeWatchdog::endl, fSpectra, and stan::math::out_of_range().

Referenced by make_muonid_opt(), make_vertex_optimiz(), MakePlots(), ToAreaNormalizedTH1(), ToTH1(), ToTH2(), xsec_tot_uncert_optimization(), and xsec_uncertainty_per_bin().

245  {
246  Spectrum* nominal_u = 0;
247  try {
248  nominal_u = fSpectra.at(0);
249  } catch(const std::out_of_range& e) {
250  cerr << "Nominal universe is accessed before existence." << endl;
251  }
252 
253  return nominal_u;
254  }
std::vector< Spectrum * > fSpectra
OStream cerr
Definition: OStream.cxx:7
std::vector< float > Spectrum
Definition: Constants.h:610
void out_of_range(const char *function, int max, int index, const char *msg1="", const char *msg2="")
Float_t e
Definition: plot.C:35
void ana::GenieMultiverseSpectra::SaveTo ( TDirectory *  dir,
const std::string name 
) const

Save the Spectrum structure of all universe to a TFile directory.

Definition at line 655 of file GenieMultiverseSyst.cxx.

References confusionMatrixTree::count, dir, fSpectra, it, tmp, and art::to_string().

Referenced by ana::GenieMultiverseNormalizedSpectra::SaveTo().

655  {
656  TDirectory *tmp = gDirectory;
657 
658  dir = dir->mkdir(name.c_str()); // switch to subdir
659  dir->cd();
660 
661  //~ TVectorD universes(1);
662  //~ universes[0] = {(Double_t)fSpectra.size()};
663  //~ universes.Write("nUniverses");
664  // Could not get the above code to store a resonable unsigned int value,
665  // which leads to failure when executing hadd_cafana.
666  // Among the hadd_cafana data types, TObjString types are also not added.
667  // Gonna try this.
668  TObjString universes(Form("%lu",fSpectra.size()));
669  universes.Write("nUniverses");
670 
671  int count = 0;
672  for(auto& it: fSpectra){
673  it->SaveTo(dir, "universe_"+std::to_string(count));
674  count++;
675  }// end loop over spectra
676 
677  dir->Write();
678  delete dir;
679 
680  tmp->cd();
681  }// end of SaveTo
std::vector< Spectrum * > fSpectra
const XML_Char * name
Definition: expat.h:151
set< int >::iterator it
Float_t tmp
Definition: plot.C:36
TDirectory * dir
Definition: macro.C:5
std::string to_string(ModuleType mt)
Definition: ModuleType.h:32
TGraphAsymmErrors * ana::GenieMultiverseSpectra::ToAreaNormalizedTH1 ( double  pot,
int  col = -1,
int  errCol = -1,
float  headroom = 1.3,
bool  newaxis = true 
) const

Definition at line 256 of file GenieMultiverseSyst.cxx.

References fLowerRMS, fUpperRMS, MECModelEnuComparisons::g, hi(), kRed, lo(), Nominal(), std::sqrt(), std::swap(), ana::Spectrum::ToTH1(), w, and submit_syst::y.

258  {
259  if(col == -1){
260  col = kRed;
261  errCol = kRed-10;
262  }
263  else if(errCol == -1) errCol = col-7; // hopefully a lighter version
264 
265  TH1* nom = Nominal()->ToTH1(pot);
266 
267  std::vector<TH1*> ups, dns;
268  ups.push_back(fUpperRMS->ToTH1(pot));
269  dns.push_back(fLowerRMS->ToTH1(pot));
270 
271  nom->SetLineColor(col);
272  nom->GetXaxis()->CenterTitle();
273  nom->GetYaxis()->CenterTitle();
274  //~ if(newaxis) nom->Draw("hist ]["); // Set the axes up
275 
276  double yMax = nom->GetBinContent(nom->GetMaximumBin());
277 
278  TGraphAsymmErrors* g = new TGraphAsymmErrors;
279 
280  for(int binIdx = 0; binIdx < nom->GetNbinsX()+2; ++binIdx){
281  const double y = nom->GetBinContent(binIdx);
282  g->SetPoint(binIdx, nom->GetXaxis()->GetBinCenter(binIdx), y);
283 
284  const double w = nom->GetXaxis()->GetBinWidth(binIdx);
285 
286  double errUp = 0;
287  double errDn = 0;
288 
289  for(unsigned int systIdx = 0; systIdx < ups.size(); ++systIdx){
290  double hi = ups[systIdx]->GetBinContent(binIdx)-y;
291  double lo = y-dns[systIdx]->GetBinContent(binIdx);
292 
293  if(lo <= 0 && hi <= 0) std::swap(lo, hi);
294 
295  errUp += hi*hi;
296  errDn += lo*lo;
297 
298  // TODO: what happens if they're both high or both low?
299  } // end for systIdx
300 
301 
302  g->SetPointError(binIdx, w/2, w/2, sqrt(errDn), sqrt(errUp));
303  } // end for i
304 
305  g->SetFillColor(errCol);
306  //~ g->Draw("e2 same");
307  g->GetYaxis()->SetRangeUser(0, headroom*yMax);
308  nom->GetYaxis()->SetRangeUser(0, headroom*yMax);
309 
310  //~ nom->Draw("hist ][ same");
311  return g;
312  }
TSpline3 lo("lo", xlo, ylo, 12,"0")
enum BeamMode kRed
Spectrum * fLowerRMS
spectra for lower rms
TH1D * ToTH1(double exposure, Color_t col=kBlack, Style_t style=kSolid, EExposureType expotype=kPOT, EBinType bintype=kBinContent) const
Histogram made from this Spectrum, scaled to some exposure.
Definition: Spectrum.cxx:148
T sqrt(T number)
Definition: d0nt_math.hpp:156
void swap(art::HLTGlobalStatus &lhs, art::HLTGlobalStatus &rhs)
TSpline3 hi("hi", xhi, yhi, 18,"0")
Int_t col[ntarg]
Definition: Style.C:29
#define pot
Spectrum * fUpperRMS
spectra for upper rms
Float_t w
Definition: plot.C:20
const Spectrum * Nominal() const
return the nominal universe
TH1 * ana::GenieMultiverseSpectra::ToTH1 ( ) const

return the nominal histogram with the RMS of all other universes as error band

Definition at line 314 of file GenieMultiverseSyst.cxx.

References Nominal(), and POT.

315  {
316  return ToTH1(Nominal()->POT());
317  }
std::vector< double > POT
const Spectrum * Nominal() const
return the nominal universe
TH1 * ana::GenieMultiverseSpectra::ToTH1 ( double  pot) const

Definition at line 325 of file GenieMultiverseSyst.cxx.

References fSpectra, MECModelEnuComparisons::i, it, kRed, nbinsx, Nominal(), push_back(), and ana::Spectrum::ToTH1().

326  {
327  TH1* hNominal = Nominal()->ToTH1(pot);
328  vector<TH1*> hUniverses;
329  map< int, vector<float> > counts_in_bins;
330  for(auto& it: fSpectra)
331  {
332  TH1* curhist = it->ToTH1(pot);
333  hUniverses.push_back(curhist);
334  int nbinsx = curhist->GetNbinsX();
335  for(int i = 1; i <= nbinsx; i++)
336  counts_in_bins[i].push_back(curhist->GetBinContent(i));
337  }
338 
339  for(auto& it: counts_in_bins)
340  {
341  hNominal->SetBinError(it.first, TMath::RMS(it.second.begin(), it.second.end()));
342  //~ cout << TMath::RMS(it.second.begin(), it.second.end()) << endl;
343  }
344  hNominal->SetLineColor(kRed);
345  hNominal->SetMarkerColor(kRed);
346 
347  return hNominal;
348  }
std::vector< Spectrum * > fSpectra
enum BeamMode kRed
set< int >::iterator it
TH1D * ToTH1(double exposure, Color_t col=kBlack, Style_t style=kSolid, EExposureType expotype=kPOT, EBinType bintype=kBinContent) const
Histogram made from this Spectrum, scaled to some exposure.
Definition: Spectrum.cxx:148
base_types push_back(int_type())
#define pot
Int_t nbinsx
Definition: plot.C:23
const Spectrum * Nominal() const
return the nominal universe
TH2 * ana::GenieMultiverseSpectra::ToTH2 ( ) const

Definition at line 319 of file GenieMultiverseSyst.cxx.

References Nominal(), and POT.

320  {
321  return ToTH2(Nominal()->POT());
322  }
std::vector< double > POT
const Spectrum * Nominal() const
return the nominal universe
TH2 * ana::GenieMultiverseSpectra::ToTH2 ( double  pot) const

Definition at line 351 of file GenieMultiverseSyst.cxx.

References fSpectra, MECModelEnuComparisons::i, it, calib::j, make_pair(), nbinsx, Nominal(), and ana::Spectrum::ToTH2().

352  {
353  TH2* hNominal = Nominal()->ToTH2(pot);
354  vector<TH2*> hUniverses;
355  map< std::pair<int,int>, vector<float> > counts_in_bins;
356  for(auto& it: fSpectra)
357  {
358  TH2* curhist = it->ToTH2(pot);
359  hUniverses.push_back(curhist);
360  int nbinsx = curhist->GetNbinsX();
361  int nbinsy = curhist->GetNbinsY();
362  for(int i = 1; i <= nbinsx; i++)
363  {
364  for(int j = 1; j<= nbinsy; j++)
365  {
366  counts_in_bins[std::make_pair(i,j)].push_back(curhist->GetBinContent(i,j));
367  }
368  }
369  }
370 
371  for(auto& it: counts_in_bins)
372  {
373  hNominal->SetBinError(it.first.first,it.first.second, TMath::RMS(it.second.begin(), it.second.end()));
374  //~ cout << TMath::RMS(it.second.begin(), it.second.end()) << endl;
375  }
376 
377  return hNominal;
378  }
std::vector< Spectrum * > fSpectra
TH2 * ToTH2(double exposure, EExposureType expotype=kPOT, EBinType bintype=kBinContent) const
Spectrum must be 2D to obtain TH2.
Definition: Spectrum.cxx:165
set< int >::iterator it
std::pair< Spectrum *, CheatDecomp * > make_pair(SpectrumLoaderBase &loader_data, SpectrumLoaderBase &loader_mc, HistAxis *axis, Cut *cut, const SystShifts &shift, const Var &wei)
Definition: DataMCLoad.C:336
#define pot
const double j
Definition: BetheBloch.cxx:29
Int_t nbinsx
Definition: plot.C:23
const Spectrum * Nominal() const
return the nominal universe
const Spectrum * ana::GenieMultiverseSpectra::UpperRMS ( ) const

return RMS extremes

Definition at line 381 of file GenieMultiverseSyst.cxx.

References fBoundariesFound, FindBandBoundaries(), and fUpperRMS.

382  {
384  return fUpperRMS;
385  }
Spectrum * fUpperRMS
spectra for upper rms
void FindBandBoundaries(BandOptions opt=kBandFromNominal) const
const Spectrum * ana::GenieMultiverseSpectra::UpperSigma ( BandOptions  opt = kBandFromNominal) const

Member Data Documentation

bool ana::GenieMultiverseSpectra::fBoundariesFound = false
mutableprivate

Definition at line 198 of file GenieMultiverseSyst.h.

Referenced by FindBandBoundaries(), LowerRMS(), Mean(), and UpperRMS().

BandOptions ana::GenieMultiverseSpectra::fCurBandOpt = kNoBand
mutableprotected

Definition at line 136 of file GenieMultiverseSyst.h.

Referenced by FindBandBoundaries(), LowerSigma(), and UpperSigma().

knob_sampling_mode_set ana::GenieMultiverseSpectra::fKnobConfigTable
protected

knob configuration table

Definition at line 231 of file GenieMultiverseSyst.h.

Referenced by BuildKnobConfigTable(), and CreateUniverse().

bool ana::GenieMultiverseSpectra::fLoadFromFile = false
private

Definition at line 187 of file GenieMultiverseSyst.h.

Referenced by ~GenieMultiverseSpectra().

Spectrum* ana::GenieMultiverseSpectra::fLowerRMS = NULL
mutableprivate

spectra for lower rms

Definition at line 194 of file GenieMultiverseSyst.h.

Referenced by FindBandBoundaries(), LowerRMS(), ToAreaNormalizedTH1(), and ~GenieMultiverseSpectra().

Spectrum* ana::GenieMultiverseSpectra::fLowerSigma = NULL
mutableprivate

spectra for lower sigma

Definition at line 197 of file GenieMultiverseSyst.h.

Referenced by FindBandBoundaries(), and LowerSigma().

Spectrum* ana::GenieMultiverseSpectra::fMean = NULL
mutableprivate

spectra for mean

Definition at line 195 of file GenieMultiverseSyst.h.

Referenced by FindBandBoundaries(), Mean(), and ~GenieMultiverseSpectra().

std::set<int> ana::GenieMultiverseSpectra::fModes = {0, 1, 2}
private

modes of valid configuration.

Definition at line 189 of file GenieMultiverseSyst.h.

unsigned int ana::GenieMultiverseSpectra::fNUniverses
private

number of universes to generate

Definition at line 185 of file GenieMultiverseSyst.h.

Referenced by FindBandBoundaries(), and GenieMultiverseSpectra().

std::vector<std::map<const ISyst*, double> > ana::GenieMultiverseSpectra::fShiftTable
private

Definition at line 191 of file GenieMultiverseSyst.h.

Referenced by CreateUniverse().

std::vector<Spectrum*> ana::GenieMultiverseSpectra::fSpectra
protected

spectra of all universes

Definition at line 124 of file GenieMultiverseSyst.h.

Referenced by FindBandBoundaries(), GenieMultiverseSpectra(), Nominal(), SaveTo(), ToTH1(), ToTH2(), and ~GenieMultiverseSpectra().

int ana::GenieMultiverseSpectra::fUniverseSeed = 1001
protected

Random seed sequence. Need to have each universe with the same physical parameters. Start from 1001, giving way to the PPFX multi-universe.

Definition at line 132 of file GenieMultiverseSyst.h.

Referenced by CreateUniverse().

Spectrum* ana::GenieMultiverseSpectra::fUpperRMS = NULL
mutableprivate

spectra for upper rms

Definition at line 193 of file GenieMultiverseSyst.h.

Referenced by FindBandBoundaries(), ToAreaNormalizedTH1(), UpperRMS(), and ~GenieMultiverseSpectra().

Spectrum* ana::GenieMultiverseSpectra::fUpperSigma = NULL
mutableprivate

spectra for upper sigma

Definition at line 196 of file GenieMultiverseSyst.h.

Referenced by FindBandBoundaries(), and UpperSigma().


The documentation for this class was generated from the following files: