Jpp test-rotations-old
the software that should make you happy
Loading...
Searching...
No Matches
JTRIGGER::JFrame< JElement_t, JAllocator_t > Class Template Reference

Data frame for calibrated hits of one PMT. More...

#include <JFrame.hh>

Inheritance diagram for JTRIGGER::JFrame< JElement_t, JAllocator_t >:
JTRIGGER::JPMTHeader JDETECTOR::JCalibration JTRIGGER::JFrame_t< JElement_t, JAllocator_t > KM3NETDAQ::JDAQChronometer KM3NETDAQ::JDAQPMTIdentifier JGEOMETRY3D::JAxis3D std::vector< JElement_t, JAllocator_t > JTRIGGER::JHitToolkit< JElement_t > KM3NETDAQ::JDAQModuleIdentifier JGEOMETRY3D::JPosition3D JGEOMETRY3D::JDirection3D JGEOMETRY3D::JVector3D JGEOMETRY3D::JVersor3D JMATH::JMath< JFirst_t, JSecond_t > JMATH::JMath< JFirst_t, JSecond_t >

Public Types

typedef JFrame_t< JElement_t, JAllocator_t > container_type
 
typedef JElement_t value_type
 
typedef JMatch< JElement_t > match_type
 
typedef container_type::iterator iterator
 
typedef container_type::const_iterator const_iterator
 
typedef container_type::reverse_iterator reverse_iterator
 
typedef container_type::const_reverse_iterator const_reverse_iterator
 

Public Member Functions

 JFrame ()
 Default constructor.
 
 JFrame (const JDAQChronometer &chronometer, const JDAQPMTIdentifier &id, const JAxis3D &axis, const JCalibration &calibration)
 Constructor.
 
void push_back (const JDAQHit &hit)
 Append DAQ hit.
 
void applyHighRateVeto (const double rate_Hz)
 Apply high-rate veto.
 
void join (const match_type &match)
 Join consecutive hits when matched according given criterion.
 
void filter (const match_type &match)
 Filter consecutive hits when matched according given criterion.
 
void remove (const match_type &match)
 Remove consecutive hits when matched according given criterion.
 
const JPMTHeadergetPMTHeader () const
 Get PMT header.
 
void setPMTHeader (const JPMTHeader &header)
 Set PMT header.
 
const JDAQChronometergetDAQChronometer () const
 Get DAQ chronometer.
 
void setDAQChronometer (const JDAQChronometer &chronometer)
 Set DAQ chronometer.
 
int getDetectorID () const
 Get detector identifier.
 
int getRunNumber () const
 Get run number.
 
int getFrameIndex () const
 Get frame index.
 
JDAQUTCExtended getTimesliceStart () const
 Get start of timeslice.
 
void setRunNumber (const int run)
 Set run number.
 
void setFrameIndex (const int frame_index)
 Set frame index.
 
void setTimesliceStart (const JDAQUTCExtended &timeslice_start)
 Set timeslice start time.
 
 ClassDef (JDAQChronometer, 3)
 
const JDAQPMTIdentifiergetPMTIdentifier () const
 Get PMT identifier.
 
void setPMTIdentifier (const JDAQPMTIdentifier &pmt)
 Set PMT identifier.
 
int getPMTAddress () const
 Get PMT identifier.
 
 ClassDefNV (JDAQPMTIdentifier, 1)
 
 ClassDefNV (JDAQModuleIdentifier, 1)
 
const JDAQModuleIdentifiergetModuleIdentifier () const
 Get Module identifier.
 
void setModuleIdentifier (const JDAQModuleIdentifier &module)
 Set Module identifier.
 
int getModuleID () const
 Get module identifier.
 
const JAxis3DgetAxis () const
 Get axis.
 
void setAxis (const JAxis3D &axis)
 Set axis.
 
JAxis3Dnegate ()
 Negate axis.
 
void move (const double step)
 Move vertex along this axis.
 
double getIntersection (const JVector3D &pos) const
 Get longitudinal position along axis of position of closest approach with given position.
 
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.
 
double getDistanceSquared (const JVector3D &pos) const
 Get distance squared.
 
double getDistance (const JVector3D &pos) const
 Get distance.
 
JAxis3Drotate (const JRotation3D &R)
 Rotate axis.
 
JAxis3Drotate (const JRotation3X &R)
 Rotate around X-axis.
 
JAxis3Drotate (const JRotation3Y &R)
 Rotate around Y-axis.
 
JAxis3Drotate (const JRotation3Z &R)
 Rotate around Z-axis.
 
JAxis3Drotate (const JQuaternion3D &Q)
 Rotate axis.
 
JAxis3Drotate_back (const JRotation3D &R)
 Rotate back axis.
 
JAxis3Drotate_back (const JRotation3X &R)
 Rotate back around X-axis.
 
JAxis3Drotate_back (const JRotation3Y &R)
 Rotate back around Y-axis.
 
JAxis3Drotate_back (const JRotation3Z &R)
 Rotate back around Z-axis.
 
JPosition3Drotate_back (const JQuaternion3D &Q)
 Rotate back.
 
JDirection3Drotate_back (const JQuaternion3D &Q)
 Rotate back.
 
void transform (const JAxis3D &axis)
 Transform axis to reference frame of given axis.
 
void transform (const JRotation3D &R, const JVector3D &pos)
 Transform axis.
 
void transform (const JTransformation3D &T)
 Transform axis.
 
JVector3Dtransform (const JMatrix3D &T)
 Transform.
 
JDirection3Dtransform (const JMatrix3D &T)
 Transform.
 
void transform_back (const JRotation3D &R, const JVector3D &pos)
 Transform back axis.
 
void transform_back (const JTransformation3D &T)
 Transform back axis.
 
double getDot (const JAngle3D &angle) const
 Get dot product.
 
double getDot (const JVector3D &pos) const
 Get dot product.
 
double getDot (const JVersor3Z &dir) const
 Get dot product.
 
double getDot (const JVersor3D &dir) const
 Get dot product.
 
double getDot (const JVersor3D &versor) const
 Get dot product.
 
const JPosition3DgetPosition () const
 Get position.
 
JPosition3DgetPosition ()
 Get position.
 
void setPosition (const JVector3D &pos)
 Set position.
 
 operator JAngle3D () const
 Type conversion operator.
 
 operator JAngle3D () const
 Type conversion operator.
 
 operator JVersor3D () const
 Type conversion operator.
 
 operator JVector2D () const
 Type conversion operator.
 
double getX () const
 Get x position.
 
double getY () const
 Get y position.
 
double getZ () const
 Get z position.
 
JVector3Dadd (const JVector3D &vector)
 Add vector.
 
JVector3Dsub (const JVector3D &vector)
 Subtract vector.
 
JVector3Dmul (const double factor)
 Scale vector.
 
JFirst_t & mul (const JSecond_t &object)
 Multiply with object.
 
JFirst_t & mul (const JSecond_t &object)
 Multiply with object.
 
JVector3Ddiv (const double factor)
 Scale vector.
 
bool equals (const JVector3D &vector, const double precision=std::numeric_limits< double >::min()) const
 Check equality.
 
bool equals (const JVersor3D &versor, const double precision=std::numeric_limits< double >::min()) const
 Check equality.
 
double getLengthSquared () const
 Get length squared.
 
double getLength () const
 Get length.
 
JVector3DgetCross (const JVector3D &first, const JVector3D &second)
 Get cross product.
 
JVersor3DgetCross (const JVersor3D &first, const JVersor3D &second)
 Get cross product.
 
const JDirection3DgetDirection () const
 Get direction.
 
JDirection3DgetDirection ()
 Get direction.
 
void setDirection (const JDirection3D &dir)
 Set direction.
 
 operator JVector3D () const
 Type conversion operator.
 
double getDX () const
 Get x direction.
 
double getDY () const
 Get y direction.
 
double getDZ () const
 Get z direction.
 
double getTheta () const
 Get theta angle.
 
double getPhi () const
 Get phi angle.
 
JVersor3Dnormalise ()
 Normalise versor.
 
const JCalibrationgetCalibration () const
 Get calibration.
 
JCalibrationgetCalibration ()
 Get calibration.
 
void setCalibration (const JCalibration &cal)
 Set calibration.
 
double getT0 () const
 Get time offset.
 
void setT0 (const double t0)
 Set time offset.
 
void addT0 (const double t0)
 Add time offset.
 
void subT0 (const double t0)
 Subtract time offset.
 
bool hasEndMarker () const
 Check presence of end marker.
 
void putEndMarker ()
 Append end marker to data.
 
void reset ()
 Reset.
 

Static Public Member Functions

static bool compare (const JDAQPMTIdentifier &first, const JDAQPMTIdentifier &second)
 Compare PMT identifiers.
 

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
 
double t0
 

Detailed Description

template<class JElement_t, class JAllocator_t = std::allocator<JElement_t>>
class JTRIGGER::JFrame< JElement_t, JAllocator_t >

Data frame for calibrated hits of one PMT.

Note that the calibration is applied on the fly in the member method JFrame::push_back.

Definition at line 34 of file JFrame.hh.

Member Typedef Documentation

◆ container_type

template<class JElement_t , class JAllocator_t = std::allocator<JElement_t>>
JFrame_t<JElement_t, JAllocator_t> JTRIGGER::JFrame< JElement_t, JAllocator_t >::container_type

Definition at line 41 of file JFrame.hh.

◆ value_type

template<class JElement_t , class JAllocator_t = std::allocator<JElement_t>>
JElement_t JTRIGGER::JFrame< JElement_t, JAllocator_t >::value_type

Definition at line 42 of file JFrame.hh.

◆ match_type

template<class JElement_t , class JAllocator_t = std::allocator<JElement_t>>
JMatch<JElement_t> JTRIGGER::JFrame< JElement_t, JAllocator_t >::match_type

Definition at line 43 of file JFrame.hh.

◆ iterator

template<class JElement_t , class JAllocator_t = std::allocator<JElement_t>>
container_type::iterator JTRIGGER::JFrame< JElement_t, JAllocator_t >::iterator

Definition at line 45 of file JFrame.hh.

◆ const_iterator

template<class JElement_t , class JAllocator_t = std::allocator<JElement_t>>
container_type::const_iterator JTRIGGER::JFrame< JElement_t, JAllocator_t >::const_iterator

Definition at line 46 of file JFrame.hh.

◆ reverse_iterator

template<class JElement_t , class JAllocator_t = std::allocator<JElement_t>>
container_type::reverse_iterator JTRIGGER::JFrame< JElement_t, JAllocator_t >::reverse_iterator

Definition at line 47 of file JFrame.hh.

◆ const_reverse_iterator

template<class JElement_t , class JAllocator_t = std::allocator<JElement_t>>
container_type::const_reverse_iterator JTRIGGER::JFrame< JElement_t, JAllocator_t >::const_reverse_iterator

Definition at line 48 of file JFrame.hh.

Constructor & Destructor Documentation

◆ JFrame() [1/2]

template<class JElement_t , class JAllocator_t = std::allocator<JElement_t>>
JTRIGGER::JFrame< JElement_t, JAllocator_t >::JFrame ( )
inline

Default constructor.

Definition at line 56 of file JFrame.hh.

57 {}

◆ JFrame() [2/2]

template<class JElement_t , class JAllocator_t = std::allocator<JElement_t>>
JTRIGGER::JFrame< JElement_t, JAllocator_t >::JFrame ( const JDAQChronometer & chronometer,
const JDAQPMTIdentifier & id,
const JAxis3D & axis,
const JCalibration & calibration )
inline

Constructor.

Parameters
chronometerDAQ chronometer
idPMT identifier
axisPMT axis
calibrationcalibration

Definition at line 68 of file JFrame.hh.

71 :
72 JPMTHeader (chronometer, id, axis),
75 {}
JCalibration()
Default constructor.
JFrame_t()
Default constructor.
Definition JFrame_t.hh:37
Calibration.
Definition JHead.hh:330
JPMTHeader()
Default constructor.
Definition JPMTHeader.hh:34

Member Function Documentation

◆ push_back()

template<class JElement_t , class JAllocator_t = std::allocator<JElement_t>>
void JTRIGGER::JFrame< JElement_t, JAllocator_t >::push_back ( const JDAQHit & hit)
inline

Append DAQ hit.

The time calibration is applied before the hit is appended.

Parameters
hitDAQ hit

Definition at line 85 of file JFrame.hh.

86 {
87 container_type::push_back(this->getHit(hit, this->getCalibration()));
88 }
const JCalibration & getCalibration() const
Get calibration.

◆ applyHighRateVeto()

template<class JElement_t , class JAllocator_t = std::allocator<JElement_t>>
void JTRIGGER::JFrame< JElement_t, JAllocator_t >::applyHighRateVeto ( const double rate_Hz)
inline

Apply high-rate veto.

If vetoed, the container is cleared and an end marker is put.

Parameters
rate_Hzhigh-rate veto [Hz]

Definition at line 98 of file JFrame.hh.

99 {
101
102 if (this->size() * 1.0e9 / getFrameTime() > rate_Hz) {
103 this->reset();
104 }
105 }
void reset()
Reset.
Definition JFrame_t.hh:126
double getFrameTime()
Get frame time duration.
Definition JDAQClock.hh:162

◆ join()

template<class JElement_t , class JAllocator_t = std::allocator<JElement_t>>
void JTRIGGER::JFrame< JElement_t, JAllocator_t >::join ( const match_type & match)
inline

Join consecutive hits when matched according given criterion.

Parameters
matchmatch criterion

Definition at line 113 of file JFrame.hh.

114 {
115 iterator out = this->begin();
116
117 for (const_iterator p = this->begin(); p != this->end(); ) {
118
119 *out = *p;
120
121 while (++p != this->end() && match(*out,*p)) {
122 *out = join(*out,*p);
123 }
124
125 ++out;
126 }
127
128 if (out != this->end()) {
129 this->erase(out, this->end());
130 this->putEndMarker();
131 }
132 }
void putEndMarker()
Append end marker to data.
Definition JFrame_t.hh:111
void join(const match_type &match)
Join consecutive hits when matched according given criterion.
Definition JFrame.hh:113
container_type::const_iterator const_iterator
Definition JFrame.hh:46

◆ filter()

template<class JElement_t , class JAllocator_t = std::allocator<JElement_t>>
void JTRIGGER::JFrame< JElement_t, JAllocator_t >::filter ( const match_type & match)
inline

Filter consecutive hits when matched according given criterion.

Parameters
matchmatch criterion

Definition at line 140 of file JFrame.hh.

141 {
142 iterator out = this->begin();
143
144 for (const_iterator p = this->begin(); p != this->end(); ) {
145
146 *out = *p;
147
148 for (const_iterator i = p++; p != this->end() && match(*i,*p); ++i, ++p) {}
149
150 ++out;
151 }
152
153 if (out != this->end()) {
154 this->erase(out, this->end());
155 this->putEndMarker();
156 }
157 }

◆ remove()

template<class JElement_t , class JAllocator_t = std::allocator<JElement_t>>
void JTRIGGER::JFrame< JElement_t, JAllocator_t >::remove ( const match_type & match)
inline

Remove consecutive hits when matched according given criterion.

Parameters
matchmatch criterion

Definition at line 165 of file JFrame.hh.

166 {
167 iterator out = this->begin();
168
169 for (const_iterator p = this->begin(); p != this->end(); ) {
170
171 const_iterator q = p;
172
173 for (const_iterator i = q++; q != this->end() && match(*i,*q); ++i, ++q) {}
174
175 if (std::distance(p,q) == 1) {
176 *out = *p;
177 ++out;
178 }
179
180 p = q;
181 }
182
183 if (out != this->end()) {
184 this->erase(out, this->end());
185 this->putEndMarker();
186 }
187 }

◆ getPMTHeader()

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

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:30

◆ setPMTHeader()

void JTRIGGER::JPMTHeader::setPMTHeader ( const JPMTHeader & header)
inlineinherited

Set PMT header.

Parameters
headerPMT header

Definition at line 73 of file JPMTHeader.hh.

74 {
75 static_cast<JPMTHeader&>(*this) = header;
76 }

◆ getDAQChronometer()

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 }

◆ setDAQChronometer()

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 }

◆ getDetectorID()

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 }

◆ getRunNumber()

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 }

◆ getFrameIndex()

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 }

◆ getTimesliceStart()

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 }

◆ setRunNumber()

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 }

◆ setFrameIndex()

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 }

◆ setTimesliceStart()

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 {
179 this->timeslice_start = timeslice_start;
180 }

◆ ClassDef()

KM3NETDAQ::JDAQChronometer::ClassDef ( JDAQChronometer ,
3  )
inherited

◆ getPMTIdentifier()

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 }

◆ setPMTIdentifier()

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 }

◆ getPMTAddress()

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 }

◆ compare()

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 126 of file JDAQPMTIdentifier.hh.

127 {
128 return ((first .getModuleIdentifier() == second.getModuleIdentifier() ||
129 first .getModuleIdentifier() == -1 ||
130 second.getModuleIdentifier() == -1) &&
131 (first .getPMTAddress() == second.getPMTAddress() ||
132 first .getPMTAddress() == -1 ||
133 second.getPMTAddress() == -1));
134 }
const JDAQModuleIdentifier & getModuleIdentifier() const
Get Module identifier.
int getPMTAddress() const
Get PMT identifier.

◆ ClassDefNV() [1/2]

KM3NETDAQ::JDAQPMTIdentifier::ClassDefNV ( JDAQPMTIdentifier ,
1  )
inherited

◆ ClassDefNV() [2/2]

KM3NETDAQ::JDAQModuleIdentifier::ClassDefNV ( JDAQModuleIdentifier ,
1  )
inherited

◆ getModuleIdentifier()

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 }

◆ setModuleIdentifier()

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 }

◆ getModuleID()

int KM3NETDAQ::JDAQModuleIdentifier::getModuleID ( ) const
inlineinherited

Get module identifier.

Returns
module identifier

Definition at line 72 of file JDAQModuleIdentifier.hh.

◆ getAxis()

const JAxis3D & JGEOMETRY3D::JAxis3D::getAxis ( ) const
inlineinherited

Get axis.

Returns
axis

Definition at line 98 of file JAxis3D.hh.

99 {
100 return *this;
101 }

◆ setAxis()

void JGEOMETRY3D::JAxis3D::setAxis ( const JAxis3D & axis)
inlineinherited

Set axis.

Parameters
axisaxis

Definition at line 109 of file JAxis3D.hh.

110 {
111 *this = axis;
112 }

◆ negate()

JAxis3D & JGEOMETRY3D::JAxis3D::negate ( )
inlineinherited

Negate axis.

Returns
this axis

Definition at line 120 of file JAxis3D.hh.

121 {
122 static_cast<JPosition3D&> (*this).negate();
123 static_cast<JDirection3D&>(*this).negate();
124
125 return *this;
126 }
JDirection3D()
Default constructor.
JPosition3D()
Default constructor.

◆ move()

void JGEOMETRY3D::JAxis3D::move ( const double step)
inlineinherited

Move vertex along this axis.

Parameters
stepstep

Definition at line 134 of file JAxis3D.hh.

135 {
136 getPosition() += step * JPosition3D(getDirection());
137 }
const JDirection3D & getDirection() const
Get direction.
const JPosition3D & getPosition() const
Get position.

◆ getIntersection() [1/2]

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 146 of file JAxis3D.hh.

147 {
148 JPosition3D D(pos);
149
150 D.sub(this->getPosition());
151
152 return D.getDot(this->getDirection());
153 }

◆ getIntersection() [2/2]

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 164 of file JAxis3D.hh.

165 {
166 JPosition3D pos(getPosition ());
168
169 const JRotation3D R(axis.getDirection());
170
171 // offset this position with position of given axis
172
173 pos.sub(axis.getPosition());
174
175 // rotate along given axis
176
177 pos.rotate(R);
178 dir.rotate(R);
179
180 // longitudinal position at minimal distance of approach
181
182 const double alpha = pos.getX() * dir.getDX() + pos.getY() * dir.getDY();
183 const double beta = dir.getDX() * dir.getDX() + dir.getDY() * dir.getDY();
184
185 return (fabs(beta) > precision ? -alpha/beta : -pos.getZ());
186 }

◆ getDistanceSquared()

double JGEOMETRY3D::JAxis3D::getDistanceSquared ( const JVector3D & pos) const
inlineinherited

Get distance squared.

Parameters
posposition
Returns
square of distance

Definition at line 195 of file JAxis3D.hh.

196 {
197 JPosition3D D(pos);
198
199 D.sub(this->getPosition());
200
201 const double dz = D.getDot(this->getDirection());
202
203 return D.getLengthSquared() - dz*dz;
204 }

◆ getDistance()

double JGEOMETRY3D::JAxis3D::getDistance ( const JVector3D & pos) const
inlineinherited

Get distance.

Parameters
pososition
Returns
distance

Definition at line 213 of file JAxis3D.hh.

214 {
215 return sqrt(this->getDistanceSquared(pos));
216 }
double getDistanceSquared(const JVector3D &pos) const
Get distance squared.
Definition JAxis3D.hh:195

◆ rotate() [1/5]

JAxis3D & JGEOMETRY3D::JAxis3D::rotate ( const JRotation3D & R)
inlineinherited

Rotate axis.

Parameters
Rrotation matrix
Returns
this axis

Definition at line 225 of file JAxis3D.hh.

226 {
227 static_cast<JPosition3D&> (*this).rotate(R);
228 static_cast<JDirection3D&>(*this).rotate(R);
229
230 return *this;
231 }

◆ rotate() [2/5]

JAxis3D & JGEOMETRY3D::JAxis3D::rotate ( const JRotation3X & R)
inlineinherited

Rotate around X-axis.

Parameters
Rrotation matrix
Returns
this axis

Definition at line 255 of file JAxis3D.hh.

256 {
257 static_cast<JPosition3D&> (*this).rotate(R);
258 static_cast<JDirection3D&>(*this).rotate(R);
259
260 return *this;
261 }

◆ rotate() [3/5]

JAxis3D & JGEOMETRY3D::JAxis3D::rotate ( const JRotation3Y & R)
inlineinherited

Rotate around Y-axis.

Parameters
Rrotation matrix
Returns
this axis

Definition at line 285 of file JAxis3D.hh.

286 {
287 static_cast<JPosition3D&> (*this).rotate(R);
288 static_cast<JDirection3D&>(*this).rotate(R);
289
290 return *this;
291 }

◆ rotate() [4/5]

JAxis3D & JGEOMETRY3D::JAxis3D::rotate ( const JRotation3Z & R)
inlineinherited

Rotate around Z-axis.

Parameters
Rrotation matrix
Returns
this axis

Definition at line 315 of file JAxis3D.hh.

316 {
317 static_cast<JPosition3D&> (*this).rotate(R);
318 static_cast<JDirection3D&>(*this).rotate(R);
319
320 return *this;
321 }

◆ rotate() [5/5]

JAxis3D & JGEOMETRY3D::JAxis3D::rotate ( const JQuaternion3D & Q)
inlineinherited

Rotate axis.

Parameters
Qquaternion
Returns
this axis

Definition at line 345 of file JAxis3D.hh.

346 {
347 static_cast<JPosition3D&> (*this).rotate(Q);
348 static_cast<JDirection3D&>(*this).rotate(Q);
349
350 return *this;
351 }

◆ rotate_back() [1/6]

JAxis3D & JGEOMETRY3D::JAxis3D::rotate_back ( const JRotation3D & R)
inlineinherited

Rotate back axis.

Parameters
Rrotation matrix
Returns
this axis

Definition at line 240 of file JAxis3D.hh.

241 {
242 static_cast<JPosition3D&> (*this).rotate_back(R);
243 static_cast<JDirection3D&>(*this).rotate_back(R);
244
245 return *this;
246 }

◆ rotate_back() [2/6]

JAxis3D & JGEOMETRY3D::JAxis3D::rotate_back ( const JRotation3X & R)
inlineinherited

Rotate back around X-axis.

Parameters
Rrotation matrix
Returns
this axis

Definition at line 270 of file JAxis3D.hh.

271 {
272 static_cast<JPosition3D&> (*this).rotate_back(R);
273 static_cast<JDirection3D&>(*this).rotate_back(R);
274
275 return *this;
276 }

◆ rotate_back() [3/6]

JAxis3D & JGEOMETRY3D::JAxis3D::rotate_back ( const JRotation3Y & R)
inlineinherited

Rotate back around Y-axis.

Parameters
Rrotation matrix
Returns
this axis

Definition at line 300 of file JAxis3D.hh.

301 {
302 static_cast<JPosition3D&> (*this).rotate_back(R);
303 static_cast<JDirection3D&>(*this).rotate_back(R);
304
305 return *this;
306 }

◆ rotate_back() [4/6]

JAxis3D & JGEOMETRY3D::JAxis3D::rotate_back ( const JRotation3Z & R)
inlineinherited

Rotate back around Z-axis.

Parameters
Rrotation matrix
Returns
his axis

Definition at line 330 of file JAxis3D.hh.

331 {
332 static_cast<JPosition3D&> (*this).rotate_back(R);
333 static_cast<JDirection3D&>(*this).rotate_back(R);
334
335 return *this;
336 }

◆ rotate_back() [5/6]

JPosition3D & JGEOMETRY3D::JPosition3D::rotate_back ( const JQuaternion3D & Q)
inlineinherited

Rotate back.

Parameters
Qquaternion
Returns
this position

Definition at line 312 of file JPosition3D.hh.

313 {
314 Q.rotate_back(__x, __y, __z);
315
316 return *this;
317 }

◆ rotate_back() [6/6]

JDirection3D & JGEOMETRY3D::JDirection3D::rotate_back ( const JQuaternion3D & Q)
inlineinherited

Rotate back.

Parameters
Qquaternion
Returns
this position

Definition at line 321 of file JDirection3D.hh.

322 {
323 Q.rotate_back(__dx, __dy, __dz);
324
325 return *this;
326 }

◆ transform() [1/5]

void JGEOMETRY3D::JAxis3D::transform ( const JAxis3D & axis)
inlineinherited

Transform axis to reference frame of given axis.

Parameters
axisaxis

Definition at line 359 of file JAxis3D.hh.

360 {
361 JRotation3D R (axis.getDirection());
362 JPosition3D pos(axis.getPosition ());
363
364 transform(R, pos.rotate(R));
365 }
void transform(const JAxis3D &axis)
Transform axis to reference frame of given axis.
Definition JAxis3D.hh:359

◆ transform() [2/5]

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 379 of file JAxis3D.hh.

381 {
382 JPosition3D& u = getPosition ();
384
385 // rotate axis to system such that direction is along z-axis
386
387 u.rotate(R);
388 v.rotate(R);
389
390 // offset with respect to origin
391
392 u.sub(pos);
393
394 // rotate axis to x-z plane such that position is in x-z plane
395
396 const double phi = atan2(u.getY(), u.getX());
397
398 const JRotation3Z r(-phi);
399
400 u.rotate(r);
401 v.rotate(r);
402 }

◆ transform() [3/5]

void JGEOMETRY3D::JAxis3D::transform ( const JTransformation3D & T)
inlineinherited

Transform axis.

Parameters
Ttransformation

Definition at line 437 of file JAxis3D.hh.

438 {
439 transform(T.getRotation(), T.getPosition());
440 }

◆ transform() [4/5]

JVector3D & JGEOMETRY3D::JVector3D::transform ( const JMatrix3D & T)
inlineinherited

Transform.

Parameters
Tmatrix
Returns
this vector

Definition at line 206 of file JVector3D.hh.

207 {
208 T.transform(__x, __y, __z);
209
210 return *this;
211 }

◆ transform() [5/5]

JDirection3D & JGEOMETRY3D::JDirection3D::transform ( const JMatrix3D & T)
inlineinherited

Transform.

Parameters
Tmatrix
Returns
this direction

Definition at line 163 of file JDirection3D.hh.

164 {
165 T.transform(__dx, __dy, __dz);
166
167 normalise();
168
169 return *this;
170 }
JVersor3D & normalise()
Normalise versor.
Definition JVersor3D.hh:192

◆ transform_back() [1/2]

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 415 of file JAxis3D.hh.

417 {
418 JPosition3D& u = getPosition ();
420
421 // offset with respect to origin
422
423 u.add(pos);
424
425 // rotate back axis to system with original particle direction
426
427 u.rotate_back(R);
428 v.rotate_back(R);
429 }

◆ transform_back() [2/2]

void JGEOMETRY3D::JAxis3D::transform_back ( const JTransformation3D & T)
inlineinherited

Transform back axis.

Parameters
Ttransformation

Definition at line 448 of file JAxis3D.hh.

449 {
450 transform_back(T.getRotation(), T.getPosition());
451 }
void transform_back(const JRotation3D &R, const JVector3D &pos)
Transform back axis.
Definition JAxis3D.hh:415

◆ getDot() [1/5]

double JGEOMETRY3D::JDirection3D::getDot ( const JAngle3D & angle) const
inlineinherited

Get dot product.

Parameters
angleangle
Returns
dot product

Definition at line 335 of file JDirection3D.hh.

336 {
337 return
338 getDX() * angle.getDX() +
339 getDY() * angle.getDY() +
340 getDZ() * angle.getDZ();
341 }
double getDY() const
Get y direction.
Definition JVersor3D.hh:106
double getDX() const
Get x direction.
Definition JVersor3D.hh:95
double getDZ() const
Get z direction.
Definition JVersor3D.hh:117

◆ getDot() [2/5]

double JGEOMETRY3D::JDirection3D::getDot ( const JVector3D & pos) const
inlineinherited

Get dot product.

Parameters
posposition
Returns
dot product

Definition at line 350 of file JDirection3D.hh.

351 {
352 return
353 getDX() * pos.getX() +
354 getDY() * pos.getY() +
355 getDZ() * pos.getZ();
356 }

◆ getDot() [3/5]

double JGEOMETRY3D::JDirection3D::getDot ( const JVersor3Z & dir) const
inlineinherited

Get dot product.

Parameters
dirdirection
Returns
dot product

Definition at line 365 of file JDirection3D.hh.

366 {
367 return
368 getDX() * dir.getDX() +
369 getDY() * dir.getDY() +
370 getDZ() * dir.getDZ();
371 }

◆ getDot() [4/5]

double JGEOMETRY3D::JPosition3D::getDot ( const JVersor3D & dir) const
inlineinherited

Get dot product.

Parameters
dirdirection
Returns
dot product

Definition at line 393 of file JPosition3D.hh.

394 {
395 return
396 getX() * dir.getDX() +
397 getY() * dir.getDY() +
398 getZ() * dir.getDZ();
399 }
double getY() const
Get y position.
Definition JVector3D.hh:104
double getZ() const
Get z position.
Definition JVector3D.hh:115
double getX() const
Get x position.
Definition JVector3D.hh:94

◆ getDot() [5/5]

double JGEOMETRY3D::JVersor3D::getDot ( const JVersor3D & versor) const
inlineinherited

Get dot product.

Parameters
versorversor
Returns
dot product

Definition at line 156 of file JVersor3D.hh.

157 {
158 return
159 getDX() * versor.getDX() +
160 getDY() * versor.getDY() +
161 getDZ() * versor.getDZ();
162 }

◆ getPosition() [1/2]

const JPosition3D & JGEOMETRY3D::JPosition3D::getPosition ( ) const
inlineinherited

Get position.

Returns
position

Definition at line 130 of file JPosition3D.hh.

131 {
132 return static_cast<const JPosition3D&>(*this);
133 }

◆ getPosition() [2/2]

JPosition3D & JGEOMETRY3D::JPosition3D::getPosition ( )
inlineinherited

Get position.

Returns
position

Definition at line 141 of file JPosition3D.hh.

142 {
143 return static_cast<JPosition3D&>(*this);
144 }

◆ setPosition()

void JGEOMETRY3D::JPosition3D::setPosition ( const JVector3D & pos)
inlineinherited

Set position.

Parameters
posposition

Definition at line 152 of file JPosition3D.hh.

153 {
154 static_cast<JVector3D&>(*this) = pos;
155 }
JVector3D()
Default constructor.
Definition JVector3D.hh:41

◆ operator JAngle3D() [1/2]

JGEOMETRY3D::JPosition3D::operator JAngle3D ( ) const
inlineinherited

Type conversion operator.

Returns
angle

Definition at line 163 of file JPosition3D.hh.

164 {
165 return JAngle3D(getX(), getY(), getZ());
166 }

◆ operator JAngle3D() [2/2]

JGEOMETRY3D::JDirection3D::operator JAngle3D ( ) const
inlineinherited

Type conversion operator.

Returns
angle

Definition at line 140 of file JDirection3D.hh.

141 {
142 return JAngle3D(getDX(), getDY(), getDZ());
143 }

◆ operator JVersor3D()

JGEOMETRY3D::JPosition3D::operator JVersor3D ( ) const
inlineinherited

Type conversion operator.

Returns
direction

Definition at line 174 of file JPosition3D.hh.

175 {
176 return JVersor3D(getX(), getY(), getZ());
177 }

◆ operator JVector2D()

JGEOMETRY3D::JVector3D::operator JVector2D ( ) const
inlineinherited

Type conversion operator.

Returns
JVector2D

Definition at line 83 of file JVector3D.hh.

84 {
85 return JVector2D(this->getX(), this->getY());
86 }

◆ getX()

double JGEOMETRY3D::JVector3D::getX ( ) const
inlineinherited

Get x position.

Returns
x position

Definition at line 94 of file JVector3D.hh.

95 {
96 return __x;
97 }

◆ getY()

double JGEOMETRY3D::JVector3D::getY ( ) const
inlineinherited

Get y position.

Returns
y position

Definition at line 104 of file JVector3D.hh.

105 {
106 return __y;
107 }

◆ getZ()

double JGEOMETRY3D::JVector3D::getZ ( ) const
inlineinherited

Get z position.

Returns
z position

Definition at line 115 of file JVector3D.hh.

116 {
117 return __z;
118 }

◆ add()

JVector3D & JGEOMETRY3D::JVector3D::add ( const JVector3D & vector)
inlineinherited

Add vector.

Parameters
vectorvector
Returns
this vector

Definition at line 142 of file JVector3D.hh.

143 {
144 __x += vector.getX();
145 __y += vector.getY();
146 __z += vector.getZ();
147
148 return *this;
149 }

◆ sub()

JVector3D & JGEOMETRY3D::JVector3D::sub ( const JVector3D & vector)
inlineinherited

Subtract vector.

Parameters
vectorvector
Returns
this vector

Definition at line 158 of file JVector3D.hh.

159 {
160 __x -= vector.getX();
161 __y -= vector.getY();
162 __z -= vector.getZ();
163
164 return *this;
165 }

◆ mul() [1/3]

JVector3D & JGEOMETRY3D::JVector3D::mul ( const double factor)
inlineinherited

Scale vector.

Parameters
factormultiplication factor
Returns
this vector

Definition at line 174 of file JVector3D.hh.

175 {
176 __x *= factor;
177 __y *= factor;
178 __z *= factor;
179
180 return *this;
181 }

◆ mul() [2/3]

template<class JFirst_t , class JSecond_t >
JFirst_t & JMATH::JMath< JFirst_t, JSecond_t >::mul ( const JSecond_t & object)
inlineinherited

Multiply with object.

Parameters
objectobject
Returns
result object

Definition at line 354 of file JMath.hh.

355 {
356 return static_cast<JFirst_t&>(*this) = JFirst_t().mul(static_cast<const JFirst_t&>(*this), object);
357 }

◆ mul() [3/3]

template<class JFirst_t , class JSecond_t >
JFirst_t & JMATH::JMath< JFirst_t, JSecond_t >::mul ( const JSecond_t & object)
inlineinherited

Multiply with object.

Parameters
objectobject
Returns
result object

Definition at line 354 of file JMath.hh.

355 {
356 return static_cast<JFirst_t&>(*this) = JFirst_t().mul(static_cast<const JFirst_t&>(*this), object);
357 }

◆ div()

JVector3D & JGEOMETRY3D::JVector3D::div ( const double factor)
inlineinherited

Scale vector.

Parameters
factordivision factor
Returns
this vector

Definition at line 190 of file JVector3D.hh.

191 {
192 __x /= factor;
193 __y /= factor;
194 __z /= factor;
195
196 return *this;
197 }

◆ equals() [1/2]

bool JGEOMETRY3D::JVector3D::equals ( const JVector3D & vector,
const double precision = std::numeric_limits<double>::min() ) const
inlineinherited

Check equality.

Parameters
vectorvector
precisionprecision
Returns
true if vectors are equal; else false

Definition at line 221 of file JVector3D.hh.

223 {
224 return (fabs(getX() - vector.getX()) <= precision &&
225 fabs(getY() - vector.getY()) <= precision &&
226 fabs(getZ() - vector.getZ()) <= precision);
227 }

◆ equals() [2/2]

bool JGEOMETRY3D::JVersor3D::equals ( const JVersor3D & versor,
const double precision = std::numeric_limits<double>::min() ) const
inlineinherited

Check equality.

Parameters
versorversor
precisionprecision
Returns
true if versors are equal; else false

Definition at line 81 of file JVersor3D.hh.

83 {
84 return (fabs(getDX() - versor.getDX()) <= precision &&
85 fabs(getDY() - versor.getDY()) <= precision &&
86 fabs(getDZ() - versor.getDZ()) <= precision);
87 }

◆ getLengthSquared()

double JGEOMETRY3D::JVector3D::getLengthSquared ( ) const
inlineinherited

Get length squared.

Returns
square of length

Definition at line 235 of file JVector3D.hh.

236 {
237 return getX()*getX() + getY()*getY() + getZ()*getZ();
238 }

◆ getLength()

double JGEOMETRY3D::JVector3D::getLength ( ) const
inlineinherited

Get length.

Returns
length

Definition at line 246 of file JVector3D.hh.

247 {
248 return sqrt(getLengthSquared());
249 }
double getLengthSquared() const
Get length squared.
Definition JVector3D.hh:235

◆ getCross() [1/2]

JVector3D & JGEOMETRY3D::JVector3D::getCross ( 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 299 of file JVector3D.hh.

301 {
302 __x = first .getY() * second.getZ() - second.getY() * first .getZ();
303 __y = second.getX() * first .getZ() - first .getX() * second.getZ();
304 __z = first .getX() * second.getY() - second.getX() * first .getY();
305
306 return *this;
307 }

◆ getCross() [2/2]

JVersor3D & JGEOMETRY3D::JVersor3D::getCross ( const JVersor3D & first,
const JVersor3D & second )
inlineinherited

Get cross product.

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

Parameters
firstfirst versor
secondsecond versor
Returns
this versor

Definition at line 173 of file JVersor3D.hh.

175 {
176 __dx = first .getDY() * second.getDZ() - second.getDY() * first .getDZ();
177 __dy = second.getDX() * first .getDZ() - first .getDX() * second.getDZ();
178 __dz = first .getDX() * second.getDY() - second.getDX() * first .getDY();
179
180 normalise();
181
182 return *this;
183 }

◆ getDirection() [1/2]

const JDirection3D & JGEOMETRY3D::JDirection3D::getDirection ( ) const
inlineinherited

Get direction.

Returns
direction

Definition at line 107 of file JDirection3D.hh.

108 {
109 return static_cast<const JDirection3D&>(*this);
110 }

◆ getDirection() [2/2]

JDirection3D & JGEOMETRY3D::JDirection3D::getDirection ( )
inlineinherited

Get direction.

Returns
direction

Definition at line 118 of file JDirection3D.hh.

119 {
120 return static_cast<JDirection3D&>(*this);
121 }

◆ setDirection()

void JGEOMETRY3D::JDirection3D::setDirection ( const JDirection3D & dir)
inlineinherited

Set direction.

Parameters
dirdirection

Definition at line 129 of file JDirection3D.hh.

130 {
131 static_cast<JDirection3D&>(*this) = dir;
132 }

◆ operator JVector3D()

JGEOMETRY3D::JDirection3D::operator JVector3D ( ) const
inlineinherited

Type conversion operator.

Returns
position

Definition at line 151 of file JDirection3D.hh.

152 {
153 return JVector3D(getDX(), getDY(), getDZ());
154 }

◆ getDX()

double JGEOMETRY3D::JVersor3D::getDX ( ) const
inlineinherited

Get x direction.

Returns
x direction

Definition at line 95 of file JVersor3D.hh.

96 {
97 return __dx;
98 }

◆ getDY()

double JGEOMETRY3D::JVersor3D::getDY ( ) const
inlineinherited

Get y direction.

Returns
y direction

Definition at line 106 of file JVersor3D.hh.

107 {
108 return __dy;
109 }

◆ getDZ()

double JGEOMETRY3D::JVersor3D::getDZ ( ) const
inlineinherited

Get z direction.

Returns
z direction

Definition at line 117 of file JVersor3D.hh.

118 {
119 return __dz;
120 }

◆ getTheta()

double JGEOMETRY3D::JVersor3D::getTheta ( ) const
inlineinherited

Get theta angle.

Returns
theta angle [rad]

Definition at line 128 of file JVersor3D.hh.

129 {
130 if (__dz > +1.0)
131 return 0.0;
132 else if (__dz < -1.0)
133 return JMATH::PI;
134 else
135 return acos(__dz);
136 }
static const double PI
Mathematical constants.

◆ getPhi()

double JGEOMETRY3D::JVersor3D::getPhi ( ) const
inlineinherited

Get phi angle.

Returns
phi angle [rad]

Definition at line 144 of file JVersor3D.hh.

145 {
146 return atan2(__dy, __dx);
147 }

◆ normalise()

JVersor3D & JGEOMETRY3D::JVersor3D::normalise ( )
inlineinherited

Normalise versor.

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

Returns
this versor

Definition at line 192 of file JVersor3D.hh.

193 {
194 const double v = sqrt(getDX()*getDX() + getDY()*getDY() + getDZ()*getDZ());
195
196 if (v != 0.0) {
197 __dx /= v;
198 __dy /= v;
199 __dz /= v;
200 }
201
202 return *this;
203 }

◆ getCalibration() [1/2]

const JCalibration & JDETECTOR::JCalibration::getCalibration ( ) const
inlineinherited

Get calibration.

Returns
calibration

Definition at line 67 of file JDetector/JCalibration.hh.

68 {
69 return *this;
70 }

◆ getCalibration() [2/2]

JCalibration & JDETECTOR::JCalibration::getCalibration ( )
inlineinherited

Get calibration.

Returns
calibration

Definition at line 78 of file JDetector/JCalibration.hh.

79 {
80 return *this;
81 }

◆ setCalibration()

void JDETECTOR::JCalibration::setCalibration ( const JCalibration & cal)
inlineinherited

Set calibration.

Parameters
calcalibration

Definition at line 89 of file JDetector/JCalibration.hh.

90 {
91 *this = cal;
92 }

◆ getT0()

double JDETECTOR::JCalibration::getT0 ( ) const
inlineinherited

Get time offset.

Returns
time offset [ns]

Definition at line 100 of file JDetector/JCalibration.hh.

101 {
102 return t0;
103 }

◆ setT0()

void JDETECTOR::JCalibration::setT0 ( const double t0)
inlineinherited

Set time offset.

Parameters
t0time offset [ns]

Definition at line 111 of file JDetector/JCalibration.hh.

112 {
113 this->t0 = t0;
114 }

◆ addT0()

void JDETECTOR::JCalibration::addT0 ( const double t0)
inlineinherited

Add time offset.

Parameters
t0time offset [ns]

Definition at line 122 of file JDetector/JCalibration.hh.

123 {
124 this->t0 += t0;
125 }

◆ subT0()

void JDETECTOR::JCalibration::subT0 ( const double t0)
inlineinherited

Subtract time offset.

Parameters
t0time offset [ns]

Definition at line 133 of file JDetector/JCalibration.hh.

134 {
135 this->t0 -= t0;
136 }

◆ hasEndMarker()

template<class JElement_t , class JAllocator_t = std::allocator<JElement_t>>
bool JTRIGGER::JFrame_t< JElement_t, JAllocator_t >::hasEndMarker ( ) const
inlineinherited

Check presence of end marker.

Returns
true if end marker present; else false

Definition at line 102 of file JFrame_t.hh.

103 {
104 return (this->capacity() > this->size() && this->getT(*(this->end())) == this->getT(this->getEndMarker()));
105 }

◆ putEndMarker()

template<class JElement_t , class JAllocator_t = std::allocator<JElement_t>>
void JTRIGGER::JFrame_t< JElement_t, JAllocator_t >::putEndMarker ( )
inlineinherited

Append end marker to data.

Definition at line 111 of file JFrame_t.hh.

112 {
113 if (this->capacity() <= this->size()) {
114 this->reserve(this->size() + 1);
115 }
116
117 *(this->end()) = this->getEndMarker();
118 }

◆ reset()

template<class JElement_t , class JAllocator_t = std::allocator<JElement_t>>
void JTRIGGER::JFrame_t< JElement_t, JAllocator_t >::reset ( )
inlineinherited

Reset.

Clear container and put end marker.

Definition at line 126 of file JFrame_t.hh.

127 {
128 this->clear();
129 this->putEndMarker();
130 }

Member Data Documentation

◆ detector_id

int KM3NETDAQ::JDAQChronometer::detector_id
protectedinherited

Definition at line 187 of file JDAQChronometer.hh.

◆ run

int KM3NETDAQ::JDAQChronometer::run
protectedinherited

Definition at line 188 of file JDAQChronometer.hh.

◆ frame_index

int KM3NETDAQ::JDAQChronometer::frame_index
protectedinherited

Definition at line 189 of file JDAQChronometer.hh.

◆ timeslice_start

JDAQUTCExtended KM3NETDAQ::JDAQChronometer::timeslice_start
protectedinherited

Definition at line 190 of file JDAQChronometer.hh.

◆ address

int KM3NETDAQ::JDAQPMTIdentifier::address
protectedinherited

Definition at line 141 of file JDAQPMTIdentifier.hh.

◆ id

int KM3NETDAQ::JDAQModuleIdentifier::id
protectedinherited

Definition at line 112 of file JDAQModuleIdentifier.hh.

◆ __x

double JGEOMETRY3D::JVector3D::__x
protectedinherited

Definition at line 310 of file JVector3D.hh.

◆ __y

double JGEOMETRY3D::JVector3D::__y
protectedinherited

Definition at line 311 of file JVector3D.hh.

◆ __z

double JGEOMETRY3D::JVector3D::__z
protectedinherited

Definition at line 312 of file JVector3D.hh.

◆ __dx

double JGEOMETRY3D::JVersor3D::__dx
protectedinherited

Definition at line 206 of file JVersor3D.hh.

◆ __dy

double JGEOMETRY3D::JVersor3D::__dy
protectedinherited

Definition at line 207 of file JVersor3D.hh.

◆ __dz

double JGEOMETRY3D::JVersor3D::__dz
protectedinherited

Definition at line 208 of file JVersor3D.hh.

◆ t0

double JDETECTOR::JCalibration::t0
protectedinherited

Definition at line 202 of file JDetector/JCalibration.hh.


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