Jpp  debug
the software that should make you happy
Public Types | Public Member Functions | Public Attributes | Private Attributes | List of all members
JACOUSTICS::JMatch3D Class Reference

3D match criterion for acoustic signals. More...

Inheritance diagram for JACOUSTICS::JMatch3D:
JLANG::JClonable< JClonable_t, JDerived_t > JLANG::JClonable< JClonable_t, JDerived_t >

Public Types

typedef JClonable< JClonable_t >::clone_type clone_type
 

Public Member Functions

 JMatch3D (const JSoundVelocity &V, const double Tmax_s=0.0)
 Constructor. More...
 
virtual bool operator() (const hit_type &first, const hit_type &second) const override
 Match operator. More...
 
 JMatch3D (const double V, const double Dmax_m, const double Tmax_s)
 Constructor. More...
 
virtual bool operator() (const hit_type &first, const hit_type &second) const override
 Match operator. More...
 
virtual clone_type clone () const override
 Get clone of this object. More...
 

Public Attributes

const JSoundVelocity V
 
const double Tmax_s
 

Private Attributes

const double V
 
const double Dmax_m
 

Detailed Description

3D match criterion for acoustic signals.

Definition at line 85 of file JAcousticsTriggerProcessor.cc.

Member Typedef Documentation

◆ clone_type

template<class JClonable_t , class JDerived_t >
typedef JClonable<JClonable_t>::clone_type JLANG::JClonable< JClonable_t, JDerived_t >::clone_type
inherited

Definition at line 61 of file JClonable.hh.

Constructor & Destructor Documentation

◆ JMatch3D() [1/2]

JACOUSTICS::JMatch3D::JMatch3D ( const JSoundVelocity V,
const double  Tmax_s = 0.0 
)
inline

Constructor.

Parameters
Vsound velocity
Tmax_smaximal extra time [s]

Definition at line 95 of file JAcousticsTriggerProcessor.cc.

95  :
96  V(V),
97  Tmax_s(Tmax_s)
98  {}

◆ JMatch3D() [2/2]

JACOUSTICS::JMatch3D::JMatch3D ( const double  V,
const double  Dmax_m,
const double  Tmax_s 
)
inline

Constructor.

Parameters
Vsound velocity [m/s]
Dmax_mmaximal distance [m]
Tmax_smaximal extra time [s]

Definition at line 105 of file JBillabong.cc.

105  :
106  V(V),
107  Dmax_m(Dmax_m),
108  Tmax_s(Tmax_s)
109  {}
const double Dmax_m
Definition: JBillabong.cc:133

Member Function Documentation

◆ operator()() [1/2]

virtual bool JACOUSTICS::JMatch3D::operator() ( const hit_type first,
const hit_type second 
) const
inlineoverridevirtual

Match operator.

Parameters
firsthit
secondhit
Returns
match result

Definition at line 108 of file JAcousticsTriggerProcessor.cc.

109  {
110  using namespace JPP;
111 
112  const double t1 = V.getTime(getDistance(first.getPosition(), second.getPosition()),
113  first .getZ(),
114  second.getZ());
115 
116  const double dt = fabs(first.getToA() - second.getToA());
117 
118  return dt <= t1 + Tmax_s;
119  }
const JPosition3D & getPosition() const
Get position.
Definition: JPosition3D.hh:130
double getZ() const
Get z position.
Definition: JVector3D.hh:115
double getDistance(const JFirst_t &first, const JSecond_t &second)
Get distance between objects.
This name space includes all other name spaces (except KM3NETDAQ, KM3NET and ANTARES).
virtual double getTime(const double D_m, const double z1, const double z2) const override
Get propagation time of sound.
double getToA() const
Get calibrated time of arrival.

◆ operator()() [2/2]

virtual bool JACOUSTICS::JMatch3D::operator() ( const hit_type first,
const hit_type second 
) const
inlineoverridevirtual

Match operator.

Parameters
firsthit
secondhit
Returns
match result

Definition at line 119 of file JBillabong.cc.

120  {
121  using namespace JPP;
122 
123  const double D = getDistance(first.getPosition(), second.getPosition());
124 
125  if (D <= Dmax_m)
126  return fabs(first.getToA() - second.getToA()) <= D / V + Tmax_s;
127  else
128  return false;
129  }

◆ clone()

template<class JClonable_t , class JDerived_t >
virtual clone_type JLANG::JClonable< JClonable_t, JDerived_t >::clone ( ) const
inlineoverridevirtualinherited

Member Data Documentation

◆ V [1/2]

const JSoundVelocity JACOUSTICS::JMatch3D::V

Definition at line 122 of file JAcousticsTriggerProcessor.cc.

◆ Tmax_s

const double JACOUSTICS::JMatch3D::Tmax_s

Definition at line 123 of file JAcousticsTriggerProcessor.cc.

◆ V [2/2]

const double JACOUSTICS::JMatch3D::V
private

Definition at line 132 of file JBillabong.cc.

◆ Dmax_m

const double JACOUSTICS::JMatch3D::Dmax_m
private

Definition at line 133 of file JBillabong.cc.


The documentation for this class was generated from the following files: