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

PXDRecoHit - an extended form of PXDCluster containing geometry information. More...

#include <PXDRecoHit.h>

Inheritance diagram for PXDRecoHit:
Collaboration diagram for PXDRecoHit:

Public Member Functions

 PXDRecoHit ()
 Default constructor for ROOT IO.
 
 PXDRecoHit (const PXDTrueHit *hit, const genfit::TrackCandHit *trackCandHit=NULL, float sigmaU=-1, float sigmaV=-1)
 Construct PXDRecoHit from a PXDTrueHit for Monte Carlo based tracking. More...
 
 PXDRecoHit (const PXDCluster *hit, float sigmaU, float sigmaV, float covUV)
 Construct PXDRecoHit from a PXD cluster. More...
 
 PXDRecoHit (const PXDCluster *hit, const genfit::TrackCandHit *trackCandHit=NULL)
 Construct PXDRecoHit from a PXD cluster This constructor is intended as a temporary solution for people who want to test the impact of realistic clusters right now using the current tracking stack and before the final error handling is implemented. More...
 
genfit::AbsMeasurementclone () const override
 Creating a deep copy of this hit.
 
virtual std::vector< genfit::MeasurementOnPlane * > constructMeasurementsOnPlane (const genfit::StateOnPlane &state) const override
 Methods that actually interface to Genfit. More...
 
VxdID getSensorID () const
 Get the compact ID.
 
const PXDTrueHitgetTrueHit () const
 Get pointer to the TrueHit used when creating this RecoHit, can be NULL if created from something else.
 
const PXDClustergetCluster () const
 Get pointer to the Cluster used when creating this RecoHit, can be NULL if created from something else.
 
float getU () const
 Get u coordinate.
 
float getV () const
 Get v coordinate.
 
float getUVariance () const
 Get u coordinate variance.
 
float getVVariance () const
 Get v coordinate variance.
 
float getUVCov () const
 Get u-v error covariance.
 
float getEnergyDep () const
 Get deposited energy.
 
float getShapeLikelyhood (const genfit::StateOnPlane &state) const
 Get deposited energy error. More...
 
virtual const genfit::AbsHMatrixconstructHMatrix (const genfit::AbsTrackRep *) const override
 Construct the hessian matrix.
 
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 = 2 }
 

Private Member Functions

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

Private Attributes

unsigned short m_sensorID
 Unique sensor identifier.
 
const PXDTrueHitm_trueHit
 Pointer to the TrueHit used when creating this object.
 
const PXDClusterm_cluster
 transient member (not written out during streaming) More...
 
float m_energyDep
 transient member (not written out during streaming) More...
 

Detailed Description

PXDRecoHit - an extended form of PXDCluster containing geometry information.

To create a list of PXDRecoHits for all PXDTrueHits belonging to one MCParticle do something like:

//Get the MCParticle in question
MCParticle* mcParticle = ...
//Assume some error on the position
float sigmaU = 10 * Unit::um;
float sigmaV = 15 * Unit::um;
//Iterate over the relation and create a list of hits
vector<PXDRecoHit*> hits;
RelationIndex<MCParticle,PXDTrueHit> relMCTrueHit;
RelationIndex<MCParticle,PXDTrueHit>::range_from it = relMCTrueHit.getElementsFrom(mcParticle);
for(; it.first!=it.second; ++it.first){
hits.push_back(new PXDRecoHit(it.first->to, sigmaU, sigmaV));
}
PXDRecoHit()
Default constructor for ROOT IO.
Definition: PXDRecoHit.cc:27
boost::iterator_range< iterator_from > range_from
Iterator range [first,second) of the from side.
static const double um
[micrometers]
Definition: Unit.h:71

Definition at line 49 of file PXDRecoHit.h.

Member Enumeration Documentation

◆ anonymous enum

anonymous enum
private
Enumerator
HIT_DIMENSIONS 

sensitive Dimensions of the Hit

Definition at line 134 of file PXDRecoHit.h.

Constructor & Destructor Documentation

◆ PXDRecoHit() [1/3]

PXDRecoHit ( const PXDTrueHit hit,
const genfit::TrackCandHit trackCandHit = NULL,
float  sigmaU = -1,
float  sigmaV = -1 
)
explicit

Construct PXDRecoHit from a PXDTrueHit 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 sigmaU and sigmaV along u and v respectively

If one of the errors is set <0, a default resolution will be assumed for both values by dividing the pixel size by sqrt(12).

Parameters
hitPXDTrueHit to use as base
trackCandHitactually not used, should be removed?
sigmaUError of the Hit along u
sigmaVError of the Hit along v

Definition at line 32 of file PXDRecoHit.cc.

◆ PXDRecoHit() [2/3]

PXDRecoHit ( const PXDCluster hit,
float  sigmaU,
float  sigmaV,
float  covUV 
)
explicit

Construct PXDRecoHit from a PXD cluster.

For users that want to supply their own errors on construction

Parameters
hitPXDCluster to use as base
sigmaUError of the Hit along u
sigmaVError of the Hit along v
covUVCovariance between u and v

Definition at line 62 of file PXDRecoHit.cc.

◆ PXDRecoHit() [3/3]

PXDRecoHit ( const PXDCluster hit,
const genfit::TrackCandHit trackCandHit = NULL 
)
explicit

Construct PXDRecoHit from a PXD cluster This constructor is intended as a temporary solution for people who want to test the impact of realistic clusters right now using the current tracking stack and before the final error handling is implemented.

The pitch / sqrt(12) will be added as measurement error estimation. This is of course not the exact error of the cluster and one cannot expect perfect tracking results when using this constructor

Parameters
hitPXDCluster to use as base
trackCandHitactually not used, should be removed?

Definition at line 87 of file PXDRecoHit.cc.

Member Function Documentation

◆ constructMeasurementsOnPlane()

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

Methods that actually interface to Genfit.


Reimplemented from PlanarMeasurement.

Definition at line 192 of file PXDRecoHit.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.

◆ getShapeLikelyhood()

float getShapeLikelyhood ( const genfit::StateOnPlane state) const

Get deposited energy error.

Get the likelyhood that cluster shape is likely to be created from track state.

Definition at line 137 of file PXDRecoHit.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 PXDCluster* m_cluster
private

transient member (not written out during streaming)

Pointer to the Cluster used when creating this object

Definition at line 140 of file PXDRecoHit.h.

◆ m_energyDep

float m_energyDep
private

transient member (not written out during streaming)

deposited energy.

Definition at line 141 of file PXDRecoHit.h.


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