ATLAS Offline Software
Loading...
Searching...
No Matches
TwoVectorBranch.cxx
Go to the documentation of this file.
1/*
2Copyright (C) 2002-2023 CERN for the benefit of the ATLAS collaboration
3*/
5namespace MuonVal {
6
7bool TwoVectorBranch::fill(const EventContext&) { return true; }
8bool TwoVectorBranch::init() { return true; }
9
10TwoVectorBranch::TwoVectorBranch(MuonTesterTree& tree, const std::string& vec_name) : MuonTesterBranch(tree, vec_name) {}
11size_t TwoVectorBranch::size() const { return m_x.size(); }
12
13void TwoVectorBranch::push_back(const float x, const float y) {
14 m_x += x;
15 m_y += y;
16}
17void TwoVectorBranch::set(const float x, const float y, size_t pos) {
18 m_x[pos] = x;
19 m_y[pos] = y;
20}
22void TwoVectorBranch::set(const Amg::Vector2D& vec, size_t pos) { set(vec[0], vec[1], pos); }
24void TwoVectorBranch::push_back(const TVector2& vec) { push_back(vec.X(), vec.Y()); }
25void TwoVectorBranch::operator+=(const TVector2& vec) { push_back(vec); }
26void TwoVectorBranch::set(const TVector2& vec, size_t pos) { set(vec.X(), vec.Y(), pos); }
27}
std::vector< size_t > vec
#define y
#define x
MuonTesterBranch(MuonTesterTree &tree, const std::string &br_name)
TTree * tree() override final
Returns the underlying TTree object.
VectorBranch< float > & m_x
bool fill(const EventContext &) override final
The fill method checks if enough information is provided such that the branch is cleared from the inf...
TwoVectorBranch(MuonTesterTree &tree, const std::string &vec_name)
void push_back(const TVector2 &vec)
void operator+=(const Amg::Vector2D &vec)
void set(const Amg::Vector2D &vec, size_t pos)
bool init() override final
The init method checks whether the branch name has already registered to the MuonTree and tries then ...
void set(const TVector2 &vec, size_t pos)
VectorBranch< float > & m_y
void push_back(const Amg::Vector2D &vec)
interface using the Amg::Vector3D
Eigen::Matrix< double, 2, 1 > Vector2D
Class to store array like branches into the n-tuples.
Definition HitValAlg.cxx:19