Jpp
|
Data structure for a composite optical module. More...
#include <JModule.hh>
Public Member Functions | |
JModule () | |
Default constructor. More... | |
JModule (const int id, const JModuleLocation &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... | |
void | compile () |
Compile position of module from the positions of the PMTs. 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... | |
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 JModuleLocation & | getLocation () const |
Get location. More... | |
JModuleLocation & | getLocation () |
Get location. More... | |
void | setLocation (const JModuleLocation &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 JModuleLocation &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... | |
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... | |
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... | |
JVector3D & | 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 & | cross (const JVector3D &first, const JVector3D &second) |
Get cross product. More... | |
Static Public Member Functions | |
static const JModule & | getInstance () |
Get reference to unique instance of this class object. More... | |
static bool | compare (const JModule &first, const JModule &second, const double precision=1.0e-3) |
Compare modules. More... | |
Protected Attributes | |
int | __id |
int | string |
int | floor |
double | __x |
double | __y |
double | __z |
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 JPMT objects. The index of the PMT object in the module container corresponds to the readout channel (TDC). The positions of the PMTs are absolute in space (i.e. not relative to the position of the module). The position of the module is not subject to I/O but derived from the positions of the PMTs using method compile().
Definition at line 49 of file JModule.hh.
|
inline |
Default constructor.
Definition at line 59 of file JModule.hh.
|
inline |
|
inlinestatic |
Get reference to unique instance of this class object.
This method returns a module with the standard configuration of PMTs.
Definition at line 89 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 |
Compile position of module from the positions of the PMTs.
Definition at line 210 of file JModule.hh.
|
inline |
|
inline |
|
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 261 of file JModule.hh.
|
inline |
|
inline |
|
inline |
Subtract position.
pos | position |
Definition at line 353 of file JModule.hh.
|
inline |
Set time offset.
t0 | time offset [ns] |
Definition at line 371 of file JModule.hh.
|
inline |
Add time offset.
t0 | time offset [ns] |
Definition at line 387 of file JModule.hh.
|
inline |
Subtract time offset.
t0 | time offset [ns] |
Definition at line 403 of file JModule.hh.
Subtract position.
pos | position |
Definition at line 431 of file JModule.hh.
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
Less than method.
object | object identifier |
Definition at line 78 of file JObjectID.hh.
|
inlineinherited |
Less than method.
id | identifier |
Definition at line 90 of file JObjectID.hh.
|
inlineinherited |
More than method.
id | identifier |
Definition at line 102 of file JObjectID.hh.
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
|
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 117 of file JModuleLocation.hh.
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
Less than method.
location | module location |
Definition at line 156 of file JModuleLocation.hh.
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
Rotate around X-axis.
R | rotation matrix |
Definition at line 213 of file JPosition3D.hh.
|
inlineinherited |
Rotate around Y-axis.
R | rotation matrix |
Definition at line 241 of file JPosition3D.hh.
|
inlineinherited |
Rotate around Z-axis.
R | rotation matrix |
Definition at line 269 of file JPosition3D.hh.
|
inlineinherited |
Rotate back around X-axis.
R | rotation matrix |
Definition at line 227 of file JPosition3D.hh.
|
inlineinherited |
Rotate back around Y-axis.
R | rotation matrix |
Definition at line 255 of file JPosition3D.hh.
|
inlineinherited |
Rotate back around Z-axis.
R | rotation matrix |
Definition at line 283 of file JPosition3D.hh.
|
inlineinherited |
|
inlineinherited |
Transform back position.
The final position is obtained as follows:
R | rotation matrix |
pos | position of origin (before rotation) |
Definition at line 358 of file JPosition3D.hh.
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
Get dot product.
vector | vector |
Definition at line 280 of file JVector3D.hh.
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
Scale vector.
factor | multiplication factor |
Definition at line 173 of file JVector3D.hh.
|
inlineinherited |
Multiply with object.
object | object |
Definition at line 273 of file JMath.hh.
|
inlineinherited |
Scale vector.
factor | division factor |
Definition at line 189 of file JVector3D.hh.
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
Get squared of distance to point.
pos | position |
Definition at line 256 of file JVector3D.hh.
|
inlineinherited |
Get distance to point.
pos | position |
Definition at line 268 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 297 of file JVector3D.hh.
|
friend |
Read module from input.
in | input stream |
module | module |
Definition at line 444 of file JModule.hh.
|
friend |
Write module to output.
out | output stream |
module | module |
Definition at line 472 of file JModule.hh.
Read module from input.
in | reader |
module | module |
Definition at line 497 of file JModule.hh.
Write module to output.
out | writer |
module | module |
Definition at line 528 of file JModule.hh.
|
protectedinherited |
Definition at line 160 of file JObjectID.hh.
|
protectedinherited |
Definition at line 233 of file JModuleLocation.hh.
|
protectedinherited |
Definition at line 234 of file JModuleLocation.hh.
|
protectedinherited |
Definition at line 308 of file JVector3D.hh.
|
protectedinherited |
Definition at line 309 of file JVector3D.hh.
|
protectedinherited |
Definition at line 310 of file JVector3D.hh.