00001 00022 #ifndef GTGUNGENTOOL_H 00023 #define GTGUNGENTOOL_H 00024 00025 00026 #include "GenTools/IHepMCEventMutator.h" 00027 #include "GaudiAlg/GaudiTool.h" 00028 #include "GaudiKernel/RndmGenerators.h" 00029 00030 class IDetectorElement; 00031 00032 class GtGunGenTool : public GaudiTool, 00033 virtual public IHepMCEventMutator 00034 { 00035 00036 public: 00037 00038 GtGunGenTool(const std::string& type, 00039 const std::string& name, 00040 const IInterface* parent); 00041 virtual ~GtGunGenTool(); 00042 00043 // GaudiTool interface 00044 virtual StatusCode initialize(); 00045 virtual StatusCode finalize(); 00046 00047 // HepMCEventMutator interface 00048 virtual StatusCode mutate(HepMC::GenEvent& event); 00049 00050 private: 00051 00053 std::string m_particleName; 00054 00056 int m_particlesPerEvent; 00057 00058 00059 // What does 'momentum' value mean? Interpretation 00066 std::string m_momentumInterpretation; 00067 00072 std::string m_momentumMode; 00073 00076 // double m_momentum; 00077 DoubleProperty m_momentum; 00078 00080 double m_momentumSpread; 00081 00086 std::string m_directionMode; 00087 00091 std::vector<double> m_direction; 00092 00094 double m_directionSpread; 00095 00099 std::string m_polarizeMode; 00100 00101 Rndm::Numbers m_uni, m_gauss; 00102 int m_pid; 00103 double m_mass; 00104 double generateNumber(const std::string& mode, double mean, double spread); 00105 StatusCode oneVertex(HepMC::GenEvent& event); 00106 }; 00107 00108 #endif // GTGUNGENTOOL_H