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 <algorithm>
5#include <climits>
6
7#include "Globals.h"
8#include "TAries.h"
9#include "TGRSIOptions.h"
10
12{
13 // Default Constructor
14 Clear();
15}
16
18{
19 // Copy Constructor
20 Clear();
21 rhs.Copy(*this);
22}
23
25{
26 frag.Copy(*this);
27 if(TAries::SetWave()) {
28 if(frag.GetWaveform()->empty()) {
29 std::cout << "Warning, TAries::SetWave() set, but data waveform size is zero!" << std::endl;
30 }
31 frag.CopyWave(*this);
32 }
33}
34
35void TAriesHit::Copy(TObject& rhs) const
36{
37 // Copies a TAriesHit
39}
40
41void TAriesHit::Copy(TObject& obj, bool waveform) const
42{
43 Copy(obj);
44 if(waveform) {
45 CopyWave(obj);
46 }
47}
48
49TVector3 TAriesHit::GetPosition(Double_t) const
50{
51 // Gets the position of the current TAriesHit
52 auto vec = TAries::GetPosition(GetDetector());
53 return {vec.X(), vec.Y(), vec.Z()};
54}
55
56TVector3 TAriesHit::GetPosition() const
57{
58 // Gets the position of the current TAriesHit
60}
61
62void TAriesHit::Clear(Option_t*)
63{
64 // Clears the AriesHit
66}
67
68void TAriesHit::Print(Option_t*) const
69{
70 /// Prints the AriesHit. Returns:
71 /// Detector
72 /// Energy
73 /// Time
74 Print(std::cout);
75}
76
77void TAriesHit::Print(std::ostream& out) const
78{
79 std::ostringstream str;
80 str << "Aries Detector: " << GetDetector() << std::endl;
81 str << "Aries hit energy: " << GetEnergy() << std::endl;
82 str << "Aries hit time: " << GetTime() << std::endl;
83 out << str.str();
84}
TVector3 GetPosition() const override
!
Definition TAriesHit.cxx:56
void Print(Option_t *opt="") const override
!
Definition TAriesHit.cxx:68
void Clear(Option_t *opt="") override
!
Definition TAriesHit.cxx:62
void Copy(TObject &) const override
!
Definition TAriesHit.cxx:35
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
!