Jpp  18.5.2
the software that should make you happy
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
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 117 of file JModuleMapper.hh.

Constructor & Destructor Documentation

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

Constructor.

Parameters
Dmax_mmaximal distance [m]

Definition at line 123 of file JModuleMapper.hh.

123  :
124  dmax(Dmax_m)
125  {}

Member Function Documentation

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

Get maximal distance.

Returns
maximal distance [m]

Definition at line 133 of file JModuleMapper.hh.

134  {
135  return dmax;
136  }
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 146 of file JModuleMapper.hh.

147  {
148  return getDistance(first.getPosition(), second.getPosition()) <= dmax;
149  }
double getDistance(const JFirst_t &first, const JSecond_t &second)
Get distance between objects.
const JPosition3D & getPosition() const
Get position.
Definition: JPosition3D.hh:130

Member Data Documentation

double JDETECTOR::JMaximalDistance::dmax
protected

Definition at line 152 of file JModuleMapper.hh.


The documentation for this struct was generated from the following file: