3 #include <fwk/CentralConfig.h>
4 #include <utl/ErrorLogger.h>
6 #include <utl/AugerUnits.h>
7 #include <utl/CoordinateSystem.h>
8 #include <utl/FFTDataContainer.h>
10 #include <utl/RadioGeometryUtilities.h>
11 #include <utl/StringCompare.h>
12 #include <utl/TimeStamp.h>
13 #include <utl/UTCDateTime.h>
15 #include <evt/Event.h>
16 #include <evt/RadioSimulation.h>
17 #include <evt/ShowerSimData.h>
18 #include <evt/ShowerRecData.h>
19 #include <evt/ShowerRRecData.h>
20 #include <evt/ShowerRRecDataQuantities.h>
22 #include <revt/REvent.h>
23 #include <revt/EventTrigger.h>
24 #include <revt/Station.h>
25 #include <revt/Header.h>
27 #include <sevt/SEvent.h>
28 #include <sevt/Station.h>
29 #include <sevt/EventTrigger.h>
31 #include <rdet/RDetector.h>
32 #include <rdet/Station.h>
34 #include <atm/AerosolDB.h>
35 #include <atm/AerosolZone.h>
36 #include <atm/ProfileResult.h>
37 #include <atm/MonthlyAvgDBProfileModel.h>
38 #include <atm/InclinedAtmosphericProfile.h>
53 Branch topBranch = CentralConfig::GetInstance()->
GetTopBranch(
"RdStationSignalInterpolator");
63 ERROR(
"Early Late Correction will not be used within in the interpolation of "
64 "the signals (even if configured). It is not properly implemented.");
68 topBranch.
GetChild(
"InterpolationMethod").
GetData(fInterpolationMethod);
71 info <<
"\n\t Interpolate only stations with energy fluence above " << fMinimumEnergy <<
" eV."
72 "\n\t Interpolation method is " << fInterpolationMethod <<
"; (0: nearest neighbour, 1: bilinear interpolation,"
73 " 2: bicubic interpolation)"
74 "\n\t Require SD T2 trigger: " << fRequireSDStationTrigger <<
"\n";
87 Detector& det = Detector::GetInstance();
91 const int maxStationID = 9999;
93 REvent& rEvent =
event.GetREvent();
102 vector<StarShapeEntry> starShapeStations;
103 set<double> radiusValues;
104 set<double> azimuthValues;
105 set<double> azimuthValuesStarShape;
106 set<double> altitudeValues;
113 int sstationcount = 0;
115 const int statID = rdIt->GetId();
116 if (statID < maxStationID)
129 WARNING(
"Station has no RecData! Please call RdEventInitializer first!");
135 info <<
"Station doesn't have rec. signal..skip. ID: " << statID;
140 const double radius =
sqrt(
pow(x_vxB, 2) +
pow(y_vxB, 2));
141 const double azimuth = atan2(y_vxB, x_vxB);
142 const double altitude = position.
GetZ(corsys);
143 const unsigned int sizeAzi = azimuthValues.size();
145 starShapeStations.emplace_back(radius, azimuth, statID);
146 radiusValues.insert(round(radius * 10) / 10);
147 azimuthValues.insert(round(azimuth * 10000) / 10000);
148 altitudeValues.insert(round(altitude));
150 if (azimuthValues.size() == sizeAzi)
151 azimuthValuesStarShape.insert(round(azimuth * 1000) / 1000);
156 if (starShapeStations.empty()) {
157 ERROR(
"No antennas on a star. Skip...");
158 return eContinueLoop;
162 info <<
"Simulation has " << radiusValues.size() <<
" rings, " << azimuthValuesStarShape.size()
163 <<
" angle bins [" << azimuthValues.size() <<
" angles in total],and spans heights from " << (*altitudeValues.begin()) /
meter
164 <<
" m to " << (*altitudeValues.rbegin()) /
meter <<
" m above core.";
167 if (azimuthValuesStarShape.size() != 8) {
168 if (azimuthValues.size() == 8) {
169 azimuthValuesStarShape = azimuthValues;
171 WARNING(
"RdStationInterpolatorStarShape: Simulation does not have 8 arms. Aborting ...");
172 return eContinueLoop;
176 info <<
"Number of star shaped stations: " << sstationcount;
204 std::vector<StationRRecDataQuantities> eNumNames = {
205 eSignalEnergyFluenceMag,
206 eSignalEnergyFluenceVxB,
207 eSignalEnergyFluenceVxVxB,
208 eNoiseEnergyFluenceMag,
209 eNoiseEnergyFluenceVxB,
210 eNoiseEnergyFluenceVxVxB,
217 std::vector<StationRRecDataQuantities> eNumNamesError = {
218 eSignalEnergyFluenceMag,
219 eSignalEnergyFluenceVxB,
220 eSignalEnergyFluenceVxVxB,
228 sort(starShapeStations.begin(), starShapeStations.end());
231 unsigned int n_interpolated_stations = 0;
234 const Point pos = rdIt->GetPosition();
235 const int statID = rdIt->GetId();
243 if (statID >= maxStationID) {
267 const double stationRadius =
sqrt(
pow(x_vxB, 2) +
pow(y_vxB, 2));
268 const double stationAzimuth = atan2(y_vxB, x_vxB);
271 if (stationRadius > *radiusValues.rbegin()) {
277 if (stationRadius <= *radiusValues.begin()) {
283 info <<
"StationID: " << statID <<
", Station position: r = "
284 << stationRadius <<
", phi = " << stationAzimuth;
300 vector<double> interpolatedValues;
301 vector<double> interpolatedValuesError;
302 if (fInterpolationMethod == eNN) {
304 NearestNeighbourInterpolation(stationRadius, stationAzimuth, azimuthValuesStarShape,
305 starShapeStations, eNumNames, rEvent,
false);
306 interpolatedValuesError =
307 NearestNeighbourInterpolation(stationRadius, stationAzimuth, azimuthValuesStarShape,
308 starShapeStations, eNumNamesError, rEvent,
true);
309 }
else if (fInterpolationMethod == eBilinear) {
311 BilinearInterpolation(stationRadius, stationAzimuth, azimuthValuesStarShape,
312 starShapeStations, eNumNames, rEvent,
false);
313 interpolatedValuesError =
314 BilinearInterpolation(stationRadius, stationAzimuth, azimuthValuesStarShape,
315 starShapeStations, eNumNamesError, rEvent,
true);
316 }
else if (fInterpolationMethod == eBicubic) {
318 BicubicInterpolation(stationRadius, stationAzimuth, azimuthValuesStarShape,
319 starShapeStations, eNumNames, rEvent,
false);
320 interpolatedValuesError =
321 BicubicInterpolation(stationRadius, stationAzimuth, azimuthValuesStarShape,
322 starShapeStations, eNumNamesError, rEvent,
true);
325 if (fRequireSDStationTrigger) {
328 ERROR(
"SEvent not available but required!");
335 info <<
"SD station " << statID;
337 info <<
" is in the SEvent, ";
340 if (trig.IsT2() || trig.IsT1()){
341 info <<
" and has trigger (T1 or T2). Continue interpolation.";
343 info <<
" but doesn't have T1 or T2 trigger data. skip.";
349 info <<
" but doesn't have any trigger data. skip.";
355 info <<
" is not in the SEvent. skip.";
366 info <<
"Station " << statID <<
", station radius: " << stationRadius
367 <<
", station azimuth: " << stationAzimuth <<
"--> EnergyFluence: "
368 << interpolatedValues[0] <<
" +/- " << interpolatedValuesError[0];
373 WARNING(
"RDStationSignalInterpolator: StationTimeSeries not empty!");
377 for (vector<double>::const_iterator it = interpolatedValues.begin(); it != interpolatedValues.end(); ++it, ++i) {
378 info <<
"Interpolated Value: " << *it <<
", enum: " << eNumNames[i] <<
'\n';
379 const double intVal = *it;
386 for (vector<double>::const_iterator it = interpolatedValuesError.begin(); it != interpolatedValuesError.end(); ++it, ++i) {
387 info <<
"Interpolated Value Error: " << *it <<
", enum: " << eNumNamesError[i] <<
'\n';
393 info <<
"Station will be used for Reconstruction. ID is " << statID;
398 info <<
"Interpolated Energy Fluence of Station " << statID <<
" is too low(" << interpolatedValues[0] <<
") -> skip\n"
407 const double signalToNoise = peakAmplitude / rmsNoise;
410 info <<
"Calculated Signal to Noise ratio: " <<
Sqr(signalToNoise);
419 ++n_interpolated_stations;
423 info <<
"Interpolated (and accepted) " << n_interpolated_stations <<
" signals to a corresponding station on a regular grid.";
431 RdStationSignalInterpolator::Finish()
436 INFO(
"RdStationSignalInterpolator::Finish()");
443 RdStationSignalInterpolator::PolarDistance(
const double r1,
const double phi1,
const double r2,
const double phi2)
445 return sqrt(
pow(r1, 2) +
pow(r2, 2) - 2*r1*r2*cos(phi1 - phi2));
450 RdStationSignalInterpolator::MoveItemToBack(std::vector<StarShapeEntry>& v,
const size_t itemIndex)
452 const auto it = v.begin() + itemIndex;
453 std::rotate(it, it + 1, v.end());
457 vector<StarShapeEntry>
458 RdStationSignalInterpolator::SortForInterpolation(
const std::vector<StarShapeEntry>& list)
460 auto starShapeList = list;
467 const double az1 = starShapeList[0].fObserverAzimuthAngle;
468 const double az2 = starShapeList[4].fObserverAzimuthAngle;
469 const double az3 = starShapeList[8].fObserverAzimuthAngle;
470 const double az4 = starShapeList[12].fObserverAzimuthAngle;
472 const double d1 = az2 - az1;
473 const double d2 = az3 - az2;
474 const double d3 = az4 - az3;
479 if (fabs(d1) > M_PI*2/7) {
481 for (
unsigned int i = 0; i < 4; ++i) {
482 MoveItemToBack(starShapeList, 0);
489 if (fabs(d2) > M_PI*2/7) {
491 for (
unsigned int i = 0; i < 8; ++i) {
492 MoveItemToBack(starShapeList, 0);
499 if (fabs(d3) > M_PI*2/7) {
501 for (
unsigned int i = 0; i < 12; ++i) {
502 MoveItemToBack(starShapeList, 0);
513 return starShapeList;
519 RdStationSignalInterpolator::LagrangianFactorCubic(
const double X,
520 const double x1,
const double x2,
const double x3,
const double x4,
521 const double v1,
const double v2,
const double v3,
const double v4)
524 (X - x2) / (x1 - x2) * (X - x3) / (x1 - x3) * (X - x4) / (x1 - x4) * v1 +
525 (X - x1) / (x2 - x1) * (X - x3) / (x2 - x3) * (X - x4) / (x2 - x4) * v2 +
526 (X - x1) / (x3 - x1) * (X - x2) / (x3 - x2) * (X - x4) / (x3 - x4) * v3 +
527 (X - x1) / (x4 - x1) * (X - x2) / (x4 - x2) * (X - x3) / (x4 - x2) * v4;
537 RdStationSignalInterpolator::FindIndexOfSurroundingNN(
const double radius,
const double azimuth,
538 const std::set<double>& azimuthListStarShape,
539 const std::vector<StarShapeEntry>& starShapeList)
543 double highAzi = -10;
547 for (
unsigned int tmppul = 0; tmppul < starShapeList.size()-1; ++tmppul) {
548 roundedAzi = round(starShapeList.at(tmppul).fObserverAzimuthAngle*1000) / 1000;
549 if (azimuthListStarShape.find(roundedAzi) == azimuthListStarShape.end())
551 if (azimuth > roundedAzi)
554 highAzi = roundedAzi;
560 if (azimuth < *azimuthListStarShape.begin() || azimuth > *azimuthListStarShape.rbegin()) {
561 lowAzi = *azimuthListStarShape.rbegin();
562 highAzi = *azimuthListStarShape.begin();
564 if (azimuthListStarShape.size() > 8 || lowAzi == -10 || highAzi == -10)
568 int indexHighHigh = -1;
569 int indexHighLow = -1;
570 int indexLowHigh = -1;
571 int indexLowLow = -1;
572 for (
unsigned int tmppul = 0; tmppul < starShapeList.size()-1; ++tmppul) {
573 if ((fabs(lowAzi - starShapeList.at(tmppul).fObserverAzimuthAngle) >= 0.01) ||
574 (fabs(lowAzi - starShapeList.at(tmppul+1).fObserverAzimuthAngle) >= 0.01))
577 if (starShapeList.at(tmppul).fDistanceFromShowerAxis < radius &&
578 starShapeList.at(tmppul+1).fDistanceFromShowerAxis > radius) {
579 indexLowLow = tmppul;
580 indexLowHigh = tmppul+1;
583 if (tmppul == starShapeList.size()-1)
586 if (!ok || indexLowHigh == -1)
588 for (
unsigned int tmppul = 0; tmppul < starShapeList.size()-1; ++tmppul) {
589 if ((fabs(highAzi - starShapeList.at(tmppul).fObserverAzimuthAngle) >= 0.01) ||
590 (fabs(highAzi - starShapeList.at(tmppul+1).fObserverAzimuthAngle) >= 0.01))
593 if (starShapeList.at(tmppul).fDistanceFromShowerAxis < radius &&
594 starShapeList.at(tmppul+1).fDistanceFromShowerAxis > radius) {
595 indexHighLow = tmppul;
596 indexHighHigh = tmppul+1;
599 if (tmppul == starShapeList.size()-1)
602 if (!ok || indexHighHigh == -1)
604 listNN = { indexHighHigh, indexHighLow, indexLowHigh, indexLowLow };
610 RdStationSignalInterpolator::NearestNeighbourInterpolation(
const double radius,
const double azimuth,
611 const std::set<double>& azimuthListStarShape,
612 const std::vector<StarShapeEntry>& starShapeList,
613 const std::vector<StationRRecDataQuantities>& eNumNames,
614 REvent& rEvent,
const bool errors)
618 double phi0 = azimuth;
619 vector<int> nn = FindIndexOfSurroundingNN(radius, azimuth, azimuthListStarShape, starShapeList);
620 vector <double> interpolatedValues;
622 if (nn.size() != 4 || eNumNames.size() == 0)
625 double tmpDist = PolarDistance(starShapeList.at(nn[0]).fDistanceFromShowerAxis,
626 starShapeList.at(nn[0]).fObserverAzimuthAngle, r0, phi0);
627 int nnStationID = starShapeList.at(nn[0]).fStationID;
628 for (
unsigned int i = 0; i < nn.size(); ++i) {
631 if (PolarDistance(starShapeList.at(nn[i]).fDistanceFromShowerAxis,
632 starShapeList.at(nn[i]).fObserverAzimuthAngle, r0, phi0) < tmpDist) {
633 tmpDist = PolarDistance(starShapeList.at(nn[i]).fDistanceFromShowerAxis,
634 starShapeList.at(nn[i]).fObserverAzimuthAngle, r0, phi0);
635 nnStationID = starShapeList.at(nn[i]).fStationID;
642 for (vector<StationRRecDataQuantities>::const_iterator it = eNumNames.begin(); it != eNumNames.end(); ++it) {
652 for (vector<StationRRecDataQuantities>::const_iterator it = eNumNames.begin(); it != eNumNames.end(); ++it) {
662 return interpolatedValues;
667 RdStationSignalInterpolator::BilinearInterpolation(
const double radius,
const double azimuth,
668 const std::set<double>& azimuthListStarShape,
669 const std::vector<StarShapeEntry>& starShapeList,
670 const std::vector<StationRRecDataQuantities>& eNumNames,
671 REvent& rEvent,
const bool errors)
675 double phi0 = azimuth;
676 vector<int> nn = FindIndexOfSurroundingNN(radius, azimuth, azimuthListStarShape, starShapeList);
677 vector<int> nStationID;
678 vector <double> interpolatedValues;
680 if (nn.size() != 4 || eNumNames.size() == 0)
682 for (
unsigned int i = 0; i < nn.size(); ++i) {
685 nStationID.push_back(starShapeList.at(nn[i]).fStationID);
689 double r1 = starShapeList.at(nn[0]).fDistanceFromShowerAxis;
690 double r2 = starShapeList.at(nn[1]).fDistanceFromShowerAxis;
691 double r3 = starShapeList.at(nn[2]).fDistanceFromShowerAxis;
692 double r4 = starShapeList.at(nn[3]).fDistanceFromShowerAxis;
693 double phi1 = starShapeList.at(nn[0]).fObserverAzimuthAngle;
694 double phi2 = starShapeList.at(nn[2]).fObserverAzimuthAngle;
701 for (vector<StationRRecDataQuantities>::const_iterator it = eNumNames.begin(); it != eNumNames.end(); ++it) {
710 interpolatedValues.push_back((phi2 - phi0) / (phi2 - phi1) * ((r2 - r0) / (r2-r1) * par1 + (r0 - r1) / (r2 - r1) * par2) +
711 ((phi0 - phi1) / (phi2 - phi1) * ((r4 - r0) / (r4 - r3)*par3 + (r0 - r3) / (r4 - r3)*par4)));
719 for (vector<StationRRecDataQuantities>::const_iterator it = eNumNames.begin(); it != eNumNames.end(); ++it) {
728 interpolatedValues.push_back((phi2 - phi0) / (phi2 - phi1) * (( r2 - r0) / (r2 - r1) * par1 + (r0 - r1) / (r2 - r1) * par2)
729 + ((phi0 - phi1) / (phi2 - phi1) * ((r4 - r0) / (r4 - r3) * par3 + (r0 - r3) / (r4 - r3) * par4)));
737 return interpolatedValues;
743 RdStationSignalInterpolator::BicubicInterpolation(
const double radius,
const double azimuth,
744 const std::set<double>& azimuthListStarShape,
745 const std::vector<StarShapeEntry>& starShapeList,
746 const std::vector<StationRRecDataQuantities>& eNumNames,
747 REvent& rEvent,
const bool errors)
749 ostringstream intermediate;
752 double phi0 = azimuth;
753 vector<StarShapeEntry> interpolationStationList;
754 vector<int> tmpNN = FindIndexOfSurroundingNN(radius, azimuth, azimuthListStarShape, starShapeList);
755 vector<int> nStationID;
756 if (tmpNN.size() != 4 || eNumNames.size() == 0)
758 for (
unsigned int i = 0; i < tmpNN.size(); ++i) {
761 nStationID.push_back(starShapeList.at(tmpNN[i]).fStationID);
764 double r1 = starShapeList.at(tmpNN[0]).fDistanceFromShowerAxis;
765 double r2 = starShapeList.at(tmpNN[1]).fDistanceFromShowerAxis;
766 double r3 = starShapeList.at(tmpNN[2]).fDistanceFromShowerAxis;
767 double r4 = starShapeList.at(tmpNN[3]).fDistanceFromShowerAxis;
768 double phi1 = starShapeList.at(tmpNN[0]).fObserverAzimuthAngle;
769 double phi2 = starShapeList.at(tmpNN[1]).fObserverAzimuthAngle;
770 double phi3 = starShapeList.at(tmpNN[2]).fObserverAzimuthAngle;
771 double phi4 = starShapeList.at(tmpNN[3]).fObserverAzimuthAngle;
776 vector<int> nnuu = FindIndexOfSurroundingNN(r1+10, phi1+0.1, azimuthListStarShape, starShapeList);
777 vector<int> nnud = FindIndexOfSurroundingNN(r2-10, phi2+0.1, azimuthListStarShape, starShapeList);
778 vector<int> nndu = FindIndexOfSurroundingNN(r3+10, phi3-0.1, azimuthListStarShape, starShapeList);
779 vector<int> nndd = FindIndexOfSurroundingNN(r4-10, phi4-0.1, azimuthListStarShape, starShapeList);
784 if (nnuu[1] == nnud[0] || nnuu[1] == nnud[1]) {
785 nnuu = FindIndexOfSurroundingNN(r1+30, phi1+0.1, azimuthListStarShape, starShapeList);
786 nnud = FindIndexOfSurroundingNN(r2-30, phi2+0.1, azimuthListStarShape, starShapeList);
788 if (nnuu[1] == nnud[0] || nnuu[1] == nnud[1]) {
794 if (nndd[2] == nndu[3] || nndd[3] == nndu[3]) {
795 nndd = FindIndexOfSurroundingNN(r3+30, phi3-0.1, azimuthListStarShape, starShapeList);
796 nndu = FindIndexOfSurroundingNN(r4-30, phi4-0.1, azimuthListStarShape, starShapeList);
797 debug <<
"No perfect star shape => NNdd and NNdu changed!" << endl;
798 if (nndd[3] == nndu[2] || nndd[3] == nndu[3]){
799 debug <<
"... but it didn't work." << endl;
806 if (nnuu.size() != 4 || nnud.size() != 4 || nndu.size() != 4 || nndd.size() != 4)
808 for (
unsigned int i = 0; i < nnuu.size(); ++i) {
809 if (nnuu[i] == -1 || nnud[i] == -1 || nndu[i] == -1 || nndd[i] == -1)
811 nStationID.push_back(starShapeList.at(tmpNN[i]).fStationID);
812 interpolationStationList.push_back(starShapeList.at(nnuu[i]));
813 interpolationStationList.push_back(starShapeList.at(nnud[i]));
814 interpolationStationList.push_back(starShapeList.at(nndu[i]));
815 interpolationStationList.push_back(starShapeList.at(nndd[i]));
818 sort(interpolationStationList.begin(), interpolationStationList.end());
821 vector<StarShapeEntry> interpolationStationListOrdered = SortForInterpolation(interpolationStationList);
827 phi1 = interpolationStationListOrdered[0].fObserverAzimuthAngle;
828 phi2 = interpolationStationListOrdered[4].fObserverAzimuthAngle;
829 phi3 = interpolationStationListOrdered[8].fObserverAzimuthAngle;
830 phi4 = interpolationStationListOrdered[12].fObserverAzimuthAngle;
831 if (interpolationStationListOrdered[0].fObserverAzimuthAngle > 0) {
847 double bicTmpValues[4];
848 vector <double> interpolatedValues;
850 for (vector<StationRRecDataQuantities>::const_iterator it = eNumNames.begin(); it != eNumNames.end(); ++it) {
851 for (
unsigned int i = 0; i < 16; ++i) {
852 rTmp[i] = interpolationStationListOrdered[i].fDistanceFromShowerAxis;
854 intermediate <<
"eNum Error for " << *it <<
" not set for at least one simulated position, skip interpolation for Station" << endl;
859 for (
unsigned int i = 0; i < 4; ++i) {
861 LagrangianFactorCubic(r0, rTmp[4*i], rTmp[4*i+1], rTmp[4*i+2], rTmp[4*i+3],
867 double iValue = LagrangianFactorCubic(phi0, phi1, phi2, phi3, phi4, bicTmpValues[0], bicTmpValues[1], bicTmpValues[2], bicTmpValues[3]);
868 interpolatedValues.push_back(iValue);
871 for (vector<StationRRecDataQuantities>::const_iterator it = eNumNames.begin(); it != eNumNames.end(); ++it) {
872 for (
unsigned int i = 0; i < 16; ++i) {
873 rTmp[i] = interpolationStationListOrdered[i].fDistanceFromShowerAxis;
875 intermediate <<
"eNum for " << *it <<
" not set for at least one simulated position, skip interpolation for Station" << endl;
880 for (
unsigned int i = 0; i < 4; ++i) {
882 LagrangianFactorCubic(r0, rTmp[4*i], rTmp[4*i+1], rTmp[4*i+2], rTmp[4*i+3],
888 double iValue = LagrangianFactorCubic(phi0, phi1, phi2, phi3, phi4, bicTmpValues[0], bicTmpValues[1], bicTmpValues[2], bicTmpValues[3]);
889 interpolatedValues.push_back(iValue);
895 return interpolatedValues;
Branch GetTopBranch() const
utl::CoordinateSystemPtr GetLocalCoordinateSystem() const
Get the Auger coordinate system associated to the shower core position.
void SetParameterError(Parameter i, double value, bool lock=true)
constexpr T Sqr(const T &x)
bool HasStation(const int stationId) const
Check whether station exists.
bool HasTriggerData() const
Check whether trigger data object exists.
void SetPulseFound(const bool pulsefound)
StationRecData & GetRecData()
Get station level reconstructed data.
CandidateStationIterator CandidateStationsEnd()
Interface class to access to the Radio part of an event.
Interface class to access to the SD part of an event.
StationIterator StationsEnd() const
End of the collection of pointers to commissioned stations.
void MakeSimData()
Make station simulated data object.
bool HasTriggerData() const
Check whether trigger data object exists.
Interface class to access to the RD Reconstruction of a Shower.
StationIterator StationsBegin() const
Beginning of the collection of pointers to commissioned stations.
double GetParameterError(const Parameter i) const
bool HasParameterError(const Parameter i1) const
#define INFO(message)
Macro for logging informational messages.
void Init()
Initialise the registry.
Branch GetChild(const std::string &childName) const
Get child of this Branch by child name.
double pow(const double x, const unsigned int i)
Station & GetStation(const int stationId)
retrieve station by id throw utl::NonExistentComponentException if n.a.
StationTimeSeries & GetStationTimeSeries()
retrieve Station Time Series (write access, only use this if you intend to change the data) ...
bool StringEquivalent(const std::string &a, const std::string &b, Predicate p)
Utility to compare strings for equivalence. It takes a predicate to determine the equivalence of indi...
Detector description interface for RDetector-related data.
void MakeGPSData()
Make GPS data object.
void MakeTriggerData()
Make trigger data object.
Interface class to access Shower Simulated parameters.
boost::shared_ptr< const CoordinateTransformer > CoordinateSystemPtr
Shared pointer for coordinate systems.
#define INFOIntermediate(y)
Class representing a document branch.
class to hold data at the radio Station level.
const utl::Vector & GetDirection() const
Get the direction of the shower axis. This is the true direction of shower movement.
Top of the hierarchy of the detector description interface.
CandidateStationIterator CandidateStationsBegin()
bool HasSimData() const
Check whether station simulated data exists.
#define WARNING(message)
Macro for logging warning messages.
void GetData(bool &b) const
Overloads of the GetData member template function.
void SetRejectedReason(const unsigned long long int reason)
Station & GetStation(const int stationId)
retrieve station by id throw utl::NonExistentComponentException if n.a.
double GetParameter(const Parameter i) const
void GetVectorInShowerPlaneVxB(double &x, double &y, double &z, const utl::Point &point) const
in case of positions, the positions has to be relative to the core positions!!!
ResultFlag
Flag returned by module methods to the RunController.
bool HasParameter(const Parameter i) const
void MakeRecData()
Make station reconstructed data object.
Station Trigger Data description
void SetParameter(Parameter i, double value, bool lock=true)
void SetExcludedReason(const ExcludedReason reason)
const rdet::RDetector & GetRDetector() const
unsigned long long int GetRejectedReason() const
sevt::StationTriggerData & GetTriggerData()
Get Trigger data for the station.
bool HasStation(const int stationId) const
Check whether station exists.
bool HasRecData() const
Check whether station reconstructed data exists.
double GetZ(const CoordinateSystemPtr &coordinateSystem) const
utl::Point GetPosition() const
Tank position in Site Cartesian Coordinates.
utl::Vector GetMagneticFieldVector() const
returns the magnetic field vector from the components stored in the parameter storage ...
#define ERROR(message)
Macro for logging error messages.
bool HasGPSData() const
Check whether GPS data object exists.
const Station & GetStation(const int stationId) const
Get station by Station Id.
void MakeStation(const int stationId)
make a station with specifying Id, throw if invalid stationId