 |
Belle II Software
release-05-01-25
|
13 #include <tracking/spacePointCreation/SpacePoint.h>
14 #include <vxd/dataobjects/VxdID.h>
15 #include <framework/geometry/B2Vector3.h>
17 #include <framework/dataobjects/Helix.h>
18 #include <vxd/geometry/GeoCache.h>
19 #include <vxd/geometry/SensorInfoBase.h>
22 #include <framework/logging/Logger.h>
34 template <
class ClusterType>
35 class VXDMomentumEstimationTools {
54 double getDEDX(
const ClusterType& cluster,
const TVector3& momentum,
const TVector3& position,
short charge)
const
57 const Helix trajectory(position, momentum, charge, 1.5);
61 return calibratedCharge / pathLength;
70 return calibratedCharge / pathLength;
76 const VxdID& vxdID = cluster.getSensorID();
84 const VxdID& vxdID = cluster.getSensorID();
92 const VxdID& vxdID = cluster.getSensorID();
100 const SpacePoint* spacePoint = cluster.template getRelated<SpacePoint>(
"SpacePoints");
103 if (spacePoint ==
nullptr) {
105 VxdID vxdID = cluster.getSensorID();
108 B2WARNING(
"Could not determine SpacePoint for this cluster. Falling back to geometrical information.");
119 VxdID vxdID = cluster.getSensorID();
127 VxdID vxdID = cluster.getSensorID();
135 VxdID vxdID = cluster.getSensorID();
143 VxdID vxdID = cluster.getSensorID();
145 return segmentNumber;
153 const double charge = cluster.getCharge();
156 return calibration * charge;
163 B2FATAL(
"Can not deal with this cluster type!");
171 B2FATAL(
"Can not deal with this cluster type!");
196 const double perp_s_at_cluster_entry = trajectory.getArcLength2DAtCylindricalR(radius);
198 if (std::isnan(perp_s_at_cluster_entry)) {
203 const TVector3& position_at_inner_radius = trajectory.getPositionAtArcLength2D(perp_s_at_cluster_entry);
205 const double perp_s_at_cluster_exit = trajectory.getArcLength2DAtCylindricalR(radius + thickness);
207 if (std::isnan(perp_s_at_cluster_exit)) {
208 return std::min(width, length);
211 const TVector3& position_at_outer_radius = trajectory.getPositionAtArcLength2D(perp_s_at_cluster_exit);
213 const double distance_3D = (position_at_outer_radius - position_at_inner_radius).Mag();
DataType Perp() const
The transverse component (R in cylindrical coordinate system).
Class to uniquely identify a any structure of the PXD and SVD.
baseType getLadderNumber() const
Get the ladder id.
Base class to provide Sensor Information for PXD and SVD.
double getWidth(double v=0) const
Return the width of the sensor.
SpacePoint typically is build from 1 PXDCluster or 1-2 SVDClusters.
const B2Vector3< double > & getPosition() const
return the position vector in global coordinates
unsigned short baseType
The base integer type for VxdID.
double getLength() const
Return the length of the sensor.
static GeoCache & getInstance()
Return a reference to the singleton instance.
Abstract base class for different kinds of events.
double getThickness() const
Return the thickness of the sensor.
The PXD Cluster class This class stores all information about reconstructed PXD clusters The position...
baseType getSensorNumber() const
Get the sensor id.
The SVD Cluster class This class stores all information about reconstructed SVD clusters.
const SensorInfoBase & getSensorInfo(Belle2::VxdID id) const
Return a referecne to the SensorInfo of a given SensorID.
baseType getLayerNumber() const
Get the layer id.
baseType getSegmentNumber() const
Get the sensor segment.