cmpEvent.cc
Go to the documentation of this file.
1 #include "cmpEvent.h"
2 
3 #include <iostream>
4 #include <iomanip>
5 #include <sstream>
6 #include <string>
7 #include <map>
8 
9 #include <TFile.h>
10 #include <TDirectory.h>
11 
12 #include <adst/RecEventFile.h>
13 #include <adst/DetectorGeometry.h>
14 #include <adst/FileInfo.h>
15 #include <adst/RecEvent.h>
16 #include <adst/FDEvent.h>
17 #include <adst/GenShower.h>
18 
19 #include "testlib.h"
20 #include "adstReading.h"
21 #include "cmpFDEvent.h"
22 #include "cmpSDEvent.h"
23 
24 using namespace std;
25 
27 void
28 cmpRecEventFile(RecEventFile& refFile, RecEventFile& testFile)
29 {
30  cmpDetectorGeometry(refFile, testFile);
31  cmpFileInfo(refFile, testFile);
32 
33  const unsigned int nRef = refFile.GetNEvents();
34  const unsigned int nTest = testFile.GetNEvents();
35  isDiag(nTest, nRef, "Same no. of events");
36 
37  RecEvent* refRE = new RecEvent();
38  RecEvent* testRE = new RecEvent();
39  ok(refFile.SetBuffers(&refRE) == RecEventFile::eSuccess, "reference file: SetBuffers == eSuccess");
40  ok(testFile.SetBuffers(&testRE) == RecEventFile::eSuccess, "test file: SetBuffers == eSuccess");
41 
42  for (unsigned int iEvent = 0; iEvent < nRef && iEvent < nTest; ++iEvent)
43  {
44  ostringstream eventNoStr;
45  eventNoStr << iEvent;
46  string eventNo = string(" (event ") + eventNoStr.str() + string(")");
47 
48  diag(string("Testing event ") + eventNoStr.str());
49 
50  ok(refFile.ReadEvent(iEvent) == RecEventFile::eSuccess, string("Read event from reference file") + eventNo);
51  ok(testFile.ReadEvent(iEvent) == RecEventFile::eSuccess, string("Read event from test file") + eventNo);
52 
53  diag(string("This event has auger id ") + refRE->GetAugerId());
54 
55  cmpEvent(*refRE, *testRE);
56  }
57 
58  delete refRE;
59  delete testRE;
60 }
61 
63 void
64 cmpFileInfo(const RecEventFile& refFile, const RecEventFile& testFile)
65 {
66  FileInfo* refInfo = readFileInfo(refFile, "reference");
67  FileInfo* testInfo = readFileInfo(testFile, "test");
68  if (!refInfo || !testInfo)
69  return;
70 
71 
72  isDiag(testInfo->HasMC(), refInfo->HasMC(), "FileInfo->HasMC");
73  isDiag(testInfo->HasVEMTraces(), refInfo->HasVEMTraces(), "FileInfo->HasVEMTraces");
74  isDiag(testInfo->HasSdAllTraces(), refInfo->HasSdAllTraces(), "FileInfo->HasSdAllTraces");
75  isDiag(testInfo->HasFdTraces(), refInfo->HasFdTraces(), "FileInfo->HasFdTraces");
76  isDiag(testInfo->HasFdSpotRecTraces(), refInfo->HasFdSpotRecTraces(), "FileInfo->HasFdSpotRecTraces");
77  ok(testInfo->GetHost() != string(""), "FileInfo->GetHost");
78  ok(testInfo->GetUser() != string(""), "FileInfo->GetUser");
79  ok(testInfo->GetOfflineConfiguration() != string(""), "FileInfo->GetOfflineConfiguration");
80  ok(testInfo->GetRecEventVersion() != string(""), "FileInfo->GetRecEventVersion");
81  isDiag(testInfo->GetLDFType(), refInfo->GetLDFType(), "FileInfo->GetLDFType");
82  isDiag(testInfo->GetLDFType(), refInfo->GetLDFType(), "FileInfo->GetLDFType");
83 
84  delete refInfo;
85  delete testInfo;
86 }
87 
89 void
90 cmpDetector(const RecEvent& ref, const RecEvent& test)
91 {
92 // const TBits& GetMirrorsInDAQ(int iEye)
93 // isDiag(test.GetDetector().\&(), ref.GetDetector().\&(), "detector.\&");
94 
95  isDiag(test.GetDetector().GetTemperature(),
96  ref.GetDetector().GetTemperature(),
97  "detector.GetTemperature");
98  isDiag(test.GetDetector().GetPressure(),
99  ref.GetDetector().GetPressure(),
100  "detector.GetPressure");
101  isDiag(test.GetDetector().GetTemperaturePressureGPSSeconds(),
102  ref.GetDetector().GetTemperaturePressureGPSSeconds(),
103  "detector.GetTemperaturePressureGPSSeconds");
104  isDiag(test.GetDetector().HasWeatherStationData(),
105  ref.GetDetector().HasWeatherStationData(),
106  "detector.HasWeatherStationData");
107  isDiag(test.GetDetector().HasMieDatabase(),
108  ref.GetDetector().HasMieDatabase(),
109  "detector.HasMieDatabase");
110  isDiag(test.GetDetector().HasVAODs(),
111  ref.GetDetector().HasVAODs(),
112  "detector.HasVAODs");
113  isDiag(test.GetDetector().HasOverallQualityDatabase(),
114  ref.GetDetector().HasOverallQualityDatabase(),
115  "detector.HasOverallQualityDatabase");
116  isDiag(test.GetDetector().GetQDBHorizonalUniformity(),
117  ref.GetDetector().GetQDBHorizonalUniformity(),
118  "detector.GetQDBHorizonalUniformity");
119  isDiag(test.GetDetector().GetQDBCloudCoverage(),
120  ref.GetDetector().GetQDBCloudCoverage(),
121  "detector.GetQDBCloudCoverage");
122  isDiag(test.GetDetector().GetQDBMinCloudBaseHeight(),
123  ref.GetDetector().GetQDBMinCloudBaseHeight(),
124  "detector.GetQDBMinCloudBaseHeight");
125  isDiag(test.GetDetector().GetQDBMinCloudBaseDepth(),
126  ref.GetDetector().GetQDBMinCloudBaseDepth(),
127  "detector.GetQDBMinCloudBaseDepth");
128  isDiag(test.GetDetector().HasAerosolData(),
129  ref.GetDetector().HasAerosolData(),
130  "detector.HasAerosolData");
131  isDiag(test.GetDetector().HasLidarData(),
132  ref.GetDetector().HasLidarData(),
133  "detector.HasLidarData");
134  isEpsDiag(test.GetDetector().GetVAODsAtReferenceHeight().size(),
135  ref.GetDetector().GetVAODsAtReferenceHeight().size(),
136  1.e-9,
137  "detector.GetVAODsAtReferenceHeight().size");
138 
139  const TBits refEyes = ref.GetDetector().GetActiveEyes();
140  const TBits testEyes = test.GetDetector().GetActiveEyes();
141  isDiag(testEyes.GetNbits(), refEyes.GetNbits(), "# of telescopes");
142  for (unsigned int eye = 0; eye < refEyes.GetNbits(); ++eye) {
143  ostringstream eyeNoS;
144  eyeNoS << eye;
145  diag("Testing eye " + eyeNoS.str());
146  if (refEyes.TestBitNumber(eye)) {
147  isDiag(test.GetDetector().GetSDFDTimeOffset(eye),
148  ref.GetDetector().GetSDFDTimeOffset(eye),
149  "GetSDFDTimeOffset");
150  isDiag(test.GetDetector().HasAerosolData(eye),
151  ref.GetDetector().HasAerosolData(eye),
152  "detector.HasAerosolData(eye)");
153  isEpsDiag(test.GetDetector().GetVAODAtReferenceHeight(eye),
154  ref.GetDetector().GetVAODAtReferenceHeight(eye),
155  1.e-9,
156  "detector.GetVAODAtReferenceHeight(eye)");
157  isDiag(test.GetDetector().HasVAOD(eye),
158  ref.GetDetector().HasVAOD(eye),
159  "detector.HasVAOD(eye)");
160  isDiag(test.GetDetector().GetPointingIdsForEye(eye).size(),
161  ref.GetDetector().GetPointingIdsForEye(eye).size(),
162  "detector.GetPointingIdsForEye(eye)");
163  isDiag(test.GetDetector().HasLidarData(eye),
164  ref.GetDetector().HasLidarData(eye),
165  "detector.HasLidarData(eye)");
166 
167 // bool IsInDAQ (eye, tel)
168 // TString GetPointingId(eye, tel)
169 // bool HasCorrectorRing(eye, tel)
170 
171 // bool IsMismatchedPixel(eyeId, telId, pixelId)
172 // bool IsBadPixel(eyeId, telId, pixelId)
173 
174  if (test.GetDetector().HasLidarData(eye) &&
175  ref.GetDetector().HasLidarData(eye)) {
176  isDiag(test.GetDetector().GetAerosolData(eye).GetMieAttenuationLength(),
177  ref.GetDetector().GetAerosolData(eye).GetMieAttenuationLength(),
178  "aerosols.att_length");
179  isDiag(test.GetDetector().GetAerosolData(eye).GetMieAttenuationHeight(),
180  ref.GetDetector().GetAerosolData(eye).GetMieAttenuationHeight(),
181  "aerosols.att_height");
182  }
183 
184  if (test.GetDetector().HasLidarData(eye) &&
185  ref.GetDetector().HasLidarData(eye)) {
186  isDiag(test.GetDetector().GetLidarData(eye).GetCloudCoverage(),
187  ref.GetDetector().GetLidarData(eye).GetCloudCoverage(),
188  "lidarData.GetCloudCoverage");
189  isDiag(test.GetDetector().GetLidarData(eye).GetCloudHeight(),
190  ref.GetDetector().GetLidarData(eye).GetCloudHeight(),
191  "lidarData.GetCloudHeight");
192  isDiag(test.GetDetector().GetLidarData(eye).GetCloudThickness(),
193  ref.GetDetector().GetLidarData(eye).GetCloudThickness(),
194  "lidarData.GetCloudThickness");
195  isDiag(test.GetDetector().GetLidarData(eye).GetCloudDepth(),
196  ref.GetDetector().GetLidarData(eye).GetCloudDepth(),
197  "lidarData.GetCloudDepth");
198  isDiag(test.GetDetector().GetLidarData(eye).GetCloudSlantThickness(),
199  ref.GetDetector().GetLidarData(eye).GetCloudSlantThickness(),
200  "lidarData.GetCloudSlantThickness");
201  isDiag(test.GetDetector().GetLidarData(eye).GetCloudVAOD(),
202  ref.GetDetector().GetLidarData(eye).GetCloudVAOD(),
203  "lidarData.GetCloudVAOD");
204  isDiag(test.GetDetector().GetLidarData(eye).GetLidarRange(),
205  ref.GetDetector().GetLidarData(eye).GetLidarRange(),
206  "lidarData.GetLidarRange");
207  }
208  }
209  }
210  isDiag(test.GetDetector().GetBadPixelSet().size(),
211  ref.GetDetector().GetBadPixelSet().size(),
212  "pixel set");
213 
214 
215  const TBits refStations = ref.GetDetector().GetActiveStations();
216  const TBits testStations = test.GetDetector().GetActiveStations();
217 
218  const std::vector<SdRecStation>& stations = ref.GetSDEvent().GetStationVector();
219  for (unsigned int i = 0; i != stations.size(); ++i) {
220  if (stations[i].IsDense()) {
221  TVector3 ref_pos = ref.GetDetector().GetStationPosition(stations[i].GetId());
222  TVector3 test_pos = test.GetDetector().GetStationPosition(stations[i].GetId());
223  ostringstream name;
224  name << "station " << stations[i].GetId() << " pos ";
225  isDiag(ref_pos.x(),test_pos .x(), name.str());
226  isDiag(ref_pos.y(),test_pos .y(), name.str());
227  }
228  }
229 
230  for (unsigned int id = 0; id < refStations.GetNbits(); ++id) {
231  ostringstream name;
232  isDiag(testStations.TestBitNumber(id), refStations.TestBitNumber(id), name.str());
233  }
234 }
235 
236 void
237 cmpDetectorGeometry(const RecEventFile& refFile, const RecEventFile& testFile)
238 {
239  DetectorGeometry* refGeo = readDetectorGeometry(refFile, "reference");
240  DetectorGeometry* testGeo = readDetectorGeometry(testFile, "test");
241  if (!refGeo || !testGeo)
242  return;
243 
244  {
245  //fail("Need to implement more DetectorGeometry comparison");
246  }
247 
248  isDiag(testGeo->GetNEyes(), refGeo->GetNEyes(), "Same no of eyes in DetectorGeometry");
249 
250  for (DetectorGeometry::ConstEyeIterator ieye = refGeo->EyesBegin(),
251  end = refGeo->EyesEnd(); ieye != end; ++ieye)
252  {
253  ok(testGeo->HasEye( ieye->first ), "Has correct eye in detgeo");
254  if (!testGeo->HasEye(ieye->first))
255  continue;
256 
257  isDiag(testGeo->GetEye(ieye->first).GetNumberOfMirrors(),
258  refGeo->GetEye(ieye->first).GetNumberOfMirrors(),
259  "eyeGeom.GetNumberOfMirrors");
260  isEpsDiag(testGeo->GetEye(ieye->first).GetEyePos(),
261  refGeo->GetEye(ieye->first).GetEyePos(), 1.e-6,
262  "eyeGeom.GetEyePos");
263  isDiag(testGeo->GetEye(ieye->first).GetEyeName(),
264  refGeo->GetEye(ieye->first).GetEyeName(),
265  "eyeGeom.GetEyeName");
266  isDiag(testGeo->GetEye(ieye->first).GetEyeNameAbbr(),
267  refGeo->GetEye(ieye->first).GetEyeNameAbbr(),
268  "eyeGeom.GetEyeNameAbbr");
269  isDiag(testGeo->GetEye(ieye->first).GetBackWallAngle(),
270  refGeo->GetEye(ieye->first).GetBackWallAngle(),
271  "eyeGeom.GetBackWallAngle");
272  isDiag(testGeo->GetEye(ieye->first).GetEyePhiZ(),
273  refGeo->GetEye(ieye->first).GetEyePhiZ(),
274  "eyeGeom.GetEyePhiZ");
275  isDiag(testGeo->GetEye(ieye->first).GetEyeThetaZ(),
276  refGeo->GetEye(ieye->first).GetEyeThetaZ(),
277  "eyeGeom.GetEyeThetaZ");
278  isDiag(testGeo->GetEye(ieye->first).GetTelescopeIDs(),
279  refGeo->GetEye(ieye->first).GetTelescopeIDs(),
280  "eyeGeom.GetTelescopeIDs");
281 
282  for (EyeGeometry::TelescopeIterator telescope = refGeo->GetEye(ieye->first).TelescopesBegin(),
283  end = refGeo->GetEye(ieye->first).TelescopesEnd();
284  telescope != end; ++telescope) {
285  ok(testGeo->GetEye(ieye->first).HasTelescope(telescope->first),
286  "Has correct telescope in detgeo");
287  if (!testGeo->GetEye(ieye->first).HasTelescope(telescope->first))
288  continue;
289 
290  isDiag(testGeo->GetEye(ieye->first).GetTelescope(telescope->first).GetNumberOfPixels(),
291  refGeo->GetEye(ieye->first).GetTelescope(telescope->first).GetNumberOfPixels(),
292  "telescopeGeom.GetNumberOfPixels");
293  isDiag(testGeo->GetEye(ieye->first).GetTelescope(telescope->first).GetFADCSize(),
294  refGeo->GetEye(ieye->first).GetTelescope(telescope->first).GetFADCSize(),
295  "telescopeGeom.GetFADCSize");
296  isDiag(testGeo->GetEye(ieye->first).GetTelescope(telescope->first).GetFADCBinning(),
297  refGeo->GetEye(ieye->first).GetTelescope(telescope->first).GetFADCBinning(),
298  "telescopeGeom.GetFADCBinning");
299  isDiag(testGeo->GetEye(ieye->first).GetTelescope(telescope->first).GetPointingIds(),
300  refGeo->GetEye(ieye->first).GetTelescope(telescope->first).GetPointingIds(),
301  "telescopeGeom.GetPointingIds");
302 
303  vector<TString> pointing =
304  refGeo->GetEye(ieye->first).GetTelescope(telescope->first).GetPointingIds();
305 
306  for (vector<TString>::iterator it = pointing.begin(); it != pointing.end(); ++it) {
307  isEpsDiag(testGeo->GetEye(ieye->first).GetTelescope(telescope->first).GetElevation(*it),
308  refGeo->GetEye(ieye->first).GetTelescope(telescope->first).GetElevation(*it),
309  1.e-9,
310  "telescopeGeom.GetElevation");
311  isDiag(testGeo->GetEye(ieye->first).GetTelescope(telescope->first).GetPixelMinPhi(*it),
312  refGeo->GetEye(ieye->first).GetTelescope(telescope->first).GetPixelMinPhi(*it),
313  "telescopeGeom.GetPixelMinPhi");
314  isDiag(testGeo->GetEye(ieye->first).GetTelescope(telescope->first).GetPixelMaxPhi(*it),
315  refGeo->GetEye(ieye->first).GetTelescope(telescope->first).GetPixelMaxPhi(*it),
316  "telescopeGeom.GetPixelMaxPhi");
317  isDiag(testGeo->GetEye(ieye->first).GetTelescope(telescope->first).GetPixelMinOmega(*it),
318  refGeo->GetEye(ieye->first).GetTelescope(telescope->first).GetPixelMinOmega(*it),
319  "telescopeGeom.GetPixelMinOmega");
320  isDiag(testGeo->GetEye(ieye->first).GetTelescope(telescope->first).GetPixelMaxOmega(*it),
321  refGeo->GetEye(ieye->first).GetTelescope(telescope->first).GetPixelMaxOmega(*it),
322  "telescopeGeom.GetPixelMaxOmega");
323  isDiag(testGeo->GetEye(ieye->first).GetTelescope(telescope->first).GetPixelsPhi(*it),
324  refGeo->GetEye(ieye->first).GetTelescope(telescope->first).GetPixelsPhi(*it),
325  "telescopeGeom.GetPixelsPhi");
326  isDiag(testGeo->GetEye(ieye->first).GetTelescope(telescope->first).GetPixelsOmega(*it),
327  refGeo->GetEye(ieye->first).GetTelescope(telescope->first).GetPixelsOmega(*it),
328  "telescopeGeom.GetPixelsOmega");
329 
330  const TelescopeGeometry::PixelList_t& pixels_phi = telescope->second.GetPixelsPhi(*it);
331  for (unsigned int i = 0; i != pixels_phi.size(); ++i) {
332  isDiag(testGeo->GetEye(ieye->first).GetTelescope(telescope->first).HasPixel(pixels_phi[i]),
333  refGeo->GetEye(ieye->first).GetTelescope(telescope->first).HasPixel(pixels_phi[i]),
334  "telescopeGeom.HasPixel");
335  if (!testGeo->GetEye(ieye->first).GetTelescope(telescope->first).HasPixel(pixels_phi[i]))
336  continue;
337 
338  isDiag(testGeo->GetEye(ieye->first).GetTelescope(telescope->first).GetPixelPhi(pixels_phi[i], *it),
339  refGeo->GetEye(ieye->first).GetTelescope(telescope->first).GetPixelPhi(pixels_phi[i], *it),
340  "telescopeGeom.GetPixelPhi");
341  isDiag(testGeo->GetEye(ieye->first).GetTelescope(telescope->first).GetPixelOmega(pixels_phi[i], *it),
342  refGeo->GetEye(ieye->first).GetTelescope(telescope->first).GetPixelOmega(pixels_phi[i], *it),
343  "telescopeGeom.GetPixelOmega");
344  }
345 
346  const TelescopeGeometry::PixelList_t& pixels_omega = telescope->second.GetPixelsOmega(*it);
347  for (unsigned int i = 0; i != pixels_omega.size(); ++i) {
348  isDiag(testGeo->GetEye(ieye->first).GetTelescope(telescope->first).HasPixel(pixels_omega[i]),
349  refGeo->GetEye(ieye->first).GetTelescope(telescope->first).HasPixel(pixels_omega[i]),
350  "telescopeGeom.HasPixel");
351  if (!testGeo->GetEye(ieye->first).GetTelescope(telescope->first).HasPixel(pixels_omega[i]))
352  continue;
353 
354  isDiag(testGeo->GetEye(ieye->first).GetTelescope(telescope->first).GetPixelPhi(pixels_omega[i], *it),
355  refGeo->GetEye(ieye->first).GetTelescope(telescope->first).GetPixelPhi(pixels_omega[i], *it),
356  "telescopeGeom.GetPixelPhi");
357  isDiag(testGeo->GetEye(ieye->first).GetTelescope(telescope->first).GetPixelOmega(pixels_omega[i], *it),
358  refGeo->GetEye(ieye->first).GetTelescope(telescope->first).GetPixelOmega(pixels_omega[i], *it),
359  "telescopeGeom.GetPixelOmega");
360  }
361  }
362  }
363  }
364 
365  isDiag(testGeo->GetNStations(), refGeo->GetNStations(), "Same no of stations in DetectorGeometry");
366 
367  DetectorGeometry::ConstStationPosMap pos = testGeo->GetStations();
368  for (DetectorGeometry::StationPosMapConstIterator is = refGeo->GetStationsBegin(),
369  end = refGeo->GetStationsEnd(); is != end; ++is)
370  {
371  const unsigned int id = is->first;
372  if (!ok(pos.find(id) != pos.end(), "station exists in test geo")) {
373  ostringstream msg;
374  msg << "Station " << id << " is missing from test DetectorGeometry";
375  diag(msg);
376  continue;
377  }
378  isDiag(testGeo->GetStationName(id), refGeo->GetStationName(id), "Station name identical");
379  isEpsDiag(testGeo->GetStationPosition(id), refGeo->GetStationPosition(id), 0.001, "Station position identical");
380  isDiag(testGeo->GetHexagon(id), refGeo->GetHexagon(id), "Station hexagon");
381  isDiag(testGeo->GetFdTriggerReadoutSection(id), refGeo->GetFdTriggerReadoutSection(id), "Station's FD readout section");
382  }
383 
384 
385  delete refGeo;
386  delete testGeo;
387 }
388 
389 
391 void
392 cmpEvent(const RecEvent& ref, const RecEvent& test)
393 {
394  cmpEventGlobalInfo(ref, test);
395 
396  isDiag(test.GetNEyes(), ref.GetNEyes(), "Same no. of eyes");
397 
398  // Compare FDEvents
399  for (RecEvent::ConstEyeIterator iEye = ref.EyesBegin();
400  iEye != ref.EyesEnd(); ++iEye)
401  {
402  if (ok(test.HasEye(iEye->GetEyeId()), "Eye exists")) {
403  cmpFDEvent(*iEye, test.GetEye(iEye->GetEyeId()));
404  }
405  else {
406  ostringstream m;
407  m << "Missing eye from test event: " << iEye->GetEyeId();
408  diag(m);
409  }
410  }
411 
412  // Compare SDEvent
413  cmpSDEvent(ref.GetSDEvent(), test.GetSDEvent());
414 
415  // Compare gen shower
416  cmpGenShower(ref.GetGenShower(), test.GetGenShower());
417 
418  cmpDetector(ref, test);
419 }
420 
421 
423 void
424 cmpEventGlobalInfo(const RecEvent& ref, const RecEvent& test)
425 {
426  isDiag(test.GetEventId(), ref.GetEventId(), "RecEvent.GetEventId");
427  isDiag(test.GetYYMMDD(), ref.GetYYMMDD(), "RecEvent.GetYYMMDD");
428  isDiag(test.GetHHMMSS(), ref.GetHHMMSS(), "RecEvent.GetHHMMSS");
429  isDiag(test.GetMJD(), ref.GetMJD(), "RecEvent.GetMJD");
430 
431  isDiag(test.GetDetector().HasMieDatabase(), ref.GetDetector().HasMieDatabase(), "Detector.HasMieDatabase");
432 
433  // FIXME what else?
434 }
435 
436 
437 void
438 cmpGenShower(const GenShower& ref, const GenShower& test)
439 {
440 // [a-z0-9A-Z]+
441 // isDiag(test.GetSdRecShower().\&(), ref.GetSdRecShower().\&(), "sdRecShower.\&");
442  isDiag(test.GetPrimary(), ref.GetPrimary(), "genShower.GetPrimary");
443  isDiag(test.GetPrimaryName(), ref.GetPrimaryName(), "genShower.GetPrimaryName");
444  isDiag(test.GetShortPrimaryName(), ref.GetShortPrimaryName(), "genShower.GetShortPrimaryName");
445  isDiag(test.GetElecEnergy(), ref.GetElecEnergy(), "genShower.GetElecEnergy");
446  isDiag(test.GetX1(), ref.GetX1(), "genShower.GetX1");
447  isDiag(test.GetXmax(), ref.GetXmax(), "genShower.GetXmax");
448  isDiag(test.GetdEdXmax(), ref.GetdEdXmax(), "genShower.GetdEdXmax");
449  isDiag(test.GetElectrons(), ref.GetElectrons(), "genShower.GetElectrons");
450  isDiag(test.GetEnergyDeposit(), ref.GetEnergyDeposit(), "genShower.GetEnergyDeposit");
451  isDiag(test.GetDepth(), ref.GetDepth(), "genShower.GetDepth");
452  isDiag(test.GetShowerAge(), ref.GetShowerAge(), "genShower.GetShowerAge");
453 //#warning this gives me a segmentation fault (?)
454  //isDiag(test.GetCoreTimeNanoSecond(), ref.GetCoreTimeNanoSecond(), "genShower.GetCoreTimeNanoSecond");
455 }
void cmpSDEvent(const SDEvent &ref, const SDEvent &test)
Definition: cmpSDEvent.cc:22
void cmpDetectorGeometry(const RecEventFile &refFile, const RecEventFile &testFile)
Definition: cmpEvent.cc:237
bool is(const double a, const double b)
Definition: testlib.cc:113
void diag(const std::string &msg)
Definition: testlib.cc:59
bool ok(bool okay)
Definition: testlib.cc:89
FileInfo * readFileInfo(const RecEventFile &file, const std::string &title)
Definition: adstReading.cc:51
void cmpGenShower(const GenShower &ref, const GenShower &test)
Definition: cmpEvent.cc:438
void cmpFDEvent(const FDEvent &ref, const FDEvent &test)
Definition: cmpFDEvent.cc:33
bool isEpsDiag(const double a, const double b, const double thisEps, const std::string &name)
Definition: testlib.cc:210
void cmpEventGlobalInfo(const RecEvent &ref, const RecEvent &test)
Definition: cmpEvent.cc:424
void cmpDetector(const RecEvent &ref, const RecEvent &test)
Definition: cmpEvent.cc:90
void cmpRecEventFile(RecEventFile &refFile, RecEventFile &testFile)
Definition: cmpEvent.cc:28
bool isDiag(const double a, const double b, const std::string &name)
Definition: testlib.cc:232
DetectorGeometry * readDetectorGeometry(const RecEventFile &file, const std::string &title)
Definition: adstReading.cc:23
constexpr double m
Definition: AugerUnits.h:121
void cmpFileInfo(const RecEventFile &refFile, const RecEventFile &testFile)
Definition: cmpEvent.cc:64
void cmpEvent(const RecEvent &ref, const RecEvent &test)
Definition: cmpEvent.cc:392

, generated on Tue Sep 26 2023.