Jpp
|
Data structure for PMT geometry and calibration. More...
#include <JPMT.hh>
Public Types | |
enum | JPMTStatusBits_t { PMT_STATUS = 0 } |
Enumeration of status bits. More... | |
Public Member Functions | |
JPMT () | |
Default constructor. More... | |
JPMT (const int &id, const JAxis3D &axis, const JStatus &status=JStatus()) | |
Constructor. More... | |
JPMT (const int &id, const JAxis3D &axis, const JCalibration &cal, const JStatus &status=JStatus()) | |
Constructor. More... | |
bool | has (const JPMTStatusBits_t bit) const |
Test PMT status. More... | |
void | set (const JPMTStatusBits_t bit) |
Set PMT status. More... | |
void | reset (const JPMTStatusBits_t bit) |
Reset PMT status. More... | |
double | getDot (const JPMT &pmt) const |
Dot product. 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 JAxis3D & | getAxis () const |
Get axis. More... | |
void | setAxis (const JAxis3D &axis) |
Set axis. More... | |
JAxis3D & | negate () |
Negate axis. More... | |
void | move (const double step) |
Move vertex along this axis. More... | |
double | getIntersection (const JVector3D &pos) const |
Get longitudinal position along axis of position of closest approach with given position. More... | |
double | getIntersection (const JAxis3D &axis, const double precision=1.0e-8) const |
Get longitudinal position along axis of position of closest approach with given axis. More... | |
double | getDistanceSquared (const JVector3D &pos) const |
Get distance squared. More... | |
double | getDistance (const JVector3D &pos) const |
Get distance. More... | |
JAxis3D & | rotate (const JRotation3D &R) |
Rotate axis. More... | |
JAxis3D & | rotate (const JRotation3X &R) |
Rotate around X-axis. More... | |
JAxis3D & | rotate (const JRotation3Y &R) |
Rotate around Y-axis. More... | |
JAxis3D & | rotate (const JRotation3Z &R) |
Rotate around Z-axis. More... | |
JPosition3D & | rotate (const JQuaternion3D &Q) |
Rotate. More... | |
JDirection3D & | rotate (const JQuaternion3D &Q) |
Rotate. More... | |
JAxis3D & | rotate_back (const JRotation3D &R) |
Rotate back axis. More... | |
JAxis3D & | rotate_back (const JRotation3X &R) |
Rotate back around X-axis. More... | |
JAxis3D & | rotate_back (const JRotation3Y &R) |
Rotate back around Y-axis. More... | |
JAxis3D & | rotate_back (const JRotation3Z &R) |
Rotate back around Z-axis. More... | |
void | transform (const JAxis3D &axis) |
Transform axis to reference frame of given axis. More... | |
void | transform (const JRotation3D &R, const JVector3D &pos) |
Transform axis. More... | |
void | transform (const JTransformation3D &T) |
Transform axis. More... | |
JVector3D & | transform (const JMatrix3D &T) |
Transform. More... | |
JDirection3D & | transform (const JMatrix3D &T) |
Transform. More... | |
void | transform_back (const JRotation3D &R, const JVector3D &pos) |
Transform back axis. More... | |
void | transform_back (const JTransformation3D &T) |
Transform back axis. 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 JAngle3D () const | |
Type conversion operator. More... | |
operator JVersor3D () const | |
Type conversion operator. 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 JAngle3D &angle) const |
Get dot product. More... | |
double | getDot (const JVector3D &pos) const |
Get dot product. More... | |
double | getDot (const JVersor3Z &dir) const |
Get dot product. More... | |
double | getDot (const JVersor3D &versor) 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 & | add (const JVector3D &vector) |
Add vector. More... | |
JVector3D & | sub (const JVector3D &vector) |
Subtract vector. More... | |
JVector3D & | mul (const double factor) |
Scale vector. More... | |
JVector3D & | mul (const JNullType &object) |
Multiply with object. More... | |
JVersor3D & | mul (const JNullType &object) |
Multiply with object. More... | |
JVector3D & | div (const double factor) |
Scale vector. More... | |
bool | equals (const JVector3D &vector) const |
Check equality. More... | |
bool | equals (const JVersor3D &versor) const |
Check equality. More... | |
double | getLengthSquared () const |
Get length squared. More... | |
double | getLength () const |
Get length. More... | |
JVector3D & | cross (const JVector3D &first, const JVector3D &second) |
Get cross product. More... | |
const JDirection3D & | getDirection () const |
Get direction. More... | |
JDirection3D & | getDirection () |
Get direction. More... | |
void | setDirection (const JDirection3D &dir) |
Set direction. More... | |
operator JVector3D () const | |
Type conversion operator. More... | |
double | getDX () const |
Get x direction. More... | |
double | getDY () const |
Get y direction. More... | |
double | getDZ () const |
Get z direction. More... | |
double | getTheta () const |
Get theta angle. More... | |
double | getPhi () const |
Get phi angle. More... | |
JVersor3D & | normalise () |
Normalise versor. More... | |
const JCalibration & | getCalibration () const |
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... | |
int & | getStatus () |
Get status. More... | |
void | setStatus (const int status) |
Set status. More... | |
bool | equals (const JStatus &status) const |
Equal method. More... | |
Static Public Member Functions | |
static JDetectorVersion & | getVersion () |
Get detector version. More... | |
static void | setVersion (const JVersion &version) |
Set detector version. More... | |
Static Protected Member Functions | |
template<class JHead_t , class JTail_t > | |
static bool | eq (const JClass_t &first, const JClass_t &second, const JType< JTypeList< JHead_t, JTail_t > > &type) |
Equals method for composite data types. More... | |
template<class JHead_t > | |
static bool | eq (const JClass_t &first, const JClass_t &second, const JType< JTypeList< JHead_t, JNullType > > &type) |
Equals method for composite data types. More... | |
Protected Attributes | |
int | __id |
double | __x |
double | __y |
double | __z |
double | __dx |
double | __dy |
double | __dz |
double | t0 |
int | __status |
Friends | |
std::istream & | operator>> (std::istream &in, JPMT &pmt) |
Read PMT from input. More... | |
std::ostream & | operator<< (std::ostream &out, const JPMT &pmt) |
Write PMT to output. More... | |
JReader & | operator>> (JReader &in, JPMT &pmt) |
Read PMT from input. More... | |
JWriter & | operator<< (JWriter &out, const JPMT &pmt) |
Write PMT to output. More... | |
Data structure for PMT geometry and calibration.
N.B. The axis of the PMT points in the direction of the field of view of the photo-cathode.
Enumeration of status bits.
Additional status bits should be included in JGetPMTStatusBit::JGetPMTStatusBit.
Enumerator | |
---|---|
PMT_STATUS |
General status. |
Definition at line 64 of file JPMT.hh.
|
inline |
Default constructor.
Definition at line 72 of file JPMT.hh.
|
inline |
Constructor.
id | identifier |
axis | axis |
status | status |
Definition at line 87 of file JPMT.hh.
|
inline |
Constructor.
id | identifier |
axis | axis |
cal | calibration |
status | status |
Definition at line 105 of file JPMT.hh.
|
inlinestatic |
|
inlinestatic |
Set detector version.
version | version |
Definition at line 132 of file JPMT.hh.
|
inline |
|
inline |
|
inline |
|
inline |
Dot product.
The dot product is evaluated for the PMT orientation.
pmt | PMT |
Definition at line 179 of file JPMT.hh.
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
Less than method.
object | object identifier |
Definition at line 77 of file JObjectID.hh.
|
inlineinherited |
Less than method.
id | identifier |
Definition at line 89 of file JObjectID.hh.
|
inlineinherited |
More than method.
id | identifier |
Definition at line 101 of file JObjectID.hh.
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
Negate axis.
Definition at line 130 of file JAxis3D.hh.
|
inlineinherited |
Move vertex along this axis.
step | step |
Definition at line 144 of file JAxis3D.hh.
|
inlineinherited |
Get longitudinal position along axis of position of closest approach with given position.
pos | position |
Definition at line 156 of file JAxis3D.hh.
|
inlineinherited |
Get longitudinal position along axis of position of closest approach with given axis.
If the axes are paralel, this position corresponds to the vertex of the given axis.
axis | axis |
precision | precision |
Definition at line 174 of file JAxis3D.hh.
|
inlineinherited |
Get distance squared.
pos | position |
Definition at line 205 of file JAxis3D.hh.
|
inlineinherited |
Get distance.
pos | osition |
Definition at line 223 of file JAxis3D.hh.
|
inlineinherited |
Rotate axis.
R | rotation matrix |
Definition at line 235 of file JAxis3D.hh.
|
inlineinherited |
Rotate around X-axis.
R | rotation matrix |
Definition at line 265 of file JAxis3D.hh.
|
inlineinherited |
Rotate around Y-axis.
R | rotation matrix |
Definition at line 295 of file JAxis3D.hh.
|
inlineinherited |
Rotate around Z-axis.
R | rotation matrix |
Definition at line 325 of file JAxis3D.hh.
|
inlineinherited |
Rotate.
Q | quaternion |
Definition at line 297 of file JPosition3D.hh.
|
inlineinherited |
Rotate.
Q | quaternion |
Definition at line 305 of file JDirection3D.hh.
|
inlineinherited |
Rotate back axis.
R | rotation matrix |
Definition at line 250 of file JAxis3D.hh.
|
inlineinherited |
Rotate back around X-axis.
R | rotation matrix |
Definition at line 280 of file JAxis3D.hh.
|
inlineinherited |
Rotate back around Y-axis.
R | rotation matrix |
Definition at line 310 of file JAxis3D.hh.
|
inlineinherited |
Rotate back around Z-axis.
R | rotation matrix |
Definition at line 340 of file JAxis3D.hh.
|
inlineinherited |
Transform axis to reference frame of given axis.
axis | axis |
Definition at line 354 of file JAxis3D.hh.
|
inlineinherited |
Transform axis.
The final position and direction are obtained as follows:
R
);pos
);R | rotation matrix |
pos | position of origin |
Definition at line 374 of file JAxis3D.hh.
|
inlineinherited |
Transform axis.
T | transformation |
Definition at line 432 of file JAxis3D.hh.
|
inlineinherited |
Transform.
T | matrix |
Definition at line 161 of file JDirection3D.hh.
|
inlineinherited |
Transform back axis.
The final position and direction are obtained as follows:
R | rotation matrix |
pos | position of origin (before rotation) |
Definition at line 410 of file JAxis3D.hh.
|
inlineinherited |
Transform back axis.
T | transformation |
Definition at line 443 of file JAxis3D.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 |
|
inlineinherited |
Type conversion operator.
Definition at line 173 of file JPosition3D.hh.
|
inlineinherited |
Get dot product.
angle | angle |
Definition at line 368 of file JPosition3D.hh.
|
inlineinherited |
Get dot product.
dir | direction |
Definition at line 383 of file JPosition3D.hh.
|
inlineinherited |
Get dot product.
dir | direction |
Definition at line 398 of file JPosition3D.hh.
|
inlineinherited |
Get dot product.
vector | vector |
Definition at line 278 of file JVector3D.hh.
|
inlineinherited |
Get dot product.
angle | angle |
Definition at line 324 of file JDirection3D.hh.
|
inlineinherited |
Get dot product.
pos | position |
Definition at line 339 of file JDirection3D.hh.
|
inlineinherited |
Get dot product.
dir | direction |
Definition at line 354 of file JDirection3D.hh.
|
inlineinherited |
Get dot product.
versor | versor |
Definition at line 151 of file JVersor3D.hh.
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
Subtract vector.
vector | vector |
Definition at line 156 of file JVector3D.hh.
|
inlineinherited |
Scale vector.
factor | multiplication factor |
Definition at line 172 of file JVector3D.hh.
|
inlineinherited |
Multiply with object.
object | object |
Definition at line 273 of file JMath.hh.
|
inlineinherited |
Multiply with object.
object | object |
Definition at line 273 of file JMath.hh.
|
inlineinherited |
Scale vector.
factor | division factor |
Definition at line 188 of file JVector3D.hh.
|
inlineinherited |
Check equality.
vector | vector |
Definition at line 218 of file JVector3D.hh.
|
inlineinherited |
Check equality.
versor | versor |
Definition at line 77 of file JVersor3D.hh.
|
inlineinherited |
|
inlineinherited |
Get length.
Definition at line 242 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 295 of file JVector3D.hh.
|
inlineinherited |
Get direction.
Definition at line 106 of file JDirection3D.hh.
|
inlineinherited |
Get direction.
Definition at line 117 of file JDirection3D.hh.
|
inlineinherited |
Set direction.
dir | direction |
Definition at line 128 of file JDirection3D.hh.
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
Normalise versor.
This operation may set the result to the unit z-vector.
Definition at line 166 of file JVersor3D.hh.
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
Set time offset.
t0 | time offset [ns] |
Definition at line 88 of file JDetector/JCalibration.hh.
|
inlineinherited |
Add time offset.
t0 | time offset [ns] |
Definition at line 99 of file JDetector/JCalibration.hh.
|
inlineinherited |
Subtract time offset.
t0 | time offset [ns] |
Definition at line 110 of file JDetector/JCalibration.hh.
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
Equal method.
status | status |
Definition at line 90 of file JStatus.hh.
|
inlinestaticprotectedinherited |
Equals method for composite data types.
first | first object |
second | second object |
type | type |
Definition at line 42 of file JMultiEquals.hh.
|
inlinestaticprotectedinherited |
Equals method for composite data types.
first | first object |
second | second object |
type | type |
Definition at line 61 of file JMultiEquals.hh.
|
friend |
Read PMT from input.
in | input stream |
pmt | PMT |
Definition at line 192 of file JPMT.hh.
|
friend |
Write PMT to output.
out | output stream |
pmt | PMT |
Definition at line 213 of file JPMT.hh.
Read PMT from input.
in | reader |
pmt | PMT |
Definition at line 237 of file JPMT.hh.
Write PMT to output.
out | writer |
pmt | PMT |
Definition at line 258 of file JPMT.hh.
|
protectedinherited |
Definition at line 159 of file JObjectID.hh.
|
protectedinherited |
Definition at line 306 of file JVector3D.hh.
|
protectedinherited |
Definition at line 307 of file JVector3D.hh.
|
protectedinherited |
Definition at line 308 of file JVector3D.hh.
|
protectedinherited |
Definition at line 180 of file JVersor3D.hh.
|
protectedinherited |
Definition at line 181 of file JVersor3D.hh.
|
protectedinherited |
Definition at line 182 of file JVersor3D.hh.
|
protectedinherited |
Definition at line 177 of file JDetector/JCalibration.hh.
|
protectedinherited |
Definition at line 148 of file JStatus.hh.