GRSISort "v4.0.0.5"
An extension of the ROOT analysis Framework
Loading...
Searching...
No Matches
TSharc2Hit.cxx
Go to the documentation of this file.
1#include "TSharc2Hit.h"
2
3#include "TSharc2.h"
4
6{
7 Clear("ALL");
8}
9
11{
12 Clear();
13 rhs.Copy(*this);
14}
15
16void TSharc2Hit::Copy(TObject& rhs) const
17{
19 fBackHit.Copy(static_cast<TObject&>(static_cast<TSharc2Hit&>(rhs).fBackHit));
20 fPadHit.Copy(static_cast<TObject&>(static_cast<TSharc2Hit&>(rhs).fPadHit));
21}
22
23void TSharc2Hit::Copy(TObject& rhs, bool waveform) const
24{
25 Copy(rhs);
26 if(waveform) {
27 CopyWave(rhs);
28 }
29}
30
31void TSharc2Hit::Clear(Option_t* options)
32{
33 TDetectorHit::Clear(options); //
34 fBackHit.Clear(options); //
35 fPadHit.Clear(options); //
36}
37
38void TSharc2Hit::Print(Option_t*) const
39{
40 Print(std::cout);
41}
42
43void TSharc2Hit::Print(std::ostream& out) const
44{
45 std::ostringstream str;
46 str << DGREEN << "[D/F/B] = " << std::setw(2) << GetDetector() << "\t/" << std::setw(2) << GetFrontStrip() << "\t/" << std::setw(2) << GetBackStrip() << RESET_COLOR << std::endl;
47 out << str.str();
48}
49
50TVector3 TSharc2Hit::GetPosition(Double_t) const
51{
52 // return fposition; // returned from this -> i.e front...
53 // PC BENDER PLEASE LOOK AT THIS.
54 //
55 // this is fine, in all reality this function should not be used in sharc analysis,
56 // the buildhits function now properly sets fPosition in the base class, for finer
57 // position tweaks of the target, one should just use the static function in the
58 // sharc mother class. pcb.
59
62}
63
65{
67}
68
69Double_t TSharc2Hit::GetTheta(double Xoff, double Yoff, double Zoff) const
70{
71 TVector3 posOff;
72 posOff.SetXYZ(Xoff, Yoff, Zoff);
73 return (GetPosition() + posOff).Theta();
74}
75
77{
78 frag.Copy(*this);
79}
80
82{
83 frag.Copy(fBackHit);
84}
85
87{
88 frag.Copy(fPadHit);
89}
#define DGREEN
Definition Globals.h:17
#define RESET_COLOR
Definition Globals.h:5
void Clear(Option_t *opt="") override
!
virtual Int_t GetDetector() const
!
virtual Int_t GetSegment() const
!
void Copy(TObject &) const override
!
virtual void CopyWave(TObject &) const
!
void Print(Option_t *="") const override
!
void SetPad(const TFragment &frag)
!
TVector3 GetPosition() const override
!
TDetectorHit fBackHit
Definition TSharc2Hit.h:45
UShort_t GetBackStrip() const
!
Definition TSharc2Hit.h:57
Double_t GetTheta(double Xoff=0.0, double Yoff=0.0, double Zoff=0.0) const
!
UShort_t GetFrontStrip() const
!
Definition TSharc2Hit.h:56
void SetFront(const TFragment &frag)
!
void SetBack(const TFragment &frag)
!
void Clear(Option_t *="") override
!
TDetectorHit GetBack() const
Definition TSharc2Hit.h:60
void Copy(TObject &) const override
!
Double_t GetDefaultDistance() const
Definition TSharc2Hit.h:112
TDetectorHit fPadHit
Definition TSharc2Hit.h:46
static double GetXOffset()
Definition TSharc2.h:38
static double GetZOffset()
Definition TSharc2.h:40
static TVector3 GetPosition(int detector, int frontstrip, int backstrip, double X=0.00, double Y=0.00, double Z=0.00)
!
Definition TSharc2.cxx:159
static double GetYOffset()
Definition TSharc2.h:39