31 #include "SensitiveDetector.hh"
32 #include "G4HCofThisEvent.hh"
71 if (edep==0.)
return false;
73 G4String volumeName = aStep -> GetPreStepPoint() -> GetPhysicalVolume()->
GetName();
75 if(volumeName !=
"SV_phys1")
80 newHit -> SetEdep(edep);
96 for (
G4int i=0;i<NbHits;i++)
99 totalEdepInOneEvent = totalEdepInOneEvent +
edep;
103 if (totalEdepInOneEvent!=0)
analysis-> StoreEnergyDeposition(totalEdepInOneEvent/
keV);
G4int GetCollectionID(G4String colName)
virtual ~SensitiveDetector()
static constexpr double keV
void AddHitsCollection(G4int HCID, G4VHitsCollection *aHC)
virtual void Initialize(G4HCofThisEvent *hitCollection)
G4String SensitiveDetectorName
virtual G4bool ProcessHits(G4Step *step, G4TouchableHistory *history)
virtual void EndOfEvent(G4HCofThisEvent *hitCollection)
void insert(G4String str)
SensitiveDetectorHitsCollection * fHitsCollection
G4double GetTotalEnergyDeposit() const
SensitiveDetector(const G4String &name, const G4String &hitsCollectionName, AnalysisManager *)
G4THitsCollection< SensitiveDetectorHit > SensitiveDetectorHitsCollection
static G4SDManager * GetSDMpointer()
AnalysisManager * analysis
G4CollectionNameVector collectionName