20 #include "PlanarMeasurement.h"
22 #include <Exception.h>
23 #include <RKTrackRep.h>
26 #include <HMatrixUV.h>
33 PlanarMeasurement::PlanarMeasurement(
int nDim)
34 : AbsMeasurement(nDim), physicalPlane_(), planeId_(-1), stripV_(false)
39 PlanarMeasurement::PlanarMeasurement(
const TVectorD& rawHitCoords,
const TMatrixDSym& rawHitCov,
int detId,
int hitId, TrackPoint* trackPoint)
40 : AbsMeasurement(rawHitCoords, rawHitCov, detId, hitId, trackPoint), physicalPlane_(), planeId_(-1), stripV_(false)
42 assert(rawHitCoords_.GetNrows() >= 1);
47 if (!physicalPlane_) {
48 Exception exc(
"PlanarMeasurement::constructPlane(): No plane has been set!", __LINE__,__FILE__);
51 return physicalPlane_;
55 std::vector<MeasurementOnPlane*> PlanarMeasurement::constructMeasurementsOnPlane(
const StateOnPlane& state)
const {
59 state.getPlane(), state.getRep(), constructHMatrix(state.getRep()));
61 std::vector<MeasurementOnPlane*> retVal;
62 retVal.push_back(mop);
69 if (
dynamic_cast<const RKTrackRep*
>(rep) ==
nullptr) {
70 Exception exc(
"SpacepointMeasurement default implementation can only handle state vectors of type RKTrackRep!", __LINE__,__FILE__);
74 switch(rawHitCoords_.GetNrows()) {
84 Exception exc(
"PlanarMeasurement default implementation can only handle 1D (strip) or 2D (pixel) measurements!", __LINE__,__FILE__);
90 void PlanarMeasurement::Streamer(TBuffer &R__b)
95 typedef ::genfit::PlanarMeasurement thisClass;
97 if (R__b.IsReading()) {
98 Version_t R__v = R__b.ReadVersion(&R__s, &R__c);
if (R__v) { }
101 baseClass0::Streamer(R__b);
104 physicalPlane_.reset();
106 physicalPlane_.reset(
new DetPlane());
107 physicalPlane_->Streamer(R__b);
110 R__b.CheckByteCount(R__s, R__c, thisClass::IsA());
112 R__c = R__b.WriteVersion(thisClass::IsA(), kTRUE);
115 baseClass0::Streamer(R__b);
116 if (physicalPlane_) {
118 physicalPlane_->Streamer(R__b);
123 R__b.SetByteCount(R__c, kTRUE);
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.
Exception class for error handling in GENFIT (provides storage for diagnostic information)
AbsHMatrix implementation for two-dimensional MeasurementOnPlane and RKTrackRep parameterization.
AbsHMatrix implementation for one-dimensional MeasurementOnPlane and RKTrackRep parameterization.
AbsHMatrix implementation for one-dimensional MeasurementOnPlane and RKTrackRep parameterization.
Measured coordinates on a plane.
AbsTrackRep with 5D track parameterization in plane coordinates: (q/p, u', v', u, v)
A state with arbitrary dimension defined in a DetPlane.
Defines for I/O streams used for error and debug printing.
std::shared_ptr< genfit::DetPlane > SharedPlanePtr
Shared Pointer to a DetPlane.