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_;
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);