Jpp  master_rocky
the software that should make you happy
JSuperEvtToolkit.hh
Go to the documentation of this file.
1 #ifndef __JACOUSTICS__JSUPEREVTTOOLKIT__
2 #define __JACOUSTICS__JSUPEREVTTOOLKIT__
3 
4 #include "JAcoustics/JModel.hh"
5 #include "JAcoustics/JEvt.hh"
8 
9 
10 /**
11  * \file
12  *
13  * Acoustic super event fit toolkit.
14  * \author mdejong
15  */
16 namespace JACOUSTICS {}
17 namespace JPP { using namespace JACOUSTICS; }
18 
19 namespace JACOUSTICS {
20 
21 
22  /**
23  * Get model of detector.
24  *
25  * \param evt super event
26  */
27  template<>
28  inline
30  getModel(static_cast<const JEvt&>(evt))
31  {
32  for (JSuperEvt::tx_type::const_iterator i = evt.tx.begin(); i != evt.tx.end(); ++i) {
33  this->emission[JEKey(i->id,i->counter)] = JMODEL::JEmission(i->toe);
34  }
35  }
36 
37 
38  /**
39  * Auxiliary data structure to convert model to super event.
40  */
41  struct getSuperEvt :
42  public JSuperEvt
43  {
44  /**
45  * Constructor.
46  *
47  * \param header header
48  * \param model model
49  * \param begin begin of hit data
50  * \param end end of hit data
51  */
52  template<class T>
53  getSuperEvt(const JHead& header,
54  const JModel& model,
55  T begin,
56  T end) :
57  JSuperEvt(getEvt(header, model))
58  {
59  for (JModel::emission_type::const_iterator i = model.emission.begin(); i != model.emission.end(); ++i) {
60  this->tx.push_back(JSuperEvt::tx_t(i->first.getID(), i->first.getCounter(), i->second.t1));
61  }
62 
63  for (T i = begin; i != end; ++i) {
64  this->rx.push_back(JSuperEvt::rx_t(i->getID(), i->getCounter(), i->getString(), i->getFloor(), i->getValue(), i->getWeight()));
65  }
66  }
67  };
68 }
69 
70 #endif
Acoustic event fit toolkit.
Acoustic event fit.
Model for fit to acoutsics data.
Acoustic event fit.
Auxiliary classes and methods for acoustic position calibration.
This name space includes all other name spaces (except KM3NETDAQ, KM3NET and ANTARES).
Emitter key.
Definition: JEKey.hh:36
Acoustic event fit.
Acoustic event header.
Model for fit to acoustics data.
JACOUSTICS::JModel::emission_type emission
Acoustics transmission.
Definition: JSuperEvt.hh:118
Acoustics emission.
Definition: JSuperEvt.hh:61
Acoustic super event fit.
Definition: JSuperEvt.hh:39
Auxiliary data structure to convert model to event.
Auxiliary data structure to convert event to model.
getModel(const T &object)
Constructor.
Auxiliary data structure to convert model to super event.
getSuperEvt(const JHead &header, const JModel &model, T begin, T end)
Constructor.
container_type::const_iterator const_iterator
Definition: JHashMap.hh:86