18#include "GaudiKernel/MsgStream.h"
19#include "GaudiKernel/SystemOfUnits.h"
116 const double sum = aa + bb;
117 const double diff = std::sqrt(sum * sum - 4. * (aa * bb - ab * ab));
120 const double widthSq = 0.5 * (sum -
diff);
121 sigma = std::sqrt(widthSq);
122 const double term = 0.5 * (aa - bb) /
diff;
123 const double cosStereo = std::sqrt(0.5 - term);
124 double sinStereo = 0.0;
126 sinStereo = std::sqrt(0.5 + term);
128 sinStereo = -sinStereo;
134 axis(1) * cosStereo - axis(0) * sinStereo, axis(2));
277 if (calo && !scattering &&
energyLoss->sigmaDeltaE() > 0.) {
363 else if (std::abs(direction(2)) < 0.5)
371 std::bitset<MaterialEffectsBase::NumberOfMaterialEffectsTypes> typeMaterial;
374 auto energyLoss = std::make_unique<EnergyLoss>(deltaE, 0., 0., 0.);
382 std::make_optional<TrackSurfaceIntersection>(
position, direction, 0.);
443 std::make_optional<TrackSurfaceIntersection>(
position, direction, 0.);
551 m_surface(&TSOS.trackParameters()->associatedSurface()),
624 std::abs(sinStereo) < 0.5)
626 const double cosStereo = std::sqrt(1. - sinStereo * sinStereo);
778 double ptInv0 = 1. / momentum.perp();
779 const double cosPhi = ptInv0 * momentum(0);
780 const double sinPhi = ptInv0 * momentum(1);
781 const double cotTheta = ptInv0 * momentum(2);
787 parameters(2) = cosPhi;
788 parameters(3) = sinPhi;
789 parameters(4) = cotTheta;
790 parameters(5) = ptInv0;
797 for (
int row = 0; row < 5; ++row) {
798 covariance(4, row) *= Gaudi::Units::TeV;
799 covariance(row, 4) = covariance(4, row);
801 covariance(4, 4) *= Gaudi::Units::TeV;
802 covariance.inverse();
806 Amg::MatrixX(jacobian * covariance * jacobian.transpose());
871 const std::optional<TrackSurfaceIntersection>& value) {
876 log <<
" residual 1........2 r phi z"
877 <<
" sigma 1.......2 energy energyLoss scatteringAngle "
884 log <<
m_type << std::setiosflags(std::ios::fixed);
886 log << std::setw(9) << std::setprecision(3) << *
m_residual;
888 log << std::setw(9) << std::setprecision(3) << *(
m_residual + 1);
899 log << std::setw(9) << std::setprecision(3) << *
m_residual <<
" outlier ";
906 log << std::setw(10) << std::setprecision(1) <<
position.perp()
907 << std::setw(9) << std::setprecision(4) <<
position.phi() << std::setw(10)
908 << std::setprecision(1) <<
position(2);
911 log << std::setw(13) << std::setprecision(3) << 1. /
m_weight;
913 log << std::setw(8) << std::setprecision(3) << 1. /
m_weight2;
915 log <<
"(" << std::setw(7) << std::setprecision(3)
921 log << std::setw(33) << std::setprecision(3)
922 << 1. / std::abs(
m_qOverP * Gaudi::Units::GeV) << std::setw(12)
923 << std::setprecision(4) <<
m_energyLoss / Gaudi::Units::GeV;
928 log << std::setw(16) << std::setprecision(6) << totScat << std::setw(13)
932 log << std::setw(13) << std::setprecision(3) << 1. /
m_weight;
934 log << std::setw(8) << std::setprecision(3) << 1. /
m_weight2;
938 log << std::setw(13) << std::setprecision(3)
939 << 1. / (
m_weight * Gaudi::Units::GeV) << std::setw(32)
940 << std::setprecision(4) <<
m_energyLoss / Gaudi::Units::GeV;
942 log << std::setw(33) << std::setprecision(3)
943 << 1. / std::abs(
m_qOverP * Gaudi::Units::GeV);
944 log << std::setw(12) << std::setprecision(4)
958 const double pSquare = 1. / (value * value);
974 double totalRadiationThickness) {
989 angle_iPat * angle_iPat);
1022 const double sigma = std::sqrt(
Scalar mag() const
mag method
#define AmgSymMatrix(dim)
void diff(const Jet &rJet1, const Jet &rJet2, std::map< std::string, double > varDiff)
Difference between jets - Non-Class function required by trigger.
double angle(const GeoTrf::Vector2D &a, const GeoTrf::Vector2D &b)
Class to represent misalignments or 'discontinuities' on tracks These have a surface where the z axis...
simple class that constructs the curvilinear vectors curvU and curvV from a given momentum direction ...
Class for a CylinderSurface in the ATLAS detector.
This class describes energy loss material effects in the ATLAS tracking EDM.
const AlignmentEffectsOnTrack * m_alignmentEffects
const Surface * m_surface
const TrackSurfaceIntersection & intersection(ExtrapolationType type) const
double m_minEnergyDeposit
FitMeasurement(int hitIndex, HitOnTrack *hitOnTrack, const MeasurementBase *measurementBase)
double signedDriftDistance(void) const
double m_radiationThickness
HitOnTrack * m_hitOnTrack
bool isPositionMeasurement(void) const
bool m_materialEffectsOwner
const Amg::VectorX & perigee(void) const
unsigned m_firstParameter
const HitOnTrack * hitOnTrack(void) const
static void printHeading(MsgStream &log)
double radiationThickness(void) const
unsigned m_alignmentParameter
double m_scatteringAngleOffSet
double energyLoss(void) const
double sigma2(void) const
std::array< std::optional< TrackSurfaceIntersection >, ExtrapolationTypes > m_intersection
bool isScatterer(void) const
void print(MsgStream &log) const
MeasurementType type(void) const
const MeasurementBase * m_measurementBase
double m_particleMassSquared
Amg::MatrixX m_perigeeWeight
bool m_flippedDriftDistance
const MeasurementBase * measurementBase(void) const
double m_signedDriftDistance
bool m_numericalDerivative
const MaterialEffectsBase * materialEffects(void) const
bool isAlignment(void) const
const MaterialEffectsBase * m_materialEffects
unsigned m_alignmentParameter2
Amg::Vector3D m_sensorDirection
std::vector< double >::iterator m_residual
double qOverP(void) const
bool isEnergyDeposit(void) const
const AlignmentEffectsOnTrack * alignmentEffects(void) const
int numberDoF(void) const
const Surface * surface(void) const
const Amg::Vector3D & position(void) const
void setSigmaSymmetric(void)
void scatteringAngle(double angle, double totalRadiationThickness)
Amg::Vector3D m_minimizationDirection
This is the 5x5 jacobian for the transformation of track parameters and errors having a momentum repr...
base class to integrate material effects on Trk::Track in a flexible way.
@ EnergyLossEffects
contains energy loss corrections
represents the full description of deflection and e-loss of a track in material.
const EnergyLoss * energyLoss() const
returns the energy loss object.
const ScatteringAngles * scatteringAngles() const
returns the MCS-angles object.
This class is the pure abstract base class for all fittable tracking measurements.
Class describing the Line to which the Perigee refers to.
Class for a planaer rectangular or trapezoidal surface in the ATLAS detector.
represents a deflection of the track caused through multiple scattering in material.
double deltaPhi() const
returns the
double sigmaDeltaTheta() const
returns the
double deltaTheta() const
returns the
Class for a StraightLineSurface in the ATLAS detector to describe dirft tube and straw like detectors...
Abstract Base Class for tracking surfaces.
represents the track state (measurement, material, fit parameters and quality) at a surface.
bool type(const TrackStateOnSurfaceType type) const
Use this method to find out if the TSoS is of a certain type: i.e.
@ Outlier
This TSoS contains an outlier, that is, it contains a MeasurementBase/RIO_OnTrack which was not used ...
An intersection with a Surface is given by.
Bounds for a trapezoidal, planar Surface.
Definition of ATLAS Math & Geometry primitives (Amg)
Eigen::Matrix< double, Eigen::Dynamic, Eigen::Dynamic > MatrixX
Dynamic Matrix - dynamic allocation.
double error(const Amg::MatrixX &mat, int index)
return diagonal error of the matrix caller should ensure the matrix is symmetric and the index is in ...
Eigen::Matrix< double, 3, 1 > Vector3D
Eigen::Matrix< double, Eigen::Dynamic, 1 > VectorX
Dynamic Vector - dynamic allocation.
Ensure that the ATLAS eigen extensions are properly loaded.
ParametersBase< TrackParametersDim, Charged > TrackParameters