Jpp 19.3.0-rc.1
the software that should make you happy
Loading...
Searching...
No Matches
JFIT::JVectorNZ Class Reference

Determination of the time residual vector of hits for a track along z-axis (JFIT::JLine1Z). More...

#include <JVectorNZ.hh>

Inheritance diagram for JFIT::JVectorNZ:
JMATH::JVectorND std::vector< double >

Public Member Functions

 JVectorNZ ()
 Default contructor.
 
template<class T >
 JVectorNZ (const JLine1Z &track, T __begin, T __end)
 Constructor.
 
template<class T >
void set (const JLine1Z &track, T __begin, T __end)
 Set time residual vector.
 
void reset ()
 Reset.
 
double getDot (const JVectorND &vector) const
 Get dot product.
 

Detailed Description

Determination of the time residual vector of hits for a track along z-axis (JFIT::JLine1Z).

Definition at line 21 of file JVectorNZ.hh.

Constructor & Destructor Documentation

◆ JVectorNZ() [1/2]

JFIT::JVectorNZ::JVectorNZ ( )
inline

Default contructor.

Definition at line 28 of file JVectorNZ.hh.

29 {}

◆ JVectorNZ() [2/2]

template<class T >
JFIT::JVectorNZ::JVectorNZ ( const JLine1Z & track,
T __begin,
T __end )
inline

Constructor.

The template argument T refers to an iterator of a data structure which should have the following member methods:

  • double getX(); // [m]
  • double getY(); // [m]
  • double getZ(); // [m]
  • double getT(); // [ns]
Parameters
tracktrack
__beginbegin of data
__endend of data

Definition at line 46 of file JVectorNZ.hh.

49 {
50 set(track, __begin, __end);
51 }
void set(const JLine1Z &track, T __begin, T __end)
Set time residual vector.
Definition JVectorNZ.hh:68

Member Function Documentation

◆ set()

template<class T >
void JFIT::JVectorNZ::set ( const JLine1Z & track,
T __begin,
T __end )
inline

Set time residual vector.

The template argument T refers to an iterator of a data structure which should have the following member methods:

  • double getX(); // [m]
  • double getY(); // [m]
  • double getZ(); // [m]
  • double getT(); // [ns]
Parameters
tracktrack
__beginbegin of data
__endend of data

Definition at line 68 of file JVectorNZ.hh.

71 {
73
74 this->clear();
75
76 for (T hit = __begin; hit != __end; ++hit) {
77 this->push_back(hit->getT() - track.getT(JVector3D(hit->getX(),
78 hit->getY(),
79 hit->getZ())));
80 }
81 }
Data structure for vector in three dimensions.
Definition JVector3D.hh:36

◆ reset()

void JMATH::JVectorND::reset ( )
inlineinherited

Reset.

Definition at line 45 of file JVectorND.hh.

46 {
47 for (iterator i = this->begin(); i != this->end(); ++i) {
48 *i = 0.0;
49 }
50 }

◆ getDot()

double JMATH::JVectorND::getDot ( const JVectorND & vector) const
inlineinherited

Get dot product.

Parameters
vectorvector
Returns
dot product

Definition at line 59 of file JVectorND.hh.

60 {
61 double dot = 0.0;
62
63 const double* p = this-> data();
64 const double* q = vector.data();
65
66 for (size_t i = this->size(); i != 0; --i, ++p, ++q) {
67 dot += (*p) * (*q);
68 }
69
70 return dot;
71 }

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