00001 #ifndef GTMUONERATORTOOL_H 00002 #define GTMUONERATORTOOL_H 00003 00015 #include "GaudiKernel/RndmGenerators.h" 00016 #include "GaudiAlg/GaudiTool.h" 00017 00018 #include "GenTools/IHepMCEventMutator.h" 00019 00020 #include "CLHEP/Vector/ThreeVector.h" 00021 00022 #include <string> 00023 #include <vector> 00024 00025 class TH1F; 00026 00027 class GtMuoneratorTool : public GaudiTool, 00028 virtual public IHepMCEventMutator 00029 { 00030 public: 00031 GtMuoneratorTool(const std::string& type, 00032 const std::string& name, 00033 const IInterface* parent); 00034 virtual ~GtMuoneratorTool(); 00035 00036 // GaudiTool interface 00037 virtual StatusCode initialize(); 00038 virtual StatusCode finalize(); 00039 00040 // HepMCEventMutator interface 00041 virtual StatusCode mutate(HepMC::GenEvent& event); 00042 00043 private: 00044 00045 // Hold properties 00046 std::string m_whichSite; 00047 std::string m_muonFileName; 00048 std::string m_ratioFileName; 00049 std::string m_volume; 00050 bool m_rotation; 00051 00052 // just data 00053 TH1F* m_pmratio; 00054 std::vector<double> m_muonE, m_muonPhi, m_muonTheta; 00055 double m_Sx, m_Sy, m_Sz, m_Smax; 00056 CLHEP::Hep3Vector m_detectorDim; //the water cherenkov detector dimension. 00057 CLHEP::Hep3Vector m_detectorCenter; // detector center. 00058 double m_dphi; 00059 00060 IRndmGenSvc* m_rgs; 00061 Rndm::Numbers m_uni; 00062 00063 StatusCode ReadMuons(); 00064 double GetMuPlusMinusRatio(double momInGeV); 00065 int GetPIDFromMomentum(double momInGeV); 00066 }; 00067 00068 00069 #endif // GTMUONERATORTOOL_H