9#include <pxd/utilities/PXDUtilities.h>
10#include <framework/logging/Logger.h>
11#include <framework/geometry/VectorUtil.h>
12#include <pxd/reconstruction/PXDPixelMasker.h>
26 auto centerP = pxdSensorInfo.
pointToGlobal(ROOT::Math::XYZVector(0, 0, 0),
true);
27 auto normalV = pxdSensorInfo.
vectorToGlobal(ROOT::Math::XYZVector(0, 0, 1),
true);
32 auto statePtr = std::make_shared<TrackState>();
35 *statePtr = gfTrack.getFittedState();
36 lambda = statePtr->extrapolateToPlane(sensorPlaneSptr);
38 B2DEBUG(20,
"extrapolation to plane failed! Lambda = " << lambda);
39 return std::shared_ptr<TrackState>(
nullptr);
41 auto intersec = pxdSensorInfo.
pointToLocal(ROOT::Math::XYZVector(statePtr->getPos()),
true);
44 double tolerance = 0.0;
45 bool inside = pxdSensorInfo.
inside(intersec.X(), intersec.Y(), tolerance, tolerance);
46 if (!inside)
return std::shared_ptr<TrackState>(
nullptr);
54 if (u - checkDistance < 0 || u + checkDistance >= 250 ||
55 v - checkDistance < 0 || v + checkDistance >= 768) {
65 for (
int u_iter = u - checkDistance; u_iter <= u + checkDistance ; ++u_iter) {
66 for (
int v_iter = v - checkDistance; v_iter <= v + checkDistance ; ++v_iter) {
static PXDPixelMasker & getInstance()
Main (and only) way to access the PXDPixelMasker.
static genfit::Track & getGenfitTrack(RecoTrack &recoTrack)
Give access to the RecoTrack's genfit::Track.
This is the Reconstruction Event-Data Model Track.
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 pointToGlobal(const ROOT::Math::XYZVector &local, bool reco=false) const
Convert a point from local to global 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.
ROOT::Math::XYZVector vectorToGlobal(const ROOT::Math::XYZVector &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.
static constexpr auto XYZToTVector
Helper function to convert XYZVector to TVector3.
bool isCloseToBorder(int u, int v, int checkDistance)
Helper function to check if a pixel is close to the border.
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.
bool isDefectivePixelClose(int u, int v, int checkDistance, const VxdID &moduleID)
Helper function to check if a defective (hot/dead) pixel is close.
Abstract base class for different kinds of events.