30#ifndef GBLUTILITIES_H_
31#define GBLUTILITIES_H_
52 const Eigen::Vector3d &tDir,
const Eigen::Vector3d &uDir,
53 const Eigen::Vector3d &vDir,
const Eigen::Vector3d &nDir,
54 const Eigen::Vector3d &aPos);
65 const Eigen::Vector2d
pred;
66 const Eigen::Vector3d
tdir;
67 const Eigen::Vector3d
udir;
68 const Eigen::Vector3d
vdir;
69 const Eigen::Vector3d
ndir;
70 const Eigen::Vector3d
pos;
80 GblSimpleHelix(
double aRinv,
double aPhi0,
double aDca,
double aDzds,
83 double getPhi(
double aRadius)
const;
86 void moveToXY(
double xPos,
double yPos,
double &newPhi0,
double &newDca,
89 const Eigen::Vector3d &uDir,
const Eigen::Vector3d &vDir)
const;
110 const int aDim,
const double thickness, Eigen::Vector3d &aCenter,
111 Eigen::Vector2d &aResolution, Eigen::Vector2d &aPrecision,
112 Eigen::Matrix3d &measTrafo, Eigen::Matrix3d &alignTrafo);
126 Eigen::Vector3d &direction)
const;
128 Eigen::Vector3d &direction)
const;
130 Eigen::Matrix3d &rotation)
const;
132 Eigen::Matrix3d &rotation)
const;
double xbyx0
normalized material thickness
Eigen::Vector3d getCenter() const
Get center.
unsigned int getRigidBodyGlobalLabel(const unsigned int aPar) const
Get global label.
GblHelixPrediction intersectWithHelix(GblSimpleHelix hlx) const
Intersect with helix.
Eigen::Vector3d ndir
normal to measurement plane
Eigen::Vector3d center
center
double getRadiationLength() const
Get radiation length.
void print() const
Print GblDetectorLayer.
unsigned int measDim
measurement dimension (1 or 2)
Eigen::Matrix< double, 2, 6 > getRigidBodyDerLocal(Eigen::Vector3d &position, Eigen::Vector3d &direction) const
Get rigid body derivatives in local (alignment) frame (rotated in measurement plane).
unsigned int getLayerID() const
Get layer ID.
Eigen::Matrix3d getMeasSystemDirs() const
Get directions of measurement system.
Eigen::Matrix< double, 6, 6 > getTrafoGlobalToLocal(Eigen::Vector3d &offset, Eigen::Matrix3d &rotation) const
Get transformation for rigid body derivatives from global to local (alignment) system.
Eigen::Matrix< double, 3, 6 > getRigidBodyDerGlobal(Eigen::Vector3d &position, Eigen::Vector3d &direction) const
Get rigid body derivatives in global frame.
Eigen::Matrix3d global2meas
transformation into measurement system
unsigned int layer
layer ID
GblDetectorLayer(const std::string aName, const unsigned int aLayer, const int aDim, const double thickness, Eigen::Vector3d &aCenter, Eigen::Vector2d &aResolution, Eigen::Vector2d &aPrecision, Eigen::Matrix3d &measTrafo, Eigen::Matrix3d &alignTrafo)
Create a detector layer.
Eigen::Matrix3d getAlignSystemDirs() const
Get directions of alignment system.
virtual ~GblDetectorLayer()
Eigen::Vector2d precision
measurements precision
Eigen::Vector2d getResolution() const
Get resolution.
void printMP2Constraint() const
Print MP2 constraint.
bool alignInMeasSys
alignment == measurement system?
Eigen::Matrix< double, 6, 6 > getTrafoLocalToGlobal(Eigen::Vector3d &offset, Eigen::Matrix3d &rotation) const
Get transformation for rigid body derivatives from local (alignment) to global system.
Eigen::Vector2d resolution
measurements resolution
Eigen::Vector2d getPrecision() const
Get precision.
Eigen::Matrix3d global2align
transformation into (local) alignment system
Eigen::Matrix< double, 2, 3 > getCurvilinearDirs() const
Get curvilinear directions (U,V)
const Eigen::Vector3d pos
position at prediction
double getArcLength() const
Get arc-length.
const Eigen::Vector2d & getMeasPred() const
Get (measurement) prediction.
const double sarc
arc-length at prediction
double getCosIncidence() const
Get cosine of incidence.
Eigen::Matrix3d global2meas
transformation into measurement system
const Eigen::Vector3d & getPosition() const
Get position.
const Eigen::Vector3d vdir
measurement direction for v
const Eigen::Vector2d pred
prediction for measurement (u,v)
const Eigen::Vector3d udir
measurement direction for u
const Eigen::Vector3d tdir
track direction at prediction
GblHelixPrediction(double sArc, const Eigen::Vector2d &aPred, const Eigen::Vector3d &tDir, const Eigen::Vector3d &uDir, const Eigen::Vector3d &vDir, const Eigen::Vector3d &nDir, const Eigen::Vector3d &aPos)
Create helix prediction.
const Eigen::Vector3d & getDirection() const
Get position.
const Eigen::Vector3d ndir
normal to measurement plane
virtual ~GblHelixPrediction()
double getArcLengthR(double aRadius) const
Get (2D) arc length for given radius (to ref. point)
void moveToXY(double xPos, double yPos, double &newPhi0, double &newDca, double &newZ0) const
Move to new reference point (X,Y)
virtual ~GblSimpleHelix()
GblHelixPrediction getPrediction(const Eigen::Vector3d &refPos, const Eigen::Vector3d &uDir, const Eigen::Vector3d &vDir) const
Get prediction.
GblSimpleHelix(double aRinv, double aPhi0, double aDca, double aDzds, double aZ0)
Create simple helix.
const double rinv
curvature (1/Radius)
double getPhi(double aRadius) const
Get phi (of point on circle) for given radius (to ref. point)
const double sinPhi0
sin(phi0)
double getArcLengthXY(double xPos, double yPos) const
Get (2D) arc length for given point.
const double dca
distance to origin in XY plane at PCA
const double z0
offset in ZS plane
const double cosPhi0
cos(phi0)
const double xRelCenter
X position of circle center / R.
const double dzds
slope in ZS plane (dZ/dS)
const double phi0
azimuth at PCA (point of closest approach to origin in XY plane, defines arc-length S=0)
const double yRelCenter
Y position of circle center / R.
Namespace for the general broken lines package.
double unrm()
unit normal distribution, Box-Muller method, polar form
double gblMultipleScatteringError(double qbyp, double xbyx0)
Multiple scattering error.
double unif()
uniform distribution [0..1]
Matrix5d gblSimpleJacobian(double ds, double cosl, double bfac)
Simple jacobian.