GRSISort "v4.0.0.5"
An extension of the ROOT analysis Framework
Loading...
Searching...
No Matches
TDemandHit.cxx
Go to the documentation of this file.
1#include "TDemand.h"
2#include "TDemandHit.h"
3
8
10{
11 Clear();
12
13 rhs.Copy(*this);
14}
15
17{
18 frag.Copy(*this);
19 frag.CopyWave(*this);
20
21 SetCcShort(frag.GetCcShort());
22 SetCcLong(frag.GetCcLong());
23
24 /*if(TDemandHit::SetWave()) {
25 if(frag.GetWaveform()->empty()) {
26 std::cout << "Warning, TDemandHit::SetWave() set, but data waveform size is zero!" << std::endl;
27 }
28 frag.CopyWave(*this);
29
30 //if(!GetWaveform()->empty()) {
31 // AnalyzeWaveform();
32 //}
33 }*/
34}
35
36void TDemandHit::Copy(TObject& rhs) const
37{
40 static_cast<TDemandHit&>(rhs).fFilter = fFilter;
41 static_cast<TDemandHit&>(rhs).fCcShort = fCcShort;
42 static_cast<TDemandHit&>(rhs).fCcLong = fCcLong;
43}
44
45void TDemandHit::Copy(TObject& rhs, bool waveform) const
46{
47 Copy(rhs);
48 if(waveform) {
49 CopyWave(rhs);
50 }
51}
52
54{
55 // check if the desired filter is in wanted filter;
56 // return the answer;
57 return true;
58}
59
60void TDemandHit::Clear(Option_t* opt)
61{
62 TDetectorHit::Clear(opt); // clears the base (address, position and waveform)
63 fFilter = 0;
64 fCcShort = 0;
65 fCcLong = 0;
66}
67
68void TDemandHit::Print(Option_t*) const
69{
70 Print(std::cout);
71}
72
73void TDemandHit::Print(std::ostream& out) const
74{
75 std::ostringstream str;
76 str << "Demand Detector: " << GetDetector() << std::endl;
77 str << "Demand Energy: " << GetEnergy() << std::endl;
78 str << "Demand hit time: " << GetTime() << std::endl;
79 out << str.str();
80}
81
83{
84 return TDemand::GetPosition(*this);
85}
TVector3 GetPosition() const override
!
Int_t fCcLong
this is actually the overflow bit of the energy!
Definition TDemandHit.h:31
void Print(Option_t *opt="") const override
!
Int_t fFilter
Definition TDemandHit.h:29
Int_t fCcShort
the short integration, long integration is stored in fCharge
Definition TDemandHit.h:30
bool InFilter(Int_t)
!
void Clear(Option_t *opt="") override
!
void Copy(TObject &) const override
!
void SetCcShort(const int &x)
!
Definition TDemandHit.h:36
void SetCcLong(const int &x)
!
Definition TDemandHit.h:37
static TVector3 GetPosition(int DetNbr)
!
Definition TDemand.cxx:64
virtual double GetEnergy(Option_t *opt="") 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
!
Int_t GetCcLong() const
Definition TFragment.h:65
Int_t GetCcShort() const
Definition TFragment.h:66