3 #include <det/Detector.h>
5 #include <sdet/SDetector.h>
6 #include <sdet/Station.h>
10 #include <fwk/CentralConfig.h>
12 #include <sevt/Header.h>
13 #include <sevt/SEvent.h>
14 #include <sevt/Station.h>
15 #include <sevt/StationSimData.h>
16 #include <sevt/StationGPSData.h>
18 #include <utl/AugerUnits.h>
19 #include <utl/MathConstants.h>
20 #include <utl/Particle.h>
21 #include <utl/PhysicalConstants.h>
22 #include <utl/TimeStamp.h>
23 #include <utl/ErrorLogger.h>
37 namespace TankGPSSimulatorOG {
40 TankGPSSimulator::Run(
Event& event)
43 ERROR(
"Non-existent SEvent.");
47 auto& sEvent =
event.GetSEvent();
49 for (
auto& station : sEvent.StationsRange()) {
51 if (!station.HasSimData())
54 auto& sSim = station.GetSimData();
56 for (
auto& tt : sSim.TriggerTimesRange()) {
58 auto& gps = sSim.GetGPSData(tt);
61 const int current100 = 100000000;
62 const int next100 = 100000000;
63 const int current40 = 40000000;
64 const int next40 = 40000000;
65 const int previousST = 0;
67 const int currentST = 0;
68 const int second = tt.GetGPSSecond();
69 const int tickFall = 0;
71 (
unsigned int)(tt.GetGPSNanoSecond() /
72 (next100 > 0 ? (1e9 + nextST - currentST)/next100 : 10.));
74 gps.SetSecond(second);
75 gps.SetCurrent100(current100);
76 gps.SetNext100(next100);
77 gps.SetCurrent40(current40);
78 gps.SetNext40(next40);
79 gps.SetPreviousST(previousST);
80 gps.SetNextST(nextST);
81 gps.SetCurrentST(currentST);
82 gps.SetOffset(offset);
84 gps.SetTickFall(tickFall);
86 gps.SetCorrectedNanosecond(tt.GetGPSNanoSecond());
ResultFlag
Flag returned by module methods to the RunController.
#define ERROR(message)
Macro for logging error messages.