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++)
98 G4double edep = (*fHitsCollection)[i]->GetEdep();
99 totalEdepInOneEvent = totalEdepInOneEvent + edep;
103 if (totalEdepInOneEvent!=0)
analysis-> StoreEnergyDeposition(totalEdepInOneEvent/
keV);
G4String SensitiveDetectorName
virtual void Initialize(G4HCofThisEvent *hitCollection)
G4int GetCollectionID(G4String colName)
virtual G4bool ProcessHits(G4Step *step, G4TouchableHistory *history)
virtual void EndOfEvent(G4HCofThisEvent *hitCollection)
G4THitsCollection< SensitiveDetectorHit > SensitiveDetectorHitsCollection
void insert(G4String str)
SensitiveDetector(const G4String &name, const G4String &hitsCollectionName, AnalysisManager *)
AnalysisManager * analysis
SensitiveDetectorHitsCollection * fHitsCollection
G4double GetTotalEnergyDeposit() const
void AddHitsCollection(G4int HCID, G4VHitsCollection *aHC)
static G4SDManager * GetSDMpointer()
G4CollectionNameVector collectionName
virtual ~SensitiveDetector()