00001 #ifndef HydjetHadronizer_h 00002 #define HydjetHadronizer_h 00003 00004 // $Id: HydjetHadronizer.h,v 1.8 2010/12/14 22:47:47 yarba Exp $ 00005 00014 #define PYCOMP pycomp_ 00015 00016 #include "FWCore/ParameterSet/interface/ParameterSet.h" 00017 #include "GeneratorInterface/Core/interface/BaseHadronizer.h" 00018 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 gen 00031 { 00032 class Pythia6Service; 00033 00034 class HydjetHadronizer : public BaseHadronizer { 00035 public: 00036 HydjetHadronizer(const edm::ParameterSet &); 00037 virtual ~HydjetHadronizer(); 00038 00039 bool generatePartonsAndHadronize(); 00040 bool hadronize(); 00041 bool decay(); 00042 bool residualDecay(); 00043 bool initializeForExternalPartons(); 00044 bool initializeForInternalPartons(); 00045 bool declareStableParticles( const std::vector<int> ); 00046 bool declareSpecialSettings( const std::vector<std::string> ) { return true; } 00047 00048 void finalizeEvent(); 00049 void statistics(); 00050 const char* classname() const; 00051 00052 private: 00053 void add_heavy_ion_rec(HepMC::GenEvent *evt); 00054 HepMC::GenParticle* build_hyjet( int index, int barcode ); 00055 HepMC::GenVertex* build_hyjet_vertex(int i, int id); 00056 bool get_particles(HepMC::GenEvent* evt); 00057 bool call_hyinit(double energy, double a, int ifb, double bmin, 00058 double bmax,double bfix,int nh); 00059 bool hydjet_init(const edm::ParameterSet &pset); 00060 inline double nuclear_radius() const; 00061 void rotateEvtPlane(); 00062 00063 HepMC::GenEvent *evt; 00064 edm::ParameterSet pset_; 00065 double abeamtarget_; // beam/target atomic mass number 00066 double bfixed_; // fixed impact param (fm); valid only if cflag_=0 00067 double bmax_; // max impact param; 00068 // units of nucl radius 00069 double bmin_; // min impact param; 00070 // units of nucl radius 00071 int cflag_; // centrality flag 00072 // = 0 fixed impact param, 00073 // <> 0 between bmin and bmax 00074 bool embedding_; // Switch for embedding mode 00075 double comenergy; // collision energy 00076 bool doradiativeenloss_; 00077 bool docollisionalenloss_; 00078 double fracsoftmult_; // fraction of soft hydro induced hadronic multiplicity 00079 // proportional to no of nucleon participants 00080 // (1-fracsoftmult_)--- fraction of soft 00081 // multiplicity proportional to the numebr 00082 // of nucleon-nucleon binary collisions 00083 // DEFAULT=1., allowed range [0.01,1] 00084 double hadfreeztemp_; // hadron freez-out temperature 00085 // DEFAULT=0.14MeV, allowed ranges [0.08,0.2]MeV 00086 std::string hymode_; // Hydjet running mode 00087 unsigned int maxEventsToPrint_; // Events to print if verbosity 00088 double maxlongy_; // max longitudinal collective rapidity: 00089 // controls width of eta-spectra 00090 // DEFAULT=4, allowed range [0.01,7.0] 00091 double maxtrany_; // max transverse collective rapidity: 00092 // controls slope of low-pt spectra 00093 // DEFAULT=1.5, allowed range [0.01,3.0] 00094 int nsub_; // number of sub-events 00095 int nhard_; // multiplicity of PYTHIA(+PYQUEN)-induced particles in event 00096 int nmultiplicity_; // mean soft multiplicity in central PbPb 00097 // automatically calculated for other centralitie and beams 00098 int nsoft_; // multiplicity of HYDRO-induced particles in event 00099 unsigned int nquarkflavor_; 00100 00101 unsigned int pythiaPylistVerbosity_; // pythia verbosity; def=1 00102 double qgpt0_; // initial temperature of QGP 00103 // DEFAULT = 1GeV; allowed range [0.2,2.0]GeV; 00104 double qgptau0_; // proper time of QGP formation 00105 // DEFAULT = 0.1 fm/c; allowed range [0.01,10.0]fm/ 00106 00107 double phi0_; // Event plane angle 00108 double sinphi0_; 00109 double cosphi0_; 00110 bool rotate_; // Switch to rotate event plane 00111 00112 unsigned int shadowingswitch_; // shadowing switcher 00113 // 1-ON, 0-OFF 00114 double signn_; // inelastic nucleon nucleon cross section [mb] 00115 // DEFAULT= 58 mb 00116 00117 Pythia6Service* pythia6Service_; 00118 edm::InputTag src_; 00119 }; 00120 00121 double HydjetHadronizer::nuclear_radius() const 00122 { 00123 // Return the nuclear radius derived from the 00124 // beam/target atomic mass number. 00125 00126 return 1.15 * pow((double)abeamtarget_, 1./3.); 00127 } 00128 } /*end namespace*/ 00129 #endif