Jpp
|
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... | |
void | compile () |
Compile position of module from the positions and directions 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 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... | |
JVector3D & | mul (const JNullType &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 50 of file JModule.hh.
|
inline |
Default constructor.
Definition at line 60 of file JModule.hh.
|
inline |
Constructor.
id | identifier |
location | location |
Definition at line 74 of file JModule.hh.
|
inlinestatic |
Get reference to unique instance of this class object.
This method returns a module with the standard configuration of PMTs.
Definition at line 90 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 148 of file JModule.hh.
|
inline |
Get PMT.
index | readout channel (TDC) |
Definition at line 174 of file JModule.hh.
|
inline |
Get PMT.
index | readout channel (TDC) |
Definition at line 186 of file JModule.hh.
|
inline |
Set PMT.
index | readout channel (TDC) |
pmt | PMT |
Definition at line 198 of file JModule.hh.
|
inline |
Compile position of module from the positions and directions of the PMTs.
Definition at line 211 of file JModule.hh.
|
inline |
Rotate module.
R | rotation matrix |
Definition at line 242 of file JModule.hh.
|
inline |
Rotate back module.
R | rotation matrix |
Definition at line 257 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 273 of file JModule.hh.
|
inline |
Transformation of geometry.
T | transformation |
Definition at line 289 of file JModule.hh.
|
inline |
Rotate module.
Q | quaternion |
Definition at line 304 of file JModule.hh.
|
inline |
Rotate back module.
Q | quaternion |
Definition at line 319 of file JModule.hh.
Add position.
pos | position |
Definition at line 347 of file JModule.hh.
Subtract position.
pos | position |
Definition at line 365 of file JModule.hh.
|
inline |
Set time offset.
t0 | time offset [ns] |
Definition at line 383 of file JModule.hh.
|
inline |
Add time offset.
t0 | time offset [ns] |
Definition at line 399 of file JModule.hh.
|
inline |
Subtract time offset.
t0 | time offset [ns] |
Definition at line 415 of file JModule.hh.
Subtract position.
pos | position |
Definition at line 443 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 |
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 129 of file JPosition3D.hh.
|
inlineinherited |
Get position.
Definition at line 140 of file JPosition3D.hh.
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
Type conversion operator.
Definition at line 173 of file JPosition3D.hh.
|
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 |
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 |
Get dot product.
angle | angle |
Definition at line 377 of file JPosition3D.hh.
|
inlineinherited |
Get dot product.
dir | direction |
Definition at line 392 of file JPosition3D.hh.
|
inlineinherited |
Get dot product.
dir | direction |
Definition at line 407 of file JPosition3D.hh.
|
inlineinherited |
Get dot product.
vector | vector |
Definition at line 281 of file JVector3D.hh.
|
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 |
Check equality.
vector | vector |
precision | precision |
Definition at line 220 of file JVector3D.hh.
|
inlineinherited |
|
inlineinherited |
Get length.
Definition at line 245 of file JVector3D.hh.
|
inlineinherited |
Get squared of distance to point.
pos | position |
Definition at line 257 of file JVector3D.hh.
|
inlineinherited |
Get distance to point.
pos | position |
Definition at line 269 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 298 of file JVector3D.hh.
|
friend |
Read module from input.
in | input stream |
module | module |
Definition at line 456 of file JModule.hh.
|
friend |
Write module to output.
out | output stream |
module | module |
Definition at line 484 of file JModule.hh.
Read module from input.
in | reader |
module | module |
Definition at line 509 of file JModule.hh.
Write module to output.
out | writer |
module | module |
Definition at line 540 of file JModule.hh.
|
protectedinherited |
Definition at line 160 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 309 of file JVector3D.hh.
|
protectedinherited |
Definition at line 310 of file JVector3D.hh.
|
protectedinherited |
Definition at line 311 of file JVector3D.hh.