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)
 

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

◆ makeLabel()

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

Definition at line 20 of file SegmentFitterEventData.cxx.

20  {
21  std::stringstream sstr{};
22  sstr<<"x_{0}="<<std::format("{:.2f}", pars[toInt(ParamDefs::x0)])<<", ";
23  sstr<<"y_{0}="<<std::format("{:.2f}", pars[toInt(ParamDefs::y0)])<<", ";
24  sstr<<std::format("#theta={:.3f}", pars[toInt(ParamDefs::theta)] / Gaudi::Units::deg )<<", ";
25  sstr<<std::format("#phi={:.3f}", pars[toInt(ParamDefs::phi)] / Gaudi::Units::deg)<<", ";
26  sstr<<"t_{0}="<<std::format("{:.1f}", pars[toInt(ParamDefs::time)]);
27  return sstr.str();
28  }

◆ 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 14 of file SegmentFitterEventData.cxx.

14  {
16  return std::make_pair(Amg::Vector3D(pars[toInt(ParamDefs::x0)],
17  pars[toInt(ParamDefs::y0)],0.),
18  Amg::Vector3D(phi.cs*theta.sn,phi.sn*theta.sn, theta.cs));
19  }

◆ 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 38 of file SegmentFitterEventData.cxx.

38  {
39  switch (a){
40  case ParamDefs::x0:{
41  return "x0";
42  break;
43  } case ParamDefs::y0: {
44  return "y0";
45  break;
46  } case ParamDefs::theta: {
47  return "theta";
48  break;
49  } case ParamDefs::phi: {
50  return "phi";
51  break;
52  } case ParamDefs::time: {
53  return "time";
54  break;
55  } case ParamDefs::nPars:
56  break;
57  }
58  return "";
59  }

◆ toString() [2/2]

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

Definition at line 29 of file SegmentFitterEventData.cxx.

29  {
30  std::stringstream sstr{};
31  sstr<< std::format("{}={:.2f}, ",toString(ParamDefs::x0), pars[toInt(ParamDefs::x0)]);
32  sstr<< std::format("{}={:.2f}, ",toString(ParamDefs::y0), pars[toInt(ParamDefs::y0)]);
36  return sstr.str();
37  }
make_hlt_rep.pars
pars
Definition: make_hlt_rep.py:90
python.PerfMonSerializer.p
def p
Definition: PerfMonSerializer.py:743
phi
Scalar phi() const
phi method
Definition: AmgMatrixBasePlugin.h:67
vtune_athena.format
format
Definition: vtune_athena.py:14
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
Amg::toString
std::string toString(const Translation3D &translation, int precision=4)
GeoPrimitvesToStringConverter.
Definition: GeoPrimitivesToStringConverter.h:40
MuonR4::SegmentFit::ParamDefs::x0
@ x0
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
a
TList * a
Definition: liststreamerinfos.cxx:10
CaloSwCorrections.time
def time(flags, cells_name, *args, **kw)
Definition: CaloSwCorrections.py:242
CxxUtils::sincos
Helper to simultaneously calculate sin and cos of the same angle.
Definition: sincos.h:76
MuonR4::SegmentFit::ParamDefs::nPars
@ nPars