diff --git a/Models/StandardModel/GenericSVVVertex.cc b/Models/StandardModel/GenericSVVVertex.cc --- a/Models/StandardModel/GenericSVVVertex.cc +++ b/Models/StandardModel/GenericSVVVertex.cc @@ -1,115 +1,115 @@ // -*- C++ -*- // // GenericSVVVertex.cc is a part of Herwig - A multi-purpose Monte Carlo event generator // Copyright (C) 2002-2017 The Herwig Collaboration // // Herwig is licenced under version 3 of the GPL, see COPYING for details. // Please respect the MCnet academic guidelines, see GUIDELINES for details. // // // This is the implementation of the non-inlined, non-templated member // functions of the GenericSVVVertex class. // #include "GenericSVVVertex.h" #include "ThePEG/Utilities/DescribeClass.h" #include "ThePEG/Interface/ClassDocumentation.h" #include "ThePEG/Interface/Parameter.h" #include "ThePEG/Interface/Switch.h" #include "ThePEG/Interface/Command.h" #include "ThePEG/Persistency/PersistentOStream.h" #include "ThePEG/Persistency/PersistentIStream.h" using namespace Herwig; using namespace ThePEG; GenericSVVVertex::GenericSVVVertex() :pids(ZERO),oas(0),oaew(0) {} void GenericSVVVertex::doinit() { //PDG codes for particles at vertices addToList(pids[0],pids[1],pids[2]); orderInGs(oas); orderInGem(oaew); GeneralVVSVertex::doinit(); } string GenericSVVVertex::dopids(string in) { vector process = StringUtils::split(in); if ( process.size() != 3 ) throw InitException() << "accepts only three particles."; for ( vector::iterator p = process.begin(); p != process.end(); ++p ) { int tmp; istringstream(*p) >> tmp; pids.push_back(tmp); } return ""; } void GenericSVVVertex::persistentOutput(PersistentOStream & os) const { os << pids<> pids>>oas>>oaew; } // The following static variable is needed for the type // description system in ThePEG. DescribeClass describeHerwigGenericSVVVertex("Herwig::GenericSVVVertex", "Herwig.so"); void GenericSVVVertex::Init() { static ClassDocumentation documentation ("This class implements the s->v,v vertex"); static Command interfacepids ("pids", "Set the pids.", &GenericSVVVertex::dopids, false); static Parameter interfaceOrderoas ("OrderInAlphaS", "The order in alpha_S", &GenericSVVVertex::oas, 2, 0, 0, false, false, Interface::lowerlim); static Parameter interfaceOrderoaew ("OrderInAlphaEW", "The order in alpha_EW", &GenericSVVVertex::oaew, 2, 0, 0, false, false, Interface::lowerlim); } void GenericSVVVertex::setCoupling(Energy2, #ifndef NDEBUG tcPDPtr part2, #else tcPDPtr, #endif #ifndef NDEBUG tcPDPtr part3, #else tcPDPtr, #endif #ifndef NDEBUG - tcPDPtr part1, + tcPDPtr part1) { #else tcPDPtr) { #endif assert(part1 && part2 && part3); assert(part1->id() == pids[0] && part2->id() == pids[1] && part3->id() == pids[2] ); } diff --git a/Models/StandardModel/GenericVVVVertex.cc b/Models/StandardModel/GenericVVVVertex.cc --- a/Models/StandardModel/GenericVVVVertex.cc +++ b/Models/StandardModel/GenericVVVVertex.cc @@ -1,115 +1,115 @@ // -*- C++ -*- // // GenericVVVVertex.cc is a part of Herwig - A multi-purpose Monte Carlo event generator // Copyright (C) 2002-2017 The Herwig Collaboration // // Herwig is licenced under version 3 of the GPL, see COPYING for details. // Please respect the MCnet academic guidelines, see GUIDELINES for details. // // // This is the implementation of the non-inlined, non-templated member // functions of the GenericVVVVertex class. // #include "GenericVVVVertex.h" #include "ThePEG/Utilities/DescribeClass.h" #include "ThePEG/Interface/ClassDocumentation.h" #include "ThePEG/Interface/Parameter.h" #include "ThePEG/Interface/Switch.h" #include "ThePEG/Interface/Command.h" #include "ThePEG/Persistency/PersistentOStream.h" #include "ThePEG/Persistency/PersistentIStream.h" using namespace Herwig; using namespace ThePEG; GenericVVVVertex::GenericVVVVertex() :pids(ZERO),oas(0),oaew(0) {} void GenericVVVVertex::doinit() { //PDG codes for particles at vertices addToList(pids[0],pids[1],pids[2]); orderInGs(oas); orderInGem(oaew); VVVVertex::doinit(); } string GenericVVVVertex::dopids(string in) { vector process = StringUtils::split(in); if ( process.size() != 3 ) throw InitException() << "accepts only three particles."; for ( vector::iterator p = process.begin(); p != process.end(); ++p ) { int tmp; istringstream(*p) >> tmp; pids.push_back(tmp); } return ""; } void GenericVVVVertex::persistentOutput(PersistentOStream & os) const { os << pids<> pids>>oas>>oaew; } // The following static variable is needed for the type // description system in ThePEG. DescribeClass describeHerwigGenericVVVVertex("Herwig::GenericVVVVertex", "Herwig.so"); void GenericVVVVertex::Init() { static ClassDocumentation documentation ("This class implements the v->v,v vertex"); static Command interfacepids ("pids", "Set the pids.", &GenericVVVVertex::dopids, false); static Parameter interfaceOrderoas ("OrderInAlphaS", "The order in alpha_S", &GenericVVVVertex::oas, 2, 0, 0, false, false, Interface::lowerlim); static Parameter interfaceOrderoaew ("OrderInAlphaEW", "The order in alpha_EW", &GenericVVVVertex::oaew, 2, 0, 0, false, false, Interface::lowerlim); } void GenericVVVVertex::setCoupling(Energy2, #ifndef NDEBUG tcPDPtr part2, #else tcPDPtr, #endif #ifndef NDEBUG tcPDPtr part3, #else tcPDPtr, #endif #ifndef NDEBUG - tcPDPtr part1, + tcPDPtr part1) { #else tcPDPtr) { #endif assert(part1 && part2 && part3); assert(part1->id() == pids[0] && part2->id() == pids[1] && part3->id() == pids[2] ); } diff --git a/Models/StandardModel/SMHZPVertex.cc b/Models/StandardModel/SMHZPVertex.cc --- a/Models/StandardModel/SMHZPVertex.cc +++ b/Models/StandardModel/SMHZPVertex.cc @@ -1,197 +1,197 @@ // -*- C++ -*- // // This is the implementation of the non-inlined, non-templated member // functions of the SMHZPVertex class. // #include "SMHZPVertex.h" #include "ThePEG/Interface/ClassDocumentation.h" #include "ThePEG/EventRecord/Particle.h" #include "ThePEG/Repository/UseRandom.h" #include "ThePEG/Repository/EventGenerator.h" #include "ThePEG/Utilities/DescribeClass.h" #include "ThePEG/Persistency/PersistentOStream.h" #include "ThePEG/Persistency/PersistentIStream.h" using namespace Herwig; SMHZPVertex::SMHZPVertex() :_couplast(0.),_q2last(),_mw(),_mz(),_massopt(1), _minloop(6),_maxloop(6) { orderInGs(0); orderInGem(3); kinematics(true); colourStructure(ColourStructure::SINGLET); } IBPtr SMHZPVertex::clone() const { return new_ptr(*this); } IBPtr SMHZPVertex::fullclone() const { return new_ptr(*this); } void SMHZPVertex::doinit() { GeneralVVSVertex::doinit(); //PDG codes for particles at vertices addToList(23,22,25); _theSM = dynamic_ptr_cast(generator()->standardModel()); if( !_theSM ) throw InitException() << "SMHGGVertex::doinit() - The pointer to the SM object is null." << Exception::abortnow; _mw = getParticleData(ThePEG::ParticleID::Wplus)->mass(); _mz = getParticleData(ThePEG::ParticleID::Z0)->mass(); GeneralVVSVertex::doinit(); } void SMHZPVertex::persistentOutput(PersistentOStream & os) const { os << _theSM << ounit(_mw,GeV) << ounit(_mz,GeV) << _massopt << _minloop << _maxloop; } void SMHZPVertex::persistentInput(PersistentIStream & is, int) { is >> _theSM >> iunit(_mw, GeV) >> iunit(_mz,GeV) >> _massopt >> _minloop >> _maxloop; } // The following static variable is needed for the type // description system in ThePEG. DescribeClass describeHerwigSMHZPVertex("Herwig::SMHZPVertex", "libHerwig.so"); void SMHZPVertex::Init() { static ClassDocumentation documentation ("The SMHZPVertex class provides a simple implementation of the " "Higgs-Z-Photon loop looping to allow the calculation of the " "associated Higgs decay mode H -> Z gamma."); static Parameter interfaceMinQuarkInLoop ("MinQuarkInLoop", "The minimum flavour of the quarks to include in the loops", &SMHZPVertex::_minloop, 6, 1, 6, false, false, Interface::limited); static Parameter interfaceMaxQuarkInLoop ("MaxQuarkInLoop", "The maximum flavour of the quarks to include in the loops", &SMHZPVertex::_maxloop, 6, 1, 6, false, false, Interface::limited); static Switch interfaceMassOption ("LoopMassScheme", "Switch for the treatment of the masses in the loops ", &SMHZPVertex::_massopt, 2, false, false); static SwitchOption interfaceHeavyMass (interfaceMassOption, "PoleMasses", "The loop is calculcated with the pole quark masses", 1); static SwitchOption interfaceNormalMass (interfaceMassOption, "RunningMasses", "running quark masses are taken in the loop", 2); } void SMHZPVertex::setCoupling(Energy2 q2, tcPDPtr part2, tcPDPtr part3, #ifndef NDEBUG - tcPDPtr part1, + tcPDPtr part1) { #else tcPDPtr) { #endif if(part3->id()==ParticleID::Z0) swap(part2,part3); assert( part1->id() == ParticleID::h0 && part2->id() == ParticleID::Z0 && part3->id() == ParticleID::gamma ); int Qminloop = _minloop; int Qmaxloop = _maxloop; if (_maxloop < _minloop) swap(Qmaxloop,Qminloop); double cw = sqrt(1.-sin2ThetaW()),sw=sqrt(sin2ThetaW()),tw = sw/cw; if(q2 != _q2last||_couplast==0.) { double g = weakCoupling(q2); double e2 = sqr(electroMagneticCoupling(q2)); _couplast = UnitRemoval::E * e2 * g / 16. / _mw/ sqr(Constants::pi); _q2last = q2; } norm(_couplast); Complex loop(0.); // quark loops for ( int i = Qminloop; i <= Qmaxloop; ++i ) { tcPDPtr qrk = getParticleData(i); Energy mass = (2 == _massopt) ? _theSM->mass(q2,qrk) : qrk->mass(); double charge = i%2==0 ? generator()->standardModel()->eu() : generator()->standardModel()->ed(); double gv = i%2==0 ? generator()->standardModel()->vu() : generator()->standardModel()->vd(); double tau = 0.25*invariant(0,0)/sqr(mass), lambda(0.25*sqr(_mz/mass)); loop += 3.*charge*gv *(I1(tau,lambda)-I2(tau,lambda))/(sw*cw); } // lepton loops int Lminloop = 3; // still fixed value int Lmaxloop = 3; // still fixed value for (int i = Lminloop; i <= Lmaxloop; ++i) { tcPDPtr lpt = getParticleData(9 + 2*i); Energy mass = (2 == _massopt) ? _theSM->mass(q2,lpt) : lpt->mass(); double charge = generator()->standardModel()->ee(); double gv = generator()->standardModel()->ve(); double tau = 0.25*invariant(0,0)/sqr(mass), lambda(0.25*sqr(_mz/mass)); loop += charge*gv*(I1(tau,lambda)-I2(tau,lambda))/(sw*cw); } // W loop double tau = 0.25*invariant(0,0)/sqr(_mw), lambda(0.25*sqr(_mz/_mw)); loop += ( 4.*(3.-sqr(tw))*I2(tau,lambda) + ((1.+2.*tau)*sqr(tw)-(5.+2.*tau))*I1(tau,lambda))/tw; a00(loop); a11(0.0); a12(0.0); a21(-loop); a22(0.0); aEp(0.0); // test of the width calculation // Energy mh = getParticleData(25)->mass(); // Energy pre = sqr(weakCoupling(q2))*pow(electroMagneticCoupling(q2),4)*mh*sqr(mh/_mw) // /128./16./pow(Constants::pi,5)*pow(double(1.-sqr(_mz/mh)),3)* // std::real(std::norm(loop)); } Complex SMHZPVertex::I1(double tau,double lambda) const { return (-0.5+0.5/(tau-lambda)*(f(tau)-f(lambda))+ lambda/(tau-lambda)*(g(tau)-g(lambda)))/(tau-lambda); } Complex SMHZPVertex::I2(double tau,double lambda) const { return 0.5/(tau-lambda)*(f(tau)-f(lambda)); } Complex SMHZPVertex::f(double tau) const { if(tau>0 && tau<= 1.) { return sqr(asin(sqrt(tau))); } else if(tau>1.) { double lx = log(sqrt(tau)+sqrt(tau-1)); return -sqr(lx)+0.25*sqr(Constants::pi)+Complex(0.,1.)*Constants::pi*lx; } else { assert(false); return 0.; } } Complex SMHZPVertex::g(double tau) const { if(tau>0 && tau<= 1.) { return sqrt((1.-tau)/tau)*asin(sqrt(tau)); } else if(tau>1.) { double lx = log(sqrt(tau)+sqrt(tau-1)); double root = sqrt((tau-1.)/tau); return root*(lx-0.5*Complex(0,1)*Constants::pi); } else { assert(false); return 0.; } } diff --git a/Models/Susy/SSGSGSGVertex.cc b/Models/Susy/SSGSGSGVertex.cc --- a/Models/Susy/SSGSGSGVertex.cc +++ b/Models/Susy/SSGSGSGVertex.cc @@ -1,73 +1,73 @@ // -*- C++ -*- // // SSGSGSGVertex.cc is a part of Herwig - A multi-purpose Monte Carlo event generator // Copyright (C) 2002-2017 The Herwig Collaboration // // Herwig is licenced under version 3 of the GPL, see COPYING for details. // Please respect the MCnet academic guidelines, see GUIDELINES for details. // // // This is the implementation of the non-inlined, non-templated member // functions of the SSGSGSGVertex class. // #include "SSGSGSGVertex.h" #include "ThePEG/Utilities/DescribeClass.h" #include "ThePEG/Interface/ClassDocumentation.h" #include "ThePEG/Utilities/DescribeClass.h" #include "ThePEG/Persistency/PersistentOStream.h" #include "ThePEG/Persistency/PersistentIStream.h" #include "ThePEG/PDT/EnumParticles.h" using namespace ThePEG::Helicity; using namespace Herwig; SSGSGSGVertex::SSGSGSGVertex() : _couplast(0.),_q2last(ZERO) { orderInGs(1); orderInGem(0); colourStructure(ColourStructure::SU3F); } // Static variable needed for the type description system in ThePEG. DescribeNoPIOClass describeHerwigSSGSGSGVertex("Herwig::SSGSGSGVertex", "HwSusy.so"); void SSGSGSGVertex::Init() { static ClassDocumentation documentation ("This class implements the gluon-gluino-gluino vertex"); } void SSGSGSGVertex::setCoupling(Energy2 q2, #ifndef NDEBUG tcPDPtr part1, #else tcPDPtr , #endif #ifndef NDEBUG tcPDPtr part2, #else + tcPDPtr , #endif - tcPDPtr , #ifndef NDEBUG tcPDPtr part3) { #else tcPDPtr ) { #endif assert(part1->id()==ParticleID::SUSY_g && part2->id()==ParticleID::SUSY_g && part3->id() == ParticleID::g); if(q2 != _q2last || _couplast==0.) { _couplast = strongCoupling(q2); _q2last = q2; } norm(_couplast); left(1.); right(1.); } void SSGSGSGVertex::doinit() { addToList(1000021, 1000021, 21); FFVVertex::doinit(); }