15 <<
"ds " << fDetStation->GetId() <<
" es " << fEvtStation->GetId() <<
" "
16 "phi " << fPhi1 <<
' ' << fPhi2 <<
" "
18 "lnSqrR " << fLnSqrR1 <<
' ' << fLnSqrR2 <<
" "
19 "a " << fResamplingArea <<
"\n";
24 StationPositionMatrix::Clear()
30 fStationMatrix.clear();
31 fEmptyStationInfoPtrList.clear();
36 StationPositionMatrix::CreateMatrix(
const bool useSpatialStationMatrix)
39 if (!useSpatialStationMatrix || fStations.empty()) {
42 fEmptyStationInfoPtrList.clear();
43 for (
const auto&
s : fStations)
44 fEmptyStationInfoPtrList.push_back(&
s);
52 for (
const auto&
s : fStations) {
53 lnSqrR1(
s.GetLnSqrR1());
54 lnSqrR2(
s.GetLnSqrR2());
55 deltaLnSqrR(
s.GetLnSqrR2() -
s.GetLnSqrR1());
56 const double dphi =
s.GetPhi2() -
s.GetPhi1();
57 deltaPhi((dphi >= 0) ? dphi : tpi-dphi);
59 fNPhi = ceil(tpi / deltaPhi.
GetAverage() * fPhiGranularity);
60 fPhiStep = tpi / fNPhi;
61 const double dLnSqrR = lnSqrR2.
GetMax() - lnSqrR1.
GetMin();
62 fNR = ceil(dLnSqrR / deltaLnSqrR.
GetAverage() * fLnSqrRGranularity);
63 fLnSqrR1 = lnSqrR1.
GetMin();
64 fLnSqrRStep = dLnSqrR / fNR;
69 for (
const auto&
s : fStations) {
70 const int iPhi1 = GetPhiIndex(
s.GetPhi1());
71 const int iPhi2 = GetPhiIndex(
s.GetPhi2());
72 const int iR1 = GetLnSqrRIndex(
s.GetLnSqrR1());
73 int iR2 = GetLnSqrRIndex(
s.GetLnSqrR2());
77 for (
int i = iPhi1; i <= iPhi2; ++i)
78 for (
int j = iR1; j <= iR2; ++j)
79 fStationMatrix[i][j].push_back(&
s);
81 for (
int j = iR1; j <= iR2; ++j) {
82 for (
int i = 0; i <= iPhi2; ++i)
83 fStationMatrix[i][j].push_back(&
s);
84 for (
int i = iPhi1; i < fNPhi; ++i)
85 fStationMatrix[i][j].push_back(&
s);
93 StationPositionMatrix::DumpStats()
98 for (
int i = 0; i < fNPhi; ++i) {
99 for (
int j = 0; j < fNR; ++j) {
100 const int s = fStationMatrix[i][j].size();
107 "nPhi = " << fNPhi <<
"\n"
108 "lnSqrR = " << fLnSqrR1 <<
" : " << fLnSqrR1 + fNR * fLnSqrRStep <<
", " << fNR <<
"\n"
110 << minmax.
GetMax() <<
'\n';
111 for (
const auto&
s : fStations)
117 StationPositionMatrix::Resize(
const int nPhi,
const int nR)
119 fStationMatrix.clear();
120 fStationMatrix.resize(nPhi);
121 for (
auto&
s : fStationMatrix)
double GetAverage() const
Regenerate thinned MC showers.
void Dump(const FEvent &fevent)