![]() |
LArSoft
v10_04_05
Liquid Argon Software toolkit - https://larsoft.org/
|
#include "GeometryUtilities.h"
Public Member Functions | |
GeometryUtilities (geo::GeometryCore const &geom, geo::WireReadoutGeom const &wireReadoutGeom, 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 (geo::Point_t const &xyz, geo::PlaneID const &planeID) const |
PxPoint | Get2DPointProjectionCM (geo::Point_t xyz, geo::PlaneID const &planeID) 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 |
geo::WireReadoutGeom const & | fWireReadoutGeom |
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 36 of file GeometryUtilities.h.
util::GeometryUtilities::GeometryUtilities | ( | geo::GeometryCore const & | geom, |
geo::WireReadoutGeom const & | wireReadoutGeom, | ||
detinfo::DetectorClocksData const & | clockData, | ||
detinfo::DetectorPropertiesData const & | propData | ||
) |
Definition at line 26 of file GeometryUtilities.cxx.
References detinfo::DetectorPropertiesData::DriftVelocity(), detinfo::DetectorPropertiesData::Efield(), fClocks, fDetProp, fDriftVelocity, fNPlanes, fTimeTick, fTimetoCm, fWirePitch, fWireReadoutGeom, fWireTimetoCmCm, fWiretoCm, geo::WireReadoutGeom::Plane(), detinfo::sampling_rate(), detinfo::DetectorPropertiesData::Temperature(), and vertangle.
double util::GeometryUtilities::CalculatePitch | ( | unsigned int | iplane0, |
double | phi, | ||
double | theta | ||
) | const |
Definition at line 228 of file GeometryUtilities.cxx.
References util::abs(), fWireReadoutGeom, geo::k3D, geo::kUnknown, util::pi(), geo::WireReadoutGeom::Plane(), and geo::WireReadoutGeom::WireAngleToVertical().
double util::GeometryUtilities::CalculatePitchPolar | ( | unsigned int | iplane0, |
double | phi, | ||
double | theta | ||
) | const |
Definition at line 253 of file GeometryUtilities.cxx.
References util::abs(), fWireReadoutGeom, geo::k3D, geo::kUnknown, geo::WireReadoutGeom::Plane(), and geo::WireReadoutGeom::WireAngleToVertical().
bool util::GeometryUtilities::Clockwise | ( | double | Ax, |
double | Ay, | ||
double | Bx, | ||
double | By, | ||
double | Cx, | ||
double | Cy | ||
) | const |
Definition at line 1010 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 1020 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 1027 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 332 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 310 of file GeometryUtilities.cxx.
References fTimetoCm, fWiretoCm, and Get2Dangle().
double util::GeometryUtilities::Get2Dangle | ( | const PxPoint * | endpoint, |
const PxPoint * | startpoint | ||
) | const |
Definition at line 323 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 358 of file GeometryUtilities.cxx.
double util::GeometryUtilities::Get2DangleFrom3D | ( | unsigned int | plane, |
TVector3 | dir_vector | ||
) | const |
Definition at line 369 of file GeometryUtilities.cxx.
References util::end(), fGeom, fWireReadoutGeom, Get2Dangle(), geo::WireReadoutGeom::Plane(), geo::GeometryCore::TPC(), geo::PlaneGeo::View(), and geo::WireReadoutGeom::WireAngleToVertical().
double util::GeometryUtilities::Get2DDistance | ( | double | wire1, |
double | time1, | ||
double | wire2, | ||
double | time2 | ||
) | const |
Definition at line 401 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 409 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 417 of file GeometryUtilities.cxx.
References util::abs(), and fWiretoCm.
double util::GeometryUtilities::Get2DPitchDistanceWSlope | ( | double | slope, |
double | inwire, | ||
double | wire | ||
) | const |
Definition at line 425 of file GeometryUtilities.cxx.
References util::abs(), and fWiretoCm.
PxPoint util::GeometryUtilities::Get2DPointProjection | ( | geo::Point_t const & | xyz, |
geo::PlaneID const & | planeID | ||
) | const |
Definition at line 664 of file GeometryUtilities.cxx.
References fClocks, fDriftVelocity, fTimeTick, fWireReadoutGeom, geo::PlaneGeo::NearestWireID(), geo::origin(), util::PxPoint::plane, geo::WireReadoutGeom::Plane(), geo::PlaneID::Plane, util::PxPoint::t, geo::PlaneGeo::toWorldCoords(), detinfo::trigger_offset(), util::PxPoint::w, and geo::WireID::Wire.
Referenced by GetProjectedPoint().
PxPoint util::GeometryUtilities::Get2DPointProjectionCM | ( | geo::Point_t | xyz, |
geo::PlaneID const & | planeID | ||
) | const |
Definition at line 688 of file GeometryUtilities.cxx.
References fWireReadoutGeom, fWiretoCm, geo::PlaneGeo::NearestWireID(), geo::WireReadoutGeom::Plane(), geo::PlaneID::Plane, geo::WireID::Wire, and x.
double util::GeometryUtilities::Get2Dslope | ( | double | deltawire, |
double | deltatime | ||
) | const |
Definition at line 301 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 277 of file GeometryUtilities.cxx.
References fTimetoCm, fWiretoCm, and Get2Dslope().
double util::GeometryUtilities::Get2Dslope | ( | const PxPoint * | endpoint, |
const PxPoint * | startpoint | ||
) | const |
Definition at line 291 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 740 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 499 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 515 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 540 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 555 of file GeometryUtilities.cxx.
References geo::WireReadoutGeom::ChannelsIntersect(), fClocks, fNPlanes, fTimetoCm, fWireReadoutGeom, Get2DPointProjection(), geo::origin(), util::PxPoint::plane, geo::WireReadoutGeom::Plane(), geo::WireReadoutGeom::PlaneWireToChannel(), util::PxPoint::t, geo::PlaneGeo::toWorldCoords(), detinfo::trigger_offset(), util::PxPoint::w, and x.
double util::GeometryUtilities::GetTimeTicks | ( | double | x, |
unsigned int | plane | ||
) | const |
Definition at line 697 of file GeometryUtilities.cxx.
References fClocks, fDriftVelocity, fTimeTick, fWireReadoutGeom, geo::origin(), geo::WireReadoutGeom::Plane(), and detinfo::trigger_offset().
Definition at line 646 of file GeometryUtilities.cxx.
References fClocks, fTimetoCm, fWireReadoutGeom, GetYZ(), geo::origin(), util::PxPoint::plane, geo::WireReadoutGeom::Plane(), util::PxPoint::t, detinfo::trigger_offset(), and x.
Definition at line 582 of file GeometryUtilities.cxx.
References geo::WireReadoutGeom::ChannelsIntersect(), fWireReadoutGeom, fWiretoCm, geo::WireReadoutGeom::Nwires(), util::PxPoint::plane, geo::WireReadoutGeom::PlaneWireToChannel(), and util::PxPoint::w.
Referenced by GetXYZ().
|
inline |
Definition at line 173 of file GeometryUtilities.h.
double util::GeometryUtilities::PitchInView | ( | unsigned int | plane, |
double | phi, | ||
double | theta | ||
) | const |
Definition at line 709 of file GeometryUtilities.cxx.
References util::abs(), e, fWireReadoutGeom, GetDirectionCosines(), geo::WireReadoutGeom::Plane(), geo::WireReadoutGeom::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 973 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 749 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 765 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 797 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 823 of file GeometryUtilities.cxx.
References larg4::dist(), util::empty(), fDetProp, fTimetoCm, fWireReadoutGeom, fWiretoCm, detinfo::DetectorPropertiesData::NumberTimeSamples(), geo::WireReadoutGeom::Nwires(), and PolyOverlap().
Referenced by cluster::ClusterParamsAlg::FillPolygon().
|
inline |
Definition at line 170 of file GeometryUtilities.h.
Referenced by cluster::ClusterMergeHelper::AppendResult(), util::PxHitConverter::HitToPxHit(), and cluster::ClusterMergeHelper::SetClusters().
|
inline |
Definition at line 172 of file GeometryUtilities.h.
|
inline |
Definition at line 171 of file GeometryUtilities.h.
Referenced by cluster::ClusterMergeHelper::AppendResult(), util::PxHitConverter::HitToPxHit(), and cluster::ClusterMergeHelper::SetClusters().
|
private |
Definition at line 178 of file GeometryUtilities.h.
Referenced by GeometryUtilities(), Get2DPointProjection(), GetProjectedPoint(), GetTimeTicks(), and GetXYZ().
|
private |
Definition at line 179 of file GeometryUtilities.h.
Referenced by GeometryUtilities(), and SelectPolygonHitList().
|
private |
Definition at line 184 of file GeometryUtilities.h.
Referenced by GeometryUtilities(), Get2DPointProjection(), and GetTimeTicks().
|
private |
Definition at line 176 of file GeometryUtilities.h.
Referenced by Get2DangleFrom3D().
|
private |
Definition at line 185 of file GeometryUtilities.h.
Referenced by GeometryUtilities(), and GetProjectedPoint().
|
private |
Definition at line 183 of file GeometryUtilities.h.
Referenced by GeometryUtilities(), Get2DPointProjection(), and GetTimeTicks().
|
private |
Definition at line 187 of file GeometryUtilities.h.
Referenced by GeometryUtilities(), Get2Dangle(), Get2DDistance(), Get2Dslope(), GetPointOnLineWSlopes(), GetProjectedPoint(), GetXYZ(), and SelectPolygonHitList().
|
private |
Definition at line 182 of file GeometryUtilities.h.
Referenced by GeometryUtilities().
|
private |
Definition at line 177 of file GeometryUtilities.h.
Referenced by CalculatePitch(), CalculatePitchPolar(), GeometryUtilities(), Get2DangleFrom3D(), Get2DPointProjection(), Get2DPointProjectionCM(), GetProjectedPoint(), GetTimeTicks(), GetXYZ(), GetYZ(), PitchInView(), and SelectPolygonHitList().
|
private |
Definition at line 188 of file GeometryUtilities.h.
Referenced by GeometryUtilities(), Get2Dslope(), and GetPointOnLineWSlopes().
|
private |
Definition at line 186 of file GeometryUtilities.h.
Referenced by GeometryUtilities(), Get2Dangle(), Get2DDistance(), Get2DPitchDistance(), Get2DPitchDistanceWSlope(), Get2DPointProjectionCM(), Get2Dslope(), GetPointOnLineWSlopes(), GetYZ(), and SelectPolygonHitList().
|
private |
Definition at line 181 of file GeometryUtilities.h.
Referenced by GeometryUtilities(), Get3DaxisN(), and Get3DSpecialCaseTheta().