Jpp - the software that should make you happy
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
JModule.hh
Go to the documentation of this file.
1 #ifndef __JDETECTOR__JMODULE__
2 #define __JDETECTOR__JMODULE__
3 
4 #include <istream>
5 #include <ostream>
6 #include <vector>
7 
9 #include "JDetector/JLocation.hh"
10 #include "JDetector/JPMT.hh"
12 
17 
18 #include "JLang/JException.hh"
19 #include "JMath/JMatrix3S.hh"
20 #include "JMath/JMath.hh"
21 
22 #include "JIO/JSerialisable.hh"
23 
24 
25 /**
26  * \file
27  *
28  * Data structure for a composite optical module.
29  * \author mdejong
30  */
31 namespace JDETECTOR {}
32 namespace JPP { using namespace JDETECTOR; }
33 
34 namespace JDETECTOR {
35 
44  using JIO::JReader;
45  using JIO::JWriter;
46 
47 
48  /**
49  * Data structure for a composite optical module.
50  *
51  * A module consists of a set of JPMT objects.\n
52  * The index of the PMT object in the module container corresponds to the readout channel (TDC).\n
53  * The positions of the PMTs are absolute in space (i.e.\ not relative to the position of the module).\n
54  * The I/O of the position and time offset of the module depends on the detector version.\n
55  * The member method JModule::compile is used to accordingly set values.
56  */
57  class JModule :
58  public JModuleIdentifier,
59  public JLocation,
60  public JPosition3D,
61  public JQuaternion3D,
62  public JCalibration,
63  public std::vector<JPMT>
64  {
65  public:
66  /**
67  * Default constructor.
68  */
69  JModule() :
71  JLocation(),
72  JPosition3D(),
73  JQuaternion3D(),
74  JCalibration(),
75  std::vector<JPMT>()
76  {}
77 
78 
79  /**
80  * Constructor.
81  *
82  * \param id identifier
83  * \param location location
84  */
85  JModule(const int id,
86  const JLocation& location) :
88  JLocation(location),
89  JPosition3D(),
90  JQuaternion3D(),
91  JCalibration(),
92  std::vector<JPMT>()
93  {}
94 
95 
96  /**
97  * Get reference to unique instance of this class object.
98  *
99  * This method returns a module with the standard configuration of PMTs.
100  *
101  * \return reference to this class object
102  */
103  static const JModule& getInstance()
104  {
105  static JModule module;
106 
107  if (module.empty()) {
108 
109  module.push_back(JPMT( 1, JAxis3D(JVector3D(+0.000, +0.000, -0.200), JVersor3D(+0.000, +0.000, -1.000))));
110 
111  module.push_back(JPMT( 2, JAxis3D(JVector3D(+0.000, +0.105, -0.170), JVersor3D(+0.000, +0.527, -0.850))));
112  module.push_back(JPMT( 3, JAxis3D(JVector3D(+0.091, +0.053, -0.170), JVersor3D(+0.456, +0.263, -0.850))));
113  module.push_back(JPMT( 4, JAxis3D(JVector3D(+0.091, -0.053, -0.170), JVersor3D(+0.456, -0.263, -0.850))));
114  module.push_back(JPMT( 5, JAxis3D(JVector3D(+0.000, -0.105, -0.170), JVersor3D(+0.000, -0.527, -0.850))));
115  module.push_back(JPMT( 6, JAxis3D(JVector3D(-0.091, -0.053, -0.170), JVersor3D(-0.456, -0.263, -0.850))));
116  module.push_back(JPMT( 7, JAxis3D(JVector3D(-0.091, +0.053, -0.170), JVersor3D(-0.456, +0.263, -0.850))));
117 
118  module.push_back(JPMT( 8, JAxis3D(JVector3D(+0.083, +0.144, -0.111), JVersor3D(+0.416, +0.720, -0.555))));
119  module.push_back(JPMT( 9, JAxis3D(JVector3D(+0.166, +0.000, -0.111), JVersor3D(+0.832, +0.000, -0.555))));
120  module.push_back(JPMT(10, JAxis3D(JVector3D(+0.083, -0.144, -0.111), JVersor3D(+0.416, -0.720, -0.555))));
121  module.push_back(JPMT(11, JAxis3D(JVector3D(-0.083, -0.144, -0.111), JVersor3D(-0.416, -0.720, -0.555))));
122  module.push_back(JPMT(12, JAxis3D(JVector3D(-0.166, +0.000, -0.111), JVersor3D(-0.832, +0.000, -0.555))));
123  module.push_back(JPMT(13, JAxis3D(JVector3D(-0.083, +0.144, -0.111), JVersor3D(-0.416, +0.720, -0.555))));
124 
125  module.push_back(JPMT(14, JAxis3D(JVector3D(+0.000, +0.191, -0.059), JVersor3D(+0.000, +0.955, -0.295))));
126  module.push_back(JPMT(15, JAxis3D(JVector3D(+0.165, +0.096, -0.059), JVersor3D(+0.827, +0.478, -0.295))));
127  module.push_back(JPMT(16, JAxis3D(JVector3D(+0.165, -0.096, -0.059), JVersor3D(+0.827, -0.478, -0.295))));
128  module.push_back(JPMT(17, JAxis3D(JVector3D(+0.000, -0.191, -0.059), JVersor3D(+0.000, -0.955, -0.295))));
129  module.push_back(JPMT(18, JAxis3D(JVector3D(-0.165, -0.096, -0.059), JVersor3D(-0.827, -0.478, -0.295))));
130  module.push_back(JPMT(19, JAxis3D(JVector3D(-0.165, +0.096, -0.059), JVersor3D(-0.827, +0.478, -0.295))));
131 
132  module.push_back(JPMT(20, JAxis3D(JVector3D(+0.096, +0.165, +0.059), JVersor3D(+0.478, +0.827, +0.295))));
133  module.push_back(JPMT(21, JAxis3D(JVector3D(+0.191, +0.000, +0.059), JVersor3D(+0.955, +0.000, +0.295))));
134  module.push_back(JPMT(22, JAxis3D(JVector3D(+0.096, -0.165, +0.059), JVersor3D(+0.478, -0.827, +0.295))));
135  module.push_back(JPMT(23, JAxis3D(JVector3D(-0.096, -0.165, +0.059), JVersor3D(-0.478, -0.827, +0.295))));
136  module.push_back(JPMT(24, JAxis3D(JVector3D(-0.191, +0.000, +0.059), JVersor3D(-0.955, +0.000, +0.295))));
137  module.push_back(JPMT(25, JAxis3D(JVector3D(-0.096, +0.165, +0.059), JVersor3D(-0.478, +0.827, +0.295))));
138 
139  module.push_back(JPMT(26, JAxis3D(JVector3D(+0.000, +0.166, +0.111), JVersor3D(+0.000, +0.832, +0.555))));
140  module.push_back(JPMT(27, JAxis3D(JVector3D(+0.144, +0.083, +0.111), JVersor3D(+0.720, +0.416, +0.555))));
141  module.push_back(JPMT(28, JAxis3D(JVector3D(+0.144, -0.083, +0.111), JVersor3D(+0.720, -0.416, +0.555))));
142  module.push_back(JPMT(29, JAxis3D(JVector3D(+0.000, -0.166, +0.111), JVersor3D(+0.000, -0.832, +0.555))));
143  module.push_back(JPMT(30, JAxis3D(JVector3D(-0.144, -0.083, +0.111), JVersor3D(-0.720, -0.416, +0.555))));
144  module.push_back(JPMT(31, JAxis3D(JVector3D(-0.144, +0.083, +0.111), JVersor3D(-0.720, +0.416, +0.555))));
145 
146  module.compile();
147  }
148 
149  return module;
150  }
151 
152 
153  /**
154  * Get detector version.
155  */
157  {
158  static JDetectorVersion version;
159 
160  return version;
161  }
162 
163 
164  /**
165  * Set detector version.
166  *
167  * \param version version
168  */
169  static void setVersion(const JVersion& version)
170  {
171  getVersion() = JDetectorVersion(version);
172  }
173 
174 
175  /**
176  * Compare modules.
177  *
178  * The comparison only covers the orientations of the modules.
179  *
180  * \param first first module
181  * \param second second module
182  * \param precision precision
183  * \return true if two modules are equal; else false
184  */
185  static inline bool compare(const JModule& first,
186  const JModule& second,
187  const double precision = 1.0e-3)
188  {
189  if (first.size() == second.size()) {
190 
191  for (size_t i = 0; i != first.size(); ++i) {
192  if (first[i].getDirection().getDot(second[i].getDirection()) < 1.0 - precision) {
193  return false;
194  }
195  }
196 
197  return true;
198  }
199 
200  return false;
201  }
202 
203 
204 
205  /**
206  * Get PMT.
207  *
208  * \param index readout channel (TDC)
209  * \return PMT at given index
210  */
211  const JPMT& getPMT(const int index) const
212  {
213  return at(index);
214  }
215 
216 
217  /**
218  * Get PMT.
219  *
220  * \param index readout channel (TDC)
221  * \return PMT at given index
222  */
223  JPMT& getPMT(const int index)
224  {
225  return at(index);
226  }
227 
228 
229  /**
230  * Set PMT.
231  *
232  * \param index readout channel (TDC)
233  * \param pmt PMT
234  */
235  void setPMT(const int index, const JPMT& pmt)
236  {
237  if (index >= (int) size()) {
238  resize(index + 1);
239  }
240 
241  (*this)[index] = pmt;
242  }
243 
244 
245  /**
246  * Get center of module based on crossing point of PMT axes.
247  *
248  * This method perform a fit of the crossing point of the PMT axes.\n
249  * A general purpose implementation of such a fit is available in JFIT::JEstimator<JPoint3D>.
250  *
251  * \return center
252  */
254  {
255  using namespace JPP;
256 
257  if (this->size() > 1u) {
258 
259  double x = 0;
260  double y = 0;
261  double z = 0;
262 
263  JMatrix3S V;
264 
265  for (const_iterator pmt = this->begin(); pmt != this->end(); ++pmt) {
266 
267  const double xx = 1.0 - pmt->getDX() * pmt->getDX();
268  const double yy = 1.0 - pmt->getDY() * pmt->getDY();
269  const double zz = 1.0 - pmt->getDZ() * pmt->getDZ();
270 
271  const double xy = -pmt->getDX() * pmt->getDY();
272  const double xz = -pmt->getDX() * pmt->getDZ();
273  const double yz = -pmt->getDY() * pmt->getDZ();
274 
275  V.a00 += xx;
276  V.a01 += xy;
277  V.a02 += xz;
278 
279  V.a11 += yy;
280  V.a12 += yz;
281 
282  V.a22 += zz;
283 
284  x += xx * pmt->getX() + xy * pmt->getY() + xz * pmt->getZ();
285  y += xy * pmt->getX() + yy * pmt->getY() + yz * pmt->getZ();
286  z += xz * pmt->getX() + yz * pmt->getY() + zz * pmt->getZ();
287  }
288 
289  V.a10 = V.a01;
290  V.a20 = V.a02;
291  V.a21 = V.a12;
292 
293  V.invert();
294 
295  return JVector3D(V.a00 * x + V.a01 * y + V.a02 * z,
296  V.a10 * x + V.a11 * y + V.a12 * z,
297  V.a20 * x + V.a21 * y + V.a22 * z);
298 
299  } else {
300  throw JValueOutOfRange("JModule::getCenter(): Not enough PMTs.");
301  }
302  }
303 
304 
305  /**
306  * Compile module data.
307  *
308  * For detector versions before JDetectorVersion::V4, the position and the time offset of the module are set.\n
309  * The position is set to the intersection point of the PMT axes (or their average position if this is not possible).\n
310  * The time offset of the optical module is set to the average time offset of the PMTs, corrected for known delay of the piezo sensor.\n
311  * The time offset of the base module is set to zero, corrected for the known delay of the hydrophone.
312  */
313  void compile()
314  {
315  using namespace std;
316  using namespace JPP;
317 
318  if (!this->empty()) {
319 
320  JPosition3D& pos = this->getPosition();
321 
322  try {
323  pos = this->getCenter();
324  }
325  catch(const exception&) {
326 
327  pos = JPosition3D(0.0, 0.0, 0.0);
328 
329  for (iterator i = this->begin(); i != this->end(); ++i) {
330  pos.add(i->getPosition());
331  }
332 
333  pos.div(size());
334  }
335  }
336 
337  const double t0 = getAverage(make_array(this->begin(), this->end(), &JModule::getT0), 0.0);
338 
339  if (this->getFloor() == 0)
340  this->setCalibration(t0 - HYDROPHONE_DELAYTIME_US * 1.0e+3);
341  else
342  this->setCalibration(t0 - PIEZO_DELAYTIME_US * 1.0e+3);
343  }
344 
345 
346  /**
347  * Rotate module.
348  *
349  * \param R rotation matrix
350  */
351  void rotate(const JRotation3D& R)
352  {
354 
355  for (iterator i = this->begin(); i != this->end(); ++i) {
356  i->rotate(R);
357  }
358  }
359 
360 
361  /**
362  * Rotate back module.
363  *
364  * \param R rotation matrix
365  */
366  void rotate_back(const JRotation3D& R)
367  {
369 
370  for (iterator i = this->begin(); i != this->end(); ++i) {
371  i->rotate_back(R);
372  }
373  }
374 
375 
376  /**
377  * Transformation of geometry (see method JGEOMETRY3D::JPosition3D::transform(const JRotation3D&, const JVector3D&)).
378  *
379  * \param R rotation matrix
380  * \param pos position of origin (after rotation)
381  */
382  void transform(const JRotation3D& R,
383  const JVector3D& pos)
384  {
385  JPosition3D::transform(R, pos);
386 
387  for (iterator i = this->begin(); i != this->end(); ++i) {
388  i->transform(R, pos);
389  }
390  }
391 
392 
393  /**
394  * Transformation of geometry.
395  *
396  * \param T transformation
397  */
399  {
401 
402  for (iterator i = this->begin(); i != this->end(); ++i) {
403  i->transform(T);
404  }
405  }
406 
407 
408  /**
409  * Rotate module.
410  *
411  * \param Q quaternion
412  */
413  void rotate(const JQuaternion3D& Q)
414  {
416 
417  for (iterator i = this->begin(); i != this->end(); ++i) {
418  i->rotate(Q);
419  }
420  }
421 
422 
423  /**
424  * Rotate back module.
425  *
426  * \param Q quaternion
427  */
428  void rotate_back(const JQuaternion3D& Q)
429  {
431 
432  for (iterator i = this->begin(); i != this->end(); ++i) {
433  i->rotate_back(Q);
434  }
435  }
436 
437 
438  /**
439  * Set position.
440  *
441  * \param pos position
442  * \return this module
443  */
444  JModule& set(const JVector3D& pos)
445  {
446  return add(pos - static_cast<JPosition3D&>(*this));
447  }
448 
449 
450  /**
451  * Add position.
452  *
453  * \param pos position
454  * \return this module
455  */
456  JModule& add(const JVector3D& pos)
457  {
458  for (iterator i = begin(); i != end(); ++i) {
459  i->add(pos);
460  }
461 
462  JPosition3D::add(pos);
463 
464  return *this;
465  }
466 
467 
468  /**
469  * Subtract position.
470  *
471  * \param pos position
472  * \return this module
473  */
474  JModule& sub(const JVector3D& pos)
475  {
476  for (iterator i = begin(); i != end(); ++i) {
477  i->sub(pos);
478  }
479 
480  JPosition3D::sub(pos);
481 
482  return *this;
483  }
484 
485 
486  /**
487  * Set time offset.
488  *
489  * \param t0 time offset [ns]
490  * \return this module
491  */
492  JModule& set(const double t0)
493  {
494  for (iterator i = begin(); i != end(); ++i) {
495  i->setT0(t0);
496  }
497 
498  return *this;
499  }
500 
501 
502  /**
503  * Add time offset.
504  *
505  * \param t0 time offset [ns]
506  * \return this module
507  */
508  JModule& add(const double t0)
509  {
510  for (iterator i = begin(); i != end(); ++i) {
511  i->addT0(t0);
512  }
513 
514  return *this;
515  }
516 
517 
518  /**
519  * Subtract time offset.
520  *
521  * \param t0 time offset [ns]
522  * \return this module
523  */
524  JModule& sub(const double t0)
525  {
526  for (iterator i = begin(); i != end(); ++i) {
527  i->subT0(t0);
528  }
529 
530  return *this;
531  }
532 
533 
534  /**
535  * Add position.
536  *
537  * \param pos position
538  * \return this module
539  */
541  {
542  return this->add(pos);
543  }
544 
545 
546  /**
547  * Subtract position.
548  *
549  * \param pos position
550  * \return this module
551  */
553  {
554  return this->sub(pos);
555  }
556 
557 
558  /**
559  * Read module from input.
560  *
561  * \param in input stream
562  * \param module module
563  * \return input stream
564  */
565  friend inline std::istream& operator>>(std::istream& in, JModule& module)
566  {
567  module = JModule();
568 
569  in >> static_cast<JModuleIdentifier&>(module);
570  in >> static_cast<JLocation&> (module);
571 
573  in >> static_cast<JPosition3D&> (module);
574  in >> static_cast<JQuaternion3D&>(module);
575  in >> static_cast<JCalibration&> (module);
576  }
577 
578  unsigned int n;
579 
580  in >> n;
581 
582  for (JPMT pmt; n != 0 && in >> pmt; --n) {
583  module.push_back(pmt);
584  }
585 
587  module.compile();
588  }
589 
590  return in;
591  }
592 
593 
594  /**
595  * Write module to output.
596  *
597  * \param out output stream
598  * \param module module
599  * \return output stream
600  */
601  friend inline std::ostream& operator<<(std::ostream& out, const JModule& module)
602  {
603  using namespace std;
604 
605  out << setw(10);
606  out << static_cast<const JModuleIdentifier&>(module);
607  out << ' ';
608  out << static_cast<const JLocation&> (module);
609 
611  out << ' ';
612  out << static_cast<const JPosition3D&> (module);
613  out << ' ';
614  out << static_cast<const JQuaternion3D&>(module);
615  out << ' ';
616  out << static_cast<const JCalibration&> (module);
617  }
618 
619  out << ' ' << module.size() << endl;
620 
621  for (const_iterator i = module.begin(); i != module.end(); ++i) {
622  out << ' ' << *i << endl;;
623  }
624 
625  return out;
626  }
627 
628 
629  /**
630  * Read module from input.
631  *
632  * \param in reader
633  * \param module module
634  * \return rrreader
635  */
636  friend inline JReader& operator>>(JReader& in, JModule& module)
637  {
638  module = JModule();
639 
640  in >> static_cast<JModuleIdentifier&>(module);
641  in >> static_cast<JLocation&> (module);
642 
644  in >> static_cast<JPosition3D&> (module);
645  in >> static_cast<JQuaternion3D&>(module);
646  in >> static_cast<JCalibration&> (module);
647  }
648 
649  int n;
650 
651  in >> n;
652 
653  for (JPMT pmt; n != 0; --n) {
654 
655  in >> pmt;
656 
657  module.push_back(pmt);
658  }
659 
661  module.compile();
662  }
663 
664  return in;
665  }
666 
667 
668  /**
669  * Write module to output.
670  *
671  * \param out writer
672  * \param module module
673  * \return writer
674  */
675  friend inline JWriter& operator<<(JWriter& out, const JModule& module)
676  {
677  out << static_cast<const JModuleIdentifier&>(module);
678  out << static_cast<const JLocation&> (module);
679 
681  out << static_cast<const JPosition3D&> (module);
682  out << static_cast<const JQuaternion3D&>(module);
683  out << static_cast<const JCalibration&> (module);
684  }
685 
686  int n = module.size();
687 
688  out << n;
689 
690  for (const_iterator i = module.begin(); i != module.end(); ++i) {
691  out << *i;
692  }
693 
694  return out;
695  }
696  };
697 }
698 
699 #endif
friend JReader & operator>>(JReader &in, JModule &module)
Read module from input.
Definition: JModule.hh:636
Exceptions.
Interface for binary output.
static void setVersion(const JVersion &version)
Set detector version.
Definition: JModule.hh:169
int getFloor() const
Get floor number.
Definition: JLocation.hh:145
Data structure for a composite optical module.
Definition: JModule.hh:57
static const double HYDROPHONE_DELAYTIME_US
Hydrophone delay time [us].
JPosition3D & rotate_back(const JRotation3D &R)
Rotate back.
Definition: JPosition3D.hh:200
JModule & operator-=(const JVector3D &pos)
Subtract position.
Definition: JModule.hh:552
JModule & add(const double t0)
Add time offset.
Definition: JModule.hh:508
Rotation matrix.
Definition: JRotation3D.hh:111
std::iterator_traits< T >::value_type getAverage(T __begin, T __end)
Get average.
Definition: JMath.hh:497
void subT0(const double t0)
Subtract time offset.
Data structure for time calibration.
double getDot(const JAngle3D &angle) const
Get dot product.
void transform(const JRotation3D &R, const JVector3D &pos)
Transform position.
Definition: JPosition3D.hh:331
friend JWriter & operator<<(JWriter &out, const JModule &module)
Write module to output.
Definition: JModule.hh:675
void rotate(const JQuaternion3D &Q)
Rotate module.
Definition: JModule.hh:413
JModule()
Default constructor.
Definition: JModule.hh:69
then echo The file $DIR KM3NeT_00000001_00000000 root already please rename or remove it first
Axis object.
Definition: JAxis3D.hh:38
JModule & sub(const JVector3D &pos)
Subtract position.
Definition: JModule.hh:474
JVector3D & sub(const JVector3D &vector)
Subtract vector.
Definition: JVector3D.hh:158
void transform(const JTransformation3D &T)
Transformation of geometry.
Definition: JModule.hh:398
JDirection3D getDirection(const Vec &dir)
Get direction.
static const double PIEZO_DELAYTIME_US
Piezo delay time [us].
Detector toolkit.
Data structure for vector in three dimensions.
Definition: JVector3D.hh:34
Version with quaternion and time offset per module.
JModule & sub(const double t0)
Subtract time offset.
Definition: JModule.hh:524
Logical location of module.
Definition: JLocation.hh:37
const array_type< JValue_t > & make_array(const JValue_t(&array)[N])
Method to create array of values.
Definition: JVectorize.hh:37
do set_variable OUTPUT_DIRECTORY $WORKDIR T
Data structure for PMT geometry and calibration.
Definition: JPMT.hh:47
void compile()
Compile module data.
Definition: JModule.hh:313
void rotate_back(const JQuaternion3D &Q)
Rotate back module.
Definition: JModule.hh:428
JModule(const int id, const JLocation &location)
Constructor.
Definition: JModule.hh:85
void setPMT(const int index, const JPMT &pmt)
Set PMT.
Definition: JModule.hh:235
void rotate_back(const JRotation3D &R)
Rotate back module.
Definition: JModule.hh:366
JVector3D getCenter() const
Get center of module based on crossing point of PMT axes.
Definition: JModule.hh:253
Interface for binary input.
const JPosition3D & getPosition() const
Get position.
Definition: JPosition3D.hh:130
static const JModule & getInstance()
Get reference to unique instance of this class object.
Definition: JModule.hh:103
const JPMT & getPMT(const int index) const
Get PMT.
Definition: JModule.hh:211
void rotate(const JRotation3D &R)
Rotate module.
Definition: JModule.hh:351
then usage $script[distance] fi case set_variable R
Definition: JDrawLED.sh:40
JModule & operator+=(const JVector3D &pos)
Add position.
Definition: JModule.hh:540
Logical location of module.
static const JGetDetectorVersion getDetectorVersion
Function object to map detector variant to detector version.
const JRotation3D & getRotation() const
Get rotation.
Definition: JRotation3D.hh:272
Data structure for unit quaternion in three dimensions.
static JDetectorVersion & getVersion()
Get detector version.
Definition: JModule.hh:156
friend std::ostream & operator<<(std::ostream &out, const JModule &module)
Write module to output.
Definition: JModule.hh:601
friend std::istream & operator>>(std::istream &in, JModule &module)
Read module from input.
Definition: JModule.hh:565
void setT0(const double t0)
Set time offset.
Data structure for PMT geometry and calibration.
Auxiliary class for object identification.
Definition: JObjectID.hh:22
JPosition3D()
Default constructor.
Definition: JPosition3D.hh:48
void setCalibration(const JCalibration &cal)
Set calibration.
void transform(const JRotation3D &R, const JVector3D &pos)
Transformation of geometry (see method JGEOMETRY3D::JPosition3D::transform(const JRotation3D&amp;, const JVector3D&amp;)).
Definition: JModule.hh:382
alias put_queue eval echo n
Definition: qlib.csh:19
JModule & set(const double t0)
Set time offset.
Definition: JModule.hh:492
JPMT & getPMT(const int index)
Get PMT.
Definition: JModule.hh:223
double getX() const
Get x position.
Definition: JVector3D.hh:94
Base class for data structures with artithmetic capabilities.
void addT0(const double t0)
Add time offset.
Data structure for position in three dimensions.
Definition: JPosition3D.hh:36
Exception for accessing a value in a collection that is outside of its range.
Definition: JException.hh:162
JVector3D & div(const double factor)
Scale vector.
Definition: JVector3D.hh:190
Data structure for normalised vector in three dimensions.
Definition: JVersor3D.hh:26
double u[N+1]
Definition: JPolint.hh:739
Auxiliary class for version identifier.
then fatal Wrong number of arguments fi set_variable DETECTOR $argv[1] set_variable INPUT_FILE $argv[2] eval JPrintDetector a $DETECTOR O IDENTIFIER eval JPrintDetector a $DETECTOR O SUMMARY source JAcoustics sh $DETECTOR_ID CHECK_EXIT_CODE typeset A TRIPODS get_tripods $WORKDIR tripod txt TRIPODS for EMITTER in
Definition: JCanberra.sh:38
JPosition3D & rotate(const JRotation3D &R)
Rotate.
Definition: JPosition3D.hh:186
JModule & set(const JVector3D &pos)
Set position.
Definition: JModule.hh:444
static bool compare(const JModule &first, const JModule &second, const double precision=1.0e-3)
Compare modules.
Definition: JModule.hh:185
version
Definition: JCalibratePMT.sh:7
JVector3D & add(const JVector3D &vector)
Add vector.
Definition: JVector3D.hh:142
JModule & add(const JVector3D &pos)
Add position.
Definition: JModule.hh:456
JVector3D()
Default constructor.
Definition: JVector3D.hh:41
double getT0() const
Get time offset.