Page Menu
Home
HEPForge
Search
Configure Global Search
Log In
Files
F9501837
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
27 KB
Subscribers
None
View Options
diff --git a/Models/LH/LHWWHVertex.cc b/Models/LH/LHWWHVertex.cc
--- a/Models/LH/LHWWHVertex.cc
+++ b/Models/LH/LHWWHVertex.cc
@@ -1,224 +1,224 @@
// -*- C++ -*-
//
// This is the implementation of the non-inlined, non-templated member
// functions of the LHWWHVertex class.
//
#include "LHWWHVertex.h"
#include "ThePEG/Interface/ClassDocumentation.h"
#include "ThePEG/Utilities/DescribeClass.h"
#include "ThePEG/Persistency/PersistentOStream.h"
#include "ThePEG/Persistency/PersistentIStream.h"
using namespace Herwig;
void LHWWHVertex::persistentOutput(PersistentOStream & os) const {
os << ounit(_coup,GeV);
}
void LHWWHVertex::persistentInput(PersistentIStream & is, int) {
is >> iunit(_coup,GeV);
}
// Static variable needed for the type description system in ThePEG.
DescribeClass<LHWWHVertex,VVSVertex>
describeHerwigLHWWHVertex("Herwig::LHWWHVertex", "HwLHModel.so");
void LHWWHVertex::Init() {
static ClassDocumentation<LHWWHVertex> documentation
("The LHWWHVertex class implements the coupling of two electroweak"
" gauge bosons to a Higgs boson in the Little Higgs Model including the "
"additional heavy photon, Z and W bosons and the triplet Higgs bosons.");
}
LHWWHVertex::LHWWHVertex()
: _couplast(0.), _q2last(0.*GeV2) {
// order in the couplings
orderInGem(1);
orderInGs(0);
}
void LHWWHVertex::doinit() {
// W_L W_L H
addToList( 24, -24, 25);
// Z_L Z_L H
addToList( 23, 23, 25);
// W_L W_H H
addToList( 24, -34, 25);
addToList( 34, -24, 25);
// Z_L A_H H
addToList( 23, 32, 25);
// W_H W_H H
addToList( 34, -34, 25);
// Z_H Z_H H
addToList( 33, 33, 25);
// A_H A_H H
addToList( 32, 32, 25);
// Z_H Z_L H
addToList( 23, 33, 25);
// Z_H A_H H
addToList( 33, 32, 25);
// W_L W_L Phi0
addToList( 24, -24, 35);
// W_L W_H Phi0
addToList( 24, -34, 35);
addToList( 34, -24, 35);
// Z_L Z_L Phi0
addToList( 23, 23, 35);
// Z_L Z_H Phi0
addToList( 23, 33, 35);
// W_H W_H Phi0
addToList( 34, -34, 35);
// Z_H Z_H Phi0
addToList( 33, 33, 35);
// A_H Z_H Phi0
addToList( 32, 33, 35);
// A_H Z_L Phi0
addToList( 32, 23, 35);
// A_H A_H Phi0
addToList( 32, 32, 35);
// W_L Z_L Phi-
addToList( 24, 23, -37);
addToList( -24, 23, 37);
// W_L A_H Phi-
addToList( 24, 32, -37);
addToList( -24, 32, 37);
// W_L Z_H Phi-
addToList( 24, 33, -37);
addToList( -24, 33, 37);
// W_H Z_L Phi-
addToList( 34, 23, -37);
addToList( -34, 23, 37);
// W_H A_H Phi-
addToList( 34, 32, -37);
addToList( -34, 32, 37);
// W_H Z_H Phi-
addToList( 34, 33, -37);
addToList( -34, 33, 37);
// W_L W_L Phi--
addToList( 24, 24, -38);
addToList( -24, -24, 38);
// W_H W_H Phi--
addToList( 34, 34, -38);
addToList( -34, -34, 38);
// W_L W_H Phi--
addToList( 24, 34, -38);
addToList( -24, -34, 38);
// model
cLHModelPtr model =
dynamic_ptr_cast<cLHModelPtr>(generator()->standardModel());
if(!model) throw InitException() << "Must be using the LHModel "
<< " in LHWWHVertex::doinit()"
<< Exception::runerror;
// base class
VVSVertex::doinit();
// calculate the couplings for the different combinations of particles
double sw(sqrt(sin2ThetaW())),cw(sqrt(1.-sin2ThetaW()));
Energy fact = getParticleData(ParticleID::Wplus)->mass()/sw;
double vf(sqr(model->vev()/model->f()));
double vr(model->vevPrime()/model->vev());
double r2(sqrt(2.));
double s (model->sinTheta() ),c (model->cosTheta() );
double sp(model->sinThetaPrime()),cp(model->cosThetaPrime());
double sPlus(model->sinTheta0());
double s0(model->sinTheta0());
_coup.resize(27);
// couplings to SM higgs
_coup[ 0] = fact *(1.-vf/3.+0.5*vf* sqr(sqr(c)-sqr(s))
-0.5*sqr(s0)-2.*r2*s0*vr);
_coup[ 1] = fact/sqr(cw)*(1.-vf/3.-0.5*vf*(sqr(sqr(c)-sqr(s))+5.*sqr(sqr(cp)-sqr(sp)))
-0.5*sqr(s0)+4.*r2*s0*vr);
_coup[ 2] =-fact;
_coup[ 3] =-fact;
_coup[ 4] =-fact*sqr(sw/cw);
_coup[ 5] =-fact* 0.5*(sqr(c)-sqr(s))/s/c;
_coup[ 6] =-fact/cw*0.5*(sqr(c)-sqr(s))/s/c;
_coup[ 7] =-fact/sqr(cw)*sw*0.5*(sqr(cp)-sqr(sp))/sp/cp;
_coup[ 8] =-fact/cw*sw*0.5/s/c/sp/cp*(sqr(c*sp)+sqr(s*cp));
_coup[ 9] =-fact*(s0-2.*r2*vr);
_coup[10] = fact*(s0-2.*r2*vr);
_coup[11] = fact*(s0-2.*r2*vr)*0.5*(sqr(c)-sqr(s))/s/c;
_coup[12] =-fact/sqr(cw)*(s0-4.*r2*vr);
_coup[13] = fact*(s0+sqr(sqr(c)-sqr(s))/sqr(s*c)*r2*vr);
_coup[14] = fact/cw*0.5*(sqr(c)-sqr(s))/s/c*(s0-4.*r2*vr);
_coup[15] = fact*sw/sqr(cw)*0.5*(sqr(cp)-sqr(sp))/sp/cp*(s0-4.*r2*vr);
_coup[16] = fact*sw/cw*0.5/s/c/sp/cp*(s0*(sqr(c*sp)+sqr(s*cp))
+2.*r2*(sqr(c)-sqr(s))*(sqr(cp)-sqr(sp))*vr);
_coup[17] = fact*sqr(sw/cw)*(s0+r2*vr*sqr(sqr(cp)-sqr(sp))/sqr(sp*cp));
_coup[18] =-2.*fact/cw*vr;
_coup[19] = fact/cw*(sqr(c)-sqr(s))/s/c*vr;
_coup[20] =-fact*sw/cw*0.5*(sqr(cp)-sqr(sp))/sp/cp*(sPlus-4.*vr);
_coup[21] =-fact*sw/cw*(sqr(c*cp)+sqr(s*sp))/s/c/sp/cp*vr;
_coup[22] = fact*(sqr(c)-sqr(s))/s/c*vr;
_coup[23] =-fact*(pow(c,4)+pow(s,4))/sqr(s*c)*vr;
_coup[24] = fact*4.*vr;
_coup[25] = fact*2.*(pow(c,4)+pow(s,4))/sqr(s*c)*vr;
_coup[26] =-fact*2.*vr*(sqr(c)-sqr(s))/s/c;
}
void LHWWHVertex::setCoupling(Energy2 q2,tcPDPtr a,tcPDPtr b, tcPDPtr c) {
// first the overall normalisation
if(q2!=_q2last) {
_couplast = electroMagneticCoupling(q2);
_q2last=q2;
}
int ih = abs(c->id());
- int ibos[2]={abs(a->id()),abs(b->id())};
+ long int ibos[2]={abs(a->id()),abs(b->id())};
if(ih==25) {
if ( ibos[0]==24&&ibos[1]==24 ) norm(UnitRemoval::InvE *_couplast*_coup[0]);
else if( ibos[0]==23&&ibos[1]==23 ) norm(UnitRemoval::InvE *_couplast*_coup[1]);
else if( ibos[0]==34&&ibos[1]==34 ) norm(UnitRemoval::InvE *_couplast*_coup[2]);
else if( ibos[0]==33&&ibos[1]==33 ) norm(UnitRemoval::InvE *_couplast*_coup[3]);
else if( ibos[0]==32&&ibos[1]==32 ) norm(UnitRemoval::InvE *_couplast*_coup[4]);
else if((ibos[0]==24&&ibos[1]==34) ||
(ibos[0]==34&&ibos[1]==24) ) norm(UnitRemoval::InvE *_couplast*_coup[5]);
else if((ibos[0]==23&&ibos[1]==33) ||
(ibos[0]==33&&ibos[1]==23) ) norm(UnitRemoval::InvE *_couplast*_coup[6]);
else if((ibos[0]==23&&ibos[1]==32) ||
(ibos[0]==32&&ibos[1]==23) ) norm(UnitRemoval::InvE *_couplast*_coup[7]);
else if((ibos[0]==33&&ibos[1]==32) ||
(ibos[0]==32&&ibos[1]==33) ) norm(UnitRemoval::InvE *_couplast*_coup[8]);
else assert(false);
}
else if(ih==35) {
if ( ibos[0]==24&&ibos[1]==24 ) norm(UnitRemoval::InvE *_couplast*_coup[ 9]);
else if( ibos[0]==34&&ibos[1]==34 ) norm(UnitRemoval::InvE *_couplast*_coup[10]);
else if((ibos[0]==24&&ibos[1]==34) ||
(ibos[0]==34&&ibos[1]==24) ) norm(UnitRemoval::InvE *_couplast*_coup[11]);
else if( ibos[0]==23&&ibos[1]==23 ) norm(UnitRemoval::InvE *_couplast*_coup[12]);
else if( ibos[0]==33&&ibos[1]==33 ) norm(UnitRemoval::InvE *_couplast*_coup[13]);
else if((ibos[0]==23&&ibos[1]==33) ||
(ibos[0]==33&&ibos[1]==23) ) norm(UnitRemoval::InvE *_couplast*_coup[14]);
else if((ibos[0]==23&&ibos[1]==32) ||
(ibos[0]==32&&ibos[1]==23) ) norm(UnitRemoval::InvE *_couplast*_coup[15]);
else if((ibos[0]==33&&ibos[1]==32) ||
(ibos[0]==32&&ibos[1]==33) ) norm(UnitRemoval::InvE *_couplast*_coup[16]);
else if((ibos[0]==32&&ibos[1]==32) ) norm(UnitRemoval::InvE *_couplast*_coup[17]);
else assert(false);
}
else if(ih==37) {
if ((ibos[0]==24&&ibos[1]==23) ||
(ibos[0]==23&&ibos[1]==24) ) norm(UnitRemoval::InvE *_couplast*_coup[18]);
else if((ibos[0]==34&&ibos[1]==23) ||
(ibos[0]==23&&ibos[1]==34) ) norm(UnitRemoval::InvE *_couplast*_coup[19]);
else if((ibos[0]==24&&ibos[1]==32) ||
(ibos[0]==32&&ibos[1]==24) ) norm(UnitRemoval::InvE *_couplast*_coup[20]);
else if((ibos[0]==34&&ibos[1]==32) ||
(ibos[0]==32&&ibos[1]==34) ) norm(UnitRemoval::InvE *_couplast*_coup[21]);
else if((ibos[0]==24&&ibos[1]==33) ||
(ibos[0]==33&&ibos[1]==24) ) norm(UnitRemoval::InvE *_couplast*_coup[22]);
else if((ibos[0]==34&&ibos[1]==33) ||
(ibos[0]==33&&ibos[1]==34) ) norm(UnitRemoval::InvE *_couplast*_coup[23]);
else assert(false);
}
else if(ih==38) {
if ((ibos[0]==24&&ibos[1]==24) ) norm(UnitRemoval::InvE *_couplast*_coup[24]);
else if((ibos[0]==34&&ibos[1]==34) ) norm(UnitRemoval::InvE *_couplast*_coup[24]);
else if((ibos[0]==34&&ibos[1]==24) ||
(ibos[0]==24&&ibos[1]==34) ) norm(UnitRemoval::InvE *_couplast*_coup[24]);
else assert(false);
}
else assert(false);
}
diff --git a/Models/LH/LHWWWWVertex.cc b/Models/LH/LHWWWWVertex.cc
--- a/Models/LH/LHWWWWVertex.cc
+++ b/Models/LH/LHWWWWVertex.cc
@@ -1,308 +1,308 @@
// -*- C++ -*-
//
// This is the implementation of the non-inlined, non-templated member
// functions of the LHWWWWVertex class.
//
#include "LHWWWWVertex.h"
#include "LHModel.h"
#include "ThePEG/Interface/ClassDocumentation.h"
#include "ThePEG/Utilities/DescribeClass.h"
#include "ThePEG/Persistency/PersistentOStream.h"
#include "ThePEG/Persistency/PersistentIStream.h"
using namespace Herwig;
LHWWWWVertex::LHWWWWVertex() :
_couplast(0.0), _q2last(sqr(Constants::MaxEnergy)), _coup(36,0.) {
// order in the couplings
orderInGem(2);
orderInGs(0);
}
IBPtr LHWWWWVertex::clone() const {
return new_ptr(*this);
}
IBPtr LHWWWWVertex::fullclone() const {
return new_ptr(*this);
}
void LHWWWWVertex::persistentOutput(PersistentOStream & os) const {
os << _coup;
}
void LHWWWWVertex::persistentInput(PersistentIStream & is, int) {
is >> _coup;
}
// Static variable needed for the type description system in ThePEG.
DescribeClass<LHWWWWVertex,VVVVVertex>
describeHerwigLHWWWWVertex("Herwig::LHWWWWVertex", "HwLHModel.so");
void LHWWWWVertex::Init() {
static ClassDocumentation<LHWWWWVertex> documentation
("The LHWWWWVertex class implements the quartic electroweak"
" boson couplings in the Little Higgs Model");
}
void LHWWWWVertex::doinit() {
// all charge W's
addToList(24, -24, 24, -24);
addToList(34, -34, 34, -34);
addToList(24, -24, 34, -34);
addToList(24, -24, 24, -34);
addToList(24, -24, 34, -24);
addToList(34, -24, 34, -24);
addToList(24, -34, 24, -34);
addToList(34, -34, 24, -34);
addToList(34, -34, 34, -24);
// two neutral and 2 W_L
addToList(22, 24, 22, -24);
addToList(23, 24, 23, -24);
addToList(22, 24, 23, -24);
addToList(22, 24, 32, -24);
addToList(22, 24, 33, -24);
addToList(23, 24, 33, -24);
addToList(23, 24, 32, -24);
addToList(33, 24, 33, -24);
addToList(33, 24, 32, -24);
// two neutral and 2 W_H
addToList(22, 34, 22, -34);
addToList(23, 34, 23, -34);
addToList(22, 34, 23, -34);
addToList(22, 34, 32, -34);
addToList(22, 34, 33, -34);
addToList(23, 34, 33, -34);
addToList(23, 34, 32, -34);
addToList(33, 34, 33, -34);
addToList(33, 34, 32, -34);
// two neutral W_L W_H
addToList(23, 24, 23, -34);
addToList(23, 24, 22, -34);
addToList(22, 24, 32, -34);
addToList(23, 24, 32, -34);
addToList(33, 24, 33, -34);
addToList(33, 24, 32, -34);
addToList(22, 24, 33, -34);
addToList(23, 24, 33, -34);
addToList(23, 34, 23, -24);
addToList(23, 34, 22, -24);
addToList(22, 34, 32, -24);
addToList(23, 34, 32, -24);
addToList(33, 34, 33, -24);
addToList(33, 34, 32, -24);
addToList(22, 34, 33, -24);
addToList(23, 34, 33, -24);
// model
cLHModelPtr model =
dynamic_ptr_cast<cLHModelPtr>(generator()->standardModel());
if(!model)
throw InitException() << "Must be using the LHModel "
<< " in LHWWWWVertex::doinit()"
<< Exception::runerror;
// correction factors for the different interactions
double sw2(sin2ThetaW());
double sw(sqrt(sw2)),cw(sqrt(1.-sw2));
double s (model->sinTheta() ),c (model->cosTheta() );
double sp(model->sinThetaPrime()),cp(model->cosThetaPrime());
double vf(sqr(model->vev()/model->f()));
double xB(-2.5/sw*sp*cp*(sqr(cp)-sqr(sp)));
double xW(-0.5/cw*s*c*(sqr(c)-sqr(s)));
double xH(2.5/sw/cw*s*c*sp*cp*(sqr(c*sp)+sqr(s*cp))/
(5.*sqr(sp*cp/sw)-sqr(s*c/cw)));
// 4 W's
_coup[ 0] =-1./sw2;
_coup[ 1] =-1./sw2;
_coup[ 2] = 0.5/sw2*(sqr(c)-sqr(s))/c/s;
_coup[ 3] =-0.25/sw2*vf*s*c*(sqr(c)-sqr(s));
_coup[ 4] =-0.25/sw2;
_coup[ 5] =-1./sw2*(pow(c,6)+pow(s,c))/sqr(s*c);
// 2 W_L
_coup[ 6] = 1.;
_coup[ 7] = sqr(cw/sw);
_coup[ 8] = cw/sw;
_coup[ 9] =-cw/sw*xB*vf;
_coup[10] =-cw/sw*xW*vf+0.5/sw*s*c*(sqr(c)-sqr(s))*vf;
_coup[11] =-(sqr(cw)-sw2)/sw2*xW*vf;
_coup[12] =-sqr(cw/sw)*xB*vf;
_coup[13] = 0.;
_coup[14] = 1./sw2;
_coup[15] = xH*vf/sw2;
_coup[16] = 1.;
_coup[17] = sqr(cw/sw);
_coup[18] = cw/sw;
_coup[19] =-cw/sw*xB*vf-xH/sw*vf*(sqr(c)-sqr(s))/s/c;
_coup[20] =-1./sw*(sqr(c)-sqr(s))/s/c;
_coup[21] =-cw/sw2*(sqr(c)-sqr(s))/s/c;
_coup[22] =-sqr(cw/sw)*xB*vf-cw/sw2*xH*vf*(sqr(c)-sqr(s))/c/s;
_coup[23] = 0.;
_coup[24] = (pow(c,6)+pow(s,6))/sqr(s*c)/sw2;
_coup[25] = xH/sw2*vf*(pow(c,6)+pow(s,6))/sqr(s*c)
+cw/sw2*xB*vf*(sqr(c)-sqr(s))/s/c;
_coup[26] = 0.;
_coup[27] = 2.*cw/sw2*xW*vf;
_coup[28] = 0.;
_coup[29] = xH*vf/sw;
_coup[30] = xH*vf*cw/sw2;
_coup[31] = xW*vf/sw;
_coup[32] =-(sqr(c)-sqr(s))/s/c/sw2;
_coup[33] =-xH*vf*(sqr(c)-sqr(s))/s/c-cw/sw2*xB*vf;
_coup[34] = 1./sw;
_coup[35] = cw/sw2;
}
void LHWWWWVertex::setCoupling(Energy2 q2,tcPDPtr a,tcPDPtr b,
tcPDPtr c,tcPDPtr d) {
// id's of the particles
- int id[4]={a->id(),b->id(),c->id(),d->id()};
+ long int id[4]={a->id(),b->id(),c->id(),d->id()};
// order the particles
int ngamma(0),nz(0);
int iorder[4];
for(int ix=0;ix<4;++ix) {
if (id[ix]==22||id[ix]==32) ++ngamma;
else if (id[ix]==23||id[ix]==33) ++nz;
}
// if photons or Z's
if(ngamma!=0 || nz!=0) {
int iy=0;
// put the photons first
for(int ix=0;iy<ngamma&&ix<4;++ix) {
if(id[ix]==22||id[ix]==32) {
iorder[iy]=ix;
++iy;
}
}
// then the Z bosons
for(int ix=0;iy<ngamma+nz&&ix<4;++ix) {
if(id[ix]==23||id[ix]==33) {
iorder[iy]=ix;
++iy;
}
}
// then the W+
for(int ix=0;iy<3&&ix<4;++ix) {
if(id[ix]==24||id[ix]==34) {
iorder[iy]=ix;
++iy;
}
}
assert(iy==3);
// finally the W-
for(int ix=0;iy<4&&ix<4;++ix) {
if(id[ix]==-24||id[ix]==-34) {
iorder[iy]=ix;
++iy;
}
}
assert(iy==4);
}
else {
int iy=0;
// first the W+
for(int ix=0;iy<3&&ix<4;++ix) {
if(id[ix]==24||id[ix]==34) {
iorder[iy]=ix;
++iy;
}
}
assert(iy==2);
// finally the W-
for(int ix=0;iy<4&&ix<4;++ix) {
if(id[ix]==-24||id[ix]==-34) {
iorder[iy]=ix;
++iy;
}
}
assert(iy==4);
}
setOrder(iorder[0],iorder[1],iorder[2],iorder[3]);
setType(2);
// first the overall normalisation
if(q2!=_q2last||_couplast==0.) {
_couplast = sqr(electroMagneticCoupling(q2));
_q2last=q2;
}
// ids of the particles
for(unsigned int ix=0;ix<4;++ix) {
if (iorder[ix]==0) id[ix] = abs(a->id());
else if(iorder[ix]==1) id[ix] = abs(b->id());
else if(iorder[ix]==2) id[ix] = abs(c->id());
else if(iorder[ix]==3) id[ix] = abs(d->id());
}
if( ngamma == 0 && nz == 0 ) {
if(id[0]==id[1]) {
if(id[2]==id[3]) {
if(id[0]==24&&id[2]==24)
norm(_couplast*_coup[0]);
else if(id[0]==34&&id[2]==34)
norm(_couplast*_coup[5]);
else
norm(_couplast*_coup[1]);
}
else {
if(id[0]==24)
norm(_couplast*_coup[3]);
else
norm(_couplast*_coup[2]);
}
}
else {
if(id[2]==id[3]) {
if(id[2]==24)
norm(_couplast*_coup[3]);
else
norm(_couplast*_coup[2]);
}
else
norm(_couplast*_coup[4]);
}
}
else {
if(id[2]==id[3]) {
unsigned int ioff = id[2]==24 ? 0 : 10;
if(id[0]==22&&id[1]==22)
norm(_couplast*_coup[6+ioff]);
else if(id[0]==23&&id[1]==23)
norm(_couplast*_coup[7+ioff]);
else if((id[0]==22&&id[1]==23) || (id[0]==23&&id[1]==22))
norm(_couplast*_coup[8+ioff]);
else if((id[0]==22&&id[1]==32) || (id[0]==32&&id[1]==22))
norm(_couplast*_coup[9+ioff]);
else if((id[0]==22&&id[1]==33) || (id[0]==33&&id[1]==22))
norm(_couplast*_coup[10+ioff]);
else if((id[0]==23&&id[1]==33) || (id[0]==33&&id[1]==22))
norm(_couplast*_coup[11+ioff]);
else if((id[0]==23&&id[1]==32) || (id[0]==32&&id[1]==23))
norm(_couplast*_coup[12+ioff]);
else if( id[0]==33&&id[1]==33)
norm(_couplast*_coup[14+ioff]);
else if((id[0]==32&&id[1]==33) || (id[0]==33&&id[1]==32))
norm(_couplast*_coup[15+ioff]);
else
assert(false);
}
else {
if(id[0]==23&&id[1]==23)
norm(_couplast*_coup[27]);
else if((id[0]==22&&id[1]==23) || (id[0]==23&&id[1]==22))
norm(_couplast*_coup[28]);
else if((id[0]==22&&id[1]==32) || (id[0]==32&&id[1]==22))
norm(_couplast*_coup[29]);
else if((id[0]==23&&id[1]==32) || (id[0]==32&&id[1]==23))
norm(_couplast*_coup[30]);
else if( id[0]==33&&id[1]==33)
norm(_couplast*_coup[31]);
else if((id[0]==32&&id[1]==33) || (id[0]==33&&id[1]==32))
norm(_couplast*_coup[32]);
else if((id[0]==22&&id[1]==33) || (id[0]==33&&id[1]==22))
norm(_couplast*_coup[33]);
else if((id[0]==23&&id[1]==33) || (id[0]==33&&id[1]==22))
norm(_couplast*_coup[34]);
else
assert(false);
}
}
}
diff --git a/m4/herwig.m4 b/m4/herwig.m4
--- a/m4/herwig.m4
+++ b/m4/herwig.m4
@@ -1,371 +1,371 @@
# check for gcc bug http://gcc.gnu.org/bugzilla/show_bug.cgi?id=34130
AC_DEFUN([HERWIG_CHECK_ABS_BUG],
[
AC_REQUIRE([HERWIG_COMPILERFLAGS])
if test "$GCC" = "yes"; then
AC_MSG_CHECKING([for gcc abs bug])
AC_RUN_IFELSE([
AC_LANG_PROGRAM(
[[ int foo (int i) { return -2 * __builtin_abs(i - 2); } ]],
[[ if ( foo(1) != -2 || foo(3) != -2 ) return 1; ]]
)],
[ AC_MSG_RESULT([not found. Compiler is ok.]) ],
[
AC_MSG_RESULT([found. Builtin abs() is buggy.])
AC_MSG_CHECKING([if -fno-builtin-abs works])
oldcxxflags=$CXXFLAGS
CXXFLAGS="$CXXFLAGS -fno-builtin-abs"
AC_RUN_IFELSE([
AC_LANG_PROGRAM(
[[
#include <cstdlib>
int foo (int i) { return -2 * std::abs(i - 2); }
]],
[[
if (foo(1) != -2 || foo(3) != -2) return 1;
]]
)],
[
AC_MSG_RESULT([yes. Setting -fno-builtin-abs.])
AM_CXXFLAGS="$AM_CXXFLAGS -fno-builtin-abs"
AM_CFLAGS="$AM_CFLAGS -fno-builtin-abs"
],
[
AC_MSG_RESULT([no. Setting -fno-builtin.])
AC_MSG_WARN([
*****************************************************************************
For this version of gcc, -fno-builtin-abs alone did not work to avoid the
gcc abs() bug. Instead, all gcc builtin functions are now disabled.
Update gcc if possible.
*****************************************************************************])
AM_CXXFLAGS="$AM_CXXFLAGS -fno-builtin"
AM_CFLAGS="$AM_CFLAGS -fno-builtin"
]
)
CXXFLAGS=$oldcxxflags
]
)
fi
])
dnl ##### THEPEG #####
AC_DEFUN([HERWIG_CHECK_THEPEG],
[
defaultlocation="${prefix}"
test "x$defaultlocation" = xNONE && defaultlocation="${ac_default_prefix}"
AC_MSG_CHECKING([for libThePEG in])
AC_ARG_WITH(thepeg,
AC_HELP_STRING([--with-thepeg=DIR],[location of ThePEG installation]),
[],
[with_thepeg="${defaultlocation}"])
AC_MSG_RESULT([$with_thepeg])
if test "x$with_thepeg" = "xno"; then
AC_MSG_ERROR([Cannot build Herwig++ without ThePEG. Please set --with-thepeg.])
fi
THEPEGLDFLAGS="-L${with_thepeg}/lib/ThePEG"
if test "${host_cpu}" == "x86_64" -a -e ${with_thepeg}/lib64/ThePEG/libThePEG.so ; then
THEPEGLDFLAGS="-L${with_thepeg}/lib64/ThePEG"
fi
THEPEGPATH="${with_thepeg}"
oldldflags="$LDFLAGS"
oldlibs="$LIBS"
LDFLAGS="$LDFLAGS $THEPEGLDFLAGS"
AC_CHECK_LIB([ThePEG],[debugThePEG],[],
[AC_MSG_ERROR([No ThePEG libraries in $THEPEGLDFLAGS. Please set --with-thepeg.])])
AC_SUBST([THEPEGLIB],[-lThePEG])
AC_SUBST(THEPEGLDFLAGS)
AC_SUBST(THEPEGPATH)
LIBS="$oldlibs"
LDFLAGS="$oldldflags"
AC_MSG_CHECKING([for ThePEG headers in])
AC_ARG_WITH([thepeg-headers],
AC_HELP_STRING([--with-thepeg-headers=DIR],[location of ThePEG include directory]),
[],
[with_thepeg_headers="${with_thepeg}/include"])
AC_MSG_RESULT([$with_thepeg_headers])
if test "x$with_thepeg_headers" = "xno"; then
AC_MSG_ERROR([Cannot build Herwig++ without ThePEG headers. Please set --with-thepeg-headers.])
fi
THEPEGINCLUDE="-I$with_thepeg_headers"
oldcppflags="$CPPFLAGS"
CPPFLAGS="$CPPFLAGS $THEPEGINCLUDE"
AC_CHECK_HEADER([ThePEG/Config/ThePEG.h],[],
[AC_MSG_ERROR([No ThePEG headers in $with_thepeg_headers. Please set --with-thepeg-headers.])])
CPPFLAGS="$oldcppflags"
AC_SUBST(THEPEGINCLUDE)
AC_MSG_CHECKING([for HepMCAnalysis.so in ThePEG])
-if test -x "$THEPEGPATH/lib/ThePEG/HepMCAnalysis.so" ; then
+if test -e "$THEPEGPATH/lib/ThePEG/HepMCAnalysis.so" ; then
CREATE_HEPMC="create"
AC_MSG_RESULT([found])
else
CREATE_HEPMC="# create"
AC_MSG_RESULT([not found])
fi
AC_SUBST([CREATE_HEPMC])
])
dnl ##### LOOPTOOLS #####
AC_DEFUN([HERWIG_LOOPTOOLS],
[
AC_REQUIRE([AC_PROG_FC])
AC_REQUIRE([AC_FC_LIBRARY_LDFLAGS])
AC_REQUIRE([AC_PROG_CC])
AC_REQUIRE([HERWIG_COMPILERFLAGS])
AC_MSG_CHECKING([if Looptools build works])
enable_looptools=yes
if test "x$GCC" = "xyes"; then
case "${host}" in
x86_64-*|*-darwin1*)
AM_FCFLAGS="$AM_FCFLAGS -fdefault-integer-8"
;;
esac
AC_LANG_PUSH([Fortran])
oldFCFLAGS="$FCFLAGS"
FCFLAGS="$AM_FCFLAGS"
AC_COMPILE_IFELSE(
AC_LANG_PROGRAM([],[ print *[,]"Hello"]),
[],
[AC_MSG_RESULT([no])
AC_MSG_ERROR([needs gfortran on 64bit machines])]
)
FCFLAGS="$oldFCFLAGS"
AC_LANG_POP([Fortran])
fi
AC_MSG_RESULT([$enable_looptools])
AC_SUBST([F77],[$FC])
AC_SUBST([FFLAGS],[$FCFLAGS])
AC_SUBST([AM_FFLAGS],[$AM_FCFLAGS])
AC_SUBST([FLIBS],[$FCLIBS])
])
dnl ##### PDF PATH #####
AC_DEFUN([HERWIG_PDF_PATH],
[
AC_MSG_CHECKING([which Herwig++ PDF data to use])
AC_ARG_WITH(pdf,
AC_HELP_STRING([--with-pdf=DIR],[installation path of Herwig++PDF data tarball]),
[],
[with_pdf=${prefix}]
)
HERWIG_PDF_PREFIX=${with_pdf}/share/Herwig++PDF
if test -f "${HERWIG_PDF_PREFIX}/mrst/2008/mrstMCal.dat"; then
AC_MSG_RESULT([$with_pdf])
localPDFneeded=false
else
AC_MSG_RESULT([Using built-in PDF data set. For other data sets, set --with-pdf.])
HERWIG_PDF_PREFIX=PDF
localPDFneeded=true
fi
HERWIG_PDF_DEFAULT=${HERWIG_PDF_PREFIX}/mrst/2008/mrstMCal.dat
HERWIG_PDF_NLO=${HERWIG_PDF_PREFIX}/mrst/2002/mrst2002nlo.dat
HERWIG_PDF_POMERON=${HERWIG_PDF_PREFIX}/diffraction/
AM_CONDITIONAL(WANT_LOCAL_PDF,[test "x$localPDFneeded" = "xtrue"])
AC_SUBST(HERWIG_PDF_DEFAULT)
AC_SUBST(HERWIG_PDF_NLO)
AC_SUBST(HERWIG_PDF_POMERON)
])
dnl ###### GSL ######
AC_DEFUN([HERWIG_CHECK_GSL],
[
AC_MSG_CHECKING([for gsl location])
GSLINCLUDE=""
GSLLIBS=""
AC_ARG_WITH(gsl,
AC_HELP_STRING([--with-gsl=DIR],[location of gsl installation @<:@default=system libs@:>@]),
[],
[with_gsl=system])
if test "x$with_gsl" = "xno"; then
AC_MSG_ERROR([libgsl is required. Please install the GNU scientific library and header files.])
fi
if test "x$with_gsl" = "xsystem"; then
AC_MSG_RESULT([in system libraries])
oldlibs="$LIBS"
AC_CHECK_LIB(m,main)
AC_CHECK_LIB(gslcblas,main)
AC_CHECK_LIB(gsl,main,[],
[
AC_MSG_ERROR([Cannot find libgsl. Please install the GNU scientific library and header files or use --with-gsl=.])
]
)
GSLLIBS="$LIBS"
LIBS=$oldlibs
else
if test "`uname -m`" = "x86_64" -a -e "$with_gsl/lib64/libgsl.a" -a -d "$with_gsl/include/gsl"; then
AC_MSG_RESULT([found in $with_gsl])
GSLLIBS="-L$with_gsl/lib64 -R$with_gsl/lib64 -lgslcblas -lgsl"
GSLINCLUDE="-I$with_gsl/include"
elif test -e "$with_gsl/lib/libgsl.a" -a -d "$with_gsl/include/gsl"; then
AC_MSG_RESULT([found in $with_gsl])
GSLLIBS="-L$with_gsl/lib -R$with_gsl/lib -lgslcblas -lgsl"
GSLINCLUDE="-I$with_gsl/include"
else
AC_MSG_RESULT([not found])
AC_MSG_ERROR([Can't find $with_gsl/lib/libgsl.a or the headers in $with_gsl/include])
fi
fi
AC_SUBST(GSLINCLUDE)
AC_SUBST(GSLLIBS)
])
AC_DEFUN([HERWIG_VERSIONSTRING],
[
if test -d $srcdir/.svn; then
AC_CHECK_PROG(have_svnversion,[svnversion],[yes],[no])
fi
AM_CONDITIONAL(USE_SVNVERSION,[test "x$have_svnversion" = "xyes"])
])
dnl ##### COMPILERFLAGS #####
AC_DEFUN([HERWIG_COMPILERFLAGS],
[
AC_REQUIRE([HERWIG_CHECK_GSL])
AC_REQUIRE([HERWIG_CHECK_THEPEG])
AC_REQUIRE([BOOST_REQUIRE])
AM_CPPFLAGS="-I\$(top_builddir)/include $THEPEGINCLUDE \$(GSLINCLUDE) \$(BOOST_CPPFLAGS)"
AC_MSG_CHECKING([for debugging mode])
AC_ARG_ENABLE(debug,
AC_HELP_STRING([--enable-debug],[debug mode, use --enable-debug=slow for additional options that slow down the run.]),
[],
[enable_debug=no]
)
AC_MSG_RESULT([$enable_debug])
if test "x$enable_debug" = "xno"; then
AM_CPPFLAGS="$AM_CPPFLAGS -DNDEBUG"
else
debugflags="-g"
fi
dnl -Wfloat-equal -fvisibility-inlines-hidden -Wctor-dtor-privacy -Weffc++
if test -n "$GCC"; then
warnflags="-ansi -pedantic -Wall -Wextra -Wno-overloaded-virtual"
if test "x$enable_debug" = "xslow"; then
debugflags="$debugflags -fno-inline"
AM_CPPFLAGS="$AM_CPPFLAGS -D_GLIBCXX_DEBUG"
fi
fi
dnl do an actual capability check on ld instead of this workaround
case "${host}" in
*-darwin*)
;;
*)
AM_LDFLAGS="-Wl,--enable-new-dtags"
;;
esac
AC_SUBST(AM_CPPFLAGS)
AC_SUBST(AM_CFLAGS, ["$warnflags $debugflags"])
AC_SUBST(AM_CXXFLAGS,["$warnflags $debugflags"])
AC_SUBST(AM_FCFLAGS, ["$debugflags"])
AC_SUBST(AM_LDFLAGS)
])
AC_DEFUN([HERWIG_ENABLE_MODELS],
[
AC_MSG_CHECKING([if BSM models should be built])
AC_ARG_ENABLE(models,
AC_HELP_STRING([--disable-models],[Turn off compilation of BSM models.]),
[],
[enable_models=yes]
)
AC_MSG_RESULT([$enable_models])
LOAD_BSM=""
if test "$enable_models" = "yes"; then
LOAD_BSM="read BSMlibs.in"
fi
AC_SUBST(LOAD_BSM)
AM_CONDITIONAL(WANT_BSM,[test "$enable_models" = "yes"])
])
AC_DEFUN([HERWIG_ENABLE_DIPOLE],
[
AC_MSG_CHECKING([if dipole shower should be built])
AC_ARG_ENABLE(dipole,
AC_HELP_STRING([--disable-dipole],[Turn off compilation of dipole shower.]),
[],
[enable_dipole=yes]
)
AC_MSG_RESULT([$enable_dipole])
LOAD_DIPOLE=""
LOAD_DIPOLE_ALPHAS=""
LOAD_MATCHBOX=""
if test "$enable_dipole" = "yes"; then
LOAD_DIPOLE="library HwDipoleShower.so"
LOAD_DIPOLE_ALPHAS="library HwDipoleShowerAlphaS.so"
LOAD_MATCHBOX="library HwMatchbox.so"
fi
AC_SUBST(LOAD_DIPOLE)
AC_SUBST(LOAD_DIPOLE_ALPHAS)
AC_SUBST(LOAD_MATCHBOX)
AM_CONDITIONAL(WANT_DIPOLE,[test "$enable_dipole" = "yes"])
])
AC_DEFUN([HERWIG_OVERVIEW],
[
FCSTRING=`$FC --version | head -1`
CXXSTRING=`$CXX --version | head -1`
CCSTRING=`$CC --version | head -1`
cat << _HW_EOF_ > config.herwig
*****************************************************
*** $PACKAGE_STRING configuration summary
*** Please include this information in bug reports!
***--------------------------------------------------
*** Prefix: $prefix
***
*** BSM models: $enable_models
*** Dipole shower: $enable_dipole
***
*** Herwig debug mode: $enable_debug
***
*** ThePEG: $with_thepeg
*** ThePEG headers: $with_thepeg_headers
***
*** GSL: $with_gsl
*** boost: ${BOOST_CPPFLAGS:-system}
*** Fastjet: ${fjconfig}
***
*** Host: $host
*** CC: $CCSTRING
*** CXX: $CXXSTRING
*** FC: $FCSTRING
*****************************************************
_HW_EOF_
])
File Metadata
Details
Attached
Mime Type
text/x-diff
Expires
Sun, Feb 23, 3:08 PM (48 m, 11 s)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
4486856
Default Alt Text
(27 KB)
Attached To
rHERWIGHG herwighg
Event Timeline
Log In to Comment