All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Member Functions | Public Attributes | List of all members
ana::SBNOsc::Covariance::EventSample Class Reference

Public Member Functions

 EventSample (const fhicl::ParameterSet &config, unsigned nUniverses, unsigned nVariations)
 

Public Attributes

double fScaleCC
 
double fScaleNC
 
double fScaleEnergy
 
double fPOT
 
double fScalePOT
 Factor for POT (etc.) scaling. More...
 
std::vector< double > fBins
 Energy bin limits. More...
 
TH1D * fCentralValue
 central value histogram More...
 
std::vector< std::vector< TH1D * > > fUniverses
 List of histogram per systematic universe. More...
 
std::string fName
 Name for the sample. More...
 
std::vector< double > fEnergyBinScale
 

Detailed Description

Definition at line 56 of file Covariance.h.

Constructor & Destructor Documentation

ana::SBNOsc::Covariance::EventSample::EventSample ( const fhicl::ParameterSet &  config,
unsigned  nUniverses,
unsigned  nVariations 
)

Constructors.

Definition at line 28 of file Covariance.cxx.

28  {
29  // get configuration stuff
30  fBins = config.get<std::vector<double> >("binlims");
31  fName = config.get<std::string>("name", "");
32  fScalePOT = config.get<double>("ScalePOT", -1);
33  fScaleCC = config.get<double>("ScaleCC", 1);
34  fScaleNC = config.get<double>("ScaleNC", 1);
35  fScaleEnergy = config.get<double>("ScaleEnergy", 1);
36  fPOT = 0.;
37  fEnergyBinScale = config.get<std::vector<double>>("energy_bin_scale", {});
38  if (fEnergyBinScale.size() == 0) {
39  fEnergyBinScale = std::vector<double>(fBins.size() - 1, 1.0);
40  }
41  else assert(fEnergyBinScale.size() == fBins.size() - 1);
42 
43  // setup histograms
44  std::string cv_title = fName + " Central Value";
45  fCentralValue = new TH1D(cv_title.c_str(), cv_title.c_str(), fBins.size() - 1, &fBins[0]);
46 
47  for (unsigned var_i = 0; var_i < nVariations; var_i++) {
48  fUniverses.emplace_back();
49  for (unsigned i = 0; i < nUniverses; i++) {
50  std::string uni_title = fName + " Variation " + std::to_string(var_i) + " Universe " + std::to_string(i);
51  fUniverses[var_i].push_back(
52  new TH1D(uni_title.c_str(), uni_title.c_str(), fBins.size() - 1, &fBins[0])
53  );
54  }
55  }
56 
57 }
double fScalePOT
Factor for POT (etc.) scaling.
Definition: Covariance.h:66
TH1D * fCentralValue
central value histogram
Definition: Covariance.h:68
std::string fName
Name for the sample.
Definition: Covariance.h:71
std::vector< double > fEnergyBinScale
Definition: Covariance.h:72
std::vector< std::vector< TH1D * > > fUniverses
List of histogram per systematic universe.
Definition: Covariance.h:69
std::string to_string(WindowPattern const &pattern)
std::vector< double > fBins
Energy bin limits.
Definition: Covariance.h:67

Member Data Documentation

std::vector<double> ana::SBNOsc::Covariance::EventSample::fBins

Energy bin limits.

Definition at line 67 of file Covariance.h.

TH1D* ana::SBNOsc::Covariance::EventSample::fCentralValue

central value histogram

Definition at line 68 of file Covariance.h.

std::vector<double> ana::SBNOsc::Covariance::EventSample::fEnergyBinScale

Definition at line 72 of file Covariance.h.

std::string ana::SBNOsc::Covariance::EventSample::fName

Name for the sample.

Definition at line 71 of file Covariance.h.

double ana::SBNOsc::Covariance::EventSample::fPOT

Definition at line 65 of file Covariance.h.

double ana::SBNOsc::Covariance::EventSample::fScaleCC

Definition at line 62 of file Covariance.h.

double ana::SBNOsc::Covariance::EventSample::fScaleEnergy

Definition at line 64 of file Covariance.h.

double ana::SBNOsc::Covariance::EventSample::fScaleNC

Definition at line 63 of file Covariance.h.

double ana::SBNOsc::Covariance::EventSample::fScalePOT

Factor for POT (etc.) scaling.

Definition at line 66 of file Covariance.h.

std::vector<std::vector<TH1D *> > ana::SBNOsc::Covariance::EventSample::fUniverses

List of histogram per systematic universe.

Definition at line 69 of file Covariance.h.


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