ATLAS Offline Software
Loading...
Searching...
No Matches
NswClusteringUtils.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 MUONPREPRAWDATA_NSWCLUSTERING_UTILS_H
5#define MUONPREPRAWDATA_NSWCLUSTERING_UTILS_H
6
9
15namespace Muon {
16 namespace NswClustering {
21 inline Amg::Vector3D toLocal(const Amg::Transform3D& toLocalTrans, const Amg::Vector3D& dir) {
22 Amg::Rotation3D rotMat{toLocalTrans.linear()};
23 const Amg::Vector3D rotDir = rotMat * dir;
24 return Amg::Vector3D{rotDir.x(), rotDir.y(), std::abs(rotDir.z())};
25 }
26
27 inline Amg::Vector3D toLocal(const Trk::Surface& surf, const Amg::Vector3D& dir){
28 Amg::Rotation3D rotMat{surf.transform().inverse().linear()};
29 const Amg::Vector3D rotDir = rotMat * dir;
30 return Amg::Vector3D{rotDir.x(), rotDir.y(), std::abs(rotDir.z())};
31 }
32 inline Amg::Vector3D toLocal(const MuonCluster& prd,const Amg::Vector3D& dir){
33 return toLocal(prd.detectorElement()->surface(prd.identify()), dir);
34 }
35 inline Amg::Vector3D toLocal(const MuonCluster& prd) {
36 return toLocal(prd, prd.globalPosition().unit());
37 }
38 }
39}
40#endif
virtual const Amg::Vector3D & globalPosition() const =0
Returns the global position of the measurement (calculated on the fly)
virtual const TrkDetElementBase * detectorElement() const =0
return the detector element corresponding to this PRD The pointer will be zero if the det el is not d...
Identifier identify() const
return the identifier
Abstract Base Class for tracking surfaces.
const Amg::Transform3D & transform() const
Returns HepGeom::Transform3D by reference.
virtual const Surface & surface() const =0
Return surface associated with this detector element.
Eigen::Quaternion< double > Rotation3D
Eigen::Affine3d Transform3D
Eigen::Matrix< double, 3, 1 > Vector3D
Amg::Vector3D toLocal(const Amg::Transform3D &toLocalTrans, const Amg::Vector3D &dir)
Rotates a direction vector into a local frame: x-axis : Parallell to the radial direction of the dete...
NRpcCablingAlg reads raw condition data and writes derived condition data to the condition store.