10 #include <sevt/PMTSimData.h>
11 #include <sevt/SEvent.h>
12 #include <sevt/Station.h>
13 #include <sevt/StationSimData.h>
15 #include <utl/ErrorLogger.h>
16 #include <utl/Particle.h>
17 #include <utl/Trace.h>
19 #include <fwk/RunController.h>
22 #include <G4HCofThisEvent.hh>
23 #include <G4SDManager.hh>
25 #include <G4TouchableHistory.hh>
27 #include <G4Trajectory.hh>
28 #include <G4TrajectoryContainer.hh>
29 #include <G4VHitsCollection.hh>
34 using namespace G4TankSimulatorASCII;
40 G4TankPMTAction::G4TankPMTAction(
const G4String name,
const int pmtIndex) :
41 G4VSensitiveDetector(name),
44 if (fPMTIndex < 1 || fPMTIndex > 3) {
45 FATAL(
"G4PMTAction() : invalid PMT index.");
50 dynamic_cast<G4TankSimulator*
>(&RunController::GetInstance().GetModule(
"G4TankSimulatorASCII"));
57 const double time = theStep->GetPreStepPoint()->GetGlobalTime();
109 const bool IsFromMuonDecay= theStep->GetTrack()->GetUserInformation();
110 if ( IsFromMuonDecay )
PMTSimData & GetSimData()
Get object containing PMT simulated data.
total (shower and background)
class that handles Geant4 SD simulation
static sevt::SEvent::StationIterator GetCurrentEventStationIt()
G4TankSimulator * fG4TankSimulator
static int GetCurrentParticleId()
#define FATAL(message)
Macro for logging fatal messages.
bool HasPETimeDistribution(const StationConstants::SignalComponent source=StationConstants::eTotal) const
Check if a PE release time distribution exists (optionally for a given source)
static double MichelElectronNPE_time[2]
electrons and positrons from shower
class to hold data at Station level
static int MichelElectronNPE[2]
G4bool ProcessHits(G4Step *theStep, G4TouchableHistory *R0Hist)
static sevt::StationSimData::ParticleIterator GetCurrentParticleIt()
photons from muon decay in shower
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
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)
static int GetPrimaryId()