ATTPCROOT  0.3.0-alpha
A ROOT-based framework for analyzing data from active target detectors
AtSimulatedPoint.h
Go to the documentation of this file.
1 #ifndef AtSIMULAtEDPOINT_H
2 #define AtSIMULAtEDPOINT_H
3 
4 #include <Math/Vector3D.h>
5 #include <Math/Vector3Dfwd.h>
6 #include <Rtypes.h>
7 #include <TObject.h>
8 
9 #include <cstddef>
10 #include <utility> // for swap
11 
12 class TBuffer;
13 class TClass;
14 class TMemberInspector;
15 
16 class AtSimulatedPoint : public TObject {
17 
18 protected:
20  std::size_t fMCPointID;
21  std::size_t fMCEventID;
22  Int_t fClusterID;
23  Int_t fCharge{};
24 
26 
27 public:
29  AtSimulatedPoint(std::size_t mcPointID, Int_t clusterID, ROOT::Math::XYZVector pointLocation);
30  AtSimulatedPoint(std::size_t mcPointID, Int_t clusterID, Int_t charge, ROOT::Math::XYZVector pointLocation);
31  AtSimulatedPoint(const AtSimulatedPoint &object) = default;
33 
34  friend void swap(AtSimulatedPoint &first, AtSimulatedPoint &second)
35  {
36  using std::swap;
37  swap(first.fMCPointID, second.fMCPointID);
38  swap(first.fMCEventID, second.fMCEventID);
39  swap(first.fClusterID, second.fClusterID);
40  swap(first.fCharge, second.fCharge);
41  swap(first.fPosition, second.fPosition);
42  }
43 
44  ~AtSimulatedPoint() = default;
45 
46  void SetClusterID(Int_t clusterID);
47  void SetMCPointID(std::size_t id);
48  void SetMCEventID(std::size_t mcid);
49  void SetCharge(Int_t charge);
50 
51  Int_t GetCharge();
52  Int_t GetClusterID(); // Unique to each MCPoint in each MCEvent
54  std::size_t GetMCPointID();
55  std::size_t GetMCEventID();
56 
58 };
59 
60 #endif
swap
void swap(AtPad &a, AtPad &b) noexcept
Definition: AtPad.cxx:22
AtSimulatedPoint::AtSimulatedPoint
AtSimulatedPoint(const AtSimulatedPoint &object)=default
AtSimulatedPoint::operator=
AtSimulatedPoint & operator=(AtSimulatedPoint other)
Definition: AtSimulatedPoint.cxx:23
XYZVector
ROOT::Math::XYZVector XYZVector
Definition: AtFindVertex.h:20
AtSimulatedPoint::fMCPointID
std::size_t fMCPointID
< Cluster number
Definition: AtSimulatedPoint.h:20
AtSimulatedPoint::GetClusterID
Int_t GetClusterID()
Definition: AtSimulatedPoint.cxx:42
AtSimulatedPoint::GetMCPointID
std::size_t GetMCPointID()
Definition: AtSimulatedPoint.cxx:50
AtSimulatedPoint::ClassDef
ClassDef(AtSimulatedPoint, 3)
AtSimulatedPoint::fPosition
ROOT::Math::XYZVector fPosition
Definition: AtSimulatedPoint.h:25
AtSimulatedPoint
Definition: AtSimulatedPoint.h:16
AtSimulatedPoint::AtSimulatedPoint
AtSimulatedPoint()
Definition: AtSimulatedPoint.cxx:11
AtSimulatedPoint::SetMCEventID
void SetMCEventID(std::size_t mcid)
Definition: AtSimulatedPoint.cxx:37
AtSimulatedPoint::fCharge
Int_t fCharge
Definition: AtSimulatedPoint.h:23
AtSimulatedPoint::fMCEventID
std::size_t fMCEventID
Definition: AtSimulatedPoint.h:21
AtSimulatedPoint::SetMCPointID
void SetMCPointID(std::size_t id)
Definition: AtSimulatedPoint.cxx:33
AtSimulatedPoint::swap
friend void swap(AtSimulatedPoint &first, AtSimulatedPoint &second)
Definition: AtSimulatedPoint.h:34
AtSimulatedPoint::GetPosition
virtual ROOT::Math::XYZVector GetPosition()
Definition: AtSimulatedPoint.cxx:46
AtSimulatedPoint::SetCharge
void SetCharge(Int_t charge)
Definition: AtSimulatedPoint.cxx:58
AtSimulatedPoint::~AtSimulatedPoint
~AtSimulatedPoint()=default
AtSimulatedPoint::GetMCEventID
std::size_t GetMCEventID()
Definition: AtSimulatedPoint.cxx:54
AtSimulatedPoint::GetCharge
Int_t GetCharge()
Definition: AtSimulatedPoint.cxx:62
AtSimulatedPoint::SetClusterID
void SetClusterID(Int_t clusterID)
Definition: AtSimulatedPoint.cxx:29
AtSimulatedPoint::fClusterID
Int_t fClusterID
Definition: AtSimulatedPoint.h:22