00001 #ifndef gen_PTYDISTRIBUTOR_H 00002 #define gen_PTYDISTRIBUTOR_H 00003 00004 #include <fstream> 00005 #include <iostream> 00006 #include <sstream> 00007 00008 #include "CLHEP/Random/JamesRandom.h" 00009 #include "CLHEP/Random/RandGeneral.h" 00010 00011 #include "FWCore/ParameterSet/interface/FileInPath.h" 00012 00013 namespace gen 00014 { 00015 class PtYDistributor { 00016 public: 00017 PtYDistributor() {}; 00018 //PtYDistributor(std::string inputfile, CLHEP::HepRandomEngine& fRandomEngine, double ptmax, double ptmin, double ymax, double ymin, int ptbins, int ybins); 00019 PtYDistributor(const edm::FileInPath& fip, CLHEP::HepRandomEngine& fRandomEngine, 00020 double ptmax, double ptmin, double ymax, double ymin, 00021 int ptbins, int ybins); 00022 virtual ~PtYDistributor() {}; 00023 00024 double fireY(); 00025 double firePt(); 00026 double fireY(double ymin, double ymax); 00027 double firePt(double ptmin, double ptmax); 00028 00029 private: 00030 double ptmax_; 00031 double ptmin_; 00032 double ymax_; 00033 double ymin_; 00034 00035 int ptbins_; 00036 int ybins_; 00037 00038 CLHEP::RandGeneral* fYGenerator; 00039 CLHEP::RandGeneral* fPtGenerator; 00040 00041 }; 00042 } 00043 00044 #endif 00045