Jpp
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Public Member Functions | Friends | List of all members
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. More...
 
template<class T >
 JVectorNZ (const JLine1Z &track, T __begin, T __end)
 Constructor. More...
 
template<class T >
void set (const JLine1Z &track, T __begin, T __end)
 Set time residual vector. More...
 
double getDot (const JVectorND &vector) const
 Get dot product. More...
 

Friends

std::ostream & operator<< (std::ostream &out, const JVectorNZ &Y)
 Print ASCII formatted output. More...
 

Detailed Description

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

Definition at line 28 of file JVectorNZ.hh.

Constructor & Destructor Documentation

JFIT::JVectorNZ::JVectorNZ ( )
inline

Default contructor.

Definition at line 35 of file JVectorNZ.hh.

36  {}
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 53 of file JVectorNZ.hh.

56  {
57  set(track, __begin, __end);
58  }
void set(const JLine1Z &track, T __begin, T __end)
Set time residual vector.
Definition: JVectorNZ.hh:75

Member Function Documentation

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 75 of file JVectorNZ.hh.

78  {
80 
81  this->clear();
82 
83  for (T hit = __begin; hit != __end; ++hit) {
84  this->push_back(hit->getT() - track.getT(JVector3D(hit->getX(),
85  hit->getY(),
86  hit->getZ())));
87  }
88  }
Data structure for vector in three dimensions.
Definition: JVector3D.hh:33
do set_variable OUTPUT_DIRECTORY $WORKDIR T
double getT(const JVector3D &pos) const
Get arrival time of Cherenkov light at given position.
Definition: JLine1Z.hh:114
double JMATH::JVectorND::getDot ( const JVectorND vector) const
inlineinherited

Get dot product.

Parameters
vectorvector
Returns
dot product

Definition at line 41 of file JVectorND.hh.

42  {
43  double dot = 0.0;
44 
45  const double* p = this-> data();
46  const double* q = vector.data();
47 
48  for (size_t i = this->size(); i != 0; --i, ++p, ++q) {
49  dot += (*p) * (*q);
50  }
51 
52  return dot;
53  }

Friends And Related Function Documentation

std::ostream& operator<< ( std::ostream &  out,
const JVectorNZ Y 
)
friend

Print ASCII formatted output.

Parameters
outoutput stream
YY vector
Returns
output stream

Definition at line 98 of file JVectorNZ.hh.

99  {
100  using namespace std;
101 
102  JFlags flags(out);
103 
104  for (JVectorNZ::const_iterator i = Y.begin(); i != Y.end(); ++i) {
105  out << showpos << SCIENTIFIC(10,2) << *i << ' ';
106  }
107 
108  out << endl;
109 
110  return out;
111  }
Auxiliary data structure for floating point format specification.
Definition: JPrint.hh:518
Auxiliary class to temporarily modify format specifications.
Definition: JPrint.hh:617

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