Jpp 19.3.0-rc.1
the software that should make you happy
Loading...
Searching...
No Matches
JACOUSTICS::JEventOverlap Struct Reference

Match of two events considering overlap in time and position. More...

#include <JEventOverlap.hh>

Public Member Functions

 JEventOverlap (const double Tmax_s, const double Dmax_m=std::numeric_limits< double >::max())
 Constructor.
 
bool operator() (const event_type &first, const event_type &second) const
 Match criterion.
 
 JEventOverlap (const double Tmax_s)
 Constructor.
 
bool operator() (const JEvent &first, const JEvent &second) const
 Match criterion.
 
double getTmax () const
 Get time window.
 

Public Attributes

const double Tmax_s
 
const double Dmax_m
 

Protected Attributes

double tmax_s
 

Detailed Description

Match of two events considering overlap in time and position.

Match of two events considering overlap in time.

Definition at line 20 of file JAcoustics/JEventOverlap.hh.

Constructor & Destructor Documentation

◆ JEventOverlap() [1/2]

JACOUSTICS::JEventOverlap::JEventOverlap ( const double Tmax_s,
const double Dmax_m = std::numeric_limits<double>::max() )
inline

Constructor.

Parameters
Tmax_smaximal time difference between two events [s]
Dmax_mmaximal distance between two events [m]

Definition at line 199 of file JAcousticsTriggerProcessor.cc.

◆ JEventOverlap() [2/2]

JACOUSTICS::JEventOverlap::JEventOverlap ( const double Tmax_s)
inline

Constructor.

Parameters
Tmax_smaximal time difference between two consecutive events [s]

Definition at line 27 of file JAcoustics/JEventOverlap.hh.

Member Function Documentation

◆ operator()() [1/2]

bool JACOUSTICS::JEventOverlap::operator() ( const event_type & first,
const event_type & second ) const
inline

Match criterion.

Parameters
firstfirst event
secondsecond event
Returns
true if two events overlap; else false

Definition at line 212 of file JAcousticsTriggerProcessor.cc.

213 {
214 using namespace JPP;
215
216 return fabs(first.getT() - second.getT()) <= Tmax_s && getDistance(first.getPosition(), second.getPosition()) <= Dmax_m;
217 }
const JPosition3D & getPosition() const
Get position.
double getT(const JVector3D &pos) const
Get arrival time of Cherenkov light at given position.
Definition JVertex3D.hh:147
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).

◆ operator()() [2/2]

bool JACOUSTICS::JEventOverlap::operator() ( const JEvent & first,
const JEvent & second ) const
inline

Match criterion.

Parameters
firstfirst event
secondsecond event
Returns
true if two events overlap in time; else false

Definition at line 39 of file JAcoustics/JEventOverlap.hh.

40 {
41 if (first .empty()) return false;
42 if (second.empty()) return false;
43
44 return (first.rbegin()->getToE() >= second. begin()->getToE() - tmax_s &&
45 first. begin()->getToE() <= second.rbegin()->getToE() + tmax_s);
46 }

◆ getTmax()

double JACOUSTICS::JEventOverlap::getTmax ( ) const
inline

Get time window.

Returns
maximal time difference between two consecutive events [s]

Definition at line 54 of file JAcoustics/JEventOverlap.hh.

55 {
56 return tmax_s;
57 }

Member Data Documentation

◆ Tmax_s

const double JACOUSTICS::JEventOverlap::Tmax_s

Definition at line 219 of file JAcousticsTriggerProcessor.cc.

◆ Dmax_m

const double JACOUSTICS::JEventOverlap::Dmax_m

Definition at line 220 of file JAcousticsTriggerProcessor.cc.

◆ tmax_s

double JACOUSTICS::JEventOverlap::tmax_s
protected

Definition at line 61 of file JAcoustics/JEventOverlap.hh.


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