4 #include "TLorentzVector.h" 20 std::vector<int> sizes = {pt.size(), eta.size(), phi.size(), mass.size()};
21 int size = *std::min_element(sizes.begin(), sizes.end());
24 for (
int i =0; i<size; i++){
25 lv.SetPtEtaPhiM(pt[i], eta[i], phi[i], mass[i]);
26 this->value.push_back(lv);
32 Value<std::vector<float>>* eta,
33 Value<std::vector<float>>* phi,
34 Value<std::vector<float>>* mass,
35 const std::string& alias)
39 +mass->get_name()+
")",
41 pt_val(pt), eta_val(eta), phi_val(phi), mass_val(mass) { }
48 std::vector<TLorentzVector>& vecs = vectors->
get_value();
51 this->value.push_back(v.Energy());
57 const std::string& alias)
63 #endif // root_value_hpp
void update_value()
Updates the internal value.
Definition: value.hpp:15
A generic value.
Definition: value.hpp:338
void update_value()
Updates the internal value.
Definition: value.hpp:47
A generic, derived, value.
Definition: value.hpp:389
virtual T & get_value()=0
Calculate, if necessary, and return the value held by this object.