ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
MuonSpectrometer
MuonValidation
MuonTesterTree
MuonTesterTree
TwoVectorBranch.h
Go to the documentation of this file.
1
/*
2
Copyright (C) 2002-2023 CERN for the benefit of the ATLAS collaboration
3
*/
4
#ifndef MUONTESTER_MUONTWOVECTORBRANCH_H
5
#define MUONTESTER_MUONTWOVECTORBRANCH_H
6
7
#include "
GeoPrimitives/GeoPrimitivesHelpers.h
"
8
#include "
MuonTesterTree/MuonTesterTree.h
"
9
#include "
MuonTesterTree/VectorBranch.h
"
10
11
#include <TVector2.h>
14
namespace
MuonVal
{
15
class
TwoVectorBranch
:
public
MuonTesterBranch
{
16
public
:
17
TwoVectorBranch
(
MuonTesterTree
&
tree
,
const
std::string& vec_name);
18
20
void
push_back
(
const
Amg::Vector2D
&
vec
);
21
void
operator+=
(
const
Amg::Vector2D
&
vec
);
22
void
set
(
const
Amg::Vector2D
&
vec
,
size_t
pos);
23
24
void
push_back
(
const
TVector2&
vec
);
25
void
operator+=
(
const
TVector2&
vec
);
26
void
set
(
const
TVector2&
vec
,
size_t
pos);
27
28
void
push_back
(
const
float
x
,
const
float
y
);
29
void
set
(
const
float
x
,
const
float
y
,
size_t
pos);
30
31
size_t
size
()
const
;
32
33
bool
fill
(
const
EventContext&)
override
final
;
34
bool
init
()
override
final
;
35
36
private
:
37
VectorBranch<float>
&
m_x
{
parent
().
newVector
<
float
>(
name
() +
"X"
)};
38
VectorBranch<float>
&
m_y
{
parent
().
newVector
<
float
>(
name
() +
"Y"
)};
39
};
40
}
41
#endif
vec
std::vector< size_t > vec
Definition
CombinationsGeneratorTest.cxx:9
GeoPrimitivesHelpers.h
MuonTesterTree.h
y
#define y
x
#define x
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::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::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::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
MuonVal::VectorBranch
Definition
VectorBranch.h:14
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