00001 #ifndef HydjetSource_h
00002 #define HydjetSource_h
00003
00004
00005
00014 #define PYCOMP pycomp_
00015
00016 #include "FWCore/Framework/interface/GeneratedInputSource.h"
00017 #include "FWCore/ParameterSet/interface/ParameterSet.h"
00018 #include "SimDataFormats/HiGenData/interface/SubEvent.h"
00019 #include <map>
00020 #include <string>
00021 #include <vector>
00022 #include <math.h>
00023
00024 namespace HepMC {
00025 class GenEvent;
00026 class GenParticle;
00027 class GenVertex;
00028 }
00029
00030 namespace edm
00031 {
00032 class HydjetSource : public GeneratedInputSource {
00033 public:
00034 HydjetSource(const ParameterSet &, const InputSourceDescription &);
00035 virtual ~HydjetSource();
00036
00037 private:
00038 void add_heavy_ion_rec(HepMC::GenEvent *evt);
00039 HepMC::GenParticle* build_hyjet( int index, int barcode );
00040 HepMC::GenVertex* build_hyjet_vertex(int i, int id);
00041 bool call_pygive(const std::string& iParm);
00042 void clear();
00043 bool get_hard_particles(HepMC::GenEvent* evt, std::vector<SubEvent>& subs);
00044 bool get_soft_particles(HepMC::GenEvent* evt, std::vector<SubEvent>& subs);
00045 bool call_hyinit(double energy, double a, int ifb, double bmin,
00046 double bmax,double bfix,int nh);
00047 bool hydjet_init(const ParameterSet &pset);
00048 bool hyjpythia_init(const ParameterSet &pset);
00049 inline double nuclear_radius() const;
00050 virtual bool produce(Event & e);
00051
00052 HepMC::GenEvent *evt;
00053 double abeamtarget_;
00054 double bfixed_;
00055 double bmax_;
00056
00057 double bmin_;
00058
00059 int cflag_;
00060
00061
00062 double comenergy;
00063 bool doradiativeenloss_;
00064 bool docollisionalenloss_;
00065 double fracsoftmult_;
00066
00067
00068
00069
00070
00071 double hadfreeztemp_;
00072
00073 std::string hymode_;
00074 unsigned int maxEventsToPrint_;
00075 double maxlongy_;
00076
00077
00078 double maxtrany_;
00079
00080
00081 int nsub_;
00082 int nhard_;
00083 int nmultiplicity_;
00084
00085 int nsoft_;
00086 unsigned int nquarkflavor_;
00087
00088 unsigned int pythiaPylistVerbosity_;
00089 double qgpt0_;
00090
00091 double qgptau0_;
00092
00093 unsigned int shadowingswitch_;
00094
00095 double signn_;
00096
00097 };
00098
00099 double HydjetSource::nuclear_radius() const
00100 {
00101
00102
00103
00104 return 1.15 * pow((double)abeamtarget_, 1./3.);
00105 }
00106
00107 }
00108
00109 #endif