GRSISort "v4.0.0.5"
An extension of the ROOT analysis Framework
Loading...
Searching...
No Matches
TPinDiodeHit.cxx
Go to the documentation of this file.
1#include "TPinDiodeHit.h"
2
3#include <iostream>
4#include <algorithm>
5#include <climits>
6
7#include "Globals.h"
8#include "TGRSIOptions.h"
9#include "TEagle.h"
10
12{
13 // Default Constructor
14#if ROOT_VERSION_CODE < ROOT_VERSION(6, 0, 0)
15 Class()->IgnoreTObjectStreamer(kTRUE);
16#endif
17 Clear();
18}
19
21
23{
24 // Copy Constructor
25#if ROOT_VERSION_CODE < ROOT_VERSION(6, 0, 0)
26 Class()->IgnoreTObjectStreamer(kTRUE);
27#endif
28 Clear();
29 rhs.Copy(*this);
30}
31
32TPinDiodeHit::TPinDiodeHit(const uint8_t& id, const uint16_t& energy, const uint64_t& eventTime)
33{
34 SetAddress(0x200 + id);
35 SetCharge(energy);
36 SetKValue(1);
37 SetTimeStamp(eventTime);
38}
39
40void TPinDiodeHit::Copy(TObject& rhs) const
41{
42 // Copies a TPinDiodeHit
44}
45
46void TPinDiodeHit::Copy(TObject& obj, bool waveform) const
47{
48 Copy(obj);
49 if(waveform) {
50 CopyWave(obj);
51 }
52}
53
54TVector3 TPinDiodeHit::GetPosition(Double_t) const
55{
56 // Gets the position of the current TPinDiodeHit
58 return TVector3(vec.X(), vec.Y(), vec.Z());
59}
60
62{
63 // Gets the position of the current TPinDiodeHit
65}
66
67void TPinDiodeHit::Clear(Option_t*)
68{
69 // Clears the PinDiodeHit
71}
72
73void TPinDiodeHit::Print(Option_t*) const
74{
75 /// Prints the EagleHit information
76 Print(std::cout);
77}
78
79void TPinDiodeHit::Print(std::ostream& out) const
80{
81 /// Prints the PinDiodeHit information
82 std::ostringstream str;
83 str << "PinDiode Address: 0x" << std::setw(4) << std::hex << std::setfill('0') << GetAddress() << std::setfill(' ') << std::dec << std::endl;
84 str << "PinDiode Detector: " << std::setw(16) << GetDetector() << std::endl;
85 str << "PinDiode hit energy: " << std::setw(16) << GetEnergy() << std::endl;
86 str << "PinDiode hit time: " << std::setw(16) << GetTime() << std::endl;
87 out << str.str();
88}
void SetKValue(const Short_t &temp_kval)
!
virtual UInt_t GetAddress() const
!
virtual double GetEnergy(Option_t *opt="") const
void SetCharge(const Float_t &temp_charge)
!
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!
void SetAddress(const UInt_t &temp_address)
!
virtual void SetTimeStamp(const Long64_t &val)
!
virtual void CopyWave(TObject &) const
!
static ROOT::Math::Polar3DVector GetPinDiodePosition(int DetNbr)
!
Definition TEagle.h:43
void Print(Option_t *opt="") const override
!
Double_t GetDefaultDistance() const
TVector3 GetPosition() const override
!
void Clear(Option_t *opt="") override
!
~TPinDiodeHit() override
void Copy(TObject &) const override
!