9#include <pxd/utilities/PXDPerformanceStructs.h>
10#include <framework/logging/Logger.h>
11#include <pxd/reconstruction/PXDGainCalibrator.h>
12#include <pxd/utilities/PXDUtilities.h>
43 if (!recoTracks.size())
return nullptr;
50 if (statePtr ==
nullptr)
return nullptr;
51 auto intersec = statePtr -> getPos();
52 auto localPoint = sensorInfo.
pointToLocal(ROOT::Math::XYZVector(intersec),
true);
53 auto intersec_p = statePtr -> getMom();
54 auto local_p = sensorInfo.
vectorToLocal(ROOT::Math::XYZVector(intersec_p),
true);
57 inside = sensorInfo.
inside(localPoint.X(), localPoint.Y());
61 tol = cos(local_p.Theta());
75 const std::string& recoTracksName,
76 const std::string& pxdTrackClustersName,
82 if (!recoTrackPtr)
return nullptr;
90 for (
auto& aCluster : pxdClusters) {
91 if (aCluster.getSensorID().getID() == pxdIntercept.
getSensorID()) {
93 dU = aCluster.getU() - pxdIntercept.
getCoorU();
94 dV = aCluster.getV() - pxdIntercept.
getCoorV();
The PXD Cluster class This class stores all information about reconstructed PXD clusters The position...
float getV() const
Get v coordinate of hit position.
unsigned short getVSize() const
Get cluster size in v direction.
unsigned short getSize() const
Get cluster size.
unsigned short getCharge() const
Get collected charge.
unsigned short getUSize() const
Get cluster size in u direction.
VxdID getSensorID() const
Get the sensor ID.
float getU() const
Get u coordinate of hit position.
PXDIntercept stores the U,V coordinates and uncertainties of the intersection of a track with an PXD ...
float getADUToEnergy(VxdID id, unsigned int uid, unsigned int vid) const
Get conversion factor from ADU to energy.
static PXDGainCalibrator & getInstance()
Main (and only) way to access the PXDGainCalibrator.
This is the Reconstruction Event-Data Model Track.
Class for type safe access to objects that are referred to in relations.
RelationVector< FROM > getRelationsFrom(const std::string &name="", const std::string &namedRelation="") const
Get the relations that point from another store array to this object.
double getCoorV() const
return the V coordinate of the intercept
VxdID::baseType getSensorID() const
return the sensor ID
double getCoorU() const
return the U coordinate of the intercept
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.
ROOT::Math::XYZVector pointToLocal(const ROOT::Math::XYZVector &global, bool reco=false) const
Convert a point from global to local coordinates.
ROOT::Math::XYZVector vectorToLocal(const ROOT::Math::XYZVector &global, bool reco=false) const
Convert a vector from global to local coordinates.
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.
double getThickness() const
Return the thickness of the sensor.
int getVCellID(double v, bool clamp=false) const
Return the corresponding pixel/strip ID of a given v coordinate.
int getUCellID(double u, double v=0, bool clamp=false) const
Return the corresponding pixel/strip ID of a given u coordinate.
Class to uniquely identify a any structure of the PXD and SVD.
std::shared_ptr< TrackState > getTrackStateOnModule(const VXD::SensorInfoBase &pxdSensorInfo, RecoTrack &recoTrack, double lambda=0.0)
Helper function to get a track state on a module.
unsigned short getPXDModuleID(const VxdID &sensorID)
Helper function to get DHE id like module id from VxdID.
double getDeltaP(const double mom, const double length, const double mass=Const::electronMass)
helper function to estimate the most probable energy loss for a given track length.
Abstract base class for different kinds of events.
float posV
Local position along z.
float posU
Local position in r-phi.
unsigned short pxdID
Human readable id: layer * 1000 + ladder * 10 + sensor.
void setValues(const PXDCluster &pxdCluster)
Update values from a PXDCluster.
unsigned short charge
Cluster charge in ADU.
unsigned short uSize
Cluster size in U.
unsigned short vSize
Cluster size in V.
unsigned short size
Cluster size.
float dU
Residual (meas - prediction) in U.
bool usedInTrack
True if the cluster is used in tracking.
RecoTrack * setValues(const PXDIntercept &pxdIntercept, const std::string &recoTracksName="", const std::string &pxdTrackClustersName="PXDClustersFromTracks", const double &mass=Const::electronMass)
Update values from a PXDIntercept.
Cluster_t cluster
Cluster associated to the track.
TrackPoint_t intersection
The track-module intersection.
float dV
Residual (meas - prediciton) in V.
bool inside
True if it's inside the active region.
float chargeMPV
Expected charge in ADU.
RecoTrack * setValues(const PXDIntercept &pxdIntercept, const std::string &recoTracksName="", const double &mass=Const::electronMass)
Update values from a PXDCluster.
float tol
The variables below are included here as they can be calculated w.o.
float y
Global position in y.
float x
Global position in x.
float z
Global position in z.