TTTT Analysis  0.1
api.hpp
1 #ifndef ROOT_API_HPP
2 #define ROOT_API_HPP
3 #include <string>
4 #include <vector>
5 #include <tuple>
6 #include "filval/api.hpp"
7 #include "filval_root/value.hpp"
8 namespace fv::root{
9 
10 Value<std::vector<TLorentzVector>>* lorentz_vectors(Value<std::vector<float>>* pt, Value<std::vector<float>>* eta,
11  Value<std::vector<float>>* phi, Value<std::vector<float>>* mass,
12  const std::string& alias=""){
13  return new root::LorentzVectors(pt, eta, phi, mass, alias);
14 }
15 
16 Value<std::vector<TLorentzVector>>* lorentz_vectors(const std::string& pt_name, const std::string& eta_name,
17  const std::string& phi_name, const std::string& mass_name,
18  const std::string& alias=""){
19  return lorentz_vectors(lookup<std::vector<float>>(pt_name), lookup<std::vector<float>>(eta_name),
20  lookup<std::vector<float>>(phi_name), lookup<std::vector<float>>(mass_name),
21  alias);
22 }
23 
24 Value<std::vector<float>>* energies(Value<std::vector<TLorentzVector>>* vectors,
25  const std::string& alias=""){
26  return new root::Energies(vectors, alias);
27 }
28 
29 Value<std::vector<float>>* energies(const std::string& vectors_name,
30  const std::string& alias=""){
31  return energies(lookup<std::vector<TLorentzVector>>(vectors_name), alias);
32 }
33 
34 }
35 #endif // ROOT_API_HPP
Definition: api.hpp:8