00001 /* BDSIM code. Version 1.0 00002 Author: Grahame A. Blair, Royal Holloway, Univ. of London. 00003 Last modified 24.7.2002 00004 Copyright (c) 2002 by G.A.Blair. ALL RIGHTS RESERVED. 00005 */ 00006 00007 #ifndef BDSEnergyCounterSD_h 00008 #define BDSEnergyCounterSD_h 1 00009 00010 #include "G4VSensitiveDetector.hh" 00011 #include "BDSEnergyCounterHit.hh" 00012 #include "G4Navigator.hh" 00013 #include "G4GFlashSpot.hh" 00014 #include "G4VGFlashSensitiveDetector.hh" 00015 00016 class G4VProcess; 00017 class G4Step; 00018 class G4HCofThisEvent; 00019 class G4TouchableHistory; 00020 00021 class BDSEnergyCounterSD : public G4VSensitiveDetector, public G4VGFlashSensitiveDetector 00022 { 00023 00024 public: 00025 BDSEnergyCounterSD(G4String name); 00026 ~BDSEnergyCounterSD(); 00027 00028 virtual void Initialize(G4HCofThisEvent*HCE); 00029 virtual G4bool ProcessHits(G4Step*aStep,G4TouchableHistory*ROhist); 00030 virtual G4bool ProcessHits(G4GFlashSpot*aSpot ,G4TouchableHistory* ROhist); 00031 00032 G4double GetSPositionOfStep(G4Step* aStep); 00033 G4double GetSPositionOfSpot(G4GFlashSpot* aSpot); 00034 G4String GetName(); 00035 00036 private: 00038 BDSEnergyCounterSD& operator=(const BDSEnergyCounterSD&); 00039 BDSEnergyCounterSD(BDSEnergyCounterSD&); 00040 00041 G4bool verbose; 00042 G4String itsName; 00043 BDSEnergyCounterHitsCollection* energyCounterCollection; 00044 BDSEnergyCounterHitsCollection* primaryCounterCollection; 00045 G4int HCIDe; 00046 G4int HCIDp; 00047 G4double enrg; 00048 G4double X,Y,Z,S; // global coordinates 00049 G4double x,y,z; // local coordinates 00050 }; 00051 00052 inline G4String BDSEnergyCounterSD::GetName() 00053 {return itsName;} 00054 00055 00056 #endif 00057