Herwig++
2.7.0
|
00001 // -*- C++ -*- 00002 // 00003 // TwoMesonRhoKStarCurrent.h is a part of Herwig++ - A multi-purpose Monte Carlo event generator 00004 // Copyright (C) 2002-2011 The Herwig Collaboration 00005 // 00006 // Herwig++ is licenced under version 2 of the GPL, see COPYING for details. 00007 // Please respect the MCnet academic guidelines, see GUIDELINES for details. 00008 // 00009 #ifndef HERWIG_TwoMesonRhoKStarCurrent_H 00010 #define HERWIG_TwoMesonRhoKStarCurrent_H 00011 // This is the declaration of the TwoMesonRhoKStarCurrent class. 00012 00013 #include "WeakDecayCurrent.h" 00014 #include "ThePEG/PDT/EnumParticles.h" 00015 #include "Herwig++/Utilities/Kinematics.h" 00016 #include "ThePEG/StandardModel/StandardModelBase.h" 00017 00018 namespace Herwig { 00019 using namespace ThePEG; 00020 00053 class TwoMesonRhoKStarCurrent: public WeakDecayCurrent { 00054 00055 public: 00056 00060 TwoMesonRhoKStarCurrent(); 00061 00079 virtual bool createMode(int icharge,unsigned int imode,DecayPhaseSpaceModePtr mode, 00080 unsigned int iloc,unsigned int ires, 00081 DecayPhaseSpaceChannelPtr phase,Energy upp); 00082 00092 virtual tPDVector particles(int icharge, unsigned int imode, int iq, int ia); 00094 00104 virtual vector<LorentzPolarizationVectorE> 00105 current(const int imode, const int ichan,Energy & scale, 00106 const ParticleVector & decay, DecayIntegrator::MEOption meopt) const; 00107 00113 virtual bool accept(vector<int> id); 00114 00120 virtual unsigned int decayMode(vector<int> id); 00121 00128 virtual void dataBaseOutput(ofstream & os,bool header,bool create) const; 00129 00130 public: 00131 00138 void persistentOutput(PersistentOStream & os) const; 00139 00145 void persistentInput(PersistentIStream & is, int version); 00147 00151 static void Init(); 00152 00153 protected: 00154 00161 virtual IBPtr clone() const {return new_ptr(*this);} 00162 00167 virtual IBPtr fullclone() const {return new_ptr(*this);} 00169 00170 protected: 00171 00174 00180 virtual void doinit(); 00182 00183 private: 00184 00188 static ClassDescription<TwoMesonRhoKStarCurrent> initTwoMesonRhoKStarCurrent; 00189 00193 TwoMesonRhoKStarCurrent & operator=(const TwoMesonRhoKStarCurrent &); 00194 00195 private: 00196 00207 Complex BreitWigner(Energy2 q2, unsigned int imodel,unsigned int itype, 00208 unsigned int ires) const { 00209 // workout the index of the resonace 00210 unsigned int iy(3*itype+ires); 00211 // off shell mass 00212 Energy q(sqrt(q2)); 00213 // and the running width 00214 Energy pq(pcm(iy,q)); 00215 double ratio(pow<3,1>(pq/_mom[iy])); 00216 Energy gamrun(_width[iy]*_mass[iy]*ratio/q); 00217 // work out the denominator 00218 complex<Energy2> denom, numer; 00219 Complex ii(0.,1.); 00220 if(imodel==0) { 00221 denom=q2-_mass2[iy]+ii*_mass[iy]*gamrun; 00222 numer=-_mass2[iy]; 00223 } 00224 else if(imodel==1) { 00225 denom = q2 - _mass2[iy] + ii*_mass[iy]*gamrun 00226 - ( sqr(pq) * (GSModelhFunction(iy,q)-_hm2[iy]) 00227 - sqr(_mom[iy]) * (q2-_mass2[iy]) * _dhdq2[iy]); 00228 00229 numer = -(_mass2[iy]+_dparam[iy]*_mass[iy]*_width[iy]); 00230 } 00231 else assert(false); 00232 // return the answer 00233 return numer/denom; 00234 } 00235 00241 double GSModelDParameter(const unsigned int ires)const { 00242 Energy mpi(0.5*(_massa[ires]+_massb[ires])); 00243 using Constants::pi; 00244 return 3.*mpi*mpi/pi/sqr(_mom[ires])*log(0.5*(_mass[ires]+2.*_mom[ires])/mpi) 00245 +0.5*_mass[ires]/pi/_mom[ires]-mpi*mpi*_mass[ires]/pi/pow<3,1>(_mom[ires]); 00246 } 00247 00254 InvEnergy2 GSModeldhdq2Parameter(const unsigned int ires)const { 00255 Energy mpi = 0.5 * (_massa[ires] + _massb[ires]); 00256 return _width[ires] / Constants::pi / pow<3,1>(_mom[ires]) * 00257 (sqr(mpi) / _mass[ires] / _mom[ires] * 00258 log(0.5 * (_mass[ires] + 2.*_mom[ires])/mpi) + 0.5); 00259 } 00260 00267 double GSModelhFunction(const unsigned int ires, const Energy q) const { 00268 Energy pq(pcm(ires,q)); 00269 return _width[ires]*_mass2[ires]/pow<3,1>(_mom[ires]) 00270 *2.*pq/Constants::pi/q*log((q+2.*pq)/(_massa[ires]+_massb[ires])); 00271 } 00272 00280 Energy pcm(const unsigned int ires, const Energy q) const { 00281 Energy2 q2(q*q); 00282 if(q <= _massa[ires]+_massb[ires]) return ZERO; 00283 return 0.5/q*sqrt((q2-sqr(_massa[ires]+_massb[ires]))* 00284 (q2-sqr(_massa[ires]-_massb[ires]))); 00285 } 00287 00288 private: 00289 00297 vector<Complex> _piwgt; 00298 00302 vector<double> _pimag; 00303 00307 vector<double> _piphase; 00309 00317 vector<Complex> _kwgt; 00318 00322 vector<double> _kmag; 00323 00327 vector<double> _kphase; 00329 00333 int _pimodel; 00334 00338 int _kmodel; 00339 00343 bool _rhoparameters; 00344 00348 vector<Energy> _rhomasses; 00349 00353 vector<Energy> _rhowidths; 00354 00358 bool _kstarparameters; 00359 00363 vector<Energy> _kstarmasses; 00364 00368 vector<Energy> _kstarwidths; 00369 00377 vector<Energy> _mass; 00378 00382 vector<Energy> _width; 00383 00387 vector<Energy2> _mass2; 00388 00392 vector<Energy2> _massw; 00393 00397 vector<Energy> _massa,_massb; 00398 00402 vector<Energy> _mom; 00403 00408 vector<InvEnergy2> _dhdq2; 00409 00414 vector<double> _hm2; 00415 00420 vector<double> _dparam; 00422 }; 00423 00424 } 00425 00426 00427 #include "ThePEG/Utilities/ClassTraits.h" 00428 00429 namespace ThePEG { 00430 00437 template <> 00438 struct BaseClassTrait<Herwig::TwoMesonRhoKStarCurrent,1> { 00440 typedef Herwig::WeakDecayCurrent NthBase; 00441 }; 00442 00447 template <> 00448 struct ClassTraits<Herwig::TwoMesonRhoKStarCurrent> 00449 : public ClassTraitsBase<Herwig::TwoMesonRhoKStarCurrent> { 00451 static string className() { return "Herwig::TwoMesonRhoKStarCurrent"; } 00457 static string library() { return "HwWeakCurrents.so"; } 00458 00459 }; 00460 00463 } 00464 00465 #endif /* HERWIG_TwoMesonRhoKStarCurrent_H */