HerdSoftware  0.4.0
Classes | Functions
Herd::Geom Namespace Reference

Classes

struct  IntersectionResult
 

Functions

Point ProjectPointToLine (const Point &point, const Line &line)
 Finds the projection of a point to a line. More...
 
bool IsInsideCaloEnvelope (const Point &point, const CaloGeoParams &geoParams)
 Checks if a point is inside the CALO envelope. More...
 
std::optional< SegmentPathInCaloLyso (const Line &line, const CaloGeoParams &geoParams)
 Computes the path of the given line in LYSO. More...
 
std::optional< SegmentPathInCaloEnvelope (const Line &line, const CaloGeoParams &geoParams)
 Computes the path of the given line in the CALO envelope. More...
 
float DistanceToCaloEnvelope (const Point &point, const CaloGeoParams &geoParams)
 Computes the distance of a point from the CALO envelope. More...
 
float CaloPathlengthAfterPoint (const Point &startingPoint, const Vec3D &direction, const CaloGeoParams &geoParams)
 Computes the distance between a point inside CALO and the CALO border along a given direction. More...
 
template<class GeoParams >
std::vector< IntersectionResultIntersect (const Line &line, const GeoParams &geoParams)
 compute intersections between a line and a given geoparams object More...
 

Function Documentation

◆ CaloPathlengthAfterPoint()

float Herd::Geom::CaloPathlengthAfterPoint ( const Point startingPoint,
const Vec3D direction,
const CaloGeoParams geoParams 
)

Computes the distance between a point inside CALO and the CALO border along a given direction.

The CALO border is defined by the LYSO cubes.

Parameters
startingPointThe point inside CALO.
directionThe direction along which the distance to CALO border is computed.
geoParamsThe CALO geometry parameters.
Returns
The distance between startingPoint and the CALO border computed along direction.

◆ DistanceToCaloEnvelope()

float Herd::Geom::DistanceToCaloEnvelope ( const Point point,
const CaloGeoParams geoParams 
)

Computes the distance of a point from the CALO envelope.

This function computes the distance between the given point and the CALO envelope as given by the geometric parameters object.

Parameters
pointThe point.
geoParamsThe geometric parameters of the CALO.
Returns
The distance between the point and the CALO envelope in cm.

◆ Intersect()

template<class GeoParams >
std::vector<IntersectionResult> Herd::Geom::Intersect ( const Line line,
const GeoParams &  geoParams 
)

compute intersections between a line and a given geoparams object

Template Parameters
GeoParams
Parameters
line
geoParams
Returns
a list of intersection points on all volumes hit by the line

◆ IsInsideCaloEnvelope()

bool Herd::Geom::IsInsideCaloEnvelope ( const Point point,
const CaloGeoParams geoParams 
)

Checks if a point is inside the CALO envelope.

Parameters
pointThe given point
geoParamsThe geometry parameters of the CALO
Returns
true if the point is inside the CALO envelope, false otherwise

◆ PathInCaloEnvelope()

std::optional< Segment > Herd::Geom::PathInCaloEnvelope ( const Line line,
const CaloGeoParams geoParams 
)

Computes the path of the given line in the CALO envelope.

Computes the exact path in the CALO envelope of the given line by checking the intersection of the line with the envelope surface. The path is returned as a Herd::Segment object, whose starting point is the first intersection along the line direction and whose end point is the second one. If the line does not intersect the envelope a default Herd::Segment is returned.

Parameters
lineThe line for which the path in LYSO is computed.
geoParamsThe geometry parameters of the CALO.
Returns
Optional: A segment describing the line path in the envelope, if they intersect

◆ PathInCaloLyso()

std::optional< Segment > Herd::Geom::PathInCaloLyso ( const Line line,
const CaloGeoParams geoParams 
)

Computes the path of the given line in LYSO.

Computes the exact path in LYSO of the given line by checking the intersection of the line with each cube and then finding the entrance and exit points from CALO among them.

Parameters
lineThe line for which the path in LYSO is computed.
geoParamsThe geometry parameters of the CALO.
Returns
Optional: A segment connecting the line entry and exit points in LYSO, if they intersect.

◆ ProjectPointToLine()

Point Herd::Geom::ProjectPointToLine ( const Point point,
const Line line 
)

Finds the projection of a point to a line.

Parameters
pointThe point to project.
lineThe line to which the point is projected.
Returns
The orthogonal projection of the given point on the given line.