RdEventInitializer.cc
Go to the documentation of this file.
1 #include "RdEventInitializer.h"
2 
3 #include <fwk/CentralConfig.h>
4 #include <fwk/LocalCoordinateSystem.h>
5 #include <fwk/MagneticFieldModel.h>
6 
7 #include <det/Detector.h>
8 #include <rdet/RDetector.h>
9 
10 #include <utl/Branch.h>
11 #include <utl/ErrorLogger.h>
12 #include <utl/Reader.h>
13 #include <utl/config.h>
14 #include <utl/Point.h>
15 #include <utl/Vector.h>
16 #include <utl/UTCDateTime.h>
17 #include <utl/CorrelationMatrix.h>
18 #include <utl/NumericalErrorPropagation.h>
19 
20 #include <evt/Event.h>
21 #include <evt/ShowerRecData.h>
22 #include <evt/ShowerRRecData.h>
23 #include <evt/ShowerSRecData.h>
24 #include <evt/ShowerFRecData.h>
25 #include <evt/ShowerSimData.h>
26 
27 #include <revt/REvent.h>
28 #include <revt/Station.h>
29 #include <revt/Header.h>
30 #include <revt/StationRecData.h>
31 #include <revt/StationSimData.h>
32 #include <revt/StationTriggerData.h>
33 #include <revt/StationHeader.h>
34 
35 #include <sevt/SEvent.h>
36 
37 #include <fevt/FEvent.h>
38 #include <fevt/Eye.h>
39 #include <fevt/EyeRecData.h>
40 #include <fdet/Eye.h>
41 #include <fdet/FDetector.h>
42 
43 #include "ErrorPropagation.h"
44 
45 
46 using namespace std;
47 using namespace revt;
48 using namespace evt;
49 using namespace fwk;
50 using namespace utl;
51 using namespace fevt;
52 
53 
54 namespace RdEventInitializer {
55 
58  {
59  Branch topBranch = CentralConfig::GetInstance()->GetTopBranch("RdEventInitializer");
60  topBranch.GetChild("InfoLevel").GetData(fInfoLevel);
61  topBranch.GetChild("NoiseWindowStart").GetData(fNoiseWindowStart);
62  topBranch.GetChild("NoiseWindowStop").GetData(fNoiseWindowStop);
63  topBranch.GetChild("SignalSearchWindowStart").GetData(fSignalSearchWindowStart);
64  topBranch.GetChild("SignalSearchWindowStop").GetData(fSignalSearchWindowStop);
65  topBranch.GetChild("FilenameWindowSettings").GetData(fFilenameWindowSettings);
66  topBranch.GetChild("SignalSearchWindowOffset").GetData(fSignalSearchWindowOffset);
67  topBranch.GetChild("ReferenceCorePosition").GetData(fReferenceCorePosition);
68  topBranch.GetChild("ReferenceAxis").GetData(fReferenceAxis);
69  topBranch.GetChild("SetSignalSearchWindowRelativeTo").GetData(fSetSignalSearchWindowRelativeTo);
70  topBranch.GetChild("UseSimulationMagneticField").GetData(fUseSimulationMagneticField);
71  topBranch.GetChild("SetCoordinateOriginTo").GetData(fSetCoordinateOriginTo);
72 
73  const string whichEye = topBranch.GetChild("UsedEye").Get<string>();
74  if (whichEye == "CO")
75  fWhichEye = 4;
76  if (whichEye == "HE")
77  fWhichEye = 5;
78  if (whichEye == "HECO")
79  fWhichEye = 6;
80 
81  fExternalShowerGeometries = topBranch.GetChild("ExternalShowerGeometries");
82 
83  fConsiderSdUncertainity = (topBranch.GetChild("ConsiderSdUncertainity").Get<string>() == "yes");
84  fConsiderFdUncertainity = (topBranch.GetChild("ConsiderFdUncertainity").Get<string>() == "yes");
85 
86  ostringstream info;
87  info << "\n\tSet reference Core / Axis to: " << fReferenceCorePosition << " / " << fReferenceAxis
88  << "\n\tDetermine signal seach window from: " << fSetSignalSearchWindowRelativeTo
89  << "\n\tSignalSeachWindow(Start/Stop) in ns: " << fSignalSearchWindowStart << " / " << fSignalSearchWindowStop
90  << "\n\tNoiseWindow(Start/Stop) in ns: " << fNoiseWindowStart << " / " << fNoiseWindowStop << "\n";
91 
92  INFOFinal(info);
93 
94  return eSuccess;
95  }
96 
97 
99  RdEventInitializer::Run(evt::Event& event)
100  {
101  // nothing to do if there is no REvent
102  if (!event.HasREvent()) {
103  INFOIntermediate("eContinueLoop: No REvent, so no reconstruction.");
104  return eContinueLoop;
105  }
106 
107  // initialize data structures
108  REvent& rEvent = event.GetREvent();
109 
110  if (!event.HasRecShower())
111  event.MakeRecShower();
112 
113  if (!event.GetRecShower().HasRRecShower())
114  event.GetRecShower().MakeRRecShower();
115 
116  ShowerRRecData& showerrrec = event.GetRecShower().GetRRecShower();
117 
118  if (fInfoLevel > eInfoFinal) {
119  //Display some information for low level bug tracking
120  ostringstream info;
121  info << "Event Running ID: " << rEvent.GetHeader().GetId() << " Run: "
122  << rEvent.GetHeader().GetRunNumber() << " file: " << rEvent.GetHeader().GetFileId()
123  << " Read with aevread v: " << rEvent.GetHeader().GetEventVersion();
124  INFO(info);
125  }
126 
130 
131  // get reference coordinate system of detector (usually PampaAmarilla)
132  const utl::CoordinateSystemPtr referenceCS = det::Detector::GetInstance().GetReferenceCoordinateSystem();
133  utl::Point coordinateOrigin;
134  if (fSetCoordinateOriginTo == "RdBaryCenter") {
135  // Set coordinate origin to barycenter of radio antennas
136  VModule::ResultFlag resultCoordinateOrigin = ComputeCoordinateOrigin(rEvent, coordinateOrigin);
137  if (resultCoordinateOrigin != eSuccess) {
138  WARNING("Coordinate Origin could not be determined!");
139  return resultCoordinateOrigin;
140  }
141 
142  showerrrec.SetParameter(eCoordinateOriginX, coordinateOrigin.GetX(referenceCS));
143  showerrrec.SetParameter(eCoordinateOriginY, coordinateOrigin.GetY(referenceCS));
144  showerrrec.SetParameter(eCoordinateOriginZ, coordinateOrigin.GetZ(referenceCS));
145  } else if (fSetCoordinateOriginTo == "SDCore") {
146  // Set coordinate origin to SD core
147  if (!event.GetRecShower().HasSRecShower()) {
148  ERROR("No SRecShower available but SDCore specified in the settings.");
149  return eFailure;
150  }
151 
152  ShowerSRecData& showersrec = event.GetRecShower().GetSRecShower();
153  coordinateOrigin = showersrec.GetCorePosition();
154  showerrrec.SetParameter(eCoordinateOriginX, coordinateOrigin.GetX(referenceCS));
155  showerrrec.SetParameter(eCoordinateOriginY, coordinateOrigin.GetY(referenceCS));
156  showerrrec.SetParameter(eCoordinateOriginZ, coordinateOrigin.GetZ(referenceCS));
157  } else if (fSetCoordinateOriginTo == "MCCore") {
158  // Set coordinate origin to Monte Carlo core
159  if (!event.HasSimShower()) {
160  ERROR("No SimShower available but MCCore specified in the settings.");
161  return eFailure;
162  }
163 
164  coordinateOrigin = event.GetSimShower().GetPosition();
165  showerrrec.SetParameter(eCoordinateOriginX, coordinateOrigin.GetX(referenceCS));
166  showerrrec.SetParameter(eCoordinateOriginY, coordinateOrigin.GetY(referenceCS));
167  showerrrec.SetParameter(eCoordinateOriginZ, coordinateOrigin.GetZ(referenceCS));
168  } else if (fSetCoordinateOriginTo == "FDCore") {
169  if (!event.HasFEvent()) {
170  ERROR("No FEvent available but FDCore specified in the settings!");
171  return eContinueLoop;
172  }
173 
174  FEvent& fdEvent = event.GetFEvent();
175  for (auto eyeIter = fdEvent.EyesBegin(ComponentSelector::eHasData);
176  eyeIter != fdEvent.EyesEnd(ComponentSelector::eHasData); ++eyeIter) {
177  if (eyeIter->GetId() != fWhichEye)
178  continue; // continue until selected eye
179 
180  fevt::Eye& eye = *eyeIter;
181  if (!eye.HasRecData() || !eye.GetRecData().HasFRecShower()) {
182  ERROR("Eye has no RecData or FRecShower but FDCore specified in the settings!");
183  return eContinueLoop;
184  }
185 
186  ShowerFRecData& showerfrec = eye.GetRecData().GetFRecShower();
187  coordinateOrigin = showerfrec.GetCorePosition();
188  showerrrec.SetParameter(eCoordinateOriginX, coordinateOrigin.GetX(referenceCS));
189  showerrrec.SetParameter(eCoordinateOriginY, coordinateOrigin.GetY(referenceCS));
190  showerrrec.SetParameter(eCoordinateOriginZ, coordinateOrigin.GetZ(referenceCS));
191  }
192  } else if (fSetCoordinateOriginTo == "External") {
193  std::vector<double> external_core;
194  fExternalShowerGeometries.GetChild("ExternalShowerGeometry", {{"id", event.GetHeader().GetId()}})
195  .GetChild("ShowerCore").GetData(external_core);
196  coordinateOrigin = utl::Point(external_core[0], external_core[1], external_core[2], referenceCS);
197  showerrrec.SetParameter(eCoordinateOriginX, coordinateOrigin.GetX(referenceCS));
198  showerrrec.SetParameter(eCoordinateOriginY, coordinateOrigin.GetY(referenceCS));
199  showerrrec.SetParameter(eCoordinateOriginZ, coordinateOrigin.GetZ(referenceCS));
200  } else {
201  // if no coordinate origin is set give failure
202  ERROR("No coordinate origin was set!");
203  return eFailure;
204  }
205 
206  // Set flag which specify which reference core position is returned by ShowerRRecData::GetReferenceCorePosition
207  if (fReferenceCorePosition == "SD") {
208  showerrrec.SetReferenceCoreFlag(ShowerRRecData::eUseSDReferenceCore);
209  } else if (fReferenceCorePosition == "FD") {
210  showerrrec.SetReferenceCoreFlag(ShowerRRecData::eUseFDReferenceCore);
211  showerrrec.SetWhichEye(fWhichEye);
212  } else if (fReferenceCorePosition == "MC") {
213  showerrrec.SetReferenceCoreFlag(ShowerRRecData::eUseMCReferenceCore);
214  } else if (fReferenceCorePosition == "RD") {
215  showerrrec.SetReferenceCoreFlag(ShowerRRecData::eUseRDReferenceCore);
216  } else if (fReferenceCorePosition == "RDCoordinateOrigin") {
217  showerrrec.SetReferenceCoreFlag(ShowerRRecData::eUseRDCoordinateOrigin);
218  } else if (fReferenceCorePosition == "External") {
219  showerrrec.SetReferenceCoreFlag(ShowerRRecData::eUseExternalReferenceCore);
220  std::vector<double> external_core;
221  fExternalShowerGeometries.GetChild("ExternalShowerGeometry", {{"id", event.GetHeader().GetId()}})
222  .GetChild("ShowerCore").GetData(external_core);
223  showerrrec.SetParameter(revt::eExternalCoreX, external_core[0]);
224  showerrrec.SetParameter(revt::eExternalCoreY, external_core[1]);
225  showerrrec.SetParameter(revt::eExternalCoreZ, external_core[2]);
226  }
227 
228  // Set flag which specify which reference core/axis is returned by ShowerRRecData::GetReferenceAxis
229  if (fReferenceAxis == "SD") {
230  showerrrec.SetReferenceAxisFlag(ShowerRRecData::eUseSDReferenceAxis);
231  } else if (fReferenceAxis == "FD") {
232  showerrrec.SetReferenceAxisFlag(ShowerRRecData::eUseFDReferenceAxis);
233  showerrrec.SetWhichEye(fWhichEye);
234  } else if (fReferenceAxis == "MC") {
235  showerrrec.SetReferenceAxisFlag(ShowerRRecData::eUseMCReferenceAxis);
236  } else if (fReferenceAxis == "RD") {
237  showerrrec.SetReferenceAxisFlag(ShowerRRecData::eUseRDReferenceAxis);
238  } else if (fReferenceAxis == "External") {
239  // special case: should by used only for RdIndenpendentCheck
240  showerrrec.SetReferenceAxisFlag(ShowerRRecData::eUseExternalReferenceAxis);
241  std::vector<double> external_axis;
242  fExternalShowerGeometries.GetChild("ExternalShowerGeometry", {{"id", event.GetHeader().GetId()}})
243  .GetChild("ShowerAxis").GetData(external_axis);
244  showerrrec.SetParameter(revt::eExternalShowerAxisX, external_axis[0]);
245  showerrrec.SetParameter(revt::eExternalShowerAxisY, external_axis[1]);
246  showerrrec.SetParameter(revt::eExternalShowerAxisZ, external_axis[2]);
247  } else {
248  ERROR("No valid Reference Direction was choosen. Check configuration.");
249  return eFailure;
250  }
251 
252  // Set magnetic field according to flag
253  const CoordinateSystemPtr coordinateOriginCS = fwk::LocalCoordinateSystem::Create(coordinateOrigin);
254 
255  Vector localMagneticField;
256  if (fUseSimulationMagneticField) {
257  if (!event.HasSimShower()) {
258  ERROR("No SimShower available but MCCore specified in the settings.");
259  return eFailure;
260  }
261 
262  evt::ShowerSimData& simshow = event.GetSimShower();
263  localMagneticField = Vector(1, simshow.GetMagneticFieldZenith(),
264  simshow.GetMagneticFieldAzimuth(), // includes declination
265  coordinateOriginCS, Vector::kSpherical);
266  localMagneticField *= simshow.GetMagneticFieldStrength();
267  }
268  else {
270  coordinateOrigin, rEvent.GetHeader().GetTime().GetGPSSecond());
271  }
272 
273  showerrrec.SetParameter(eMagneticFieldVectorX, localMagneticField.GetX(coordinateOriginCS));
274  showerrrec.SetParameter(eMagneticFieldVectorY, localMagneticField.GetY(coordinateOriginCS));
275  showerrrec.SetParameter(eMagneticFieldVectorZ, localMagneticField.GetZ(coordinateOriginCS));
276 
277  const TimeStamp& reventTime = rEvent.GetHeader().GetTime();
278 
279  for (auto& station : rEvent.StationsRange()) {
280 
281  if (station.HasRecData()) {
282  WARNING("A REvent station has already RecData. This should not be the case."
283  " Check what is going on.");
284 
285  if (station.GetRecData().HasParameter(eTraceStartTime)) {
286  ERROR("eTraceStartTime is already set in StationRecData. This should not be the case."
287  " Check what is going on!");
288  return eFailure;
289  }
290  }
291 
292  // Create StationRecData. This should not exist before.
293  station.MakeRecData();
294 
295  /* Set up the trace start time relative to the event time in the ParameterStorage,
296  keep unlocked as it might need to be revised for example by the beacon timing
297  calibration */
298  const TimeInterval traceStartTime = station.GetRawTraceStartTime() - reventTime;
299  station.GetRecData().SetParameter(eTraceStartTime, traceStartTime, false);
300  station.SetRawTraceStartTimeLocked();
301  }
302 
303  VModule::ResultFlag searchWindowStatus;
304  if (fSetSignalSearchWindowRelativeTo == "User") {
305  searchWindowStatus = SetSignalSearchWindowManual(event);
306  } else if (fSetSignalSearchWindowRelativeTo == "SD") {
307  searchWindowStatus = SetSignalSearchWindowFromSD(event);
308  } else if (fSetSignalSearchWindowRelativeTo == "FD") {
309  searchWindowStatus = SetSignalSearchWindowFromFD(event);
310  } else if (fSetSignalSearchWindowRelativeTo == "MC") {
311  searchWindowStatus = SetSignalSearchWindowFromMC(event);
312  } else if (fSetSignalSearchWindowRelativeTo == "External") {
313  searchWindowStatus = SetSignalSearchWindowFromExternal(event);
314  } else if (fSetSignalSearchWindowRelativeTo == "File") {
315  searchWindowStatus = SetSignalSearchWindowFromFile(event);
316  } else {
317  // code should never be able to get here
318  ERROR("Unspecified setting for the choice of the SignalSearchWindow. Aborting ...");
319  return eFailure;
320  }
321 
322  // check if setting the search window in one of the above methods worked correctly
323  if (searchWindowStatus != eSuccess)
324  return searchWindowStatus;
325 
326  return eSuccess;
327  }
328 
329 
331  RdEventInitializer::Finish()
332  {
333  return eSuccess;
334  }
335 
336 
338  RdEventInitializer::ComputeCoordinateOrigin(const REvent& rEvent,
339  Point& coordinateOrigin)
340  const
341  {
342  const det::Detector& detector = det::Detector::GetInstance();
343  const rdet::RDetector& rDetector = detector.GetRDetector();
344  const CoordinateSystemPtr siteCS = detector.GetSiteCoordinateSystem();
345 
346  const Point siteOrigin(0, 0, 0, siteCS);
347  Vector barySum(0, 0, 0, siteCS);
348 
349  //fixme TH: should weigh down outlier stations in calculation of coordinate origin to make it more robust!
350 
351  int nStations = 0;
352  for (const auto& station : rEvent.StationsRange()) {
353  const rdet::Station& dStation = rDetector.GetStation(station);
354  barySum += (dStation.GetPosition() - siteOrigin);
355  ++nStations;
356  }
357 
358  barySum /= nStations;
359  coordinateOrigin = siteOrigin + barySum;
360 
361  return eSuccess;
362  }
363 
364 
366  RdEventInitializer::SetSignalSearchWindowManual(Event& event)
367  const
368  {
369  REvent& rEvent = event.GetREvent();
370 
371  for (auto& station : rEvent.StationsRange()) {
372  station.GetRecData().SetParameter(eNoiseWindowStart, fNoiseWindowStart, false);
373  station.GetRecData().SetParameter(eNoiseWindowStop, fNoiseWindowStop, false);
374  station.GetRecData().SetParameter(eSignalSearchWindowStart, fSignalSearchWindowStart, false);
375  station.GetRecData().SetParameter(eSignalSearchWindowStop, fSignalSearchWindowStop, false);
376  }
377 
378  return eSuccess;
379  }
380 
381 
383  RdEventInitializer::SetSignalSearchWindowFromFile(evt::Event& event)
384  const
385  {
386  REvent& rEvent = event.GetREvent();
387  ostringstream oinfo;
388 
389  // read in window settings
390  INFODebug("read in window settings");
391  fstream fin;
392  char line[256];
393  fin.open(fFilenameWindowSettings.c_str(), ios::in); // opening data
394  fin.getline(line, 256); // read/skip first line
395  std::vector<std::vector<double> > vWindowSettings;
396 
397  INFODebug("loop through file... filename = ");
398 
399  if (!fin.good()) {
400  WARNING("File could not be opened");
401  return eFailure;
402  }
403 
404  while (fin.good()) {
405  std::vector<double> vTmp;
406  int windowId;
407  double signalSearchWindowStart, signalSearchWindowStop, noiseWindowStart, noiseWindowStop;
408  fin >> windowId >> signalSearchWindowStart >> signalSearchWindowStop >> noiseWindowStart
409  >> noiseWindowStop;
410  fin.getline(line, 256); // read rest of the lines
411  vTmp.push_back(signalSearchWindowStart);
412  vTmp.push_back(signalSearchWindowStop);
413  vTmp.push_back(noiseWindowStart);
414  vTmp.push_back(noiseWindowStop);
415  vWindowSettings.push_back(vTmp);
416 
417  oinfo.str("");
418  oinfo << windowId << "\t" << signalSearchWindowStart << "\t" << signalSearchWindowStop
419  << "\t" << noiseWindowStart << "\t" << noiseWindowStop << endl;
420  INFODebug(oinfo);
421  }
422 
423  fin.close();
424 
425  // get hardware type information from rdetector (from DB)
426  utl::TimeStamp eventTime = event.GetHeader().GetTime();
427  det::Detector& detector = det::Detector::GetInstance();
428  detector.Update(eventTime);
429 
430  // loop through stations
431  for (auto& station : rEvent.StationsRange()) {
432 
433  bool isGermanHardware = false;
434  if ((!station.HasStationHeader())
435  || (station.GetStationHeader().GetHardwareType() == revt::StationHeader::eDE)) {
436  isGermanHardware = true;
437  INFODebug("station " + std::to_string(station.GetId()) + " has German hardware");
438  } else {
439  INFODebug("station " + std::to_string(station.GetId()) + " does not have German hardware");
440  }
441 
442  if (fInfoLevel == eInfoDebug) {
443  oinfo.str("");
444  oinfo << "TriggerSource Flag = " << station.GetTriggerData().GetTriggerSource();
445  INFO(oinfo);
446  }
447 
448  TimeStamp time = UTCDateTime(2011, 11, 11, 00, 00, 00).GetTimeStamp();
449  TimeStamp timeAERAHWv3 = UTCDateTime(2012, 12, 28, 00, 00, 00).GetTimeStamp();
450  TimeStamp timeAERAII = UTCDateTime(2013, 05, 16, 00, 00, 00).GetTimeStamp();
451  double signalSearchWindowStart, signalSearchWindowStop, noiseWindowStart, noiseWindowStop;
452  // set time window according to hardware type
453  if (isGermanHardware) {
454  // set time window for "German" hardware
455  // check if externally triggered
456  if (station.GetTriggerData().GetTriggerSource() == revt::StationTriggerData::eSelf) {
457  // use window for self-triggered event
458  signalSearchWindowStart = vWindowSettings[0][0];
459  signalSearchWindowStop = vWindowSettings[0][1];
460  noiseWindowStart = vWindowSettings[0][2];
461  noiseWindowStop = vWindowSettings[0][3];
462  INFODebug("German self-triggered station");
463  } else {
464  // use window for externally triggered event
465  signalSearchWindowStart = vWindowSettings[1][0];
466  signalSearchWindowStop = vWindowSettings[1][1];
467  noiseWindowStart = vWindowSettings[1][2];
468  noiseWindowStop = vWindowSettings[1][3];
469  INFODebug("German externally triggered station");
470  } // end of German hardware window settings
471  } else if (station.GetTriggerData().GetTriggerSource() == revt::StationTriggerData::eScint) {
472  signalSearchWindowStart = vWindowSettings[4][0];
473  signalSearchWindowStop = vWindowSettings[4][1];
474  noiseWindowStart = vWindowSettings[4][2];
475  noiseWindowStop = vWindowSettings[4][3];
476  INFODebug("Dutch scintillator triggered station, AERA II");
477  } else if (eventTime < time) {
478  signalSearchWindowStart = vWindowSettings[2][0];
479  signalSearchWindowStop = vWindowSettings[2][1];
480  noiseWindowStart = vWindowSettings[2][2];
481  noiseWindowStop = vWindowSettings[2][3];
482  INFODebug("Dutch self-triggered station, AERA I, before November");
483  } else if (eventTime < timeAERAHWv3) {
484  signalSearchWindowStart = vWindowSettings[3][0];
485  signalSearchWindowStop = vWindowSettings[3][1];
486  noiseWindowStart = vWindowSettings[3][2];
487  noiseWindowStop = vWindowSettings[3][3];
488  INFODebug("Dutch self-triggered station, AERA I, after November");
489  } else if (eventTime < timeAERAII) {
490  signalSearchWindowStart = vWindowSettings[5][0];
491  signalSearchWindowStop = vWindowSettings[5][1];
492  noiseWindowStart = vWindowSettings[5][2];
493  noiseWindowStop = vWindowSettings[5][3];
494  INFODebug("Dutch self-triggered station, AERA I, v3 data format");
495  } else {
496  signalSearchWindowStart = vWindowSettings[6][0];
497  signalSearchWindowStop = vWindowSettings[6][1];
498  noiseWindowStart = vWindowSettings[6][2];
499  noiseWindowStop = vWindowSettings[6][3];
500  INFODebug("Dutch self-triggered station, AERA II");
501  }
502 
503  station.GetRecData().SetParameter(eNoiseWindowStart, noiseWindowStart, false);
504  station.GetRecData().SetParameter(eNoiseWindowStop, noiseWindowStop, false);
505  station.GetRecData().SetParameter(eSignalSearchWindowStart, signalSearchWindowStart, false);
506  station.GetRecData().SetParameter(eSignalSearchWindowStop, signalSearchWindowStop, false);
507 
508  }
509  return eSuccess;
510  }
511 
512 
513  // This is an extra method which can be used to determine the signal window from the SD timing
514  // it is only used when SetSignalSearchWindowRelativeTo is specified to SD.
516  RdEventInitializer::SetSignalSearchWindowFromSD(evt::Event& event)
517  const
518  {
519  if (!event.HasSEvent() || !event.HasRecShower() || !event.GetRecShower().HasSRecShower()) {
520  ERROR("No Sd Event or no SD reconstruction will continue."
521  " Maybe you should use non hybrid RdEventInitializer");
522  return eContinueLoop;
523  }
524 
525  const rdet::RDetector& rDetector = det::Detector::GetInstance().GetRDetector();
526 
527  REvent& rEvent = event.GetREvent();
528  const TimeStamp& reventTime = rEvent.GetHeader().GetTime();
529 
530  const ShowerSRecData& showersrec = event.GetRecShower().GetSRecShower();
531  const TimeStamp& sCoreTime = showersrec.GetCoreTime();
532  TimeInterval RelativesCoreTime = sCoreTime - reventTime;
533 
534  const Point& sCore = showersrec.GetCorePosition();
536  const utl::Vector& SdAxis = showersrec.GetAxis();
537  const double zenith = SdAxis.GetTheta(coreCS);
538 
539  for (auto& station : rEvent.StationsRange()) {
540  // calculate Rd station distance to Sd core
541  const Point& stationPosition = rDetector.GetStation(station).GetPosition();
542  Vector VecDistanceToSdCore = stationPosition - sCore;
543 
544  // project the vector on shower direction
545  double projVec = -SdAxis.GetX(coreCS) * VecDistanceToSdCore.GetX(coreCS)
546  - SdAxis.GetY(coreCS) * VecDistanceToSdCore.GetY(coreCS)
547  - SdAxis.GetZ(coreCS) * VecDistanceToSdCore.GetZ(coreCS);
548 
549  // calculate expected pulse arrival time
550  double relativePulseTime = projVec / (kSpeedOfLight);
551  const double expectedtime = double(RelativesCoreTime) + relativePulseTime
552  - station.GetRecData().GetParameter(eTraceStartTime) + fSignalSearchWindowOffset;
553 
554  if (std::isnan(expectedtime)) {
555  if (fInfoLevel > eInfoFinal)
556  ERROR("Expected time for pulse is Nan, Skip to next event");
557 
558  return eContinueLoop;
559  }
560 
561  // propagate the Sd and Rd uncertainities to the signal search window
562  if (fConsiderSdUncertainity && !showersrec.HasParameterCovariance(sevt::eShowerAxisX, sevt::eShowerAxisX) &&
563  !showersrec.HasParameterCovariance(sevt::eShowerAxisY, sevt::eShowerAxisY) &&
564  !showersrec.HasParameterCovariance(sevt::eShowerAxisX, sevt::eShowerAxisY))
565  {
566  ERROR("No error given in Sd shower reco! cannot set signal window from Sd uncertainity."
567  " Event is ignored!!!");
568  return eContinueLoop;
569  }
570 
571  double deltaTimeSdUncert = 0;
572  if (fConsiderSdUncertainity) {
573  const TimeInterval& sCoreTimeError = showersrec.GetCoreTimeError();
574  // get the covariance components
575  double CoreErr_X = showersrec.GetCoreError().GetX(coreCS);
576  double CoreErr_Y = showersrec.GetCoreError().GetY(coreCS);
577  double CoreCov_XY = showersrec.GetCorrelationXY() * CoreErr_X * CoreErr_Y;
578  double sig2_Axis_x = showersrec.GetParameterCovariance(sevt::eShowerAxisX,
579  sevt::eShowerAxisX);
580  double sig2_Axis_y = showersrec.GetParameterCovariance(sevt::eShowerAxisY,
581  sevt::eShowerAxisY);
582  double AxisCov_xy = showersrec.GetParameterCovariance(sevt::eShowerAxisX, sevt::eShowerAxisY);
583  double sig2_projVec =
584  SdAxis.GetX(coreCS) * SdAxis.GetX(coreCS) * CoreErr_X * CoreErr_X
585  + VecDistanceToSdCore.GetX(coreCS) * VecDistanceToSdCore.GetX(coreCS) * sig2_Axis_x
586  + SdAxis.GetY(coreCS) * SdAxis.GetY(coreCS) * CoreErr_Y * CoreErr_Y
587  + VecDistanceToSdCore.GetY(coreCS) * VecDistanceToSdCore.GetY(coreCS) * sig2_Axis_y
588  + 2
589  * (SdAxis.GetX(coreCS) * SdAxis.GetY(coreCS) * CoreCov_XY
590  + VecDistanceToSdCore.GetX(coreCS) * VecDistanceToSdCore.GetY(coreCS)
591  * AxisCov_xy);
592 
593  double sig2_relativePulseTime = sig2_projVec / ((kSpeedOfLight) * (kSpeedOfLight));
594  deltaTimeSdUncert = sqrt(
595  sig2_relativePulseTime + double(sCoreTimeError) * double(sCoreTimeError));
596 
597  if (std::isnan(deltaTimeSdUncert)) {
598  if (fInfoLevel > eInfoFinal)
599  ERROR("Estimated arrival time uncertainty for a pulse is Nan, Skip to next event");
600 
601  return eContinueLoop;
602  }
603  }
604 
605  /* this formula is obtained by a MC study which investigates the systematic difference
606  between SD and MC core position. The direction of the offset depends on the azimuth
607  angle which we do not take into account here. This estimate of the core bias is
608  conservative because it depends mostly on the muons which are not correctly described
609  in the MC simulations */
610  const double increase = (62.11 * utl::m + 8.05 * utl::m * cos(zenith)
611  - 69.65 * utl::m * cos(zenith) * cos(zenith)) / kSpeedOfLight;
612 
613  const double searchWindowStart = expectedtime - deltaTimeSdUncert + fSignalSearchWindowStart - increase;
614  const double searchWindowStop = expectedtime + deltaTimeSdUncert + fSignalSearchWindowStop + increase;
615 
616  // Set the window start and stop to the calculated values; these might be illegal,
617  // but will later be truncated in the RdStationTimeWindowConsolidator module
618  station.GetRecData().SetParameter(eSignalSearchWindowStart, searchWindowStart, false);
619  station.GetRecData().SetParameter(eSignalSearchWindowStop, searchWindowStop, false);
620 
621  // For Safety reason these parameters must be relative to the trace start.
622  // If not the risk is to go out of the trace
623  station.GetRecData().SetParameter(eNoiseWindowStart, fNoiseWindowStart, false);
624  station.GetRecData().SetParameter(eNoiseWindowStop, fNoiseWindowStop, false);
625  }
626  return eSuccess;
627  }
628 
629 
630  // This function is used to set the signal search window acoording to an (from external read in) sd geometry.
631  // Only used for the RdIndependetCheck
633  RdEventInitializer::SetSignalSearchWindowFromExternal(evt::Event& event)
634  const
635  {
636  if (!event.HasRecShower()) {
637  ERROR("No RecEvent, may-be you should review RdEventInitializer");
638  return eContinueLoop;
639  }
640 
641  const rdet::RDetector& rDetector = det::Detector::GetInstance().GetRDetector();
642 
643  // initialize data structures
644  REvent& rEvent = event.GetREvent();
645  const TimeStamp& reventTime = rEvent.GetHeader().GetTime();
646 
647  if (!event.HasRecShower()) {
648  event.MakeRecShower();
649  }
650 
651  if (!event.GetRecShower().HasRRecShower()) {
652  event.GetRecShower().MakeRRecShower();
653  }
654 
655  const utl::CoordinateSystemPtr referenceCS = det::Detector::GetInstance().GetReferenceCoordinateSystem();
656 
657  std::vector<double> external_core;
658  fExternalShowerGeometries.GetChild("ExternalShowerGeometry", {{"id", event.GetHeader().GetId()}})
659  .GetChild("ShowerCore").GetData(external_core);
660  utl::Point sCore = utl::Point(external_core[0], external_core[1], external_core[2], referenceCS);
661 
662  std::vector<double> external_axis;
663  fExternalShowerGeometries.GetChild("ExternalShowerGeometry", {{"id", event.GetHeader().GetId()}})
664  .GetChild("ShowerAxis").GetData(external_axis);
666  utl::Vector SdAxis = utl::Vector(external_axis[0], external_axis[1], external_axis[2], coreCS);
667 
668  std::vector<double> external_core_time; // gps time in (sec, nsec)
669  fExternalShowerGeometries.GetChild("ExternalShowerGeometry", {{"id", event.GetHeader().GetId()}})
670  .GetChild("CoreTime").GetData(external_core_time);
671  TimeStamp sCoreTime = TimeStamp(external_core_time[0], external_core_time[1]);
672 
673  TimeInterval RelativesCoreTime = sCoreTime - reventTime;
674  const double zenith = SdAxis.GetTheta(coreCS);
675 
676  for (auto& station : rEvent.StationsRange()) {
677  // calculate Rd station distance to Sd core
678  const Point& stationPosition = rDetector.GetStation(station).GetPosition();
679  Vector VecDistanceToSdCore = stationPosition - sCore;
680  // project the vector on shower direction
681  double projVec = -SdAxis.GetX(coreCS) * VecDistanceToSdCore.GetX(coreCS)
682  - SdAxis.GetY(coreCS) * VecDistanceToSdCore.GetY(coreCS)
683  - SdAxis.GetZ(coreCS) * VecDistanceToSdCore.GetZ(coreCS);
684 
685  // calculate expected pulse arrival time
686  double relativePulseTime = projVec / (kSpeedOfLight);
687  const double expectedtime = double(RelativesCoreTime) + relativePulseTime
688  - station.GetRecData().GetParameter(eTraceStartTime) + fSignalSearchWindowOffset;
689 
690  if (std::isnan(expectedtime)) {
691  if (fInfoLevel > eInfoFinal) {
692  WARNING("Expected time for pulse is Nan, Skip to next event");
693  }
694  return eContinueLoop;
695  }
696 
697  /* this formula is obtained by a MC study which investigates the systematic difference
698  between SD and MC core position. The direction of the offset depends on the azimuth
699  angle which we do not take into account here. This estimate of the core bias is
700  conservative because it depends mostly on the muons which are not correctly described
701  in the MC simulations */
702  const double increase = (62.11 * utl::m + 8.05 * utl::m * cos(zenith)
703  - 69.65 * utl::m * cos(zenith) * cos(zenith)) / kSpeedOfLight;
704 
705  const double searchWindowStart = expectedtime + fSignalSearchWindowStart - increase;
706  const double searchWindowStop = expectedtime + fSignalSearchWindowStop + increase;
707 
708  // Set the window start and stop to the calculated values; these might be illegal,
709  // but will later be truncated in the RdStationTimeWindowConsolidator module
710  station.GetRecData().SetParameter(eSignalSearchWindowStart, searchWindowStart, false);
711  station.GetRecData().SetParameter(eSignalSearchWindowStop, searchWindowStop, false);
712 
713  // For Safety reason these parameters must be relative to the trace start.
714  // If not the risk is to go out of the trace
715  station.GetRecData().SetParameter(eNoiseWindowStart, fNoiseWindowStart, false);
716  station.GetRecData().SetParameter(eNoiseWindowStop, fNoiseWindowStop, false);
717  }
718 
719  return eSuccess;
720  }
721 
722 
723  // This is an extra method which can be used to determine the signal window from the FD timing
724  // it is only used when SetSignalSearchWindowRelativeTo is specified to FD.
726  RdEventInitializer::SetSignalSearchWindowFromFD(evt::Event& event)
727  const
728  {
729  if (!event.HasFEvent()) {
730  ERROR("No FEvent available but SetSignalSearchWindowFromFD specified in the settings!");
731  return eContinueLoop;
732  }
733 
734  FEvent& fdEvent = event.GetFEvent();
735  for (auto eyeIter = fdEvent.EyesBegin(ComponentSelector::eHasData);
736  eyeIter != fdEvent.EyesEnd(ComponentSelector::eHasData); ++eyeIter) {
737 
738  if (eyeIter->GetId() != fWhichEye)
739  continue; // continue until selected eye
740 
741  fevt::Eye& eye = *eyeIter;
742  if (!eye.HasRecData() || !eye.GetRecData().HasFRecShower()) {
743  ERROR("Eye has no RecData or FRecShower but FD SetSignalSearchWindowFromFD specified in the settings!");
744  return eContinueLoop;
745  }
746 
747  const rdet::RDetector& rDetector = det::Detector::GetInstance().GetRDetector();
748  REvent& rEvent = event.GetREvent();
749  const TimeStamp& reventTime = rEvent.GetHeader().GetTime();
750 
751  if (!event.HasRecShower())
752  event.MakeRecShower();
753 
754  if (!event.GetRecShower().HasRRecShower())
755  event.GetRecShower().MakeRRecShower();
756 
757  ShowerFRecData& showerfrec = eye.GetRecData().GetFRecShower();
758  const TimeStamp& fdCoreTime = showerfrec.GetCoreTime();
759  TimeInterval RelativefdCoreTime = fdCoreTime - reventTime;
760  const Point& fCore = showerfrec.GetCorePosition();
762  const utl::Vector& FdAxis = showerfrec.GetAxis();
763 
764  for (auto& station : rEvent.StationsRange()) {
765  // calculate Rd station distance to Fd core
766  const Point& stationPosition = rDetector.GetStation(station).GetPosition();
767  Vector VecDistanceToFdCore = stationPosition - fCore;
768  // project the vector on shower direction
769  double projVec = -FdAxis.GetX(coreCS) * VecDistanceToFdCore.GetX(coreCS)
770  - FdAxis.GetY(coreCS) * VecDistanceToFdCore.GetY(coreCS)
771  - FdAxis.GetZ(coreCS) * VecDistanceToFdCore.GetZ(coreCS);
772 
773  // calculate expected pulse arrival time
774  double relativePulseTime = projVec / (kSpeedOfLight);
775  const double expectedtime = double(RelativefdCoreTime) + relativePulseTime
776  - station.GetRecData().GetParameter(eTraceStartTime) + fSignalSearchWindowOffset;
777 
778  // propagate the Fd and Rd uncertainities to the signal search window
779  double sig_tot = 0;
780  if (fConsiderFdUncertainity) {
781  const fdet::Eye& detEye = det::Detector::GetInstance().GetFDetector().GetEye(eye.GetId());
782  const fevt::EyeRecData& eyeRec = eye.GetRecData();
784 
785  const double chi0 = eyeRec.GetChiZero();
786  const double rp = eyeRec.GetRp();
787  const double chi0_err = eyeRec.GetChiZeroError();
788  const double rp_err = eyeRec.GetRpError();
789  const utl::AxialVector& sdp = eyeRec.GetSDP();
790  const double theta_sdp = sdp.GetTheta(eyeCS);
791  const double phi_sdp = sdp.GetPhi(eyeCS);
792  const double theta_sdp_err = eyeRec.GetSDPThetaError();
793  const double phi_sdp_err = eyeRec.GetSDPPhiError();
794 
795  //Retrieve correlation parameters
796  const double corr_tp = eyeRec.GetSDPCorrThetaPhi();
797  const double corr_chi0rp = eyeRec.GetRpChi0Correlation();
798 
799  // core error
800  // INPUT-vector: Rp, Chi0, sdp-theta, sdp-phi
801  std::vector<utl::Parameter> coreParameters;
802  coreParameters.emplace_back(rp, rp_err);
803  coreParameters.emplace_back(chi0, chi0_err);
804  coreParameters.emplace_back(theta_sdp, theta_sdp_err);
805  coreParameters.emplace_back(phi_sdp, phi_sdp_err);
806  utl::CorrelationMatrix coreCorrelations(4);
807  coreCorrelations.Set(0, 1, corr_chi0rp);
808  coreCorrelations.Set(0, 2, 0.);
809  coreCorrelations.Set(0, 3, 0.);
810  coreCorrelations.Set(1, 2, 0.);
811  coreCorrelations.Set(1, 3, 0.);
812  coreCorrelations.Set(2, 3, corr_tp);
814  utl::NumericalErrorPropagation coreErrors(tmp, coreParameters, coreCorrelations);
815 
816  double CoreErr_Y = coreErrors.GetPropagatedErrors()[1];
817  double CoreErr_X = coreErrors.GetPropagatedErrors()[0];
818  double CorrXY = coreErrors.GetPropagatedCorrelations().Get(0, 1);
819  const double t0_err = eyeRec.GetTZeroError();
820  const TimeInterval& fdCoreTimeError = t0_err;
821  // get the covariance components
822 
823  double CoreCov_XY = CorrXY * CoreErr_X * CoreErr_Y;
824  double sig2_Axis_x = showerfrec.GetAxisError().GetX(coreCS);
825  double sig2_Axis_y = showerfrec.GetAxisError().GetY(coreCS);
826  double sig2_projVec = FdAxis.GetX(coreCS) * FdAxis.GetX(coreCS) * CoreErr_X * CoreErr_X
827  + VecDistanceToFdCore.GetX(coreCS) * VecDistanceToFdCore.GetX(coreCS) * sig2_Axis_x
828  + FdAxis.GetY(coreCS) * FdAxis.GetY(coreCS) * CoreErr_Y * CoreErr_Y
829  + VecDistanceToFdCore.GetY(coreCS) * VecDistanceToFdCore.GetY(coreCS) * sig2_Axis_y
830  + 2 * (FdAxis.GetX(coreCS) * FdAxis.GetY(coreCS) * CoreCov_XY);
831  // + VecDistanceToFdCore.GetX(coreCS) * VecDistanceToFdCore.GetY(coreCS) * AxisCov_xy);
832 
833  double sig2_relativePulseTime = sig2_projVec / ((kSpeedOfLight) * (kSpeedOfLight));
834  sig_tot = sqrt(
835  sig2_relativePulseTime + double(fdCoreTimeError) * double(fdCoreTimeError));
836  }
837 
838  if (std::isnan(expectedtime)) {
839  if (fInfoLevel > eInfoFinal) {
840  WARNING("Expected time for pulse is Nan, Skip to next event");
841  }
842  return eContinueLoop;
843  }
844 
845  const double searchWindowStart = expectedtime - sig_tot + fSignalSearchWindowStart;
846  const double searchWindowStop = expectedtime + sig_tot + fSignalSearchWindowStop;
847 
848  station.GetRecData().SetParameter(eSignalSearchWindowStart, searchWindowStart, false);
849  station.GetRecData().SetParameter(eSignalSearchWindowStop, searchWindowStop, false);
850  station.GetRecData().SetParameter(eNoiseWindowStart, fNoiseWindowStart, false);
851  station.GetRecData().SetParameter(eNoiseWindowStop, fNoiseWindowStop, false);
852  } // end if StationIterator
853  } // end if FEvent::EyeIterator eyeIter
854 
855  return eSuccess;
856  }
857 
858 
859  // Sets the SignalSearchWindow around the MC pulse. Is only used when SetSignalSearchWindowRelativeTo
860  // is specified to MC and will only work properly if the Module RdStationSimPulseFinder is run beforehand.
862  RdEventInitializer::SetSignalSearchWindowFromMC(evt::Event& event)
863  const
864  {
865  REvent& rEvent = event.GetREvent();
866  for (auto& station : rEvent.StationsRange()) {
867  auto& stationRecData = station.GetRecData();
868  auto& stationSimData = station.GetSimData();
869 
870  if (!stationSimData.HasParameter(eSignalTime)) {
871  ERROR("eSignalTime not set but SetSignalSearchWindowFromMC is used."
872  " Please run RdStationSimPulseFinder before.");
873  return eFailure;
874  }
875 
876  if (stationSimData.GetParameter(eSignalTime) == 0 &&
877  stationSimData.GetParameter(eSignal) == 0) {
878  ERROR("eSignalTime not set but SetSignalSearchWindowFromMC is used."
879  " Please run RdStationSimPulseFinder before.");
880  return eFailure;
881  }
882 
883  const double traceStartTime = stationSimData.GetParameter(eTraceStartTime);
884  const double simPulseTime = stationSimData.GetParameter(eSignalTime) - traceStartTime;
885  stationRecData.SetParameter(eSignalSearchWindowStart, simPulseTime + fSignalSearchWindowStart);
886  stationRecData.SetParameter(eSignalSearchWindowStop, simPulseTime + fSignalSearchWindowStop);
887  stationRecData.SetParameter(eNoiseWindowStart, fNoiseWindowStart);
888  stationRecData.SetParameter(eNoiseWindowStop, fNoiseWindowStop);
889  }
890 
891  return eSuccess;
892  }
893 
894 }
895 
Branch GetTopBranch() const
Definition: Branch.cc:63
unsigned int GetId() const
Definition: FEvent/Eye.h:54
double GetCorrelationXY() const
void Update(const utl::TimeStamp &time, const bool invData=true, const bool invComp=true, const bool forceRadio=false)
Update detector: deletes currently constructed stations and sets new time.
Definition: Detector.cc:179
void SetParameter(Parameter i, double value, bool lock=true)
Point object.
Definition: Point.h:32
double GetRpError() const
Definition: EyeRecData.h:91
double GetPhi(const CoordinateSystemPtr &coordinateSystem) const
azimuth (phi) angle in spherical and cylindrical coordinates
Definition: BasicVector.h:254
Detector description interface for Station-related data.
bool HasRecData() const
Definition: FEvent/Eye.h:116
Fluorescence Detector Eye Event.
Definition: FEvent/Eye.h:29
Interface class to access to the SD Reconstruction of a Shower.
const std::vector< double > & GetPropagatedErrors() const
bool HasRecShower() const
bool HasFEvent() const
Interface class to access to the Radio part of an event.
Definition: REvent.h:42
double GetTheta(const CoordinateSystemPtr &coordinateSystem) const
zenith (theta) angle in spherical coordinates
Definition: BasicVector.h:248
double GetChiZero() const
Definition: EyeRecData.h:85
ShowerRecData & GetRecShower()
Interface class to access to the RD Reconstruction of a Shower.
utl::TimeStamp GetTime() const
Definition: REvent/Header.h:17
bool HasSimShower() const
EyeIterator EyesEnd(const ComponentSelector::Status status)
Definition: FEvent.h:66
double GetParameterCovariance(const Parameter q1, const Parameter q2) const
const utl::Vector & GetCoreError() const
#define INFO(message)
Macro for logging informational messages.
Definition: ErrorLogger.h:161
void Init()
Initialise the registry.
int GetEventVersion() const
How many stations datablock do I have in the event, can be &gt; physical number of station / provided by...
Definition: REvent/Header.h:26
Detector description interface for Eye-related data.
Definition: FDetector/Eye.h:45
Branch GetChild(const std::string &childName) const
Get child of this Branch by child name.
Definition: Branch.cc:211
utl::CoordinateSystemPtr GetSiteCoordinateSystem() const
Get the coordinate system for the site.
Definition: Detector.h:137
bool HasREvent() const
const utl::Vector & GetAxisError() const
Error on shower axis.
double GetSDPPhiError() const
Definition: EyeRecData.h:78
double GetTZeroError() const
Definition: EyeRecData.h:84
double GetChiZeroError() const
Definition: EyeRecData.h:86
A TimeStamp holds GPS second and nanosecond for some event.
Definition: TimeStamp.h:110
Detector description interface for RDetector-related data.
Definition: RDetector.h:46
Interface class to access Shower Simulated parameters.
Definition: ShowerSimData.h:49
T Get() const
Definition: Branch.h:271
boost::shared_ptr< const CoordinateTransformer > CoordinateSystemPtr
Shared pointer for coordinate systems.
void Set(const int iPar, const int jPar, const double corr)
#define INFOIntermediate(y)
Definition: VModule.h:162
Class representing a document branch.
Definition: Branch.h:107
double GetMagneticFieldStrength() const
Get the absolute strength of the Earth&#39;s magnetic field used in CORSIKA/REAS simulation.
double GetX(const CoordinateSystemPtr &coordinateSystem) const
Definition: BasicVector.h:206
utl::CoordinateSystemPtr GetEyeCoordinateSystem() const
Returns the Eye Coordinate system.
const utl::TimeStamp & GetCoreTime() const
time when shower front passes through the core point
static MagneticFieldModel & instance()
double GetMagneticFieldZenith() const
Get the zenith angle (Auger convention, limited btw. 0 and 90 deg) of the Earth&#39;s magnetic field used...
bool HasRRecShower() const
Header & GetHeader()
access to REvent Header
Definition: REvent.h:239
Top of the hierarchy of the detector description interface.
Definition: Detector.h:81
bool HasFRecShower() const
Check if reconstructed shower info has been allocated.
Definition: EyeRecData.h:330
void SetWhichEye(const unsigned int eye)
evt::ShowerFRecData & GetFRecShower()
Reconstructed shower info for this eye.
Definition: EyeRecData.h:323
EyeIterator EyesBegin(const ComponentSelector::Status status)
Definition: FEvent.h:58
static utl::Vector GetMagneticFieldVector(const utl::Point &position, const utl::TimeStamp &time)
returns the magnetic field at a specific place at a specific time
const CorrelationMatrix & GetPropagatedCorrelations() const
double GetSDPCorrThetaPhi() const
Definition: EyeRecData.h:79
const utl::Vector & GetAxis() const
#define WARNING(message)
Macro for logging warning messages.
Definition: ErrorLogger.h:163
void GetData(bool &b) const
Overloads of the GetData member template function.
Definition: Branch.cc:644
double Get(const int iPar, const int jPar) const
Top of Fluorescence Detector event hierarchy.
Definition: FEvent.h:33
Eye-specific shower reconstruction data.
Definition: EyeRecData.h:65
#define INFODebug(y)
Definition: VModule.h:163
const utl::AxialVector & GetSDP() const
Definition: EyeRecData.h:75
void SetReferenceAxisFlag(const ReferenceAxis refAxisFlag)
Set a flag to select a reference axis.
double GetRpChi0Correlation() const
Definition: EyeRecData.h:89
double GetY(const CoordinateSystemPtr &coordinateSystem) const
Definition: BasicVector.h:209
const utl::TimeInterval & GetCoreTimeError() const
constexpr double kSpeedOfLight
A TimeInterval is used to represent time elapsed between two events.
Definition: TimeInterval.h:43
ResultFlag
Flag returned by module methods to the RunController.
Definition: VModule.h:60
int GetRunNumber() const
Event id in the run (Start at zero at the beginning of each run) /provided by the daq...
Definition: REvent/Header.h:22
unsigned long GetGPSSecond() const
GPS second.
Definition: TimeStamp.h:124
double GetRp() const
Definition: EyeRecData.h:87
Vector object.
Definition: Vector.h:30
Interface class to access to Fluorescence reconstruction of a Shower.
const utl::Point & GetCorePosition() const
void SetReferenceCoreFlag(const ReferenceCorePosition refCoreFlag)
Set a flag to select a reference core.
AxialVector object.
Definition: AxialVector.h:30
const rdet::RDetector & GetRDetector() const
Definition: Detector.cc:143
double GetMagneticFieldAzimuth() const
Get the azimuth angle of the Earth&#39;s magnetic field used in CORSIKA/REAS simulation.
double GetZ(const CoordinateSystemPtr &coordinateSystem) const
Definition: BasicVector.h:212
utl::Point GetPosition() const
Tank position in Site Cartesian Coordinates.
#define INFOFinal(y)
Definition: VModule.h:161
static Policy::type Create(const utl::Point &theOrigin)
Create the standard local coordinate system for a Point.
#define ERROR(message)
Macro for logging error messages.
Definition: ErrorLogger.h:165
constexpr double m
Definition: AugerUnits.h:121
const Station & GetStation(const int stationId) const
Get station by Station Id.
Definition: RDetector.cc:141
const utl::Point & GetCorePosition() const
Shower core as reconstructed by the FD or FD eye.
bool HasSRecShower() const
TimeStamp GetTimeStamp() const
Definition: UTCDateTime.cc:115
bool HasSEvent() const
int GetId() const
Definition: REvent/Header.h:21
bool HasParameterCovariance(const Parameter q1, const Parameter q2) const
int GetFileId() const
Run Number, always increasing / provided by the dat.
Definition: REvent/Header.h:24
const utl::TimeStamp & GetCoreTime() const
time when shower front passes through the core point
fevt::EyeRecData & GetRecData()
Reconstructed data for this eye.
Definition: FEvent/Eye.cc:130
double GetSDPThetaError() const
Definition: EyeRecData.h:77
const utl::Vector & GetAxis() const
Shower Axis as reconstructed by the FD or FD eye.

, generated on Tue Sep 26 2023.