00001 /* BDSIM code for LW Calorimeter. Version 1.0 00002 Author: John Carter, Royal Holloway, Univ. of London. 00003 Last modified 26.7.2004 00004 Copyright (c) 2004 by J.C.Carter. ALL RIGHTS RESERVED. 00005 */ 00006 #ifndef BDSLWCalorimeterSD_h 00007 #define BDSLWCalorimeterSD_h 1 00008 00009 #include "G4VSensitiveDetector.hh" 00010 #include "BDSLWCalorimeterHit.hh" 00011 00012 class G4Step; 00013 class G4HCofThisEvent; 00014 class G4TouchableHistory; 00015 00016 class BDSLWCalorimeterSD : public G4VSensitiveDetector 00017 { 00018 00019 public: 00020 BDSLWCalorimeterSD(G4String name); 00021 ~BDSLWCalorimeterSD(); 00022 00023 virtual void Initialize(G4HCofThisEvent*HCE); 00024 virtual G4bool ProcessHits(G4Step*aStep,G4TouchableHistory*ROhist); 00025 virtual void EndOfEvent(G4HCofThisEvent*HCE); 00026 inline void AddEnergy(G4double anEnergy) 00027 {itsTotalEnergy+=anEnergy;} 00028 00029 G4double itsTotalEnergy; 00030 G4int itsCopyNumber; 00031 00032 private: 00033 BDSLWCalorimeterHitsCollection *LWCalorimeterCollection; 00034 00035 }; 00036 00037 00038 00039 00040 #endif 00041