///////////////////////////////////////////////////////////////////////// // G4Tutorial: // // DetectorReadOutGeometry.hh // // General purpose: // Defines a read-out geometry which can be assigned to a sensitive // detector. // // Purpose of the class in this example: // Defines a read-out geometry for the cubic detector of dimension // a x a x a: The read-out geometry consists of N adjacent slices each // of dimension a x a x d, where d * N = a (i.e. the read-out geometry // divides the detector volume into N equal segments). // ///////////////////////////////////////////////////////////////////////// #ifndef DETECTORREADOUT_HH #define DETECTORREADOUT_HH #include "G4VReadOutGeometry.hh" #include "globals.hh" // G4VReadOutGeometry is the abstract base class for creating read-out // geometry objects: class DetectorReadOutGeometry : public G4VReadOutGeometry { public: // Two arguments must be passed to the constructor: the number of slices // (bins), and the dimension of the detector: DetectorReadOutGeometry(G4int bins, G4double len); virtual ~DetectorReadOutGeometry(); private: // G4VReadOutGeometry has one pure virtual method, which must be implemented // by the user: Build. This method must be used to create the read-out // geometry and is required to return the physical volume of the read-out // world volume: virtual G4VPhysicalVolume* Build(); // Number of slices (bins) and the dimension of the cuboid detector: G4int numbBins; G4double length; }; #endif // DETECTORREADOUT_HH