ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
MuonSpectrometer
MuonValidation
MuonTesterTree
MuonTesterTree
ThreeVectorBranch.h
Go to the documentation of this file.
1
/*
2
Copyright (C) 2002-2026 CERN for the benefit of the ATLAS collaboration
3
*/
4
#ifndef MUONTESTER_MUONTHREEVECTORBRANCH_H
5
#define MUONTESTER_MUONTHREEVECTORBRANCH_H
6
7
#include <
GeoPrimitives/GeoPrimitivesHelpers.h
>
8
#include <
MuonTesterTree/MuonTesterTree.h
>
9
#include <
MuonTesterTree/VectorBranch.h
>
10
13
namespace
MuonVal
{
14
class
ThreeVectorBranch
:
public
MuonTesterBranch
{
15
public
:
16
ThreeVectorBranch
(
MuonTesterTree
&
tree
,
const
std::string& vec_name);
17
19
void
push_back
(
const
Amg::Vector3D
&
vec
);
20
void
operator+=
(
const
Amg::Vector3D
&
vec
);
21
void
set
(
const
Amg::Vector3D
&
vec
,
size_t
pos);
22
23
void
push_back
(
const
TVector3&
vec
);
24
void
operator+=
(
const
TVector3&
vec
);
25
void
set
(
const
TVector3&
vec
,
size_t
pos);
26
27
void
push_back
(
const
float
x
,
const
float
y
,
const
float
z
);
28
void
set
(
const
float
x
,
const
float
y
,
const
float
z
,
size_t
pos);
29
30
size_t
size
()
const
;
31
32
bool
fill
(
const
EventContext&)
override
final
;
33
bool
init
()
override
final
;
34
35
private
:
36
VectorBranch<float>
&
m_x
{
parent
().
newVector
<
float
>(
name
() +
"X"
)};
37
VectorBranch<float>
&
m_y
{
parent
().
newVector
<
float
>(
name
() +
"Y"
)};
38
VectorBranch<float>
&
m_z
{
parent
().
newVector
<
float
>(
name
() +
"Z"
)};
39
};
40
41
class
UnitThreeVectorBranch
:
public
MuonTesterBranch
{
42
public
:
43
UnitThreeVectorBranch
(
MuonTesterTree
&
tree
,
const
std::string& vec_name);
44
46
void
push_back
(
const
Amg::Vector3D
&
vec
);
47
void
operator+=
(
const
Amg::Vector3D
&
vec
);
48
void
set
(
const
Amg::Vector3D
&
vec
,
size_t
pos);
49
50
void
push_back
(
const
float
x
,
const
float
y
,
const
float
z
);
51
void
set
(
const
float
x
,
const
float
y
,
const
float
z
,
size_t
pos);
52
size_t
size
()
const
;
53
54
bool
fill
(
const
EventContext&)
override
final
;
55
bool
init
()
override
final
;
56
private
:
57
VectorBranch<float>
&
m_theta
{
parent
().
newVector
<
float
>(
name
() +
"Theta"
)};
58
VectorBranch<float>
&
m_phi
{
parent
().
newVector
<
float
>(
name
() +
"Phi"
)};
59
};
60
61
62
}
63
#endif
vec
std::vector< size_t > vec
Definition
CombinationsGeneratorTest.cxx:9
GeoPrimitivesHelpers.h
MuonTesterTree.h
y
#define y
x
#define x
z
#define z
VectorBranch.h
MuonVal::MuonTesterBranch::MuonTesterBranch
MuonTesterBranch(MuonTesterTree &tree, const std::string &br_name)
Definition
MuonTesterBranch.cxx:33
MuonVal::MuonTesterBranch::parent
MuonTesterTree & parent()
Returns the reference to the MuonTesterTree parent.
Definition
MuonTesterBranch.cxx:38
MuonVal::MuonTesterBranch::name
std::string name() const override final
Returns the name of the branch.
Definition
MuonTesterBranch.cxx:51
MuonVal::MuonTesterBranch::tree
TTree * tree() override final
Returns the underlying TTree object.
Definition
MuonTesterBranch.cxx:53
MuonVal::MuonTesterTree
Definition
MuonTesterTree.h:38
MuonVal::MuonTesterTree::newVector
VectorBranch< T > & newVector(const std::string &name)
Creates new branches and returns their reference.
MuonVal::ThreeVectorBranch::operator+=
void operator+=(const Amg::Vector3D &vec)
Definition
ThreeVectorBranch.cxx:31
MuonVal::ThreeVectorBranch::m_x
VectorBranch< float > & m_x
Definition
ThreeVectorBranch.h:36
MuonVal::ThreeVectorBranch::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
ThreeVectorBranch.cxx:13
MuonVal::ThreeVectorBranch::init
bool init() override final
The init method checks whether the branch name has already registered to the MuonTree and tries then ...
Definition
ThreeVectorBranch.cxx:14
MuonVal::ThreeVectorBranch::set
void set(const Amg::Vector3D &vec, size_t pos)
Definition
ThreeVectorBranch.cxx:30
MuonVal::ThreeVectorBranch::m_y
VectorBranch< float > & m_y
Definition
ThreeVectorBranch.h:37
MuonVal::ThreeVectorBranch::size
size_t size() const
Definition
ThreeVectorBranch.cxx:17
MuonVal::ThreeVectorBranch::push_back
void push_back(const Amg::Vector3D &vec)
interface using the Amg::Vector3D
Definition
ThreeVectorBranch.cxx:29
MuonVal::ThreeVectorBranch::ThreeVectorBranch
ThreeVectorBranch(MuonTesterTree &tree, const std::string &vec_name)
Definition
ThreeVectorBranch.cxx:16
MuonVal::ThreeVectorBranch::m_z
VectorBranch< float > & m_z
Definition
ThreeVectorBranch.h:38
MuonVal::UnitThreeVectorBranch::set
void set(const Amg::Vector3D &vec, size_t pos)
Definition
ThreeVectorBranch.cxx:42
MuonVal::UnitThreeVectorBranch::size
size_t size() const
Definition
ThreeVectorBranch.cxx:38
MuonVal::UnitThreeVectorBranch::UnitThreeVectorBranch
UnitThreeVectorBranch(MuonTesterTree &tree, const std::string &vec_name)
Definition
ThreeVectorBranch.cxx:36
MuonVal::UnitThreeVectorBranch::m_theta
VectorBranch< float > & m_theta
Definition
ThreeVectorBranch.h:57
MuonVal::UnitThreeVectorBranch::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
ThreeVectorBranch.cxx:54
MuonVal::UnitThreeVectorBranch::init
bool init() override final
The init method checks whether the branch name has already registered to the MuonTree and tries then ...
Definition
ThreeVectorBranch.cxx:55
MuonVal::UnitThreeVectorBranch::m_phi
VectorBranch< float > & m_phi
Definition
ThreeVectorBranch.h:58
MuonVal::UnitThreeVectorBranch::operator+=
void operator+=(const Amg::Vector3D &vec)
Definition
ThreeVectorBranch.cxx:40
MuonVal::UnitThreeVectorBranch::push_back
void push_back(const Amg::Vector3D &vec)
interface using the Amg::Vector3D
Definition
ThreeVectorBranch.cxx:39
MuonVal::VectorBranch
Definition
VectorBranch.h:14
Amg::Vector3D
Eigen::Matrix< double, 3, 1 > Vector3D
Definition
GeoPrimitives.h:47
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