GRSISort "v4.0.0.5"
An extension of the ROOT analysis Framework
Loading...
Searching...
No Matches
TTrificHit.cxx
Go to the documentation of this file.
1#include "TTrific.h"
2#include "TTrificHit.h"
3#include "Globals.h"
4
9
11{
12 Clear();
13 rhs.Copy(*this);
14}
15
16void TTrificHit::Copy(TObject& rhs) const
17{
19 static_cast<TTrificHit&>(rhs).fFilter = fFilter;
20}
21
22void TTrificHit::Copy(TObject& rhs, bool waveform) const
23{
24 Copy(rhs);
25 if(waveform) {
26 CopyWave(rhs);
27 }
28}
29
30void TTrificHit::Clear(Option_t* opt)
31{
32 TDetectorHit::Clear(opt); // clears the base (address, position and waveform)
33}
34
35void TTrificHit::Print(Option_t*) const
36{
37 Print(std::cout);
38}
39
40void TTrificHit::Print(std::ostream& out) const
41{
42 std::ostringstream str;
43 str << "TRIFIC Detector: " << GetDetector() << std::endl;
44 str << "TRIFIC Segment: " << GetSegment() << std::endl;
45 str << "TRIFIC Energy: " << GetEnergy() << std::endl;
46 str << "TRIFIC Hit Time: " << GetTime() << std::endl;
47 out << str.str();
48}
49
51{
52 //calling GetPosition() on a TRIFIC hit will return the position vector to the centre of the grid
53 //calling TTrific::GetPosition(det) will give the vector to the position itself.
54
56}
virtual double GetEnergy(Option_t *opt="") const
void Clear(Option_t *opt="") override
!
virtual Int_t GetDetector() const
!
virtual Int_t GetSegment() 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 fFilter
Definition TTrificHit.h:50
void Copy(TObject &) const override
!
void Clear(Option_t *opt="") override
!
void Print(Option_t *opt="") const override
!
TVector3 GetPosition() const override
!
static double fTargetToWindowCart
Definition TTrific.h:95
static const double fInitialSpacingCart
Definition TTrific.h:94
static const double fSpacingCart
Definition TTrific.h:93