8 namespace CachedXShowerRegeneratorAG {
15 <<
"ds " << fDetStation->GetId() <<
" es " << fEvtStation->GetId() <<
" "
16 "phi " << fPhi1 <<
' ' << fPhi2 <<
" "
17 "r " << fR1 <<
' ' << fR2 <<
" "
18 "a " << fResamplingArea <<
"\n";
23 StationPositionMatrix::Clear()
28 fStationMatrix.clear();
29 fEmptyStationInfoPtrList.clear();
34 StationPositionMatrix::CreateMatrix(
const bool useSpatialStationMatrix)
37 if (!useSpatialStationMatrix || fStations.empty()) {
42 fEmptyStationInfoPtrList.clear();
43 for (StationInfoList::const_iterator it = fStations.begin();
44 it != fStations.end(); ++it)
45 fEmptyStationInfoPtrList.push_back(&(*it));
53 for (
unsigned int i = 1; i < fStations.size(); ++i) {
54 r1(fStations[i].GetR1());
55 r2(fStations[i].GetR2());
56 deltaR(fStations[i].GetR2() - fStations[i].GetR1());
57 const double dphi = fStations[i].GetPhi2() - fStations[i].GetPhi1();
58 deltaPhi((dphi >= 0) ? dphi : tpi-dphi);
60 fNPhi = int(tpi / deltaPhi.
GetAverage() * fPhiGranularity + 0.5);
61 fPhiStep = tpi / fNPhi;
63 fNR = int(dr / deltaR.
GetAverage() * fRGranularity + 0.5);
70 for (StationInfoList::const_iterator it = fStations.begin();
71 it != fStations.end(); ++it) {
72 const int iPhi1 = GetPhiIndex(it->GetPhi1());
73 const int iPhi2 = GetPhiIndex(it->GetPhi2());
74 const int iR1 = GetRIndex(it->GetR1());
75 int iR2 = GetRIndex(it->GetR2());
79 for (
int i = iPhi1; i <= iPhi2; ++i)
80 for (
int j = iR1; j <= iR2; ++j)
81 fStationMatrix[i][j].push_back(&(*it));
83 for (
int j = iR1; j <= iR2; ++j) {
84 for (
int i = 0; i <= iPhi2; ++i)
85 fStationMatrix[i][j].push_back(&(*it));
86 for (
int i = iPhi1; i < fNPhi; ++i)
87 fStationMatrix[i][j].push_back(&(*it));
94 StationPositionMatrix::DumpStats()
99 for (
int i = 0; i < fNPhi; ++i)
100 for (
int j = 0; j < fNR; ++j) {
101 const int s = fStationMatrix[i][j].size();
107 "nPhi = " << fNPhi <<
"\n"
108 "R = " << fR1 <<
" : " << fR1 + fNR * fRStep <<
", " << fNR <<
"\n"
110 << minmax.
GetMax() <<
'\n';
111 for (StationInfoList::const_iterator it = fStations.begin();
112 it != fStations.end(); ++it)
118 StationPositionMatrix::Resize(
const int nPhi,
const int nR)
120 fStationMatrix.clear();
121 fStationMatrix.resize(nPhi);
122 for (StationMatrix::iterator it = fStationMatrix.begin();
123 it != fStationMatrix.end(); ++it)
double GetAverage() const
void Dump(const FEvent &fevent)