7 #include <sevt/PMTSimData.h>
8 #include <sevt/SEvent.h>
9 #include <sevt/Station.h>
10 #include <sevt/StationSimData.h>
12 #include <utl/ErrorLogger.h>
13 #include <utl/Particle.h>
14 #include <utl/ParticleCases.h>
15 #include <utl/Trace.h>
17 #include <fwk/RunController.h>
20 #include <G4HCofThisEvent.hh>
21 #include <G4SDManager.hh>
23 #include <G4TouchableHistory.hh>
25 #include <G4Trajectory.hh>
26 #include <G4TrajectoryContainer.hh>
27 #include <G4VHitsCollection.hh>
32 using namespace G4XTankSimulatorAG;
38 G4XTankPMTAction::G4XTankPMTAction(
const G4String name,
const int pmtIndex) :
39 G4VSensitiveDetector(name),
42 if (fPMTIndex < 1 || fPMTIndex > 3) {
43 FATAL(
"G4PMTAction() : invalid PMT index.");
48 dynamic_cast<G4XTankSimulator*
>(&RunController::GetInstance().GetModule(
"G4XTankSimulatorAG"));
55 const double time = theStep->GetPreStepPoint()->GetGlobalTime();
100 warn <<
"Unknown utl::Particle type " << particle <<
" encountered!";
PMTSimData & GetSimData()
Get object containing PMT simulated data.
total (shower and background)
class that handles Geant4 SD simulation
static int GetCurrentParticleId()
#define FATAL(message)
Macro for logging fatal messages.
static sevt::StationSimData::ParticleIterator GetCurrentParticleIt()
bool HasPETimeDistribution(const StationConstants::SignalComponent source=StationConstants::eTotal) const
Check if a PE release time distribution exists (optionally for a given source)
G4bool ProcessHits(G4Step *theStep, G4TouchableHistory *R0Hist)
electrons and positrons from shower
class to hold data at Station level
static int GetPrimaryId()
#define WARNING(message)
Macro for logging warning messages.
photons from muon decay in shower
static sevt::SEvent::StationIterator GetCurrentEventStationIt()
PMT & GetPMT(const unsigned int pmtId)
Retrive a PMT by Id.
Class to hold simulated data at PMT level.
struct particle_info particle[80]
#define OFFLINE_ELECTRONS
G4XTankSimulator * fG4XTankSimulator
utl::TimeDistributionI & GetPETimeDistribution(const StationConstants::SignalComponent source=StationConstants::eTotal)
Simulated photoelectron time distribution.
void AddTime(const double time, const T weight=T(1))
Add an entry (optionally weighted) for the given time. Slot will be computed.
mu+ and mu- (including signal from mu decay electrons) from shower
electrons from muon decay in shower
void MakePETimeDistribution(const StationConstants::SignalComponent source=StationConstants::eTotal)
Create a PE release time distribution (optionally for given source)