GRSISort "v4.0.0.5"
An extension of the ROOT analysis Framework
Loading...
Searching...
No Matches
TAriesHit.cxx
Go to the documentation of this file.
1#include "TAriesHit.h"
2
3#include <iostream>
4#include <climits>
5
6#include "TAries.h"
7
9{
10 // Default Constructor
11 Clear();
12}
13
15{
16 // Copy Constructor
17 Clear();
18 rhs.Copy(*this);
19}
20
22{
23 frag.Copy(*this);
24 if(TAries::SetWave()) {
25 if(frag.GetWaveform()->empty()) {
26 std::cout << "Warning, TAries::SetWave() set, but data waveform size is zero!" << std::endl;
27 }
28 frag.CopyWave(*this);
29 }
30}
31
32void TAriesHit::Copy(TObject& rhs) const
33{
34 // Copies a TAriesHit
36}
37
38void TAriesHit::Copy(TObject& obj, bool waveform) const
39{
40 Copy(obj);
41 if(waveform) {
42 CopyWave(obj);
43 }
44}
45
46TVector3 TAriesHit::GetPosition(Double_t) const
47{
48 // Gets the position of the current TAriesHit
49 auto vec = TAries::GetPosition(GetDetector());
50 return {vec.X(), vec.Y(), vec.Z()};
51}
52
53TVector3 TAriesHit::GetPosition() const
54{
55 // Gets the position of the current TAriesHit
57}
58
59void TAriesHit::Clear(Option_t*)
60{
61 // Clears the AriesHit
63}
64
65void TAriesHit::Print(Option_t*) const
66{
67 /// Prints the AriesHit. Returns:
68 /// Detector
69 /// Energy
70 /// Time
71 Print(std::cout);
72}
73
74void TAriesHit::Print(std::ostream& out) const
75{
76 std::ostringstream str;
77 str << "Aries Detector: " << GetDetector() << std::endl;
78 str << "Aries hit energy: " << GetEnergy() << std::endl;
79 str << "Aries hit time: " << GetTime() << std::endl;
80 out << str.str();
81}
TVector3 GetPosition() const override
!
Definition TAriesHit.cxx:53
void Print(Option_t *opt="") const override
!
Definition TAriesHit.cxx:65
void Clear(Option_t *opt="") override
!
Definition TAriesHit.cxx:59
void Copy(TObject &) const override
!
Definition TAriesHit.cxx:32
Double_t GetDefaultDistance() const
Definition TAriesHit.h:48
static ROOT::Math::Polar3DVector GetPosition(int DetNbr)
!
Definition TAries.h:42
static bool SetWave()
!
Definition TAries.h:44
virtual double GetEnergy(Option_t *opt="") const
const std::vector< Short_t > * GetWaveform() const
!
void Clear(Option_t *opt="") override
!
virtual Int_t GetDetector() const
!
void Copy(TObject &) const override
!
virtual Double_t GetTime(const ETimeFlag &correct_flag=ETimeFlag::kAll, Option_t *opt="") const
Returns a time value to the nearest nanosecond!
virtual void CopyWave(TObject &) const
!