Jpp
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Public Member Functions | Static Public Member Functions | Protected Attributes | List of all members
JTRIGGER::JPMTHeader Struct Reference

Header for PMT. More...

#include <JPMTHeader.hh>

Inheritance diagram for JTRIGGER::JPMTHeader:
KM3NETDAQ::JDAQChronometer KM3NETDAQ::JDAQPMTIdentifier JGEOMETRY3D::JAxis3D KM3NETDAQ::JDAQModuleIdentifier JGEOMETRY3D::JPosition3D JGEOMETRY3D::JDirection3D JGEOMETRY3D::JVector3D JGEOMETRY3D::JVersor3D JMATH::JMath< JVector3D > JMATH::JMath< JVersor3D > JTRIGGER::JFrame< JElement_t > JTRIGGER::JFrame< JElement_t, JAllocator_t > JTRIGGER::JFrameClone< JElement_t >

Public Member Functions

 JPMTHeader ()
 Default constructor. More...
 
 JPMTHeader (const JDAQChronometer &chronometer, const JDAQPMTIdentifier &id, const JAxis3D &axis)
 Constructor. More...
 
const JPMTHeadergetPMTHeader () const
 Get PMT header. More...
 
void setPMTHeader (const JPMTHeader &header)
 Set PMT header. More...
 
const JDAQChronometergetDAQChronometer () const
 Get DAQ chronometer. More...
 
void setDAQChronometer (const JDAQChronometer &chronometer)
 Set DAQ chronometer. More...
 
int getDetectorID () const
 Get detector identifier. More...
 
int getRunNumber () const
 Get run number. More...
 
int getFrameIndex () const
 Get frame index. More...
 
const JDAQUTCExtended & getTimesliceStart () const
 Get start of timeslice. More...
 
void setRunNumber (const int run)
 Set run number. More...
 
void setFrameIndex (const int frame_index)
 Set frame index. More...
 
void setTimesliceStart (const JDAQUTCExtended &timeslice_start)
 Set timeslice start time. More...
 
 ClassDef (JDAQChronometer, 3)
 
const JDAQPMTIdentifiergetPMTIdentifier () const
 Get PMT identifier. More...
 
void setPMTIdentifier (const JDAQPMTIdentifier &pmt)
 Set PMT identifier. More...
 
int getPMTAddress () const
 Get PMT identifier. More...
 
 ClassDefNV (JDAQPMTIdentifier, 1)
 
 ClassDefNV (JDAQModuleIdentifier, 1)
 
const JDAQModuleIdentifiergetModuleIdentifier () const
 Get Module identifier. More...
 
void setModuleIdentifier (const JDAQModuleIdentifier &module)
 Set Module identifier. More...
 
int getModuleID () const
 Get module identifier. More...
 
const JAxis3DgetAxis () const
 Get axis. More...
 
void setAxis (const JAxis3D &axis)
 Set axis. More...
 
JAxis3Dnegate ()
 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...
 
JAxis3Drotate (const JRotation3D &R)
 Rotate axis. More...
 
JAxis3Drotate (const JRotation3X &R)
 Rotate around X-axis. More...
 
JAxis3Drotate (const JRotation3Y &R)
 Rotate around Y-axis. More...
 
JAxis3Drotate (const JRotation3Z &R)
 Rotate around Z-axis. More...
 
JPosition3Drotate (const JQuaternion3D &Q)
 Rotate. More...
 
JDirection3Drotate (const JQuaternion3D &Q)
 Rotate. More...
 
JAxis3Drotate_back (const JRotation3D &R)
 Rotate back axis. More...
 
JAxis3Drotate_back (const JRotation3X &R)
 Rotate back around X-axis. More...
 
JAxis3Drotate_back (const JRotation3Y &R)
 Rotate back around Y-axis. More...
 
JAxis3Drotate_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...
 
JVector3Dtransform (const JMatrix3D &T)
 Transform. More...
 
JDirection3Dtransform (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 JPosition3DgetPosition () const
 Get position. More...
 
JPosition3DgetPosition ()
 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...
 
JVector3Dadd (const JVector3D &vector)
 Add vector. More...
 
JVector3Dsub (const JVector3D &vector)
 Subtract vector. More...
 
JVector3Dmul (const double factor)
 Scale vector. More...
 
JVector3Dmul (const JNullType &object)
 Multiply with object. More...
 
JVersor3Dmul (const JNullType &object)
 Multiply with object. More...
 
JVector3Ddiv (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...
 
JVector3Dcross (const JVector3D &first, const JVector3D &second)
 Get cross product. More...
 
const JDirection3DgetDirection () const
 Get direction. More...
 
JDirection3DgetDirection ()
 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...
 
JVersor3Dnormalise ()
 Normalise versor. More...
 

Static Public Member Functions

static int sizeOf ()
 Get size of object. More...
 
static bool compare (const JDAQPMTIdentifier &first, const JDAQPMTIdentifier &second)
 Compare PMT identifiers. More...
 
static int sizeOf ()
 Get size of object. More...
 

Protected Attributes

int detector_id
 
int run
 
int frame_index
 
JDAQUTCExtended timeslice_start
 
int address
 
int id
 
double __x
 
double __y
 
double __z
 
double __dx
 
double __dy
 
double __dz
 

Detailed Description

Header for PMT.

Definition at line 26 of file JPMTHeader.hh.

Constructor & Destructor Documentation

JTRIGGER::JPMTHeader::JPMTHeader ( )
inline

Default constructor.

Definition at line 34 of file JPMTHeader.hh.

34  :
35  JDAQChronometer (),
37  JAxis3D ()
38  {}
JAxis3D()
Default constructor.
Definition: JAxis3D.hh:49
JDAQChronometer()
Default constructor.
JDAQPMTIdentifier()
Default constructor.
JTRIGGER::JPMTHeader::JPMTHeader ( const JDAQChronometer chronometer,
const JDAQPMTIdentifier id,
const JAxis3D axis 
)
inline

Constructor.

Parameters
chronometerDAQ chronometer
idPMT identifier
axisPMT axis

Definition at line 48 of file JPMTHeader.hh.

50  :
51  JDAQChronometer (chronometer),
53  JAxis3D (axis)
54  {}
JAxis3D()
Default constructor.
Definition: JAxis3D.hh:49
JDAQChronometer()
Default constructor.
JDAQPMTIdentifier()
Default constructor.

Member Function Documentation

const JPMTHeader& JTRIGGER::JPMTHeader::getPMTHeader ( ) const
inline

Get PMT header.

Returns
PMT header

Definition at line 62 of file JPMTHeader.hh.

63  {
64  return static_cast<const JPMTHeader&>(*this);
65  }
Header for PMT.
Definition: JPMTHeader.hh:26
void JTRIGGER::JPMTHeader::setPMTHeader ( const JPMTHeader header)
inline

Set PMT header.

Parameters
headerPMT header

Definition at line 73 of file JPMTHeader.hh.

74  {
75  static_cast<JPMTHeader&>(*this) = header;
76  }
Header for PMT.
Definition: JPMTHeader.hh:26
const JDAQChronometer& KM3NETDAQ::JDAQChronometer::getDAQChronometer ( ) const
inlineinherited

Get DAQ chronometer.

Returns
DAQ chronometer

Definition at line 88 of file JDAQChronometer.hh.

89  {
90  return static_cast<const JDAQChronometer&>(*this);
91  }
JDAQChronometer()
Default constructor.
void KM3NETDAQ::JDAQChronometer::setDAQChronometer ( const JDAQChronometer chronometer)
inlineinherited

Set DAQ chronometer.

Parameters
chronometerDAQ chronometer

Definition at line 99 of file JDAQChronometer.hh.

100  {
101  static_cast<JDAQChronometer&>(*this) = chronometer;
102  }
JDAQChronometer()
Default constructor.
int KM3NETDAQ::JDAQChronometer::getDetectorID ( ) const
inlineinherited

Get detector identifier.

Returns
detector identifier

Definition at line 110 of file JDAQChronometer.hh.

111  {
112  return detector_id;
113  }
int KM3NETDAQ::JDAQChronometer::getRunNumber ( ) const
inlineinherited

Get run number.

Returns
run number

Definition at line 121 of file JDAQChronometer.hh.

122  {
123  return run;
124  }
int KM3NETDAQ::JDAQChronometer::getFrameIndex ( ) const
inlineinherited

Get frame index.

Returns
frame index

Definition at line 132 of file JDAQChronometer.hh.

133  {
134  return frame_index;
135  }
const JDAQUTCExtended& KM3NETDAQ::JDAQChronometer::getTimesliceStart ( ) const
inlineinherited

Get start of timeslice.

Returns
timeslice start

Definition at line 144 of file JDAQChronometer.hh.

145  {
146  return timeslice_start;
147  }
void KM3NETDAQ::JDAQChronometer::setRunNumber ( const int  run)
inlineinherited

Set run number.

Parameters
runrun number

Definition at line 155 of file JDAQChronometer.hh.

156  {
157  this->run = run;
158  }
void KM3NETDAQ::JDAQChronometer::setFrameIndex ( const int  frame_index)
inlineinherited

Set frame index.

Parameters
frame_indexframe index

Definition at line 166 of file JDAQChronometer.hh.

167  {
168  this->frame_index = frame_index;
169  }
void KM3NETDAQ::JDAQChronometer::setTimesliceStart ( const JDAQUTCExtended timeslice_start)
inlineinherited

Set timeslice start time.

Parameters
timeslice_starttimeslice start time

Definition at line 177 of file JDAQChronometer.hh.

178  {
180  }
static int KM3NETDAQ::JDAQChronometer::sizeOf ( )
inlinestaticinherited

Get size of object.

Returns
number of bytes

Definition at line 224 of file JDAQChronometer.hh.

225  {
226  return (sizeof(int) +
227  sizeof(int) +
228  sizeof(int) +
230  }
static int sizeOf()
Get size of object.
KM3NETDAQ::JDAQChronometer::ClassDef ( JDAQChronometer  ,
 
)
inherited
const JDAQPMTIdentifier& KM3NETDAQ::JDAQPMTIdentifier::getPMTIdentifier ( ) const
inlineinherited

Get PMT identifier.

Returns
PMT identifier

Definition at line 56 of file JDAQPMTIdentifier.hh.

57  {
58  return *this;
59  }
void KM3NETDAQ::JDAQPMTIdentifier::setPMTIdentifier ( const JDAQPMTIdentifier pmt)
inlineinherited

Set PMT identifier.

Parameters
pmtPMT identifier

Definition at line 67 of file JDAQPMTIdentifier.hh.

68  {
69  *this = pmt;
70  }
int KM3NETDAQ::JDAQPMTIdentifier::getPMTAddress ( ) const
inlineinherited

Get PMT identifier.

Returns
PMT identifier

Definition at line 78 of file JDAQPMTIdentifier.hh.

79  {
80  return address;
81  }
static bool KM3NETDAQ::JDAQPMTIdentifier::compare ( const JDAQPMTIdentifier first,
const JDAQPMTIdentifier second 
)
inlinestaticinherited

Compare PMT identifiers.

The comparison is applied to the module identifer and to the PMT address. If the module identifier or PMT address is -1, the corresponding comparison evaluates to true.

Parameters
firstPMT identifier
secondPMT identifier
Returns
true if first PMT equal second PMT; else false

Definition at line 158 of file JDAQPMTIdentifier.hh.

159  {
160  return ((first .getModuleIdentifier() == second.getModuleIdentifier() ||
161  first .getModuleIdentifier() == -1 ||
162  second.getModuleIdentifier() == -1) &&
163  (first .getPMTAddress() == second.getPMTAddress() ||
164  first .getPMTAddress() == -1 ||
165  second.getPMTAddress() == -1));
166  }
int getPMTAddress() const
Get PMT identifier.
const JDAQModuleIdentifier & getModuleIdentifier() const
Get Module identifier.
static int KM3NETDAQ::JDAQPMTIdentifier::sizeOf ( )
inlinestaticinherited

Get size of object.

Returns
number of bytes

Definition at line 174 of file JDAQPMTIdentifier.hh.

175  {
176  return (JDAQModuleIdentifier::sizeOf() +
177  sizeof(int));
178  }
static int sizeOf()
Get size of object.
KM3NETDAQ::JDAQPMTIdentifier::ClassDefNV ( JDAQPMTIdentifier  ,
 
)
inherited
KM3NETDAQ::JDAQModuleIdentifier::ClassDefNV ( JDAQModuleIdentifier  ,
 
)
inherited
const JDAQModuleIdentifier& KM3NETDAQ::JDAQModuleIdentifier::getModuleIdentifier ( ) const
inlineinherited

Get Module identifier.

Returns
Module identifier

Definition at line 50 of file JDAQModuleIdentifier.hh.

51  {
52  return *this;
53  }
void KM3NETDAQ::JDAQModuleIdentifier::setModuleIdentifier ( const JDAQModuleIdentifier module)
inlineinherited

Set Module identifier.

Parameters
moduleModule identifier

Definition at line 61 of file JDAQModuleIdentifier.hh.

62  {
63  *this = module;
64  }
int KM3NETDAQ::JDAQModuleIdentifier::getModuleID ( ) const
inlineinherited

Get module identifier.

Returns
module identifier

Definition at line 72 of file JDAQModuleIdentifier.hh.

73  {
74  return id;
75  }
const JAxis3D& JGEOMETRY3D::JAxis3D::getAxis ( ) const
inlineinherited

Get axis.

Returns
axis

Definition at line 108 of file JAxis3D.hh.

109  {
110  return *this;
111  }
void JGEOMETRY3D::JAxis3D::setAxis ( const JAxis3D axis)
inlineinherited

Set axis.

Parameters
axisaxis

Definition at line 119 of file JAxis3D.hh.

120  {
121  *this = axis;
122  }
JAxis3D& JGEOMETRY3D::JAxis3D::negate ( )
inlineinherited

Negate axis.

Returns
this axis

Definition at line 130 of file JAxis3D.hh.

131  {
132  static_cast<JPosition3D&> (*this).negate();
133  static_cast<JDirection3D&>(*this).negate();
134 
135  return *this;
136  }
Data structure for direction in three dimensions.
Definition: JDirection3D.hh:32
JVersor3D & negate()
Negate versor.
Definition: JVersor3D.hh:61
Data structure for position in three dimensions.
Definition: JPosition3D.hh:35
JVector3D & negate()
Negate vector.
Definition: JVector3D.hh:124
void JGEOMETRY3D::JAxis3D::move ( const double  step)
inlineinherited

Move vertex along this axis.

Parameters
stepstep

Definition at line 144 of file JAxis3D.hh.

145  {
146  getPosition() += step * JPosition3D(getDirection());
147  }
const JDirection3D & getDirection() const
Get direction.
const JPosition3D & getPosition() const
Get position.
Definition: JPosition3D.hh:129
JPosition3D()
Default constructor.
Definition: JPosition3D.hh:47
double JGEOMETRY3D::JAxis3D::getIntersection ( const JVector3D pos) const
inlineinherited

Get longitudinal position along axis of position of closest approach with given position.

Parameters
posposition
Returns
longitudinal position

Definition at line 156 of file JAxis3D.hh.

157  {
158  JPosition3D D(pos);
159 
160  D.sub(this->getPosition());
161 
162  return D.getDot(this->getDirection());
163  }
const JDirection3D & getDirection() const
Get direction.
const JPosition3D & getPosition() const
Get position.
Definition: JPosition3D.hh:129
Data structure for position in three dimensions.
Definition: JPosition3D.hh:35
double JGEOMETRY3D::JAxis3D::getIntersection ( const JAxis3D axis,
const double  precision = 1.0e-8 
) const
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.

Parameters
axisaxis
precisionprecision
Returns
longitudinal position

Definition at line 174 of file JAxis3D.hh.

175  {
176  JPosition3D pos(getPosition ());
177  JDirection3D dir(getDirection());
178 
179  const JRotation3D R(axis.getDirection());
180 
181  // offset this position with position of given axis
182 
183  pos.sub(axis.getPosition());
184 
185  // rotate along given axis
186 
187  pos.rotate(R);
188  dir.rotate(R);
189 
190  // longitudinal position at minimal distance of approach
191 
192  const double alpha = pos.getX() * dir.getDX() + pos.getY() * dir.getDY();
193  const double beta = dir.getDX() * dir.getDX() + dir.getDY() * dir.getDY();
194 
195  return (fabs(beta) > precision ? -alpha/beta : -pos.getZ());
196  }
Data structure for direction in three dimensions.
Definition: JDirection3D.hh:32
JMatrix3D & sub(const JMatrix3D &A)
Matrix subtraction.
const JDirection3D & getDirection() const
Get direction.
Rotation matrix.
Definition: JRotation3D.hh:108
const JPosition3D & getPosition() const
Get position.
Definition: JPosition3D.hh:129
Data structure for position in three dimensions.
Definition: JPosition3D.hh:35
double JGEOMETRY3D::JAxis3D::getDistanceSquared ( const JVector3D pos) const
inlineinherited

Get distance squared.

Parameters
posposition
Returns
square of distance

Definition at line 205 of file JAxis3D.hh.

206  {
207  JPosition3D D(pos);
208 
209  D.sub(this->getPosition());
210 
211  const double dz = D.getDot(this->getDirection());
212 
213  return D.getLengthSquared() - dz*dz;
214  }
const JDirection3D & getDirection() const
Get direction.
const JPosition3D & getPosition() const
Get position.
Definition: JPosition3D.hh:129
Data structure for position in three dimensions.
Definition: JPosition3D.hh:35
double JGEOMETRY3D::JAxis3D::getDistance ( const JVector3D pos) const
inlineinherited

Get distance.

Parameters
pososition
Returns
distance

Definition at line 223 of file JAxis3D.hh.

224  {
225  return sqrt(this->getDistanceSquared(pos));
226  }
double getDistanceSquared(const JVector3D &pos) const
Get distance squared.
Definition: JAxis3D.hh:205
JAxis3D& JGEOMETRY3D::JAxis3D::rotate ( const JRotation3D R)
inlineinherited

Rotate axis.

Parameters
Rrotation matrix
Returns
this axis

Definition at line 235 of file JAxis3D.hh.

236  {
237  static_cast<JPosition3D&> (*this).rotate(R);
238  static_cast<JDirection3D&>(*this).rotate(R);
239 
240  return *this;
241  }
Data structure for direction in three dimensions.
Definition: JDirection3D.hh:32
JDirection3D & rotate(const JRotation3D &R)
Rotate.
Data structure for position in three dimensions.
Definition: JPosition3D.hh:35
JPosition3D & rotate(const JRotation3D &R)
Rotate.
Definition: JPosition3D.hh:185
JAxis3D& JGEOMETRY3D::JAxis3D::rotate ( const JRotation3X R)
inlineinherited

Rotate around X-axis.

Parameters
Rrotation matrix
Returns
this axis

Definition at line 265 of file JAxis3D.hh.

266  {
267  static_cast<JPosition3D&> (*this).rotate(R);
268  static_cast<JDirection3D&>(*this).rotate(R);
269 
270  return *this;
271  }
Data structure for direction in three dimensions.
Definition: JDirection3D.hh:32
JDirection3D & rotate(const JRotation3D &R)
Rotate.
Data structure for position in three dimensions.
Definition: JPosition3D.hh:35
JPosition3D & rotate(const JRotation3D &R)
Rotate.
Definition: JPosition3D.hh:185
JAxis3D& JGEOMETRY3D::JAxis3D::rotate ( const JRotation3Y R)
inlineinherited

Rotate around Y-axis.

Parameters
Rrotation matrix
Returns
this axis

Definition at line 295 of file JAxis3D.hh.

296  {
297  static_cast<JPosition3D&> (*this).rotate(R);
298  static_cast<JDirection3D&>(*this).rotate(R);
299 
300  return *this;
301  }
Data structure for direction in three dimensions.
Definition: JDirection3D.hh:32
JDirection3D & rotate(const JRotation3D &R)
Rotate.
Data structure for position in three dimensions.
Definition: JPosition3D.hh:35
JPosition3D & rotate(const JRotation3D &R)
Rotate.
Definition: JPosition3D.hh:185
JAxis3D& JGEOMETRY3D::JAxis3D::rotate ( const JRotation3Z R)
inlineinherited

Rotate around Z-axis.

Parameters
Rrotation matrix
Returns
this axis

Definition at line 325 of file JAxis3D.hh.

326  {
327  static_cast<JPosition3D&> (*this).rotate(R);
328  static_cast<JDirection3D&>(*this).rotate(R);
329 
330  return *this;
331  }
Data structure for direction in three dimensions.
Definition: JDirection3D.hh:32
JDirection3D & rotate(const JRotation3D &R)
Rotate.
Data structure for position in three dimensions.
Definition: JPosition3D.hh:35
JPosition3D & rotate(const JRotation3D &R)
Rotate.
Definition: JPosition3D.hh:185
JPosition3D& JGEOMETRY3D::JPosition3D::rotate ( const JQuaternion3D Q)
inlineinherited

Rotate.

Parameters
Qquaternion
Returns
this position

Definition at line 297 of file JPosition3D.hh.

298  {
299  JQuaternion3D b(Q);
300  JQuaternion3D a;
301 
302  a.mul(getPosition(), b.conjugate());
303 
304  setPosition(b.mul(Q,a));
305 
306  return *this;
307  }
JQuaternion3D & mul(const double factor)
Scale quaternion.
const JPosition3D & getPosition() const
Get position.
Definition: JPosition3D.hh:129
Data structure for quaternion in three dimensions.
void setPosition(const JVector3D &pos)
Set position.
Definition: JPosition3D.hh:151
JDirection3D& JGEOMETRY3D::JDirection3D::rotate ( const JQuaternion3D Q)
inlineinherited

Rotate.

Parameters
Qquaternion
Returns
this position

Definition at line 305 of file JDirection3D.hh.

306  {
307  JQuaternion3D b(Q);
308  JQuaternion3D a;
309 
310  a.mul(*this, b.conjugate());
311 
312  static_cast<JVersor3D&>(*this) = b.mul(Q,a);
313 
314  return *this;
315  }
JQuaternion3D & mul(const double factor)
Scale quaternion.
JFirst_t & mul(const JSecond_t &object)
Multiply with object.
Definition: JMath.hh:273
Data structure for quaternion in three dimensions.
Data structure for normalised vector in three dimensions.
Definition: JVersor3D.hh:23
JAxis3D& JGEOMETRY3D::JAxis3D::rotate_back ( const JRotation3D R)
inlineinherited

Rotate back axis.

Parameters
Rrotation matrix
Returns
this axis

Definition at line 250 of file JAxis3D.hh.

251  {
252  static_cast<JPosition3D&> (*this).rotate_back(R);
253  static_cast<JDirection3D&>(*this).rotate_back(R);
254 
255  return *this;
256  }
Data structure for direction in three dimensions.
Definition: JDirection3D.hh:32
JDirection3D & rotate_back(const JRotation3D &R)
Rotate back.
JPosition3D & rotate_back(const JRotation3D &R)
Rotate back.
Definition: JPosition3D.hh:199
Data structure for position in three dimensions.
Definition: JPosition3D.hh:35
JAxis3D& JGEOMETRY3D::JAxis3D::rotate_back ( const JRotation3X R)
inlineinherited

Rotate back around X-axis.

Parameters
Rrotation matrix
Returns
this axis

Definition at line 280 of file JAxis3D.hh.

281  {
282  static_cast<JPosition3D&> (*this).rotate_back(R);
283  static_cast<JDirection3D&>(*this).rotate_back(R);
284 
285  return *this;
286  }
Data structure for direction in three dimensions.
Definition: JDirection3D.hh:32
JDirection3D & rotate_back(const JRotation3D &R)
Rotate back.
JPosition3D & rotate_back(const JRotation3D &R)
Rotate back.
Definition: JPosition3D.hh:199
Data structure for position in three dimensions.
Definition: JPosition3D.hh:35
JAxis3D& JGEOMETRY3D::JAxis3D::rotate_back ( const JRotation3Y R)
inlineinherited

Rotate back around Y-axis.

Parameters
Rrotation matrix
Returns
this axis

Definition at line 310 of file JAxis3D.hh.

311  {
312  static_cast<JPosition3D&> (*this).rotate_back(R);
313  static_cast<JDirection3D&>(*this).rotate_back(R);
314 
315  return *this;
316  }
Data structure for direction in three dimensions.
Definition: JDirection3D.hh:32
JDirection3D & rotate_back(const JRotation3D &R)
Rotate back.
JPosition3D & rotate_back(const JRotation3D &R)
Rotate back.
Definition: JPosition3D.hh:199
Data structure for position in three dimensions.
Definition: JPosition3D.hh:35
JAxis3D& JGEOMETRY3D::JAxis3D::rotate_back ( const JRotation3Z R)
inlineinherited

Rotate back around Z-axis.

Parameters
Rrotation matrix
Returns
his axis

Definition at line 340 of file JAxis3D.hh.

341  {
342  static_cast<JPosition3D&> (*this).rotate_back(R);
343  static_cast<JDirection3D&>(*this).rotate_back(R);
344 
345  return *this;
346  }
Data structure for direction in three dimensions.
Definition: JDirection3D.hh:32
JDirection3D & rotate_back(const JRotation3D &R)
Rotate back.
JPosition3D & rotate_back(const JRotation3D &R)
Rotate back.
Definition: JPosition3D.hh:199
Data structure for position in three dimensions.
Definition: JPosition3D.hh:35
void JGEOMETRY3D::JAxis3D::transform ( const JAxis3D axis)
inlineinherited

Transform axis to reference frame of given axis.

Parameters
axisaxis

Definition at line 354 of file JAxis3D.hh.

355  {
356  JRotation3D R (axis.getDirection());
357  JPosition3D pos(axis.getPosition ());
358 
359  transform(R, pos.rotate(R));
360  }
const JDirection3D & getDirection() const
Get direction.
Rotation matrix.
Definition: JRotation3D.hh:108
void transform(const JAxis3D &axis)
Transform axis to reference frame of given axis.
Definition: JAxis3D.hh:354
const JPosition3D & getPosition() const
Get position.
Definition: JPosition3D.hh:129
Data structure for position in three dimensions.
Definition: JPosition3D.hh:35
void JGEOMETRY3D::JAxis3D::transform ( const JRotation3D R,
const JVector3D pos 
)
inlineinherited

Transform axis.

The final position and direction are obtained as follows:

  1. rotation of the position and the direction according rotation matrix (R);
  2. offset position with position of origin in rotated system (pos);
  3. rotation of position and direction around z-axis, such that final position is in x-z plane;
Parameters
Rrotation matrix
posposition of origin

Definition at line 374 of file JAxis3D.hh.

376  {
377  JPosition3D& u = getPosition ();
378  JDirection3D& v = getDirection();
379 
380  // rotate axis to system such that direction is along z-axis
381 
382  u.rotate(R);
383  v.rotate(R);
384 
385  // offset with respect to origin
386 
387  u.sub(pos);
388 
389  // rotate axis to x-z plane such that position is in x-z plane
390 
391  const double phi = atan2(u.getY(), u.getX());
392 
393  const JRotation3Z r(-phi);
394 
395  u.rotate(r);
396  v.rotate(r);
397  }
Data structure for direction in three dimensions.
Definition: JDirection3D.hh:32
const JDirection3D & getDirection() const
Get direction.
Rotation around Z-axis.
Definition: JRotation3D.hh:82
JVector3D & sub(const JVector3D &vector)
Subtract vector.
Definition: JVector3D.hh:156
JDirection3D & rotate(const JRotation3D &R)
Rotate.
double getY() const
Get y position.
Definition: JVector3D.hh:102
const JPosition3D & getPosition() const
Get position.
Definition: JPosition3D.hh:129
double getX() const
Get x position.
Definition: JVector3D.hh:92
Data structure for position in three dimensions.
Definition: JPosition3D.hh:35
JPosition3D & rotate(const JRotation3D &R)
Rotate.
Definition: JPosition3D.hh:185
void JGEOMETRY3D::JAxis3D::transform ( const JTransformation3D T)
inlineinherited

Transform axis.

Parameters
Ttransformation

Definition at line 432 of file JAxis3D.hh.

433  {
435  }
void transform(const JAxis3D &axis)
Transform axis to reference frame of given axis.
Definition: JAxis3D.hh:354
const JPosition3D & getPosition() const
Get position.
Definition: JPosition3D.hh:129
const JRotation3D & getRotation() const
Get rotation.
Definition: JRotation3D.hh:237
JVector3D& JGEOMETRY3D::JVector3D::transform ( const JMatrix3D T)
inlineinherited

Transform.

Parameters
Tmatrix
Returns
this vector

Definition at line 204 of file JVector3D.hh.

205  {
206  T.transform(__x, __y, __z);
207 
208  return *this;
209  }
JDirection3D& JGEOMETRY3D::JDirection3D::transform ( const JMatrix3D T)
inlineinherited

Transform.

Parameters
Tmatrix
Returns
this direction

Definition at line 161 of file JDirection3D.hh.

162  {
163  T.transform(__dx, __dy, __dz);
164 
165  normalise();
166 
167  return *this;
168  }
JVersor3D & normalise()
Normalise versor.
Definition: JVersor3D.hh:166
void JGEOMETRY3D::JAxis3D::transform_back ( const JRotation3D R,
const JVector3D pos 
)
inlineinherited

Transform back axis.

The final position and direction are obtained as follows:

  1. offset position with position pos;
  2. rotation of position and direction according matrix R;
Parameters
Rrotation matrix
posposition of origin (before rotation)

Definition at line 410 of file JAxis3D.hh.

412  {
413  JPosition3D& u = getPosition ();
414  JDirection3D& v = getDirection();
415 
416  // offset with respect to origin
417 
418  u.add(pos);
419 
420  // rotate back axis to system with original particle direction
421 
422  u.rotate_back(R);
423  v.rotate_back(R);
424  }
Data structure for direction in three dimensions.
Definition: JDirection3D.hh:32
JDirection3D & rotate_back(const JRotation3D &R)
Rotate back.
JPosition3D & rotate_back(const JRotation3D &R)
Rotate back.
Definition: JPosition3D.hh:199
const JDirection3D & getDirection() const
Get direction.
const JPosition3D & getPosition() const
Get position.
Definition: JPosition3D.hh:129
Data structure for position in three dimensions.
Definition: JPosition3D.hh:35
JVector3D & add(const JVector3D &vector)
Add vector.
Definition: JVector3D.hh:140
void JGEOMETRY3D::JAxis3D::transform_back ( const JTransformation3D T)
inlineinherited

Transform back axis.

Parameters
Ttransformation

Definition at line 443 of file JAxis3D.hh.

444  {
446  }
void transform_back(const JRotation3D &R, const JVector3D &pos)
Transform back axis.
Definition: JAxis3D.hh:410
const JPosition3D & getPosition() const
Get position.
Definition: JPosition3D.hh:129
const JRotation3D & getRotation() const
Get rotation.
Definition: JRotation3D.hh:237
const JPosition3D& JGEOMETRY3D::JPosition3D::getPosition ( ) const
inlineinherited

Get position.

Returns
position

Definition at line 129 of file JPosition3D.hh.

130  {
131  return static_cast<const JPosition3D&>(*this);
132  }
Data structure for position in three dimensions.
Definition: JPosition3D.hh:35
JPosition3D& JGEOMETRY3D::JPosition3D::getPosition ( )
inlineinherited

Get position.

Returns
position

Definition at line 140 of file JPosition3D.hh.

141  {
142  return static_cast<JPosition3D&>(*this);
143  }
Data structure for position in three dimensions.
Definition: JPosition3D.hh:35
void JGEOMETRY3D::JPosition3D::setPosition ( const JVector3D pos)
inlineinherited

Set position.

Parameters
posposition

Definition at line 151 of file JPosition3D.hh.

152  {
153  static_cast<JVector3D&>(*this) = pos;
154  }
Data structure for vector in three dimensions.
Definition: JVector3D.hh:32
JGEOMETRY3D::JPosition3D::operator JAngle3D ( ) const
inlineinherited

Type conversion operator.

Returns
angle

Definition at line 162 of file JPosition3D.hh.

163  {
164  return JAngle3D(getX(), getY(), getZ());
165  }
Data structure for angles in three dimensions.
Definition: JAngle3D.hh:30
double getY() const
Get y position.
Definition: JVector3D.hh:102
double getX() const
Get x position.
Definition: JVector3D.hh:92
double getZ() const
Get z position.
Definition: JVector3D.hh:113
JGEOMETRY3D::JDirection3D::operator JAngle3D ( ) const
inlineinherited

Type conversion operator.

Returns
angle

Definition at line 138 of file JDirection3D.hh.

139  {
140  return JAngle3D(getDX(), getDY(), getDZ());
141  }
Data structure for angles in three dimensions.
Definition: JAngle3D.hh:30
double getDY() const
Get y direction.
Definition: JVersor3D.hh:101
double getDX() const
Get x direction.
Definition: JVersor3D.hh:90
double getDZ() const
Get z direction.
Definition: JVersor3D.hh:112
JGEOMETRY3D::JPosition3D::operator JVersor3D ( ) const
inlineinherited

Type conversion operator.

Returns
direction

Definition at line 173 of file JPosition3D.hh.

174  {
175  return JVersor3D(getX(), getY(), getZ());
176  }
double getY() const
Get y position.
Definition: JVector3D.hh:102
double getX() const
Get x position.
Definition: JVector3D.hh:92
Data structure for normalised vector in three dimensions.
Definition: JVersor3D.hh:23
double getZ() const
Get z position.
Definition: JVector3D.hh:113
double JGEOMETRY3D::JPosition3D::getDot ( const JAngle3D angle) const
inlineinherited

Get dot product.

Parameters
angleangle
Returns
dot product

Definition at line 368 of file JPosition3D.hh.

369  {
370  return
371  getX() * angle.getDX() +
372  getY() * angle.getDY() +
373  getZ() * angle.getDZ();
374  }
double getY() const
Get y position.
Definition: JVector3D.hh:102
double getX() const
Get x position.
Definition: JVector3D.hh:92
double getZ() const
Get z position.
Definition: JVector3D.hh:113
double getDX() const
Get x direction.
Definition: JAngle3D.hh:105
double getDZ() const
Get z direction.
Definition: JAngle3D.hh:127
double getDY() const
Get y direction.
Definition: JAngle3D.hh:116
double JGEOMETRY3D::JPosition3D::getDot ( const JVersor3D dir) const
inlineinherited

Get dot product.

Parameters
dirdirection
Returns
dot product

Definition at line 383 of file JPosition3D.hh.

384  {
385  return
386  getX() * dir.getDX() +
387  getY() * dir.getDY() +
388  getZ() * dir.getDZ();
389  }
double getDY() const
Get y direction.
Definition: JVersor3D.hh:101
double getDX() const
Get x direction.
Definition: JVersor3D.hh:90
double getY() const
Get y position.
Definition: JVector3D.hh:102
double getX() const
Get x position.
Definition: JVector3D.hh:92
double getZ() const
Get z position.
Definition: JVector3D.hh:113
double getDZ() const
Get z direction.
Definition: JVersor3D.hh:112
double JGEOMETRY3D::JPosition3D::getDot ( const JVersor3Z dir) const
inlineinherited

Get dot product.

Parameters
dirdirection
Returns
dot product

Definition at line 398 of file JPosition3D.hh.

399  {
400  return
401  getX() * dir.getDX() +
402  getY() * dir.getDY() +
403  getZ() * dir.getDZ();
404  }
double getDY() const
Get y direction.
Definition: JVersor3Z.hh:155
double getY() const
Get y position.
Definition: JVector3D.hh:102
double getDX() const
Get x direction.
Definition: JVersor3Z.hh:144
double getX() const
Get x position.
Definition: JVector3D.hh:92
double getDZ() const
Get z direction.
Definition: JVersor3Z.hh:166
double getZ() const
Get z position.
Definition: JVector3D.hh:113
double JGEOMETRY3D::JVector3D::getDot ( const JVector3D vector) const
inlineinherited

Get dot product.

Parameters
vectorvector
Returns
dot product

Definition at line 278 of file JVector3D.hh.

279  {
280  return
281  getX() * vector.getX() +
282  getY() * vector.getY() +
283  getZ() * vector.getZ();
284  }
double getY() const
Get y position.
Definition: JVector3D.hh:102
double getX() const
Get x position.
Definition: JVector3D.hh:92
double getZ() const
Get z position.
Definition: JVector3D.hh:113
double JGEOMETRY3D::JDirection3D::getDot ( const JAngle3D angle) const
inlineinherited

Get dot product.

Parameters
angleangle
Returns
dot product

Definition at line 324 of file JDirection3D.hh.

325  {
326  return
327  getDX() * angle.getDX() +
328  getDY() * angle.getDY() +
329  getDZ() * angle.getDZ();
330  }
double getDY() const
Get y direction.
Definition: JVersor3D.hh:101
double getDX() const
Get x direction.
Definition: JVersor3D.hh:90
double getDZ() const
Get z direction.
Definition: JVersor3D.hh:112
double getDX() const
Get x direction.
Definition: JAngle3D.hh:105
double getDZ() const
Get z direction.
Definition: JAngle3D.hh:127
double getDY() const
Get y direction.
Definition: JAngle3D.hh:116
double JGEOMETRY3D::JDirection3D::getDot ( const JVector3D pos) const
inlineinherited

Get dot product.

Parameters
posposition
Returns
dot product

Definition at line 339 of file JDirection3D.hh.

340  {
341  return
342  getDX() * pos.getX() +
343  getDY() * pos.getY() +
344  getDZ() * pos.getZ();
345  }
double getDY() const
Get y direction.
Definition: JVersor3D.hh:101
double getDX() const
Get x direction.
Definition: JVersor3D.hh:90
double getY() const
Get y position.
Definition: JVector3D.hh:102
double getX() const
Get x position.
Definition: JVector3D.hh:92
double getZ() const
Get z position.
Definition: JVector3D.hh:113
double getDZ() const
Get z direction.
Definition: JVersor3D.hh:112
double JGEOMETRY3D::JDirection3D::getDot ( const JVersor3Z dir) const
inlineinherited

Get dot product.

Parameters
dirdirection
Returns
dot product

Definition at line 354 of file JDirection3D.hh.

355  {
356  return
357  getDX() * dir.getDX() +
358  getDY() * dir.getDY() +
359  getDZ() * dir.getDZ();
360  }
double getDY() const
Get y direction.
Definition: JVersor3Z.hh:155
double getDY() const
Get y direction.
Definition: JVersor3D.hh:101
double getDX() const
Get x direction.
Definition: JVersor3D.hh:90
double getDX() const
Get x direction.
Definition: JVersor3Z.hh:144
double getDZ() const
Get z direction.
Definition: JVersor3Z.hh:166
double getDZ() const
Get z direction.
Definition: JVersor3D.hh:112
double JGEOMETRY3D::JVersor3D::getDot ( const JVersor3D versor) const
inlineinherited

Get dot product.

Parameters
versorversor
Returns
dot product

Definition at line 151 of file JVersor3D.hh.

152  {
153  return
154  getDX() * versor.getDX() +
155  getDY() * versor.getDY() +
156  getDZ() * versor.getDZ();
157  }
double getDY() const
Get y direction.
Definition: JVersor3D.hh:101
double getDX() const
Get x direction.
Definition: JVersor3D.hh:90
double getDZ() const
Get z direction.
Definition: JVersor3D.hh:112
JGEOMETRY3D::JVector3D::operator JVector2D ( ) const
inlineinherited

Type conversion operator.

Returns
JVector2D

Definition at line 81 of file JVector3D.hh.

82  {
83  return JVector2D(this->getX(), this->getY());
84  }
double getY() const
Get y position.
Definition: JVector3D.hh:102
double getX() const
Get x position.
Definition: JVector3D.hh:92
double JGEOMETRY3D::JVector3D::getX ( ) const
inlineinherited

Get x position.

Returns
x position

Definition at line 92 of file JVector3D.hh.

93  {
94  return __x;
95  }
double JGEOMETRY3D::JVector3D::getY ( ) const
inlineinherited

Get y position.

Returns
y position

Definition at line 102 of file JVector3D.hh.

103  {
104  return __y;
105  }
double JGEOMETRY3D::JVector3D::getZ ( ) const
inlineinherited

Get z position.

Returns
z position

Definition at line 113 of file JVector3D.hh.

114  {
115  return __z;
116  }
JVector3D& JGEOMETRY3D::JVector3D::add ( const JVector3D vector)
inlineinherited

Add vector.

Parameters
vectorvector
Returns
this vector

Definition at line 140 of file JVector3D.hh.

141  {
142  __x += vector.getX();
143  __y += vector.getY();
144  __z += vector.getZ();
145 
146  return *this;
147  }
double getY() const
Get y position.
Definition: JVector3D.hh:102
double getX() const
Get x position.
Definition: JVector3D.hh:92
double getZ() const
Get z position.
Definition: JVector3D.hh:113
JVector3D& JGEOMETRY3D::JVector3D::sub ( const JVector3D vector)
inlineinherited

Subtract vector.

Parameters
vectorvector
Returns
this vector

Definition at line 156 of file JVector3D.hh.

157  {
158  __x -= vector.getX();
159  __y -= vector.getY();
160  __z -= vector.getZ();
161 
162  return *this;
163  }
double getY() const
Get y position.
Definition: JVector3D.hh:102
double getX() const
Get x position.
Definition: JVector3D.hh:92
double getZ() const
Get z position.
Definition: JVector3D.hh:113
JVector3D& JGEOMETRY3D::JVector3D::mul ( const double  factor)
inlineinherited

Scale vector.

Parameters
factormultiplication factor
Returns
this vector

Definition at line 172 of file JVector3D.hh.

173  {
174  __x *= factor;
175  __y *= factor;
176  __z *= factor;
177 
178  return *this;
179  }
JVector3D & JMATH::JMath< JVector3D , JNullType >::mul ( const JNullType object)
inlineinherited

Multiply with object.

Parameters
objectobject
Returns
result object

Definition at line 273 of file JMath.hh.

274  {
275  return static_cast<JFirst_t&>(*this) = JCalculator<JFirst_t>::calculator.mul(static_cast<const JFirst_t&>(*this), object);
276  }
Auxiliary class for product evaluation of objects.
Definition: JCalculator.hh:18
JVersor3D & JMATH::JMath< JVersor3D , JNullType >::mul ( const JNullType object)
inlineinherited

Multiply with object.

Parameters
objectobject
Returns
result object

Definition at line 273 of file JMath.hh.

274  {
275  return static_cast<JFirst_t&>(*this) = JCalculator<JFirst_t>::calculator.mul(static_cast<const JFirst_t&>(*this), object);
276  }
Auxiliary class for product evaluation of objects.
Definition: JCalculator.hh:18
JVector3D& JGEOMETRY3D::JVector3D::div ( const double  factor)
inlineinherited

Scale vector.

Parameters
factordivision factor
Returns
this vector

Definition at line 188 of file JVector3D.hh.

189  {
190  __x /= factor;
191  __y /= factor;
192  __z /= factor;
193 
194  return *this;
195  }
bool JGEOMETRY3D::JVector3D::equals ( const JVector3D vector) const
inlineinherited

Check equality.

Parameters
vectorvector
Returns
true if vectors are equal; else false

Definition at line 218 of file JVector3D.hh.

219  {
220  return (getX() == vector.getX() &&
221  getY() == vector.getY() &&
222  getZ() == vector.getZ());
223  }
double getY() const
Get y position.
Definition: JVector3D.hh:102
double getX() const
Get x position.
Definition: JVector3D.hh:92
double getZ() const
Get z position.
Definition: JVector3D.hh:113
bool JGEOMETRY3D::JVersor3D::equals ( const JVersor3D versor) const
inlineinherited

Check equality.

Parameters
versorversor
Returns
true if versors are equal; else false

Definition at line 77 of file JVersor3D.hh.

78  {
79  return (getDX() == versor.getDX() &&
80  getDY() == versor.getDY() &&
81  getDZ() == versor.getDZ());
82  }
double getDY() const
Get y direction.
Definition: JVersor3D.hh:101
double getDX() const
Get x direction.
Definition: JVersor3D.hh:90
double getDZ() const
Get z direction.
Definition: JVersor3D.hh:112
double JGEOMETRY3D::JVector3D::getLengthSquared ( ) const
inlineinherited

Get length squared.

Returns
square of length

Definition at line 231 of file JVector3D.hh.

232  {
233  return getX()*getX() + getY()*getY() + getZ()*getZ();
234  }
double getY() const
Get y position.
Definition: JVector3D.hh:102
double getX() const
Get x position.
Definition: JVector3D.hh:92
double getZ() const
Get z position.
Definition: JVector3D.hh:113
double JGEOMETRY3D::JVector3D::getLength ( ) const
inlineinherited

Get length.

Returns
length

Definition at line 242 of file JVector3D.hh.

243  {
244  return sqrt(getLengthSquared());
245  }
double getLengthSquared() const
Get length squared.
Definition: JVector3D.hh:231
JVector3D& JGEOMETRY3D::JVector3D::cross ( const JVector3D first,
const JVector3D second 
)
inlineinherited

Get cross product.

Note that this vector should not overlap with the first or second vector,

Parameters
firstfirst vector
secondsecond vector
Returns
this vector

Definition at line 295 of file JVector3D.hh.

297  {
298  __x = first .getY() * second.getZ() - second.getY() * first .getZ();
299  __y = second.getX() * first .getZ() - first .getX() * second.getZ();
300  __z = first .getX() * second.getY() - second.getX() * first .getY();
301 
302  return *this;
303  }
double getY() const
Get y position.
Definition: JVector3D.hh:102
double getX() const
Get x position.
Definition: JVector3D.hh:92
double getZ() const
Get z position.
Definition: JVector3D.hh:113
const JDirection3D& JGEOMETRY3D::JDirection3D::getDirection ( ) const
inlineinherited

Get direction.

Returns
direction

Definition at line 106 of file JDirection3D.hh.

107  {
108  return static_cast<const JDirection3D&>(*this);
109  }
Data structure for direction in three dimensions.
Definition: JDirection3D.hh:32
JDirection3D& JGEOMETRY3D::JDirection3D::getDirection ( )
inlineinherited

Get direction.

Returns
direction

Definition at line 117 of file JDirection3D.hh.

118  {
119  return static_cast<JDirection3D&>(*this);
120  }
Data structure for direction in three dimensions.
Definition: JDirection3D.hh:32
void JGEOMETRY3D::JDirection3D::setDirection ( const JDirection3D dir)
inlineinherited

Set direction.

Parameters
dirdirection

Definition at line 128 of file JDirection3D.hh.

129  {
130  static_cast<JDirection3D&>(*this) = dir;
131  }
Data structure for direction in three dimensions.
Definition: JDirection3D.hh:32
JGEOMETRY3D::JDirection3D::operator JVector3D ( ) const
inlineinherited

Type conversion operator.

Returns
position

Definition at line 149 of file JDirection3D.hh.

150  {
151  return JVector3D(getDX(), getDY(), getDZ());
152  }
Data structure for vector in three dimensions.
Definition: JVector3D.hh:32
double getDY() const
Get y direction.
Definition: JVersor3D.hh:101
double getDX() const
Get x direction.
Definition: JVersor3D.hh:90
double getDZ() const
Get z direction.
Definition: JVersor3D.hh:112
double JGEOMETRY3D::JVersor3D::getDX ( ) const
inlineinherited

Get x direction.

Returns
x direction

Definition at line 90 of file JVersor3D.hh.

91  {
92  return __dx;
93  }
double JGEOMETRY3D::JVersor3D::getDY ( ) const
inlineinherited

Get y direction.

Returns
y direction

Definition at line 101 of file JVersor3D.hh.

102  {
103  return __dy;
104  }
double JGEOMETRY3D::JVersor3D::getDZ ( ) const
inlineinherited

Get z direction.

Returns
z direction

Definition at line 112 of file JVersor3D.hh.

113  {
114  return __dz;
115  }
double JGEOMETRY3D::JVersor3D::getTheta ( ) const
inlineinherited

Get theta angle.

Returns
theta angle [rad]

Definition at line 123 of file JVersor3D.hh.

124  {
125  if (__dz > +1.0)
126  return 0.0;
127  else if (__dz < -1.0)
128  return JTOOLS::PI;
129  else
130  return acos(__dz);
131  }
static const double PI
Constants.
Definition: JConstants.hh:20
double JGEOMETRY3D::JVersor3D::getPhi ( ) const
inlineinherited

Get phi angle.

Returns
phi angle [rad]

Definition at line 139 of file JVersor3D.hh.

140  {
141  return atan2(__dy, __dx);
142  }
JVersor3D& JGEOMETRY3D::JVersor3D::normalise ( )
inlineinherited

Normalise versor.

This operation may set the result to the unit z-vector.

Returns
this versor

Definition at line 166 of file JVersor3D.hh.

167  {
168  const double v = sqrt(getDX()*getDX() + getDY()*getDY() + getDZ()*getDZ());
169 
170  if (v != 0.0) {
171  __dx /= v;
172  __dy /= v;
173  __dz /= v;
174  }
175 
176  return *this;
177  }
double getDY() const
Get y direction.
Definition: JVersor3D.hh:101
double getDX() const
Get x direction.
Definition: JVersor3D.hh:90
double getDZ() const
Get z direction.
Definition: JVersor3D.hh:112

Member Data Documentation

int KM3NETDAQ::JDAQChronometer::detector_id
protectedinherited

Definition at line 237 of file JDAQChronometer.hh.

int KM3NETDAQ::JDAQChronometer::run
protectedinherited

Definition at line 238 of file JDAQChronometer.hh.

int KM3NETDAQ::JDAQChronometer::frame_index
protectedinherited

Definition at line 239 of file JDAQChronometer.hh.

JDAQUTCExtended KM3NETDAQ::JDAQChronometer::timeslice_start
protectedinherited

Definition at line 240 of file JDAQChronometer.hh.

int KM3NETDAQ::JDAQPMTIdentifier::address
protectedinherited

Definition at line 185 of file JDAQPMTIdentifier.hh.

int KM3NETDAQ::JDAQModuleIdentifier::id
protectedinherited

Definition at line 153 of file JDAQModuleIdentifier.hh.

double JGEOMETRY3D::JVector3D::__x
protectedinherited

Definition at line 306 of file JVector3D.hh.

double JGEOMETRY3D::JVector3D::__y
protectedinherited

Definition at line 307 of file JVector3D.hh.

double JGEOMETRY3D::JVector3D::__z
protectedinherited

Definition at line 308 of file JVector3D.hh.

double JGEOMETRY3D::JVersor3D::__dx
protectedinherited

Definition at line 180 of file JVersor3D.hh.

double JGEOMETRY3D::JVersor3D::__dy
protectedinherited

Definition at line 181 of file JVersor3D.hh.

double JGEOMETRY3D::JVersor3D::__dz
protectedinherited

Definition at line 182 of file JVersor3D.hh.


The documentation for this struct was generated from the following file: