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

SVDRecoHit - an extended form of SVDHit containing geometry information. More...

#include <SVDRecoHit.h>

Inheritance diagram for SVDRecoHit:
Collaboration diagram for SVDRecoHit:

Public Member Functions

 SVDRecoHit ()
 Default constructor for ROOT IO.
 
 SVDRecoHit (const SVDTrueHit *hit, bool uDirection, float sigma=-1)
 Construct SVDRecoHit from a SVDTrueHit for Monte Carlo based tracking. More...
 
 SVDRecoHit (const SVDCluster *hit, const genfit::TrackCandHit *trackCandHit=nullptr)
 Construct SVDRecoHit from a SVD cluster. More...
 
virtual ~SVDRecoHit ()
 Destructor.
 
genfit::AbsMeasurementclone () const override
 Creating a deep copy of this hit. More...
 
VxdID getSensorID () const
 Get the compact ID.
 
const SVDTrueHitgetTrueHit () const
 Get pointer to the TrueHit used when creating this RecoHit, can be nullptr if created from something else.
 
const SVDClustergetCluster () const
 Get pointer to the Cluster used when creating this RecoHit, can be nullptr if created from something else.
 
bool isU () const
 Is the coordinate u or v?
 
float getPosition () const
 Get coordinate.
 
float getPositionVariance () const
 Get coordinate variance.
 
float getEnergyDep () const
 Get deposited energy.
 
float getRotation () const
 Get rotation angle.
 
virtual std::vector< genfit::MeasurementOnPlane * > constructMeasurementsOnPlane (const genfit::StateOnPlane &state) const override
 Methods that actually interface to Genfit. More...
 
virtual const genfit::AbsHMatrixconstructHMatrix (const genfit::AbsTrackRep *) const override
 Methods that actually interface to Genfit. More...
 
int getPlaneId () const
 
virtual SharedPlanePtr constructPlane (const StateOnPlane &state) const override
 Construct (virtual) detector plane (use state's AbsTrackRep). More...
 
virtual void setPlane (const SharedPlanePtr &physicalPlane, int planeId=-1)
 
void setStripV (bool v=true)
 Use if the coordinate for 1D hits measured in V direction. More...
 
TrackPoint * getTrackPoint () 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 Attributes

SharedPlanePtr physicalPlane_
 
int planeId_
 This is persistent, but '!' makes ROOT shut up.
 
bool stripV_
 
TVectorD rawHitCoords_
 
TMatrixDSym rawHitCov_
 
int detId_
 
int hitId_
 
TrackPoint * trackPoint_
 Pointer to TrackPoint where the measurement belongs to.
 

Private Types

enum  { HIT_DIMENSIONS = 1 }
 

Private Member Functions

void setDetectorPlane ()
 Set up Detector plane information.
 
TVectorD applyPlanarDeformation (TVectorD rawHit, std::vector< double > planarParameters, const genfit::StateOnPlane &state) const
 Apply planar deformation of sensors.
 

Private Attributes

unsigned short m_sensorID
 Unique sensor identifier.
 
const SVDTrueHitm_trueHit
 Pointer to the Truehit used to generate this hit.
 
const SVDClusterm_cluster
 transient member (not written out during streaming) More...
 
bool m_isU
 transient member (not written out during streaming) More...
 
float m_energyDep
 deposited energy.
 
float m_rotationPhi
 angle of the plane rotation, for u in wedge sensors.
 

Detailed Description

SVDRecoHit - an extended form of SVDHit containing geometry information.

To create a list of SVDRecoHits for all SVDTrueHits belonging to one MCParticle do something like:

//Get the MCParticle in question
MCParticle* mcParticle = ...
//Iterate over the relation and create a list of hits
vector<SVDRecoHit*> hits;
RelationIndex<MCParticle,SVDTrueHit> relMCTrueHit;
RelationIndex<MCParticle,SVDTrueHit>::range_from it = relMCTrueHit.getElementsFrom(mcParticle);
for(; it.first!=it.second; ++it.first){
hits.push_back(new SVDRecoHit(it.first->to));
}
boost::iterator_range< iterator_from > range_from
Iterator range [first,second) of the from side.
SVDRecoHit()
Default constructor for ROOT IO.
Definition: SVDRecoHit.cc:24

Definition at line 47 of file SVDRecoHit.h.

Member Enumeration Documentation

◆ anonymous enum

anonymous enum
private
Enumerator
HIT_DIMENSIONS 

sensitive Dimensions of the Hit

Definition at line 115 of file SVDRecoHit.h.

Constructor & Destructor Documentation

◆ SVDRecoHit() [1/2]

SVDRecoHit ( const SVDTrueHit hit,
bool  uDirection,
float  sigma = -1 
)

Construct SVDRecoHit from a SVDTrueHit for Monte Carlo based tracking.

This requires a valid random number generator to be initialized at gRandom. The Hit position will be smeared using a gaussian smearing with sigma along u or v, depending on uDirection.

If the error is set to <0, the resolution will be set to pitch/sqrt(12).

Parameters
hitSVDTrueHit to use as base
uDirectionIf true, the hit has u coordinate, otherwise v
sigmaError of the hit coordinate

Definition at line 31 of file SVDRecoHit.cc.

◆ SVDRecoHit() [2/2]

SVDRecoHit ( const SVDCluster hit,
const genfit::TrackCandHit trackCandHit = nullptr 
)
explicit

Construct SVDRecoHit from a SVD cluster.

Parameters
hitSVDCluster to use as base.
trackCandHitFIXME: Parameter sigma is no longer used and will be removed.

Definition at line 59 of file SVDRecoHit.cc.

Member Function Documentation

◆ clone()

genfit::AbsMeasurement * clone ( ) const
overridevirtual

Creating a deep copy of this hit.

Overrides the method inherited from GFRecoHit.

Reimplemented from PlanarMeasurement.

Definition at line 111 of file SVDRecoHit.cc.

◆ constructHMatrix()

virtual const genfit::AbsHMatrix* constructHMatrix ( const genfit::AbsTrackRep ) const
inlineoverridevirtual

Methods that actually interface to Genfit.


Reimplemented from PlanarMeasurement.

Definition at line 111 of file SVDRecoHit.h.

◆ constructMeasurementsOnPlane()

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

Methods that actually interface to Genfit.


Reimplemented from PlanarMeasurement.

Definition at line 180 of file SVDRecoHit.cc.

◆ constructPlane()

SharedPlanePtr constructPlane ( const StateOnPlane state) const
overridevirtualinherited

Construct (virtual) detector plane (use state's AbsTrackRep).

It's possible to make corrections to the plane here. The state should be defined somewhere near the measurement. For virtual planes, the state will be extrapolated to the POCA to point (SpacepointMeasurement) or line (WireMeasurement), and from this info the plane will be constructed.

Implements AbsMeasurement.

Definition at line 46 of file PlanarMeasurement.cc.

◆ setStripV()

void setStripV ( bool  v = true)
inlineinherited

Use if the coordinate for 1D hits measured in V direction.

Per default for 1D planar hits, the coordinate is measured in U direction. With this function you can set it to be measured in V direction. This affects the outcoe of constructHMatrix().

Definition at line 70 of file PlanarMeasurement.h.

Member Data Documentation

◆ m_cluster

const SVDCluster* m_cluster
private

transient member (not written out during streaming)

Pointer to the Cluster used to generate this hit

Definition at line 121 of file SVDRecoHit.h.

◆ m_isU

bool m_isU
private

transient member (not written out during streaming)

True if the hit has u-coordinate, false if v.

Definition at line 122 of file SVDRecoHit.h.


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