Belle II Software development
SensorPlane Class Reference

A Finite plane of one VXD Sensor. More...

#include <SensorPlane.h>

Inheritance diagram for SensorPlane:

Public Member Functions

 SensorPlane (VxdID sensorID=0, double uTolerance=0, double vTolerance=0)
 Constructs the plane for a given VXD Sensor.
 
void setRotation (double phi)
 Set plane rotation angle.
 
virtual ~SensorPlane ()
 Destructor.
 
bool isInActive (double u, double v) const override
 Return whether the given coordinates are inside the finite region.
 
void Print (const Option_t *option="") const override
 Prints object data.
 
virtual genfit::AbsFinitePlane * clone () const override
 Deep copy of the object.
 

Private Attributes

unsigned short m_sensorID
 Sensor ID of the sensor plane.
 
double m_uTolerance
 Tolerance to add to the sensor dimensions in u direction.
 
double m_vTolerance
 Tolerance to add to the sensor dimensions in v direction.
 
double m_cosPhi
 Cosine term of plane rotation, used to align SVD trapezoidal sensors.
 
double m_sinPhi
 Sine term of plane rotation, used to align SVD trapezoidal sensors.
 
const SensorInfoBasem_sensorInfo
 Pointer to the SensorInfo which contains the geometry information for the given sensor plane.
 

Detailed Description

A Finite plane of one VXD Sensor.

This class takes the SensorID of the sensor and gets the dimensions from the SensorInfo of that Sensor.

Definition at line 34 of file SensorPlane.h.

Constructor & Destructor Documentation

◆ SensorPlane()

SensorPlane ( VxdID  sensorID = 0,
double  uTolerance = 0,
double  vTolerance = 0 
)
inline

Constructs the plane for a given VXD Sensor.

Parameters
sensorIDSensorID of the Sensor for which this plane should be build
uTolerancetolerance in the u direction
vTolerancetolerance in the v direction

Definition at line 42 of file SensorPlane.h.

42 :
43 m_sensorID(sensorID), m_uTolerance(uTolerance), m_vTolerance(vTolerance), m_cosPhi(1.), m_sinPhi(0.), m_sensorInfo(0) {}
double m_uTolerance
Tolerance to add to the sensor dimensions in u direction.
Definition: SensorPlane.h:96
unsigned short m_sensorID
Sensor ID of the sensor plane.
Definition: SensorPlane.h:94
double m_sinPhi
Sine term of plane rotation, used to align SVD trapezoidal sensors.
Definition: SensorPlane.h:102
double m_cosPhi
Cosine term of plane rotation, used to align SVD trapezoidal sensors.
Definition: SensorPlane.h:100
double m_vTolerance
Tolerance to add to the sensor dimensions in v direction.
Definition: SensorPlane.h:98
const SensorInfoBase * m_sensorInfo
Pointer to the SensorInfo which contains the geometry information for the given sensor plane.
Definition: SensorPlane.h:104

◆ ~SensorPlane()

virtual ~SensorPlane ( )
inlinevirtual

Destructor.

Definition at line 55 of file SensorPlane.h.

55{}

Member Function Documentation

◆ clone()

virtual genfit::AbsFinitePlane * clone ( ) const
inlineoverridevirtual

Deep copy of the object.

Returns
Pointer to a deep copy of the object.

Definition at line 87 of file SensorPlane.h.

88 {
89 return new SensorPlane(*this);
90 }
SensorPlane(VxdID sensorID=0, double uTolerance=0, double vTolerance=0)
Constructs the plane for a given VXD Sensor.
Definition: SensorPlane.h:42

◆ isInActive()

bool isInActive ( double  u,
double  v 
) const
inlineoverride

Return whether the given coordinates are inside the finite region.

Parameters
uu-coordinate of the point.
vv-coordinate of the point.
Returns
true if (u,v) is within the sensor plane, otherwise false.

Definition at line 62 of file SensorPlane.h.

63 {
64#ifndef __CINT__
65 //If running in ROOT CINT we do not know about GeoCache so we cannot get
66 //the SensorInfo
67 if (!m_sensorInfo) {
69 }
70#endif
71 //No sensorInfo set so we have to bail
72 if (!m_sensorInfo) {
73 B2FATAL("Could not find sensorInfo for VXD Sensor " << VxdID(m_sensorID));
74 }
75 double uRot = m_cosPhi * u - m_sinPhi * v;
76 double vRot = m_sinPhi * u + m_cosPhi * v;
77 return m_sensorInfo->inside(uRot, vRot, m_uTolerance, m_vTolerance);
78 }
const SensorInfoBase & getSensorInfo(Belle2::VxdID id) const
Return a referecne to the SensorInfo of a given SensorID.
Definition: GeoCache.cc:67
static GeoCache & getInstance()
Return a reference to the singleton instance.
Definition: GeoCache.cc:214
bool inside(double u, double v, double uTolerance=DBL_EPSILON, double vTolerance=DBL_EPSILON) const
Check wether a given point is inside the active area.

◆ Print()

void Print ( const Option_t *  option = "") const
override

Prints object data.

Definition at line 15 of file SensorPlane.cc.

16{
17 B2INFO("VXDSensorPlane for " << (string)VxdID(m_sensorID));
18}
Class to uniquely identify a any structure of the PXD and SVD.
Definition: VxdID.h:33

◆ setRotation()

void setRotation ( double  phi)
inline

Set plane rotation angle.

This angle will be used to rotate coordinate parameters in inActive() method.

Parameters
phiThe angle by which the plane was rotated.

Definition at line 49 of file SensorPlane.h.

50 {
51 m_cosPhi = cos(phi);
52 m_sinPhi = sin(phi);
53 }

Member Data Documentation

◆ m_cosPhi

double m_cosPhi
private

Cosine term of plane rotation, used to align SVD trapezoidal sensors.

Definition at line 100 of file SensorPlane.h.

◆ m_sensorID

unsigned short m_sensorID
private

Sensor ID of the sensor plane.

Definition at line 94 of file SensorPlane.h.

◆ m_sensorInfo

const SensorInfoBase* m_sensorInfo
mutableprivate

Pointer to the SensorInfo which contains the geometry information for the given sensor plane.

Definition at line 104 of file SensorPlane.h.

◆ m_sinPhi

double m_sinPhi
private

Sine term of plane rotation, used to align SVD trapezoidal sensors.

Definition at line 102 of file SensorPlane.h.

◆ m_uTolerance

double m_uTolerance
private

Tolerance to add to the sensor dimensions in u direction.

Definition at line 96 of file SensorPlane.h.

◆ m_vTolerance

double m_vTolerance
private

Tolerance to add to the sensor dimensions in v direction.

Definition at line 98 of file SensorPlane.h.


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