FairShip
Loading...
Searching...
No Matches
SHiP::ActsFrame Namespace Reference

Functions

Acts::RotationMatrix3 toShipRotation ()
 Rotation taking ACTS-frame vectors to the SHiP frame.
Acts::RotationMatrix3 toActsRotation ()
 Rotation taking SHiP-frame vectors to the ACTS frame.
Acts::Vector3 positionToActs (double x, double y, double z)
Acts::Vector3 positionToShip (const Acts::Vector3 &position)
Acts::Vector3 momentumToActs (double px, double py, double pz)
Acts::Vector3 momentumToShip (const Acts::Vector3 &momentum)
Acts::Transform3 transformToActs (const Acts::Transform3 &shipTransform)
 Transform of a TGeo placement (SHiP frame, cm) in the ACTS frame.

Variables

constexpr double kShipLength = Acts::UnitConstants::cm
 Length unit of the SHiP frame, in ACTS units.

Detailed Description

Conversions between the SHiP frame and the ACTS reconstruction frame.

The SHiP frame has the beam along z and lengths in cm. The ACTS frame used for the fit has the beam along x, so that tracks sit near theta = 90 deg and away from the coordinate singularity of the bound parameters, and lengths in mm:

x_acts = z_ship, y_acts = y_ship, z_acts = -x_ship

Function Documentation

◆ momentumToActs()

Acts::Vector3 SHiP::ActsFrame::momentumToActs ( double px,
double py,
double pz )
inline

Definition at line 46 of file ActsFrame.hpp.

46 {
47 return toActsRotation() * Acts::Vector3(px, py, pz) *
48 Acts::UnitConstants::GeV;
49}
Acts::RotationMatrix3 toActsRotation()
Rotation taking SHiP-frame vectors to the ACTS frame.
Definition ActsFrame.hpp:31

◆ momentumToShip()

Acts::Vector3 SHiP::ActsFrame::momentumToShip ( const Acts::Vector3 & momentum)
inline

Definition at line 51 of file ActsFrame.hpp.

51 {
52 return toShipRotation() * momentum / Acts::UnitConstants::GeV;
53}
Acts::RotationMatrix3 toShipRotation()
Rotation taking ACTS-frame vectors to the SHiP frame.
Definition ActsFrame.hpp:22

◆ positionToActs()

Acts::Vector3 SHiP::ActsFrame::positionToActs ( double x,
double y,
double z )
inline

Definition at line 38 of file ActsFrame.hpp.

38 {
39 return toActsRotation() * Acts::Vector3(x, y, z) * kShipLength;
40}
constexpr double kShipLength
Length unit of the SHiP frame, in ACTS units.
Definition ActsFrame.hpp:36

◆ positionToShip()

Acts::Vector3 SHiP::ActsFrame::positionToShip ( const Acts::Vector3 & position)
inline

Definition at line 42 of file ActsFrame.hpp.

42 {
43 return toShipRotation() * position / kShipLength;
44}

◆ toActsRotation()

Acts::RotationMatrix3 SHiP::ActsFrame::toActsRotation ( )
inline

Rotation taking SHiP-frame vectors to the ACTS frame.

Definition at line 31 of file ActsFrame.hpp.

31 {
32 return toShipRotation().transpose();
33}

◆ toShipRotation()

Acts::RotationMatrix3 SHiP::ActsFrame::toShipRotation ( )
inline

Rotation taking ACTS-frame vectors to the SHiP frame.

Definition at line 22 of file ActsFrame.hpp.

22 {
23 Acts::RotationMatrix3 rotation;
24 rotation << 0, 0, -1, //
25 0, 1, 0, //
26 1, 0, 0;
27 return rotation;
28}

◆ transformToActs()

Acts::Transform3 SHiP::ActsFrame::transformToActs ( const Acts::Transform3 & shipTransform)
inline

Transform of a TGeo placement (SHiP frame, cm) in the ACTS frame.

Definition at line 56 of file ActsFrame.hpp.

56 {
57 Acts::Transform3 transform = Acts::Transform3::Identity();
58 transform.linear() = toActsRotation() * shipTransform.linear();
59 transform.translation() =
60 toActsRotation() * shipTransform.translation() * kShipLength;
61 return transform;
62}

Variable Documentation

◆ kShipLength

double SHiP::ActsFrame::kShipLength = Acts::UnitConstants::cm
inlineconstexpr

Length unit of the SHiP frame, in ACTS units.

Definition at line 36 of file ActsFrame.hpp.