1 #ifndef THINSLICEDRIVER_hh 2 #define THINSLICEDRIVER_hh 25 TTree *
tree, std::vector<ThinSliceEvent> &
events,
26 std::vector<ThinSliceEvent> & fake_data_events,
27 int & split_val,
const bool & do_split) = 0;
31 int split_val = 0) = 0;
35 std::map<
int,
std::vector<std::vector<ThinSliceSample>>> & samples,
36 const std::map<int, bool> & signal_sample_checks,
38 std::map<
int, std::vector<double>> & sample_scales,
39 std::vector<double> & beam_energy_bins,
40 int split_val = 0) = 0;
44 const std::vector<ThinSliceEvent> & events,
45 std::map<
int,
std::vector<std::vector<ThinSliceSample>>> & samples,
46 const std::map<int, bool> & signal_sample_checks,
47 std::map<int, double> & nominal_fluxes,
48 std::map<
int,
std::vector<std::vector<double>>> & fluxes_by_sample,
49 std::vector<double> & beam_energy_bins) = 0;
52 const std::vector<ThinSliceEvent> & events,
53 std::map<
int,
std::vector<std::vector<ThinSliceSample>>> & samples,
54 const std::map<int, bool> & signal_sample_checks,
55 std::vector<double> & beam_energy_bins,
56 const std::map<
int, std::vector<double>> & signal_pars,
57 const std::map<int, double> & flux_pars,
58 const std::map<std::string, ThinSliceSystematic> & syst_pars,
59 bool fit_under_over,
bool fill_incident =
false) = 0;
69 std::map<
int,
std::vector<std::vector<ThinSliceSample>>> & samples,
73 std::map<
int,
std::vector<std::vector<ThinSliceSample>>> & samples,
78 bool post_fit,
int nPars,
79 TDirectory * plot_dir) = 0;
82 std::map<
int,
std::vector<std::vector<ThinSliceSample>>> & samples,
84 std::map<
int, std::vector<TH1*>> &
hists,
85 bool plot_rebinned) = 0;
88 std::map<
int,
std::vector<std::vector<ThinSliceSample>>> & samples,
89 std::map<
int, std::vector<TH1*>> &
hists,
90 std::map<
int, std::vector<TH1*>> & inc_hists,
91 std::map<
int, std::vector<TH1*>> & xsec_hists,
92 const std::vector<int> & incident_samples,
93 const std::map<
int, std::vector<double>> & signal_bins) = 0;
97 std::map<
int,
std::vector<std::vector<ThinSliceSample>>> & samples,
99 std::map<
int, std::vector<TH1*>> & truth_throw_hists,
100 std::map<
int, std::vector<TH1*>> & truth_inc_hists,
101 std::map<
int, std::vector<TH1*>> & truth_xsec_hists,
102 std::map<int, TH1*> & best_fit_incs,
103 std::map<int, TH1*> & best_fit_xsecs,
104 std::map<int, TH1*> & nominal_incs,
105 std::map<int, TH1*> & nominal_xsecs,
106 TFile & output_file,
bool plot_rebinned,
107 std::map<
int, std::vector<double>> * sample_scales = 0x0) = 0;
119 std::map<
int,
std::vector<std::vector<ThinSliceSample>>> & samples,
124 TDirectory * plot_dir,
125 bool plot_rebinned =
false,
126 bool post_fit =
false);
129 size_t i,
const std::vector<std::pair<int, int>> & plot_style);
132 const std::vector<ThinSliceEvent> & events,
133 std::map<
int,
std::vector<std::vector<ThinSliceSample>>> & samples,
134 const std::map<int, bool> & signal_sample_checks,
135 std::vector<double> & beam_energy_bins,
136 const std::map<std::string, ThinSliceSystematic> & pars,
137 TFile & output_file) = 0;
virtual void BuildDataHists(TTree *tree, ThinSliceDataSet &data_set, double &flux, int split_val=0)=0
std::pair< int, int > GetColorAndStyle(size_t i, const std::vector< std::pair< int, int >> &plot_style)
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
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)
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 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 void FillMCEvents(TTree *tree, std::vector< ThinSliceEvent > &events, std::vector< ThinSliceEvent > &fake_data_events, int &split_val, const bool &do_split)=0
ThinSliceDriver(const fhicl::ParameterSet &extra_options)
virtual std::pair< double, size_t > CalculateChi2(std::map< int, std::vector< std::vector< ThinSliceSample >>> &samples, ThinSliceDataSet &data_set)=0
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 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 WrapUpSysts(TFile &output_file)=0
virtual ~ThinSliceDriver()
fhicl::ParameterSet fExtraOptions
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
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