Public Member Functions | Protected Attributes | List of all members
protoana::ThinSliceDriver Class Referenceabstract

#include <ThinSliceDriver.h>

Inheritance diagram for protoana::ThinSliceDriver:
protoana::AbsCexDriver

Public Member Functions

 ThinSliceDriver (const fhicl::ParameterSet &extra_options)
 
virtual ~ThinSliceDriver ()
 
virtual void FillMCEvents (TTree *tree, std::vector< ThinSliceEvent > &events, std::vector< ThinSliceEvent > &fake_data_events, int &split_val, const bool &do_split)=0
 
virtual void BuildDataHists (TTree *tree, ThinSliceDataSet &data_set, double &flux, int split_val=0)=0
 
virtual void BuildFakeData (TTree *tree, std::map< int, std::vector< std::vector< ThinSliceSample >>> &samples, const std::map< int, bool > &signal_sample_checks, ThinSliceDataSet &data_set, double &flux, std::map< int, std::vector< double >> &sample_scales, std::vector< double > &beam_energy_bins, int split_val=0)=0
 
virtual void BuildMCSamples (const std::vector< ThinSliceEvent > &events, std::map< int, std::vector< std::vector< ThinSliceSample >>> &samples, const std::map< int, bool > &signal_sample_checks, std::map< int, double > &nominal_fluxes, std::map< int, std::vector< std::vector< double >>> &fluxes_by_sample, std::vector< double > &beam_energy_bins)=0
 
virtual void RefillMCSamples (const std::vector< ThinSliceEvent > &events, std::map< int, std::vector< std::vector< ThinSliceSample >>> &samples, const std::map< int, bool > &signal_sample_checks, std::vector< double > &beam_energy_bins, const std::map< int, std::vector< double >> &signal_pars, const std::map< int, double > &flux_pars, const std::map< std::string, ThinSliceSystematic > &syst_pars, bool fit_under_over, bool fill_incident=false)=0
 
virtual std::pair< double, size_t > CalculateChi2 (std::map< int, std::vector< std::vector< ThinSliceSample >>> &samples, ThinSliceDataSet &data_set)=0
 
virtual void CompareSelections (std::map< int, std::vector< std::vector< ThinSliceSample >>> &samples, ThinSliceDataSet &data_set, TFile &output_file, std::vector< std::pair< int, int >> plot_style, bool plot_rebinned, bool post_fit, int nPars, TDirectory *plot_dir)=0
 
virtual void GetCurrentHists (std::map< int, std::vector< std::vector< ThinSliceSample >>> &samples, ThinSliceDataSet &data_set, std::map< int, std::vector< TH1 * >> &hists, bool plot_rebinned)=0
 
virtual void GetCurrentTruthHists (std::map< int, std::vector< std::vector< ThinSliceSample >>> &samples, std::map< int, std::vector< TH1 * >> &hists, std::map< int, std::vector< TH1 * >> &inc_hists, std::map< int, std::vector< TH1 * >> &xsec_hists, const std::vector< int > &incident_samples, const std::map< int, std::vector< double >> &signal_bins)=0
 
virtual void PlotThrows (ThinSliceDataSet &data_set, std::map< int, std::vector< TH1 * >> &throw_hists, std::map< int, std::vector< std::vector< ThinSliceSample >>> &samples, size_t nThrows, std::map< int, std::vector< TH1 * >> &truth_throw_hists, std::map< int, std::vector< TH1 * >> &truth_inc_hists, std::map< int, std::vector< TH1 * >> &truth_xsec_hists, std::map< int, TH1 * > &best_fit_incs, std::map< int, TH1 * > &best_fit_xsecs, std::map< int, TH1 * > &nominal_incs, std::map< int, TH1 * > &nominal_xsecs, TFile &output_file, bool plot_rebinned, std::map< int, std::vector< double >> *sample_scales=0x0)=0
 
void CompareDataMC (std::map< int, std::vector< std::vector< ThinSliceSample >>> &samples, ThinSliceDataSet &data_set, TFile &output_file, std::vector< std::pair< int, int >> plot_style, int nPars, TDirectory *plot_dir, bool plot_rebinned=false, bool post_fit=false)
 
std::pair< int, int > GetColorAndStyle (size_t i, const std::vector< std::pair< int, int >> &plot_style)
 
virtual void SetupSysts (const std::vector< ThinSliceEvent > &events, std::map< int, std::vector< std::vector< ThinSliceSample >>> &samples, const std::map< int, bool > &signal_sample_checks, std::vector< double > &beam_energy_bins, const std::map< std::string, ThinSliceSystematic > &pars, TFile &output_file)=0
 
virtual void WrapUpSysts (TFile &output_file)=0
 

Protected Attributes

fhicl::ParameterSet fExtraOptions
 

Detailed Description

Definition at line 19 of file ThinSliceDriver.h.

Constructor & Destructor Documentation

protoana::ThinSliceDriver::ThinSliceDriver ( const fhicl::ParameterSet extra_options)

Definition at line 6 of file ThinSliceDriver.cxx.

8  : fExtraOptions(extra_options) {}
fhicl::ParameterSet fExtraOptions
protoana::ThinSliceDriver::~ThinSliceDriver ( )
virtual

Definition at line 10 of file ThinSliceDriver.cxx.

10 {}

Member Function Documentation

virtual void protoana::ThinSliceDriver::BuildDataHists ( TTree *  tree,
ThinSliceDataSet data_set,
double &  flux,
int  split_val = 0 
)
pure virtual

Implemented in protoana::AbsCexDriver.

virtual void protoana::ThinSliceDriver::BuildFakeData ( TTree *  tree,
std::map< int, std::vector< std::vector< ThinSliceSample >>> &  samples,
const std::map< int, bool > &  signal_sample_checks,
ThinSliceDataSet data_set,
double &  flux,
std::map< int, std::vector< double >> &  sample_scales,
std::vector< double > &  beam_energy_bins,
int  split_val = 0 
)
pure virtual

Implemented in protoana::AbsCexDriver.

virtual void protoana::ThinSliceDriver::BuildMCSamples ( const std::vector< ThinSliceEvent > &  events,
std::map< int, std::vector< std::vector< ThinSliceSample >>> &  samples,
const std::map< int, bool > &  signal_sample_checks,
std::map< int, double > &  nominal_fluxes,
std::map< int, std::vector< std::vector< double >>> &  fluxes_by_sample,
std::vector< double > &  beam_energy_bins 
)
pure virtual

Implemented in protoana::AbsCexDriver.

virtual std::pair<double, size_t> protoana::ThinSliceDriver::CalculateChi2 ( std::map< int, std::vector< std::vector< ThinSliceSample >>> &  samples,
ThinSliceDataSet data_set 
)
pure virtual

Implemented in protoana::AbsCexDriver.

void protoana::ThinSliceDriver::CompareDataMC ( std::map< int, std::vector< std::vector< ThinSliceSample >>> &  samples,
ThinSliceDataSet data_set,
TFile &  output_file,
std::vector< std::pair< int, int >>  plot_style,
int  nPars,
TDirectory *  plot_dir,
bool  plot_rebinned = false,
bool  post_fit = false 
)

Definition at line 12 of file ThinSliceDriver.cxx.

19  {
20 
21  for (auto it = samples.begin(); it != samples.end(); ++it) {
22  std::vector<ThinSliceSample> & vec = it->second[0];
23  for (size_t i = 0; i < vec.size(); ++i) {
24  vec[i].RefillRebinnedHists();
25 
26  }
27 
28  for (size_t i = 1; i < it->second.size(); ++i) {
29  std::vector<ThinSliceSample> & vec = it->second[i];
30  for (size_t j = 0; j < vec.size(); ++j) {
31  vec[j].RefillRebinnedHists();
32  }
33  }
34  }
35 
37  samples, data_set, output_file, plot_style, plot_rebinned,
38  post_fit, nPars, plot_dir);
39 }
virtual void CompareSelections(std::map< int, std::vector< std::vector< ThinSliceSample >>> &samples, ThinSliceDataSet &data_set, TFile &output_file, std::vector< std::pair< int, int >> plot_style, bool plot_rebinned, bool post_fit, int nPars, TDirectory *plot_dir)=0
virtual void protoana::ThinSliceDriver::CompareSelections ( std::map< int, std::vector< std::vector< ThinSliceSample >>> &  samples,
ThinSliceDataSet data_set,
TFile &  output_file,
std::vector< std::pair< int, int >>  plot_style,
bool  plot_rebinned,
bool  post_fit,
int  nPars,
TDirectory *  plot_dir 
)
pure virtual

Implemented in protoana::AbsCexDriver.

virtual void protoana::ThinSliceDriver::FillMCEvents ( TTree *  tree,
std::vector< ThinSliceEvent > &  events,
std::vector< ThinSliceEvent > &  fake_data_events,
int &  split_val,
const bool do_split 
)
pure virtual

Implemented in protoana::AbsCexDriver.

std::pair< int, int > protoana::ThinSliceDriver::GetColorAndStyle ( size_t  i,
const std::vector< std::pair< int, int >> &  plot_style 
)

Definition at line 42 of file ThinSliceDriver.cxx.

44  {
45  return {plot_style.at(i % plot_style.size()).first,
46  (i < plot_style.size() ? 1001: 3244)};
47 }
virtual void protoana::ThinSliceDriver::GetCurrentHists ( std::map< int, std::vector< std::vector< ThinSliceSample >>> &  samples,
ThinSliceDataSet data_set,
std::map< int, std::vector< TH1 * >> &  hists,
bool  plot_rebinned 
)
pure virtual

Implemented in protoana::AbsCexDriver.

virtual void protoana::ThinSliceDriver::GetCurrentTruthHists ( std::map< int, std::vector< std::vector< ThinSliceSample >>> &  samples,
std::map< int, std::vector< TH1 * >> &  hists,
std::map< int, std::vector< TH1 * >> &  inc_hists,
std::map< int, std::vector< TH1 * >> &  xsec_hists,
const std::vector< int > &  incident_samples,
const std::map< int, std::vector< double >> &  signal_bins 
)
pure virtual

Implemented in protoana::AbsCexDriver.

virtual void protoana::ThinSliceDriver::PlotThrows ( ThinSliceDataSet data_set,
std::map< int, std::vector< TH1 * >> &  throw_hists,
std::map< int, std::vector< std::vector< ThinSliceSample >>> &  samples,
size_t  nThrows,
std::map< int, std::vector< TH1 * >> &  truth_throw_hists,
std::map< int, std::vector< TH1 * >> &  truth_inc_hists,
std::map< int, std::vector< TH1 * >> &  truth_xsec_hists,
std::map< int, TH1 * > &  best_fit_incs,
std::map< int, TH1 * > &  best_fit_xsecs,
std::map< int, TH1 * > &  nominal_incs,
std::map< int, TH1 * > &  nominal_xsecs,
TFile &  output_file,
bool  plot_rebinned,
std::map< int, std::vector< double >> *  sample_scales = 0x0 
)
pure virtual

Implemented in protoana::AbsCexDriver.

virtual void protoana::ThinSliceDriver::RefillMCSamples ( const std::vector< ThinSliceEvent > &  events,
std::map< int, std::vector< std::vector< ThinSliceSample >>> &  samples,
const std::map< int, bool > &  signal_sample_checks,
std::vector< double > &  beam_energy_bins,
const std::map< int, std::vector< double >> &  signal_pars,
const std::map< int, double > &  flux_pars,
const std::map< std::string, ThinSliceSystematic > &  syst_pars,
bool  fit_under_over,
bool  fill_incident = false 
)
pure virtual

Implemented in protoana::AbsCexDriver.

virtual void protoana::ThinSliceDriver::SetupSysts ( const std::vector< ThinSliceEvent > &  events,
std::map< int, std::vector< std::vector< ThinSliceSample >>> &  samples,
const std::map< int, bool > &  signal_sample_checks,
std::vector< double > &  beam_energy_bins,
const std::map< std::string, ThinSliceSystematic > &  pars,
TFile &  output_file 
)
pure virtual

Implemented in protoana::AbsCexDriver.

virtual void protoana::ThinSliceDriver::WrapUpSysts ( TFile &  output_file)
pure virtual

Implemented in protoana::AbsCexDriver.

Member Data Documentation

fhicl::ParameterSet protoana::ThinSliceDriver::fExtraOptions
protected

Definition at line 140 of file ThinSliceDriver.h.


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