29#include <RKTrackRep.h>
45 :
AbsMeasurement(rawHitCoords, rawHitCov, detId, hitId, trackPoint), maxDistance_(2), leftRight_(0)
62 TVector3 wireDirection = wire2 - wire1;
63 wireDirection.SetMag(1.);
70 const TVector3& poca = rep->
getPos(st);
71 TVector3 dirInPoca = rep->
getMom(st);
73 const TVector3& pocaOnWire = wire1 + wireDirection.Dot(poca - wire1)*wireDirection;
76 if (fabs(wireDirection.Angle(dirInPoca)) < 0.01){
77 Exception exc(
"WireMeasurement::detPlane(): Cannot construct detector plane, direction is parallel to wire", __LINE__,__FILE__);
82 TVector3 U = dirInPoca.Cross(wireDirection);
113 double val = 0.5 * pow(std::max(0., 1 - mR/
maxDistance_), 2.);
118 std::vector<MeasurementOnPlane*> retVal;
119 retVal.push_back(mopL);
120 retVal.push_back(mopR);
125 if (
dynamic_cast<const RKTrackRep*
>(rep) == NULL) {
126 Exception exc(
"WireMeasurement default implementation can only handle state vectors of type RKTrackRep!", __LINE__,__FILE__);
HMatrix for projecting from AbsTrackRep parameters to measured parameters in a DetPlane.
Contains the measurement and covariance in raw detector coordinates.
Abstract base class for a track representation.
virtual double extrapolateToLine(StateOnPlane &state, const TVector3 &linePoint, const TVector3 &lineDirection, bool stopAtBoundary=false, bool calcJacobianNoise=false) const =0
Extrapolates the state to the POCA to a line, and returns the extrapolation length and,...
virtual TVector3 getMom(const StateOnPlane &state) const =0
Get the cartesian momentum vector of a state.
virtual TVector3 getPos(const StateOnPlane &state) const =0
Get the cartesian position of a state.
Exception class for error handling in GENFIT (provides storage for diagnostic information)
AbsHMatrix implementation for one-dimensional MeasurementOnPlane and RKTrackRep parameterization.
Measured coordinates on a plane.
void setWeight(double weight)
AbsTrackRep with 5D track parameterization in plane coordinates: (q/p, u', v', u, v)
A state with arbitrary dimension defined in a DetPlane.
const AbsTrackRep * getRep() const
const SharedPlanePtr & getPlane() const
Object containing AbsMeasurement and AbsFitterInfo objects.
virtual std::vector< MeasurementOnPlane * > constructMeasurementsOnPlane(const StateOnPlane &state) const
WireMeasurement(int nDim=7)
void setLeftRightResolution(int lr)
virtual SharedPlanePtr constructPlane(const StateOnPlane &state) const
virtual const AbsHMatrix * constructHMatrix(const AbsTrackRep *) const
boost::shared_ptr< genfit::DetPlane > SharedPlanePtr
Shared Pointer to a DetPlane.