ATLAS Offline Software
Loading...
Searching...
No Matches
ExampleHit.h
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2025 CERN for the benefit of the ATLAS collaboration
3*/
4
5#ifndef ATHENAPOOLEXAMPLEDATA_EXAMPLEHIT_H
6#define ATHENAPOOLEXAMPLEDATA_EXAMPLEHIT_H
7
13
14#include "GaudiKernel/DataObject.h"
16#include <CLHEP/Geometry/Vector3D.h>
17
18#include <string>
19
24class ExampleHit : public DataObject, public NavigableTerminalNode {
25
26public: // Constructor and Destructor
28 ExampleHit() = default;
30 virtual ~ExampleHit() = default;
31
32public: // Non-static members
34 double getX() const { return(m_vec.x()); }
35
37 double getY() const { return(m_vec.y()); }
38
40 double getZ() const { return(m_vec.z()); }
41
43 const std::string& getDetector() const { return(m_detector); }
44
47 void setX(double x) { m_vec.setX(x); }
48
51 void setY(double y) { m_vec.setY(y); }
52
55 void setZ(double z) { m_vec.setZ(z); }
56
59 void setDetector(const std::string& detector) { m_detector = detector; }
60
61private:
62 HepGeom::Vector3D<double> m_vec{0.0, 0.0, 0.0};
63 std::string m_detector;
64};
65#endif
#define y
#define x
#define z
void setZ(double z)
Set the Z coordinate.
Definition ExampleHit.h:55
void setX(double x)
Set the X coordinate.
Definition ExampleHit.h:47
double getZ() const
Definition ExampleHit.h:40
virtual ~ExampleHit()=default
Destructor.
ExampleHit()=default
Default Constructor.
void setDetector(const std::string &detector)
Set the detector string.
Definition ExampleHit.h:59
std::string m_detector
Definition ExampleHit.h:63
double getX() const
Definition ExampleHit.h:34
void setY(double y)
Set the Y coordinate.
Definition ExampleHit.h:51
HepGeom::Vector3D< double > m_vec
Definition ExampleHit.h:62
double getY() const
Definition ExampleHit.h:37
const std::string & getDetector() const
Definition ExampleHit.h:43