ATLAS Offline Software
Loading...
Searching...
No Matches
CoordTransformBranch.cxx
Go to the documentation of this file.
1/*
2Copyright (C) 2002-2023 CERN for the benefit of the ATLAS collaboration
3*/
5namespace MuonVal {
6
9
10bool CoordTransformBranch::fill(const EventContext&) { return true; }
11bool CoordTransformBranch::init() { return true; }
13
15 m_transform.set(Amg::Vector3D{trans.translation()}, 0);
16 m_transform.set(Amg::Vector3D{trans.linear()*Amg::Vector3D::UnitX()}, 1);
17 m_transform.set(Amg::Vector3D{trans.linear()*Amg::Vector3D::UnitY()}, 2);
18 m_transform.set(Amg::Vector3D{trans.linear()*Amg::Vector3D::UnitZ()}, 3);
19}
20
22 MuonTesterBranch(tree, vec_name) {}
23
24bool CoordSystemsBranch::fill(const EventContext&) { return true; }
25bool CoordSystemsBranch::init() { return true; }
26size_t CoordSystemsBranch::size() const { return m_translation.size(); }
29
30void CoordSystemsBranch::set(const Amg::Transform3D& trans, size_t pos) {
31 m_translation.set(Amg::Vector3D{trans.translation()}, pos);
32 m_linearCol1.set(Amg::Vector3D{trans.linear()*Amg::Vector3D::UnitX()}, pos);
33 m_linearCol2.set(Amg::Vector3D{trans.linear()*Amg::Vector3D::UnitY()}, pos);
34 m_linearCol3.set(Amg::Vector3D{trans.linear()*Amg::Vector3D::UnitZ()}, pos);
35}
36
37}
MuonVal::ThreeVectorBranch m_linearCol1
bool init() override final
The init method checks whether the branch name has already registered to the MuonTree and tries then ...
void push_back(const Amg::Transform3D &trans)
MuonVal::ThreeVectorBranch m_linearCol2
void operator+=(const Amg::Transform3D &trans)
MuonVal::ThreeVectorBranch m_translation
CoordSystemsBranch(MuonTesterTree &tree, const std::string &vec_name)
bool fill(const EventContext &) override final
The fill method checks if enough information is provided such that the branch is cleared from the inf...
MuonVal::ThreeVectorBranch m_linearCol3
void set(const Amg::Transform3D &trans, size_t pos)
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 operator=(const Amg::Transform3D &vec)
CoordTransformBranch(MuonTesterTree &tree, const std::string &vec_name)
void set(const Amg::Transform3D &vec)
MuonTesterBranch(MuonTesterTree &tree, const std::string &br_name)
TTree * tree() override final
Returns the underlying TTree object.
Eigen::Affine3d Transform3D
Eigen::Matrix< double, 3, 1 > Vector3D
Class to store array like branches into the n-tuples.
Definition HitValAlg.cxx:19