11 #include "G4VSensitiveDetector.hh"
12 #include "G4RunManager.hh"
13 #include "G4SystemOfUnits.hh"
14 #include "Randomize.hh"
15 #include "G4HCofThisEvent.hh"
17 #include "G4SDManager.hh"
18 #include "G4PhysicsFreeVector.hh"
45 void Initialize(G4HCofThisEvent *hce)
override;
57 G4bool
ProcessHits(G4Step *aStep, G4TouchableHistory *ROhist)
override;
66 enum SetEfficiencies {fIsNominalEfficiency, fIsFixedEfficiency, fIsRandomEfficiency, fIsAssignedEfficiency};
68 G4PhysicsFreeVector *fPDE;
69 G4double fFixedEfficiency;
Concrete class of G4VSensitiveDetector, representing the detector (i.e. the SiPM).
G4bool ProcessHits(G4Step *aStep, G4TouchableHistory *ROhist) override
For every optical photon that hits the SD this method instantiates a MyHit object,...
~MySensitiveDetector() override=default
Destructor of the class.
G4double fBackEfficiency[GS::nOfSiPMs]
Array of PDEs for back MPPCs.
void Initialize(G4HCofThisEvent *hce) override
Associates a new MyHitsCollection with a G4HCofThisEvent object at the beginning of each event.
void GetEfficienciesFromFile()
Reads and sets the efficiencies from the file.
MySensitiveDetector(G4String name, G4String hitsCollectionName)
Constructor of the class.
SetEfficiencies fEfficiencySetting
Type of SetEfficiencies.
MyHitsCollection * fHitsCollection
Pointer to the hits collection of the event.
G4double fFrontEfficiency[GS::nOfSiPMs]
Array of PDEs for front MPPCs.
void RandomizeEfficiencies()
Fixes random efficiencies for all MPPCs.
Definition of the namespace GS.
Declaration of the class MyHit.
G4THitsCollection< MyHit > MyHitsCollection
Concrete hit collection class for MyHit.
constexpr G4int nOfSiPMs
The number of SiPMs on a detector face.