3 #include <Math/Vector4D.h>
4 #include <unordered_map>
6 #define BRANCH(NAME, ...) __VA_ARGS__& NAME = tree[#NAME].write<__VA_ARGS__>()
7 #define TRANSIENT_BRANCH(NAME, ...) __VA_ARGS__& NAME = tree[#NAME].transient_write<__VA_ARGS__>()
8 #define ONLY_NOMINAL_BRANCH(NAME, ...) __VA_ARGS__& NAME = Framework::condition_branch<__VA_ARGS__>(tree, #NAME, !doingSystematics())
10 typedef ROOT::Math::LorentzVector<ROOT::Math::PtEtaPhiE4D<float>> LorentzVector;
11 typedef std::unordered_map<std::string, float> tauDiscriminatorMap;
13 #include <cp3_llbb/TreeWrapper/interface/TreeWrapper.h>
16 T& condition_branch(ROOT::TreeGroup& tree,
const std::string& branch_name,
bool condition) {
18 return tree[branch_name].write<T>();
20 return tree[branch_name].transient_write<T>();
24 template<
typename Type>
25 std::set<Type> union_sets(std::initializer_list<std::set<Type>> sets)
27 std::set<Type> result;
28 for(
const auto& set : sets)
29 result.insert(set.begin(), set.end());