22 typedef std::vector<std::vector<double>> array2D;
23 typedef std::vector<double> array1D;
29 explicit AnalysisEntry(std::vector<Variable> vars,
Cuts* cuts =
nullptr,
Variable vars4weight = {}) : vars_(std::move(vars)),
30 var4weight_(std::move(vars4weight)),
32 var4weight_.IfEmptyVariableConvertToOnes(vars_.at(0));
36 void Init(
const Configuration& conf,
const std::map<std::string, Matching*>& matches);
39 size_t AddVariable(
const Variable& var);
41 ANALYSISTREE_ATTR_NODISCARD
const array2D& GetValues()
const {
return values_; }
42 ANALYSISTREE_ATTR_NODISCARD
const array1D& GetWeights()
const {
return weights_; }
43 ANALYSISTREE_ATTR_NODISCARD
const std::set<std::string>& GetBranchNames()
const {
return branch_names_; }
45 ANALYSISTREE_ATTR_NODISCARD
size_t GetNumberOfBranches()
const {
return branch_names_.size(); }
46 ANALYSISTREE_ATTR_NODISCARD
const Cuts* GetCuts()
const {
return cuts_; }
47 ANALYSISTREE_ATTR_NODISCARD
const std::vector<Variable>& GetVariables()
const {
return vars_; }
48 ANALYSISTREE_ATTR_NODISCARD std::vector<Variable>& Variables() {
return vars_; }
49 ANALYSISTREE_ATTR_NODISCARD
const Variable& GetVariableForWeight()
const {
return var4weight_; }
50 ANALYSISTREE_ATTR_NODISCARD
Variable& VariableForWeight() {
return var4weight_; }
52 void AddBranch(
const Branch& branch,
Cuts* cuts =
nullptr);
53 void SetMatching(
Matching* matching) { matching_ = matching; }
54 void SetIsInvertedMatching(
bool is_inverted_matching) { is_inverted_matching_ = is_inverted_matching; }
55 void FillBranchNames();
58 void FillFromEveHeaders();
59 void FillFromOneChannalizedBranch();
60 void FillFromTwoChannalizedBranches();
61 ANALYSISTREE_ATTR_NODISCARD
bool ApplyCutOnBranch(
const Branch& br,
Cuts* cuts,
int i_channel)
const;
62 ANALYSISTREE_ATTR_NODISCARD
bool ApplyCutOnBranches(std::vector<const Branch*>& br, std::vector<Cuts*>& cuts, std::vector<int>& ch)
const;
63 [[deprecated]] ANALYSISTREE_ATTR_NODISCARD
bool ApplyCutOnBranches(
const Branch& br1,
Cuts* cuts1,
int ch1,
const Branch& br2,
Cuts* cuts2,
int ch2)
const;
64 static double FillVariable(
const Variable& var, std::vector<const Branch*>& br, std::vector<int>&
id);
65 [[deprecated]]
static double FillVariable(
const Variable& var,
const Branch& br1,
int ch1,
const Branch& br2,
int ch2);
67 std::vector<Variable> vars_{};
71 std::set<std::string> branch_names_{};
72 std::vector<std::pair<const Branch*, Cuts*>> branches_{};
74 std::vector<int> eve_header_indices_{};
75 std::vector<int> non_eve_header_indices_{};
78 bool is_inverted_matching_{
false};
AnalysisEntry keeps list of Variables from one or more branches. Before each event AnalysisEntry eval...
Definition AnalysisEntry.hpp:20