File indexing completed on 2026-05-15 07:41:49
0001 #pragma once
0002
0003 #include <DDG4/Geant4Action.h>
0004 #include <DDG4/Geant4Data.h>
0005 #include <DDG4/Geant4EventAction.h>
0006 #include <string>
0007
0008 class SEvt;
0009 struct sphoton;
0010
0011 namespace ddeicopticks
0012 {
0013
0014
0015
0016
0017
0018
0019
0020
0021
0022
0023
0024
0025
0026
0027
0028 class OpticsEvent final : public dd4hep::sim::Geant4EventAction
0029 {
0030 public:
0031 OpticsEvent(dd4hep::sim::Geant4Context *ctxt, std::string const &name);
0032
0033 void begin(G4Event const *event) final;
0034 void end(G4Event const *event) final;
0035
0036 protected:
0037 DDG4_DEFINE_ACTION_CONSTRUCTORS(OpticsEvent);
0038 ~OpticsEvent() final;
0039
0040 private:
0041 void injectHits(G4Event const *event, SEvt *sev, unsigned num_hit);
0042 static dd4hep::sim::Geant4Tracker::Hit *createTrackerHit(sphoton const &ph);
0043
0044 int verbose_{0};
0045 int64_t photon_threshold_{0};
0046 bool batch_begun_{false};
0047 };
0048
0049
0050 }