00001
00002
00003
00004
00005
00006
00007
00008
00009
00010 #ifndef BDSSamplerSD_h
00011 #define BDSSamplerSD_h 1
00012
00013 #include "G4VSensitiveDetector.hh"
00014 #include "BDSSamplerHit.hh"
00015 #include "G4Navigator.hh"
00016 #include "G4TransportationManager.hh"
00017
00018 class G4Step;
00019 class G4HCofThisEvent;
00020 class G4TouchableHistory;
00021
00022 class BDSSamplerSD : public G4VSensitiveDetector
00023 {
00024
00025 public:
00026 BDSSamplerSD(G4String name, G4String type);
00027 ~BDSSamplerSD();
00028
00029 void SetType(G4String aType);
00030
00031 void Initialize(G4HCofThisEvent*HCE);
00032 G4bool ProcessHits(G4Step*aStep,G4TouchableHistory*ROhist);
00033 void EndOfEvent(G4HCofThisEvent*HCE);
00034 void clear();
00035 void DrawAll();
00036 void PrintAll();
00037
00038 private:
00039 BDSSamplerHitsCollection *SamplerCollection;
00040 G4Navigator* StepperNavigator;
00041 G4bool StoreHit;
00042
00043 G4String itsType;
00044 G4String itsCollectionName;
00045
00046 };
00047
00048 inline void BDSSamplerSD::SetType(G4String aType)
00049 {itsType=aType;}
00050
00051 #endif
00052