00001 // ================================================ 00002 // Implementation of C0SamplerRouterRandomSample 00003 // ================================================ 00004 00005 #include "FastShowerUtils/C0SamplerRouterRandomSample.h" 00006 #include "FastShowerUtils/CoreSamples.h" 00007 #include "CLHEP/Random/RandFlat.h" 00008 #include <assert.h> 00009 00010 namespace FastShower{ 00011 C0SamplerRouterRandomSample::C0SamplerRouterRandomSample(const std::vector< 00012 std::pair<double, ISampler*> 00013 >& v, 00014 double floor, 00015 std::string label 00016 ): 00017 SamplerRouter(v, floor, label){}; 00018 // 00019 C0SamplerRouterRandomSample::C0SamplerRouterRandomSample(const 00020 C0SamplerRouterRandomSample& s): 00021 SamplerRouter(s){}; 00022 // 00023 ISampler* C0SamplerRouterRandomSample::clone() const { 00024 return new C0SamplerRouterRandomSample(*this); 00025 } 00026 // 00027 double C0SamplerRouterRandomSample::indexQ(const ParticleParameters&, 00028 const CoreSamples&)const{ 00029 return RandFlat::shoot(); 00030 } 00031 // 00032 double C0SamplerRouterRandomSample::lastValue(const CoreSamples& cs) const { 00033 return cs.give(this); 00034 } 00035 }//namespace 00036 00037 00038