00001 //! \file 00002 //! 00003 //! Header file for the Symmetric_Moeller Hit class. 00004 //! 00005 //! The SM_Hit class defines the quantities recorded for each hit in this 00006 //! detector and defines the member functions for handling the hit information. 00007 //! 00008 //! \author Y. Ma based on the sample provided by Olympus simulation package 00009 //! \version 1.0 00010 //! \date 2010-10-11 00011 //! 00012 //! \ingroup detector 00013 00014 // *+****1****+****2****+****3****+****4****+****5****+****6****+****7****+**** 00015 00016 // Include this file just once. 00017 00018 #ifndef SM_HIT_H 00019 #define SM_HIT_H 00020 00021 // Include the GEANT4 header files referenced in this file. 00022 00023 #include "G4VHit.hh" 00024 #include "G4ThreeVector.hh" 00025 #include "G4THitsCollection.hh" 00026 00027 // *+****1****+****2****+****3****+****4****+****5****+****6****+****7****+**** 00028 00029 //! SM Monitor Hit class based on G4VHit. 00030 //! 00031 //! Provides routines for setting and accessing the various stored information 00032 //! on each hit in this detector. 00033 00034 class SM_Hit : public G4VHit { 00035 00036 public: 00037 00038 //! Default constructor. 00039 00040 SM_Hit(); 00041 00042 //! Copy constructor. 00043 00044 SM_Hit( const SM_Hit & hit ); 00045 00046 //! Assignment constructor. 00047 00048 const SM_Hit & operator = ( const SM_Hit & hit ); 00049 00050 //! Destructor. 00051 00052 ~SM_Hit(); 00053 00054 // Member functions. 00055 00056 //! Test equivalance. 00057 00058 G4int operator == ( const SM_Hit & hit ) const; 00059 00060 //! Allocate space for new hit. 00061 00062 void * operator new( size_t ); 00063 00064 //! Free space. 00065 00066 void operator delete( void * aHit ); 00067 00068 //! Routine to draw the hit in the visualisation window. 00069 00070 void Draw(); 00071 00072 //! Routine to print the hit information. 00073 00074 void Print(); 00075 00076 // Data members for the hit. 00077 00078 private: 00079 00080 //! SM_SD is declared as a friend class so it can access the hit data 00081 //! members directly without having numerous set/get member functions. 00082 00083 friend class SM_SD; 00084 00085 G4int copyno; //!< Copy number identifying the sub-detector hit. 00086 G4int trackid; //!< Track ID which created this hit. 00087 G4double edep; //!< Total energy deposited by this hit. 00088 G4double time; //!< Global time (relative to event) for this hit. 00089 G4ThreeVector tworld; //!< Position in true world coordinates. 00090 G4ThreeVector tlocal; //!< Position in true local coordinates. 00091 G4ThreeVector world; //!< Position in world coordinates. 00092 G4ThreeVector local; //!< Position in local coordinates. 00093 00094 }; 00095 00096 //! Typedef for SM_HitsCollection used in SM_SD. 00097 00098 typedef G4THitsCollection<SM_Hit> SM_HitsCollection; 00099 00100 #endif