GRSISort "v4.0.0.5"
An extension of the ROOT analysis Framework
Loading...
Searching...
No Matches
TAries.cxx
Go to the documentation of this file.
1#include <iostream>
2#include "TAries.h"
3#include <TRandom.h>
4#include <TMath.h>
5
6bool TAries::fSetWave = false;
7
8std::array<ROOT::Math::Polar3DVector, 77> TAries::fPaddlePosition = {
9 // Aries positions from https://adamgarnsworthy.github.io/griffin-aries-angle-mapper/griffin-aries-angle-mapper.html
10 // index 0 is a default value since our detector numbers start at 1!
11 ROOT::Math::Polar3DVector(1., 0., 0.),
12 ROOT::Math::Polar3DVector(1., 9.4 / 180. * TMath::Pi(), 45.0 / 180. * TMath::Pi()),
13 ROOT::Math::Polar3DVector(1., 9.4 / 180. * TMath::Pi(), 135.0 / 180. * TMath::Pi()),
14 ROOT::Math::Polar3DVector(1., 9.4 / 180. * TMath::Pi(), 225.0 / 180. * TMath::Pi()),
15 ROOT::Math::Polar3DVector(1., 9.4 / 180. * TMath::Pi(), 315.0 / 180. * TMath::Pi()),
16 ROOT::Math::Polar3DVector(1., 36.5 / 180. * TMath::Pi(), 51.6 / 180. * TMath::Pi()),
17 ROOT::Math::Polar3DVector(1., 36.5 / 180. * TMath::Pi(), 83.4 / 180. * TMath::Pi()),
18 ROOT::Math::Polar3DVector(1., 36.5 / 180. * TMath::Pi(), 141.6 / 180. * TMath::Pi()),
19 ROOT::Math::Polar3DVector(1., 36.5 / 180. * TMath::Pi(), 173.4 / 180. * TMath::Pi()),
20 ROOT::Math::Polar3DVector(1., 36.5 / 180. * TMath::Pi(), 231.6 / 180. * TMath::Pi()),
21 ROOT::Math::Polar3DVector(1., 36.5 / 180. * TMath::Pi(), 263.4 / 180. * TMath::Pi()),
22 ROOT::Math::Polar3DVector(1., 36.5 / 180. * TMath::Pi(), 321.6 / 180. * TMath::Pi()),
23 ROOT::Math::Polar3DVector(1., 36.5 / 180. * TMath::Pi(), 353.4 / 180. * TMath::Pi()),
24 ROOT::Math::Polar3DVector(1., 54.7 / 180. * TMath::Pi(), 22.5 / 180. * TMath::Pi()),
25 ROOT::Math::Polar3DVector(1., 54.7 / 180. * TMath::Pi(), 112.5 / 180. * TMath::Pi()),
26 ROOT::Math::Polar3DVector(1., 54.7 / 180. * TMath::Pi(), 202.5 / 180. * TMath::Pi()),
27 ROOT::Math::Polar3DVector(1., 54.7 / 180. * TMath::Pi(), 292.5 / 180. * TMath::Pi()),
28 ROOT::Math::Polar3DVector(1., 55.1 / 180. * TMath::Pi(), 56.0 / 180. * TMath::Pi()),
29 ROOT::Math::Polar3DVector(1., 55.1 / 180. * TMath::Pi(), 79.0 / 180. * TMath::Pi()),
30 ROOT::Math::Polar3DVector(1., 55.1 / 180. * TMath::Pi(), 146.0 / 180. * TMath::Pi()),
31 ROOT::Math::Polar3DVector(1., 55.1 / 180. * TMath::Pi(), 169.0 / 180. * TMath::Pi()),
32 ROOT::Math::Polar3DVector(1., 55.1 / 180. * TMath::Pi(), 236.0 / 180. * TMath::Pi()),
33 ROOT::Math::Polar3DVector(1., 55.1 / 180. * TMath::Pi(), 259.0 / 180. * TMath::Pi()),
34 ROOT::Math::Polar3DVector(1., 55.1 / 180. * TMath::Pi(), 326.0 / 180. * TMath::Pi()),
35 ROOT::Math::Polar3DVector(1., 55.1 / 180. * TMath::Pi(), 349.0 / 180. * TMath::Pi()),
36 ROOT::Math::Polar3DVector(1., 80.6 / 180. * TMath::Pi(), 13.0 / 180. * TMath::Pi()),
37 ROOT::Math::Polar3DVector(1., 80.6 / 180. * TMath::Pi(), 32.0 / 180. * TMath::Pi()),
38 ROOT::Math::Polar3DVector(1., 80.6 / 180. * TMath::Pi(), 58.0 / 180. * TMath::Pi()),
39 ROOT::Math::Polar3DVector(1., 80.6 / 180. * TMath::Pi(), 77.0 / 180. * TMath::Pi()),
40 ROOT::Math::Polar3DVector(1., 80.6 / 180. * TMath::Pi(), 103.0 / 180. * TMath::Pi()),
41 ROOT::Math::Polar3DVector(1., 80.6 / 180. * TMath::Pi(), 122.0 / 180. * TMath::Pi()),
42 ROOT::Math::Polar3DVector(1., 80.6 / 180. * TMath::Pi(), 148.0 / 180. * TMath::Pi()),
43 ROOT::Math::Polar3DVector(1., 80.6 / 180. * TMath::Pi(), 167.0 / 180. * TMath::Pi()),
44 ROOT::Math::Polar3DVector(1., 80.6 / 180. * TMath::Pi(), 193.0 / 180. * TMath::Pi()),
45 ROOT::Math::Polar3DVector(1., 80.6 / 180. * TMath::Pi(), 212.0 / 180. * TMath::Pi()),
46 ROOT::Math::Polar3DVector(1., 80.6 / 180. * TMath::Pi(), 238.0 / 180. * TMath::Pi()),
47 ROOT::Math::Polar3DVector(1., 80.6 / 180. * TMath::Pi(), 257.0 / 180. * TMath::Pi()),
48 ROOT::Math::Polar3DVector(1., 80.6 / 180. * TMath::Pi(), 283.0 / 180. * TMath::Pi()),
49 ROOT::Math::Polar3DVector(1., 80.6 / 180. * TMath::Pi(), 302.0 / 180. * TMath::Pi()),
50 ROOT::Math::Polar3DVector(1., 80.6 / 180. * TMath::Pi(), 328.0 / 180. * TMath::Pi()),
51 ROOT::Math::Polar3DVector(1., 80.6 / 180. * TMath::Pi(), 347.0 / 180. * TMath::Pi()),
52 ROOT::Math::Polar3DVector(1., 99.4 / 180. * TMath::Pi(), 13.0 / 180. * TMath::Pi()),
53 ROOT::Math::Polar3DVector(1., 99.4 / 180. * TMath::Pi(), 32.0 / 180. * TMath::Pi()),
54 ROOT::Math::Polar3DVector(1., 99.4 / 180. * TMath::Pi(), 58.0 / 180. * TMath::Pi()),
55 ROOT::Math::Polar3DVector(1., 99.4 / 180. * TMath::Pi(), 77.0 / 180. * TMath::Pi()),
56 ROOT::Math::Polar3DVector(1., 99.4 / 180. * TMath::Pi(), 103.0 / 180. * TMath::Pi()),
57 ROOT::Math::Polar3DVector(1., 99.4 / 180. * TMath::Pi(), 122.0 / 180. * TMath::Pi()),
58 ROOT::Math::Polar3DVector(1., 99.4 / 180. * TMath::Pi(), 148.0 / 180. * TMath::Pi()),
59 ROOT::Math::Polar3DVector(1., 99.4 / 180. * TMath::Pi(), 167.0 / 180. * TMath::Pi()),
60 ROOT::Math::Polar3DVector(1., 99.4 / 180. * TMath::Pi(), 193.0 / 180. * TMath::Pi()),
61 ROOT::Math::Polar3DVector(1., 99.4 / 180. * TMath::Pi(), 212.0 / 180. * TMath::Pi()),
62 ROOT::Math::Polar3DVector(1., 99.4 / 180. * TMath::Pi(), 238.0 / 180. * TMath::Pi()),
63 ROOT::Math::Polar3DVector(1., 99.4 / 180. * TMath::Pi(), 257.0 / 180. * TMath::Pi()),
64 ROOT::Math::Polar3DVector(1., 99.4 / 180. * TMath::Pi(), 283.0 / 180. * TMath::Pi()),
65 ROOT::Math::Polar3DVector(1., 99.4 / 180. * TMath::Pi(), 302.0 / 180. * TMath::Pi()),
66 ROOT::Math::Polar3DVector(1., 99.4 / 180. * TMath::Pi(), 328.0 / 180. * TMath::Pi()),
67 ROOT::Math::Polar3DVector(1., 99.4 / 180. * TMath::Pi(), 347.0 / 180. * TMath::Pi()),
68 ROOT::Math::Polar3DVector(1., 124.9 / 180. * TMath::Pi(), 56.0 / 180. * TMath::Pi()),
69 ROOT::Math::Polar3DVector(1., 124.9 / 180. * TMath::Pi(), 79.0 / 180. * TMath::Pi()),
70 ROOT::Math::Polar3DVector(1., 124.9 / 180. * TMath::Pi(), 146.0 / 180. * TMath::Pi()),
71 ROOT::Math::Polar3DVector(1., 124.9 / 180. * TMath::Pi(), 169.0 / 180. * TMath::Pi()),
72 ROOT::Math::Polar3DVector(1., 124.9 / 180. * TMath::Pi(), 236.0 / 180. * TMath::Pi()),
73 ROOT::Math::Polar3DVector(1., 124.9 / 180. * TMath::Pi(), 259.0 / 180. * TMath::Pi()),
74 ROOT::Math::Polar3DVector(1., 124.9 / 180. * TMath::Pi(), 326.0 / 180. * TMath::Pi()),
75 ROOT::Math::Polar3DVector(1., 124.9 / 180. * TMath::Pi(), 349.0 / 180. * TMath::Pi()),
76 ROOT::Math::Polar3DVector(1., 125.3 / 180. * TMath::Pi(), 22.5 / 180. * TMath::Pi()),
77 ROOT::Math::Polar3DVector(1., 125.3 / 180. * TMath::Pi(), 112.5 / 180. * TMath::Pi()),
78 ROOT::Math::Polar3DVector(1., 125.3 / 180. * TMath::Pi(), 202.5 / 180. * TMath::Pi()),
79 ROOT::Math::Polar3DVector(1., 125.3 / 180. * TMath::Pi(), 292.5 / 180. * TMath::Pi()),
80 ROOT::Math::Polar3DVector(1., 143.5 / 180. * TMath::Pi(), 51.6 / 180. * TMath::Pi()),
81 ROOT::Math::Polar3DVector(1., 143.5 / 180. * TMath::Pi(), 83.4 / 180. * TMath::Pi()),
82 ROOT::Math::Polar3DVector(1., 143.5 / 180. * TMath::Pi(), 141.6 / 180. * TMath::Pi()),
83 ROOT::Math::Polar3DVector(1., 143.5 / 180. * TMath::Pi(), 173.4 / 180. * TMath::Pi()),
84 ROOT::Math::Polar3DVector(1., 143.5 / 180. * TMath::Pi(), 231.6 / 180. * TMath::Pi()),
85 ROOT::Math::Polar3DVector(1., 143.5 / 180. * TMath::Pi(), 263.4 / 180. * TMath::Pi()),
86 ROOT::Math::Polar3DVector(1., 143.5 / 180. * TMath::Pi(), 321.6 / 180. * TMath::Pi()),
87 ROOT::Math::Polar3DVector(1., 143.5 / 180. * TMath::Pi(), 353.4 / 180. * TMath::Pi())};
88
90{
91 // Default Constructor
92 // Class()->AddRule("TAries aries_hits attributes=NotOwner");
93 // Class()->AddRule("TAries ariesdata attributes=NotOwner");
94 Clear();
95}
96
98{
99 // Copy Contructor
100 rhs.Copy(*this);
101}
102
104{
105 rhs.Copy(*this);
106 return *this;
107}
108
109void TAries::AddFragment(const std::shared_ptr<const TFragment>& frag, TChannel*)
110{
111 auto* hit = new TAriesHit(*frag); // Construction of TAriesHit is handled in the constructor
112 AddHit(hit);
113}
114
115void TAries::Print(Option_t*) const
116{
117 /// Prints out TAries Multiplicity, currently does little.
118 Print(std::cout);
119}
120
121void TAries::Print(std::ostream& out) const
122{
123 std::ostringstream str;
124 str << GetMultiplicity() << " hits" << std::endl;
125 out << str.str();
126}
TAries & operator=(const TAries &)
!
Definition TAries.cxx:103
static std::array< ROOT::Math::Polar3DVector, 77 > fPaddlePosition
! Position of each Paddle
Definition TAries.h:8
TAries()
Definition TAries.cxx:89
void AddFragment(const std::shared_ptr< const TFragment > &, TChannel *) override
!
Definition TAries.cxx:109
static bool fSetWave
Definition TAries.h:47
void Print(Option_t *opt="") const override
!
Definition TAries.cxx:115
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