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
11/// \cond CLASSIMP
13/// \endcond
14
16{
17 // Default Constructor
18#if ROOT_VERSION_CODE < ROOT_VERSION(6,0,0)
19 Class()->IgnoreTObjectStreamer(kTRUE);
20#endif
21 Clear();
22}
23
25
27{
28 // Copy Constructor
29#if ROOT_VERSION_CODE < ROOT_VERSION(6,0,0)
30 Class()->IgnoreTObjectStreamer(kTRUE);
31#endif
32 Clear();
33 rhs.Copy(*this);
34}
35
36TPinDiodeHit::TPinDiodeHit(const uint8_t& id, const uint16_t& energy, const uint64_t& eventTime)
37{
38 fAddress = 0x200 + id;
39 fCharge = energy + gRandom->Uniform();
40 fKValue = 1;
41 fTimeStamp = eventTime;
42}
43
44void TPinDiodeHit::Copy(TObject& rhs) const
45{
46 // Copies a TPinDiodeHit
48}
49
50void TPinDiodeHit::Copy(TObject& obj, bool waveform) const
51{
52 Copy(obj);
53 if(waveform) {
54 CopyWave(obj);
55 }
56}
57
58TVector3 TPinDiodeHit::GetPosition(Double_t) const
59{
60 // Gets the position of the current TPinDiodeHit
62 return TVector3(vec.X(), vec.Y(), vec.Z());
63}
64
66{
67 // Gets the position of the current TPinDiodeHit
69}
70
71void TPinDiodeHit::Clear(Option_t*)
72{
73 // Clears the PinDiodeHit
75}
76
77void TPinDiodeHit::Print(Option_t*) const
78{
79 /// Prints the EagleHit information
80 Print(std::cout);
81}
82
83void TPinDiodeHit::Print(std::ostream& out) const
84{
85 /// Prints the PinDiodeHit information
86 std::ostringstream str;
87 str<<"PinDiode Address: 0x"<<std::setw(4)<<std::hex<<std::setfill('0')<<GetAddress()<<std::setfill(' ')<<std::dec<<std::endl;
88 str<<"PinDiode Detector: "<<std::setw(16)<<GetDetector()<<std::endl;
89 str<<"PinDiode hit energy: "<<std::setw(16)<<GetEnergy()<<std::endl;
90 str<<"PinDiode hit time: "<<std::setw(16)<<GetTime()<<std::endl;
91 out<<str.str();
92}
ClassImp(THILMnemonic) void THILMnemonic
virtual UInt_t GetAddress() const
!
virtual double GetEnergy(Option_t *opt="") const
Float_t fCharge
charge collected from the hit
UInt_t fAddress
address of the the channel in the DAQ.
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!
Short_t fKValue
integration value.
Long64_t fTimeStamp
Timestamp given to hit in ns.
virtual void CopyWave(TObject &) const
!
static ROOT::Math::Polar3DVector GetPinDiodePosition(int DetNbr)
!
Definition TEagle.h:42
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
!