ATLAS Offline Software
Loading...
Searching...
No Matches
ThreeVectorBranch.h
Go to the documentation of this file.
1/*
2Copyright (C) 2002-2023 CERN for the benefit of the ATLAS collaboration
3*/
4#ifndef MUONTESTER_MUONTHREEVECTORBRANCH_H
5#define MUONTESTER_MUONTHREEVECTORBRANCH_H
6
8#ifndef XAOD_ANALYSIS
9#ifndef HEPMC3
10#include <HepMC/SimpleVector.h>
11#endif
12#endif
15
18namespace MuonVal {
20public:
21 ThreeVectorBranch(MuonTesterTree& tree, const std::string& vec_name);
22
24 void push_back(const Amg::Vector3D& vec);
25 void operator+=(const Amg::Vector3D& vec);
26 void set(const Amg::Vector3D& vec, size_t pos);
27
28 void push_back(const TVector3& vec);
29 void operator+=(const TVector3& vec);
30 void set(const TVector3& vec, size_t pos);
31#ifndef HEPMC3
32#ifndef XAOD_ANALYSIS
33 void push_back(const HepMC::ThreeVector& vec);
34 void operator+=(const HepMC::ThreeVector& vec);
35 void set(const HepMC::ThreeVector& vec, size_t pos);
36#endif
37#endif
38 void push_back(const float x, const float y, const float z);
39 void set(const float x, const float y, const float z, size_t pos);
40
41 size_t size() const;
42
43 bool fill(const EventContext&) override final;
44 bool init() override final;
45
46private:
50};
51}
52#endif
std::vector< size_t > vec
#define y
#define x
#define z
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.
void operator+=(const Amg::Vector3D &vec)
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...
bool init() override final
The init method checks whether the branch name has already registered to the MuonTree and tries then ...
void set(const Amg::Vector3D &vec, size_t pos)
VectorBranch< float > & m_y
void push_back(const Amg::Vector3D &vec)
interface using the Amg::Vector3D
ThreeVectorBranch(MuonTesterTree &tree, const std::string &vec_name)
VectorBranch< float > & m_z
Eigen::Matrix< double, 3, 1 > Vector3D
Class to store array like branches into the n-tuples.
Definition HitValAlg.cxx:19