GRSISort "v4.0.0.5"
An extension of the ROOT analysis Framework
Loading...
Searching...
No Matches
TTdrPlastic.cxx
Go to the documentation of this file.
1#include <iostream>
2#include "TTdrPlastic.h"
3#include <TRandom.h>
4#include <TMath.h>
5
6bool TTdrPlastic::fSetWave = false;
7
8TVector3 TTdrPlastic::gPaddlePosition[21] = {
9 // TdrPlastic 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#if ROOT_VERSION_CODE < ROOT_VERSION(6, 0, 0)
36 Class()->IgnoreTObjectStreamer(kTRUE);
37#endif
38 // Class()->AddRule("TTdrPlastic sceptar_hits attributes=NotOwner");
39 // Class()->AddRule("TTdrPlastic sceptardata attributes=NotOwner");
40 Clear();
41}
42
44{
45 // Default Destructor
46}
47
49{
50 // Copy Contructor
51#if ROOT_VERSION_CODE < ROOT_VERSION(6, 0, 0)
52 Class()->IgnoreTObjectStreamer(kTRUE);
53#endif
54 rhs.Copy(*this);
55}
56
57void TTdrPlastic::Clear(Option_t* opt)
58{
59 // Clears all of the hits
60 // The Option "all" clears the base class.
62}
63
65{
66 rhs.Copy(*this);
67 return *this;
68}
69
70void TTdrPlastic::AddFragment(const std::shared_ptr<const TFragment>& frag, TChannel*)
71{
72 auto hit = new TTdrPlasticHit(*frag); // Construction of TTdrPlasticHit is handled in the constructor
73 Hits().push_back(hit);
74}
75
76void TTdrPlastic::Print(Option_t*) const
77{
78 // Prints out TTdrPlastic Multiplicity, currently does little.
79 Print(std::cout);
80}
81
82void TTdrPlastic::Print(std::ostream& out) const
83{
84 std::ostringstream str;
85 str << Hits().size() << " Hits" << std::endl;
86 out << str.str();
87}
void Copy(TObject &) const override
!
Definition TDetector.cxx:24
void Clear(Option_t *="") override
!
Definition TDetector.cxx:54
std::vector< TDetectorHit * > & Hits()
Definition TDetector.h:78
static TVector3 gPaddlePosition[21]
! Position of each Paddle
Definition TTdrPlastic.h:8
void Print(Option_t *opt="") const override
!
static bool fSetWave
Definition TTdrPlastic.h:47
TTdrPlastic & operator=(const TTdrPlastic &)
!
void AddFragment(const std::shared_ptr< const TFragment > &, TChannel *) override
!
~TTdrPlastic() override
void Clear(Option_t *opt="") override
!