#include <sndDSPlane.h>
Definition at line 12 of file sndDSPlane.h.
◆ DSPlane()
| snd::analysis_tools::DSPlane::DSPlane |
( |
std::vector< MuFilterHit * > |
snd_hits, |
|
|
const Configuration & |
configuration, |
|
|
MuFilter * |
muon_filter_geometry, |
|
|
int |
station |
|
) |
| |
Definition at line 13 of file sndDSPlane.cxx.
14{
15 for ( auto mu_hit : snd_hits)
16 {
18 int detectorID = mu_hit->GetDetectorID();
19 muon_filter_geometry->
GetPosition(detectorID, A, B);
21 const int n_sides = muon_filter_geometry->
GetnSides(detectorID);
22 for (
int i{0};
i <
n_sipms * n_sides; ++
i)
23 {
24 if (mu_hit->isMasked(i) || mu_hit->GetSignal(i) < -990.) continue;
25 DSHit hit;
26 hit.bar = static_cast<int>(detectorID % 1000);
27 hit.channel_index =
n_sipms * n_sides * hit.bar +
i;
28 hit.is_right = (
i >=
n_sipms) ?
true : false;
29 hit.timestamp =
configuration_.
is_mc ? mu_hit->GetTime(i) / ShipUnit::snd_TDC2ns : mu_hit->GetTime(i);
30 hit.qdc = mu_hit->GetSignal(i);
31
32 if (!mu_hit->isVertical()) {
33 hit.is_x = false;
35 hit.x = (tmp_x < -990.) ? std::nan(
"") :
A.X() - tmp_x;
37 }
38 else {
39 hit.is_x = true;
41 hit.y = std::nan("");
42 }
45 }
46 }
47}
Int_t GetnSides(Int_t detID)
void GetPosition(Int_t id, TVector3 &vLeft, TVector3 &vRight)
Int_t GetnSiPMs(Int_t detID)
◆ GetBarNHits()
| const int snd::analysis_tools::DSPlane::GetBarNHits |
( |
int |
bar_to_compute | ) |
const |
Definition at line 56 of file sndDSPlane.cxx.
57{
58 int bar_hit = std::count_if(
hits_.begin(),
hits_.end(),
59 [bar_to_compute](const auto &hit) {return hit.bar == bar_to_compute;});
60 return bar_hit;
61}
◆ GetHits()
| const std::vector< DSHit > snd::analysis_tools::DSPlane::GetHits |
( |
| ) |
const |
|
inline |
◆ GetNHitBars()
| const int snd::analysis_tools::DSPlane::GetNHitBars |
( |
| ) |
const |
◆ GetNHits()
| const int snd::analysis_tools::DSPlane::GetNHits |
( |
| ) |
const |
|
inline |
◆ GetStation()
| const int snd::analysis_tools::DSPlane::GetStation |
( |
| ) |
const |
|
inline |
◆ GetTotQdc()
| const double snd::analysis_tools::DSPlane::GetTotQdc |
( |
| ) |
const |
Definition at line 49 of file sndDSPlane.cxx.
50{
51 double tot_qdc = std::accumulate(
hits_.begin(),
hits_.end(), 0.0,
52 [](double sum, const auto &b) {return sum + b.qdc;});
53 return tot_qdc;
54}
◆ TimeFilter()
| void snd::analysis_tools::DSPlane::TimeFilter |
( |
double |
min_timestamp, |
|
|
double |
max_timestamp |
|
) |
| |
Definition at line 63 of file sndDSPlane.cxx.
64{
66 [&](auto &hit)
67 { return hit.timestamp < min_timestamp || hit.timestamp > max_timestamp; }),
69}
◆ configuration_
◆ hits_
| std::vector<DSHit> snd::analysis_tools::DSPlane::hits_ |
|
private |
◆ station_
| int snd::analysis_tools::DSPlane::station_ |
|
private |
The documentation for this class was generated from the following files: