MdUnderGrdInjector.cc
Go to the documentation of this file.
1 #include "MdUnderGrdInjector.h"
2 
3 #include <fwk/CentralConfig.h>
4 #include <fwk/RandomEngineRegistry.h>
5 
6 #include <det/Detector.h>
7 #include <evt/ShowerSimData.h>
8 
9 #include <mevt/Counter.h>
10 #include <mevt/CounterSimData.h>
11 
12 #include <sevt/SEvent.h>
13 #include <sevt/Station.h>
14 #include <sevt/StationTriggerData.h>
15 #include <sevt/StationSimData.h>
16 #include <sdet/SDetector.h>
17 
18 #include <utl/ConfigUtils.h>
19 #include <utl/ErrorLogger.h>
20 #include <utl/Reader.h>
21 #include <utl/Particle.h>
22 #include <utl/ShowerParticleIterator.h>
23 #include <utl/TimeDistribution.h>
24 #include <utl/TimeDistributionAlgorithm.h>
25 #include <utl/AugerUnits.h>
26 #include <utl/GeometryUtilities.h>
27 #include <utl/AxialVector.h>
28 #include <utl/Math.h>
29 
30 #include <cstddef>
31 #include <iostream>
32 #include <sstream>
33 
34 using namespace utl;
35 using namespace fwk;
36 using namespace std;
37 using namespace evt;
38 using namespace mevt;
39 using namespace mdet;
40 using namespace det;
41 using namespace UnderGrdInjectorAG;
42 
43 
44 const double UnderGrdInjector::kTriggerDelay = 0.*utl::ns;
45 
46 
47 UnderGrdInjector::UnderGrdInjector() :
48  fOnlyMuons(true),
49  fUseT1FromSD(true),
50 { }
51 
52 
55 {
56  INFO("\n++++\nReading XML parameters");
57  //Top branch
58  Branch topB = CentralConfig::GetInstance()->GetTopBranch("MdUnderGrdInjector");
59 
60  LoadConfig(topB, "OnlyMuons", fOnlyMuons, false);
61  LoadConfig(topB, "UseT1FromSD", fUseT1FromSD, true);
62 
63  return eSuccess;
64 }
65 
66 
69 {
70  INFO("\n++++\nStarting MdUnderGrdInjector run\n++++");
71 
72  if (!event.HasMEvent()) {
73  ERROR("MEvent does not exist.");
74  return eFailure;
75  }
76  // Get the MEvent
77  MEvent& mEvent = event.GetMEvent();
78  INFO("\n++++\nMEvent retrieved\n++++");
79 
80  utl::TimeStamp eventTime = event.GetMEvent().GetHeader().GetTime();
81  double T1 = 0;
82 
83  //Retrieve muon detector
84  const mdet::MDetector& mDetector = det::Detector::GetInstance().GetMDetector();
85 
86  if (fUseT1FromSD && (!event.HasSEvent())){
87  ERROR("SEvent does not exist. Do not use UseT1FromSD");
88  return eFailure;
89  }
90 
91  ScintiBox sbox;
92 
93 #ifdef AMIGA_DEBUG
94  ofstream ofile ("stats_injected.ascii");
95  ofile << "CounterId ModuleId ScintId Particle X(m) Y(m) Z(m) Time(ns) intersected Parent T1(ns) EventGPS(s) EventGPSNano(ns)\n";
96 #endif
97 
98  //fTrgTimes.clear();
99 
100  for (MEvent::CounterIterator cIt = mEvent.CountersBegin();
101  cIt != mEvent.CountersEnd(); ++cIt) {
102 
103  G4cerr << G4endl << "Recovering underground particles from counter " << cIt->GetId() << G4endl;
104 
105  if (!cIt->HasSimData())
106  continue;
107 
108  const int cId = cIt->GetId();
109  const mdet::Counter& cmDet = mDetector.GetCounter(cId);
110  CounterSimData& cSimData = cIt->GetSimData();
111  const unsigned long numParticles = cSimData.GetNumberOfUGrdParticles();
112  G4cerr << numParticles << " particles at depth level of Counter Id :" << cId << G4endl;
113 
114  //T1 is considered as the time of the first particle arriving to the Counter. To begin with, set it at "infinitum".
116 
117  //Make all modules in the MEvent structure
119  mmDet != cmDet.ModulesEnd(); ++mmDet) {
120  int modId = mmDet->GetId();
121  if (!cIt->HasModule(modId)) {
122  cIt->MakeModule(modId);
123  cIt->GetModule(modId).SetCandidate();
124  }
125 
126  }
127 
128  //check if sd triggered or not
129  if (fUseT1FromSD) {
130  int triggerFound = GetTriggerTimeFromSD(event, cmDet, T1);
131  if (triggerFound) {
132  cout << "SD trigger found for counter " << cId << " at T1 " << T1/utl::ns << "ns " <<endl;
133  cout << "Trigger is T" << triggerFound << "\n";
134  cIt->SetT1(T1);
135  } else {
136  cout << "XXX NO SD trigger found for counter " << cId << endl;
137  cIt->SetSilent();
138  continue; //In real life, if no T1 no event in MD
139  }
140  }
141 
143  pIt != cSimData.UGrdParticlesEnd(); ++pIt) {
144 
146  utl::Point ppos = pIt->GetPosition();
147  utl::Vector pdir = pIt->GetDirection();
148  //utl::TimeInterval interval = pIt->GetTime();
149 
150  utl::Point ccenter(0,0,0, cCS);
151  bool injected = false;
152 
154  mmDet != cmDet.ModulesEnd(); ++mmDet) {
155  int MoIdx = mmDet->GetId();
156  //Make module in any case
157  if (!cIt->HasModule(MoIdx))
158  cIt->MakeModule(MoIdx);
159 
160  if (!numParticles)
161  continue;
162 
163  //Skip non muon particles if desired
164  if (fOnlyMuons && pIt->GetType() != Particle::eMuon && pIt->GetType() != Particle::eAntiMuon)
165  continue;
166 
167  if (IsNeutrino(pIt))
168  continue;
169 
170  if (injected)
171  continue;
172 
173  //The module system of reference has its x-axis along the largest side
174  CoordinateSystemPtr mCS = mmDet->GetLocalCoordinateSystem();
175 
176  double l = 0;
177  double w = 0;
178  double h = 0;
179  mmDet->ScintillatorsBegin()->VisitShape(sbox).GetDimensions(l, w, h);
180 
181  //If particle is not over the module, then continue (WARNING: this condition depends on MModelConfig.xml)
182  //NOTE: it could be that a particle is over the module BUT not over the strips because the fiber routing space in the middle
183  if (fabs(ppos.GetY(mCS)) > 16.*w || fabs(ppos.GetX(mCS)) > l + 0.4*utl::m)
184  continue;
185 
186  mevt::Module* mmEvt = & cIt->GetModule(MoIdx);
187  /*
188  cout << "particle " << pIt->GetType() << " over "
189  << "Counter " << cId << " Module " << MoIdx << " "
190  << ppos.GetX(cCS)/utl::m << " m "
191  << ppos.GetY(cCS)/utl::m << " m "
192  << ppos.GetZ(cCS)/utl::m << " m "
193  << endl;
194  */
196 
197  for (ScIt smDet = mmDet->ScintillatorsBegin(), esc = mmDet->ScintillatorsEnd(); smDet != esc; ++smDet) {
198 
199  const int ScIdx = smDet->GetId();
200 
201  const CoordinateSystemPtr sCS = smDet->GetLocalCoordinateSystem();
202 
203  //If particle is over the scintillator (WARNING: this condition depends on MModelConfig.xml)
204  bool intersected = fabs(ppos.GetX(sCS)) < 0.5*w && fabs(ppos.GetY(sCS)) < 0.5*l;
205 
206  if (intersected) {
207 
208  if (!mmEvt->HasScintillator(ScIdx))
209  mmEvt->MakeScintillator(ScIdx);
210 
211  mevt::Scintillator* const smEvt = &mmEvt->GetScintillator(ScIdx);
212 
213  if (! smEvt->HasSimData())
214  smEvt->MakeSimData();
215 
216  mevt::ScintillatorSimData* smSimData = &smEvt->GetSimData();
217 
218  Particle injectedParticle(*pIt);
219  //Set new z position (impact point on the scintillator)
220  const Point injectedPosition(ppos.GetX(sCS), ppos.GetY(sCS), 0.5*h, sCS);
221  injectedParticle.SetPosition(injectedPosition);
222 
223  //Load particle in the proper event scintillator
224  smSimData->AddParticle(injectedParticle);
225  if (injectedParticle.GetType() == Particle::eMuon || injectedParticle.GetType() == Particle::eAntiMuon)
226  smSimData->IncrementNumberOfInjectedMuons();
227 
228  utl::Line path(injectedPosition, pdir);
229 
230 #ifdef AMIGA_DEBUG
231  ofile
232  << cId << " " << MoIdx << " " << ScIdx << " "
233  << pIt->GetType() << " "
234  << injectedPosition.GetX(cCS)/utl::m << " "
235  << injectedPosition.GetY(cCS)/utl::m << " "
236  << injectedPosition.GetZ(cCS)/utl::m << " "
237  << interval.GetInterval()/utl::ns << " "
238  << smDet->IntersectedBy(path) << " "
239  << pIt->GetParent().GetType() << " "
240  << cIt->GetT1()/utl::ns << " "
241  << eventTime.GetGPSSecond()/utl::s << " "
242  << eventTime.GetGPSNanoSecond()/utl::ns << " "
243  << endl;
244 #endif
245  injected = true;
246  break;
247  } // end if injected
248  } // end scintillator det loop
249  } // end modules det loop
250  } // end particle loop over a given counter
251  } // end counters loop
252 
253  for (MEvent::CounterIterator cIt = mEvent.CountersBegin();
254  cIt != mEvent.CountersEnd(); ++cIt) {
255 
256  const int cId = cIt->GetId();
257 
258  if (!cIt->HasSimData())
259  continue;
260 
261  if (cIt->IsSilent())
262  continue;
263 
264  T1 = cIt->GetT1();
265  //utl::TimeInterval trgTime = fTrgTimes[cId];
266 
267  const mdet::Counter& cmDet = mDetector.GetCounter(cId);
268  utl::TimeStamp coreTime;
269 
270  if (event.HasSimShower()) {
271  const ShowerSimData& sSimShower = event.GetSimShower();
272  coreTime = sSimShower.GetTimeStamp();
273  }
274 
275  for (mevt::Counter::ModuleIterator mIt = cIt->ModulesBegin(), em = cIt->ModulesEnd();
276  mIt != em; ++mIt) {
277 
278  const int mId = mIt->GetId();
279  const mdet::Module & mmDet = cmDet.GetModule(mId);
280 
281  if(!mmDet.IsSiPM()){ //If PMT
282 
283  //Prepares to iterate over module scintillators (mevt) and module channels (mdet)
284  //typedef mevt::Module::ScintillatorIterator ScIt;
286  const mdet::FrontEnd& frontEnd = mmDet.GetFrontEnd();
287  const double sRate = frontEnd.GetMeanSampleRatePeriod();
288  const double preT1BufferLength = frontEnd.GetPreT1BufferLength();
289  const double postT1BufferLength = frontEnd.GetPostT1BufferLength();
290 
291  //shift the position of the T1 to the circular md-buffer (preT1BufferLength)
292  utl::TimeInterval timeShiftpre(sRate*preT1BufferLength);
293  utl::TimeInterval timeShiftpost(sRate*postT1BufferLength);
294 
295  //cout << "timeShiftpre " << timeShiftpre << endl;
296  /*
297  for ( ScIt sc = mIt->ScintillatorsBegin(), esc = mIt->ScintillatorsEnd(); sc != esc; ++sc) {
298 
299  if (! sc->HasSimData() )
300  continue;//only scintillators with injected particles has SimData
301 
302  mevt::ScintillatorSimData* ssd = & sc->GetSimData();
303 
304  const mdet::Scintillator& scint = mmDet.GetScintillator(sc->GetId());
305 
306  for (mevt::ScintillatorSimData::ParticleIterator pi = ssd->ParticlesBegin(), sse = ssd->ParticlesEnd(); pi != sse; ++pi)
307  {
308  utl::Particle& particle = *pi;
309  utl::TimeInterval interval = particle.GetTime();
310 
311  //firstTime = std::min(interval.GetInterval(), T1);
312 
313  cout
314  << "Ctr " << cId << " (at " << counterR_i/utl::m << "m) Mod " << mId << " Sci " << sc->GetId() << " "
315  << "PTYPE "<< pi->GetType()<< " "
316  << "DELAY " << interval/utl::ns << " ns, "
317  //<< "START TRACE " << utl::TimeInterval(T1+trgTime.GetSecond()-timeShiftpre)/utl::ns << " ns "
318  << "START TRACE " << (utl::TimeInterval(T1) + trgTime - utl::TimeInterval(timeShiftpre)) /utl::ns << " ns "
319  << "INJECTED AT " << (utl::TimeInterval(T1)+interval) /utl::ns << " ns "
320  << "T1 " << utl::TimeInterval(T1) << " ns "
321  //<< "fTrgTimes[" << cId << "]=" << fTrgTimes[cId] << " " << " "
322  << "trgTime " << trgTime/utl::ns << " ns "
323  //<< "timeShiftpre " << timeShiftpre/utl::ns
324  << endl;
325 
326  //particles havewith respect to the counter T1
327  particle.SetTime( utl::TimeInterval(T1)+interval );
328 
329  }//end particles injected in scintillator loop
330  }//end scintillator loop
331  */
332 
333  for (chIt ch = frontEnd.ChannelsBegin(), ec = frontEnd.ChannelsEnd(); ch != ec; ++ch) {
334 
335  if (!mIt->HasChannel(ch->GetId()))
336  mIt->MakeChannel(ch->GetId());
337 
338  // Compute the trace start wrt the station trigger T1 GPS time
339  const utl::TimeStamp traceStart = eventTime + utl::TimeInterval(T1) - timeShiftpre;
340  mIt->GetChannel(ch->GetId()).SetTraceStartTime(traceStart);
341  /*
342  cout << "Setting trace start at " << mIt->GetChannel(ch->GetId()).GetTraceStartTime() << " "
343  << "T1 " << mIt->GetChannel(ch->GetId()).GetTraceStartTime()-eventTime+timeShiftpre << " "
344  << "(before: " << T1 << ")"
345  << endl;
346  */
347 
348  } // end for channel loop
349  }else{//If SiPM
350 
351  //Prepares to iterate over module channels (mdet)
352 
354  const mdet::FrontEndSiPM& frontEnd = mmDet.GetFrontEndSiPM();
355  const double sRate = frontEnd.GetMeanSampleRatePeriod();
356  const double preT1BufferLength = frontEnd.GetPreT1BufferLength();
357  const double postT1BufferLength = frontEnd.GetPostT1BufferLength();
358 
359  //shift the position of the T1 to the circular md-buffer (preT1BufferLength)
360  utl::TimeInterval timeShiftpre(sRate*preT1BufferLength);
361  utl::TimeInterval timeShiftpost(sRate*postT1BufferLength);
362 
363  for (chIt ch = frontEnd.ChannelsBegin(), ec = frontEnd.ChannelsEnd(); ch != ec; ++ch) {
364 
365  if (!mIt->HasChannel(ch->GetId()))
366  mIt->MakeChannel(ch->GetId());
367 
368  // Compute the trace start wrt the station trigger T1 GPS time
369  const utl::TimeStamp traceStart = eventTime + utl::TimeInterval(T1) - timeShiftpre;
370  mIt->GetChannel(ch->GetId()).SetTraceStartTime(traceStart);
371 
372  } // end for channel loop
373  }
374  } // end modules loop
375  } // end counter loop
376 
377  //fTrgTimes.clear();
378 #ifdef AMIGA_DEBUG
379  ofile.close();
380 #endif
381 
382  return eSuccess;
383 }
384 
385 
386 bool
388 {
389  return
390  pIt->GetType() == Particle::eNuElectron ||
391  pIt->GetType() == Particle::eAntiNuElectron ||
392  pIt->GetType() == Particle::eNuMuon ||
393  pIt->GetType() == Particle::eAntiNuMuon ||
394  pIt->GetType() == Particle::eNuTau ||
395  pIt->GetType() == Particle::eAntiNuTau;
396 }
397 
398 
399 bool
401 {
402  return
403  pIt->GetType() == Particle::ePhoton ||
404  /*neutrinos are skipped at the particleList level
405  pIt->GetType() == Particle::eNuElectron ||
406  pIt->GetType() == Particle::eAntiNuElectron ||
407  pIt->GetType() == Particle::eNuMuon ||
408  pIt->GetType() == Particle::eAntiNuMuon ||
409  pIt->GetType() == Particle::eNuTau ||
410  pIt->GetType() == Particle::eAntiNuTau ||*/
411  pIt->GetType() == Particle::ePiZero ||
412  pIt->GetType() == Particle::eKaon0L ||
413  pIt->GetType() == Particle::eKaon0S ||
414  pIt->GetType() == Particle::eNeutron ||
415  pIt->GetType() == Particle::eAntiNeutron;
416 }
417 
418 
421 {
422  return eSuccess;
423 }
424 
425 
426 int
428 {
429  if (!event.HasSEvent()) {
430  ERROR("SEvent does not exist.");
431  return 0;
432  }
433  sevt::SEvent& sEvent = event.GetSEvent();
434 
435  int partnerId = cmDet.GetAssociatedTankId();
436 
437  if (!sEvent.HasStation(partnerId)) {
438  ostringstream message;
439  message << "partner station with id " << partnerId << "was not found in SEvent\n";
440  WARNING(message);
441  return 0;
442  }
443 
444  sevt::Station& sStation = sEvent.GetStation(partnerId);
445  const sdet::Station& detStation = Detector::GetInstance().GetSDetector().GetStation(sStation);
446 
447  if (!sStation.HasSimData())
448  return 0;
449 
450  int ret = 0;
451  sevt::StationSimData& sSimData = sStation.GetSimData();
452  utl::TimeStamp firstT1Sd;
453 
454  for (sevt::StationSimData::TriggerTimeIterator it = sSimData.TriggerTimesBegin(); it != sSimData.TriggerTimesEnd(); ++it) {
455 
456  if (it == sSimData.TriggerTimesBegin())
457  firstT1Sd = *it;
458 
459  utl::TimeStamp trigTime = *it;
460  const sevt::StationTriggerData& trig = sSimData.GetTriggerData(trigTime);
461  cout << "IsT1 " << trig.IsT1() << " - " << "IsT2 " << trig.IsT2() << endl;
462 
463  if (!(trig.IsT2() || trig.IsT1()))
464  continue;
465 
466  ret = 1;
467  if (trig.IsT2())
468  ret = 2;
469 
470  if (trigTime < firstT1Sd) {
471  cout << "There is a previous trigger\n";
472  firstT1Sd = trigTime;
473  }
474  cout << "Trigger time: " << trigTime << endl;
475  cout << "Algorithm: " << trig.GetAlgorithmName() << endl;
476 
477  } // end loop on TriggerTimeIterator
478 
479  if (!ret)
480  return 0;
481 
482  utl::TimeStamp eventTime = event.GetMEvent().GetHeader().GetTime();
483  //see sdet::StationTriggerAlgorithm.h and TankTriggerSimulator.cc
484  utl::TimeInterval shift = utl::TimeInterval((detStation.GetFADCTraceLength() - detStation.GetLatchBin())*detStation.GetFADCBinSize());
485  utl::TimeStamp TstartTrace = firstT1Sd - shift;
486  //Time interval from Eventime to TstartTrace
487  T1 = TstartTrace - eventTime;
488 
489  cout << "eventTime " << eventTime << endl;
490  cout << "firstT1Sd " << firstT1Sd << endl;
491  cout << "TstartTrace " << TstartTrace << endl;
492  cout << "shift " << shift << endl;
493  cout << "T1 " << T1 << endl;
494 
495 /*
496  //T1 is absolute GPS T1 with respect to event time
497  utl::TimeInterval shiftToEvent = firstT1Sd - eventTime;
498 
499  //Keep track of how much the local T1 GPS is delayed with
500  //respect to core time (event time). This values
501  //is dependent of radial distance (through particle delay times)
502  fTrgTimes[cmDet.GetId()] = shiftToEvent-shift;
503  T1 = shiftToEvent.GetInterval();
504 
505  cout << "eventTime " << eventTime << endl;
506  cout << "firstT1Sd " << firstT1Sd << " " << endl;
507  cout << "shift " << shift << " " << endl;
508  cout << "shiftToEvent " << shiftToEvent << " " << endl;
509  cout << "shiftToEvent - shift " << shiftToEvent-shift << " " << endl;
510  cout << "fTrgTimes[" << cmDet.GetId() << "]=" << fTrgTimes[cmDet.GetId()] << " " << endl;
511 */
512 
513  return ret;
514 }
fwk::VModule::ResultFlag Init()
Initialize: invoked at beginning of run (NOT beginning of event)
Branch GetTopBranch() const
Definition: Branch.cc:63
UGrdParticleIterator UGrdParticlesBegin()
Station Level Simulated Data
const Module & GetModule(const int mId) const
Retrieve by id a constant module.
CounterConstIterator CountersBegin() const
Definition: MEvent.h:49
Point object.
Definition: Point.h:32
const utl::TimeStamp & GetTimeStamp() const
Get the TimeStamp of the absolute shower core-time.
bool HasStation(const int stationId) const
Check whether station exists.
Definition: SEvent.cc:81
bool HasMEvent() const
Detector description interface for Station-related data.
Report success to RunController.
Definition: VModule.h:62
void SetPosition(const utl::Point &position)
Definition: Particle.h:111
bool HasScintillator(const int sId) const
ChannelGroup::ConstIterator ChannelConstIterator
Convenience typedef for const iterator over the contained mdet::Channel instances.
Definition: FrontEndSiPM.h:82
void MakeScintillator(const int sId)
UGrdParticleIterator UGrdParticlesEnd()
Interface class to access to the SD part of an event.
Definition: SEvent.h:39
Describes a particle for Simulation.
Definition: Particle.h:26
ChannelConstIterator ChannelsEnd() const
End iterator over the contained channels.
Definition: FrontEnd.h:91
unsigned int GetPostT1BufferLength() const
Number of bins of the post-T1 buffer.
Definition: FrontEnd.cc:65
bool HasSimShower() const
utl::CoordinateSystemPtr GetLocalCoordinateSystem() const
Local system based on position and configured rotations.
#define INFO(message)
Macro for logging informational messages.
Definition: ErrorLogger.h:161
void AddParticle(const utl::Particle &particle)
Electronic front-end for the modules.
Definition: FrontEnd.h:33
unsigned int GetPreT1BufferLength() const
Number of bins of the (cyclic) pre-T1 buffer.
Definition: FrontEnd.cc:57
int GetId() const
const std::string & GetAlgorithmName() const
ModuleConstIterator ModulesEnd() const
Begin iterator for the Modules contained in the Counter.
Detector associated to muon detector hierarchy.
Definition: MDetector.h:32
unsigned int GetNumberOfUGrdParticles() const
Electronic front-end for the modules.
Definition: FrontEndSiPM.h:35
A TimeStamp holds GPS second and nanosecond for some event.
Definition: TimeStamp.h:110
Interface class to access Shower Simulated parameters.
Definition: ShowerSimData.h:49
bool IsChargedParticle(mevt::ScintillatorSimData::ParticleIterator pIt)
Scintillator & GetScintillator(const int sId)
Scintillator level event data.
boost::shared_ptr< const CoordinateTransformer > CoordinateSystemPtr
Shared pointer for coordinate systems.
sevt::StationTriggerData & GetTriggerData(const utl::TimeStamp &time)
Get simulated TriggerData.
#define max(a, b)
Class representing a document branch.
Definition: Branch.h:107
class to hold data at Station level
ChannelGroup::ConstIterator ChannelConstIterator
Convenience typedef for const iterator over the contained mdet::Channel instances.
Definition: FrontEnd.h:80
boost::indirect_iterator< InternalParticleIterator, utl::Particle & > ParticleIterator
ChannelConstIterator ChannelsBegin() const
Begin iterator over the contained channels.
Definition: FrontEndSiPM.h:87
constexpr double s
Definition: AugerUnits.h:163
Module level event data.
Definition: MEvent/Module.h:41
bool HasSimData() const
Check whether station simulated data exists.
double GetX(const CoordinateSystemPtr &coordinateSystem) const
Definition: BasicVector.h:206
double GetMeanSampleRatePeriod() const
Mean electronic sample rate period.
Definition: FrontEnd.cc:43
decltype(std::begin(boost::adaptors::keys(TriggerGPSMap()))) typedef TriggerTimeIterator
Array of Scintillator.
int GetTriggerTimeFromSD(evt::Event &event, const mdet::Counter &cmDet, double &T1)
int GetLatchBin() const
int GetAssociatedTankId() const
Retrieve the id of the associated surface tank.
double GetMeanSampleRatePeriod() const
Mean electronic sample rate period.
Definition: FrontEndSiPM.cc:53
void SetTraceStartTime(mevt::Counter::ModuleIterator mIt, const FrontEndType &frontEnd, const utl::TimeStamp &eventTime, const double &deltaLatch)
unsigned int GetPreT1BufferLength() const
Number of bins of the (cyclic) pre-T1 buffer.
Definition: FrontEndSiPM.cc:61
ScintillatorGroup::ConstIterator ScintillatorConstIterator
Scintillator handling.
#define WARNING(message)
Macro for logging warning messages.
Definition: ErrorLogger.h:163
unsigned int GetPostT1BufferLength() const
Number of bins of the post-T1 buffer.
Definition: FrontEndSiPM.cc:69
fwk::VModule::ResultFlag Finish()
Finish: invoked at end of the run (NOT end of the event)
const FrontEnd & GetFrontEnd() const
InternalModuleCollection::ComponentIterator ModuleIterator
TriggerTimeIterator TriggerTimesBegin() const
Beginning of simulated local trigger times list.
Station & GetStation(const int stationId)
retrieve station by id throw utl::NonExistentComponentException if n.a.
Definition: SEvent.h:116
Root detector of the muon detector hierarchy.
Counter level simulation data.
boost::indirect_iterator< InternalUGrdParticleIterator, utl::Particle & > UGrdParticleIterator
fwk::VModule::ResultFlag Run(evt::Event &event)
Run: invoked once per event.
double GetY(const CoordinateSystemPtr &coordinateSystem) const
Definition: BasicVector.h:209
Scintillator level simulation data.
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
double GetFADCBinSize() const
unsigned long GetGPSSecond() const
GPS second.
Definition: TimeStamp.h:124
InternalCounterCollection::ComponentIterator CounterIterator
Definition: MEvent.h:31
double GetGPSNanoSecond() const
GPS nanosecond.
Definition: TimeStamp.h:127
Station Trigger Data description
const FrontEndSiPM & GetFrontEndSiPM() const
ChannelConstIterator ChannelsBegin() const
Begin iterator over the contained channels.
Definition: FrontEnd.h:85
void LoadConfig(const utl::Branch &b, const std::string &tag, T1 &var, const T2 &defaultValue)
Helper method to load a particular configuration parameter.
Definition: ConfigUtils.h:35
Vector object.
Definition: Vector.h:30
ModuleConstIterator ModulesBegin() const
Begin iterator for the Modules contained in the Counter.
int GetType() const
Definition: Particle.h:101
TriggerTimeIterator TriggerTimesEnd() const
End of simulated local trigger times list.
Report failure to RunController, causing RunController to terminate execution.
Definition: VModule.h:64
CounterConstIterator CountersEnd() const
Definition: MEvent.h:52
unsigned int GetFADCTraceLength() const
bool IsNeutrino(mevt::ScintillatorSimData::ParticleIterator pIt)
ModuleGroup::ConstIterator ModuleConstIterator
Convenience typedef for const iterator over the contained Module instances.
sevt::StationSimData & GetSimData()
Get simulated data at station level.
constexpr double ns
Definition: AugerUnits.h:162
bool IsSiPM() const
bool HasSimData() const
const Counter & GetCounter(int id) const
Retrieve Counter by id.
Definition: MDetector.h:68
#define ERROR(message)
Macro for logging error messages.
Definition: ErrorLogger.h:165
constexpr double m
Definition: AugerUnits.h:121
Root of the Muon event hierarchy.
Definition: MEvent.h:25
bool HasSEvent() const
ChannelConstIterator ChannelsEnd() const
End iterator over the contained channels.
Definition: FrontEndSiPM.h:93
Definition: Line.h:17
ScintillatorSimData & GetSimData()

, generated on Tue Sep 26 2023.