herwig is hosted by Hepforge, IPPP Durham
Herwig++  2.7.0
ThreeMesonDefaultCurrent.h
00001 // -*- C++ -*-
00002 //
00003 // ThreeMesonDefaultCurrent.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_ThreeMesonDefaultCurrent_H
00010 #define HERWIG_ThreeMesonDefaultCurrent_H
00011 //
00012 // This is the declaration of the ThreeMesonDefaultCurrent class.
00013 //
00014 #include "ThreeMesonCurrentBase.h"
00015 #include "Herwig++/Utilities/Interpolator.h"
00016 #include "Herwig++/Utilities/Kinematics.h"
00017 #include "ThePEG/StandardModel/StandardModelBase.h"
00018 
00019 namespace Herwig {
00020 using namespace ThePEG;
00021 
00048 class ThreeMesonDefaultCurrent: public ThreeMesonCurrentBase {
00049 
00054   friend class Defaulta1MatrixElement;
00055 
00056 public:
00057 
00061   ThreeMesonDefaultCurrent();
00062 
00069   void persistentOutput(PersistentOStream & os) const;
00070 
00076   void persistentInput(PersistentIStream & is, int version);
00078 
00082   static void Init();
00083 
00084 public:
00085 
00088   
00103   virtual bool createMode(int icharge,unsigned int imode,DecayPhaseSpaceModePtr mode,
00104                           unsigned int iloc,unsigned int ires,
00105                           DecayPhaseSpaceChannelPtr phase,Energy upp);
00107 
00114   virtual void dataBaseOutput(ofstream & os,bool header,bool create) const;
00115   
00128   double threeBodyMatrixElement(const int imode,  const Energy2 q2,
00129                                 const Energy2 s3, const Energy2 s2, 
00130                                 const Energy2 s1, const Energy  m1, 
00131                                 const Energy  m2, const Energy  m3) const;
00132 
00133 protected:
00134 
00139   virtual bool acceptMode(int) const;
00140 
00151   virtual FormFactors calculateFormFactors(const int ichan, const int imode,
00152                                            Energy2 q2,
00153                                            Energy2 s1, Energy2 s2, Energy2 s3) const;
00154 
00155 protected:
00156 
00163   virtual IBPtr clone() const {return new_ptr(*this);}
00164 
00169   virtual IBPtr fullclone() const {return new_ptr(*this);}
00171 
00172 protected:
00173 
00181   virtual void doinit();
00182 
00186   virtual void doinitrun();
00187 
00191   virtual void doupdate();
00193 
00194 private:
00195 
00199   ThreeMesonDefaultCurrent & operator=(const ThreeMesonDefaultCurrent &);
00200 
00201 private:
00202   
00209   Complex BrhoF123(Energy2 q2,int ires) const {
00210     Complex output(0.),norm(0.);
00211     for(unsigned int ix=0,N=min(3,int(_rhoF123wgts.size()));ix<N;++ix) {
00212       norm+=_rhoF123wgts[ix];
00213     }
00214     if(ires<0) {
00215       for(unsigned int ix=0,N=min(3,int(_rhoF123wgts.size()));ix<N;++ix) {
00216         output+=_rhoF123wgts[ix]*rhoKBreitWigner(q2,0,ix);
00217       }
00218     }
00219     else {
00220       unsigned int temp(ires);
00221       if(temp<_rhoF123wgts.size()&&temp<3)
00222         output=_rhoF123wgts[temp]*rhoKBreitWigner(q2,0,temp);
00223       else
00224         output=0.;
00225     }
00226     return output/norm;
00227   }
00228 
00235   Complex BrhoF5(Energy2 q2,int ires) const {
00236     Complex output(0.),norm(0.);
00237     for(unsigned int ix=0,N=min(3,int(_rhoF5wgts.size()));ix<N;++ix) {
00238       norm+=_rhoF5wgts[ix];
00239     }
00240     if(ires<0) {
00241       for(unsigned int ix=0,N=min(3,int(_rhoF5wgts.size()));ix<N;++ix) {
00242         output+=_rhoF5wgts[ix]*rhoKBreitWigner(q2,1,ix);
00243       }
00244     }
00245     else {
00246       unsigned int temp(ires);
00247       if(temp<_rhoF5wgts.size()&&temp<3) {
00248         output=_rhoF5wgts[temp]*rhoKBreitWigner(q2,1,temp);
00249       }
00250     }
00251     return output/norm;
00252   }
00253 
00260   Complex BKstarF123(Energy2 q2,int ires) const {
00261     Complex output(0.),norm(0.);
00262     for(unsigned int ix=0,N=min(3,int(_kstarF123wgts.size()));ix<N;++ix) {
00263       norm+=_kstarF123wgts[ix];
00264     }
00265     if(ires<0) {
00266       for(unsigned int ix=0,N=min(3,int(_kstarF123wgts.size()));ix<N;++ix) {
00267         output+=_kstarF123wgts[ix]*rhoKBreitWigner(q2,2,ix);
00268       }
00269     }
00270     else {
00271       unsigned int temp(ires);
00272       if(temp<_kstarF123wgts.size()&&temp<3) {
00273         output=_kstarF123wgts[temp]*rhoKBreitWigner(q2,2,temp);
00274       }
00275     }
00276     return output/norm;
00277   }
00278 
00285   Complex BKstarF5(Energy2 q2,int ires) const {
00286     Complex output(0.),norm(0.);
00287     for(unsigned int ix=0,N=min(3,int(_kstarF5wgts.size()));ix<N;++ix) {
00288       norm+=_kstarF5wgts[ix];
00289     }
00290     if(ires<0) {
00291       for(unsigned int ix=0,N=min(3,int(_kstarF5wgts.size()));ix<N;++ix) {
00292         output+=_kstarF5wgts[ix]*rhoKBreitWigner(q2,3,ix);
00293       }
00294     }
00295     else {
00296       unsigned int temp(ires);
00297       if(temp<_kstarF5wgts.size()&&temp<3) {
00298         output=_kstarF5wgts[ires]*rhoKBreitWigner(q2,3,temp);
00299       }
00300     }
00301     return output/norm;
00302   }
00303   
00311   Complex FKrho(Energy2 si,Energy2 sj,int ires) const {
00312     Complex output;
00313     if(ires<0){output = _rhoKstarwgt*BKstarF123(si,-1)+BrhoF123(sj,-1);}
00314     else if(ires%2==0){output= _rhoKstarwgt*BKstarF123(si,ires/2);}
00315     else if(ires%2==1){output=BrhoF123(sj,ires/2);}
00316     output /=(1.+_rhoKstarwgt);
00317     return output;
00318   }
00319   
00325   Complex a1BreitWigner(Energy2 q2) const  {
00326     Complex ii(0.,1.);
00327     Energy2 m2(_a1mass*_a1mass);
00328     Energy  q(sqrt(q2));
00329     return m2/(m2-q2-ii*q*a1Width(q2));
00330   }
00331   
00337   Complex K1BreitWigner(Energy2 q2) const {
00338     Energy2 m2 = sqr(_k1mass);
00339     Complex ii(0.,1.);
00340     complex<Energy2> fact(m2 - ii*_k1mass*_k1width);
00341     return fact/(fact-q2);
00342   }
00343   
00349   Energy a1Width(Energy2 q2) const {
00350     Energy output;
00351     if(!_a1opt) output = _a1mass*_a1width*g(q2)/g(sqr(_a1mass))/sqrt(q2);
00352     else        output = (*_a1runinter)(q2);
00353     return output;
00354   }
00355   
00359   double g(Energy2 q2) const {
00360     double output;
00361     if(q2 < 9.*sqr(_mpi)) {
00362       output=0.;
00363     }
00364     else if(q2 < sqr(_rhoF123masses[0]+_mpi)) {
00365       double diff = (q2-9.*sqr(_mpi))/GeV2;
00366       
00367       output = 4.1*sqr(diff)*diff*(1.-3.3*diff+5.8*sqr(diff));
00368     }
00369     else {
00370       double ratio = q2/GeV2;
00371       output = ratio*(1.623+10.38/ratio-9.32/sqr(ratio)+0.65/(ratio*sqr(ratio)));
00372     }
00373     return output;
00374   }
00375 
00380   void inita1Width(int iopt);
00381 
00388   Complex rhoKBreitWigner(Energy2 q2,unsigned int itype,unsigned int ires) const;
00389 
00390 private:
00391   
00396   vector<double> _rhoF123wgts;
00397 
00402   vector<double> _kstarF123wgts;
00403   
00408   vector<double> _rhoF5wgts;
00409 
00414   vector<double> _kstarF5wgts;
00415   
00419   double _rhoKstarwgt;
00420   
00424   vector<Energy>  _a1runwidth;
00425 
00429   vector<Energy2> _a1runq2;
00430 
00431 
00435   Interpolator<Energy,Energy2>::Ptr _a1runinter;
00436 
00440   bool _initializea1;
00441   
00445   Energy _a1mass;
00446 
00450   Energy _a1width;
00451 
00455   Energy _k1mass;
00456 
00460   Energy _k1width;
00461 
00465   Energy _fpi;
00466 
00470   Energy _mpi;
00471 
00475   Energy _mK;
00476 
00480   bool _rhoparameters;
00481 
00485   vector<Energy> _rhoF123masses;
00486 
00490   vector<Energy> _rhoF5masses;
00491 
00495   vector<Energy> _rhoF123widths;
00496 
00500   vector<Energy> _rhoF5widths;
00501   
00505   bool _kstarparameters;
00506 
00510   vector<Energy> _kstarF123masses;
00511 
00515   vector<Energy> _kstarF5masses;
00516 
00520   vector<Energy> _kstarF123widths;
00521 
00525   vector<Energy> _kstarF5widths;
00526   
00530   bool _a1parameters;
00531   
00535   bool _k1parameters;
00536 
00540   bool _a1opt;
00541 
00545   Energy _maxmass;
00546 
00550   Energy _maxcalc;
00551   
00552 };
00553 
00554 }
00555 
00556 #endif /* THEPEG_ThreeMesonDefaultCurrent_H */