Import Geant4 11.3.0.beta source tree
This commit is contained in:
@@ -26,10 +26,11 @@
|
||||
#ifndef PAR04EVENTACTION_HH
|
||||
#define PAR04EVENTACTION_HH
|
||||
|
||||
#include <G4Types.hh> // for G4int, G4double
|
||||
#include <vector> // for vector
|
||||
#include "G4Timer.hh" // for G4Timer
|
||||
#include "G4Timer.hh" // for G4Timer
|
||||
#include "G4UserEventAction.hh" // for G4UserEventAction
|
||||
|
||||
#include <G4Types.hh> // for G4int, G4double
|
||||
#include <vector> // for vector
|
||||
class G4Event;
|
||||
class Par04DetectorConstruction;
|
||||
class Par04ParallelFullWorld;
|
||||
@@ -46,69 +47,70 @@ class Par04ParallelFullWorld;
|
||||
|
||||
class Par04EventAction : public G4UserEventAction
|
||||
{
|
||||
public:
|
||||
Par04EventAction(Par04DetectorConstruction* aDetector, Par04ParallelFullWorld* aParallel);
|
||||
virtual ~Par04EventAction();
|
||||
public:
|
||||
Par04EventAction(Par04DetectorConstruction* aDetector, Par04ParallelFullWorld* aParallel);
|
||||
virtual ~Par04EventAction();
|
||||
|
||||
/// Timer is started
|
||||
virtual void BeginOfEventAction(const G4Event* aEvent) final;
|
||||
/// Hits collection is retrieved, analysed, and histograms are filled.
|
||||
virtual void EndOfEventAction(const G4Event* aEvent) final;
|
||||
inline std::vector<G4double>& GetCalEdep() { return fCalEdep; }
|
||||
inline std::vector<G4int>& GetCalRho() { return fCalRho; }
|
||||
inline std::vector<G4int>& GetCalPhi() { return fCalPhi; }
|
||||
inline std::vector<G4int>& GetCalZ() { return fCalZ; }
|
||||
inline std::vector<G4double>& GetPhysicalCalEdep() { return fCalPhysicalEdep; }
|
||||
inline std::vector<G4int>& GetPhysicalCalLayer() { return fCalPhysicalLayer; }
|
||||
inline std::vector<G4int>& GetPhysicalCalSlice() { return fCalPhysicalSlice; }
|
||||
inline std::vector<G4int>& GetPhysicalCalRow() { return fCalPhysicalRow; }
|
||||
void StartTimer();
|
||||
void StopTimer();
|
||||
private:
|
||||
/// ID of a hit collection to analyse
|
||||
G4int fHitCollectionID = -1;
|
||||
G4int fPhysicalFullHitCollectionID = -1;
|
||||
G4int fPhysicalFastHitCollectionID = -1;
|
||||
/// Timer measurement from Geant4
|
||||
G4Timer fTimer;
|
||||
/// Pointer to detector construction to retrieve (once) the detector
|
||||
/// dimensions and size of readout
|
||||
Par04DetectorConstruction* fDetector = nullptr;
|
||||
Par04ParallelFullWorld* fParallel = nullptr;
|
||||
/// Size of cell along Z axis
|
||||
G4double fCellSizeZ = 0;
|
||||
/// Size of cell along radius of cylinder
|
||||
G4double fCellSizeRho = 0;
|
||||
/// Size of cell in azimuthal angle
|
||||
G4double fCellSizePhi = 0;
|
||||
/// Number of readout cells along radius
|
||||
G4int fCellNbRho = 0;
|
||||
/// Number of readout cells in azimuthal angle
|
||||
G4int fCellNbPhi = 0;
|
||||
/// Number of readout cells along z axis
|
||||
G4int fCellNbZ = 0;
|
||||
/// Number of physical readout layers
|
||||
G4int fPhysicalNbLayers = 0;
|
||||
/// Number of physical readout slices
|
||||
G4int fPhysicalNbSlices = 0;
|
||||
/// Number of physical readout rows
|
||||
G4int fPhysicalNbRows = 0;
|
||||
/// Cell energy deposits to be stored in ntuple
|
||||
std::vector<G4double> fCalEdep;
|
||||
/// Cell ID of radius to be stored in ntuple
|
||||
std::vector<G4int> fCalRho;
|
||||
/// Cell ID of azimuthal angle to be stored in ntuple
|
||||
std::vector<G4int> fCalPhi;
|
||||
/// Cell ID of z axis to be stored in ntuple
|
||||
std::vector<G4int> fCalZ;
|
||||
/// Physical cell energy deposits to be stored in ntuple
|
||||
std::vector<G4double> fCalPhysicalEdep;
|
||||
/// Physical layer ID to be stored in ntuple
|
||||
std::vector<G4int> fCalPhysicalLayer;
|
||||
/// Physical slice ID to be stored in ntuple
|
||||
std::vector<G4int> fCalPhysicalSlice;
|
||||
/// Physical row ID to be stored in ntuple
|
||||
std::vector<G4int> fCalPhysicalRow;
|
||||
/// Timer is started
|
||||
virtual void BeginOfEventAction(const G4Event* aEvent) final;
|
||||
/// Hits collection is retrieved, analysed, and histograms are filled.
|
||||
virtual void EndOfEventAction(const G4Event* aEvent) final;
|
||||
inline std::vector<G4double>& GetCalEdep() { return fCalEdep; }
|
||||
inline std::vector<G4int>& GetCalRho() { return fCalRho; }
|
||||
inline std::vector<G4int>& GetCalPhi() { return fCalPhi; }
|
||||
inline std::vector<G4int>& GetCalZ() { return fCalZ; }
|
||||
inline std::vector<G4double>& GetPhysicalCalEdep() { return fCalPhysicalEdep; }
|
||||
inline std::vector<G4int>& GetPhysicalCalLayer() { return fCalPhysicalLayer; }
|
||||
inline std::vector<G4int>& GetPhysicalCalSlice() { return fCalPhysicalSlice; }
|
||||
inline std::vector<G4int>& GetPhysicalCalRow() { return fCalPhysicalRow; }
|
||||
void StartTimer();
|
||||
void StopTimer();
|
||||
|
||||
private:
|
||||
/// ID of a hit collection to analyse
|
||||
G4int fHitCollectionID = -1;
|
||||
G4int fPhysicalFullHitCollectionID = -1;
|
||||
G4int fPhysicalFastHitCollectionID = -1;
|
||||
/// Timer measurement from Geant4
|
||||
G4Timer fTimer;
|
||||
/// Pointer to detector construction to retrieve (once) the detector
|
||||
/// dimensions and size of readout
|
||||
Par04DetectorConstruction* fDetector = nullptr;
|
||||
Par04ParallelFullWorld* fParallel = nullptr;
|
||||
/// Size of cell along Z axis
|
||||
G4double fCellSizeZ = 0;
|
||||
/// Size of cell along radius of cylinder
|
||||
G4double fCellSizeRho = 0;
|
||||
/// Size of cell in azimuthal angle
|
||||
G4double fCellSizePhi = 0;
|
||||
/// Number of readout cells along radius
|
||||
G4int fCellNbRho = 0;
|
||||
/// Number of readout cells in azimuthal angle
|
||||
G4int fCellNbPhi = 0;
|
||||
/// Number of readout cells along z axis
|
||||
G4int fCellNbZ = 0;
|
||||
/// Number of physical readout layers
|
||||
G4int fPhysicalNbLayers = 0;
|
||||
/// Number of physical readout slices
|
||||
G4int fPhysicalNbSlices = 0;
|
||||
/// Number of physical readout rows
|
||||
G4int fPhysicalNbRows = 0;
|
||||
/// Cell energy deposits to be stored in ntuple
|
||||
std::vector<G4double> fCalEdep;
|
||||
/// Cell ID of radius to be stored in ntuple
|
||||
std::vector<G4int> fCalRho;
|
||||
/// Cell ID of azimuthal angle to be stored in ntuple
|
||||
std::vector<G4int> fCalPhi;
|
||||
/// Cell ID of z axis to be stored in ntuple
|
||||
std::vector<G4int> fCalZ;
|
||||
/// Physical cell energy deposits to be stored in ntuple
|
||||
std::vector<G4double> fCalPhysicalEdep;
|
||||
/// Physical layer ID to be stored in ntuple
|
||||
std::vector<G4int> fCalPhysicalLayer;
|
||||
/// Physical slice ID to be stored in ntuple
|
||||
std::vector<G4int> fCalPhysicalSlice;
|
||||
/// Physical row ID to be stored in ntuple
|
||||
std::vector<G4int> fCalPhysicalRow;
|
||||
};
|
||||
|
||||
#endif /* PAR04EVENTACTION_HH */
|
||||
|
||||
Reference in New Issue
Block a user