ClearParticleListInGridStations.cc
Go to the documentation of this file.
2 #include <utl/ErrorLogger.h>
3 #include <sdet/SDetector.h>
4 
5 #include <evt/Event.h>
6 #include <sevt/SEvent.h>
7 
8 using namespace std;
9 using namespace utl;
10 using namespace fwk;
11 
12 
14 
16  ClearParticleListInGridStations::Run(evt::Event& event)
17  {
18  int nLists = 0;
19  if (event.HasSEvent()) {
20  const auto& sDet = det::Detector::GetInstance().GetSDetector();
21  auto& sEvent = event.GetSEvent();
22  for (auto& s : sEvent.StationsRange()) {
23  if (s.HasSimData() && !sDet.IsStationDense(s.GetId())) {
24  s.GetSimData().ClearParticleList();
25  ++nLists;
26  }
27  }
28  }
29  ostringstream info;
30  info << "Cleared " << nLists << " particle lists.";
31  INFO(info);
32  return eSuccess;
33  }
34 
35 }
#define INFO(message)
Macro for logging informational messages.
Definition: ErrorLogger.h:161
constexpr double s
Definition: AugerUnits.h:163
ResultFlag
Flag returned by module methods to the RunController.
Definition: VModule.h:60
bool HasSEvent() const

, generated on Tue Sep 26 2023.