9 #include <tracking/pxdDataReductionClasses/ROIDetPlane.h>
11 #include <vxd/geometry/GeoCache.h>
12 #include <vxd/geometry/SensorInfoBase.h>
13 #include <framework/logging/Logger.h>
19 ROIDetPlane::ROIDetPlane(
const VxdID& vxdID) :
ROIDetPlane(vxdID, 10.0, 0.4999999 * M_PI)
24 ROIDetPlane::ROIDetPlane(
const VxdID& vxdID,
double toleranceZ,
double tolerancePhi)
25 : m_vxdID(vxdID), m_orthoVec_upper(0, 0, 0), m_orthoVec_lower(0, 0, 0)
31 TVector3 local(0, 0, 0);
32 TVector3 uVector(1, 0, 0);
33 TVector3 vVector(0, 1, 0);
35 TVector3 globalSensorPos = aSensorInfo.
pointToGlobal(local,
true);
36 TVector3 globaluVector = aSensorInfo.
vectorToGlobal(uVector,
true);
37 TVector3 globalvVector = aSensorInfo.
vectorToGlobal(vVector,
true);
39 setO(globalSensorPos);
41 setUV(globaluVector, globalvVector);
48 if (tolerancePhi >= 0 && tolerancePhi < M_PI / 2.0) {
49 maxDistU += fabs(std::tan(tolerancePhi) * globalSensorPos.Perp());
51 B2WARNING(
"No valid value for the phi tolerance given! Will use 0 tolerance!" <<
LogVar(
"tolerance phi", tolerancePhi));
56 TVector3 edgepoint_upper = globalSensorPos + maxDistU * globaluVector;
57 TVector3 edgepoint_lower = globalSensorPos - maxDistU * globaluVector;
65 TVector3 minVecV(0, -aSensorInfo.
getVSize() / 2.0, 0);
66 TVector3 maxVecV(0, aSensorInfo.
getVSize() / 2.0, 0);
80 double trackZ = trackPosition.Z();
ROIDetPlane describes the plane containing a sensor.
double m_sensorZMax
max of allowed global z range
TVector3 m_orthoVec_lower
vector normal to the vector from 0,0,0 to a point on the lower edge of the sensor in x-y-plane
bool isSensorInRange(const TVector3 &trackPosition, int layer)
determine if the sensor is in range
double m_sensorZMin
min of allowed global z range
TVector3 m_orthoVec_upper
these two vectors define the planes going through the upper and lower edge of the sensor
VxdID m_vxdID
the sensor ID
const SensorInfoBase & getSensorInfo(Belle2::VxdID id) const
Return a referecne to the SensorInfo of a given SensorID.
static GeoCache & getInstance()
Return a reference to the singleton instance.
Base class to provide Sensor Information for PXD and SVD.
double getVSize() const
Return the length of the sensor.
double getForwardWidth() const
Convinience Wrapper to return width at forward side.
VxdID getID() const
Return the ID of the Sensor.
double getBackwardWidth() const
Convinience Wrapper to return width at backward side.
TVector3 pointToGlobal(const TVector3 &local, bool reco=false) const
Convert a point from local to global coordinates.
TVector3 vectorToGlobal(const TVector3 &local, bool reco=false) const
Convert a vector from local to global coordinates.
Class to uniquely identify a any structure of the PXD and SVD.
Class to store variables with their name which were sent to the logging service.
Abstract base class for different kinds of events.