Jpp 19.3.0-rc.1
the software that should make you happy
Loading...
Searching...
No Matches
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 */
10namespace JCOMPASS {}
11namespace JPP { using namespace JCOMPASS; }
12
13namespace 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(),
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),
51 z(z),
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
Data structure for unit quaternion in three dimensions.
Auxiliary class for object identification.
Definition JObjectID.hh:25
Auxiliary classes and methods for orientation calibration based on compasses.
This name space includes all other name spaces (except KM3NETDAQ, KM3NET and ANTARES).
double getSigma() const
Get resolution.
JHit(const int id, const double z, const JQuaternion3D &Q, const double sigma)
Constructor.
JHit()
Default constructor.
double getZ() const
Get z-position.