Jpp
Public Member Functions | Protected Attributes | List of all members
JDETECTOR::JMaximalDistance Struct Reference

Auxiliary class to match modules according maximal distance. More...

#include <JModuleMapper.hh>

Public Member Functions

 JMaximalDistance (const double Dmax_m)
 Constructor. More...
 
double getDmax () const
 Get maximal distance. More...
 
bool operator() (const JModule &first, const JModule &second) const
 Test whether two module match. More...
 

Protected Attributes

double dmax
 

Detailed Description

Auxiliary class to match modules according maximal distance.

Definition at line 116 of file JModuleMapper.hh.

Constructor & Destructor Documentation

◆ JMaximalDistance()

JDETECTOR::JMaximalDistance::JMaximalDistance ( const double  Dmax_m)
inline

Constructor.

Parameters
Dmax_mmaximal distance [m]

Definition at line 122 of file JModuleMapper.hh.

122  :
123  dmax(Dmax_m)
124  {}

Member Function Documentation

◆ getDmax()

double JDETECTOR::JMaximalDistance::getDmax ( ) const
inline

Get maximal distance.

Returns
maximal distance [m]

Definition at line 132 of file JModuleMapper.hh.

133  {
134  return dmax;
135  }

◆ operator()()

bool JDETECTOR::JMaximalDistance::operator() ( const JModule first,
const JModule second 
) const
inline

Test whether two module match.

Parameters
firstfirst module
secondsecond module
Returns
true if distance between modules less than limit; else false

Definition at line 145 of file JModuleMapper.hh.

146  {
147  return first.getDistance(second) <= dmax;
148  }

Member Data Documentation

◆ dmax

double JDETECTOR::JMaximalDistance::dmax
protected

Definition at line 151 of file JModuleMapper.hh.


The documentation for this struct was generated from the following file:
JGEOMETRY3D::JVector3D::getDistance
double getDistance(const JVector3D &pos) const
Get distance to point.
Definition: JVector3D.hh:269
JDETECTOR::JMaximalDistance::dmax
double dmax
Definition: JModuleMapper.hh:151