Jpp - the software that should make you happy
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Namespaces | Classes | Typedefs | Enumerations | Functions | Variables
JACOUSTICS Namespace Reference

Namespaces

 JGEOMETRY
 Auxiliary namespace to encapsulate different geometries.
 
 JMODEL
 Auxiliary namespace to encapsulate different model parameters.
 

Classes

struct  JAbstractSoundVelocity
 Interface for velocity of sound. More...
 
struct  JCounter
 Acoustic counter. More...
 
struct  JEKey
 Emitter key. More...
 
struct  JEmitter
 Acoustic emitter. More...
 
struct  JEmitterID
 Auxiliary class for emitter identification. More...
 
struct  JEvent
 Acoustic event. More...
 
struct  JEventOverlap
 Match of two events considering overlap in time. More...
 
struct  JFit
 Acoustic single fit. More...
 
struct  JHead
 Acoustic event header. More...
 
struct  JEvt
 Acoustic event fit. More...
 
struct  JFitParameters
 Fit parameters. More...
 
struct  JPDFGauss
 Custom probability density function of time-of-arrival. More...
 
struct  JHit
 Acoustics hit. More...
 
struct  JKatoomba_t
 Auxiliary base class for fit function of acoustic model. More...
 
struct  JKatoomba
 Template definition of fit function of acoustic model. More...
 
struct  JKatoomba< JAbstractMinimiser >
 Template specialisation of fit function of acoustic model based on JAbstractMinimiser minimiser. More...
 
struct  JKatoomba< JEstimator >
 Template specialisation of fit function of acoustic model based on linear approximation. More...
 
struct  JKatoomba< JSimplex >
 Template specialisation of fit function of acoustic model based on JSimplex minimiser. More...
 
class  JGandalf
 
struct  JKatoomba< JGandalf >
 Template specialisation of fit function of acoustic model based on JGandalf minimiser. More...
 
struct  JMechanics
 Auxiliary data structure for parameters of mechanical model. More...
 
struct  JDetectorMechanics
 Auxiliary data structure for mechanical model parameters of strings in a given detector. More...
 
struct  JModel
 Model for fit to acoustics data. More...
 
struct  JNarrabri
 Dynamic position calibration. More...
 
struct  JReceiver
 Acoustic receiver. More...
 
struct  JSoundVelocity
 Implementation for velocity of sound. More...
 
struct  JTransceiver
 Acoustic transceiver. More...
 
struct  JTransmission
 Acoustic transmission. More...
 
class  JTriggerOutput
 Set of acoustics events. More...
 
struct  JTriggerParameters
 Trigger parameters. More...
 
struct  hit_type
 Acoustic hit. More...
 
class  JMatch3D
 3D match criterion for acoustic signals. More...
 

Typedefs

typedef JGEOMETRY::JDetector JGeometry
 Type definition of detector geometry. More...
 

Enumerations

enum  JFit_t { linear_t = 0, simplex_t, gandalf_t }
 Enumeration for fit algorithms. More...
 

Functions

template<class T , class JTypename_t , class JComparator_t >
JVector3D getPosition (T __begin, T __end, const JPredicate< JTypename_t, JComparator_t > &predicate)
 Get position from element in data which corresponds to given predicate. More...
 
template<class T , class JTypename_t , class JComparator_t >
JVector3D getPosition (T __begin, T __end, const JPredicate< JTypename_t, JComparator_t > &predicate, const JVector3D &position)
 Get position from element in data which corresponds to given predicate. More...
 
double getUNIXTime (const KM3NETDAQ::JDAQChronometer &chronometer)
 Get UNIX time of given DAQ object. More...
 
static bool operator< (const JCounter &first, const JCounter &second)
 Less-than operator for two counters. More...
 
static bool operator== (const JCounter &first, const JCounter &second)
 Equals operator for two counters. More...
 
bool operator< (const JEvent &first, const JEvent &second)
 Less than operator for acoustics events. More...
 
double getQuality (const double chi2, const int NDF)
 Get quality of fit. More...
 
template<class T >
size_t getNumberOfEmitters (T __begin, T __end)
 Get number of emitters. More...
 
JModel getModel (const JEvt &evt)
 Get model. More...
 
JEvt getEvt (const JHead &header, const JModel &model)
 Get event. More...
 
JTreeParameters getTreeParameters (const JType< JEvent > &type)
 
JTreeParameters getTreeParameters (const JType< JEvt > &type)
 
static bool operator< (const JTransmission &first, const JTransmission &second)
 Less-than operator for two transmissions. More...
 
static bool operator== (const JTransmission &first, const JTransmission &second)
 Equals operator for two transmissions. More...
 

Variables

static const double TOAMIN_S = 0.0000000
 Minimal allowed time-of-arrival [s]. More...
 
static const double TOAMAX_S = 0.6310912
 Maximal allowed time-of-arrival [s]. More...
 
static JEmitterID getEmitterID
 Function object for emitter identification. More...
 
static JDetectorMechanics getMechanics
 Function object to get string mechanics. More...
 
static const JSoundVelocity getSoundVelocity (1541.0,-17.0e-3,-2000.0)
 Function object for velocity of sound. More...
 

Detailed Description

Author
mdejong

Typedef Documentation

Type definition of detector geometry.

Definition at line 540 of file JGeometry.hh.

Enumeration Type Documentation

Enumeration for fit algorithms.

Enumerator
linear_t 

Linear fit.

simplex_t 

Simplex fit.

gandalf_t 

Gandalf fit.

Definition at line 44 of file JKatoomba.hh.

44  {
45  linear_t = 0, //!< Linear fit
46  simplex_t, //!< Simplex fit
47  gandalf_t //!< Gandalf fit
48  };
Linear fit.
Definition: JKatoomba.hh:45
Simplex fit.
Definition: JKatoomba.hh:46
Gandalf fit.
Definition: JKatoomba.hh:47

Function Documentation

template<class T , class JTypename_t , class JComparator_t >
JVector3D JACOUSTICS::getPosition ( T  __begin,
T  __end,
const JPredicate< JTypename_t, JComparator_t > &  predicate 
)
inline

Get position from element in data which corresponds to given predicate.

Parameters
__beginbegin of data
__endend of data
predicatepredicate
Returns
position

Definition at line 37 of file JAcousticsToolkit.hh.

40  {
41  T p = std::find_if(__begin, __end, predicate);
42 
43  if (p != __end)
44  return p->getPosition();
45  else
46  THROW(JValueOutOfRange, "No element in container which corresponds to given predicate.");
47  }
#define THROW(JException_t, A)
Marco for throwing exception with std::ostream compatible message.
Definition: JException.hh:670
do set_variable OUTPUT_DIRECTORY $WORKDIR T
Exception for accessing a value in a collection that is outside of its range.
Definition: JException.hh:162
template<class T , class JTypename_t , class JComparator_t >
JVector3D JACOUSTICS::getPosition ( T  __begin,
T  __end,
const JPredicate< JTypename_t, JComparator_t > &  predicate,
const JVector3D position 
)
inline

Get position from element in data which corresponds to given predicate.

Parameters
__beginbegin of data
__endend of data
predicatepredicate
positiondefault position
Returns
position

Definition at line 60 of file JAcousticsToolkit.hh.

64  {
65  try {
66  return getPosition(__begin, __end, predicate);
67  }
68  catch(const std::exception&) {
69  return position;
70  }
71  }
JPosition3D getPosition(const Vec &pos)
Get position.
double JACOUSTICS::getUNIXTime ( const KM3NETDAQ::JDAQChronometer chronometer)
inline

Get UNIX time of given DAQ object.

Parameters
chronometerchronometer
Returns
UNIX time [s]

Definition at line 80 of file JAcousticsToolkit.hh.

81  {
82  return chronometer.getTimesliceStart().getTimeNanoSecond() * 1.0e-9;
83  }
JDAQUTCExtended getTimesliceStart() const
Get start of timeslice.
double getTimeNanoSecond() const
Get time (limited to 16 ns cycles).
static bool JACOUSTICS::operator< ( const JCounter first,
const JCounter second 
)
inlinestatic

Less-than operator for two counters.

Parameters
firstfirst counter
secondsecond counter
Returns
true if first counter less than second; else false

Definition at line 65 of file JAcoustics/JCounter.hh.

66  {
67  return first.getCounter() < second.getCounter();
68  }
int getCounter() const
Get counter.
static bool JACOUSTICS::operator== ( const JCounter first,
const JCounter second 
)
inlinestatic

Equals operator for two counters.

Parameters
firstfirst counter
secondsecond counter
Returns
true if first counter equal to second; else false

Definition at line 78 of file JAcoustics/JCounter.hh.

79  {
80  return first.getCounter() == second.getCounter();
81  }
int getCounter() const
Get counter.
bool JACOUSTICS::operator< ( const JEvent first,
const JEvent second 
)
inline

Less than operator for acoustics events.

The less than operator is applied to the first hit in the events.
If there are no hits in either event, the counter of the events is used.

Parameters
firstfirst event
secondsecond event
Returns
true if first event earliear than second; else false

Definition at line 259 of file JAcoustics/JEvent.hh.

260  {
261  if (!first.empty() && !second.empty())
262  return first.begin()->getToE() < second.begin()->getToE();
263  else
264  return first.getCounter() < second.getCounter();
265  }
int getCounter() const
Get counter.
double JACOUSTICS::getQuality ( const double  chi2,
const int  NDF 
)
inline

Get quality of fit.


The larger the quality, the better the fit.

Parameters
chi2chi2
NDFnumber of degrees of freedom
Returns
quality

Definition at line 29 of file JAcoustics/JEvtToolkit.hh.

30  {
31  return NDF - 0.25 * chi2 / NDF;
32  }
template<class T >
size_t JACOUSTICS::getNumberOfEmitters ( T  __begin,
T  __end 
)
inline

Get number of emitters.

Parameters
__beginbegin of events
__endend of events
Returns
number of emitters

Definition at line 43 of file JAcoustics/JEvtToolkit.hh.

44  {
45  std::set<int> buffer;
46 
47  for (T i = __begin; i != __end; ++i) {
48  if (!i->empty()) {
49  buffer.insert(i->getID());
50  }
51  }
52 
53  return buffer.size();
54  }
do set_variable OUTPUT_DIRECTORY $WORKDIR T
JModel JACOUSTICS::getModel ( const JEvt evt)
inline

Get model.

Parameters
evtevent
Returns
model

Definition at line 63 of file JAcoustics/JEvtToolkit.hh.

64  {
65  JModel model;
66 
67  for (JEvt::const_iterator i = evt.begin(); i != evt.end(); ++i) {
68  model.string[i->id] = JMODEL::JString(i->tx, i->ty);
69  }
70 
71  return model;
72  }
Model for fit to acoustics data.
JACOUSTICS::JModel::string_type string
JEvt JACOUSTICS::getEvt ( const JHead header,
const JModel model 
)
inline

Get event.

Parameters
headerheader
modelmodel
Returns
event

Definition at line 82 of file JAcoustics/JEvtToolkit.hh.

84  {
85  JEvt evt(header);
86 
87  for (JModel::string_type::const_iterator i = model.string.begin(); i != model.string.end(); ++i) {
88  evt.push_back(JFit(i->first,
89  i->second.tx,
90  i->second.ty));
91  }
92 
93  return evt;
94  }
Acoustic event fit.
JACOUSTICS::JModel::string_type string
JTreeParameters JACOUSTICS::getTreeParameters ( const JType< JEvent > &  type)
inline
Parameters
typedata type
Returns
TTree parameters

Definition at line 31 of file JAcoustics/JSupport.hh.

32  {
33  return JTreeParameters("ACOUSTICS", "acoustics_event", "", 2, 65536, 2);
34  }
Data structure for TTree parameters.
JTreeParameters JACOUSTICS::getTreeParameters ( const JType< JEvt > &  type)
inline
Parameters
typedata type
Returns
TTree parameters

Definition at line 40 of file JAcoustics/JSupport.hh.

41  {
42  return JTreeParameters("ACOUSTICS_FIT", "acoustics_fit", "", 2, 65536, 2);
43  }
Data structure for TTree parameters.
static bool JACOUSTICS::operator< ( const JTransmission first,
const JTransmission second 
)
inlinestatic

Less-than operator for two transmissions.

The less-than operator is first applied to the time-of-emission and then to the identifier.

Parameters
firstfirst transmission
secondsecond transmission
Returns
true if first transmission earlier than second; else false

Definition at line 220 of file JTransmission.hh.

221  {
222  if (first.getToE() == second.getToE())
223  return first.getID() < second.getID();
224  else
225  return first.getToE() < second.getToE();
226  }
double getToE() const
Get estimated time of emission.
int getID() const
Get identifier.
static bool JACOUSTICS::operator== ( const JTransmission first,
const JTransmission second 
)
inlinestatic

Equals operator for two transmissions.

The equal operator is applied to the time-of-emission and the identifier.

Parameters
firstfirst transmission
secondsecond transmission
Returns
true if first transmission equal to second; else false

Definition at line 238 of file JTransmission.hh.

239  {
240  return (first.getID() == second.getID() &&
241  first.getToE() == second.getToE());
242  }
double getToE() const
Get estimated time of emission.
int getID() const
Get identifier.

Variable Documentation

const double JACOUSTICS::TOAMIN_S = 0.0000000
static

Minimal allowed time-of-arrival [s].

Definition at line 17 of file JAcousticsSupportkit.hh.

const double JACOUSTICS::TOAMAX_S = 0.6310912
static

Maximal allowed time-of-arrival [s].

Definition at line 18 of file JAcousticsSupportkit.hh.

JEmitterID JACOUSTICS::getEmitterID
static

Function object for emitter identification.

Definition at line 119 of file JEmitterID.hh.

JDetectorMechanics JACOUSTICS::getMechanics
static

Function object to get string mechanics.

Definition at line 243 of file JMechanics.hh.

const JSoundVelocity JACOUSTICS::getSoundVelocity(1541.0,-17.0e-3,-2000.0)
static

Function object for velocity of sound.