ATLAS Offline Software
ALinePar.cxx
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2023 CERN for the benefit of the ATLAS collaboration
3 */
4 
7 #include "GaudiKernel/SystemOfUnits.h"
8 
9 std::ostream& operator<<(std::ostream& ostr, const ALinePar& par) {
10  using Parameter = ALinePar::Parameter;
11  ostr<<"ALine AMDB id (name,eta,phi,job)=(";
12  ostr<<par.AmdbStation()<<",";
13  ostr<<par.AmdbEta()<<",";
14  ostr<<par.AmdbPhi()<<",";
15  ostr<<par.AmdbJob()<<"), ";
16  ostr<<"translation (S/Y,Z,T/X)= (";
17  ostr<<par.getParameter(Parameter::transS)<<",";
18  ostr<<par.getParameter(Parameter::transZ)<<",";
19  ostr<<par.getParameter(Parameter::transT)<<"), ";
20  ostr<<"rotation angle";
21  ostr<<" around S="<<par.getParameter(Parameter::rotS)<<",";
22  ostr<<" around Z="<<par.getParameter(Parameter::rotZ)<<",";
23  ostr<<" around T="<<par.getParameter(Parameter::rotT)<<" ";
24  return ostr;
25 }
26 void ALinePar::setParameters(float s, float z, float t, float rotS, float rotZ, float rotT) {
27  m_payload[static_cast<unsigned int>(Parameter::transS)] = s;
28  m_payload[static_cast<unsigned int>(Parameter::transZ)] = z;
29  m_payload[static_cast<unsigned int>(Parameter::transT)] = t;
30  m_payload[static_cast<unsigned int>(Parameter::rotS) ] = rotS;
31  m_payload[static_cast<unsigned int>(Parameter::rotZ) ] = rotZ;
32  m_payload[static_cast<unsigned int>(Parameter::rotT) ] = rotT;
33 }
34 
35 HepGeom::Transform3D ALinePar::deltaTransform() const { // does NOT account for AMDB origin being different from volume centre;
36  // for that you would need access to full station Position info...
37  // see MuonGeoModel/Station::getDeltaTransform() for details.
38  return HepGeom::TranslateY3D(getParameter(Parameter::transS)) *
39  HepGeom::TranslateZ3D(getParameter(Parameter::transZ)) *
40  HepGeom::TranslateX3D(getParameter(Parameter::transT)) *
41  HepGeom::RotateY3D(getParameter(Parameter::rotS)) *
42  HepGeom::RotateZ3D(getParameter(Parameter::rotZ)) *
43  HepGeom::RotateX3D(getParameter(Parameter::rotT));
44 }
46  return Amg::Translation3D(getParameter(Parameter::transS)*Amg::Vector3D::UnitY()) *
47  Amg::Translation3D(getParameter(Parameter::transZ)*Amg::Vector3D::UnitZ()) *
48  Amg::Translation3D(getParameter(Parameter::transT)*Amg::Vector3D::UnitX()) *
52 }
python.SystemOfUnits.s
int s
Definition: SystemOfUnits.py:131
ALinePar
Definition: ALinePar.h:15
ALinePar::Parameter::rotT
@ rotT
Rotation around the z-axis.
ALinePar.h
operator<<
std::ostream & operator<<(std::ostream &ostr, const ALinePar &par)
Definition: ALinePar.cxx:9
read_hist_ntuple.t
t
Definition: read_hist_ntuple.py:5
ALinePar::Parameter::transS
@ transS
Amg::getRotateZ3D
Amg::Transform3D getRotateZ3D(double angle)
get a rotation transformation around Z-axis
Definition: GeoPrimitivesHelpers.h:270
ALinePar::m_payload
std::array< float, static_cast< unsigned int >Parameter::numPars)> m_payload
Definition: ALinePar.h:53
Amg::getRotateX3D
Amg::Transform3D getRotateX3D(double angle)
get a rotation transformation around X-axis
Definition: GeoPrimitivesHelpers.h:252
ALinePar::setParameters
void setParameters(float s, float z, float t, float rotS, float rotZ, float rotT)
Definition: ALinePar.cxx:26
z
#define z
Amg::Transform3D
Eigen::Affine3d Transform3D
Definition: GeoPrimitives.h:46
ALinePar::getParameter
float getParameter(const Parameter &p) const
Definition: ALinePar.h:34
ALinePar::delta
Amg::Transform3D delta() const
Definition: ALinePar.cxx:45
ALinePar::Parameter::transT
@ transT
Translation along the z-axis.
ALinePar::Parameter::rotZ
@ rotZ
Rotation around the s-axis.
createCoolChannelIdFile.par
par
Definition: createCoolChannelIdFile.py:29
Amg::getRotateY3D
Amg::Transform3D getRotateY3D(double angle)
get a rotation transformation around Y-axis
Definition: GeoPrimitivesHelpers.h:261
ALinePar::Parameter::transZ
@ transZ
Translation along the s-axis.
GeoPrimitivesHelpers.h
Amg::Translation3D
Eigen::Translation< double, 3 > Translation3D
Definition: GeoPrimitives.h:44
ALinePar::deltaTransform
HepGeom::Transform3D deltaTransform() const
Returns the final transformations of the A lines.
Definition: ALinePar.cxx:35
ALinePar::Parameter::rotS
@ rotS
Translation along the t-axis.
ALinePar::Parameter
Parameter
amdb frame (s, z, t) = chamber frame (y, z, x)
Definition: ALinePar.h:23