Jpp  15.0.1-rc.1-highqe
the software that should make you happy
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
JVectorNZ.hh
Go to the documentation of this file.
1 #ifndef __JFIT__JVECTORNZ__
2 #define __JFIT__JVECTORNZ__
3 
4 #include "JFit/JLine1Z.hh"
5 #include "JMath/JVectorND.hh"
7 
8 
9 /**
10  * \author mdejong
11  */
12 
13 namespace JFIT {}
14 namespace JPP { using namespace JFIT; }
15 
16 namespace JFIT {
17 
18  /**
19  * Determination of the time residual vector of hits for a track along z-axis (JFIT::JLine1Z).
20  */
21  class JVectorNZ :
22  public JMATH::JVectorND
23  {
24  public:
25  /**
26  * Default contructor.
27  */
29  {}
30 
31 
32  /**
33  * Constructor.
34  *
35  * The template argument <tt>T</tt> refers to an iterator of a data structure which should have the following member methods:
36  * - double getX(); // [m]
37  * - double getY(); // [m]
38  * - double getZ(); // [m]
39  * - double getT(); // [ns]
40  *
41  * \param track track
42  * \param __begin begin of data
43  * \param __end end of data
44  */
45  template<class T>
46  JVectorNZ(const JLine1Z& track,
47  T __begin,
48  T __end)
49  {
50  set(track, __begin, __end);
51  }
52 
53 
54  /**
55  * Set time residual vector.
56  *
57  * The template argument <tt>T</tt> refers to an iterator of a data structure which should have the following member methods:
58  * - double getX(); // [m]
59  * - double getY(); // [m]
60  * - double getZ(); // [m]
61  * - double getT(); // [ns]
62  *
63  * \param track track
64  * \param __begin begin of data
65  * \param __end end of data
66  */
67  template<class T>
68  void set(const JLine1Z& track,
69  T __begin,
70  T __end)
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  }
82  };
83 }
84 
85 #endif
JVectorNZ()
Default contructor.
Definition: JVectorNZ.hh:28
Determination of the time residual vector of hits for a track along z-axis (JFIT::JLine1Z).
Definition: JVectorNZ.hh:21
Data structure for vector in three dimensions.
Definition: JVector3D.hh:34
do set_variable OUTPUT_DIRECTORY $WORKDIR T
void set(const JLine1Z &track, T __begin, T __end)
Set time residual vector.
Definition: JVectorNZ.hh:68
JVectorNZ(const JLine1Z &track, T __begin, T __end)
Constructor.
Definition: JVectorNZ.hh:46
double getT(const JVector3D &pos) const
Get arrival time of Cherenkov light at given position.
Definition: JLine1Z.hh:114
Data structure for fit of straight line paralel to z-axis.
Definition: JLine1Z.hh:27
Nx1 matrix.
Definition: JVectorND.hh:21