1 #ifndef PROTOANA_PROTODUNEFIT_H 2 #define PROTOANA_PROTODUNEFIT_H 16 #include "TGraphAsymmErrors.h" 20 #include "RooStats/HistFactory/Measurement.h" 21 #include <RooFitResult.h> 47 bool ApplySystematicToSample(RooStats::HistFactory::Sample& sample, TH1* histo, std::vector<TH1*> systvec,
bool hasnormfactor,
bool isnorm);
50 TH1* histo,
bool hasnormfactor,
53 size_t iChan,
size_t iTopo,
54 size_t iTruthBin=999);
56 RooStats::HistFactory::Sample& sample, TH1* histo,
57 bool hasnormfactor,
bool isnorm,
58 size_t iChan,
size_t iTopo,
size_t iTruthBin);
61 RooStats::HistFactory::Sample& sample, TH1* histo,
62 bool hasnormfactor,
bool isnorm,
63 size_t iChan,
size_t iTopo);
66 RooStats::HistFactory::Sample& sample, TH1* histo,
67 bool hasnormfactor,
bool isnorm,
size_t iTopo);
69 std::vector<std::vector<std::pair<TH1*, TH1*>>>
73 RooStats::HistFactory::Sample& sample,
76 std::vector<TH1 *>
DrawXSecs(RooFitResult *fitresult = 0x0);
77 std::vector<TH2 *>
DrawSmearingMatrix(RooFitResult *fitresult,
bool doPostFit =
false);
std::vector< std::string > _SystFileNames
std::vector< TH1 * > _interactingEfficiencyNums
std::vector< std::vector< std::pair< TH1 *, TH1 * > > > BuildIncidentSignalSyst(size_t iTopo)
std::vector< std::string > _IncidentDataFileNames
std::vector< TGraphAsymmErrors * > _efficiencyGraphs
TH1 * _incidentEfficiencyNum
std::vector< std::string > _DataFileNames
bool FillSidebandHistograms_Pions()
std::vector< std::string > _SignalTopologyName
std::vector< std::string > _SidebandTopologyName
TGraphAsymmErrors * _incidentEfficiency
bool BuildSignalSystThenApplyToSample(RooStats::HistFactory::Sample &sample, TH1 *histo, bool hasnormfactor, bool isnorm, size_t iChan, size_t iTopo, size_t iTruthBin)
bool ApplySystematicToSample(RooStats::HistFactory::Sample &sample, TH1 *histo, std::vector< TH1 * > systvec, bool hasnormfactor, bool isnorm)
std::vector< int > _AddBackgroundFactors
std::vector< size_t > _sig_truth_index
bool _AddSidebandsToMeasurement
std::vector< TH1 * > _truthsighistos
std::vector< std::string > _BackgroundTopologyName
std::vector< TH1 * > _incsighistos
std::vector< TH1 * > _incdatahistos
std::vector< size_t > _sig_topo_index
std::vector< int > _enable_bkg_factor
std::vector< TH1 * > _bkghistos
std::vector< size_t > _sig_chan_index
void AddIncidentSamplesAndChannelsToMeasurement(RooStats::HistFactory::Measurement &meas)
std::vector< TH1 * > _interactingEfficiencyDenoms
std::vector< int > _BackgroundTopology
bool BuildSystThenApplyToSample(RooStats::HistFactory::Sample &sample, TH1 *histo, bool hasnormfactor, bool isnorm, protoana::HistType this_histType, size_t iChan, size_t iTopo, size_t iTruthBin=999)
bool _EnableStatisticalError
std::vector< std::string > _SystToConsider
std::vector< TH1 * > _sideband_hists_mc
std::vector< TH1 * > _syst_hists
void AddSidebandSamplesAndChannelsToMeasurement(RooStats::HistFactory::Measurement &meas)
void AddSamplesAndChannelsToMeasurement(RooStats::HistFactory::Measurement &meas)
TH1 * _incidentEfficiencyDenom
std::vector< double > _SidebandBinning
std::vector< std::string > _ChannelNames
bool _EnableSystematicError
std::vector< double > _TruthBinning
std::vector< std::string > _MCFileNames
std::string _TruthTreeName
std::vector< TH2 * > DrawSmearingMatrix(RooFitResult *fitresult, bool doPostFit=false)
std::vector< int > _AddIncidentBackgroundFactors
std::vector< std::string > _IncidentMCFileNames
std::vector< TGraphAsymmErrors * > _interactingEfficiencies
std::vector< int > _IncidentTopology
bool _AddIncidentToMeasurement
double _IgnoreSystematicErrorBelow
std::vector< size_t > _inc_sig_topo_index
double _IgnoreStatisticalErrorBelow
bool Configure(std::string configPath)
std::vector< std::string > _SystType
std::vector< TH1 * > DrawXSecs(RooFitResult *fitresult=0x0)
double _IncidentScaleFactor
std::vector< std::string > _IncidentTopologyName
bool FillHistogramVectors_Pions()
std::vector< int > _SidebandTopology
std::string _RecoTreeName
bool BuildIncidentSystThenApplyToSample(RooStats::HistFactory::Sample &sample, TH1 *histo, bool hasnormfactor, bool isnorm, size_t iTopo)
std::vector< int > _enable_inc_bkg_factor
void BuildWorkspace(TString Outputfile, int analysis=-1)
std::vector< TH1 * > _datahistos
std::vector< size_t > _bkg_chan_index
bool BuildBackgroundSystThenApplyToSample(RooStats::HistFactory::Sample &sample, TH1 *histo, bool hasnormfactor, bool isnorm, size_t iChan, size_t iTopo)
bool _NormalisedSystematic
std::vector< int > _SignalTopology
std::vector< std::string > _DataControlSampleFiles
std::vector< TH1 * > _incbkghistos
std::vector< size_t > _bkg_topo_index
std::vector< TH1 * > _sideband_hists_data
std::vector< double > _RecoBinning
void ScaleMCToData(bool data_is_mc=false)
std::vector< TH1 * > _sighistos
void DecorateEfficiency(TGraphAsymmErrors *eff, std::string x_title="E_{true} at vertex [MeV]")
std::vector< size_t > _inc_bkg_topo_index
bool ApplyBuiltSystToSample(TH1 *histo, TH1 *high_hist, TH1 *low_hist, RooStats::HistFactory::Sample &sample, std::string syst_name, std::string syst_type, bool hasnormfactor)
std::vector< std::string > _MCControlSampleFiles