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