#include <sndUSPlane.h>
Definition at line 13 of file sndUSPlane.h.
◆ USPlane()
Definition at line 12 of file sndUSPlane.cxx.
13{
14 for ( auto mu_hit : snd_hits)
15 {
16 for (
int i{0};
i < 16; ++
i)
17 {
18 if (mu_hit->isMasked(i) || mu_hit->GetSignal(i) < -990.) continue;
19 USHit hit;
20 hit.bar = static_cast<int>(mu_hit->GetDetectorID() % 1000);
21 hit.channel_index = 16 * hit.bar +
i;
22 hit.timestamp = mu_hit->GetTime(i);
23 hit.qdc = mu_hit->GetSignal(i);
24 hit.is_large = !mu_hit->isShort(i);
25
27 int detectorID = mu_hit->GetDetectorID();
28 muon_filter_geometry->
GetPosition(detectorID, A, B);
29 hit.is_right =
i > 7 ? true :
false;
30 hit.x = hit.is_right ?
B.X() :
A.X();
34 }
35 }
36}
void GetPosition(Int_t id, TVector3 &vLeft, TVector3 &vRight)
◆ FindCentroid()
| void snd::analysis_tools::USPlane::FindCentroid |
( |
| ) |
|
Definition at line 38 of file sndUSPlane.cxx.
39{
40
42 {
43
44 return;
45 }
46
48 if (total_qdc > 0.0)
49 {
50 for (
const auto &hit :
hits_)
51 {
52
53 double weighted_sum_x{0.0}, weighted_sum_y{0.0}, weighted_sum_z{0.0};
54 double total_qdc_positive{0.0};
55
56 if (hit.qdc > 0.0)
57 {
58 weighted_sum_x += hit.x * hit.qdc;
59 weighted_sum_y += hit.y * hit.qdc;
60 weighted_sum_z += hit.z * hit.qdc;
61 total_qdc_positive += hit.qdc;
62 }
63
64 double x = weighted_sum_x / total_qdc_positive;
65 double y = weighted_sum_y / total_qdc_positive;
66 double z = weighted_sum_z / total_qdc_positive;
68 }
69 }
71}
double us_centroid_error_z
double us_centroid_error_y
int us_min_n_hits_for_centroid
double us_centroid_error_x
◆ GetBarNHits()
Definition at line 135 of file sndUSPlane.cxx.
136{
137 sl_pair<int> bar_hit{0, 0};
138 for (
const auto &hit :
hits_)
139 {
140 if (hit.bar != bar_to_compute)
141 continue;
142 else
143 {
144 if (hit.is_large)
145
146 bar_hit.large++;
147 else
148 bar_hit.small++;
149
150 }
151 }
152 return bar_hit;
153}
◆ GetBarQdc()
Definition at line 114 of file sndUSPlane.cxx.
115{
116 rl_pair<double> bar_qdc{0.0, 0.0};
117 for (
const auto &hit :
hits_)
118 {
119 if (hit.bar != bar_to_compute)
120 continue;
121 else
122 {
123 if (hit.is_large)
124 {
125 if (hit.is_right)
126 bar_qdc.right += hit.qdc;
127 else
128 bar_qdc.left += hit.qdc;
129 }
130 }
131 }
132 return bar_qdc;
133}
◆ GetCentroid()
| ROOT::Math::XYZPoint snd::analysis_tools::USPlane::GetCentroid |
( |
| ) |
const |
|
inline |
◆ GetCentroidError()
| ROOT::Math::XYZPoint snd::analysis_tools::USPlane::GetCentroidError |
( |
| ) |
const |
|
inline |
◆ GetHits()
| const std::vector< USHit > snd::analysis_tools::USPlane::GetHits |
( |
| ) |
const |
|
inline |
◆ GetNHits()
Definition at line 163 of file sndUSPlane.cxx.
164{
165 sl_pair<int> counts{0, 0};
166 counts.large = std::count_if(
hits_.begin(),
hits_.end(), [](
auto &hit)
167 { return hit.is_large; });
168 counts.small =
static_cast<int>(
hits_.size()) - counts.large;
169
170 return counts;
171}
◆ GetSideQdc()
Definition at line 98 of file sndUSPlane.cxx.
99{
100 rl_pair<double> side_qdc{0.0, 0.0};
101 for (
const auto &hit :
hits_)
102 {
103 if (hit.is_large)
104 {
105 if (hit.is_right)
106 side_qdc.right += hit.qdc;
107 else
108 side_qdc.left += hit.qdc;
109 }
110 }
111 return side_qdc;
112}
◆ GetStation()
| const int snd::analysis_tools::USPlane::GetStation |
( |
| ) |
const |
|
inline |
◆ GetTotEnergy()
Definition at line 86 of file sndUSPlane.cxx.
87{
88 sl_pair<double> tot_energy{0.0, 0.0};
90
93
94 return tot_energy;
95}
◆ GetTotQdc()
Definition at line 73 of file sndUSPlane.cxx.
74{
75 sl_pair<double> totQdc{0.0, 0.0};
76 for (
const auto &hit :
hits_)
77 {
78 if (hit.is_large)
79 totQdc.large += hit.qdc;
80 else
81 totQdc.small += hit.qdc;
82 }
83 return totQdc;
84}
◆ HasShower()
| double snd::analysis_tools::USPlane::HasShower |
( |
| ) |
const |
|
inline |
◆ TimeFilter()
| void snd::analysis_tools::USPlane::TimeFilter |
( |
double |
min_timestamp, |
|
|
double |
max_timestamp |
|
) |
| |
Definition at line 155 of file sndUSPlane.cxx.
156{
158 [&](auto &hit)
159 { return hit.timestamp < min_timestamp || hit.timestamp > max_timestamp; }),
161}
◆ centroid_
| ROOT::Math::XYZPoint snd::analysis_tools::USPlane::centroid_ |
|
private |
◆ centroid_error_
| ROOT::Math::XYZPoint snd::analysis_tools::USPlane::centroid_error_ |
|
private |
◆ configuration_
◆ hits_
| std::vector<USHit> snd::analysis_tools::USPlane::hits_ |
|
private |
◆ station_
| int snd::analysis_tools::USPlane::station_ |
|
private |
The documentation for this class was generated from the following files: