22 typedef std::vector<std::vector<double>> array2D;
23 typedef std::vector<double> array1D;
29 std::pair<int, std::vector<int>> AddEntry(
const AnalysisEntry& vars);
33 void Finish()
override{};
35 ANALYSISTREE_ATTR_NODISCARD
const array2D& GetValues(
int i_var)
const {
return entries_.at(i_var).GetValues(); }
36 ANALYSISTREE_ATTR_NODISCARD
const array1D& GetWeights(
int i_var)
const {
return entries_.at(i_var).GetWeights(); }
37 ANALYSISTREE_ATTR_NODISCARD
const std::vector<AnalysisEntry>& GetVarEntries()
const {
return entries_; }
38 ANALYSISTREE_ATTR_NODISCARD std::vector<AnalysisEntry>& VarEntries() {
return entries_; }
40 void AddBranchCut(
Cuts* cut) {
41 if (cut->GetBranches().size() != 1) {
42 throw std::runtime_error(
"Branch cuts on only 1 branch are allowed at the moment!");
44 std::string br_name = *(cut->GetBranches().begin());
45 if (cuts_map_.find(br_name) != cuts_map_.end()) {
46 throw std::runtime_error(
"Branch cut on " + br_name +
" already exists");
48 cuts_map_[br_name] = cut;
52 std::vector<AnalysisEntry> entries_{};
53 std::map<std::string, Cuts*> cuts_map_{};
AnalysisEntry keeps list of Variables from one or more branches. Before each event AnalysisEntry eval...
Definition AnalysisEntry.hpp:20