ATLAS Offline Software
ThreeVectorBranch.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_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 
18 namespace MuonVal {
20 public:
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 
46 private:
50 };
51 }
52 #endif
MuonVal::MuonTesterBranch
Definition: MuonTesterBranch.h:21
MuonVal::ThreeVectorBranch::m_z
VectorBranch< float > & m_z
Definition: ThreeVectorBranch.h:49
MuonVal::ThreeVectorBranch::ThreeVectorBranch
ThreeVectorBranch(MuonTesterTree &tree, const std::string &vec_name)
Definition: ThreeVectorBranch.cxx:10
vec
std::vector< size_t > vec
Definition: CombinationsGeneratorTest.cxx:12
MuonVal::VectorBranch< float >
MuonTesterTree.h
x
#define x
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:8
MuonVal::ThreeVectorBranch
Definition: ThreeVectorBranch.h:19
MuonVal::MuonTesterBranch::tree
TTree * tree() override final
Returns the underlying TTree object.
Definition: MuonTesterBranch.cxx:53
VectorBranch.h
MuonVal::ThreeVectorBranch::push_back
void push_back(const Amg::Vector3D &vec)
interface using the Amg::Vector3D
Definition: ThreeVectorBranch.cxx:23
SimpleVector.h
MuonVal::MuonTesterTree
Definition: MuonTesterTree.h:30
z
#define z
MuonVal::ThreeVectorBranch::m_y
VectorBranch< float > & m_y
Definition: ThreeVectorBranch.h:48
MuonVal::ThreeVectorBranch::operator+=
void operator+=(const Amg::Vector3D &vec)
Definition: ThreeVectorBranch.cxx:25
MuonVal::MuonTesterTree::newVector
VectorBranch< T > & newVector(const std::string &name)
Creates new branches and returns their reference.
MuonVal::MuonTesterBranch::name
std::string name() const override final
Returns the name of the branch.
Definition: MuonTesterBranch.cxx:51
MuonVal::ThreeVectorBranch::m_x
VectorBranch< float > & m_x
Definition: ThreeVectorBranch.h:47
MuonVal
Class to store array like branches into the n-tuples.
Definition: MuonTPMetaDataAlg.cxx:25
Amg::Vector3D
Eigen::Matrix< double, 3, 1 > Vector3D
Definition: GeoPrimitives.h:47
python.LumiBlobConversion.pos
pos
Definition: LumiBlobConversion.py:18
MuonVal::MuonTesterBranch::parent
MuonTesterTree & parent()
Returns the reference to the MuonTesterTree parent.
Definition: MuonTesterBranch.cxx:38
y
#define y
GeoPrimitivesHelpers.h
MuonVal::ThreeVectorBranch::set
void set(const Amg::Vector3D &vec, size_t pos)
Definition: ThreeVectorBranch.cxx:24
MuonVal::ThreeVectorBranch::size
size_t size() const
Definition: ThreeVectorBranch.cxx:11
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:7