Belle II Software  release-08-01-10
ProlateSpacepointMeasurement Class Reference

Class for measurements implementing a space point hit geometry with a very prolate form of the covariance matrix. More...

#include <ProlateSpacepointMeasurement.h>

Inheritance diagram for ProlateSpacepointMeasurement:
Collaboration diagram for ProlateSpacepointMeasurement:

Public Member Functions

 ProlateSpacepointMeasurement (int nDim=3)
 
 ProlateSpacepointMeasurement (const TVectorD &rawHitCoords, const TMatrixDSym &rawHitCov, int detId, int hitId, TrackPoint *trackPoint)
 
virtual AbsMeasurementclone () const
 Deep copy ctor for polymorphic class.
 
virtual SharedPlanePtr constructPlane (const StateOnPlane &state) const
 Contruct the virtual detector plane. More...
 
const TVector3 & getLargestErrorDirection ()
 
void setLargestErrorDirection (const TVector3 &dir)
 
virtual std::vector< MeasurementOnPlane * > constructMeasurementsOnPlane (const StateOnPlane &state) const override
 Construct MeasurementOnPlane on plane of the state and wrt the states TrackRep. More...
 
virtual const AbsHMatrixconstructHMatrix (const AbsTrackRep *) const override
 Returns a new AbsHMatrix object. More...
 
bool getWeightedPlaneConstruction () const
 false: project 3D cov onto DetPlane. true: cut 3D cov with DetPlane
 
void setWeightedPlaneConstruction (bool value)
 
bool getCutCov () const
 false: use POCA to construct DetPlane. true: Use metric G to construct POCA
 
void setCutCov (bool value)
 
TrackPointgetTrackPoint () const
 
void setTrackPoint (TrackPoint *tp)
 
const TVectorD & getRawHitCoords () const
 
TVectorD & getRawHitCoords ()
 
const TMatrixDSym & getRawHitCov () const
 
TMatrixDSym & getRawHitCov ()
 
int getDetId () const
 
int getHitId () const
 
virtual bool isLeftRightMeasurement () const
 If the AbsMeasurement is a wire hit, the left/right resolution will be used.
 
virtual int getLeftRightResolution () const
 
unsigned int getDim () const
 
void setRawHitCoords (const TVectorD &coords)
 
void setRawHitCov (const TMatrixDSym &cov)
 
void setDetId (int detId)
 
void setHitId (int hitId)
 
virtual void Print (const Option_t *="") const
 

Protected Member Functions

void initG ()
 

Protected Attributes

TVector3 largestErrorDirection_
 
TVectorD rawHitCoords_
 
TMatrixDSym rawHitCov_
 
int detId_
 
int hitId_
 
TrackPointtrackPoint_
 Pointer to TrackPoint where the measurement belongs to.
 

Private Attributes

bool weightedPlaneContruction_
 
TMatrixDSym G_
 
bool cutCov_
 inverse of 3x3 cov
 

Detailed Description

Class for measurements implementing a space point hit geometry with a very prolate form of the covariance matrix.

Author
Johannes Rauch (Technische Universität München, original author)

Measurements from detectors measuring 3D space points with errors in one direction much larger than the errors perpendicular should use this class.

For these hits, a virtual detector plane lying in the POCA and perpendicular to the track yields wrong results. Instead, the plane should contain the direction of the largest error.

The largest error direction can be set. Standard is in z.

Definition at line 46 of file ProlateSpacepointMeasurement.h.

Member Function Documentation

◆ constructHMatrix()

const AbsHMatrix * constructHMatrix ( const AbsTrackRep ) const
overridevirtualinherited

Returns a new AbsHMatrix object.

Caller must take ownership.

Implements AbsMeasurement.

Definition at line 120 of file SpacepointMeasurement.cc.

120  {
121  if (dynamic_cast<const RKTrackRep*>(rep) == nullptr) {
122  Exception exc("SpacepointMeasurement default implementation can only handle state vectors of type RKTrackRep!", __LINE__,__FILE__);
123  throw exc;
124  }
125 
126  return new HMatrixUV();
127 }

◆ constructMeasurementsOnPlane()

std::vector< MeasurementOnPlane * > constructMeasurementsOnPlane ( const StateOnPlane state) const
overridevirtualinherited

Construct MeasurementOnPlane on plane of the state and wrt the states TrackRep.

The state will usually be the prediction or reference state, and has to be defined AT the measurement. The AbsMeasurement will be projected onto the plane. It's possible to make corrections to the coordinates here (e.g. by using the state coordinates). Usually the vector will contain only one element. But in the case of e.g. a WireMeasurement, it will be 2 (left and right).

Implements AbsMeasurement.

Definition at line 69 of file SpacepointMeasurement.cc.

◆ constructPlane()

SharedPlanePtr constructPlane ( const StateOnPlane state) const
virtual

Contruct the virtual detector plane.

Per default, the plane will be constructed such that it contains the measurement and POCA to the measurement in cartesian space. The plane is perpendicular to the track (at the POCA).

If weightedPlaneContruction_ is set, the POCA will be calculated in a space weighted with the inverse of the 3D covariance. E.g. if the covariance is very oblate, the plane will be almost defined by the covariance shape. If the covariance is very prolate, the behaviour will be very similar to the ProlateSpacepointHit.

Reimplemented from SpacepointMeasurement.

Definition at line 43 of file ProlateSpacepointMeasurement.cc.

43  {
44 
45  // copy state. Neglect covariance.
46  StateOnPlane st(state);
47 
48 
49  const TVector3 wire1(rawHitCoords_(0), rawHitCoords_(1), rawHitCoords_(2));
50 
51  const AbsTrackRep* rep = state.getRep();
52  rep->extrapolateToLine(st, wire1, largestErrorDirection_);
53 
54  TVector3 dirInPoca = rep->getMom(st);
55  dirInPoca.SetMag(1.);
56 
57  // check if direction is parallel to wire
58  if (fabs(largestErrorDirection_.Angle(dirInPoca)) < 0.01){
59  Exception exc("ProlateSpacepointMeasurement::constructPlane(): Cannot construct detector plane, track direction is parallel to largest error direction", __LINE__,__FILE__);
60  throw exc;
61  }
62 
63  // construct orthogonal vector
64  TVector3 U = largestErrorDirection_.Cross(dirInPoca);
65 
66  return SharedPlanePtr(new DetPlane(wire1, U, largestErrorDirection_));
67 }
std::shared_ptr< genfit::DetPlane > SharedPlanePtr
Shared Pointer to a DetPlane.

The documentation for this class was generated from the following files: