Jpp  17.3.2
the software that should make you happy
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
JCompass/JHit.hh
Go to the documentation of this file.
1 #ifndef __JCOMPASS_JHIT__
2 #define __JCOMPASS_JHIT__
3 
4 #include "JLang/JObjectID.hh"
6 
7 /**
8  * \author mdejong
9  */
10 namespace JCOMPASS {}
11 namespace JPP { using namespace JCOMPASS; }
12 
13 namespace JCOMPASS {
14 
15  using JLANG::JObjectID;
17 
18 
19  /**
20  * %Hit.
21  */
22  struct JHit :
23  public JObjectID,
24  public JQuaternion3D
25  {
26  /**
27  * Default constructor.
28  */
29  JHit() :
30  JObjectID(),
31  JQuaternion3D(),
32  z(0.0),
33  sigma(0.0)
34  {}
35 
36 
37  /**
38  * Constructor.
39  *
40  * \param id identifier
41  * \param z z-position
42  * \param Q quaternion
43  * \param sigma resolution [deg]
44  */
45  JHit(const int id,
46  const double z,
47  const JQuaternion3D& Q,
48  const double sigma) :
49  JObjectID(id),
50  JQuaternion3D(Q),
51  z(z),
52  sigma(sigma)
53  {}
54 
55 
56  /**
57  * Get z-position.
58  *
59  * \return z-position
60  */
61  double getZ() const
62  {
63  return z;
64  }
65 
66 
67  /**
68  * Get resolution.
69  *
70  * \return sigma
71  */
72  double getSigma() const
73  {
74  return sigma;
75  }
76 
77  protected:
78  double z;
79  double sigma;
80  };
81 }
82 
83 #endif
Q(UTCMax_s-UTCMin_s)-livetime_s
JHit()
Default constructor.
double getZ() const
Get z-position.
Data structure for unit quaternion in three dimensions.
Auxiliary class for object identification.
Definition: JObjectID.hh:22
double getSigma() const
Get resolution.
JHit(const int id, const double z, const JQuaternion3D &Q, const double sigma)
Constructor.