GRSISort "v4.0.0.5"
An extension of the ROOT analysis Framework
Loading...
Searching...
No Matches
TSceptar.cxx
Go to the documentation of this file.
1#include <iostream>
2#include "TSceptar.h"
3#include <TRandom.h>
4#include <TMath.h>
5
6bool TSceptar::fSetWave = false;
7
8std::array<TVector3, 21> TSceptar::fPaddlePosition = {
9 // Sceptar positions from Evan; Thanks Evan.
10 TVector3(0, 0, 1),
11 TVector3(14.3025, 4.6472, 22.8096),
12 TVector3(0, 15.0386, 22.8096),
13 TVector3(-14.3025, 4.6472, 22.8096),
14 TVector3(-8.8395, -12.1665, 22.8096),
15 TVector3(8.8395, -12.1665, 22.8096),
16 TVector3(19.7051, 6.4026, 6.2123),
17 TVector3(0, 20.7192, 6.2123),
18 TVector3(-19.7051, 6.4026, 6.2123),
19 TVector3(-12.1784, -16.7622, 6.2123),
20 TVector3(12.1784, -16.7622, 6.2123),
21 TVector3(19.7051, 6.4026, -6.2123),
22 TVector3(0, 20.7192, -6.2123),
23 TVector3(-19.7051, 6.4026, -6.2123),
24 TVector3(-12.1784, -16.7622, -6.2123),
25 TVector3(12.1784, -16.7622, -6.2123),
26 TVector3(14.3025, 4.6472, -22.8096),
27 TVector3(0, 15.0386, -22.8096),
28 TVector3(-14.3025, 4.6472, -22.8096),
29 TVector3(-8.8395, -12.1665, -22.8096),
30 TVector3(8.8395, -12.1665, -22.8096)};
31
33{
34 // Default Constructor
35 // Class()->AddRule("TSceptar sceptar_hits attributes=NotOwner");
36 // Class()->AddRule("TSceptar sceptardata attributes=NotOwner");
37 Clear();
38}
39
41{
42 // Copy Contructor
43 rhs.Copy(*this);
44}
45
47{
48 rhs.Copy(*this);
49 return *this;
50}
51
52void TSceptar::AddFragment(const std::shared_ptr<const TFragment>& frag, TChannel*)
53{
54 auto* hit = new TSceptarHit(*frag); // Construction of TSceptarHit is handled in the constructor
55 AddHit(hit);
56}
57
58void TSceptar::Print(Option_t*) const
59{
60 /// Prints out TSceptar Multiplicity, currently does little.
61 Print(std::cout);
62}
63
64void TSceptar::Print(std::ostream& out) const
65{
66 std::ostringstream str;
67 str << GetMultiplicity() << " hits" << std::endl;
68 out << str.str();
69}
void Copy(TObject &) const override
!
Definition TDetector.cxx:24
virtual Short_t GetMultiplicity() const
Definition TDetector.h:73
void Clear(Option_t *="") override
!
Definition TDetector.h:68
virtual void AddHit(TDetectorHit *hit)
Definition TDetector.h:63
TSceptar & operator=(const TSceptar &)
!
Definition TSceptar.cxx:46
static std::array< TVector3, 21 > fPaddlePosition
! Position of each Paddle
Definition TSceptar.h:8
void AddFragment(const std::shared_ptr< const TFragment > &, TChannel *) override
!
Definition TSceptar.cxx:52
void Print(Option_t *opt="") const override
!
Definition TSceptar.cxx:58
static bool fSetWave
Definition TSceptar.h:47