LArSoft
v09_90_00
Liquid Argon Software toolkit - https://larsoft.org/
|
#include "GeometryUtilities.h"
Public Member Functions | |
GeometryUtilities (geo::GeometryCore const &geom, detinfo::DetectorClocksData const &clockData, detinfo::DetectorPropertiesData const &propData) | |
int | Get3DaxisN (int iplane0, int iplane1, double omega0, double omega1, double &phi, double &theta) const |
double | CalculatePitch (unsigned int iplane0, double phi, double theta) const |
double | CalculatePitchPolar (unsigned int iplane0, double phi, double theta) const |
double | Get3DSpecialCaseTheta (int iplane0, int iplane1, double dw0, double dw1) const |
double | Get2Dangle (double deltawire, double deltatime) const |
double | Get2Dangle (double wireend, double wirestart, double timeend, double timestart) const |
double | Get2Dangle (const PxPoint *endpoint, const PxPoint *startpoint) const |
double | Get2DangleFrom3D (unsigned int plane, double phi, double theta) const |
double | Get2DangleFrom3D (unsigned int plane, TVector3 dir_vector) const |
double | Get2Dslope (double deltawire, double deltatime) const |
double | Get2Dslope (double wireend, double wirestart, double timeend, double timestart) const |
double | Get2Dslope (const PxPoint *endpoint, const PxPoint *startpoint) const |
double | Get2DDistance (double wire1, double time1, double wire2, double time2) const |
double | Get2DDistance (const PxPoint *point1, const PxPoint *point2) const |
double | Get2DPitchDistance (double angle, double inwire, double wire) const |
double | Get2DPitchDistanceWSlope (double slope, double inwire, double wire) const |
int | GetPointOnLine (double slope, double intercept, double wire1, double time1, double &wireout, double &timeout) const |
int | GetPointOnLine (double slope, double wirestart, double timestart, double wire1, double time1, double &wireout, double &timeout) const |
int | GetPointOnLine (double slope, const PxPoint *startpoint, const PxPoint *point1, PxPoint &pointout) const |
int | GetPointOnLine (double slope, double intercept, const PxPoint *point1, PxPoint &pointout) const |
int | GetPointOnLineWSlopes (double slope, double intercept, double ort_intercept, double &wireout, double &timeout) const |
int | GetPointOnLineWSlopes (double slope, double intercept, double ort_intercept, PxPoint &pointonline) const |
PxPoint | Get2DPointProjection (double const *xyz, unsigned int plane) const |
PxPoint | Get2DPointProjection (geo::Point_t const &xyz, unsigned int plane) const |
PxPoint | Get2DPointProjectionCM (std::vector< double > const &xyz, unsigned int plane) const |
PxPoint | Get2DPointProjectionCM (double const *xyz, unsigned int plane) const |
PxPoint | Get2DPointProjectionCM (TLorentzVector const *xyz, unsigned int plane) const |
double | GetTimeTicks (double x, unsigned int plane) const |
int | GetProjectedPoint (const PxPoint *p0, const PxPoint *p1, PxPoint &pN) const |
PxHit | FindClosestHit (std::vector< PxHit > const &hitlist, unsigned int wirein, double timein) const |
unsigned int | FindClosestHitIndex (std::vector< PxHit > const &hitlist, unsigned int wirein, double timein) const |
int | GetYZ (const PxPoint *p0, const PxPoint *p1, double *yz) const |
int | GetXYZ (const PxPoint *p0, const PxPoint *p1, double *xyz) const |
double | PitchInView (unsigned int plane, double phi, double theta) const |
void | GetDirectionCosines (double phi, double theta, double *dirs) const |
void | SelectLocalHitlist (const std::vector< PxHit > &hitlist, std::vector< const PxHit * > &hitlistlocal, PxPoint &startHit, double &linearlimit, double &ortlimit, double &lineslopetest) const |
void | SelectLocalHitlist (const std::vector< PxHit > &hitlist, std::vector< const PxHit * > &hitlistlocal, PxPoint &startHit, double &linearlimit, double &ortlimit, double &lineslopetest, PxHit &averageHit) const |
void | SelectLocalHitlistIndex (const std::vector< PxHit > &hitlist, std::vector< unsigned int > &hitlistlocal_index, PxPoint &startHit, double &linearlimit, double &ortlimit, double &lineslopetest) const |
void | SelectPolygonHitList (const std::vector< PxHit > &hitlist, std::vector< const PxHit * > &hitlistlocal) const |
std::vector< size_t > | PolyOverlap (std::vector< const PxHit * > ordered_hits, std::vector< size_t > candidate_polygon) const |
bool | Clockwise (double Ax, double Ay, double Bx, double By, double Cx, double Cy) const |
double | TimeToCm () const |
double | WireToCm () const |
double | WireTimeToCmCm () const |
unsigned int | Nplanes () const |
Private Attributes | |
geo::GeometryCore const & | fGeom |
detinfo::DetectorClocksData const & | fClocks |
detinfo::DetectorPropertiesData const & | fDetProp |
std::vector< double > | vertangle |
double | fWirePitch |
double | fTimeTick |
double | fDriftVelocity |
unsigned int | fNPlanes |
double | fWiretoCm |
double | fTimetoCm |
double | fWireTimetoCmCm |
Definition at line 37 of file GeometryUtilities.h.
util::GeometryUtilities::GeometryUtilities | ( | geo::GeometryCore const & | geom, |
detinfo::DetectorClocksData const & | clockData, | ||
detinfo::DetectorPropertiesData const & | propData | ||
) |
Definition at line 27 of file GeometryUtilities.cxx.
References detinfo::DetectorPropertiesData::DriftVelocity(), detinfo::DetectorPropertiesData::Efield(), fClocks, fDetProp, fDriftVelocity, fGeom, fNPlanes, fTimeTick, fTimetoCm, fWirePitch, fWireTimetoCmCm, fWiretoCm, geo::GeometryCore::Nplanes(), detinfo::sampling_rate(), detinfo::DetectorPropertiesData::Temperature(), geo::WireGeo::ThetaZ(), vertangle, geo::GeometryCore::Wire(), and geo::GeometryCore::WirePitch().
double util::GeometryUtilities::CalculatePitch | ( | unsigned int | iplane0, |
double | phi, | ||
double | theta | ||
) | const |
Definition at line 228 of file GeometryUtilities.cxx.
References util::abs(), fGeom, geo::k3D, geo::kUnknown, util::pi(), geo::GeometryCore::Plane(), and geo::GeometryCore::WireAngleToVertical().
double util::GeometryUtilities::CalculatePitchPolar | ( | unsigned int | iplane0, |
double | phi, | ||
double | theta | ||
) | const |
Definition at line 252 of file GeometryUtilities.cxx.
References util::abs(), fGeom, geo::k3D, geo::kUnknown, geo::GeometryCore::Plane(), and geo::GeometryCore::WireAngleToVertical().
bool util::GeometryUtilities::Clockwise | ( | double | Ax, |
double | Ay, | ||
double | Bx, | ||
double | By, | ||
double | Cx, | ||
double | Cy | ||
) | const |
Definition at line 1043 of file GeometryUtilities.cxx.
Referenced by PolyOverlap().
PxHit util::GeometryUtilities::FindClosestHit | ( | std::vector< PxHit > const & | hitlist, |
unsigned int | wirein, | ||
double | timein | ||
) | const |
Definition at line 1053 of file GeometryUtilities.cxx.
References FindClosestHitIndex().
unsigned int util::GeometryUtilities::FindClosestHitIndex | ( | std::vector< PxHit > const & | hitlist, |
unsigned int | wirein, | ||
double | timein | ||
) | const |
Definition at line 1060 of file GeometryUtilities.cxx.
References Get2DDistance(), util::PxPoint::t, and util::PxPoint::w.
Referenced by FindClosestHit().
double util::GeometryUtilities::Get2Dangle | ( | double | deltawire, |
double | deltatime | ||
) | const |
Definition at line 330 of file GeometryUtilities.cxx.
References util::abs().
Referenced by Get2Dangle(), Get2DangleFrom3D(), Get2Dslope(), and cluster::ClusterParamsAlg::GetFinalSlope().
double util::GeometryUtilities::Get2Dangle | ( | double | wireend, |
double | wirestart, | ||
double | timeend, | ||
double | timestart | ||
) | const |
Definition at line 308 of file GeometryUtilities.cxx.
References fTimetoCm, fWiretoCm, and Get2Dangle().
double util::GeometryUtilities::Get2Dangle | ( | const PxPoint * | endpoint, |
const PxPoint * | startpoint | ||
) | const |
Definition at line 321 of file GeometryUtilities.cxx.
References Get2Dangle(), util::PxPoint::t, and util::PxPoint::w.
double util::GeometryUtilities::Get2DangleFrom3D | ( | unsigned int | plane, |
double | phi, | ||
double | theta | ||
) | const |
Definition at line 356 of file GeometryUtilities.cxx.
double util::GeometryUtilities::Get2DangleFrom3D | ( | unsigned int | plane, |
TVector3 | dir_vector | ||
) | const |
Definition at line 367 of file GeometryUtilities.cxx.
References geo::GeometryCore::DetHalfHeight(), geo::GeometryCore::DetHalfWidth(), geo::GeometryCore::DetLength(), util::end(), fGeom, Get2Dangle(), geo::GeometryCore::Plane(), geo::PlaneGeo::View(), and geo::GeometryCore::WireAngleToVertical().
double util::GeometryUtilities::Get2DDistance | ( | double | wire1, |
double | time1, | ||
double | wire2, | ||
double | time2 | ||
) | const |
Definition at line 399 of file GeometryUtilities.cxx.
References fTimetoCm, and fWiretoCm.
Referenced by FindClosestHitIndex(), cluster::ClusterParamsAlg::GetFinalSlope(), cluster::ClusterParamsAlg::GetProfileInfo(), cluster::ClusterParamsAlg::RefineStartPoints(), cluster::SmallClusterFinderAlg::SelectLocalHitlist(), and SelectLocalHitlistIndex().
double util::GeometryUtilities::Get2DDistance | ( | const PxPoint * | point1, |
const PxPoint * | point2 | ||
) | const |
Definition at line 407 of file GeometryUtilities.cxx.
References util::PxPoint::t, and util::PxPoint::w.
double util::GeometryUtilities::Get2DPitchDistance | ( | double | angle, |
double | inwire, | ||
double | wire | ||
) | const |
Definition at line 416 of file GeometryUtilities.cxx.
References util::abs(), and fWiretoCm.
double util::GeometryUtilities::Get2DPitchDistanceWSlope | ( | double | slope, |
double | inwire, | ||
double | wire | ||
) | const |
Definition at line 424 of file GeometryUtilities.cxx.
References util::abs(), and fWiretoCm.
|
inline |
Definition at line 116 of file GeometryUtilities.h.
References Clockwise(), geo::vect::toPoint(), and x.
Referenced by GetProjectedPoint().
PxPoint util::GeometryUtilities::Get2DPointProjection | ( | geo::Point_t const & | xyz, |
unsigned int | plane | ||
) | const |
Definition at line 667 of file GeometryUtilities.cxx.
References fClocks, fDriftVelocity, fGeom, fTimeTick, geo::GeometryCore::NearestWireID(), geo::origin(), util::PxPoint::plane, geo::GeometryCore::Plane(), util::PxPoint::t, geo::PlaneGeo::toWorldCoords(), detinfo::trigger_offset(), util::PxPoint::w, and geo::WireID::Wire.
PxPoint util::GeometryUtilities::Get2DPointProjectionCM | ( | std::vector< double > const & | xyz, |
unsigned int | plane | ||
) | const |
Definition at line 694 of file GeometryUtilities.cxx.
References fGeom, fWiretoCm, and geo::GeometryCore::NearestWireID().
Referenced by Get2DPointProjectionCM().
PxPoint util::GeometryUtilities::Get2DPointProjectionCM | ( | double const * | xyz, |
unsigned int | plane | ||
) | const |
Definition at line 708 of file GeometryUtilities.cxx.
References fGeom, fWiretoCm, and geo::GeometryCore::NearestWireID().
PxPoint util::GeometryUtilities::Get2DPointProjectionCM | ( | TLorentzVector const * | xyz, |
unsigned int | plane | ||
) | const |
Definition at line 718 of file GeometryUtilities.cxx.
References Get2DPointProjectionCM().
double util::GeometryUtilities::Get2Dslope | ( | double | deltawire, |
double | deltatime | ||
) | const |
Definition at line 299 of file GeometryUtilities.cxx.
References fWireTimetoCmCm, and Get2Dangle().
Referenced by Get2Dslope().
double util::GeometryUtilities::Get2Dslope | ( | double | wireend, |
double | wirestart, | ||
double | timeend, | ||
double | timestart | ||
) | const |
Definition at line 275 of file GeometryUtilities.cxx.
References fTimetoCm, fWiretoCm, and Get2Dslope().
double util::GeometryUtilities::Get2Dslope | ( | const PxPoint * | endpoint, |
const PxPoint * | startpoint | ||
) | const |
Definition at line 289 of file GeometryUtilities.cxx.
References Get2Dslope(), util::PxPoint::t, and util::PxPoint::w.
int util::GeometryUtilities::Get3DaxisN | ( | int | iplane0, |
int | iplane1, | ||
double | omega0, | ||
double | omega1, | ||
double & | phi, | ||
double & | theta | ||
) | const |
Definition at line 55 of file GeometryUtilities.cxx.
References util::kINVALID_DOUBLE, and vertangle.
double util::GeometryUtilities::Get3DSpecialCaseTheta | ( | int | iplane0, |
int | iplane1, | ||
double | dw0, | ||
double | dw1 | ||
) | const |
Definition at line 190 of file GeometryUtilities.cxx.
References util::abs(), and vertangle.
void util::GeometryUtilities::GetDirectionCosines | ( | double | phi, |
double | theta, | ||
double * | dirs | ||
) | const |
Definition at line 768 of file GeometryUtilities.cxx.
Referenced by PitchInView().
int util::GeometryUtilities::GetPointOnLine | ( | double | slope, |
double | intercept, | ||
double | wire1, | ||
double | time1, | ||
double & | wireout, | ||
double & | timeout | ||
) | const |
Definition at line 434 of file GeometryUtilities.cxx.
Referenced by cluster::ClusterParamsAlg::GetFinalSlope(), GetPointOnLine(), cluster::ClusterParamsAlg::GetProfileInfo(), and SelectLocalHitlistIndex().
int util::GeometryUtilities::GetPointOnLine | ( | double | slope, |
double | wirestart, | ||
double | timestart, | ||
double | wire1, | ||
double | time1, | ||
double & | wireout, | ||
double & | timeout | ||
) | const |
Definition at line 500 of file GeometryUtilities.cxx.
References GetPointOnLine().
int util::GeometryUtilities::GetPointOnLine | ( | double | slope, |
const PxPoint * | startpoint, | ||
const PxPoint * | point1, | ||
PxPoint & | pointout | ||
) | const |
Definition at line 460 of file GeometryUtilities.cxx.
References GetPointOnLine(), util::PxPoint::t, and util::PxPoint::w.
int util::GeometryUtilities::GetPointOnLine | ( | double | slope, |
double | intercept, | ||
const PxPoint * | point1, | ||
PxPoint & | pointout | ||
) | const |
Definition at line 475 of file GeometryUtilities.cxx.
References util::PxPoint::t, and util::PxPoint::w.
int util::GeometryUtilities::GetPointOnLineWSlopes | ( | double | slope, |
double | intercept, | ||
double | ort_intercept, | ||
double & | wireout, | ||
double & | timeout | ||
) | const |
Definition at line 516 of file GeometryUtilities.cxx.
References fTimetoCm, fWireTimetoCmCm, and fWiretoCm.
Referenced by cluster::ClusterParamsAlg::GetProfileInfo().
int util::GeometryUtilities::GetPointOnLineWSlopes | ( | double | slope, |
double | intercept, | ||
double | ort_intercept, | ||
PxPoint & | pointonline | ||
) | const |
Definition at line 541 of file GeometryUtilities.cxx.
References util::PxPoint::t, and util::PxPoint::w.
int util::GeometryUtilities::GetProjectedPoint | ( | const PxPoint * | p0, |
const PxPoint * | p1, | ||
PxPoint & | pN | ||
) | const |
Definition at line 556 of file GeometryUtilities.cxx.
References geo::GeometryCore::ChannelsIntersect(), fClocks, fGeom, fNPlanes, fTimetoCm, Get2DPointProjection(), geo::origin(), util::PxPoint::plane, geo::GeometryCore::Plane(), geo::GeometryCore::PlaneWireToChannel(), util::PxPoint::t, geo::PlaneGeo::toWorldCoords(), detinfo::trigger_offset(), util::PxPoint::w, x, y, and z.
double util::GeometryUtilities::GetTimeTicks | ( | double | x, |
unsigned int | plane | ||
) | const |
Definition at line 726 of file GeometryUtilities.cxx.
References fClocks, fDriftVelocity, fGeom, fTimeTick, geo::origin(), geo::GeometryCore::Plane(), and detinfo::trigger_offset().
Definition at line 649 of file GeometryUtilities.cxx.
References fClocks, fGeom, fTimetoCm, GetYZ(), geo::origin(), util::PxPoint::plane, geo::GeometryCore::Plane(), util::PxPoint::t, detinfo::trigger_offset(), and x.
Definition at line 584 of file GeometryUtilities.cxx.
References geo::GeometryCore::ChannelsIntersect(), fGeom, fWiretoCm, geo::GeometryCore::Nwires(), util::PxPoint::plane, geo::GeometryCore::PlaneWireToChannel(), util::PxPoint::w, y, and z.
Referenced by GetXYZ().
|
inline |
Definition at line 182 of file GeometryUtilities.h.
double util::GeometryUtilities::PitchInView | ( | unsigned int | plane, |
double | phi, | ||
double | theta | ||
) | const |
Definition at line 738 of file GeometryUtilities.cxx.
References util::abs(), e, fGeom, GetDirectionCosines(), geo::GeometryCore::Plane(), geo::GeometryCore::WireAngleToVertical(), and geo::PlaneGeo::WirePitch().
std::vector< size_t > util::GeometryUtilities::PolyOverlap | ( | std::vector< const PxHit * > | ordered_hits, |
std::vector< size_t > | candidate_polygon | ||
) | const |
Definition at line 1006 of file GeometryUtilities.cxx.
References Clockwise(), tmp, and w.
Referenced by SelectPolygonHitList().
void util::GeometryUtilities::SelectLocalHitlist | ( | const std::vector< PxHit > & | hitlist, |
std::vector< const PxHit * > & | hitlistlocal, | ||
PxPoint & | startHit, | ||
double & | linearlimit, | ||
double & | ortlimit, | ||
double & | lineslopetest | ||
) | const |
Definition at line 777 of file GeometryUtilities.cxx.
Referenced by cluster::ClusterParamsAlg::RefineStartPoints().
void util::GeometryUtilities::SelectLocalHitlist | ( | const std::vector< PxHit > & | hitlist, |
std::vector< const PxHit * > & | hitlistlocal, | ||
PxPoint & | startHit, | ||
double & | linearlimit, | ||
double & | ortlimit, | ||
double & | lineslopetest, | ||
PxHit & | averageHit | ||
) | const |
Definition at line 793 of file GeometryUtilities.cxx.
References util::PxPoint::plane, SelectLocalHitlistIndex(), util::PxPoint::t, util::PxPoint::w, and w.
void util::GeometryUtilities::SelectLocalHitlistIndex | ( | const std::vector< PxHit > & | hitlist, |
std::vector< unsigned int > & | hitlistlocal_index, | ||
PxPoint & | startHit, | ||
double & | linearlimit, | ||
double & | ortlimit, | ||
double & | lineslopetest | ||
) | const |
Definition at line 826 of file GeometryUtilities.cxx.
References Get2DDistance(), GetPointOnLine(), util::PxPoint::t, and util::PxPoint::w.
Referenced by SelectLocalHitlist().
void util::GeometryUtilities::SelectPolygonHitList | ( | const std::vector< PxHit > & | hitlist, |
std::vector< const PxHit * > & | hitlistlocal | ||
) | const |
Definition at line 856 of file GeometryUtilities.cxx.
References larg4::dist(), util::empty(), fDetProp, fGeom, fTimetoCm, fWiretoCm, detinfo::DetectorPropertiesData::NumberTimeSamples(), geo::GeometryCore::Nwires(), and PolyOverlap().
Referenced by cluster::ClusterParamsAlg::FillPolygon().
|
inline |
Definition at line 179 of file GeometryUtilities.h.
Referenced by cluster::ClusterMergeHelper::AppendResult(), util::PxHitConverter::HitToPxHit(), and cluster::ClusterMergeHelper::SetClusters().
|
inline |
Definition at line 181 of file GeometryUtilities.h.
|
inline |
Definition at line 180 of file GeometryUtilities.h.
Referenced by cluster::ClusterMergeHelper::AppendResult(), util::PxHitConverter::HitToPxHit(), and cluster::ClusterMergeHelper::SetClusters().
|
private |
Definition at line 186 of file GeometryUtilities.h.
Referenced by GeometryUtilities(), Get2DPointProjection(), GetProjectedPoint(), GetTimeTicks(), and GetXYZ().
|
private |
Definition at line 187 of file GeometryUtilities.h.
Referenced by GeometryUtilities(), and SelectPolygonHitList().
|
private |
Definition at line 192 of file GeometryUtilities.h.
Referenced by GeometryUtilities(), Get2DPointProjection(), and GetTimeTicks().
|
private |
Definition at line 185 of file GeometryUtilities.h.
Referenced by CalculatePitch(), CalculatePitchPolar(), GeometryUtilities(), Get2DangleFrom3D(), Get2DPointProjection(), Get2DPointProjectionCM(), GetProjectedPoint(), GetTimeTicks(), GetXYZ(), GetYZ(), PitchInView(), and SelectPolygonHitList().
|
private |
Definition at line 193 of file GeometryUtilities.h.
Referenced by GeometryUtilities(), and GetProjectedPoint().
|
private |
Definition at line 191 of file GeometryUtilities.h.
Referenced by GeometryUtilities(), Get2DPointProjection(), and GetTimeTicks().
|
private |
Definition at line 195 of file GeometryUtilities.h.
Referenced by GeometryUtilities(), Get2Dangle(), Get2DDistance(), Get2Dslope(), GetPointOnLineWSlopes(), GetProjectedPoint(), GetXYZ(), and SelectPolygonHitList().
|
private |
Definition at line 190 of file GeometryUtilities.h.
Referenced by GeometryUtilities().
|
private |
Definition at line 196 of file GeometryUtilities.h.
Referenced by GeometryUtilities(), Get2Dslope(), and GetPointOnLineWSlopes().
|
private |
Definition at line 194 of file GeometryUtilities.h.
Referenced by GeometryUtilities(), Get2Dangle(), Get2DDistance(), Get2DPitchDistance(), Get2DPitchDistanceWSlope(), Get2DPointProjectionCM(), Get2Dslope(), GetPointOnLineWSlopes(), GetYZ(), and SelectPolygonHitList().
|
private |
Definition at line 189 of file GeometryUtilities.h.
Referenced by GeometryUtilities(), Get3DaxisN(), and Get3DSpecialCaseTheta().