4#ifndef MUONTESTER_MUONFOURVECTORBRANCH_H
5#define MUONTESTER_MUONFOURVECTORBRANCH_H
10#include <TLorentzVector.h>
21 void set(
const TLorentzVector&
vec,
size_t pos);
25 void set(
const HepMC::FourVector&
vec,
size_t pos);
28 void push_back(
const float pt,
const float eta,
const float phi,
const float e);
29 void set(
const float pt,
const float eta,
const float phi,
const float e,
size_t pos);
33 bool fill(
const EventContext&)
override final;
34 bool init()
override final;
52 void set(
const TLorentzVector&
vec,
size_t pos);
56 void set(
const HepMC::FourVector&
vec,
size_t pos);
58 void push_back(
const float x,
const float y,
const float z,
const float t);
59 void set(
const float x,
const float y,
const float z,
const float t,
size_t pos);
63 bool fill(
const EventContext&)
override final;
64 bool init() override final;
Scalar eta() const
pseudorapidity method
Scalar phi() const
phi method
std::vector< size_t > vec
VectorBranch< float > & m_x
CartesFourVecBranch(MuonTesterTree &tree, const std::string &vec_name, Type t)
VectorBranch< float > & m_t
void set(const TLorentzVector &vec, size_t pos)
VectorBranch< float > & m_z
bool init() override final
The init method checks whether the branch name has already registered to the MuonTree and tries then ...
void push_back(const TLorentzVector &vec)
void operator+=(const TLorentzVector &vec)
bool fill(const EventContext &) override final
The fill method checks if enough information is provided such that the branch is cleared from the inf...
VectorBranch< float > & m_y
MuonTesterBranch(MuonTesterTree &tree, const std::string &br_name)
MuonTesterTree & parent()
Returns the reference to the MuonTesterTree parent.
std::string name() const override final
Returns the name of the branch.
TTree * tree() override final
Returns the underlying TTree object.
VectorBranch< T > & newVector(const std::string &name)
Creates new branches and returns their reference.
bool fill(const EventContext &) override final
The fill method checks if enough information is provided such that the branch is cleared from the inf...
VectorBranch< float > & m_phi
VectorBranch< float > & m_eta
void push_back(const TLorentzVector &vec)
PtEtaPhiEBranch(MuonTesterTree &tree, const std::string &vec_name)
void set(const TLorentzVector &vec, size_t pos)
VectorBranch< float > & m_e
void operator+=(const TLorentzVector &vec)
VectorBranch< float > & m_pt
bool init() override final
The init method checks whether the branch name has already registered to the MuonTree and tries then ...
Class to store array like branches into the n-tuples.