Jpp
18.0.1-rc.2
the software that should make you happy
|
Data structure for a composite optical module. More...
#include <JModule.hh>
Public Member Functions | |
JModule () | |
Default constructor. More... | |
JModule (const int id, const JLocation &location) | |
Constructor. More... | |
const JPMT & | getPMT (const int index) const |
Get PMT. More... | |
JPMT & | getPMT (const int index) |
Get PMT. More... | |
void | setPMT (const int index, const JPMT &pmt) |
Set PMT. More... | |
JVector3D | getCenter () const |
Get center of module based on crossing point of PMT axes. More... | |
void | compile () |
Compile module data. More... | |
void | rotate (const JRotation3D &R) |
Rotate module. More... | |
void | rotate_back (const JRotation3D &R) |
Rotate back module. More... | |
void | transform (const JRotation3D &R, const JVector3D &pos) |
Transformation of geometry (see method JGEOMETRY3D::JPosition3D::transform(const JRotation3D&, const JVector3D&)). More... | |
void | transform (const JTransformation3D &T) |
Transformation of geometry. More... | |
void | rotate (const JQuaternion3D &Q) |
Rotate module. More... | |
void | rotate_back (const JQuaternion3D &Q) |
Rotate back module. More... | |
JModule & | set (const JVector3D &pos) |
Set position. More... | |
JModule & | add (const JVector3D &pos) |
Add position. More... | |
JModule & | sub (const JVector3D &pos) |
Subtract position. More... | |
JModule & | set (const double t0) |
Set time offset. More... | |
JModule & | add (const double t0) |
Add time offset. More... | |
JModule & | sub (const double t0) |
Subtract time offset. More... | |
JModule & | operator+= (const JVector3D &pos) |
Add position. More... | |
JModule & | operator-= (const JVector3D &pos) |
Subtract position. More... | |
int | getID () const |
Get identifier. More... | |
int & | getID () |
Get identifier. More... | |
void | setID (const int id) |
Set identifier. More... | |
bool | less (const JObjectID &object) const |
Less than method. More... | |
bool | less (const int id) const |
Less than method. More... | |
bool | more (const int id) const |
More than method. More... | |
const JLocation & | getLocation () const |
Get location. More... | |
JLocation & | getLocation () |
Get location. More... | |
void | setLocation (const JLocation &location) |
Set location. More... | |
std::string | toString () const |
Convert module location to string. More... | |
std::string | toString (const std::string &fmt, const std::string target="%") const |
Convert module loation to string. More... | |
int | getString () const |
Get string number. More... | |
int | getFloor () const |
Get floor number. More... | |
bool | less (const JLocation &location) const |
Less than method. More... | |
const JPosition3D & | getPosition () const |
Get position. More... | |
JPosition3D & | getPosition () |
Get position. More... | |
void | setPosition (const JVector3D &pos) |
Set position. More... | |
operator JAngle3D () const | |
Type conversion operator. More... | |
operator JVersor3D () const | |
Type conversion operator. More... | |
JPosition3D & | rotate (const JRotation3X &R) |
Rotate around X-axis. More... | |
JPosition3D & | rotate (const JRotation3Y &R) |
Rotate around Y-axis. More... | |
JPosition3D & | rotate (const JRotation3Z &R) |
Rotate around Z-axis. More... | |
JPosition3D & | rotate_back (const JRotation3X &R) |
Rotate back around X-axis. More... | |
JPosition3D & | rotate_back (const JRotation3Y &R) |
Rotate back around Y-axis. More... | |
JPosition3D & | rotate_back (const JRotation3Z &R) |
Rotate back around Z-axis. More... | |
JVector3D & | transform (const JMatrix3D &T) |
Transform. More... | |
void | transform_back (const JRotation3D &R, const JVector3D &pos) |
Transform back position. More... | |
double | getDot (const JAngle3D &angle) const |
Get dot product. More... | |
double | getDot (const JVersor3D &dir) const |
Get dot product. More... | |
double | getDot (const JVersor3Z &dir) const |
Get dot product. More... | |
double | getDot (const JVector3D &vector) const |
Get dot product. More... | |
operator JVector2D () const | |
Type conversion operator. More... | |
double | getX () const |
Get x position. More... | |
double | getY () const |
Get y position. More... | |
double | getZ () const |
Get z position. More... | |
JVector3D & | negate () |
Negate vector. More... | |
JVector3D & | mul (const double factor) |
Scale vector. More... | |
JFirst_t & | mul (const JSecond_t &object) |
Multiply with object. More... | |
JVector3D & | div (const double factor) |
Scale vector. More... | |
bool | equals (const JVector3D &vector, const double precision=std::numeric_limits< double >::min()) const |
Check equality. More... | |
double | getLengthSquared () const |
Get length squared. More... | |
double | getLength () const |
Get length. More... | |
double | getDistanceSquared (const JVector3D &pos) const |
Get squared of distance to point. More... | |
double | getDistance (const JVector3D &pos) const |
Get distance to point. More... | |
JVector3D & | getCross (const JVector3D &first, const JVector3D &second) |
Get cross product. More... | |
const JQuaternion3D & | getQuaternion () const |
Get quaternion. More... | |
JQuaternion3D & | getQuaternion () |
Get quaternion. More... | |
void | setQuaternion (const JQuaternion3D &quaternion) |
Set quaternion. More... | |
operator JVector3D () const | |
Type conversion operator. More... | |
operator JVersor3D () const | |
Type conversion operator. More... | |
double | getAngle () const |
Get rotation angle. More... | |
double | getA () const |
Get a value. More... | |
double | getB () const |
Get b value. More... | |
double | getC () const |
Get c value. More... | |
double | getD () const |
Get d value. More... | |
JQuaternion3D & | setIdentity () |
Set to identity quaternion. More... | |
JQuaternion3D & | conjugate () |
Conjugate quaternion. More... | |
JQuaternion3D & | negate () |
Negate quaternion. More... | |
JQuaternion3D & | add (const JQuaternion3D &quaternion) |
Add quaternion. More... | |
JQuaternion3D & | sub (const JQuaternion3D &quaternion) |
Subtract quaternion. More... | |
JQuaternion3D & | mul (const double factor) |
Scale quaternion. More... | |
JQuaternion3D & | mul (const JQuaternion3D &first, const JQuaternion3X &second) |
Quaternion multiplication. More... | |
JQuaternion3D & | mul (const JQuaternion3D &first, const JQuaternion3Y &second) |
Quaternion multiplication. More... | |
JQuaternion3D & | mul (const JQuaternion3D &first, const JQuaternion3Z &second) |
Quaternion multiplication. More... | |
JQuaternion3D & | mul (const JQuaternion3D &first, const JQuaternion3D &second) |
Quaternion multiplication. More... | |
JQuaternion3D & | mul (const JQuaternion3X &qx, const JQuaternion3Y &qy, const JQuaternion3Z &qz) |
Quaternion multiplication. More... | |
JFirst_t & | mul (const JSecond_t &object) |
Multiply with object. More... | |
JQuaternion3D & | div (const double factor) |
Scale quaternion. More... | |
void | rotate (double &__x, double &__y, double &__z) const |
Rotate. More... | |
void | rotate_back (double &__x, double &__y, double &__z) const |
Rotate back. More... | |
bool | equals (const JQuaternion3D &quaternion, const double precision=std::numeric_limits< double >::min()) const |
Check equality. More... | |
bool | isIdentity (const double precision=std::numeric_limits< double >::min()) const |
Test identity. More... | |
double | getLengthSquared () const |
Get length squared. More... | |
double | getLength () const |
Get length. More... | |
double | getDistanceSquared (const JQuaternion3D &quaternion) const |
Get squared of distance to quaternion. More... | |
double | getDistance (const JQuaternion3D &quaternion) const |
Get distance to quaternion. More... | |
double | getDot (const JQuaternion3D &quaternion) const |
Get dot product. More... | |
JQuaternion3D | getConjugate () const |
Get conjugate of this quaternion. More... | |
JQuaternion3D & | normalise () |
Normalise quaternion. More... | |
JQuaternion3D & | pow (const double y) |
Raise quaternion to given power. More... | |
JQuaternion3D & | interpolate (const JQuaternion3D &object, const double alpha) |
Interpolation between quaternions. More... | |
const JCalibration & | getCalibration () const |
Get calibration. More... | |
JCalibration & | getCalibration () |
Get calibration. More... | |
void | setCalibration (const JCalibration &cal) |
Set calibration. More... | |
double | getT0 () const |
Get time offset. More... | |
void | setT0 (const double t0) |
Set time offset. More... | |
void | addT0 (const double t0) |
Add time offset. More... | |
void | subT0 (const double t0) |
Subtract time offset. More... | |
int | getStatus () const |
Get status. More... | |
JStatus & | getStatus () |
Get status. More... | |
int | getStatus (const int mask) const |
Get status. More... | |
void | setStatus (const JStatus &status) |
Set status. More... | |
bool | equals (const JStatus &status) const |
Equal method. More... | |
bool | has (const int bit) const |
Test PMT status. More... | |
void | set (const int bit) |
Set PMT status. More... | |
void | reset (const int bit) |
Reset PMT status. More... | |
Static Public Member Functions | |
static JDetectorVersion & | getVersion () |
Get detector version. More... | |
static void | setVersion (const JVersion &version) |
Set detector version. More... | |
static bool | compare (const JModule &first, const JModule &second, const double precision=1.0e-3) |
Compare modules. More... | |
static const JQuaternion3D & | getIdentity () |
Get identity quaternion. More... | |
Protected Attributes | |
int | __id |
int | string |
int | floor |
double | __x |
double | __y |
double | __z |
double | __a |
double | __b |
double | __c |
double | __d |
double | t0 |
int | status |
Friends | |
std::istream & | operator>> (std::istream &in, JModule &module) |
Read module from input. More... | |
std::ostream & | operator<< (std::ostream &out, const JModule &module) |
Write module to output. More... | |
JReader & | operator>> (JReader &in, JModule &module) |
Read module from input. More... | |
JWriter & | operator<< (JWriter &out, const JModule &module) |
Write module to output. More... | |
Data structure for a composite optical module.
A module consists of a set of PMTs. A JPMT object is used for each PMT.
The index of the PMT in the module corresponds to the readout channel (TDC).
The quaternion data and time offset correspond to the calibration of the compass and piezo sensor inside the module, respectively.
There are no PMTs and piezo sensor in the base module. The time offset then corresponds to the hydrophone. Note that the positions of the PMTs are absolute in space (i.e. not relative to the position of the module).
The I/O of the position, quaternion data and time offset of the module depends on the detector version.
The member method JModule::compile is used to set the position, quaternion data and time offset for detector versions for which these are not defined.
In this, the position of the module is determined from the intersection point of the PMT axes.
Note finally that the positions of the reference modules may not exactly be at the origin due to the finite accuracy of the PMT axes.
Definition at line 68 of file JModule.hh.
|
inline |
Default constructor.
Definition at line 86 of file JModule.hh.
|
inline |
Constructor.
id | identifier |
location | location |
Definition at line 103 of file JModule.hh.
|
inlinestatic |
|
inlinestatic |
Set detector version.
version | version |
Definition at line 131 of file JModule.hh.
|
inlinestatic |
Compare modules.
The comparison only covers the orientations of the modules.
first | first module |
second | second module |
precision | precision |
Definition at line 147 of file JModule.hh.
|
inline |
Get PMT.
index | readout channel (TDC) |
Definition at line 173 of file JModule.hh.
|
inline |
Get PMT.
index | readout channel (TDC) |
Definition at line 185 of file JModule.hh.
|
inline |
|
inline |
Get center of module based on crossing point of PMT axes.
This method perform a fit of the crossing point of the PMT axes.
A general purpose implementation of such a fit is available in JFIT::JEstimator<JPoint3D>.
Definition at line 215 of file JModule.hh.
|
inline |
Compile module data.
For detector versions before JDetectorVersion::V4, the position, quaternion data and time offset of the module should be set.
The position is set to the intersection point of the PMT axes (or their average position if this is not possible).
The quaternion data are maintained.
For an optical module (i.e. floor > 0), the time offset is set to the average time offset of the PMTs and for a base module (i.e. floor = 0), the time offset is set to zero.
These time offsets should be corrected for delay in the piezo sensor and hydrophone, respectively.
Definition at line 282 of file JModule.hh.
|
inline |
Rotate module.
R | rotation matrix |
Definition at line 315 of file JModule.hh.
|
inline |
Rotate back module.
R | rotation matrix |
Definition at line 330 of file JModule.hh.
|
inline |
Transformation of geometry (see method JGEOMETRY3D::JPosition3D::transform(const JRotation3D&, const JVector3D&)).
R | rotation matrix |
pos | position of origin (after rotation) |
Definition at line 346 of file JModule.hh.
|
inline |
Transformation of geometry.
T | transformation |
Definition at line 362 of file JModule.hh.
|
inline |
Rotate module.
Q | quaternion |
Definition at line 377 of file JModule.hh.
|
inline |
Rotate back module.
Q | quaternion |
Definition at line 392 of file JModule.hh.
Set position.
pos | position |
Definition at line 408 of file JModule.hh.
Add position.
pos | position |
Definition at line 420 of file JModule.hh.
Subtract position.
pos | position |
Definition at line 438 of file JModule.hh.
|
inline |
Set time offset.
t0 | time offset [ns] |
Definition at line 456 of file JModule.hh.
|
inline |
Add time offset.
t0 | time offset [ns] |
Definition at line 472 of file JModule.hh.
|
inline |
Subtract time offset.
t0 | time offset [ns] |
Definition at line 488 of file JModule.hh.
Subtract position.
pos | position |
Definition at line 516 of file JModule.hh.
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
Less than method.
object | object identifier |
Definition at line 84 of file JObjectID.hh.
|
inlineinherited |
Less than method.
id | identifier |
Definition at line 96 of file JObjectID.hh.
|
inlineinherited |
More than method.
id | identifier |
Definition at line 108 of file JObjectID.hh.
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
Convert module location to string.
Definition at line 102 of file JLocation.hh.
|
inlineinherited |
Convert module loation to string.
The targets target
in the format string fmt
are consecutively replaced by floor
and string
.
fmt | format |
target | target |
Definition at line 118 of file JLocation.hh.
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
Less than method.
location | module location |
Definition at line 157 of file JLocation.hh.
|
inlineinherited |
Get position.
Definition at line 130 of file JPosition3D.hh.
|
inlineinherited |
Get position.
Definition at line 141 of file JPosition3D.hh.
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
Type conversion operator.
Definition at line 174 of file JPosition3D.hh.
|
inlineinherited |
Rotate around X-axis.
R | rotation matrix |
Definition at line 214 of file JPosition3D.hh.
|
inlineinherited |
Rotate around Y-axis.
R | rotation matrix |
Definition at line 242 of file JPosition3D.hh.
|
inlineinherited |
Rotate around Z-axis.
R | rotation matrix |
Definition at line 270 of file JPosition3D.hh.
|
inlineinherited |
Rotate back around X-axis.
R | rotation matrix |
Definition at line 228 of file JPosition3D.hh.
|
inlineinherited |
Rotate back around Y-axis.
R | rotation matrix |
Definition at line 256 of file JPosition3D.hh.
|
inlineinherited |
Rotate back around Z-axis.
R | rotation matrix |
Definition at line 284 of file JPosition3D.hh.
|
inlineinherited |
Transform back position.
The final position is obtained as follows:
R | rotation matrix |
pos | position of origin (before rotation) |
Definition at line 359 of file JPosition3D.hh.
|
inlineinherited |
Get dot product.
angle | angle |
Definition at line 378 of file JPosition3D.hh.
|
inlineinherited |
Get dot product.
dir | direction |
Definition at line 393 of file JPosition3D.hh.
|
inlineinherited |
Get dot product.
dir | direction |
Definition at line 408 of file JPosition3D.hh.
|
inlineinherited |
Get dot product.
vector | vector |
Definition at line 282 of file JVector3D.hh.
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
Scale vector.
factor | multiplication factor |
Definition at line 174 of file JVector3D.hh.
|
inlineinherited |
|
inlineinherited |
Scale vector.
factor | division factor |
Definition at line 190 of file JVector3D.hh.
|
inlineinherited |
Check equality.
vector | vector |
precision | precision |
Definition at line 221 of file JVector3D.hh.
|
inlineinherited |
|
inlineinherited |
Get length.
Definition at line 246 of file JVector3D.hh.
|
inlineinherited |
Get squared of distance to point.
pos | position |
Definition at line 258 of file JVector3D.hh.
|
inlineinherited |
Get distance to point.
pos | position |
Definition at line 270 of file JVector3D.hh.
|
inlineinherited |
Get cross product.
Note that this vector should not overlap with the first or second vector,
first | first vector |
second | second vector |
Definition at line 299 of file JVector3D.hh.
|
inlinestaticinherited |
Get identity quaternion.
Definition at line 463 of file JQuaternion3D.hh.
|
inlineinherited |
Get quaternion.
Definition at line 476 of file JQuaternion3D.hh.
|
inlineinherited |
Get quaternion.
Definition at line 487 of file JQuaternion3D.hh.
|
inlineinherited |
Set quaternion.
quaternion | quaternion |
Definition at line 498 of file JQuaternion3D.hh.
|
inlineinherited |
|
inlineinherited |
Type conversion operator.
Definition at line 520 of file JQuaternion3D.hh.
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
Add quaternion.
quaternion | quaternion |
Definition at line 637 of file JQuaternion3D.hh.
|
inlineinherited |
Subtract quaternion.
quaternion | quaternion |
Definition at line 654 of file JQuaternion3D.hh.
|
inlineinherited |
Scale quaternion.
factor | multiplication factor |
Definition at line 671 of file JQuaternion3D.hh.
|
inlineinherited |
Quaternion multiplication.
This method evaluates the Hamilton product (also called cross product).
first | first quaternion |
second | second quaternion |
Definition at line 708 of file JQuaternion3D.hh.
|
inlineinherited |
Quaternion multiplication.
This method evaluates the Hamilton product (or cross product).
first | first quaternion |
second | second quaternion |
Definition at line 728 of file JQuaternion3D.hh.
|
inlineinherited |
Quaternion multiplication.
This method evaluates the Hamilton product (or cross product).
first | first quaternion |
second | second quaternion |
Definition at line 749 of file JQuaternion3D.hh.
|
inlineinherited |
Quaternion multiplication.
This method evaluates the Hamilton product (or cross product).
first | first quaternion |
second | second quaternion |
Definition at line 770 of file JQuaternion3D.hh.
|
inlineinherited |
Quaternion multiplication.
qx | rotation around x-axis |
qy | rotation around y-axis |
qz | rotation around x-axis |
Definition at line 790 of file JQuaternion3D.hh.
|
inlineinherited |
|
inlineinherited |
Scale quaternion.
factor | division factor |
Definition at line 688 of file JQuaternion3D.hh.
|
inlineinherited |
Rotate.
__x | x value |
__y | y value |
__z | z value |
Definition at line 805 of file JQuaternion3D.hh.
|
inlineinherited |
Rotate back.
__x | x value |
__y | y value |
__z | z value |
Definition at line 824 of file JQuaternion3D.hh.
|
inlineinherited |
Check equality.
quaternion | quaternion |
precision | numerical precision |
Definition at line 843 of file JQuaternion3D.hh.
|
inlineinherited |
Test identity.
precision | precision |
Definition at line 859 of file JQuaternion3D.hh.
|
inlineinherited |
|
inlineinherited |
Get length.
Definition at line 897 of file JQuaternion3D.hh.
|
inlineinherited |
Get squared of distance to quaternion.
quaternion | quaternion |
Definition at line 909 of file JQuaternion3D.hh.
|
inlineinherited |
Get distance to quaternion.
quaternion | quaternion |
Definition at line 921 of file JQuaternion3D.hh.
|
inlineinherited |
Get dot product.
quaternion | quaternion |
Definition at line 933 of file JQuaternion3D.hh.
|
inlineinherited |
Get conjugate of this quaternion.
Definition at line 948 of file JQuaternion3D.hh.
|
inlineinherited |
Normalise quaternion.
Definition at line 959 of file JQuaternion3D.hh.
|
inlineinherited |
Raise quaternion to given power.
y | power |
Definition at line 977 of file JQuaternion3D.hh.
|
inlineinherited |
Interpolation between quaternions.
The result is equal to *this = (1 - alpha) * (*this) + (alpha) * (object)
.
object | object |
alpha | interpolation factor [0, 1] |
Definition at line 1004 of file JQuaternion3D.hh.
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
Set time offset.
t0 | time offset [ns] |
Definition at line 111 of file JDetector/JCalibration.hh.
|
inlineinherited |
Add time offset.
t0 | time offset [ns] |
Definition at line 122 of file JDetector/JCalibration.hh.
|
inlineinherited |
Subtract time offset.
t0 | time offset [ns] |
Definition at line 133 of file JDetector/JCalibration.hh.
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
Equal method.
status | status |
Definition at line 109 of file JStatus.hh.
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
|
friend |
Read module from input.
in | input stream |
module | module |
Definition at line 529 of file JModule.hh.
|
friend |
Write module to output.
out | output stream |
module | module |
Definition at line 569 of file JModule.hh.
Read module from input.
in | reader |
module | module |
Definition at line 609 of file JModule.hh.
Write module to output.
out | writer |
module | module |
Definition at line 651 of file JModule.hh.
|
protectedinherited |
Definition at line 140 of file JObjectID.hh.
|
protectedinherited |
Definition at line 234 of file JLocation.hh.
|
protectedinherited |
Definition at line 235 of file JLocation.hh.
|
protectedinherited |
Definition at line 310 of file JVector3D.hh.
|
protectedinherited |
Definition at line 311 of file JVector3D.hh.
|
protectedinherited |
Definition at line 312 of file JVector3D.hh.
|
protectedinherited |
Definition at line 1117 of file JQuaternion3D.hh.
|
protectedinherited |
Definition at line 1118 of file JQuaternion3D.hh.
|
protectedinherited |
Definition at line 1119 of file JQuaternion3D.hh.
|
protectedinherited |
Definition at line 1120 of file JQuaternion3D.hh.
|
protectedinherited |
Definition at line 202 of file JDetector/JCalibration.hh.
|
protectedinherited |
Definition at line 200 of file JStatus.hh.