ATLAS Offline Software
Typedefs | Enumerations | Functions
MuonR4::SegmentFit Namespace Reference

Typedefs

using Parameters = AmgVector(toInt(ParamDefs::nPars))
 
using Covariance = AmgSymMatrix(toInt(ParamDefs::nPars))
 

Enumerations

enum  ParamDefs {
  ParamDefs::y0 = 0, ParamDefs::theta = 1, ParamDefs::x0 = 2, ParamDefs::phi = 3,
  ParamDefs::time = 4, ParamDefs::nPars
}
 This file defines the parameter enums in the Trk namespace. More...
 
enum  AxisDefs { AxisDefs::phi = 0, AxisDefs::eta = 1, AxisDefs::t0 = 2 }
 

Functions

constexpr int toInt (const ParamDefs p)
 
constexpr int toInt (const AxisDefs a)
 
std::pair< Amg::Vector3D, Amg::Vector3DmakeLine (const Parameters &pars)
 Returns the parsed parameters into an Eigen line parametrization. More...
 
std::string makeLabel (const Parameters &pars)
 
std::string toString (const Parameters &pars)
 
std::string toString (const ParamDefs par)
 
Amg::Vector3D dirFromTangents (const double tanPhi, const double tanTheta)
 Constructs a direction vector from tanPhi & tanTheta. More...
 
Parameters localSegmentPars (const xAOD::MuonSegment &seg)
 Returns the localSegPars decoration from a xAODMuon::Segment. More...
 
Parameters localSegmentPars (const ActsGeometryContext &gctx, const Segment &segment)
 Returns the local segment parameters from a segment object. More...
 

Typedef Documentation

◆ Covariance

Definition at line 49 of file MuonHoughDefs.h.

◆ Parameters

Definition at line 48 of file MuonHoughDefs.h.

Enumeration Type Documentation

◆ AxisDefs

Enumerator
phi 
eta 
t0 

Definition at line 37 of file MuonHoughDefs.h.

37  {
38  phi = 0,
39  eta = 1,
40  t0 = 2,
41  };

◆ ParamDefs

This file defines the parameter enums in the Trk namespace.

Usage examples:

  • Access the y-coordinate of the cartesian local frame:
    LocalPosition locpos(2.3, 4.5);
    double x = locpos[Trk::locX];
  • Access the eta-value of a track state on a surface (Tsos):
    double theEta = Tsos[Trk::eta]
  • Access the eta-value of a track state on a surface (Tsos):
    double theEta = Tsos[Trk::eta]
Author
Andre.nosp@m.as.S.nosp@m.alzbu.nosp@m.rger.nosp@m.@cern.nosp@m..ch
Enumerator
y0 
theta 
x0 
phi 
time 
nPars 

Definition at line 29 of file MuonHoughDefs.h.

29  {
30  y0 = 0,
31  theta = 1,
32  x0 = 2,
33  phi = 3,
34  time = 4,
35  nPars
36  };

Function Documentation

◆ dirFromTangents()

Amg::Vector3D MuonR4::SegmentFit::dirFromTangents ( const double  tanPhi,
const double  tanTheta 
)

Constructs a direction vector from tanPhi & tanTheta.

Parameters
tanPhiTangent of the [x] to [z] axis
tanThetaTangent of the [y] to [z] axis

Definition at line 23 of file SegmentFitterEventData.cxx.

23  {
24  return Amg::Vector3D(tanPhi, tanTheta, 1.).unit();
25  }

◆ localSegmentPars() [1/2]

Parameters MuonR4::SegmentFit::localSegmentPars ( const ActsGeometryContext gctx,
const Segment segment 
)

Returns the local segment parameters from a segment object.

Parameters
gctxGeometry context storing the local -> global transformation
segmentReference to the segment

Definition at line 36 of file SegmentFitterEventData.cxx.

37  {
39  const Amg::Transform3D globToLoc = segment.msSector()->globalToLocalTrans(gctx);
40  const Amg::Vector3D locPos = globToLoc * segment.position();
41  const Amg::Vector3D locDir = globToLoc.linear() * segment.direction();
42  pars[toInt(ParamDefs::x0)] = locPos.x();
43  pars[toInt(ParamDefs::y0)] = locPos.y();
44  pars[toInt(ParamDefs::theta)] = locDir.theta();
45  pars[toInt(ParamDefs::phi)] = locDir.phi();
46  pars[toInt(ParamDefs::time)] = segment.segementT0();
47  return pars;
48  }

◆ localSegmentPars() [2/2]

Parameters MuonR4::SegmentFit::localSegmentPars ( const xAOD::MuonSegment seg)

Returns the localSegPars decoration from a xAODMuon::Segment.

Definition at line 32 of file SegmentFitterEventData.cxx.

32  {
33  static const SG::Accessor<xAOD::MeasVector<toInt(ParamDefs::nPars)>> acc{"localSegPars"};
34  return xAOD::toEigen(xAOD::ConstVectorMap<toInt(ParamDefs::nPars)>{acc(seg).data()});
35  }

◆ makeLabel()

std::string MuonR4::SegmentFit::makeLabel ( const Parameters pars)

Definition at line 50 of file SegmentFitterEventData.cxx.

50  {
51  std::stringstream sstr{};
52  sstr<<std::format("x_{{0}}={:.2f}", pars[toInt(ParamDefs::x0)])<<", ";
53  sstr<<std::format("y_{{0}}={:.2f}", pars[toInt(ParamDefs::y0)])<<", ";
54  sstr<<std::format("#theta={:.2f}^{{#circ}}", pars[toInt(ParamDefs::theta)] / Gaudi::Units::deg )<<", ";
55  sstr<<std::format("#phi={:.2f}^{{#circ}}", pars[toInt(ParamDefs::phi)] / Gaudi::Units::deg)<<", ";
56  sstr<<std::format("t_{{0}}={:.1f}", pars[toInt(ParamDefs::time)]);
57  return sstr.str();
58  }

◆ makeLine()

std::pair< Amg::Vector3D, Amg::Vector3D > MuonR4::SegmentFit::makeLine ( const Parameters pars)

Returns the parsed parameters into an Eigen line parametrization.

The first operand is the position. The other is the direction.

Definition at line 26 of file SegmentFitterEventData.cxx.

26  {
27  return std::make_pair(Amg::Vector3D(pars[toInt(ParamDefs::x0)],
28  pars[toInt(ParamDefs::y0)],0.),
31  }

◆ toInt() [1/2]

constexpr int MuonR4::SegmentFit::toInt ( const AxisDefs  a)
constexpr

Definition at line 45 of file MuonHoughDefs.h.

45  {
46  return static_cast<int>(a);
47  }

◆ toInt() [2/2]

constexpr int MuonR4::SegmentFit::toInt ( const ParamDefs  p)
constexpr

Definition at line 42 of file MuonHoughDefs.h.

42  {
43  return static_cast<int>(p);
44  }

◆ toString() [1/2]

std::string MuonR4::SegmentFit::toString ( const ParamDefs  par)

Definition at line 68 of file SegmentFitterEventData.cxx.

68  {
69  switch (a){
70  case ParamDefs::x0:{
71  return "x0";
72  break;
73  } case ParamDefs::y0: {
74  return "y0";
75  break;
76  } case ParamDefs::theta: {
77  return "theta";
78  break;
79  } case ParamDefs::phi: {
80  return "phi";
81  break;
82  } case ParamDefs::time: {
83  return "time";
84  break;
85  } case ParamDefs::nPars:
86  break;
87  }
88  return "";
89  }

◆ toString() [2/2]

std::string MuonR4::SegmentFit::toString ( const Parameters pars)

Definition at line 59 of file SegmentFitterEventData.cxx.

59  {
60  std::stringstream sstr{};
61  sstr<< std::format("{}={:.2f}, ",toString(ParamDefs::x0), pars[toInt(ParamDefs::x0)]);
62  sstr<< std::format("{}={:.2f}, ",toString(ParamDefs::y0), pars[toInt(ParamDefs::y0)]);
66  return sstr.str();
67  }
make_hlt_rep.pars
pars
Definition: make_hlt_rep.py:90
MuonR4::SegmentFit::Parameters
AmgVector(toInt(ParamDefs::nPars)) Parameters
Definition: MuonHoughDefs.h:48
phi
Scalar phi() const
phi method
Definition: AmgMatrixBasePlugin.h:67
vtune_athena.format
format
Definition: vtune_athena.py:14
SG::Accessor
Helper class to provide type-safe access to aux data.
Definition: Control/AthContainers/AthContainers/Accessor.h:68
eta
Scalar eta() const
pseudorapidity method
Definition: AmgMatrixBasePlugin.h:83
theta
Scalar theta() const
theta method
Definition: AmgMatrixBasePlugin.h:75
ALFA_EventTPCnv_Dict::t0
std::vector< ALFA_RawData_p1 > t0
Definition: ALFA_EventTPCnvDict.h:42
deg
#define deg
Definition: SbPolyhedron.cxx:17
python.utils.AtlRunQueryDQUtils.p
p
Definition: AtlRunQueryDQUtils.py:210
Amg::toString
std::string toString(const Translation3D &translation, int precision=4)
GeoPrimitvesToStringConverter.
Definition: GeoPrimitivesToStringConverter.h:40
Amg::Transform3D
Eigen::Affine3d Transform3D
Definition: GeoPrimitives.h:46
AthenaPoolTestRead.acc
acc
Definition: AthenaPoolTestRead.py:16
MuonR4::SegmentFit::ParamDefs::x0
@ x0
xAOD::MeasVector
Eigen::Matrix< float, N, 1 > MeasVector
Abrivation of the Matrix & Covariance definitions.
Definition: MeasurementDefs.h:52
MuonR4::SegmentFit::ParamDefs::y0
@ y0
MuonR4::SegmentFit::toInt
constexpr int toInt(const ParamDefs p)
Definition: MuonHoughDefs.h:42
Amg::Vector3D
Eigen::Matrix< double, 3, 1 > Vector3D
Definition: GeoPrimitives.h:47
python.copyTCTOutput.locDir
locDir
Definition: copyTCTOutput.py:113
Amg::dirFromAngles
Amg::Vector3D dirFromAngles(const double phi, const double theta)
Constructs a direction vector from the azimuthal & polar angles.
Definition: GeoPrimitivesHelpers.h:299
a
TList * a
Definition: liststreamerinfos.cxx:10
CaloSwCorrections.time
def time(flags, cells_name, *args, **kw)
Definition: CaloSwCorrections.py:242
MuonR4::SegmentFit::ParamDefs::nPars
@ nPars
xAOD::ConstVectorMap
Eigen::Map< const MeasVector< N > > ConstVectorMap
Definition: MeasurementDefs.h:59
generate::Zero
void Zero(TH1D *hin)
Definition: generate.cxx:32
NSWL1::PadTriggerAdapter::segment
Muon::NSW_PadTriggerSegment segment(const NSWL1::PadTrigger &data)
Definition: PadTriggerAdapter.cxx:5