00001 // DefaultSmearer class 00002 // 00003 // Namespace Atlfast:: 00004 // 00005 //----------------------------------------------------------------- 00006 // 00007 // This class provides a default implementation of the ISmearer 00008 // interface. It manages the generation of random numbers and 00009 // implements the smear() function required by ISmear 00010 // 00011 // Prototype- needs tidying up! 00012 // 00013 // Authors: H.T.Phillips, P. Clarke, E. Richter-Was, P. Sherwood, R. Steward 00014 // 00015 // 00016 // 00017 00018 #ifndef ATLFAST_DEFAULTSMEARER_H 00019 #define ATLFAST_DEFAULTSMEARER_H 00020 00021 //Atlfast includes 00022 #include "AtlfastAlgs/ISmearer.h" 00023 00024 #include "CLHEP/Random/RandomEngine.h" 00025 #include "CLHEP/Random/RandGauss.h" 00026 #include "CLHEP/Random/RandFlat.h" 00027 00028 namespace Atlfast { 00029 00035 class DefaultSmearer : virtual public ISmearer { 00036 00037 public: 00038 //---------------------------------------- 00039 // Constructors and Destructors 00040 //---------------------------------------- 00042 DefaultSmearer (const int aseed ); 00043 00045 virtual ~DefaultSmearer(); 00046 00047 //---------------------------------------- 00048 // The Smear Method 00049 //---------------------------------------- 00051 virtual HepLorentzVector smear(const HepMC::GenParticle& ); 00053 virtual HepLorentzVector smear( const HepLorentzVector& ); 00054 00056 virtual int setSmearParameters( const std::vector<double>& smearValues ); 00058 virtual int setSmearParamSchema( const int smearSchema); 00059 00060 //------------------------------------------------ 00065 inline RandGauss* randGauss( ) { return m_randGauss;} 00066 //------------------------------------------------ 00071 inline RandFlat* randFlat( ) { return m_randFlat;} 00072 00073 private: 00074 //---------------------------------------- 00075 // Private Methods 00076 //---------------------------------------- 00077 00078 //---------------------------------------- 00079 // Data Members 00080 //--------------------------------------- 00081 00082 // For now, we manage the random number engine 00083 // ourselves. In the future we can use the framework 00084 // random number service (Gaudi 4 has one for example) 00085 // WE SHOULD USE THIS SERVICE ASAP!! 00086 00088 //HepRandomEngine* m_randomEngine; 00093 RandGauss* m_randGauss; 00094 00099 RandFlat* m_randFlat; 00100 00101 // And the random number seed which I put here as a member 00102 // variable because I hope to allow it to be written with 00103 // jobOptions eventually... 00104 // Although right now it is not used anywhere other than the 00105 // constructor. 00107 int m_randSeed; 00108 00109 }; 00110 00111 00112 } // end of namespace bracket 00113 00114 #endif