diff --git a/.hgtags b/.hgtags --- a/.hgtags +++ b/.hgtags @@ -1,28 +1,29 @@ 168ae2110e964d62fbc1331a1c2e095952a67748 release-2-5-2 3abb4fa42e20e332796c2572334c2d77204cd0e0 release-2-4-2 4796ca080aafd5daa3b7349b015cb1df944428a2 release-2-5-0 76da042f056eb153981b4d005d5474ffb90a5e88 release-2-4-1 81a684a558413c69df314365eabf09893ffd43d8 release-2-6-0 bd75cd00d99f4bdbaed992daf98f0a73c0f91e9b release-2-4-0 ff6ecc8d49ce10299303b050394bd5cb5837f1c3 release-2-5-1 d0389f5453b2c210923e1adc7b872b18269de668 release-2-6-1 f8998033021185942533b824607285feb3fbd2dc release-2-6-1a cead23e428b9aacaf2d709e722624e54f844498b release-2-6-1b 191db4655439045f912cb21bd905e729d59ec7bc release-2-6-2 edb538156e9c3d64bb842934b4cebf0126aeb9ea release-2-6-3 eb4a104591859ecac18746b1ad54d6aa0c2a5d1a release-2-7-0 568971ac5b3c1d044c9259f2280a8304fc5a62e9 trunk-before-QED 6e3edb6cfeb4ee48687eb4eb3d016026fc59d602 trunk-after-QED 633abb80b571aa23088957df60e9b0000bbb8a22 release-2-7-1 1bdde095d2346c15ee548e5406a96f0fc6d6e0f1 beforeHQ a0f9fb821396092bdbeee532bcb0bd624f58335b before_MB_merge 270c1e6b34aa7f758f1d9868c4d3e1ec4bf4e709 herwig-7-0-0 6e0f198c1c2603ecd1a0b6cfe40105cda4bd58c5 herwig-7-0-1 566c1de845a8070559cda45b1bdb40afa18cb2cc herwig-7-0-2 f5c4aa956880f2def763ebd57de7b5bfa55cb1db herwig-7-0-3 65282dedfc2e4bec184e68678dbf4c553c968f38 herwig-7-0-4 541e7790b65ed423c86780bf66ec30e6b99b5a18 herwig-7-1-0 dd35a1c12d57c047169e8c5fb18644972d49c6ac herwig-7-1-1 0d651b079756b63713e32a1341d81e4dfc7eeb7b herwig-7-1-2 4b97934bc41c861c4be04f563ffa68a94a982560 herwig-7-1-3 97aca5398cfa1f3273804f03fa96fa0fa23eca61 herwig-7-1-4 +3d69fbe18c682c98891c5f9204947f2eb7a72686 herwig-7-1-5 diff --git a/Analysis/Makefile.am b/Analysis/Makefile.am --- a/Analysis/Makefile.am +++ b/Analysis/Makefile.am @@ -1,26 +1,26 @@ pkglib_LTLIBRARIES = HwAnalysis.la -HwAnalysis_la_LDFLAGS = $(AM_LDFLAGS) -module -version-info 11:0:0 +HwAnalysis_la_LDFLAGS = $(AM_LDFLAGS) -module -version-info 12:0:0 HwAnalysis_la_SOURCES = \ BasicConsistency.cc BasicConsistency.h \ LEPMultiplicityCount.cc LEPMultiplicityCount.h \ MultiplicityInfo.h \ LEPBMultiplicity.cc\ LEPBMultiplicity.h \ SimpleLHCAnalysis.h SimpleLHCAnalysis.cc\ TTbarAnalysis.h TTbarAnalysis.cc\ LPairAnalysis.h LPairAnalysis.cc\ GammaGammaAnalysis.h GammaGammaAnalysis.cc\ GammaJetAnalysis.h GammaJetAnalysis.cc\ HiggsJetAnalysis.h HiggsJetAnalysis.cc \ ParallelRunAnalysis.h ParallelRunAnalysis.cc \ DrellYanPT.h DrellYanPT.cc pkglib_LTLIBRARIES += HwJetsAnalysis.la -HwJetsAnalysis_la_LDFLAGS = $(AM_LDFLAGS) -module -version-info 4:0:0 +HwJetsAnalysis_la_LDFLAGS = $(AM_LDFLAGS) -module -version-info 5:0:0 HwJetsAnalysis_la_SOURCES = \ LeptonsJetsAnalysis.h LeptonsJetsAnalysis.cc \ JetsPlusAnalysis.h JetsPlusAnalysis.cc \ HJetsAnalysis.h HJetsAnalysis.cc \ ZJetsAnalysis.h ZJetsAnalysis.cc \ TTJetsAnalysis.h TTJetsAnalysis.cc \ CrossSectionAnalysis.h CrossSectionAnalysis.cc diff --git a/Decay/EvtGen/Makefile.am b/Decay/EvtGen/Makefile.am --- a/Decay/EvtGen/Makefile.am +++ b/Decay/EvtGen/Makefile.am @@ -1,12 +1,12 @@ pkglib_LTLIBRARIES = HwEvtGenInterface.la HwEvtGenInterface_la_SOURCES = \ EvtGenInterface.cc EvtGenInterface.h EvtGenInterface.fh \ EvtGenRandom.h \ EvtGenDecayer.cc EvtGenDecayer.h -HwEvtGenInterface_la_LDFLAGS = $(AM_LDFLAGS) -module -version-info 1:0:0 +HwEvtGenInterface_la_LDFLAGS = $(AM_LDFLAGS) -module -version-info 2:0:0 HwEvtGenInterface_la_LIBADD = $(EVTGENLIBS) HwEvtGenInterface_la_CPPFLAGS = $(AM_CPPFLAGS) $(EVTGENINCLUDE) \ -DEVTGEN_PREFIX="\"$(EVTGENPREFIX)\"" \ -DPYTHIA8DATA="\"$(PYTHIA8DATA)\"" diff --git a/Decay/General/VSSDecayer.cc b/Decay/General/VSSDecayer.cc --- a/Decay/General/VSSDecayer.cc +++ b/Decay/General/VSSDecayer.cc @@ -1,418 +1,416 @@ // -*- C++ -*- // // VSSDecayer.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 VSSDecayer class. // #include "VSSDecayer.h" #include "ThePEG/Utilities/DescribeClass.h" #include "ThePEG/Interface/ClassDocumentation.h" #include "ThePEG/Persistency/PersistentOStream.h" #include "ThePEG/Persistency/PersistentIStream.h" #include "ThePEG/PDT/DecayMode.h" #include "Herwig/Utilities/Kinematics.h" #include "ThePEG/Helicity/WaveFunction/ScalarWaveFunction.h" #include "ThePEG/Helicity/WaveFunction/VectorWaveFunction.h" #include "Herwig/Decay/GeneralDecayMatrixElement.h" using namespace Herwig; using namespace ThePEG::Helicity; IBPtr VSSDecayer::clone() const { return new_ptr(*this); } IBPtr VSSDecayer::fullclone() const { return new_ptr(*this); } void VSSDecayer::setDecayInfo(PDPtr incoming, PDPair outgoing, vector vertex, map & inV, const vector > & outV, map ) { decayInfo(incoming,outgoing); for(auto vert : vertex) { vertex_ .push_back(dynamic_ptr_cast(vert)); perturbativeVertex_.push_back(dynamic_ptr_cast (vert)); } vector itemp={ShowerInteraction::QCD,ShowerInteraction::QED}; for(auto & inter : itemp) { incomingVertex_[inter] = dynamic_ptr_cast(inV.at(inter)); outgoingVertex1_[inter] = dynamic_ptr_cast(outV[0].at(inter)); outgoingVertex2_[inter] = dynamic_ptr_cast(outV[1].at(inter)); } } void VSSDecayer::persistentOutput(PersistentOStream & os) const { os << vertex_ << perturbativeVertex_ << incomingVertex_ << outgoingVertex1_ << outgoingVertex2_; } void VSSDecayer::persistentInput(PersistentIStream & is, int) { is >> vertex_ >> perturbativeVertex_ >> incomingVertex_ >> outgoingVertex1_ >> outgoingVertex2_; } // The following static variable is needed for the type // description system in ThePEG. DescribeClass describeHerwigVSSDecayer("Herwig::VSSDecayer", "Herwig.so"); void VSSDecayer::Init() { static ClassDocumentation documentation ("This implements the decay of a vector to 2 scalars"); } double VSSDecayer::me2(const int , const Particle & inpart, const ParticleVector & decay, MEOption meopt) const { if(!ME()) ME(new_ptr(GeneralDecayMatrixElement(PDT::Spin1,PDT::Spin0,PDT::Spin0))); if(meopt==Initialize) { VectorWaveFunction::calculateWaveFunctions(vectors_,rho_, const_ptr_cast(&inpart), incoming,false); // fix rho if no correlations fixRho(rho_); } if(meopt==Terminate) { VectorWaveFunction::constructSpinInfo(vectors_,const_ptr_cast(&inpart), incoming,true,false); for(unsigned int ix=0;ix<2;++ix) ScalarWaveFunction:: constructSpinInfo(decay[ix],outgoing,true); return 0.; } ScalarWaveFunction sca1(decay[0]->momentum(),decay[0]->dataPtr(),outgoing); ScalarWaveFunction sca2(decay[1]->momentum(),decay[1]->dataPtr(),outgoing); Energy2 scale(sqr(inpart.mass())); for(unsigned int ix=0;ix<3;++ix) { (*ME())(ix,0,0) = 0.; for(auto vert : vertex_) (*ME())(ix,0,0) += vert->evaluate(scale,vectors_[ix],sca1,sca2); } double output=(ME()->contract(rho_)).real()/scale*UnitRemoval::E2; // colour and identical particle factors output *= colourFactor(inpart.dataPtr(),decay[0]->dataPtr(), decay[1]->dataPtr()); // return the answer return output; } Energy VSSDecayer::partialWidth(PMPair inpart, PMPair outa, PMPair outb) const { if( inpart.second < outa.second + outb.second ) return ZERO; if(perturbativeVertex_.size()==1 && perturbativeVertex_[0]) { tcPDPtr in = inpart.first->CC() ? tcPDPtr(inpart.first->CC()) : inpart.first; perturbativeVertex_[0]->setCoupling(sqr(inpart.second), in, outa.first, outb.first); - double mu1sq = sqr(outa.second/inpart.second); - double mu2sq = sqr(outb.second/inpart.second); - double me2 = sqr(mu1sq - mu2sq) - 2.*(mu1sq + mu2sq); Energy pcm = Kinematics::pstarTwoBodyDecay(inpart.second,outa.second, outb.second); - Energy output = -norm(perturbativeVertex_[0]->norm())*me2*pcm / + double me2 = 4.*sqr(pcm/inpart.second); + Energy output = norm(perturbativeVertex_[0]->norm())*me2*pcm / (24.*Constants::pi); // colour factor output *= colourFactor(inpart.first,outa.first,outb.first); // return the answer return output; } else { return GeneralTwoBodyDecayer::partialWidth(inpart,outa,outb); } } double VSSDecayer::threeBodyME(const int , const Particle & inpart, const ParticleVector & decay, ShowerInteraction inter, MEOption meopt) { // work out which is the scalar and anti-scalar int ianti(0), iscal(1), iglu(2); int itype[2]; for(unsigned int ix=0;ix<2;++ix) { if(decay[ix]->dataPtr()->CC()) itype[ix] = decay[ix]->id()>0 ? 0:1; else itype[ix] = 2; } if(itype[0]==0 && itype[1]!=0) swap(ianti, iscal); if(itype[0]==2 && itype[1]==1) swap(ianti, iscal); if(itype[0]==0 && itype[1]==0 && abs(decay[0]->dataPtr()->id())>abs(decay[1]->dataPtr()->id())) swap(iscal, ianti); if(itype[0]==1 && itype[1]==1 && abs(decay[0]->dataPtr()->id())dataPtr()->id())) swap(iscal, ianti); if(meopt==Initialize) { // create vector wavefunction for decaying particle VectorWaveFunction::calculateWaveFunctions(vector3_, rho3_, const_ptr_cast(&inpart), incoming, false); } // setup spin information when needed if(meopt==Terminate) { VectorWaveFunction:: constructSpinInfo(vector3_ ,const_ptr_cast(&inpart),outgoing,true,false); ScalarWaveFunction::constructSpinInfo( decay[iscal],outgoing,true); ScalarWaveFunction::constructSpinInfo( decay[ianti],outgoing,true); VectorWaveFunction::constructSpinInfo(gluon_,decay[iglu ],outgoing,true,false); return 0.; } // calculate colour factors and number of colour flows unsigned int nflow; vector cfactors = getColourFactors(inpart, decay, nflow); vector ME(nflow,new_ptr(GeneralDecayMatrixElement(PDT::Spin1, PDT::Spin0, PDT::Spin0, PDT::Spin1))); // create wavefunctions ScalarWaveFunction scal(decay[iscal]->momentum(), decay[iscal]->dataPtr(),outgoing); ScalarWaveFunction anti(decay[ianti]->momentum(), decay[ianti]->dataPtr(),outgoing); VectorWaveFunction::calculateWaveFunctions(gluon_,decay[iglu ],outgoing,true); // gauge test #ifdef GAUGE_CHECK gluon_.clear(); for(unsigned int ix=0;ix<3;++ix) { if(ix==1) gluon_.push_back(VectorWaveFunction()); else { gluon_.push_back(VectorWaveFunction(decay[iglu ]->momentum(), decay[iglu ]->dataPtr(),10, outgoing)); } } #endif // identify scalar and/or anti-scalar vertex AbstractVSSVertexPtr outgoingVertexS; AbstractVSSVertexPtr outgoingVertexA; identifyVertices(iscal, ianti, inpart, decay, outgoingVertexS, outgoingVertexA,inter); Energy2 scale(sqr(inpart.mass())); const GeneralTwoBodyDecayer::CFlow & colourFlow = colourFlows(inpart, decay); double gs(0.); bool couplingSet(false); #ifdef GAUGE_CHECK double total=0.; #endif for(unsigned int iv = 0; iv < 3; ++iv) { for(unsigned int ig = 0; ig < 2; ++ig) { // radiation from the incoming vector if((inpart.dataPtr()->coloured() && inter==ShowerInteraction::QCD) || (inpart.dataPtr()->charged() && inter==ShowerInteraction::QED) ) { assert(incomingVertex_[inter]); VectorWaveFunction vectorInter = incomingVertex_[inter]->evaluate(scale,3,inpart.dataPtr(),vector3_[iv], gluon_[2*ig],inpart.mass()); assert(vector3_[iv].particle()->id()==vectorInter.particle()->id()); Complex diag = 0.; for(auto vertex : vertex_) diag += vertex->evaluate(scale,vectorInter,scal,anti); if(!couplingSet) { gs = abs(incomingVertex_[inter]->norm()); couplingSet = true; } for(unsigned int ix=0;ixdataPtr()->coloured() && inter==ShowerInteraction::QCD) || (decay[iscal]->dataPtr()->charged() && inter==ShowerInteraction::QED) ) { assert(outgoingVertexS); // ensure you get correct outgoing particle from first vertex tcPDPtr off = decay[iscal]->dataPtr(); if(off->CC()) off = off->CC(); ScalarWaveFunction scalarInter = outgoingVertexS->evaluate(scale,3,off,gluon_[2*ig],scal,decay[iscal]->mass()); assert(scal.particle()->id()==scalarInter.particle()->id()); Complex diag = 0.; for(auto vertex : vertex_) diag += vertex->evaluate(scale,vector3_[iv],anti,scalarInter); if(!couplingSet) { gs = abs(outgoingVertexS->norm()); couplingSet = true; } for(unsigned int ix=0;ixdataPtr()->coloured() && inter==ShowerInteraction::QCD) || (decay[ianti]->dataPtr()->charged() && inter==ShowerInteraction::QED) ) { assert(outgoingVertexA); // ensure you get correct outgoing particle from first vertex tcPDPtr off = decay[ianti]->dataPtr(); if(off->CC()) off = off->CC(); ScalarWaveFunction scalarInter = outgoingVertexA->evaluate(scale,3,off, gluon_[2*ig],anti,decay[ianti]->mass()); assert(anti.particle()->id()==scalarInter.particle()->id()); Complex diag = 0.; for(auto vertex : vertex_) diag += vertex->evaluate(scale,vector3_[iv],scal,scalarInter); if(!couplingSet) { gs = abs(outgoingVertexA->norm()); couplingSet = true; } for(unsigned int ix=0;ixcontract(*ME[iy],rho3_)).real(); } } // divide by alpha_(S,EM) output*=(4.*Constants::pi)/sqr(gs); #ifdef GAUGE_CHECK double ratio = output/total; if(abs(ratio)>1e-20) { generator()->log() << "Test of gauge invariance in decay\n" << inpart << "\n"; for(unsigned int ix=0;ixlog() << *decay[ix] << "\n"; generator()->log() << "Test of gauge invariance " << ratio << "\n"; } #endif // return the answer return output; } void VSSDecayer::identifyVertices(const int iscal, const int ianti, const Particle & inpart, const ParticleVector & decay, AbstractVSSVertexPtr & outgoingVertexS, AbstractVSSVertexPtr & outgoingVertexA, ShowerInteraction inter){ if(inter==ShowerInteraction::QCD) { // work out which scalar each outgoing vertex corresponds to // two outgoing vertices if( inpart.dataPtr() ->iColour()==PDT::Colour0 && ((decay[iscal]->dataPtr()->iColour()==PDT::Colour3 && decay[ianti]->dataPtr()->iColour()==PDT::Colour3bar) || (decay[iscal]->dataPtr()->iColour()==PDT::Colour8 && decay[ianti]->dataPtr()->iColour()==PDT::Colour8))){ if(outgoingVertex1_[inter]==outgoingVertex2_[inter]){ outgoingVertexS = outgoingVertex1_[inter]; outgoingVertexA = outgoingVertex2_[inter]; } else if (outgoingVertex1_[inter]->isIncoming(getParticleData(decay[iscal]->id()))){ outgoingVertexS = outgoingVertex1_[inter]; outgoingVertexA = outgoingVertex2_[inter]; } else if (outgoingVertex2_[inter]->isIncoming(getParticleData(decay[iscal]->id()))){ outgoingVertexS = outgoingVertex2_[inter]; outgoingVertexA = outgoingVertex1_[inter]; } } else if(inpart.dataPtr() ->iColour()==PDT::Colour8 && decay[iscal]->dataPtr()->iColour()==PDT::Colour3 && decay[ianti]->dataPtr()->iColour()==PDT::Colour3bar){ if(outgoingVertex1_[inter]==outgoingVertex2_[inter]){ outgoingVertexS = outgoingVertex1_[inter]; outgoingVertexA = outgoingVertex2_[inter]; } else if (outgoingVertex1_[inter]->isIncoming(getParticleData(decay[iscal]->id()))){ outgoingVertexS = outgoingVertex1_[inter]; outgoingVertexA = outgoingVertex2_[inter]; } else if (outgoingVertex2_[inter]->isIncoming(getParticleData(decay[iscal]->id()))){ outgoingVertexS = outgoingVertex2_[inter]; outgoingVertexA = outgoingVertex1_[inter]; } } // one outgoing vertex else if(inpart.dataPtr()->iColour()==PDT::Colour3){ if(decay[iscal]->dataPtr()->iColour()==PDT::Colour3 && decay[ianti]->dataPtr()->iColour()==PDT::Colour0){ if (outgoingVertex1_[inter]) outgoingVertexS = outgoingVertex1_[inter]; else if(outgoingVertex2_[inter]) outgoingVertexS = outgoingVertex2_[inter]; } else if (decay[iscal]->dataPtr()->iColour()==PDT::Colour3 && decay[ianti]->dataPtr()->iColour()==PDT::Colour8){ if (outgoingVertex1_[inter]->isIncoming(getParticleData(decay[ianti]->dataPtr()->id()))){ outgoingVertexS = outgoingVertex2_[inter]; outgoingVertexA = outgoingVertex1_[inter]; } else { outgoingVertexS = outgoingVertex1_[inter]; outgoingVertexA = outgoingVertex2_[inter]; } } } else if(inpart.dataPtr()->iColour()==PDT::Colour3bar){ if(decay[ianti]->dataPtr()->iColour()==PDT::Colour3bar && decay[iscal]->dataPtr()->iColour()==PDT::Colour0){ if (outgoingVertex1_[inter]) outgoingVertexA = outgoingVertex1_[inter]; else if(outgoingVertex2_[inter]) outgoingVertexA = outgoingVertex2_[inter]; } else if (decay[iscal]->dataPtr()->iColour()==PDT::Colour8 && decay[ianti]->dataPtr()->iColour()==PDT::Colour3bar){ if (outgoingVertex1_[inter]->isIncoming(getParticleData(decay[iscal]->dataPtr()->id()))){ outgoingVertexS = outgoingVertex1_[inter]; outgoingVertexA = outgoingVertex2_[inter]; } else { outgoingVertexS = outgoingVertex2_[inter]; outgoingVertexA = outgoingVertex1_[inter]; } } } if (! ((incomingVertex_[inter] && (outgoingVertexS || outgoingVertexA)) || ( outgoingVertexS && outgoingVertexA))) throw Exception() << "Invalid vertices for QCD radiation in VSS decay in VSSDecayer::identifyVertices" << Exception::runerror; } else { if(decay[iscal]->dataPtr()->charged()) { if (outgoingVertex1_[inter] && outgoingVertex1_[inter]->isIncoming(const_ptr_cast(decay[iscal]->dataPtr()))) outgoingVertexS = outgoingVertex1_[inter]; else outgoingVertexS = outgoingVertex2_[inter]; } if(decay[ianti]->dataPtr()->charged()) { if (outgoingVertex1_[inter] && outgoingVertex1_[inter]->isIncoming(const_ptr_cast(decay[ianti]->dataPtr()))) outgoingVertexA = outgoingVertex1_[inter]; else outgoingVertexA = outgoingVertex2_[inter]; } } } diff --git a/Decay/Makefile.am b/Decay/Makefile.am --- a/Decay/Makefile.am +++ b/Decay/Makefile.am @@ -1,236 +1,236 @@ SUBDIRS = FormFactors Tau Baryon VectorMeson Perturbative \ WeakCurrents ScalarMeson TensorMeson Partonic General Radiation if HAVE_EVTGEN SUBDIRS += EvtGen endif noinst_LTLIBRARIES = libHwDecay.la libHwDecay_la_LIBADD = \ $(top_builddir)/PDT/libHwPDT.la nodist_libHwDecay_la_SOURCES = \ hwdecay__all.cc BUILT_SOURCES = hwdecay__all.cc CLEANFILES = hwdecay__all.cc hwdecay__all.cc : $(DIR_H_FILES) $(DIR_CC_FILES) Makefile @echo "Concatenating .cc files into $@" @$(top_srcdir)/cat_with_cpplines $(DIR_CC_FILES) > $@ EXTRA_DIST = $(ALL_H_FILES) $(ALL_CC_FILES) DIR_H_FILES = $(addprefix $(srcdir)/,$(ALL_H_FILES)) ALL_H_FILES = \ DecayIntegrator.fh DecayIntegrator.h \ DecayPhaseSpaceChannel.fh DecayPhaseSpaceChannel.h \ DecayPhaseSpaceMode.fh DecayPhaseSpaceMode.h \ HwDecayerBase.fh HwDecayerBase.h \ HwDecayHandler.h \ DecayVertex.fh DecayVertex.h \ DecayMatrixElement.fh DecayMatrixElement.h \ TwoBodyDecayMatrixElement.h \ GeneralDecayMatrixElement.fh GeneralDecayMatrixElement.h \ BranchingRatioReweighter.h\ PerturbativeDecayer.h DIR_CC_FILES = $(addprefix $(srcdir)/,$(ALL_CC_FILES)) ALL_CC_FILES = \ DecayIntegrator.cc \ DecayPhaseSpaceChannel.cc \ DecayPhaseSpaceMode.cc \ HwDecayerBase.cc \ HwDecayHandler.cc \ DecayVertex.cc \ DecayMatrixElement.cc \ TwoBodyDecayMatrixElement.cc \ GeneralDecayMatrixElement.cc \ BranchingRatioReweighter.cc\ PerturbativeDecayer.cc ################## pkglib_LTLIBRARIES = Hw64Decay.la Hw64Decay_la_LDFLAGS = \ -$(AM_LDFLAGS) -module -version-info 9:0:0 +$(AM_LDFLAGS) -module -version-info 10:0:0 Hw64Decay_la_SOURCES = \ Hw64Decayer.h Hw64Decayer.cc ################## pkglib_LTLIBRARIES += HwMamboDecay.la HwMamboDecay_la_LDFLAGS = \ -$(AM_LDFLAGS) -module -version-info 10:0:0 +$(AM_LDFLAGS) -module -version-info 11:0:0 HwMamboDecay_la_SOURCES = \ MamboDecayer.h MamboDecayer.cc ################## noinst_LTLIBRARIES += libHwFormFactor.la libHwFormFactor_la_SOURCES = \ FormFactors/BaryonFormFactor.cc \ FormFactors/ScalarFormFactor.cc \ FormFactors/BtoSGammaHadronicMass.cc \ FormFactors/BaryonFormFactor.fh \ FormFactors/BaryonFormFactor.h \ FormFactors/ScalarFormFactor.fh \ FormFactors/ScalarFormFactor.h \ FormFactors/BtoSGammaHadronicMass.h \ FormFactors/BtoSGammaHadronicMass.fh pkglib_LTLIBRARIES += HwFormFactors.la HwFormFactors_la_LDFLAGS = \ -$(AM_LDFLAGS) -module -version-info 10:0:0 +$(AM_LDFLAGS) -module -version-info 11:0:0 HwFormFactors_la_CPPFLAGS = \ $(AM_CPPFLAGS) -I$(srcdir)/FormFactors nodist_HwFormFactors_la_SOURCES = \ FormFactors/Formfactor__all.cc ################## pkglib_LTLIBRARIES += HwTauDecay.la HwTauDecay_la_LDFLAGS = \ -$(AM_LDFLAGS) -module -version-info 10:0:0 +$(AM_LDFLAGS) -module -version-info 11:0:0 HwTauDecay_la_SOURCES = \ Tau/TauDecayer.cc ################## pkglib_LTLIBRARIES += HwBaryonDecay.la HwBaryonDecay_la_LDFLAGS = \ -$(AM_LDFLAGS) -module -version-info 9:0:0 +$(AM_LDFLAGS) -module -version-info 10:0:0 HwBaryonDecay_la_LIBADD = \ $(top_builddir)/PDT/libHwBaryonWidth.la HwBaryonDecay_la_CPPFLAGS = \ $(AM_CPPFLAGS) -I$(srcdir)/Baryon nodist_HwBaryonDecay_la_SOURCES = \ Baryon/BaryonDecayer__all.cc ################## pkglib_LTLIBRARIES += HwVMDecay.la HwVMDecay_la_LDFLAGS = \ -$(AM_LDFLAGS) -module -version-info 9:0:0 +$(AM_LDFLAGS) -module -version-info 10:0:0 HwVMDecay_la_CPPFLAGS = \ $(AM_CPPFLAGS) -I$(srcdir)/VectorMeson nodist_HwVMDecay_la_SOURCES = \ VectorMeson/VMDecayer__all.cc ################## pkglib_LTLIBRARIES += HwPerturbativeDecay.la HwPerturbativeDecay_la_LDFLAGS = \ -$(AM_LDFLAGS) -module -version-info 10:0:0 +$(AM_LDFLAGS) -module -version-info 11:0:0 HwPerturbativeDecay_la_CPPFLAGS = \ $(AM_CPPFLAGS) -I$(srcdir)/Perturbative nodist_HwPerturbativeDecay_la_SOURCES = \ Perturbative/Perturbative__all.cc ################## noinst_LTLIBRARIES += libHwWeakCurrent.la libHwWeakCurrent_la_SOURCES = \ WeakCurrents/WeakDecayCurrent.cc \ WeakCurrents/LeptonNeutrinoCurrent.cc \ WeakCurrents/WeakDecayCurrent.fh \ WeakCurrents/WeakDecayCurrent.h \ WeakCurrents/LeptonNeutrinoCurrent.fh \ WeakCurrents/LeptonNeutrinoCurrent.h pkglib_LTLIBRARIES += HwWeakCurrents.la HwWeakCurrents_la_LDFLAGS = \ -$(AM_LDFLAGS) -module -version-info 10:0:0 +$(AM_LDFLAGS) -module -version-info 11:0:0 HwWeakCurrents_la_CPPFLAGS = \ $(AM_CPPFLAGS) -I$(srcdir)/WeakCurrents nodist_HwWeakCurrents_la_SOURCES = \ WeakCurrents/WeakCurrents__all.cc ################## pkglib_LTLIBRARIES += HwSMDecay.la HwSMDecay_la_LDFLAGS = \ -$(AM_LDFLAGS) -module -version-info 11:0:0 +$(AM_LDFLAGS) -module -version-info 12:0:0 HwSMDecay_la_CPPFLAGS = \ $(AM_CPPFLAGS) -I$(srcdir)/ScalarMeson nodist_HwSMDecay_la_SOURCES = \ ScalarMeson/SMDecayer__all.cc ################## pkglib_LTLIBRARIES += HwTMDecay.la HwTMDecay_la_LDFLAGS = \ -$(AM_LDFLAGS) -module -version-info 9:0:0 +$(AM_LDFLAGS) -module -version-info 10:0:0 HwTMDecay_la_CPPFLAGS = \ $(AM_CPPFLAGS) -I$(srcdir)/TensorMeson nodist_HwTMDecay_la_SOURCES = \ TensorMeson/TMDecayer__all.cc ################## pkglib_LTLIBRARIES += HwPartonicDecay.la HwPartonicDecay_la_LDFLAGS = \ -$(AM_LDFLAGS) -module -version-info 10:0:0 +$(AM_LDFLAGS) -module -version-info 11:0:0 HwPartonicDecay_la_CPPFLAGS = \ $(AM_CPPFLAGS) -I$(srcdir)/Partonic nodist_HwPartonicDecay_la_SOURCES = \ Partonic/Partonic__all.cc ################## noinst_LTLIBRARIES += libHwDecRad.la libHwDecRad_la_SOURCES = \ Radiation/DecayRadiationGenerator.cc \ Radiation/QEDRadiationHandler.cc \ Radiation/DecayRadiationGenerator.h \ Radiation/DecayRadiationGenerator.fh \ Radiation/QEDRadiationHandler.fh \ Radiation/QEDRadiationHandler.h pkglib_LTLIBRARIES += HwSOPHTY.la HwSOPHTY_la_LDFLAGS = \ -$(AM_LDFLAGS) -module -version-info 4:0:0 +$(AM_LDFLAGS) -module -version-info 5:0:0 HwSOPHTY_la_CPPFLAGS = \ $(AM_CPPFLAGS) -I$(srcdir)/Radiation nodist_HwSOPHTY_la_SOURCES = \ Radiation/Sophty__all.cc ################## diff --git a/Decay/Radiation/QEDRadiationHandler.cc b/Decay/Radiation/QEDRadiationHandler.cc --- a/Decay/Radiation/QEDRadiationHandler.cc +++ b/Decay/Radiation/QEDRadiationHandler.cc @@ -1,174 +1,174 @@ // -*- C++ -*- // // QEDRadiationHandler.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 QEDRadiationHandler class. // #include "QEDRadiationHandler.h" #include "ThePEG/Utilities/DescribeClass.h" #include "ThePEG/Interface/Reference.h" #include "ThePEG/Interface/ParVector.h" #include "ThePEG/Interface/ClassDocumentation.h" #include "DecayRadiationGenerator.h" #include "ThePEG/Persistency/PersistentOStream.h" #include "ThePEG/Persistency/PersistentIStream.h" #include "ThePEG/Handlers/EventHandler.h" #include "ThePEG/Repository/EventGenerator.h" #include "Herwig/Decay/DecayIntegrator.h" #include "Herwig/Decay/DecayPhaseSpaceMode.h" #include "ThePEG/PDT/DecayMode.h" using namespace Herwig; namespace { /** * A struct to order the particles in the same way as in the DecayMode's */ struct ParticleOrdering { /** * Operator for the ordering * @param p1 The first ParticleData object * @param p2 The second ParticleData object */ - bool operator()(cPDPtr p1, cPDPtr p2) { + bool operator()(cPDPtr p1, cPDPtr p2) const { return abs(p1->id()) > abs(p2->id()) || ( abs(p1->id()) == abs(p2->id()) && p1->id() > p2->id() ) || ( p1->id() == p2->id() && p1->fullName() > p2->fullName() ); } }; /** * A set of ParticleData objects ordered as for the DecayMode's */ typedef multiset OrderedParticles; } QEDRadiationHandler::QEDRadiationHandler() { // only include electroweak gauge bosons _decayingParticles.push_back( 22); _decayingParticles.push_back( 23); _decayingParticles.push_back( 24); _decayingParticles.push_back(-24); // only include the charged leptons _decayProducts.push_back( 11); _decayProducts.push_back( 13); _decayProducts.push_back( 15); _decayProducts.push_back(-11); _decayProducts.push_back(-13); _decayProducts.push_back(-15); } void QEDRadiationHandler:: handle(EventHandler & eh, const tPVector & tagged, const Hint &) { // find the potential decaying particles to be considered set parents; for(unsigned int ix=0;ixid(); if(find(_decayProducts.begin(),_decayProducts.end(),id)!=_decayProducts.end()) { PPtr par=tagged[ix]->parents()[0]; id=par->id(); if(tagged[ix]->parents()[0]->mass()>ZERO&& find(_decayingParticles.begin(),_decayingParticles.end(),id)!= _decayingParticles.end()) parents.insert(par); } } set::const_iterator sit; StepPtr step=eh.currentStep(); // loop over parents for(sit=parents.begin();sit!=parents.end();++sit) { // extract children ParticleVector children=(**sit).children(); // store number of children unsigned int initsize = children.size(); // boost the decay to the parent rest frame Boost boost = - (**sit).momentum().boostVector(); (**sit).deepBoost(boost); // construct the tag for the decay mode to find the decayer OrderedParticles products; for(unsigned int ix=0;ixdataPtr()); string tag = (**sit).dataPtr()->name() + "->"; unsigned int iprod=0; for(OrderedParticles::const_iterator it = products.begin(); it != products.end(); ++it) { ++iprod; tag += (**it).name(); if(iprod != initsize) tag += ","; } tag += ";"; tDMPtr dm = generator()->findDecayMode(tag); tDecayIntegratorPtr decayer; if(dm) { tDecayerPtr dtemp = dm->decayer(); decayer = dynamic_ptr_cast(dtemp); bool cc; tPDVector ctemp; for(unsigned int ix=0;ix(children[ix]->dataPtr())); unsigned int imode = decayer->modeNumber(cc,(**sit).dataPtr(),ctemp); decayer->me2(imode,**sit,children,DecayIntegrator::Initialize); } // generate photons ParticleVector newchildren = _generator->generatePhotons(**sit,children,decayer); // if photons produced add as children and to step for(unsigned int ix=initsize;ixaddDecayProduct(newchildren[ix]); } (**sit).deepBoost(-boost); } } void QEDRadiationHandler::persistentOutput(PersistentOStream & os) const { os << _generator << _decayingParticles << _decayProducts; } void QEDRadiationHandler::persistentInput(PersistentIStream & is, int) { is >> _generator >> _decayingParticles >> _decayProducts; } // The following static variable is needed for the type // description system in ThePEG. DescribeClass describeHerwigQEDRadiationHandler("Herwig::QEDRadiationHandler", "Herwig.so"); void QEDRadiationHandler::Init() { static ClassDocumentation documentation ("The QEDRadiationHandler class is designed to be used as a PostSubProcessHandler" "so that the same approach as for radiation in decays can be used for resonances" "produced as part of the hard process"); static Reference interfaceRadiationGenerator ("RadiationGenerator", "Reference to the DecayRadiationGenerator", &QEDRadiationHandler::_generator, false, false, true, false, false); static ParVector interfaceDecayingParticles ("DecayingParticles", "List of PDF codes of the particles which should have radiation" " generated for them.", &QEDRadiationHandler::_decayingParticles, -1, long(24), 0, 0, false, false, Interface::nolimits); static ParVector interfaceDecayProducts ("DecayProducts", "List of PDG codes of the particles which should be present" " as decay products for the radiation to be generated.", &QEDRadiationHandler::_decayProducts, -1, long(11), 0, 0, false, false, Interface::nolimits); } diff --git a/Makefile.am b/Makefile.am --- a/Makefile.am +++ b/Makefile.am @@ -1,29 +1,29 @@ SUBDIRS = include \ Utilities PDT Decay PDF Models \ Shower Hadronization MatrixElement \ UnderlyingEvent Analysis Looptools Sampling \ API lib src Doc Contrib Tests EXTRA_DIST = GUIDELINES cat_with_cpplines -## DISTCHECK_CONFIGURE_FLAGS = --enable-debug --with-thepeg=$(THEPEGPATH) --with-gsl=$(GSLPATH) --with-boost=/mt/data1/herwig +DISTCHECK_CONFIGURE_FLAGS = --enable-debug --with-thepeg=$(THEPEGPATH) --with-gsl=$(GSLPATH) ACLOCAL_AMFLAGS = -I m4 DISTCLEANFILES = config.herwig libclean: find . -name '*.la' -delete cd lib && $(MAKE) $(AM_MAKEFLAGS) clean cd src && $(MAKE) $(AM_MAKEFLAGS) clean tests: cd Tests && $(MAKE) $(AM_MAKEFLAGS) tests ## ThePEG registration unregister: cd src && $(MAKE) $(AM_MAKEFLAGS) unregister register: cd src && $(MAKE) $(AM_MAKEFLAGS) register diff --git a/MatrixElement/DIS/Makefile.am b/MatrixElement/DIS/Makefile.am --- a/MatrixElement/DIS/Makefile.am +++ b/MatrixElement/DIS/Makefile.am @@ -1,6 +1,6 @@ pkglib_LTLIBRARIES = HwMEDIS.la HwMEDIS_la_SOURCES = \ DISBase.h DISBase.cc \ MENeutralCurrentDIS.cc MENeutralCurrentDIS.h \ MEChargedCurrentDIS.cc MEChargedCurrentDIS.h -HwMEDIS_la_LDFLAGS = $(AM_LDFLAGS) -module -version-info 7:1:0 +HwMEDIS_la_LDFLAGS = $(AM_LDFLAGS) -module -version-info 8:0:0 diff --git a/MatrixElement/Gamma/Makefile.am b/MatrixElement/Gamma/Makefile.am --- a/MatrixElement/Gamma/Makefile.am +++ b/MatrixElement/Gamma/Makefile.am @@ -1,10 +1,10 @@ pkglib_LTLIBRARIES = HwMEGammaGamma.la HwMEGammaHadron.la HwMEGammaGamma_la_SOURCES = \ MEGammaGamma2ff.cc MEGammaGamma2ff.h \ MEGammaGamma2WW.cc MEGammaGamma2WW.h -HwMEGammaGamma_la_LDFLAGS = $(AM_LDFLAGS) -module -version-info 4:0:0 +HwMEGammaGamma_la_LDFLAGS = $(AM_LDFLAGS) -module -version-info 5:0:0 HwMEGammaHadron_la_SOURCES = \ MEGammaP2Jets.cc MEGammaP2Jets.h -HwMEGammaHadron_la_LDFLAGS = $(AM_LDFLAGS) -module -version-info 4:0:0 +HwMEGammaHadron_la_LDFLAGS = $(AM_LDFLAGS) -module -version-info 5:0:0 diff --git a/MatrixElement/Hadron/Makefile.am b/MatrixElement/Hadron/Makefile.am --- a/MatrixElement/Hadron/Makefile.am +++ b/MatrixElement/Hadron/Makefile.am @@ -1,28 +1,28 @@ pkglib_LTLIBRARIES = HwMEHadron.la HwMEHadron_la_SOURCES = \ MEqq2gZ2ff.cc MEqq2gZ2ff.h \ MEqq2W2ff.cc MEqq2W2ff.h \ MEPP2GammaJet.h MEPP2GammaJet.cc\ MEQCD2to2.h MEQCD2to2.cc\ MEPP2HiggsJet.h MEPP2HiggsJet.cc\ MEPP2GammaGamma.h MEPP2GammaGamma.cc \ MEPP2QQ.h MEPP2QQ.cc \ MEPP2QQHiggs.h MEPP2QQHiggs.cc \ MEPP2Higgs.h MEPP2Higgs.cc\ MEPP2WH.h MEPP2WH.cc \ MEPP2ZH.h MEPP2ZH.cc \ MEPP2WJet.cc MEPP2WJet.h \ MEPP2ZJet.cc MEPP2ZJet.h \ MEPP2VV.cc MEPP2VV.h \ MEPP2VGamma.cc MEPP2VGamma.h \ MEPP2HiggsVBF.cc MEPP2HiggsVBF.h \ MEPP2SingleTop.cc MEPP2SingleTop.h \ MEMinBias.h MEMinBias.cc \ MEDiffraction.h MEDiffraction.cc -HwMEHadron_la_LDFLAGS = $(AM_LDFLAGS) -module -version-info 8:2:0 +HwMEHadron_la_LDFLAGS = $(AM_LDFLAGS) -module -version-info 9:0:0 pkglib_LTLIBRARIES += HwMEHadronFast.la HwMEHadronFast_la_SOURCES = \ MEQCD2to2Fast.h MEQCD2to2Fast.cc -HwMEHadronFast_la_LDFLAGS = $(AM_LDFLAGS) -module -version-info 6:0:0 +HwMEHadronFast_la_LDFLAGS = $(AM_LDFLAGS) -module -version-info 7:0:0 diff --git a/MatrixElement/Lepton/Makefile.am b/MatrixElement/Lepton/Makefile.am --- a/MatrixElement/Lepton/Makefile.am +++ b/MatrixElement/Lepton/Makefile.am @@ -1,10 +1,10 @@ pkglib_LTLIBRARIES = HwMELepton.la HwMELepton_la_SOURCES = \ MEee2gZ2qq.h MEee2gZ2qq.cc\ MEee2gZ2ll.h MEee2gZ2ll.cc\ MEee2ZH.h MEee2ZH.cc\ MEee2HiggsVBF.h MEee2HiggsVBF.cc \ MEee2VV.h MEee2VV.cc \ MEee2VectorMeson.h MEee2VectorMeson.cc \ MEee2Higgs2SM.h MEee2Higgs2SM.cc -HwMELepton_la_LDFLAGS = $(AM_LDFLAGS) -module -version-info 7:1:0 +HwMELepton_la_LDFLAGS = $(AM_LDFLAGS) -module -version-info 8:0:0 diff --git a/MatrixElement/Matchbox/Builtin/Amplitudes/Makefile.am b/MatrixElement/Matchbox/Builtin/Amplitudes/Makefile.am --- a/MatrixElement/Matchbox/Builtin/Amplitudes/Makefile.am +++ b/MatrixElement/Matchbox/Builtin/Amplitudes/Makefile.am @@ -1,72 +1,72 @@ pkglib_LTLIBRARIES = HwMatchboxBuiltin.la HwMatchboxBuiltin_la_LDFLAGS = \ -$(AM_LDFLAGS) -module -version-info 4:1:0 +$(AM_LDFLAGS) -module -version-info 5:0:0 nodist_HwMatchboxBuiltin_la_SOURCES = \ Amplitudes__all.cc BUILT_SOURCES = Amplitudes__all.cc CLEANFILES = Amplitudes__all.cc Amplitudes__all.cc : $(DIR_H_FILES) $(DIR_CC_FILES) Makefile @echo "Concatenating .cc files into $@" @$(top_srcdir)/cat_with_cpplines $(DIR_CC_FILES) > $@ EXTRA_DIST = $(ALL_H_FILES) $(ALL_CC_FILES) DIR_H_FILES = $(addprefix $(srcdir)/,$(ALL_H_FILES)) ALL_H_FILES = \ MatchboxCurrents.h \ MatchboxZGammaAmplitude.h \ MatchboxAmplitudellbarqqbargg.h \ MatchboxAmplitudellbarqqbarg.h \ MatchboxAmplitudellbarqqbar.h \ MatchboxAmplitudellbarqqbarqqbar.h \ MatchboxAmplitudelnuqqbargg.h \ MatchboxAmplitudelnuqqbarg.h \ MatchboxAmplitudelnuqqbar.h \ MatchboxAmplitudelnuqqbarqqbar.h \ MatchboxAmplitudehbbbarg.h \ MatchboxAmplitudehbbbar.h \ MatchboxAmplitudehggg.h \ MatchboxAmplitudehgg.h \ MatchboxAmplitudehqqbarg.h \ MatchboxAmplitudeqqbarttbar.h \ MatchboxAmplitudeqqbarttbarg.h \ MatchboxAmplitudeggttbar.h \ MatchboxAmplitudeggttbarg.h \ HelAmps_sm.h \ Parameters_sm.h \ MG_qqx2ttx.h \ MG_qqx2ttxg.h \ MG_gg2ttx.h \ MG_gg2ttxg.h DIR_CC_FILES = $(addprefix $(srcdir)/,$(ALL_CC_FILES)) ALL_CC_FILES = \ MatchboxCurrents.cc \ MatchboxZGammaAmplitude.cc \ MatchboxAmplitudellbarqqbar.cc \ MatchboxAmplitudellbarqqbarg.cc \ MatchboxAmplitudellbarqqbargg.cc \ MatchboxAmplitudellbarqqbarqqbar.cc \ MatchboxAmplitudelnuqqbar.cc \ MatchboxAmplitudelnuqqbarg.cc \ MatchboxAmplitudelnuqqbargg.cc \ MatchboxAmplitudelnuqqbarqqbar.cc \ MatchboxAmplitudehbbbar.cc \ MatchboxAmplitudehbbbarg.cc \ MatchboxAmplitudehgg.cc \ MatchboxAmplitudehggg.cc \ MatchboxAmplitudehqqbarg.cc \ MatchboxAmplitudeqqbarttbar.cc \ MatchboxAmplitudeqqbarttbarg.cc \ MatchboxAmplitudeggttbar.cc \ MatchboxAmplitudeggttbarg.cc \ HelAmps_sm.cc \ Parameters_sm.cc \ MG_qqx2ttx.cc \ MG_qqx2ttxg.cc \ MG_gg2ttx.cc \ MG_gg2ttxg.cc diff --git a/MatrixElement/Matchbox/CVolver/Makefile.am b/MatrixElement/Matchbox/CVolver/Makefile.am --- a/MatrixElement/Matchbox/CVolver/Makefile.am +++ b/MatrixElement/Matchbox/CVolver/Makefile.am @@ -1,9 +1,9 @@ pkglib_LTLIBRARIES = HwCVolver.la -HwCVolver_la_LDFLAGS = $(AM_LDFLAGS) -module -version-info 3:0:0 +HwCVolver_la_LDFLAGS = $(AM_LDFLAGS) -module -version-info 4:0:0 HwCVolver_la_SOURCES = \ ColourFlowBasis.cc \ ColourFlows.cc \ ColourFlowBasis.h \ ColourFlows.h diff --git a/MatrixElement/Matchbox/ColorFull/Makefile.am b/MatrixElement/Matchbox/ColorFull/Makefile.am --- a/MatrixElement/Matchbox/ColorFull/Makefile.am +++ b/MatrixElement/Matchbox/ColorFull/Makefile.am @@ -1,35 +1,35 @@ pkglib_LTLIBRARIES = HwColorFull.la -HwColorFull_la_LDFLAGS = $(AM_LDFLAGS) -module -version-info 3:0:0 +HwColorFull_la_LDFLAGS = $(AM_LDFLAGS) -module -version-info 4:0:0 HwColorFull_la_SOURCES = \ Col_amp.cc \ Col_amp.h \ Col_basis.cc \ Col_basis.h \ Col_functions.cc \ Col_functions.h \ Col_str.cc \ Col_str.h \ Monomial.cc \ Monomial.h \ Orthogonal_basis.cc \ Orthogonal_basis.h \ parameters.h \ Poly_matr.cc \ Poly_matr.h \ Polynomial.cc \ Polynomial.h \ Poly_vec.cc \ Poly_vec.h \ Quark_line.cc \ Quark_line.h \ Trace_basis.cc \ TraceBasis.cc \ Trace_basis.h \ TraceBasis.h \ Trace_type_basis.cc \ Trace_type_basis.h \ Tree_level_gluon_basis.cc \ Tree_level_gluon_basis.h \ types.h diff --git a/MatrixElement/Matchbox/Cuts/Makefile.am b/MatrixElement/Matchbox/Cuts/Makefile.am --- a/MatrixElement/Matchbox/Cuts/Makefile.am +++ b/MatrixElement/Matchbox/Cuts/Makefile.am @@ -1,36 +1,36 @@ pkglib_LTLIBRARIES = HwMatchboxCuts.la HwMatchboxCuts_la_LDFLAGS = \ -$(AM_LDFLAGS) -module -version-info 3:0:0 +$(AM_LDFLAGS) -module -version-info 4:0:0 nodist_HwMatchboxCuts_la_SOURCES = \ Cuts__all.cc BUILT_SOURCES = Cuts__all.cc CLEANFILES = Cuts__all.cc Cuts__all.cc : $(DIR_H_FILES) $(DIR_CC_FILES) Makefile @echo "Concatenating .cc files into $@" @$(top_srcdir)/cat_with_cpplines $(DIR_CC_FILES) > $@ EXTRA_DIST = $(ALL_H_FILES) $(ALL_CC_FILES) DIR_H_FILES = $(addprefix $(srcdir)/,$(ALL_H_FILES)) ALL_H_FILES = \ IdentifiedParticleCut.h \ MatchboxDeltaRCut.h \ MissingPtCut.h \ FrixionePhotonSeparationCut.h \ InvariantMassCut.h \ PairPtCut.h \ PairRapidityCut.h DIR_CC_FILES = $(addprefix $(srcdir)/,$(ALL_CC_FILES)) ALL_CC_FILES = \ IdentifiedParticleCut.cc \ MatchboxDeltaRCut.cc \ MissingPtCut.cc \ FrixionePhotonSeparationCut.cc \ InvariantMassCut.cc \ PairPtCut.cc \ PairRapidityCut.cc diff --git a/MatrixElement/Matchbox/External/Makefile.am b/MatrixElement/Matchbox/External/Makefile.am --- a/MatrixElement/Matchbox/External/Makefile.am +++ b/MatrixElement/Matchbox/External/Makefile.am @@ -1,95 +1,95 @@ SUBDIRS = BLHAGeneric VBFNLO NJet GoSam OpenLoops MadGraph pkglib_LTLIBRARIES = ############## if HAVE_GOSAM pkglib_LTLIBRARIES += HwMatchboxGoSam.la endif HwMatchboxGoSam_la_LDFLAGS = \ -$(AM_LDFLAGS) -module -version-info 14:1:0 +$(AM_LDFLAGS) -module -version-info 15:0:0 HwMatchboxGoSam_la_CPPFLAGS = $(AM_CPPFLAGS) \ -DHERWIG_BINDIR="\"$(bindir)\"" \ -DHERWIG_PKGDATADIR="\"$(pkgdatadir)\"" \ -DGOSAM_PREFIX="\"$(GOSAMPREFIX)\"" HwMatchboxGoSam_la_SOURCES = \ GoSam/GoSamAmplitude.cc ############### if HAVE_VBFNLO pkglib_LTLIBRARIES += HwMatchboxVBFNLO.la endif -HwMatchboxVBFNLO_la_LDFLAGS = $(AM_LDFLAGS) -module -version-info 3:1:0 +HwMatchboxVBFNLO_la_LDFLAGS = $(AM_LDFLAGS) -module -version-info 4:0:0 HwMatchboxVBFNLO_la_CPPFLAGS = $(AM_CPPFLAGS) HwMatchboxVBFNLO_la_CPPFLAGS += -I$(VBFNLOINCLUDE) HwMatchboxVBFNLO_la_CPPFLAGS += -DVBFNLOLIB=$(VBFNLOLIB) HwMatchboxVBFNLO_la_SOURCES = \ VBFNLO/VBFNLOAmplitude.cc \ VBFNLO/VBFNLOPhasespace.cc ############### if HAVE_OPENLOOPS pkglib_LTLIBRARIES += HwMatchboxOpenLoops.la endif HwMatchboxOpenLoops_la_SOURCES = \ OpenLoops/OpenLoopsAmplitude.cc -HwMatchboxOpenLoops_la_LDFLAGS = $(AM_LDFLAGS) -module -version-info 13:1:0 +HwMatchboxOpenLoops_la_LDFLAGS = $(AM_LDFLAGS) -module -version-info 14:0:0 HwMatchboxOpenLoops_la_CPPFLAGS = $(AM_CPPFLAGS) \ -DOPENLOOPSLIBS="\"$(OPENLOOPSLIBS)\"" \ -DOPENLOOPSPREFIX="\"$(OPENLOOPSPREFIX)\"" ############## if HAVE_NJET pkglib_LTLIBRARIES += HwMatchboxNJet.la endif -HwMatchboxNJet_la_LDFLAGS = $(AM_LDFLAGS) -module -version-info 13:0:0 +HwMatchboxNJet_la_LDFLAGS = $(AM_LDFLAGS) -module -version-info 14:0:0 HwMatchboxNJet_la_CPPFLAGS = $(AM_CPPFLAGS) -I$(NJETINCLUDEPATH) \ -DNJET_PREFIX="\"$(NJETPREFIX)\"" \ -DNJET_LIBS="\"$(NJETLIBPATH)\"" HwMatchboxNJet_la_SOURCES = \ NJet/NJetsAmplitude.cc ############## if HAVE_MADGRAPH pkglib_LTLIBRARIES += HwMatchboxMadGraph.la endif -HwMatchboxMadGraph_la_LDFLAGS = $(AM_LDFLAGS) -module -version-info 4:1:0 +HwMatchboxMadGraph_la_LDFLAGS = $(AM_LDFLAGS) -module -version-info 5:0:0 HwMatchboxMadGraph_la_SOURCES = \ MadGraph/MadGraphAmplitude.cc HwMatchboxMadGraph_la_CPPFLAGS = $(AM_CPPFLAGS) \ -DHERWIG_BINDIR="\"$(bindir)\"" \ -DHERWIG_INCLUDEDIR="\"$(includedir)\"" \ -DHERWIG_PKGDATADIR="\"$(pkgdatadir)\"" \ -DMADGRAPH_PREFIX="\"$(MADGRAPHPREFIX)\"" diff --git a/MatrixElement/Matchbox/Matching/Makefile.am b/MatrixElement/Matchbox/Matching/Makefile.am --- a/MatrixElement/Matchbox/Matching/Makefile.am +++ b/MatrixElement/Matchbox/Matching/Makefile.am @@ -1,24 +1,24 @@ noinst_LTLIBRARIES = libHwMatchboxMatching.la pkglib_LTLIBRARIES = HwQTildeMatching.la HwDipoleMatching.la libHwMatchboxMatching_la_SOURCES = \ HardScaleProfile.h \ HardScaleProfile.cc \ ShowerApproximation.h \ ShowerApproximation.cc \ ShowerApproximationKernel.h \ ShowerApproximationKernel.cc \ ShowerApproximationGenerator.h \ ShowerApproximationGenerator.cc \ MEMatching.h \ MEMatching.cc -HwQTildeMatching_la_LDFLAGS = $(AM_LDFLAGS) -module -version-info 3:0:0 +HwQTildeMatching_la_LDFLAGS = $(AM_LDFLAGS) -module -version-info 4:0:0 HwQTildeMatching_la_SOURCES = \ QTildeMatching.h \ QTildeMatching.cc -HwDipoleMatching_la_LDFLAGS = $(AM_LDFLAGS) -module -version-info 3:1:0 +HwDipoleMatching_la_LDFLAGS = $(AM_LDFLAGS) -module -version-info 4:0:0 HwDipoleMatching_la_SOURCES = \ DipoleMatching.h \ DipoleMatching.cc diff --git a/MatrixElement/Matchbox/Scales/Makefile.am b/MatrixElement/Matchbox/Scales/Makefile.am --- a/MatrixElement/Matchbox/Scales/Makefile.am +++ b/MatrixElement/Matchbox/Scales/Makefile.am @@ -1,32 +1,32 @@ pkglib_LTLIBRARIES = HwMatchboxScales.la -HwMatchboxScales_la_LDFLAGS = $(AM_LDFLAGS) -module -version-info 4:1:0 +HwMatchboxScales_la_LDFLAGS = $(AM_LDFLAGS) -module -version-info 5:0:0 HwMatchboxScales_la_SOURCES = \ MatchboxHtScale.h \ MatchboxLeptonMassScale.h \ MatchboxLeptonPtScale.h \ MatchboxParticlePtScale.h \ MatchboxPtScale.h \ MatchboxHtScale.cc \ MatchboxLeptonMassScale.cc \ MatchboxLeptonPtScale.cc \ MatchboxParticlePtScale.cc \ MatchboxPtScale.cc \ MatchboxSHatScale.h \ MatchboxSHatScale.cc \ MatchboxTopMassScale.h \ MatchboxTopMassScale.cc \ MatchboxTopMTScale.h \ MatchboxTopMTScale.cc \ MatchboxTopSumMTScale.h \ MatchboxTopSumMTScale.cc \ MatchboxTopMinMTScale.h \ MatchboxTopMinMTScale.cc \ MatchboxTriVecScales.h \ MatchboxTriVecScales.cc \ MatchboxTopLinearSumMTScale.h \ MatchboxTopLinearSumMTScale.cc \ MatchboxTopIndividualMTScale.h \ MatchboxTopIndividualMTScale.cc diff --git a/MatrixElement/Powheg/Makefile.am b/MatrixElement/Powheg/Makefile.am --- a/MatrixElement/Powheg/Makefile.am +++ b/MatrixElement/Powheg/Makefile.am @@ -1,17 +1,17 @@ pkglib_LTLIBRARIES = HwPowhegMEHadron.la HwPowhegMELepton.la -HwPowhegMEHadron_la_LDFLAGS = $(AM_LDFLAGS) -module -version-info 8:0:0 +HwPowhegMEHadron_la_LDFLAGS = $(AM_LDFLAGS) -module -version-info 9:0:0 HwPowhegMEHadron_la_SOURCES = \ MEqq2gZ2ffPowheg.cc MEqq2gZ2ffPowheg.h \ MEqq2W2ffPowheg.cc MEqq2W2ffPowheg.h \ MEPP2HiggsPowheg.cc MEPP2HiggsPowheg.h \ MEPP2WHPowheg.cc MEPP2WHPowheg.h \ MEPP2ZHPowheg.cc MEPP2ZHPowheg.h \ MEPP2VVPowheg.cc MEPP2VVPowheg.h \ VVKinematics.cc VVKinematics.h \ MEPP2GammaGammaPowheg.cc MEPP2GammaGammaPowheg.h \ MEPP2HiggsVBFPowheg.cc MEPP2HiggsVBFPowheg.h -HwPowhegMELepton_la_LDFLAGS = $(AM_LDFLAGS) -module -version-info 2:0:0 +HwPowhegMELepton_la_LDFLAGS = $(AM_LDFLAGS) -module -version-info 3:0:0 HwPowhegMELepton_la_SOURCES = \ MEee2gZ2qqPowheg.cc MEee2gZ2qqPowheg.h \ MEee2gZ2llPowheg.cc MEee2gZ2llPowheg.h diff --git a/Models/Feynrules/python/ufo2herwig b/Models/Feynrules/python/ufo2herwig --- a/Models/Feynrules/python/ufo2herwig +++ b/Models/Feynrules/python/ufo2herwig @@ -1,437 +1,451 @@ #! /usr/bin/env python from __future__ import division import os, sys, pprint, argparse, re,copy from string import strip, Template # add path to the ufo conversion modules modulepath = os.path.join("@PKGLIBDIR@",'python') sys.path.append(modulepath) from ufo2peg import * # set up the option parser for command line input parser = argparse.ArgumentParser( description='Create Herwig model files from Feynrules UFO input.' ) parser.add_argument( 'ufodir', metavar='UFO_directory', help='the UFO model directory' ) parser.add_argument( '-v', '--verbose', action="store_true", help="print verbose output" ) parser.add_argument( '-n','--name', default="FRModel", help="set custom nametag for the model" ) parser.add_argument( '--ignore-skipped', action="store_true", help="ignore skipped vertices and produce output anyway" ) parser.add_argument( '--split-model', action="store_true", help="Split the model file into pieces to improve compilation for models with many parameters" ) parser.add_argument( '--no-generic-loop-vertices', action="store_true", help="Don't include the automatically generated generic loop vertices for h->gg and h->gamma gamma" ) parser.add_argument( '--include-generic', action="store_true", help="Include support for generic spin structures (still experimental)" ) parser.add_argument( '--use-generic-for-tensors', action="store_true", help="Use the generic machinery for all tensor vertices (debugging only)" ) parser.add_argument( '--forbidden-particle-name', action="append", default=["eta","phi"], help="Add particle names not allowed as names in UFO models to avoid conflicts with"+\ "Herwig internal particles, names will have _UFO appended" ) # get the arguments args = parser.parse_args() # import the model import imp path,mod = os.path.split(os.path.abspath(args.ufodir)) FR = imp.load_module(mod,*imp.find_module(mod,[path])) ################################################## ################################################## # get the Model name from the arguments modelname = args.name libname = modelname + '.so' # define arrays and variables #allplist = "" parmdecls = [] parmgetters = [] parmconstr = [] doinit = [] paramstoreplace_ = [] paramstoreplace_expressions_ = [] # get external parameters for printing parmsubs = dict( [ (p.name, p.value) for p in FR.all_parameters if p.nature == 'external' ] ) # evaluate python cmath def evaluate(x): import cmath return eval(x, {'cmath':cmath, - 'complexconjugate':FR.function_library.complexconjugate}, + 'complexconjugate':FR.function_library.complexconjugate, + 'im':FR.function_library.im, + 're':FR.function_library.re}, parmsubs) ## get internal params into arrays internal = ( p for p in FR.all_parameters if p.nature == 'internal' ) #paramstoreplaceEW_ = [] #paramstoreplaceEW_expressions_ = [] # calculate internal parameters for p in internal: parmsubs.update( { p.name : evaluate(p.value) } ) # if 'aS' in p.value and p.name != 'aS': # paramstoreplace_.append(p.name) # paramstoreplace_expressions_.append(p.value) # if 'aEWM1' in p.value and p.name != 'aEWM1': # paramstoreplaceEW_.append(p.name) # paramstoreplaceEW_expressions_.append(p.value) parmvalues=copy.copy(parmsubs) # more arrays used for substitution in templates paramsforstream = [] parmmodelconstr = [] # loop over parameters and fill in template stuff according to internal/external and complex/real # WARNING: Complex external parameter input not tested! if args.verbose: print 'verbose mode on: printing all parameters' print '-'*60 paramsstuff = ('name', 'expression', 'default value', 'nature') pprint.pprint(paramsstuff) interfacedecl_T = """\ static Parameter<{modelname}, {type}> interface{pname} ("{pname}", "The interface for parameter {pname}", &{modelname}::{pname}_, {value}, 0, 0, false, false, Interface::nolimits); """ # sort out the couplings couplingDefns = { "QED" : 99, "QCD" : 99 } try : for coupling in FR.all_orders: name = coupling.name.upper() couplingDefns[name]= coupling.expansion_order except: for coupling in FR.all_couplings: for name,value in coupling.order.iteritems(): if(name not in couplingDefns) : couplingDefns[name]=99 # sort out the particles massnames = {} widthnames = {} for particle in FR.all_particles: # skip ghosts and goldstones if(isGhost(particle) or isGoldstone(particle)) : continue - if particle.mass != 'ZERO': - massnames[particle.mass] = abs(particle.pdg_code) + if particle.mass != 'ZERO' and particle.mass.name != 'ZERO': + if(particle.mass in massnames) : + if(abs(particle.pdg_code) not in massnames[particle.mass]) : + massnames[particle.mass].append(abs(particle.pdg_code)) + else : + massnames[particle.mass] = [abs(particle.pdg_code)] - if particle.width != 'ZERO': - widthnames[particle.width] = abs(particle.pdg_code) + if particle.width != 'ZERO' and particle.width.name != 'ZERO': + if(particle.width in widthnames) : + if(abs(particle.pdg_code) not in widthnames[particle.width]) : + widthnames[particle.width].append(abs(particle.pdg_code)) + else : + widthnames[particle.width] = [abs(particle.pdg_code)] interfaceDecls = [] modelparameters = {} for p in FR.all_parameters: value = parmsubs[p.name] if p.type == 'real': assert( value.imag < 1.0e-16 ) value = value.real if p.nature == 'external': if p not in massnames and p not in widthnames: interfaceDecls.append( interfacedecl_T.format(modelname=modelname, pname=p.name, value=value, type=typemap(p.type)) ) else: interfaceDecls.append('\n// no interface for %s. Use particle definition instead.\n' % p.name) if hasattr(p,'lhablock'): lhalabel = '{lhablock}_{lhacode}'.format( lhablock=p.lhablock.upper(), lhacode='_'.join(map(str,p.lhacode)) ) if p not in massnames and p not in widthnames: parmmodelconstr.append('set %s:%s ${%s}' % (modelname, p.name, lhalabel)) else: parmmodelconstr.append('# %s is taken from the particle setup' % p.name) modelparameters[lhalabel] = value parmsubs[p.name] = lhalabel else: if p not in massnames and p not in widthnames: parmmodelconstr.append('set %s:%s %s' % (modelname, p.name, value)) else: parmmodelconstr.append('# %s is taken from the particle setup' % p.name) parmsubs[p.name] = value if p not in massnames and p not in widthnames: parmconstr.append('%s_(%s)' % (p.name, value)) else: parmconstr.append('%s_()' % p.name) else : parmconstr.append('%s_()' % p.name) parmsubs[p.name] = value elif p.type == 'complex': value = complex(value) if p.nature == 'external': # # TODO: WE DO NOT HAVE COMPLEX INTERFACES IN THEPEG (yet?) # # interfaceDecls.append( # interfacedecl_T.format(modelname=modelname, # pname=p.name, # value='Complex(%s,%s)'%(value.real,value.imag), # type=typemap(p.type)) # ) # # parmmodelconstr.append('set %s:%s (%s,%s)' % (modelname, p.name, value.real, value.imag)) parmconstr.append('%s_(%s,%s)' % (p.name, value.real, value.imag)) else : parmconstr.append('%s_(%s,%s)' % (p.name, 0.,0.)) parmsubs[p.name] = value else: raise Exception('Unknown data type "%s".' % p.type) parmdecls.append(' %s %s_;' % (typemap(p.type), p.name)) parmgetters.append(' %s %s() const { return %s_; }' % (typemap(p.type),p.name, p.name)) paramsforstream.append('%s_' % p.name) expression, symbols = 'return %s_' % p.name, None if p.nature != 'external': expression, symbols = py2cpp(p.value) text = add_brackets(expression, symbols) text=text.replace('()()','()') doinit.append(' %s_ = %s;' % (p.name, text) ) if p in massnames: - doinit.append(' resetMass(%s,%s_ * GeV);' % (massnames[p], p.name) ) - elif p in widthnames: - doinit.append(' getParticleData(%s)->width(%s_ * GeV);' % (widthnames[p], p.name) ) - doinit.append(' getParticleData(%s)->cTau (%s_ == 0.0 ? Length() : hbarc/(%s_*GeV));' % (widthnames[p], p.name, p.name) ) - doinit.append(' getParticleData(%s)->widthCut(10. * %s_ * GeV);' % (widthnames[p], p.name) ) + for idCode in massnames[p] : + doinit.append(' resetMass(%s,%s_ * GeV);' % (idCode, p.name) ) + if p in widthnames: + for idCode in widthnames[p] : + doinit.append(' getParticleData(%s)->width(%s_ * GeV);' % (idCode, p.name) ) + doinit.append(' getParticleData(%s)->cTau (%s_ == 0.0 ? Length() : hbarc/(%s_*GeV));' % (idCode, p.name, p.name) ) + doinit.append(' getParticleData(%s)->widthCut(10. * %s_ * GeV);' % (idCode, p.name) ) elif p.nature == 'external': if p in massnames: - doinit.append(' %s_ = getParticleData(%s)->mass() / GeV;' % (p.name, massnames[p]) ) - elif p in widthnames: - doinit.append(' %s_ = getParticleData(%s)->width() / GeV;' % (p.name, widthnames[p]) ) + for idCode in massnames[p] : + doinit.append(' %s_ = getParticleData(%s)->mass() / GeV;' % (p.name, idCode) ) + if p in widthnames: + for idCode in widthnames[p] : + doinit.append(' %s_ = getParticleData(%s)->width() / GeV;' % (p.name, idCode) ) if args.verbose: pprint.pprint((p.name,p.value, value, p.nature)) pcwriter = ParamCardWriter(FR.all_parameters) paramcard_output = '\n'.join(pcwriter.output) ### special treatment # if p.name == 'aS': # expression = '0.25 * sqr(strongCoupling(q2)) / Constants::pi' # elif p.name == 'aEWM1': # expression = '4.0 * Constants::pi / sqr(electroMagneticCoupling(q2))' # elif p.name == 'Gf': # expression = 'generator()->standardModel()->fermiConstant() * GeV2' paramconstructor=': ' for ncount in range(0,len(parmconstr)) : paramconstructor += parmconstr[ncount] if(ncount != len(parmconstr) -1) : paramconstructor += ',' if(ncount%5 == 0 ) : paramconstructor += "\n" paramout="" paramin ="" for ncount in range(0,len(paramsforstream)) : if(ncount !=0 ) : paramout += "<< " + paramsforstream[ncount] paramin += ">> " + paramsforstream[ncount] else : paramout += paramsforstream[ncount] paramin += paramsforstream[ncount] if(ncount%5 == 0 ) : paramout += "\n" paramin += "\n" parmtextsubs = { 'parmgetters' : '\n'.join(parmgetters), 'parmdecls' : '\n'.join(parmdecls), 'parmconstr' : paramconstructor, 'getters' : '', 'decls' : '', 'addVertex' : '', 'doinit' : '\n'.join(doinit), 'ostream' : paramout, 'istream' : paramin , 'refs' : '', 'parmextinter': ''.join(interfaceDecls), 'ModelName': modelname, 'calcfunctions': '', 'param_card_data': paramcard_output } ################################################## ################################################## ################################################## # set up the conversion of the vertices vertexConverter = VertexConverter(FR,parmvalues,couplingDefns) vertexConverter.readArgs(args) # convert the vertices vertexConverter.convert() cdefs="" couplingOrders="" ncount=2 for name,value in couplingDefns.iteritems() : if(name=="QED") : couplingOrders+=" setCouplings(\"%s\",make_pair(%s,%s));\n" %(name,1,value) elif (name=="QCD") : couplingOrders+=" setCouplings(\"%s\",make_pair(%s,%s));\n" %(name,2,value) else : ncount+=1 cdefs +=" const T %s = %s;\n" % (name,ncount) couplingOrders+=" setCouplings(\"%s\",make_pair(%s,%s));\n" % (name,ncount,value) # coupling definitions couplingTemplate= """\ namespace ThePEG {{ namespace Helicity {{ namespace CouplingType {{ typedef unsigned T; /** * Enums for couplings */ {coup} }} }} }} """ if(cdefs!="") : cdefs = couplingTemplate.format(coup=cdefs) parmtextsubs['couplings'] = cdefs parmtextsubs['couplingOrders'] = couplingOrders # particles plist, names = thepeg_particles(FR,parmsubs,modelname,modelparameters,args.forbidden_particle_name) particlelist = [ "# insert HPConstructor:Outgoing 0 /Herwig/{n}/Particles/{p}".format(n=modelname,p=p) for p in names ] # make the first one active to have something runnable in the example .in file particlelist[0] = particlelist[0][2:] particlelist = '\n'.join(particlelist) modelfilesubs = { 'plist' : plist, 'vlist' : vertexConverter.get_vertices(libname), 'setcouplings': '\n'.join(parmmodelconstr), 'ModelName': modelname } # write the files from templates according to the above subs if vertexConverter.should_print(): MODEL_HWIN = getTemplate('LHC-FR.in') if(not args.split_model) : MODEL_CC = [getTemplate('Model.cc')] else : MODEL_EXTRA_CC=getTemplate('Model6.cc') extra_names=[] extra_calcs=[] parmtextsubs['doinit']="" for i in range(0,len(doinit)) : if( i%20 == 0 ) : function_name = "initCalc" +str(int(i/20)) parmtextsubs['doinit'] += function_name +"();\n" parmtextsubs['calcfunctions'] += "void " + function_name + "();\n" extra_names.append(function_name) extra_calcs.append("") extra_calcs[-1] += doinit[i] + "\n" for i in range(0,len(extra_names)) : ccname = '%s_extra_%s.cc' % (modelname,i) writeFile( ccname, MODEL_EXTRA_CC.substitute({'ModelName' : modelname, 'functionName' : extra_names[i], 'functionCalcs' : extra_calcs[i] }) ) MODEL_CC = [getTemplate('Model1.cc'),getTemplate('Model2.cc'),getTemplate('Model3.cc'), getTemplate('Model4.cc'),getTemplate('Model5.cc')] MODEL_H = getTemplate('Model.h') print 'LENGTH',len(MODEL_CC) MODELINFILE = getTemplate('FR.model') writeFile( 'LHC-%s.in' % modelname, MODEL_HWIN.substitute({ 'ModelName' : modelname, 'Particles' : particlelist }) ) modeltemplate = Template( MODELINFILE.substitute(modelfilesubs) ) writeFile( '%s.h' % modelname, MODEL_H.substitute(parmtextsubs) ) for i in range(0,len(MODEL_CC)) : if(len(MODEL_CC)==1) : ccname = '%s.cc' % modelname else : ccname = '%s.cc' % (modelname + str(i)) writeFile( ccname, MODEL_CC[i].substitute(parmtextsubs) ) writeFile( modelname +'.template', modeltemplate.template ) writeFile( modelname +'.model', modeltemplate.substitute( modelparameters ) ) # copy the Makefile-FR to current directory, # replace with the modelname for compilation with open(os.path.join(modulepath,'Makefile-FR'),'r') as orig: with open('Makefile','w') as dest: dest.write(orig.read().replace("FeynrulesModel.so", libname)) print 'finished generating model:\t', modelname print 'model directory:\t\t', args.ufodir print 'generated:\t\t\t', len(FR.all_vertices), 'vertices' print '='*60 print 'library:\t\t\t', libname print 'input file:\t\t\t', 'LHC-' + modelname +'.in' print 'model file:\t\t\t', modelname +'.model' print '='*60 print """\ To complete the installation, compile by typing "make". An example input file is provided as LHC-FRModel.in, you'll need to change the required particles in there. """ print 'DONE!' print '='*60 diff --git a/Models/Feynrules/python/ufo2peg/converter.py b/Models/Feynrules/python/ufo2peg/converter.py --- a/Models/Feynrules/python/ufo2peg/converter.py +++ b/Models/Feynrules/python/ufo2peg/converter.py @@ -1,185 +1,189 @@ """ AST visitor class to convert Python expressions into C++ as used by ThePEG """ import ast convertHerwig=False def py2cpp(expr,con=False): """Convert expr to C++ form. Wraps the converter class.""" global convertHerwig convertHerwig=con result = PyToCpp().parse(expr) return result class PyToCppException(Exception): """Base class for all PyToCpp exceptions.""" class PyToCpp(ast.NodeVisitor): """Convert Python math expressions into C++. Returns a tuple (expr,syms): expr -- C++-compatible expression syms -- set of all free variables Usage: >>> expr = '3+2**a*b' >>> PyToCpp().parse(expr) ('(3.0+(pow(2.0,a)*b))', set(['a', 'b'])) Note: The converter is currently not generic, it relies on the conventions of Feynrules' UFO format on the one hand and ThePEG's C++ types on the other. """ def parse(self,expression): """Convert expression to C++ format.""" self.result = [] self.symbols = set() expression=expression.replace("abs(","cmath.abs(") tree = ast.parse(expression) #print ast.dump(tree) return self.visit(tree) ################################## def visit_Module(self,node): self.generic_visit(node) return ''.join(self.result), self.symbols def generic_visit(self,node): typename = type(node).__name__ harmless = ['Module','Expr'] if typename not in harmless: raise PyToCppException('Missing implementation for %s' % typename) super(PyToCpp,self).generic_visit(node) def visit_UnaryOp(self,node): self.result.append('(') self.visit(node.op) self.visit(node.operand) self.result.append(')') def visit_BinOp(self,node): if type(node.op) == type(ast.Pow()): return self.pow_node(node) self.result.append('(') self.visit(node.left) self.visit(node.op) self.visit(node.right) self.result.append(')') def pow_node(self,node): if is_square(node): self.result.append('sqr(') self.visit(node.left) self.result.append(')') else: self.result.append('pow(') self.visit(node.left) self.result.append(',') self.visit(node.right) self.result.append(')') def visit_Call(self,node): if is_ii(node): self.result.append('ii') else: self.visit(node.func) self.result.append('(') for a in node.args: self.visit(a) self.result.append(',') if self.result[-1] == ',': del self.result[-1] self.result.append(')') def visit_Attribute(self,node): if node.value.id != 'cmath': err = "Don't know how to convert %s module." % node.value.id raise PyToCppException(err) self.result.append(node.attr) def visit_Num(self,node): # some zeros are encoded as 0j if node.n == 0: text = '0.0' elif (node.n==complex("1j") ) : text = "ii" elif (node.n==complex("-1j") ) : text = "-ii" elif (node.n==complex("2j") ) : text = "2.*ii" else: text = str(float(node.n)) self.result.append(text) def visit_Name(self,node): text = str(node.id) if text == 'complex': text = 'Complex' elif text == 'complexconjugate': text = 'conj' + elif text == 'im': + text = 'imag' + elif text == 're': + text = 'real' elif convertHerwig : if text == 'I' : text = "ii" elif ( text.find("UnitRemoval")==0) : text = "%s::%s" % (text[:11],text[11:]) elif(text[0]=="P" or text[0]=="E" or text[0] == "V") : if text[-1] in ["x","y","z","t"] : text = "%s.%s()" % (text[0:-1],text[-1]) elif(text[0]=="R") : text = "%s.%s()" % (text[:-3],text[-3:]) elif(text[0]=="s") : text = "%s.%s()" % (text[:-2],text[-2:]) elif text not in []: self.symbols.add(text) self.result.append(text) def visit_Mult(self,node): self.result.append('*') def visit_Add(self,node): self.result.append('+') def visit_Sub(self,node): self.result.append('-') def visit_USub(self,node): self.result.append('-') def visit_UAdd(self,node): self.result.append('+') def visit_Div(self,node): self.result.append('/') def visit_Pow(self,node): err = "Shold never get here. BinaryOp catches Pow calls." raise PyToCppException(err) ### Helpers def is_square(node): """Check if a Pow object is just a square.""" try: return node.right.n == 2.0 except: return False def is_ii(node): """Check if a Call object is just the imaginary unit.""" try: return ( node.func.id == 'complex' and node.args[0].n == 0 and node.args[1].n == 1 ) except: return False if __name__ == "__main__": import doctest doctest.testmod() diff --git a/Models/General/ModelGenerator.cc b/Models/General/ModelGenerator.cc --- a/Models/General/ModelGenerator.cc +++ b/Models/General/ModelGenerator.cc @@ -1,556 +1,556 @@ // -*- C++ -*- // // ModelGenerator.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 ModelGenerator class. // #include "ModelGenerator.h" #include "ThePEG/Utilities/DescribeClass.h" #include "ThePEG/Interface/Reference.h" #include "ThePEG/Interface/RefVector.h" #include "ThePEG/Interface/Switch.h" #include "ThePEG/Interface/Parameter.h" #include "ThePEG/Persistency/PersistentOStream.h" #include "ThePEG/Persistency/PersistentIStream.h" #include "ThePEG/PDT/DecayMode.h" #include "ThePEG/Repository/CurrentGenerator.h" #include "BSMWidthGenerator.h" #include "Herwig/PDT/GenericMassGenerator.h" #include "Herwig/Decay/DecayIntegrator.h" #include "ThePEG/Repository/BaseRepository.h" using namespace Herwig; IBPtr ModelGenerator::clone() const { return new_ptr(*this); } IBPtr ModelGenerator::fullclone() const { return new_ptr(*this); } void ModelGenerator::persistentOutput(PersistentOStream & os) const { os << hardProcessConstructors_ << _theDecayConstructor << particles_ << offshell_ << Offsel_ << BRnorm_ << twoBodyOnly_ << howOffShell_ << Npoints_ << Iorder_ << BWshape_ << brMin_ << decayOutput_; } void ModelGenerator::persistentInput(PersistentIStream & is, int) { is >> hardProcessConstructors_ >> _theDecayConstructor >> particles_ >> offshell_ >> Offsel_ >> BRnorm_ >> twoBodyOnly_ >> howOffShell_ >> Npoints_ >> Iorder_ >> BWshape_ >> brMin_ >> decayOutput_; } // Static variable needed for the type description system in ThePEG. DescribeClass describeThePEGModelGenerator("Herwig::ModelGenerator", "Herwig.so"); void ModelGenerator::Init() { static ClassDocumentation documentation ("This class controls the the use of BSM physics.", "BSM physics was produced using the algorithm of " "\\cite{Gigg:2007cr,Gigg:2008yc}", "\\bibitem{Gigg:2007cr} M.~Gigg and P.~Richardson, \n" "Eur.\\ Phys.\\ J.\\ C {\\bf 51} (2007) 989.\n" "%%CITATION = EPHJA,C51,989;%%\n" " %\\cite{Gigg:2008yc}\n" "\\bibitem{Gigg:2008yc}\n" " M.~A.~Gigg and P.~Richardson,\n" " %``Simulation of Finite Width Effects in Physics Beyond the Standard Model,''\n" " arXiv:0805.3037 [hep-ph].\n" " %%CITATION = ARXIV:0805.3037;%%\n" ); static RefVector interfaceHardProcessConstructors ("HardProcessConstructors", "The objects to construct hard processes", &ModelGenerator::hardProcessConstructors_, -1, false, false, true, false, false); static Reference interfaceDecayConstructor ("DecayConstructor", "Pointer to DecayConstructor helper class", &ModelGenerator::_theDecayConstructor, false, false, true, false); static RefVector interfaceModelParticles ("DecayParticles", "ParticleData pointers to the particles requiring spin correlation " "decayers. If decay modes do not exist they will also be created.", &ModelGenerator::particles_, -1, false, false, true, false); static RefVector interfaceOffshell ("Offshell", "The particles to treat as off-shell", &ModelGenerator::offshell_, -1, false, false, true, false); static Switch interfaceWhichOffshell ("WhichOffshell", "A switch to determine which particles to create mass and width " "generators for.", &ModelGenerator::Offsel_, 0, false, false); static SwitchOption interfaceWhichOffshellSelected (interfaceWhichOffshell, "Selected", "Only create mass and width generators for the particles specified", 0); static SwitchOption interfaceWhichOffshellAll (interfaceWhichOffshell, "All", "Treat all particles specified in the DecayParticles " "list as off-shell", 1); static Switch interfaceBRNormalize ("BRNormalize", "Whether to normalize the partial widths to BR*total width for an " "on-shell particle", &ModelGenerator::BRnorm_, true, false, false); static SwitchOption interfaceBRNormalizeNormalize (interfaceBRNormalize, "Yes", "Normalize the partial widths", true); static SwitchOption interfaceBRNormalizeNoNormalize (interfaceBRNormalize, "No", "Do not normalize the partial widths", false); static Parameter interfacePoints ("InterpolationPoints", "Number of points to use for interpolation tables when needed", &ModelGenerator::Npoints_, 10, 5, 1000, false, false, true); static Parameter interfaceInterpolationOrder ("InterpolationOrder", "The interpolation order for the tables", &ModelGenerator::Iorder_, 1, 1, 5, false, false, Interface::limited); static Switch interfaceBreitWignerShape ("BreitWignerShape", "Controls the shape of the mass distribution generated", &ModelGenerator::BWshape_, 0, false, false); static SwitchOption interfaceBreitWignerShapeDefault (interfaceBreitWignerShape, "Default", "Running width with q in numerator and denominator width factor", 0); static SwitchOption interfaceBreitWignerShapeFixedWidth (interfaceBreitWignerShape, "FixedWidth", "Use a fixed width", 1); static SwitchOption interfaceBreitWignerShapeNoq (interfaceBreitWignerShape, "Noq", "Use M rather than q in the numerator and denominator width factor", 2); static SwitchOption interfaceBreitWignerShapeNoNumerator (interfaceBreitWignerShape, "NoNumerator", "Neglect the numerator factors", 3); static Switch interfaceTwoBodyOnly ("TwoBodyOnly", "Whether to use only two-body or all modes in the running width calculation", &ModelGenerator::twoBodyOnly_, false, false, false); static SwitchOption interfaceTwoBodyOnlyYes (interfaceTwoBodyOnly, "Yes", "Only use two-body modes", true); static SwitchOption interfaceTwoBodyOnlyNo (interfaceTwoBodyOnly, "No", "Use all modes", false); static Parameter interfaceMinimumBR ("MinimumBR", "The minimum branching fraction to include", &ModelGenerator::brMin_, 1e-6, 0.0, 1.0, false, false, Interface::limited); static Switch interfaceDecayOutput ("DecayOutput", "Option to control the output of the decay mode information", &ModelGenerator::decayOutput_, 1, false, false); static SwitchOption interfaceDecayOutputNone (interfaceDecayOutput, "None", "No output", 0); static SwitchOption interfaceDecayOutputPlain (interfaceDecayOutput, "Plain", "Default plain text output", 1); static SwitchOption interfaceDecayOutputSLHA (interfaceDecayOutput, "SLHA", "Output in the Susy Les Houches Accord format", 2); static Parameter interfaceMinimumWidthFraction ("MinimumWidthFraction", "Minimum fraction of the particle's mass the width can be" " for the off-shell treatment.", &ModelGenerator::minWidth_, 1e-6, 1e-15, 1., false, false, Interface::limited); static Parameter interfaceHowMuchOffShell ("HowMuchOffShell", "The multiple of the particle's width by which it is allowed to be off-shell", &ModelGenerator::howOffShell_, 5., 0.0, 100., false, false, Interface::limited); } namespace { /// Helper function for sorting by mass inline bool massIsLess(tcPDPtr a, tcPDPtr b) { return a->mass() < b->mass(); } // Helper function to find minimum possible mass of a particle inline Energy minimumMass(tcPDPtr parent) { Energy output(Constants::MaxEnergy); for(set::const_iterator dit = parent->decayModes().begin(); dit != parent->decayModes().end(); ++dit) { Energy outMass(ZERO); for(unsigned int ix=0;ix<(**dit).orderedProducts().size();++ix) { outMass += (**dit).orderedProducts()[ix]->massMin(); } output = min(output,outMass); } return output; } } void ModelGenerator::doinit() { useMe(); Interfaced::doinit(); // make sure the model is initialized Ptr::pointer model = dynamic_ptr_cast::pointer>(generator()->standardModel()); model->init(); // and the vertices for(size_t iv = 0; iv < model->numberOfVertices(); ++iv) model->vertex(iv)->init(); // uniq and sort DecayParticles list by mass set tmp(particles_.begin(),particles_.end()); particles_.assign(tmp.begin(),tmp.end()); sort(particles_.begin(),particles_.end(),massIsLess); //create decayers and decaymodes (if necessary) if( _theDecayConstructor ) { _theDecayConstructor->init(); _theDecayConstructor->createDecayers(particles_,brMin_); } // write out decays with spin correlations ostream & os = CurrentGenerator::current().misc(); ofstream ofs; if ( decayOutput_ > 1 ) { string filename = CurrentGenerator::current().filename() + "-BR.spc"; ofs.open(filename.c_str()); } if(decayOutput_!=0) { if(decayOutput_==1) { os << "# The decay modes listed below will have spin\n" << "# correlations included when they are generated.\n#\n#"; } else { ofs << "# Herwig decay tables in SUSY Les Houches accord format\n"; ofs << "Block DCINFO # Program information\n"; ofs << "1 Herwig # Decay Calculator\n"; ofs << "2 " << generator()->strategy()->versionstring() << " # Version number\n"; } } //create mass and width generators for the requested particles set offShell; if( Offsel_ == 0 ) offShell = set(offshell_.begin() ,offshell_.end() ); else offShell = set(particles_.begin(),particles_.end()); for(PDVector::iterator pit = particles_.begin(); pit != particles_.end(); ++pit) { tPDPtr parent = *pit; // Check decays for ones where quarks cannot be put on constituent // mass-shell checkDecays(parent); parent->reset(); // Now switch off the modes if needed for(DecaySet::const_iterator it=parent->decayModes().begin(); it!=parent->decayModes().end();++it) { if( _theDecayConstructor->disableDecayMode((**it).tag()) ) { DMPtr mode = *it; generator()->preinitInterface(mode, "Active", "set", "No"); if(mode->CC()) { DMPtr CCmode = mode->CC(); generator()->preinitInterface(CCmode, "Active", "set", "No"); } } } parent->update(); if( parent->CC() ) parent->CC()->synchronize(); if( parent->decaySelector().empty() ) { parent->stable(true); parent->width(ZERO); parent->widthCut(ZERO); parent->massGenerator(tGenericMassGeneratorPtr()); parent->widthGenerator(tGenericWidthGeneratorPtr()); } else { if(parent->mass()*minWidth_>parent->width()) { parent->massGenerator(tGenericMassGeneratorPtr()); parent->widthGenerator(tGenericWidthGeneratorPtr()); } else { if( offShell.find(*pit) != offShell.end() ) { createWidthGenerator(*pit); } else { parent->massGenerator(tGenericMassGeneratorPtr()); parent->widthGenerator(tGenericWidthGeneratorPtr()); } } } // set the offshellness Energy minMass = minimumMass(parent); Energy offShellNess = howOffShell_*parent->width(); if(minMass>parent->mass()-offShellNess) { offShellNess = parent->mass()-minMass; } parent->widthCut(offShellNess); if( parent->massGenerator() ) { parent->massGenerator()->reset(); if(decayOutput_==1) os << "# " <PDGName() << " will be considered off-shell.\n#\n"; } if( parent->widthGenerator() ) parent->widthGenerator()->reset(); } // loop again to initialise mass and width generators // switch off modes and write output for(PDVector::iterator pit = particles_.begin(); pit != particles_.end(); ++pit) { tPDPtr parent = *pit; if(parent->widthGenerator()) parent->widthGenerator()->init(); if(parent->massGenerator()) parent->massGenerator()->init(); // output the modes if needed if( !parent->decaySelector().empty() ) { if ( decayOutput_ == 2 ) writeDecayModes(ofs, parent); else writeDecayModes(os, parent); } } //Now construct hard processes given that we know which //objects have running widths for(unsigned int ix=0;ixinit(); hardProcessConstructors_[ix]->constructDiagrams(); } } void ModelGenerator::checkDecays(PDPtr parent) { if( parent->stable() ) { if(parent->coloured()) cerr << "Warning: No decays for coloured particle " << parent->PDGName() << "\n\n" << "have been calcluated in BSM model.\n" << "This may cause problems in the hadronization phase.\n" << "You may have forgotten to switch on the decay mode calculation using\n" << " set TwoBodyDC:CreateDecayModes Yes\n" << " set ThreeBodyDC:CreateDecayModes Yes\n" << " set WeakDecayConstructor:CreateDecayModes Yes\n" << "or the decays of this particle are missing from your\n" << "input spectrum and decay file in the SLHA format.\n\n"; return; } DecaySet::iterator dit = parent->decayModes().begin(); DecaySet::iterator dend = parent->decayModes().end(); Energy oldwidth(parent->width()), newwidth(ZERO); bool rescalebrat(false); double brsum(0.); for(; dit != dend; ++dit ) { if( !(**dit).on() ) continue; Energy release((**dit).parent()->mass()); tPDVector::const_iterator pit = (**dit).orderedProducts().begin(); tPDVector::const_iterator pend =(**dit).orderedProducts().end(); for( ; pit != pend; ++pit ) { release -= (**pit).constituentMass(); } if( (**dit).brat() < brMin_ || release < ZERO ) { if( release < ZERO ) cerr << "Warning: The shower cannot be generated using this decay " << (**dit).tag() << " because it is too close to threshold.\nIt " << "will be switched off and the branching fractions of the " << "remaining modes rescaled.\n"; rescalebrat = true; generator()->preinitInterface(*dit, "Active", "set", "No"); generator()->preinitInterface(*dit, "BranchingRatio", "set", "0.0"); DecayIntegratorPtr decayer = dynamic_ptr_cast((**dit).decayer()); if(decayer) { generator()->preinitInterface(decayer->fullName(), "Initialize", "set","0"); } } else { brsum += (**dit).brat(); newwidth += (**dit).brat()*oldwidth; } } // if no modes left set stable if(newwidth==ZERO) { parent->stable(true); parent->width(ZERO); parent->widthCut(ZERO); parent->massGenerator(tGenericMassGeneratorPtr()); parent->widthGenerator(tGenericWidthGeneratorPtr()); } // otherwise rescale if needed else if( ( rescalebrat || abs(brsum - 1.) > 1e-12 ) && !parent->decayModes().empty()) { dit = parent->decayModes().begin(); dend = parent->decayModes().end(); double factor = oldwidth/newwidth; brsum = 0.; for( ; dit != dend; ++dit ) { if( !(**dit).on() ) continue; double newbrat = ((**dit).brat())*factor; brsum += newbrat; ostringstream brf; brf << setprecision(13) << newbrat; generator()->preinitInterface(*dit, "BranchingRatio", "set", brf.str()); } parent->width(newwidth); if( newwidth > ZERO ) parent->cTau(hbarc/newwidth); } } namespace { struct DecayModeOrdering { - bool operator()(tcDMPtr m1, tcDMPtr m2) { + bool operator()(tcDMPtr m1, tcDMPtr m2) const { if(m1->brat()!=m2->brat()) { return m1->brat()>m2->brat(); } else { if(m1->products().size()==m2->products().size()) { ParticleMSet::const_iterator it1=m1->products().begin(); ParticleMSet::const_iterator it2=m2->products().begin(); do { if((**it1).id()!=(**it2).id()) { return (**it1).id()>(**it2).id(); } ++it1; ++it2; } while(it1!=m1->products().end()&& it2!=m2->products().end()); assert(false); } else return m1->products().size()products().size(); } return false; } }; } void ModelGenerator::writeDecayModes(ostream & os, tcPDPtr parent) const { if(decayOutput_==0) return; set modes(parent->decayModes().begin(), parent->decayModes().end()); if(decayOutput_==1) { os << " Parent: " << parent->PDGName() << " Mass (GeV): " << parent->mass()/GeV << " Total Width (GeV): " << parent->width()/GeV << endl; os << std::left << std::setw(40) << '#' << std::left << std::setw(20) << "Partial Width/GeV" << std::left << std::setw(20) << "BR" << "Yes/No\n"; for(set::iterator dit=modes.begin(); dit!=modes.end();++dit) os << std::left << std::setw(40) << (**dit).tag() << std::left << std::setw(20) << (**dit).brat()*parent->width()/GeV << std::left << std::setw(20) << (**dit).brat() << ((**dit).on() ? "Yes" : "No" ) << '\n'; os << "#\n#"; } else if(decayOutput_==2) { os << "# \t PDG \t Width\n"; os << "DECAY\t" << parent->id() << "\t" << parent->width()/GeV << "\t # " << parent->PDGName() << "\n"; for(set::iterator dit=modes.begin(); dit!=modes.end();++dit) { os << "\t" << std::left << std::setw(10) << (**dit).brat() << "\t" << (**dit).orderedProducts().size() << "\t"; for(unsigned int ix=0;ix<(**dit).orderedProducts().size();++ix) os << std::right << std::setw(10) << (**dit).orderedProducts()[ix]->id() ; for(unsigned int ix=(**dit).orderedProducts().size();ix<4;++ix) os << "\t"; os << "# " << (**dit).tag() << "\n"; } } } void ModelGenerator::createWidthGenerator(tPDPtr p) { string wn = p->fullName() + string("-WGen"); string mn = p->fullName() + string("-MGen"); GenericMassGeneratorPtr mgen = dynamic_ptr_cast (generator()->preinitCreate("Herwig::GenericMassGenerator", mn)); BSMWidthGeneratorPtr wgen = dynamic_ptr_cast (generator()->preinitCreate("Herwig::BSMWidthGenerator", wn)); //set the particle interface mgen->particle(p); wgen->particle(p); //set the generator interfaces in the ParticleData object generator()->preinitInterface(p, "Mass_generator","set", mn); generator()->preinitInterface(p, "Width_generator","set", wn); //allow the branching fraction of this particle type to vary p->variableRatio(true); if( p->CC() ) p->CC()->variableRatio(true); //initialize the generators generator()->preinitInterface(mgen, "Initialize", "set", "Yes"); generator()->preinitInterface(wgen, "Initialize", "set", "Yes"); string norm = BRnorm_ ? "Yes" : "No"; generator()->preinitInterface(wgen, "BRNormalize", "set", norm); string twob = twoBodyOnly_ ? "Yes" : "No"; generator()->preinitInterface(wgen, "TwoBodyOnly", "set", twob); ostringstream os; os << Npoints_; generator()->preinitInterface(wgen, "Points", "set", os.str()); os.str(""); os << Iorder_; generator()->preinitInterface(wgen, "InterpolationOrder", "set", os.str()); os.str(""); os << BWshape_; generator()->preinitInterface(mgen, "BreitWignerShape", "set", os.str()); } diff --git a/Models/General/PrototypeVertex.h b/Models/General/PrototypeVertex.h --- a/Models/General/PrototypeVertex.h +++ b/Models/General/PrototypeVertex.h @@ -1,477 +1,477 @@ // -*- C++ -*- // // PrototypeVertex.h 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. // #ifndef HERWIG_PrototypeVertex_H #define HERWIG_PrototypeVertex_H #include #include "ThePEG/Helicity/Vertex/VertexBase.h" #include "ThePEG/Persistency/PersistentOStream.h" #include "ThePEG/Persistency/PersistentIStream.h" #include "ThePEG/Utilities/EnumIO.h" #include "NBodyDecayConstructorBase.fh" // // This is the declaration of the PrototypeVertex class. // namespace Herwig { using namespace ThePEG; using Helicity::VertexBasePtr; class PrototypeVertex; ThePEG_DECLARE_POINTERS(Herwig::PrototypeVertex,PrototypeVertexPtr); /** Pair of int,double */ typedef pair CFPair; /** * A struct to order the particles in the same way as in the DecayModes */ struct ParticleOrdering { /** * Operator for the ordering * @param p1 The first ParticleData object * @param p2 The second ParticleData object */ - bool operator() (tcPDPtr p1, tcPDPtr p2) { + bool operator() (tcPDPtr p1, tcPDPtr p2) const { return abs(p1->id()) > abs(p2->id()) || ( abs(p1->id()) == abs(p2->id()) && p1->id() > p2->id() ) || ( p1->id() == p2->id() && p1->fullName() > p2->fullName() ); } }; /** * A struct to order the particles in the same way as in the DecayMode's */ struct VertexOrdering { /** * Operator for the ordering * @param p1 The first ParticleData object * @param p2 The second ParticleData object */ bool operator() (const pair< tPDPtr, PrototypeVertexPtr > & p1, const pair< tPDPtr, PrototypeVertexPtr > & p2) const { return abs(p1.first->id()) > abs(p2.first->id()) || ( abs(p1.first->id()) == abs(p2.first->id()) && p1.first->id() > p2.first->id() ) || ( p1.first->id() == p2.first->id() && p1.first->fullName() > p2.first->fullName() ); } }; typedef multiset,VertexOrdering > OrderedVertices; /** * A set of ParticleData objects ordered as for the DecayMode's */ typedef multiset OrderedParticles; /** * Storage of a potenital n-body decay */ class PrototypeVertex : public Base { public: /** * Default Constructor */ PrototypeVertex() : npart(0), possibleOnShell(false) {} /** * Constructor */ PrototypeVertex(tPDPtr in, OrderedVertices out, VertexBasePtr v, int n) : incoming(in), outgoing(out), vertex(v), npart(n), possibleOnShell(false) {} /** * Incoming particle */ tPDPtr incoming; /** * Outgoing particles */ OrderedVertices outgoing; /** * The vertex for the interaction */ VertexBasePtr vertex; /** * The parent of the vertex */ tPrototypeVertexPtr parent; /** * Number of particles */ unsigned int npart; /** * Outgoing particles */ mutable OrderedParticles outPart; /** * Can have on-shell intermediates */ bool possibleOnShell; /** * Increment the number of particles */ void incrementN(int in) { npart += in; if(parent) parent->incrementN(in); } /** * Mass of the incoming particle */ Energy incomingMass() { return incoming->mass(); } /** * Total mass of all the outgoing particles */ Energy outgoingMass() { Energy mass(ZERO); for(OrderedVertices::const_iterator it = outgoing.begin(); it!=outgoing.end();++it) { mass += it->second ? it->second->outgoingMass() : it->first->mass(); } return mass; } /** * Total constituent mass of all the outgoing particles */ Energy outgoingConstituentMass() { Energy mass(ZERO); for(OrderedVertices::const_iterator it = outgoing.begin(); it!=outgoing.end();++it) { mass += it->second ? it->second->outgoingConstituentMass() : it->first->constituentMass(); } return mass; } /** * Check the external particles */ bool checkExternal(bool first=true) { if(outPart.empty()) setOutgoing(); if(first&&outPart.find(incoming)!=outPart.end()) return false; bool output = true; for(OrderedVertices::const_iterator it = outgoing.begin(); it!=outgoing.end();++it) { if(it->second&& !it->second->checkExternal(false)) output = false; } return output; } /** * Set the outgoing particles */ void setOutgoing() const { assert(outPart.empty()); for(OrderedVertices::const_iterator it = outgoing.begin(); it!=outgoing.end();++it) { if(it->second) { it->second->setOutgoing(); outPart.insert(it->second->outPart.begin(), it->second->outPart.end()); } else outPart.insert(it->first); } } /** * Are there potential on-shell intermediates? */ bool canBeOnShell(unsigned int opt,Energy maxMass,bool first); /** * Check if same external particles */ bool sameDecay(const PrototypeVertex & x) const; /** * Create a \f$1\to2\f$ prototype */ static void createPrototypes(tPDPtr inpart, VertexBasePtr vertex, std::stack & prototypes, NBodyDecayConstructorBasePtr decayCon); /** * Expand the prototypes by adding more legs */ static void expandPrototypes(PrototypeVertexPtr proto, VertexBasePtr vertex, std::stack & prototypes, const set & excluded, NBodyDecayConstructorBasePtr decayCon); /** * Copy the whole structure with a new branching */ static PrototypeVertexPtr replicateTree(PrototypeVertexPtr parent, PrototypeVertexPtr oldChild, PrototypeVertexPtr & newChild); }; /** * Output to a stream */ inline ostream & operator<<(ostream & os, const PrototypeVertex & diag) { os << diag.incoming->PDGName() << " -> "; bool seq=false; for(OrderedVertices::const_iterator it = diag.outgoing.begin(); it!=diag.outgoing.end();++it) { os << it->first->PDGName() << " "; if(it->second) seq = true; } os << " decays via " << diag.vertex->fullName() << " in a " << diag.npart << "-body decay\n"; if(!seq) return os; os << "Followed by\n"; for(OrderedVertices::const_iterator it = diag.outgoing.begin(); it!=diag.outgoing.end();++it) { if(it->second) os << *it->second; } return os; } /** * Test whether two diagrams are identical. */ inline bool operator==(const PrototypeVertex & x, const PrototypeVertex & y) { if(x.incoming != y.incoming) return false; if(x.vertex != y.vertex) return false; if(x.npart != y.npart) return false; if(x.outgoing.empty()&&y.outgoing.empty()) return true; if(x.outgoing.size() != y.outgoing.size()) return false; OrderedVertices::const_iterator xt = x.outgoing.begin(); OrderedVertices::const_iterator yt = y.outgoing.begin(); while(xt!=x.outgoing.end()) { if(xt->first != yt->first) return false; // special for identical particles OrderedVertices::const_iterator lxt = x.outgoing.lower_bound(*xt); OrderedVertices::const_iterator uxt = x.outgoing.upper_bound(*xt); --uxt; // just one particle if(lxt==uxt) { if(xt->second && yt->second) { if(*(xt->second)==*(yt->second)) { ++xt; ++yt; continue; } else return false; } else if(xt->second || yt->second) return false; ++xt; ++yt; } // identical particles else { ++uxt; OrderedVertices::const_iterator lyt = y.outgoing.lower_bound(*xt); OrderedVertices::const_iterator uyt = y.outgoing.upper_bound(*xt); unsigned int nx=0; for(OrderedVertices::const_iterator ixt=lxt;ixt!=uxt;++ixt) {++nx;} unsigned int ny=0; for(OrderedVertices::const_iterator iyt=lyt;iyt!=uyt;++iyt) {++ny;} if(nx!=ny) return false; vector matched(ny,false); for(OrderedVertices::const_iterator ixt=lxt;ixt!=uxt;++ixt) { bool found = false; unsigned int iy=0; for(OrderedVertices::const_iterator iyt=lyt;iyt!=uyt;++iyt) { if(matched[iy]) { ++iy; continue; } if( (!ixt->second &&!iyt->second) || ( ixt->second&&iyt->second && *(ixt->second)==*(iyt->second)) ) { matched[iy] = true; found = true; break; } ++iy; } if(!found) return false; } xt=uxt; yt=uyt; } } return true; } /** * A simple vertex for the N-body diagram */ struct NBVertex { /** * Constructor taking a prototype vertex as the arguments */ NBVertex(PrototypeVertexPtr proto = PrototypeVertexPtr() ); /** * Incoming particle */ tPDPtr incoming; /** * Outgoing particles */ mutable OrderedParticles outgoing; /** * The vertices */ list > vertices; /** * The vertex */ VertexBasePtr vertex; }; /** * The NBDiagram struct contains information about a \f$1\to n\f$ decay * that has been automatically generated. */ struct NBDiagram : public NBVertex { /** * Constructor taking a prototype vertex as the arguments*/ NBDiagram(PrototypeVertexPtr proto=PrototypeVertexPtr()); /** * The type of channel */ vector channelType; /** Store colour flow at \f$N_c=3\f$ information */ mutable vector colourFlow; /** Store colour flow at \f$N_c=\infty\f$ information */ mutable vector largeNcColourFlow; }; /** * Output operator to allow the structure to be persistently written * @param os The output stream * @param x The NBVertex */ inline PersistentOStream & operator<<(PersistentOStream & os, const NBVertex & x) { os << x.incoming << x.outgoing << x.vertices << x.vertex; return os; } /** * Input operator to allow persistently written data to be read in * @param is The input stream * @param x The NBVertex */ inline PersistentIStream & operator>>(PersistentIStream & is, NBVertex & x) { is >> x.incoming >> x.outgoing >> x.vertices >> x.vertex; return is; } /** * Output operator to allow the structure to be persistently written * @param os The output stream * @param x The NBDiagram */ inline PersistentOStream & operator<<(PersistentOStream & os, const NBDiagram & x) { os << x.incoming << x.channelType << x.outgoing << x.vertices << x.vertex << x.colourFlow << x.largeNcColourFlow; return os; } /** * Input operator to allow persistently written data to be read in * @param is The input stream * @param x The NBDiagram */ inline PersistentIStream & operator>>(PersistentIStream & is, NBDiagram & x) { is >> x.incoming >> x.channelType >> x.outgoing >> x.vertices >> x.vertex >> x.colourFlow >> x.largeNcColourFlow; return is; } /** * Output a NBVertex to a stream */ inline ostream & operator<<(ostream & os, const NBVertex & vertex) { os << vertex.incoming->PDGName() << " -> "; bool seq=false; for(list >::const_iterator it=vertex.vertices.begin(); it!=vertex.vertices.end();++it) { os << it->first->PDGName() << " "; if(it->second.incoming) seq = true; } os << "via vertex " << vertex.vertex->fullName() << "\n"; if(!seq) return os; os << "Followed by\n"; for(list >::const_iterator it=vertex.vertices.begin(); it!=vertex.vertices.end();++it) { if(it->second.incoming) os << it->second; } return os; } /** * Output a NBDiagram to a stream */ inline ostream & operator<<(ostream & os, const NBDiagram & diag) { os << diag.incoming->PDGName() << " -> "; for(OrderedParticles::const_iterator it=diag.outgoing.begin(); it!=diag.outgoing.end();++it) { os << (**it).PDGName() << " "; } os << " has order "; for(unsigned int ix=0;ixPDGName() << " -> "; bool seq=false; for(list >::const_iterator it=diag.vertices.begin(); it!=diag.vertices.end();++it) { os << it->first->PDGName() << " "; if(it->second.incoming) seq = true; } os << "via vertex " << diag.vertex->fullName() << "\n"; if(!seq) return os; os << "Followed by\n"; for(list >::const_iterator it=diag.vertices.begin(); it!=diag.vertices.end();++it) { if(it->second.incoming) os << it->second; } return os; } } #endif /* HERWIG_PrototypeVertex_H */ diff --git a/Models/Makefile.am b/Models/Makefile.am --- a/Models/Makefile.am +++ b/Models/Makefile.am @@ -1,181 +1,181 @@ SUBDIRS = RSModel StandardModel General Susy UED Zprime \ Transplanckian ADD Leptoquarks Sextet TTbAsymm \ LH LHTP Feynrules noinst_LTLIBRARIES = libHwStandardModel.la nodist_libHwStandardModel_la_SOURCES = \ StandardModel/SM__all.cc libHwStandardModel_la_CPPFLAGS = \ $(AM_CPPFLAGS) -I$(srcdir)/StandardModel noinst_LTLIBRARIES += libHwModelGenerator.la nodist_libHwModelGenerator_la_SOURCES = \ General/ModelGenerator__all.cc libHwModelGenerator_la_CPPFLAGS = \ $(AM_CPPFLAGS) -I$(srcdir)/General if WANT_BSM pkglib_LTLIBRARIES = \ HwRSModel.la \ HwUED.la \ HwSusy.la \ HwNMSSM.la \ HwRPV.la \ HwZprimeModel.la \ HwTransplanck.la \ HwADDModel.la \ HwLeptoquarkModel.la \ HwSextetModel.la \ HwTTbAModel.la \ HwLHModel.la \ HwLHTPModel.la endif ############# HwRSModel_la_LDFLAGS = \ -$(AM_LDFLAGS) -module -version-info 10:0:0 +$(AM_LDFLAGS) -module -version-info 11:0:0 HwRSModel_la_CPPFLAGS = \ $(AM_CPPFLAGS) -I$(srcdir)/RSModel nodist_HwRSModel_la_SOURCES = \ RSModel/RS__all.cc ############# HwUED_la_LDFLAGS = \ -$(AM_LDFLAGS) -module -version-info 10:1:0 +$(AM_LDFLAGS) -module -version-info 11:0:0 HwUED_la_CPPFLAGS = \ $(AM_CPPFLAGS) -I$(srcdir)/UED nodist_HwUED_la_SOURCES = \ UED/UED__all.cc ############# HwSusy_la_LDFLAGS = \ -$(AM_LDFLAGS) -module -version-info 13:2:0 +$(AM_LDFLAGS) -module -version-info 14:0:0 HwSusy_la_CPPFLAGS = \ $(AM_CPPFLAGS) -I$(srcdir)/Susy nodist_HwSusy_la_SOURCES = \ Susy/Susy__all.cc ############# HwNMSSM_la_LDFLAGS = \ -$(AM_LDFLAGS) -module -version-info 5:0:0 +$(AM_LDFLAGS) -module -version-info 6:0:0 HwNMSSM_la_CPPFLAGS = \ $(AM_CPPFLAGS) -I$(srcdir)/Susy/NMSSM nodist_HwNMSSM_la_SOURCES = \ Susy/NMSSM/NMSSM__all.cc ############# HwRPV_la_LDFLAGS = \ -$(AM_LDFLAGS) -module -version-info 3:0:0 +$(AM_LDFLAGS) -module -version-info 4:0:0 HwRPV_la_CPPFLAGS = \ $(AM_CPPFLAGS) -I$(srcdir)/Susy/RPV nodist_HwRPV_la_SOURCES = \ Susy/RPV/RPV__all.cc ############# HwZprimeModel_la_LDFLAGS = \ -$(AM_LDFLAGS) -module -version-info 3:0:0 +$(AM_LDFLAGS) -module -version-info 4:0:0 HwZprimeModel_la_SOURCES = \ Zprime/ZprimeModel.cc Zprime/ZprimeModelZPQQVertex.cc ############# HwTransplanck_la_LDFLAGS = \ -$(AM_LDFLAGS) -module -version-info 4:1:0 +$(AM_LDFLAGS) -module -version-info 5:0:0 HwTransplanck_la_SOURCES = \ Transplanckian/METRP2to2.cc ############# HwADDModel_la_LDFLAGS = \ -$(AM_LDFLAGS) -module -version-info 4:0:0 +$(AM_LDFLAGS) -module -version-info 5:0:0 HwADDModel_la_CPPFLAGS = \ $(AM_CPPFLAGS) -I$(srcdir)/ADD nodist_HwADDModel_la_SOURCES = \ ADD/ADD__all.cc ############# HwLeptoquarkModel_la_LDFLAGS = \ -$(AM_LDFLAGS) -module -version-info 5:0:0 +$(AM_LDFLAGS) -module -version-info 6:0:0 HwLeptoquarkModel_la_CPPFLAGS = \ $(AM_CPPFLAGS) -I$(srcdir)/Leptoquarks nodist_HwLeptoquarkModel_la_SOURCES = \ Leptoquarks/Leptoquark__all.cc ############# HwSextetModel_la_LDFLAGS = \ -$(AM_LDFLAGS) -module -version-info 3:0:0 +$(AM_LDFLAGS) -module -version-info 4:0:0 HwSextetModel_la_CPPFLAGS = \ $(AM_CPPFLAGS) -I$(srcdir)/Sextet nodist_HwSextetModel_la_SOURCES = \ Sextet/Sextet__all.cc ############# HwTTbAModel_la_LDFLAGS = \ -$(AM_LDFLAGS) -module -version-info 3:0:0 +$(AM_LDFLAGS) -module -version-info 4:0:0 HwTTbAModel_la_CPPFLAGS = \ $(AM_CPPFLAGS) -I$(srcdir)/TTbAsymm nodist_HwTTbAModel_la_SOURCES = \ TTbAsymm/TTbA__all.cc ############# HwLHModel_la_LDFLAGS = \ -$(AM_LDFLAGS) -module -version-info 5:0:0 +$(AM_LDFLAGS) -module -version-info 6:0:0 HwLHModel_la_CPPFLAGS = \ $(AM_CPPFLAGS) -I$(srcdir)/LH nodist_HwLHModel_la_SOURCES = \ LH/LH__all.cc ############# HwLHTPModel_la_LDFLAGS = \ -$(AM_LDFLAGS) -module -version-info 5:0:0 +$(AM_LDFLAGS) -module -version-info 6:0:0 HwLHTPModel_la_LIBADD = \ $(GSLLIBS) HwLHTPModel_la_CPPFLAGS = \ $(AM_CPPFLAGS) $(GSLINCLUDE) -I$(srcdir)/LHTP nodist_HwLHTPModel_la_SOURCES = \ LHTP/LHTP__all.cc ############# diff --git a/NEWS b/NEWS --- a/NEWS +++ b/NEWS @@ -1,1699 +1,1719 @@ Herwig News -*- outline -*- ================================================================================ +* Herwig 7.1.5 release: 2019-04-04 + +** Add option of producing partons on physically mass shell after the parton shower + to allow the string model to be used to hadronize events + +** Fixes for template issues and compiler warnings for gcc8,9, icc and clang + +** Fixes to the calculation of W, Z and h widths if decay modes removed + +** Fix typo in FI g to gg dipole. + +** Fix to allow 1 parameter to specify the mass of more than one particle in the UFO converter + +** Fix to partial width calculation of VSS decays + +** Fix the PDF assignment for DIS processes with Matchbox + +** Fix for undecayed W bosons in internal POWHEG gauge boson pair code + +** Update boost detection in configure script * Herwig 7.1.4 release: 2018-06-28 ** More matrix elements and better handling of BSM physics ** Fix for spin correlations in angular-ordered shower, effects top decays ** Allow fixed target collisions ** various minor fixes * Herwig 7.1.3 release: 2018-04-05 ** Dipole Shower *** Changed default phase space limits *** g -> gg splitting function asymmetrized *** Initial retune supplied, given the visible changes to LEP observables ** Added new Baryonic colour reconnection model (arXiv 1710:10906) ** Added Schuler-Sjostrand Photon PDFs ** Handling of massless taus from external sources ** various minor fixes ** use std::array<> where possible * Herwig 7.1.2 release: 2017-11-01 ** Reduction of the default pt cut for QED radiation off leptons. ** Inputfile changes due to new read mode in ThePEG. ThePEG remains in current repo dir when reading input-file/snippet. ** Fix for shower scale variations in qtilde shower. ** All standard input files now use the tuned intrinsic pt. ** Remove obsolete input files for various tunes. ** Fix for Madgraph interface for NLO corrections with recent version. ** Run file size reduction for processes using madgraph/openloops. ** Fix in jacobian for massive dipole kinematics. ** General improvements for UFO model handling. * Herwig 7.1.1 release: 2017-07-14 ** Snippets are now all installed ** Fixed broken ufo2herwig output and LHC-MB.in ** UFO improvements *** More robust SLHA file handling *** option of creating diagonal mixing matrices, needed for ATLAS simplfied models *** Improved warnings about resetting standard model particles *** Fixed certain cases where the wrong lorentz structure was picked in VVS vertices ** Improved error message for unhandled beam particles ** Fix for Dipole Shower chain selection ** Fixed crash in double diffractive delta resonances * Herwig 7.1.0 release: 2017-05-19 ** Major new release For a more detailed overview and further references please see the release note arXiv:1705.06919 ** NLO multijet merging with the dipole shower ** A new soft model ** An interface to EvtGen ** Improved calculation of mass effects in the dipole shower ** Top decays in the dipole shower, and NLO corrections to the decay ** An implementation of the KrkNLO method for simple processes ** Major restructuring and cleanup of default input files ** C++11 is now mandatory and heavily used in the code ** Many smaller bugfixes and improvements * Herwig 7.0.4 release: 2016-10-24 ** API The high level API is now properly available as a library, providing an alternative to the Herwig main program. ** Dipole shower Added nloops() function to the AlphaS classes to return the number of loops in the running coupling ** Matchbox Improved error handling and clearer messages ** BSM models Initialize W mass correctly from SLHA file. Improved reading in of decay modes if they already exist. ** Sampling Introduced option to reduce reference weight in AlmostUnweighted mode by Kappa factor. Useful for processes where full unweighting is infeasible. ** Qtilde shower Better control of scale in splitting functions using the SplittingFunction:ScaleChoice interface. ** Tests New NLO fixed-order input files for testing Matchbox in Tests/ExternNLO. ** Input files Set diagonal CKM options consistently. Added TauTauHVertex and MuMuHVertex to MatchboxDefaults. * Herwig 7.0.3 release: 2016-07-21 ** subprocess generation filters A number of filters has been implemented to speed up process and diagram generation for the case of Standard Model like processes; this is particularly helpful for processes involving a large number of electroweak combinatorics. See the documentation for more details. ** fix to directory hierarchy A bug in the Herwig-scratch directory hierarchy when integrating with different seeds has been fixed. ** fix for relocating MadGraph generated amplitudes The directory and symbolic link structure for MadGraph-built amplitudes has been changed to allow for relocation of a run directory to a different file system hierarchy. ** z* variable added to LeptonsJetsAnalysis The builtin LeptonsJetsAnalysis has been extented to include the normalized relative rapidity z* ** detuning parameter for shower reweighting An efficiency tweak when using the shower reweighting facilities has been introduced for the veto algorithms in both the QTilde and the Dipole shower. See the documentation for more details. ** BaryonThreeQuarkModelFormFactor A scaling bug in the form factor series expansion was fixed. * Herwig 7.0.2 release: 2016-04-29 ** Event reweighting New option of calculating the weights for the effect of varying the scale used in both the default and dipole showers. The method is described in arXiv:1605.08256 ** mergegrids mode A main mode for the Herwig executable has been added which merges the integration grids from parallel runs. ** NLO Diphoton production The NLO matrix elements in the POWHEG approach for diphoton production as described in JHEP 1202 (2012) 130, arXiv:1106.3939 have been included as MEPP2GammaGammaPowheg. ** BSM Hard process constructor A missing Feynman diagram with a t-channel vector boson has been added to the matrix element for vv2ss ** BSM Decay Modes calculation The behaviour of the option to disable decay modes in BSM Models has been changed so that the partial width for the ignored modes is now calculated and included in the total width, but the branching ratio is set to zero. This is more physical than the previous option where the mode was t otally ignored and hence not included in the calculation of the width. ** Mass Generation The behaviour of the GenericMassGenerator has been changed so that modes which have been disabled are only included in the calculation of the total width and not in the partial width used in the numerator of the weight used to select the off-shell mass. ** Boost detection Boost could not detect the compiler version for gcc-5.3 and gcc-6.1 * Herwig 7.0.1 release: 2016-01-17 ** Version number written to log file The Herwig version number is now included in addition to ThePEG's version. ** Tau lifetimes A bug with lifetimes for hard process Taus is fixed. Thanks to ATLAS for the report! ** Shower FSR retries Rare events could take a long time due to an extremely large number of FSR retries. These are now capped at a configurable number. ** Dipole shower Reweighting for non-radiating events; fixes for shower profile handling; option to downgrade large-Q expansion for alphaS ** Matchbox builtins Added massive currents for q-qbar ** ShowerAlphaQCD can now use user-defined thresholds ** Input snippets W/Z/H on-shell now split into three files; 4-flavour scheme added ** UFO converter The converter now has experimental support for writing out param cards of its current settings. ** LEPJetAnalysis loading fixed ** Contrib HJets++ has moved to a stand-alone project, FxFx has been added * Herwig 7.0.0 (Herwig++ 3.0.0) release: 2015-12-04 ** Major new release A major new release of the Monte Carlo event generator Herwig++ (version 3.0) is now available. This release marks the end of distinguishing Herwig++ and HERWIG development and therefore constitutes the first major release of version 7 of the Herwig event generator family. The new version features a number of significant improvements to the event simulation, including: built-in NLO hard process calculation for all Standard Model processes, with matching to both angular ordered and dipole shower modules via variants of both subtractive (MC@NLO-type) and multiplicative (Powheg-type) algorithms; QED radiation and spin correlations in the angular ordered shower; a consistent treatment of perturbative uncertainties within the hard process and parton showering, as well as a vastly improved documentation. This version includes (for a more detailed overview and further references please see the release note arXiv:1512.01178): ** A long list of improvements and fixes for the Matchbox module *** includes MC@NLO and Powheg matching to both showers with truncated showering ** A long list of improvements and fixes for both of the shower modules *** includes improvements of numerics issues relevant to 100 TeV pp collisions ** NLO event simulation and Matchbox development *** Interfaces to a number of external libraries *** A new workflow for event generation *** Electroweak corrections to VV production ** Parton shower development *** QED radiation in the angular ordered shower *** Spin correlations in the angular ordered shower *** New scale choices in gluon branchings ** Improvements to event generation workflow *** Re-organized and streamlined input files for the new NLO development *** A unified treatment of shower and matching uncertainties *** New integrator modules featuring parallel integration ** New default tunes for both shower modules ** New contrib modules *** Electroweak Higgs plus jets production *** FxFx merging support *** Higgs boson pair production * Herwig++-2.7.1 release: 2014-07-07 ** New shower switches to select schemes for momentum reconstruction *** QTildeReconstructor:FinalStateReconOption has the following options: *** Default All momenta are rescaled in the rest frame. *** MostOffShell Put all particles on the new-mass shell and the most off-shell and recoiling system are rescaled to ensure 4-momentum is conserved. *** Recursive Recursively put the most off-shell particle which hasn't yet been rescaled on-shell by rescaling the particles and the recoiling system. *** RestMostOffShell The most off-shell is put on shell by rescaling it and the recoiling system, the recoiling system is then put on-shell in its rest frame. *** RestRecursive As above, but recursively treat the currently most-off shell (only makes a difference for more than 3 partons) ** Ticket #378: Hadronization of baryon number violating clusters involving diquarks Fixed by only considering non-diquarks to be combined in the ClusterFinder. ** UFO converter can now parse SLHA files for parameter settings The UFO converter code can now use SLHA files for modifying parameters. The first pass "ufo2herwig" produces the model to be compiled. For each parameter card, run "slha2herwig" to get the matching input file. ** Fix for systems using lib64 The repository is now initialized correctly on systems using lib64 as the library location. ** Efficiency optimization Better allocation of internal vector variables for a noticeable speed increase of 10-20% with LHC events. * Herwig++-2.7.0 release: 2013-10-28 ** UFO interface to Feynman rules generators Herwig++ now includes "ufo2herwig", a tool that automatically creates all required files to run a BSM model from a UFO directory. The conversion has been extensively tested against Feynrules models MSSM, NMSSM, RS, Technicolor, and less extensively with most of the other models in the Feynrules model database. We expect that following this release there will be no further hard-coded new physics models added to Herwig++ and that future models will be included using the UFO interface. ** Shower uncertainties A first set of scaling parameters to estimate shower uncertainties is provided for both the angular ordered as well as the dipole shower; they are Evolver:HardScaleFactor and ShowerAlphaQCD: RenormalizationScaleFactor. ** Rewrite of Matchbox NLO matching The NLO matching implementation has been rewritten and is now more flexible and consistent. Profile scales are provided for the hardest emission both for the dipole shower and matrix element correction matching. ** BLHA2 Interface and new processes Matchbox now features a generic BLHA2 interface to one-loop amplitude codes and now also includes W and W+jet production as well as Higss production in gluon fusion as builtin processes. ** Impoved dipole shower kinematics parametrization The kinematics parametrization for emissions in the dipole shower has been made more efficient. ** W and Z Powheg decays Decays of W and Z bosons now use the Powheg decayers by default. ** Improved treatment of beam remnants The handling of beam remnants has been improved in multiple contexts, leading to a much lower error rate at p+/p- collisions. An additional value "VeryHard" for ClusterFissioner:RemnantOption can be used to disable any special treatment of beam remnant clusters. ** New underlying event tune Herwig++ now uses tune UE-EE-5-MRST by default. Other related tunes can be obtained from the Herwig++ tunes page ** Improvements in BSM code The UFO development identified many sign fixes in rarely used BSM vertices; many improvements were made to general decayers, allowing four-body decays in BSM for the first time; Powheg is enabled in General two-body decayers; and the handling of colour sextets has been improved. ** A new HiggsPair matrix element in Contrib. ** A new matrix element for single top production. ** The Higgs mass is now set to 125.9 GeV (from PDG 2013 update). ** C++-11 testing To help with the coming transition to C++-11, we provide the new --enable-stdcxx11 configure flag. Please try to test builds with this flag enabled and let us know any problems, but do not use this in production code yet. In future releases, this flag will be on by default. ** Other changes *** Many new Rivet analyses have been included in the Tests directory. *** Cleaned Shower header structure; grouped shower parameters into one struct. *** The boolean Powheg flag in HwMEBase changed to an enumeration. * Herwig++-2.6.3 release: 2013-02-22 ** Decay vertex positioning in HepMC output Pseudo-vertices that Herwig++ inserts for technical reasons will now not contribute to the Lorentz positions of downstream vertices. Thanks to ATLAS for the bug report! ** Updated Rivet tests Herwig's library of Rivet test runs has been brought up-to-date with new analyses that were recently published by the Rivet collaboration. * Herwig++-2.6.2 release: 2013-01-30 ** Fixes for PDF and scale choices in POWHEG events Scale settings for MPI and the regular shower are now correct in POWHEG events. This should fix reported anomalies in POWHEG jet rates. NLO PDFs are now also set consistently in the example input files. ** Ticket #373: Branching ratio factors in cross-section If any decay modes are selectively disabled, setting the following post-handler will cause all reported cross-sections to include the branching ratio factor(s) from the previous stages correctly: create Herwig::BranchingRatioReweighter BRreweight insert LHCGenerator:EventHandler:PostDecayHandlers 0 BRreweight ** Anomalous vertices now possible in MEfftoVH ** Interactive shell does not quit on error ** Better warning messages for events from inconsistent LHEF files ** Possible division by zero error fixed in BSM branching ratio calculations ** Decayer and ME changes to improve checkpointing The checkpointing changes in ThePEG 1.8.2 are implemented here, too. Regular dump files are consistent now. * Herwig++-2.6.1 release: 2012-10-16 ** Configure switches The various switches to turn off compilation of BSM models have been unified into a single '--disable-models'. A new flag '--disable-dipole' can be used to turn off the compilation of the Dipole and Matchbox codes. ** Ticket #348: Search path for repository 'read' command The search path for the 'read' command is configurable on the command line with the -i and -I switches. By default, the installation location is now included in the search path, so that 'Herwig++ read LEP.in' will work in an empty directory. The current working directory will always be searched first. The rarely used "Herwig++ init" command has been made consistent with 'read' and 'run' and should now be used without the '-i' flag. ** Width treatment in BSM The width treatment in BSM decay chains has been greatly improved and is now switched on by default in the .model files. To get the old behaviour, use set /Herwig/NewPhysics/NewModel:WhichOffshell Selected ** New BSM models Little Higgs models with and without T-parity are now available. ** Resonance photon lifetime A lifetime bug affecting decays of pi0 to e+e-X was fixed. The virtual photon is not part of the event record anymore. ** Ticket #371: Hard diffraction FPE Herwig++ 2.6.0 introduced a bug into the diffraction code which would abort any runs. This is now fixed. ** O2AlphaS Support for setting quark masses different from the particle data objects as introduced in ThePEG 1.8.1 has been enabled. ** Matchbox Several improvements and bug fixes are included for Matchbox. Amplitudes relevant to pp -> Z+jet and crossed processes at NLO are now available, and various scale choices have been added in a more flexible way. All subtraction dipoles for massive quarks are now included. ** Dipole shower Parameters to perform scale variations in the shower have been added to estimate uncertainties. A bug in showering off gg -> h has been fixed. ** Minor fixes *** Two broken colour structures in GeneralHardME *** Susy Higgs mixing matrix *** BaryonFactorizedDecayer out-of-bounds access *** Mass values in SimpleLHCAnalysis * Herwig++-2.6.0 release: 2012-05-21 (tagged at SVN r7407) ** New NLO framework Matchbox, a flexible and very general framework for performing NLO calculations at fixed order or matched to parton showers is provided with this release. ** Dipole shower algorithm A first implementation of the coherent dipole shower algorithm by Plätzer and Gieseke (arXiv:0909.5593 and arXiv:1109.6256) is available. ** Alternative samplers and the ExSample library The ExSample library by Plätzer (arXiv:1108.6182) is shipped along with Herwig++ in an extended version. The extended version provides SamplerBase objects which can be used alternatively to the default ACDCSampler. ** New BSM models *** New colour sextet diquark model A colour sextet diquark model has been included, as described in Richardson and Winn (arXiv:1108.6154). *** Models reproducing the CDF t-tbar asymmetry Four models that can reproduce the reported t-tbar asymmetry have been included. *** Zprime A simple standard model extension by one additional heavy neutral vector boson. ** Interface to AlpGen, with MLM merging The Contrib directory contains a new interface to the AlpGen matrix element generator. AlpGen events must be preprocessed with the provided AlpGenToLH.exe tool before they can be used. More information can be found in the Herwig++ 2.6 release note. ** HiggsVBF Powheg Higgs boson production by vector boson fusion is available at NLO in the POWHEG scheme, as described in d'Errico, Richardson (arXiv:1106.2983). The Powheg DIS processes were available in Herwig++-2.5.2 already. ** Statistical colour reconnection Alternative mechanisms to minimize the colour length Sum(m_clu) before the hadronization stage, based on Metropolis and annealing algorithms. ** Energy extrapolation of underlying-event tunes To describe underlying-event data at different c.m. energies, the energy-dependent parameter pT_min will now be adjusted automatically, following a power-law. The new tune parameters are the value at 7000 GeV "MPIHandler:pTmin0", and MPIHandler:Power. ** Ticket #239: Reporting of minimum-bias cross-section When simulating minimum-bias events using the MEMinBias matrix element, the correct unitarized cross section can now be reported via the standard facilities; it is no longer necessary to extract it from the .log file of the run. The corresponding functionality is enabled by inserting a MPIXSecReweighter object as a post-subprocess handler: create Herwig::MPIXSecReweighter MPIXSecReweighter insert LHCHandler:PostSubProcessHandlers 0 MPIXSecReweighter ** Dependency on 'boost' Herwig++ now requires the boost headers to build; if not detected in standard locations, specify with the --with-boost configure option. ** Tests directory The Tests directory now contains input cards for almost all Rivet analyses. A full comparison run can be initiated with 'make tests'. ** Minor changes *** Default LHC energy now 8 TeV All LHC-based defaults have now been updated to use 8 TeV as the center-of-mass energy. *** Herwig::ExtraParticleID -> ThePEG::ParticleID The namespace for additional particles has been unified into ThePEG::ParticleID *** MEee2VectorMeson The e+e- -> vector meson matrix element has moved from Contrib into HwMELepton.so *** SUSY numerics fixes Better handling of rare numerical instabilities. *** YODA output for Rivet The built-in histogramming handler can now output data in the YODA format used by Rivet. *** Consistency checks in SLHA file reader Better warnings for inconsistent SusyLHA files *** better colour flow checking for development ** Bug fixes *** Extremely offshell W from top decay Numerical improvements for very off-shell W bosons coming from top decays. *** Ticket #367: problems in using SUSY + LHE Susy events from Les Houches event files are now handled better. *** Infinite loop in remnant decayer The remnant decayer will now abort after 100 tries. *** Fix to HiggsVBF LO diagrams The diagram structure of HiggsVBF LO matrix elements has been fixed. *** LEP thrust fix The calculation of the transverse momentum of a branching from the evolution variable in final-state radiation can now be changed. While formally a sub-leading choice this enables a better description of the thrust distribution in e+e- collisions at small values of the thrust. Currently the default behaviour, where the cut-off masses are used in the calculation, remains the same as previous versions. * Herwig++-2.5.2 release: 2011-11-01 (tagged at SVN r6928) ** Optional new jet vetoing model The jet vetoing model by Schofield and Seymour (arXiv:1103.4811) is available via Evolver:ColourEvolutionMethod, PartnerFinder:PartnerMethod and SplittingFunction:SplittingColourMethod. The default behaviour is unchanged. ** MPI tune Version 3 of the MPI tunes is now the default. Please note that the pT parameter is energy-dependent and needs to be modified when an LHC run is not at 7 TeV. The latest tunes are always available at http://projects.hepforge.org/herwig/trac/wiki/MB_UE_tunes ** MPI PDFs MPI PDFs can now be controlled independently. ** Initialization time speedup A new BSMModel base class was introduced between StandardModel and the BSM model classes. Together with a restructured decay mode initialization, this offers significantly faster startup times for BSM runs. ThreeBodyDecays can now always be switched on without a large speed penalty. ** Decay mode file Decay mode files in the SLHA format can now be read separately in any BSM model with 'set Model:DecayFileName filename' ** Powheg DIS Charged- and neutral-current DIS processes implementing the POWHEG method are now available. ** Diffraction models Xi cut implemented in PomeronFlux ** Ticket #352: Colour reconnection fixed in DIS ** Ticket #353: Improved numerical stability in chargino decays ** Ticket #358: Infinite loop in top events with pT cut in shower ** Ticket #361: Problem with duplicate 2-body modes in BSM ** Tickets #362 / #363: Crashes with baryon number violating models Particle decays in SUSY models with RPV now work correctly in the colour 8 -> 3,3,3 case. Colour reshuffling now works for RPV clusters. ** Improved Fastjet detection The configure step uses fastjet-config to make sure all header file paths are seen. ** Darwin 11 / OS X Lion A configure bug was fixed which prevented 'make check' from succeeding on OS X Lion. ** Vertex classes The specification of QED / QCD orders has been moved to the vertex constructors, to allow ThePEG consistency checks. WWHH vertices in MSSM and NMSSM were fixed. Some Leptoquark and UED vertices fixed. ** Hadronization Cleanup of obsolete code. * Herwig++-2.5.1 release: 2011-06-24 (tagged at SVN r6609) ** Example input files at 7 TeV All our example input files for LHC now have their beam energy set to 7 TeV instead of 14 TeV. ** Colour reconnection on by default The colour reconnection tunes are now the default setup. Version 2 of the tunes replaces the *-1 tunes, which had a problem with LEP event shapes. ** Run name tags Aded possibility to add a tag to the run name when running with the '-t' option. One run file can thus be run with different seeds and results stored in different output files. ** Floating point exceptions The new command line option -D enables floating point error checking. ** General improvements to WeakCurrent decays ** Remnant decayer Hardwired gluon mass was removed. ** WeakCurrentDecayConstructor Instead of specifying separate Particle1...Particle5 vectors for the decay modes, the new interface DecayModes can be filled with decay tags in the standard syntax. ** BSM: improvements to handling of vertex and model initialisation ** Powheg Higgs Option to use pT or mT as the scale in alphaS and for the factorization scale in the PDFs ** Ticket #337: Tau polarization wrong in charged Higgs decay ** Ticket #339: Colour flows in GeneralThreeBody Decayers for 3bar -> 8 3bar 1 ** Ticket #340: Crash for resonant zero-width particles ** Ticket #341: Varying scale for BSM processes The scale used is now ResonantProcessConstructor:ScaleFactor or TwoToTwoProcessConstructor:ScaleFactor multiplied by sHat. ** Ticket #346: Chargino decays Chargino decayers now automatically switch between the mesonic decays for mass differences less than 2 GeV and the normal partonic decays above 2 GeV. ** Ticket #349: Stop by default on input file errors The '--exitonerror' flag is now the default behaviour for the Herwig++ binary. To switch back to the old behaviour, '--noexitonerror' is required. ** Ticket #351: Four-body stop decays ** Tested with gcc-4.6 * Herwig++-2.5.0 release: 2011-02-08 (tagged at SVN r6274) ** Uses ThePEG-1.7.0 Herwig++ 2.5.0 requires ThePEG 1.7.0 to benefit from various improvements, particularly: handling of diffractive processes; respecting LD_LIBRARY_PATH when loading dynamic libraries, including LHAPDF; improvements to repository commands for decay modes. See ThePEG's NEWS file for more details. ** POWHEG improvements *** New POWHEG processes Simulation at NLO accuracy using the POWHEG method is now available for hadronic diboson production (pp to WW,WZ,ZZ), Higgs decays to heavy quarks, and e+e- to two jets or ttbar, including full mass dependence. *** Input file changes The input files for setting up POWHEG process simulation have been simplified. See the example files LHC-Powheg.in and TVT-Powheg.in for the improved command list. *** Structural changes The POWHEG backend in the shower code has been restructured to make future additions easier: PowhegEvolver has merged with Evolver; both the matrix element corrections and real corrections in the POWHEG scheme are implemented directly in the ME or Decayer classes. ** New processes at leading order *** Photon initiated processes We have added a matrix element for dijet production in gamma hadron collisions. *** Bottom and charm in heavy quark ME The option of bottom and charm quarks is now supported for heavy quark production in MEHeavyQuark. ** Colour reconnection The cluster hadronization model has been extended by an option to reconnect coloured constituents between clusters with a given probability. This new model is different from the colour reconnection model used in FORTRAN HERWIG, and improves the description of minimum bias and underlying event data. ** Diffractive Processes Both single and double diffractive processes are now supported in Herwig++. The Pomeron PDF is implemented using a fit to HERA data, and a pion PDF can be used to model reggeon flux. ** BSM physics *** New models We have added new BSM models, particularly ADD-type extra dimension models and the next-to-minimal supersymmetric standard model (NMSSM). Effects of leptoquarks can as well be simulated. *** Vertex additions We have added flavour changing stop interactions (stop - neutralino - charm) and gravitino interactions with particular emphasis on numerical stability for very light gravitinos. Tri-linear Higgs and Higgs-Higgs/Vector-Vector four-vertices are available as well. *** Input file changes The SUSY model can now also extract the SLHA information from the header of a Les Houches event file: replace the SLHA file name in the example input files with the LH file name. *** Structure The backend structure of the HardProcessConstructor has changed, to allow easier inclusion of new process constructors. Some 2->3 BSM scattering processes involving neutral higgs bosons are now included. The spin handling has been improved in the background. ** Shower splitting code reorganized The selection of spin structures has been decoupled from the choice of colour structure. This gives more flexibility in implementing new splittings. Selected splittings can be disabled in the input files. ** B mixing B mixing, and indirect CP violation in the B meson system are included now. ** Looptools The Looptools directory has been updated to reflect T.Hahn's Looptools 2.6. ** Contrib changes The ROOT interface has been removed as deprecated. The MCPWNLO code has temporarily been removed from the Contrib directory as a major review of this code is required. Additionally, there are various fixes to all other codes shipped in Contrib. ** DIS improvements The momentum reshuffling in DIS events has been improved. ** mu and nu beams mu, nu_e and nu_mu and their antiparticles are now available as beam particles. They are all supported in the DIS matrix elements. mu+ mu- collisions are supported in the general matrix element code for BSM models, but not yet in the hard-coded matrix elements for lepton-lepton scattering. ** Structural changes *** Inline code Inline code has been merged into the header files, .icc files were removed. *** Silent build By default, Herwig++ now builds with silent build rules. To get the old behaviour, run 'make V=1'. *** Debug level The debug level on the command line will now always have priority. *** Event counter The event counter has been simplified. *** Interpolator persistency Interpolators can now be written persistently. ** Ticket #307: Momentum violation check in BasicConsistency Added parameters AbsoluteMomentumTolerance and RelativeMomentumTolerance ** Example POWHEG input files The example input files for Powheg processes now set the NLO alpha_S correctly, and are run as part of 'make check'. ** Truncated shower A problem which lead to the truncated shower not being applied in some cases has been fixed. ** Fixes to numerical problems Minor problems with values close to zero were fixed in several locations. ** Remove duplicated calculation of event shapes An accidental duplication in the calculation of event shapes was removed, they are now only calculated once per event. Several other minor issues in the event shape calculations have also been fixed. ** MRST PDFs fixed An initialization problem in the internal MRST PDFs was fixed. ** Vertex scale choice The scale in the Vertex classes can now be zero where possible. ** Treatment of -N flag The Herwig++ main program now correctly treats the -N flag as optional. ** Numerical stability improved The numerical stability in the 'RunningMass' and 'QTildeReconstructor' classes has been improved. The stability of the boosts in the SOPTHY code for the simulation of QED radiation has been improved. The accuracy of boosts in the z-direction has been improved to fix problems with extremely high p_T partons. ** Bugfix in initial state splittings A bug in the implementation of the PDF weight in initial-state qbar -> qbar g splittings has been fixed. ** Bugfix in chargino neutralino vertices A bug in the 'chi+- chi0 W-+' and charged Higgs-sfermions vertices has been fixed. ** Remove uninitialized variables written to repository A number of uninitialised variables which were written to the repository have been initialised to zero to avoid problems on some systems. ** Fix to QED radiation in hadronic collisions The longitudinal boost of the centre-of-mass frame in hadronic collisions is correctly accounted for now in the generation of QED radiation. ** Fix to numerical problems in two-body decays Numerical problems have been fixed, which appeared in the rare case that the three-momenta of the decay products in two-body decays are zero in the rest frame of the decay particle. ** A problem with forced splittings in the Remnant was fixed. ** ME correction for W+- decays applied properly The matrix element correction for QCD radiation in W+- decays which was not being applied is now correctly used. ** Top quark decays from SLHA file The presence of top quark decay modes in SLHA files is now handled correctly. ** Exceptional shower reconstruction kinematics Additional protection against problems due to the shower reconstruction leading to partons with x>1 has been added. ** Ordering of particles in BSM processes Changes have been made to allow arbitrary ordering of the outgoing particles in BSM processes. ** Bugfixes in tau decays Two bugs involving tau decays have been fixed. The wrong masses were used in the 'KPiCurrent' class for the scalar form factors and a mistake in the selection of decay products lead to tau- --> pi0 K- being generated instead of tau- --> eta K-. ** Avoid crashes in baryon number violating processes. To avoid crashes, better protection has been introduced for the case where diquarks cannot be formed from the quarks in a baryon-number violating process. In addition, the parents of the baryon-number violating clusters have been changed to avoid problems with the conversion of the events to HepMC. ** QED radiation in W- decays A bug in the 'QEDRadiationHandler' class which resulted in no QED radiation being generated in W- decays has been fixed. ** A number of minor fixes to the SUSY models have been made. ** Partial width calculations in BSM models A fix for the direction of the incoming particle in the calculation of two-body partial widths in BSM models has been made. ** LoopTools improvements The LoopTools cache is now cleared more frequently to reduce the amount of memory used by the particle. ** Negative gluino masses are now correctly handled. ** A problem with mixing matrices which are not square has been fixed. ** Removed duplicate diagram The 'MEee2gZ2ll' class has been fixed to only include the photon exchange diagram once rather than twice as previously. ** Fix for duplicate particles in DecayConstructor A problem has been fixed which occurred if the same particle was included in the list of DecayConstructor:DecayParticles. ** Fixes for UED model vertices A number of minor problems in the vertices for the UED model have been fixed. ** Include missing symmetry factor The missing identical-particle symmetry factor in 'MEPP2GammaGamma' has been included. ** Fix floating point problem in top decays A floating point problem in the matrix element correction for top decays has been fixed. * Herwig++-2.4.2 release: 2009-12-11 (tagged at SVN r5022) ** Ticket #292: Tau decay numerical instability The momentum assignment in tau decays contained numerical instabilities which have been fixed by postponing the tau decay until after the parton shower. A new interface setting DecayHandler:Excluded is available to prevent decays in the shower step. This is enabled by default for tau only. ** Ticket #290: Missing MSSM colour structure The missing colour structure for gluino -> gluon neutralino was added. ** Ticket #294: Zero momentum in some decays Some rare phase space points lead to zero momentum in two-body decays. This has been fixed. ** Ticket #295: Stability of QED radiation for lepton collider processes The numerical stability of QED radiation momenta was improved further. ** Ticket #296: K0 oscillation vertex was wrong The oscillation from K0 to K0_L/S now takes place at the production vertex of K0. ** Ticket #289: Undefined variables in repository On some system configurations, undefined variables were written to the repository. These have been fixed. ** Fixed QED radiation for hadron processes The longitudinal boost of the centre-of-mass frame in hadronic collisions is correctly accounted for now. ** Numerical stability fixes Small fixes in RunningMass and QTildeReconstructor. ** Powheg example input files The example input files for Powheg processes now set the NLO alpha_S correctly, and are run as part of 'make check'. ** OS X builds for Snow Leopard Snow Leopard machines will now be recognized as a 64bit architecture. * Herwig++-2.4.1 release: 2009-11-19 (tagged at SVN r4932) ** Uses ThePEG-1.6.0 Herwig++ now requires ThePEG-1.6.0 to benefit from the improved helicity code there. If you have self-written vertex classes, see ThePEG's NEWS file for conversion instructions. ** Vertex improvements ThePEG's new helicity code allowed major simplification of the vertex implementations for all Standard Model and BSM physics models. ** New Transplanckian scattering model An example configuration is in LHC-TRP.in ** BSM ModelGenerator as branching ratio calculator The BSM ModelGenerator has a new switch to output the branching ratios for a given SLHA file in SLHA format, which can then be used elsewhere. ** BSM debugging: HardProcessConstructor New interface 'Excluded' to exclude certain particles from intermediate lines. ** Chargino-Neutralino-W vertex fixed ** Spin correlations are now switched on by default for all perturbative decays. ** Ticket #276: Scale choice in BSM models' HardProcessConstructor New interface 'ScaleChoice' to choose process scale between - sHat (default for colour neutral intermediates) and - transverse mass (default for all other processes). ** Ticket #287: Powheg process scale choice The default choice is now the mass of the colour-singlet system. ** Ticket #278: QED radiation for BSM Soft QED radiation is now enabled in BSM decays and all perturbative decays by default. ** Ticket #279: Full 1-loop QED radiation for Z decays Soft QED radiation in Z decays is now fully 1-loop by default. ** Ticket #280: Redirect all files to stdout This is now implemented globally. The files previously ending in -UE.out and -BSMinfo.out are now appended to the log file. They now also obey the EventGenerator:UseStdout flag. ** Ticket #270: LaTeX output updated After each run, a LaTeX file is produced that contains the full list of citations. Please include the relevant ones in publications. ** Ticket #256: Mac OS X problems An initialization problem that affected only some configurations has been identified and fixed. ** Tests directory added This contains many .in files, to exercise most matrix elements. ** Minor fixes *** Prevent rare x>1 partons in shower reconstruction. *** SUSY-LHA parameter EXTPAR can be used to set tan beta *** Improved Fastjet detection at configure time * Herwig++-2.4.0 release: 2009-09-01 (tagged at SVN r4616) ** New matrix elements We have added a built-in implementation of several new matrix elements: PP --> WW / WZ / ZZ PP --> W gamma / Z gamma PP --> VBF Higgs PP --> Higgs tt / Higgs bb e+e- --> WW / ZZ gamma gamma --> ff / WW ** Base code improvements *** Ticket #257: Remnant handling A problem with forced splittings in the Remnant was fixed. *** Ticket #264: Soft matrix element correction A problem with emissions form antiquarks was fixed. ** PDF sets *** New default set MRST LO** is the new default PDF set. LO* is also available built-in. *** Shower PDFs can be set separately from the hard process Use the 'ShowerHandler:PDF' interface. ** Parameter tunes Shower, hadronization and underlying event parameters were retuned against LEP and Tevatron data respectively. ** BSM module improvements *** Ticket #259: read error for some UED models Arbitrary ordering of outgoing lines in the process description is now possible. *** Ticket #266: branching ratio sums The warning threshold for branching ratios not summing to 1 has been relaxed. It is now a user interface parameter. *** Ticket #267: Top decay modes Top decay modes listed in SLHA files are now handled correctly. ** QED radiation *** Ticket #241: Soft QED radiation is now enabled by default *** Ticket #265: Radiation off W+ and W- is now handled correctly ** Interfaces *** Ticket #243: Fastjet Fastjet is now the only supported jet finder code. All example analyses have been converted to use Fastjet. *** KtJet and CLHEP interfaces have been removed. *** New interfaces to AcerDet and PGS available in Contrib *** MCPWnlo distributed in Contrib *** HepMC and Rivet interfaces moved to ThePEG ** Ticket #239: Inelastic cross-section for MinBias This information is now available in the ...-UE.out files. ** Technical changes *** Ticket #186 Configure now looks for ThePEG in the --prefix location first. *** Configure information Important configuration information is listed at the end of the 'configure' run and in the file 'config.thepeg'. Please provide this file in any bug reports. *** New ZERO object The ZERO object can be used to set any dimensionful quantity to zero. This avoids explicit constructs like 0.0*GeV. *** Exception specifiers removed Client code changes are needed in doinit() etc., simply remove the exception specifier after the function name. *** Ticket #263: Tau polarizations can be forced in TauDecayer * Herwig++-2.3.2 release: 2009-05-08 (tagged at SVN r4249) ** SUSY enhancements *** Ticket #245: Select inclusive / exclusive production Using the new 'HardProcessConstructor:Processes' switch options 'SingleParticleInclusive', 'TwoParticleInclusive' or 'Exclusive' *** Improved three-body decay generation Several problems were fixed, incl. tickets #249 #250 #251 Thanks to J.Tattersall and K.Rolbiecki for the stress-testing! *** Looptools fix Release 2.3.1 had broken the Looptools initialization. *** Improved warning message texts ** Ticket #237: Values of q2last can now be zero where possible. ** Ticket #240: The Herwig++ main program now correctly treats the -N flag as optional. ** Ticket #246: Extreme pT partons fixed by improving accuracy of z boosts. ** DIS Improved parton shower momentum reshuffling. ** Minimum Bias events The zero-momentum interacting particle used for bookkeeping is now labelled as a pomeron. ** User Makefile Makefile-UserModules does not enable -pedantic anymore. User's ROOT code will not compile otherwise. ** Build system Small fixes in the build system. * Herwig++-2.3.1 release: 2009-03-31 (tagged at SVN r4140) ** Initial state showers The PDF veto was wrongly applied to qbar->qbar g splittings. ** User interaction The Makefile-UserModules now includes the Herwig version number. The -N flag to 'Herwig++ run' is optional now, as was always intended. ** Contrib The contrib directory is now included in the tarball. The omission was accidental. ** Numerical accuracy Minor problems with values close to zero were fixed in several locations. ** LEP event shapes An accidental duplication was removed, they are now only calculated once per event. ** MRST PDF code Initialization problem fixed. ** Mac OS X The configure script was improved to detect libraries better. ** Libtool Updated to version 2.2.6 * Herwig++-2.3.0 release: 2008-12-02 (tagged at SVN r3939) ** Major release, with many new features and bug fixes ** Extension to lepton-hadron collisions ** Inclusion of several processes accurate at next-to-leading order in the POsitive Weight Hardest Emission Generator (POWHEG) scheme ** Inclusion of three-body decays and finite-width effects in BSM processes ** New procedure for reconstructing kinematics of the parton shower based on the colour structure of the hard scattering process ** New model for baryon decays including excited baryon multiplets ** Addition of a soft component to the multiple scattering model of the underlying event and the option to choose more than one hard scattering explicitly ** New matrix elements for DIS and e+e- processes ** New /Contrib directory added containing external modules that will hopefully be of use to some users but are not expected to be needed by most users and are not supported at the same level as the main Herwig++ code ** Minor changes to improve the physics simulation: *** IncomingPhotonEvolver added to allow the simulation of partonic processes with incoming photons in hadron collisions *** KTRapidityCut added to allow cuts on the p_T and rapidity, rather than just the p_T and pseudorapidity used in SimpleKTCut. This is now used by default for cuts on massive particles such as the $W^\pm$, $Z^0$ and Higgs bosons and the top quark *** Several changes to the decayers of B mesons both to resolve problems with the modelling of partonic decays and improve agreement with $\Upsilon(4s)$ data *** Changes to allow values other than transverse mass of final-state particles as maximum transverse momentum for radiation in parton shower either SCALUP for Les Houches events or the scale of the hard process for internally generated hard processes *** Changed defaults for intrinsic transverse momentum in hadron collisions to 1.9GeV, 2.1GeV and 2.2GeV for the Tevatron and LHC at 10 TeV and 14 TeV, respectively *** Pdfinfo object is now created in the HepMC interface However in order to support all versions of HepMC containing this feature the PDF set is not specified as not all versions contain this information *** New option of only decaying particles with lifetimes below user specified value *** New options for the cut-off in the shower and some obsolete parameters removed *** Added option of switching off certain decay modes in BSM models *** Added a Matcher for Higgs boson to allow cuts to be placed on it *** Diffractive particles deleted from default input files they were not previously used ** Technical changes: *** Some AnalysisHandler classes comparing to LEP data have been renamed e.g. MultiplicityCount becomes LEPMultiplicityCount to avoid confusion with those supplied in /Contrib for observables at the Upsilon(4s) resonance *** Reorganisation to remove the majority of the .icc files by moving inlined functions to headers in an effort to improve compile time *** Restructured the decay libraries to reduce the amount of memory allocation and de-allocation which improves run-time performance *** The switch to turn off LoopTools has been removed because LoopTools is now used by several core modules. As LoopTools does not work on 64-bit platforms with g77 this build option is not supported *** Removed support for obsolete version of HepMC supplied with CLHEP and improved the support for different units options with HepMC *** EvtGen interface has been removed until it is more stable *** Support for ROOT has been removed it was not previously used *** CKKW infrastructure has been removed from the release until a concrete implementation is available *** Default optimisation has been increased from -O2 to -O3 *** Handling of the fortran compiler has been improved mainly due to improvements in the autotools *** Use of FixedAllocator for Particle objects in ThePEG has been removed as it had no performance benefits ** Bugs fixed: *** Problems with the mother/daughter relations in the hard process and diagram selection in W+- and Z0 production in association with a hard jet *** In general matrix element code for fermion-vector to fermion-scalar where the outgoing fermion is coloured and the scalar neutral *** In the selection of diagrams in some associated squark gaugino processes *** h0->mu+mu- was being generated when h0->tau+tau- *** Normalisation in the Histogram class for non unit-weight events *** Protection against negative PDF values has been improved these can occur when using NLO PDF sets *** Lifetime for BSM particles is now automatically calculated at the same time as the width *** Hadrons containing a top quark now treated like hadrons containing BSM particles in order to support this possibility *** Several ambiguous uses of unsigned int *** Several variables that may have been used undefined *** Several memory leaks at initialisation *** The configuration now aborts if no fortran compiler is found as this is required to compile Looptools *** Several minor floating point errors that did not affect results * Herwig++-2.2.1 release: 2008-07-09 (tagged at SVN r3434) ** Ticket #181: BSM shower with a decay close to threshold Now fixed. ** Ticket #191: Split SUSY crash Improved error message. ** Ticket #192: using SCALUP as the pT veto in the shower Now implemented. ** Ticket #194: production processes of ~chi_1(2)- Fixed bug in the diagram creation. ** Removed unused particles DiffractiveParticles.in was removed, they were never produced. ** Hadronization Top quark clusters now possible, handled as 'exotic' clusters. ** Improved handling of decay modes See ThePEG-1.3.0. 'defaultparticle' command is now obsolete. ** Multi-Parton interactions Increased phase space sampling to have less than 1% uncertainty on average multiplicity. ** New libtool version gfortran is now used as default if it is available. Set FC=g77 to override this. ** Fixed several memory leaks ** Memory allocation Now using plain 'new' and 'delete'. * Herwig++-2.2.0 release: 2008-04-18 (tagged at SVN r3195) ** Major release: now as stand-alone library Herwig++ is now a stand-alone dlopen() plugin to ThePEG. No compile-time linking to Herwig code is required. The Herwig++ binary is a simple executable steering ThePEG, which can be replaced by other frontends (such as setupThePEG / runThePEG). ** New matrix elements p p -> W + jet / Z + jet / W + higgs / Z + higgs e+ e- -> Z + higgs ** Looptools Updated to version 2.2. ** Ticket #141: segfault from using 'run' command Fixed by using default allocators in Herwig++, and the Repository::cleanup() method in ThePEG 1.2.0. ** Ticket #157: broken gsl library path on some 64bit systems Paths with lib64 are correctly identified now. ** Ticket #159: p_t spectrum of ttbar pair Fixed identical particle multiplier in Sudakov form factor. ** Ticket #161: glibc segfault Rare segfault in MPI handler fixed. ** Ticket #165: rare infinite loop in four-body decay All 4-body decays without dedicated decayers now use the Mambo algorithm. A loop guard has been introduced to 3-body decays to avoid infinite retries. ** Ticket #166: rare infinite loop in top ME correction These very rare events (O(1) in 10^7) close to mass threshold now are discarded. ** Higgs width fixes ** SatPDF Optionally, the PDF extrapolation behaviour outside a given range can now be specified. ** gcc 4.3 Herwig++-2.2 compiles cleanly with the new gcc 4.3 series. * Herwig++-2.1.4 release: 2008-03-03 (tagged at SVN r3024) ** Ticket #152: Vertex positions All vertex positions of unphysical particles are set to zero until a fix for the previous nonsensical values can be implemented. * Herwig++-2.1.3 release: 2008-02-25 (tagged at SVN r2957) ** Ticket #129: Baryon decays Fix for baryon decay modes. ** Ticket #131: HepMC Check if IO_GenEvent exists ** Ticket #134: Hadronization Smearing of hadron directions in cluster decay fixed. ** Ticket #137: HepMC HepMC conversion allows specification of energy and length units to be used. ** Ticket #139: Neutral kaons Ratio K_L / K_S corrected. ** Ticket #140 / #141: Crash on shutdown Event generation from the 'read' stage or an interface now shuts down cleanly. Fixes a crash bug introduced in 2.1.1 which affected external APIs to ThePEG / Herwig. ** Ticket #146: BSM models can be disabled To save build time, some or all of the BSM models can be disabled using the '--enable-models' configure switch. ** Reorganised .model files The .model files now include the model-specific particles, too. ** Re-tune Re-tuned hadronization parameters to LEP data. ** Other fixes in QSPAC implementation in Shower; Multi-parton interaction tuning; MRST initialization * Herwig++-2.1.2 release: 2008-01-05 (tagged at SVN r2694) ** Ticket #127 Thanks to a patch submitted by Fred Stober, HepMCFile now can output event files in all supported formats. ** Ticket #128 Fixed incorrect value of pi in histogram limits. ** Other fixes in CKKW Qtilde clusterers, BSM width cut, SUSY mixing matrices. * Herwig++-2.1.1 release: 2007-12-08 (tagged at SVN r2589) ** Bug #123 Fixed a bug with particle lifetimes which resulted in nan for some vertex positions. ** Secondary scatters Fixed bug which gave intrinsic pT to secondary scatters. ** gcc abs bug detection configure now checks for and works around http://gcc.gnu.org/bugzilla/show_bug.cgi?id=34130 ** CKKW reweighting Fixed wrong check for top quarks. ** MPIHandler Fixed call order ambiguity. * Herwig++-2.1.0 release: 2007-11-20 (tagged at SVN r2542) ** Major new release Herwig++-2.1 includes significant improvements, including multi-parton interactions, BSM physics and a new hadronic decay model, tuned to LEP data. For an overview of the changes, please see the release note arXiv:0711.3137 * Herwig++-2.0.3 release: 2007-08-21 (tagged at SVN r2101) ** Bug #90 nan in top decay ME corrections fixed. ** unlisted Colour flow fix in LightClusterDecayer ** unlisted Updated version of MultiplicityCount analysis handler. * Herwig++-2.0.2 release: 2007-07-06 (tagged at SVN r1716) ** Bug #80 Separation of HepMC from CLHEP is handled properly now. ** Bug #83 Workaround for OS X header problem ** unlisted Veto on very hard emissions from Shower. ** unlisted Detailed documentation in .in files * Herwig++-2.0.1 release: 2006-12-05 (tagged at SVN r1195) ** Bug #54 ClusterFissioner vertex calculation fixed. ** Bug #57 Crash when showering W+jet events supplied by Les Houches interface. ** Bug #59 Fix for #57 applied to LHC events. ** Bug #60 Segfault when PDF is set to NoPDF. ** Bug #61 Missing weight factor for I=0 mesons ** Bug #62 Spinor vertex calculations broken when spinor rep is not default rep. ** Bug #63 Top decay never produces tau. ** Bug #69 TTbar and HiggsJet analysis handlers fixed. ** unlisted Reorganization of Hadronization module gives 30% speedup. Thanks to Vincenzo Innocente at CMS for his profiling work! ** unlisted cleaner automake files in include/ and src/ ** unlisted Hw64 hadron selection algorithm 'abortnow' fixed. ** unlisted Top/LeptonDalitzAnalysis removed (only worked with modified code). ** unlisted removed f'_0 from particle list, decays were not handled * Herwig++-2.0.0 release: 2006-09-28 (tagged at SVN r1066) ** Full simulation of hadron collisions diff --git a/PDF/Makefile.am b/PDF/Makefile.am --- a/PDF/Makefile.am +++ b/PDF/Makefile.am @@ -1,58 +1,58 @@ EXTRA_DIST = diffraction pkglib_LTLIBRARIES = HwPomeronPDF.la HwPomeronPDF_la_SOURCES = \ PomeronPDF.cc PomeronPDF.h ## add this to produce tests of the PDFs ## HwDIFFRACTIVEPDF_la_CPPFLAGS=$(AM_CPPFLAGS) -DDIFFRACTIVEPDF_TESTING -HwPomeronPDF_la_LDFLAGS = $(AM_LDFLAGS) -module -version-info 3:0:0 +HwPomeronPDF_la_LDFLAGS = $(AM_LDFLAGS) -module -version-info 4:0:0 pkglib_LTLIBRARIES += HwReggeonPDF.la HwReggeonPDF_la_SOURCES = \ ReggeonPDF.cc ReggeonPDF.h ## add this to produce tests of the PDFs ## HwDIFFRACTIVEPDF_la_CPPFLAGS=$(AM_CPPFLAGS) -DDIFFRACTIVEPDF_TESTING -HwReggeonPDF_la_LDFLAGS = $(AM_LDFLAGS) -module -version-info 3:0:0 +HwReggeonPDF_la_LDFLAGS = $(AM_LDFLAGS) -module -version-info 4:0:0 pkglib_LTLIBRARIES += HwPomeronFlux.la HwPomeronFlux_la_SOURCES = \ PomeronFlux.h PomeronFlux.cc -HwPomeronFlux_la_LDFLAGS = $(AM_LDFLAGS) -module -version-info 4:0:0 +HwPomeronFlux_la_LDFLAGS = $(AM_LDFLAGS) -module -version-info 5:0:0 ## bound into HwShower.la noinst_LTLIBRARIES = libHwRemDecayer.la libHwRemDecayer_la_SOURCES = \ HwRemDecayer.h HwRemDecayer.cc HwRemDecayer.fh ## bound into HwShower.la noinst_LTLIBRARIES += libHwMPIPDF.la libHwMPIPDF_la_SOURCES = \ MPIPDF.h MPIPDF.cc MPIPDF.fh \ MinBiasPDF.h MinBiasPDF.cc MinBiasPDF.fh pkglib_LTLIBRARIES += HwSatPDF.la HwSatPDF_la_SOURCES = \ SatPDF.h SatPDF.cc -HwSatPDF_la_LDFLAGS = $(AM_LDFLAGS) -module -version-info 6:0:0 +HwSatPDF_la_LDFLAGS = $(AM_LDFLAGS) -module -version-info 7:0:0 pkglib_LTLIBRARIES += HwIncomingPhotonEvolver.la HwIncomingPhotonEvolver_la_SOURCES = \ IncomingPhotonEvolver.h IncomingPhotonEvolver.cc -HwIncomingPhotonEvolver_la_LDFLAGS = $(AM_LDFLAGS) -module -version-info 6:0:0 +HwIncomingPhotonEvolver_la_LDFLAGS = $(AM_LDFLAGS) -module -version-info 7:0:0 pkglib_LTLIBRARIES += HwSaSPhotonPDF.la HwSaSPhotonPDF_la_SOURCES = \ SaSGamma.f SaSPhotonPDF.cc SaSPhotonPDF.h -HwSaSPhotonPDF_la_LDFLAGS = $(AM_LDFLAGS) -module -version-info 1:0:0 +HwSaSPhotonPDF_la_LDFLAGS = $(AM_LDFLAGS) -module -version-info 2:0:0 install-data-local: for i in `find $(srcdir)/diffraction -name '*.data'`; \ do \ $(install_sh_DATA) $$i $(DESTDIR)$(pkgdatadir)/PDF/$${i#$(srcdir)/}; \ done uninstall-local: rm -rf $(DESTDIR)$(pkgdatadir)/PDF diff --git a/Sampling/Makefile.am b/Sampling/Makefile.am --- a/Sampling/Makefile.am +++ b/Sampling/Makefile.am @@ -1,40 +1,40 @@ SUBDIRS = CellGrids pkglib_LTLIBRARIES = HwSampling.la -HwSampling_la_LDFLAGS = $(AM_LDFLAGS) -module -version-info 6:0:0 +HwSampling_la_LDFLAGS = $(AM_LDFLAGS) -module -version-info 7:0:0 HwSampling_la_SOURCES = \ GeneralStatistics.h GeneralStatistics.cc \ MultiIterationStatistics.h MultiIterationStatistics.cc \ BinSampler.h BinSampler.cc \ GeneralSampler.h GeneralSampler.cc \ MonacoSampler.h MonacoSampler.cc \ Remapper.h Remapper.cc \ exsample/cell.icc \ exsample/generator.h \ exsample/linear_interpolator.icc \ exsample/config.h \ exsample/selectors.h \ exsample/adaption_info.h \ exsample/selectors.icc \ exsample/adaption_info.icc \ exsample/exponential_generator.h \ exsample/exponential_generator.icc \ exsample/generator.icc \ exsample/statistics.h \ exsample/linear_interpolator.h \ exsample/cell.h \ exsample/utility.h \ exsample/binary_tree.h \ exsample/statistics.icc HwSampling_la_LIBADD = \ CellGrids/libHwCellGrids.la EXTRA_DIST = herwig-mergegrids.py install-exec-local: $(install_sh_SCRIPT) $(srcdir)/herwig-mergegrids.py $(DESTDIR)$(bindir)/herwig-mergegrids uninstall-local: rm -f $(DESTDIR)$(bindir)/herwig-mergegrids diff --git a/Shower/Dipole/AlphaS/Makefile.am b/Shower/Dipole/AlphaS/Makefile.am --- a/Shower/Dipole/AlphaS/Makefile.am +++ b/Shower/Dipole/AlphaS/Makefile.am @@ -1,14 +1,14 @@ pkglib_LTLIBRARIES = HwDipoleShowerAlphaS.la -HwDipoleShowerAlphaS_la_LDFLAGS = $(AM_LDFLAGS) -module -version-info 5:0:0 +HwDipoleShowerAlphaS_la_LDFLAGS = $(AM_LDFLAGS) -module -version-info 6:0:0 HwDipoleShowerAlphaS_la_SOURCES = \ alpha_s.h \ alpha_s.cc \ lo_alpha_s.h \ lo_alpha_s.cc \ nlo_alpha_s.h \ nlo_alpha_s.cc \ gsl.h \ gsl.tcc \ gsl.cc diff --git a/Shower/Dipole/Makefile.am b/Shower/Dipole/Makefile.am --- a/Shower/Dipole/Makefile.am +++ b/Shower/Dipole/Makefile.am @@ -1,23 +1,23 @@ SUBDIRS = Base Kernels Kinematics Utility AlphaS Merging Colorea pkglib_LTLIBRARIES = HwDipoleShower.la -HwDipoleShower_la_LDFLAGS = $(AM_LDFLAGS) -module -version-info 9:1:0 +HwDipoleShower_la_LDFLAGS = $(AM_LDFLAGS) -module -version-info 10:0:0 HwDipoleShower_la_LIBADD = \ Base/libHwDipoleShowerBase.la \ Kernels/libHwDipoleShowerKernels.la \ Kinematics/libHwDipoleShowerKinematics.la \ Utility/libHwDipoleShowerUtility.la \ Merging/libHwDipoleShowerMerging.la \ Colorea/libHwDipoleShowerColorea.la HwDipoleShower_la_SOURCES = \ DipoleShowerHandler.h DipoleShowerHandler.fh DipoleShowerHandler.cc pkglib_LTLIBRARIES += HwKrknloEventReweight.la HwKrknloEventReweight_la_SOURCES = \ KrkNLO/KrknloEventReweight.h KrkNLO/KrknloEventReweight.cc -HwKrknloEventReweight_la_LDFLAGS = $(AM_LDFLAGS) -module -version-info 1:0:0 +HwKrknloEventReweight_la_LDFLAGS = $(AM_LDFLAGS) -module -version-info 2:0:0 diff --git a/Shower/QTilde/Makefile.am b/Shower/QTilde/Makefile.am --- a/Shower/QTilde/Makefile.am +++ b/Shower/QTilde/Makefile.am @@ -1,46 +1,46 @@ SUBDIRS = Matching pkglib_LTLIBRARIES = HwShower.la -HwShower_la_LDFLAGS = $(AM_LDFLAGS) -module -version-info 25:2:0 +HwShower_la_LDFLAGS = $(AM_LDFLAGS) -module -version-info 26:0:0 HwShower_la_SOURCES = \ Couplings/ShowerAlphaQCD.h Couplings/ShowerAlphaQCD.cc \ Couplings/ShowerAlphaQED.h Couplings/ShowerAlphaQED.cc\ QTildeShowerHandler.h QTildeShowerHandler.fh QTildeShowerHandler.cc \ SplittingFunctions/HalfHalfOneSplitFn.h SplittingFunctions/HalfHalfOneSplitFn.cc\ SplittingFunctions/HalfHalfOneEWSplitFn.h SplittingFunctions/HalfHalfOneEWSplitFn.cc\ SplittingFunctions/OneOneOneSplitFn.h SplittingFunctions/OneOneOneSplitFn.cc\ SplittingFunctions/OneOneOneMassiveSplitFn.h SplittingFunctions/OneOneOneMassiveSplitFn.cc\ SplittingFunctions/ZeroZeroOneSplitFn.h SplittingFunctions/ZeroZeroOneSplitFn.cc\ SplittingFunctions/OneHalfHalfSplitFn.h SplittingFunctions/OneHalfHalfSplitFn.cc\ SplittingFunctions/HalfOneHalfSplitFn.h SplittingFunctions/HalfOneHalfSplitFn.cc\ SplittingFunctions/CMWOneOneOneSplitFn.h SplittingFunctions/CMWOneOneOneSplitFn.cc\ SplittingFunctions/CMWHalfHalfOneSplitFn.h SplittingFunctions/CMWHalfHalfOneSplitFn.cc\ Kinematics/Decay_QTildeShowerKinematics1to2.cc \ Kinematics/Decay_QTildeShowerKinematics1to2.h \ Kinematics/IS_QTildeShowerKinematics1to2.cc Kinematics/IS_QTildeShowerKinematics1to2.h \ Kinematics/FS_QTildeShowerKinematics1to2.cc Kinematics/FS_QTildeShowerKinematics1to2.h \ Kinematics/KinematicsReconstructor.cc \ Kinematics/KinematicsReconstructor.tcc \ Kinematics/KinematicsReconstructor.h \ Kinematics/KinematicsReconstructor.fh \ Base/HardTree.cc Base/HardTree.h Base/HardTree.fh \ Base/HardBranching.h Base/HardBranching.fh Base/HardBranching.cc\ Base/PartnerFinder.h Base/PartnerFinder.fh Base/PartnerFinder.cc \ Base/ShowerVeto.h Base/ShowerVeto.fh Base/ShowerVeto.cc \ Base/FullShowerVeto.h Base/FullShowerVeto.fh Base/FullShowerVeto.cc \ SplittingFunctions/SplittingGenerator.cc SplittingFunctions/SplittingGenerator.h\ SplittingFunctions/SplittingGenerator.fh \ Base/ShowerTree.h Base/ShowerTree.fh Base/ShowerTree.cc \ ShowerConfig.h ShowerConfig.cc \ Base/Branching.h \ Base/ShowerParticle.cc Base/ShowerParticle.fh Base/ShowerParticle.h \ Kinematics/ShowerKinematics.fh Kinematics/ShowerKinematics.h Kinematics/ShowerKinematics.cc \ Kinematics/ShowerBasis.fh Kinematics/ShowerBasis.h Kinematics/ShowerBasis.cc \ Base/ShowerProgenitor.fh Base/ShowerProgenitor.h \ SplittingFunctions/SudakovFormFactor.cc SplittingFunctions/SudakovFormFactor.h SplittingFunctions/SudakovFormFactor.fh \ SplittingFunctions/SudakovCutOff.cc SplittingFunctions/SudakovCutOff.h SplittingFunctions/SudakovCutOff.fh \ SplittingFunctions/PTCutOff.cc SplittingFunctions/PTCutOff.h \ SplittingFunctions/MassCutOff.cc SplittingFunctions/MassCutOff.h \ SplittingFunctions/VariableMassCutOff.cc SplittingFunctions/VariableMassCutOff.h \ SplittingFunctions/SplittingFunction.h SplittingFunctions/SplittingFunction.fh \ SplittingFunctions/SplittingFunction.cc \ Base/ShowerVertex.cc Base/ShowerVertex.fh Base/ShowerVertex.h diff --git a/Shower/QTilde/Matching/Makefile.am b/Shower/QTilde/Matching/Makefile.am --- a/Shower/QTilde/Matching/Makefile.am +++ b/Shower/QTilde/Matching/Makefile.am @@ -1,8 +1,8 @@ pkglib_LTLIBRARIES = HwMatching.la -HwMatching_la_LDFLAGS = $(AM_LDFLAGS) -module -version-info 4:0:0 +HwMatching_la_LDFLAGS = $(AM_LDFLAGS) -module -version-info 5:0:0 HwMatching_la_SOURCES = \ PowhegShowerHandler.h PowhegShowerHandler.cc \ CKKWTree.h CKKWTree.fh CKKWTree.cc \ ProtoTree.h ProtoBranching.h PotentialTree.h diff --git a/Shower/ShowerHandler.cc b/Shower/ShowerHandler.cc --- a/Shower/ShowerHandler.cc +++ b/Shower/ShowerHandler.cc @@ -1,1130 +1,1130 @@ // -*- C++ -*- // // ShowerHandler.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 ShowerHandler class. // #include "ShowerHandler.h" #include "ThePEG/Interface/ClassDocumentation.h" #include "ThePEG/Interface/Reference.h" #include "ThePEG/Interface/Parameter.h" #include "ThePEG/Interface/ParVector.h" #include "ThePEG/Interface/Switch.h" #include "ThePEG/Interface/Command.h" #include "ThePEG/PDF/PartonExtractor.h" #include "ThePEG/PDF/PartonBinInstance.h" #include "Herwig/PDT/StandardMatchers.h" #include "ThePEG/Cuts/Cuts.h" #include "ThePEG/Handlers/StandardXComb.h" #include "ThePEG/Utilities/Throw.h" #include "ThePEG/Utilities/StringUtils.h" #include "ThePEG/Persistency/PersistentOStream.h" #include "ThePEG/Persistency/PersistentIStream.h" #include "ThePEG/Repository/EventGenerator.h" #include "Herwig/Utilities/EnumParticles.h" #include "Herwig/PDF/MPIPDF.h" #include "Herwig/PDF/MinBiasPDF.h" #include "ThePEG/Handlers/EventHandler.h" #include "Herwig/PDF/HwRemDecayer.h" #include #include "ThePEG/Utilities/DescribeClass.h" #include "Herwig/Decay/DecayIntegrator.h" #include "Herwig/Decay/DecayPhaseSpaceMode.h" using namespace Herwig; DescribeClass describeShowerHandler ("Herwig::ShowerHandler","HwShower.so"); ShowerHandler::~ShowerHandler() {} tShowerHandlerPtr ShowerHandler::currentHandler_ = tShowerHandlerPtr(); void ShowerHandler::doinit() { CascadeHandler::doinit(); // copy particles to decay before showering from input vector to the // set used in the simulation if ( particlesDecayInShower_.empty() ) { for(unsigned int ix=0;ixunrestrictedPhasespace() && restrictPhasespace() ) { generator()->log() << "ShowerApproximation warning: The scale profile chosen requires an unrestricted phase space,\n" << "however, the phase space was set to be restricted. Will switch to unrestricted phase space.\n" << flush; restrictPhasespace_ = false; } } } IBPtr ShowerHandler::clone() const { return new_ptr(*this); } IBPtr ShowerHandler::fullclone() const { return new_ptr(*this); } ShowerHandler::ShowerHandler() : maxtry_(10),maxtryMPI_(10),maxtryDP_(10),maxtryDecay_(100), factorizationScaleFactor_(1.0), renormalizationScaleFactor_(1.0), hardScaleFactor_(1.0), restrictPhasespace_(true), maxPtIsMuF_(false), spinOpt_(1), pdfFreezingScale_(2.5*GeV), doFSR_(true), doISR_(true), splitHardProcess_(true), includeSpaceTime_(false), vMin_(0.1*GeV2), reweight_(1.0) { inputparticlesDecayInShower_.push_back( 6 ); // top inputparticlesDecayInShower_.push_back( 23 ); // Z0 inputparticlesDecayInShower_.push_back( 24 ); // W+/- inputparticlesDecayInShower_.push_back( 25 ); // h0 } void ShowerHandler::doinitrun(){ CascadeHandler::doinitrun(); //can't use isMPIOn here, because the EventHandler is not set at that stage if(MPIHandler_) { MPIHandler_->initialize(); if(MPIHandler_->softInt()) remDec_->initSoftInteractions(MPIHandler_->Ptmin(), MPIHandler_->beta()); } } void ShowerHandler::dofinish() { CascadeHandler::dofinish(); if(MPIHandler_) MPIHandler_->finalize(); } void ShowerHandler::persistentOutput(PersistentOStream & os) const { os << remDec_ << ounit(pdfFreezingScale_,GeV) << maxtry_ << maxtryMPI_ << maxtryDP_ << maxtryDecay_ << inputparticlesDecayInShower_ << particlesDecayInShower_ << MPIHandler_ << PDFA_ << PDFB_ << PDFARemnant_ << PDFBRemnant_ << includeSpaceTime_ << ounit(vMin_,GeV2) << factorizationScaleFactor_ << renormalizationScaleFactor_ << hardScaleFactor_ << restrictPhasespace_ << maxPtIsMuF_ << hardScaleProfile_ << showerVariations_ << doFSR_ << doISR_ << splitHardProcess_ << spinOpt_ << useConstituentMasses_; } void ShowerHandler::persistentInput(PersistentIStream & is, int) { is >> remDec_ >> iunit(pdfFreezingScale_,GeV) >> maxtry_ >> maxtryMPI_ >> maxtryDP_ >> maxtryDecay_ >> inputparticlesDecayInShower_ >> particlesDecayInShower_ >> MPIHandler_ >> PDFA_ >> PDFB_ >> PDFARemnant_ >> PDFBRemnant_ >> includeSpaceTime_ >> iunit(vMin_,GeV2) >> factorizationScaleFactor_ >> renormalizationScaleFactor_ >> hardScaleFactor_ >> restrictPhasespace_ >> maxPtIsMuF_ >> hardScaleProfile_ >> showerVariations_ >> doFSR_ >> doISR_ >> splitHardProcess_ >> spinOpt_ >> useConstituentMasses_; } void ShowerHandler::Init() { static ClassDocumentation documentation ("Main driver class for the showering."); static Reference interfaceRemDecayer("RemDecayer", "A reference to the Remnant Decayer object", &Herwig::ShowerHandler::remDec_, false, false, true, false); static Parameter interfacePDFFreezingScale ("PDFFreezingScale", "The PDF freezing scale", &ShowerHandler::pdfFreezingScale_, GeV, 2.5*GeV, 2.0*GeV, 10.0*GeV, false, false, Interface::limited); static Parameter interfaceMaxTry ("MaxTry", "The maximum number of attempts for the main showering loop", &ShowerHandler::maxtry_, 10, 1, 100, false, false, Interface::limited); static Parameter interfaceMaxTryMPI ("MaxTryMPI", "The maximum number of regeneration attempts for an additional scattering", &ShowerHandler::maxtryMPI_, 10, 0, 100, false, false, Interface::limited); static Parameter interfaceMaxTryDP ("MaxTryDP", "The maximum number of regeneration attempts for an additional hard scattering", &ShowerHandler::maxtryDP_, 10, 0, 100, false, false, Interface::limited); static ParVector interfaceDecayInShower ("DecayInShower", "PDG codes of the particles to be decayed in the shower", &ShowerHandler::inputparticlesDecayInShower_, -1, 0l, -10000000l, 10000000l, false, false, Interface::limited); static Reference interfaceMPIHandler ("MPIHandler", "The object that administers all additional scatterings.", &ShowerHandler::MPIHandler_, false, false, true, true); static Reference interfacePDFA ("PDFA", "The PDF for beam particle A. Overrides the particle's own PDF setting." "By default used for both the shower and forced splitting in the remnant", &ShowerHandler::PDFA_, false, false, true, true, false); static Reference interfacePDFB ("PDFB", "The PDF for beam particle B. Overrides the particle's own PDF setting." "By default used for both the shower and forced splitting in the remnant", &ShowerHandler::PDFB_, false, false, true, true, false); static Reference interfacePDFARemnant ("PDFARemnant", "The PDF for beam particle A used to generate forced splittings of the remnant." " This overrides both the particle's own PDF setting and the value set by PDFA if used.", &ShowerHandler::PDFARemnant_, false, false, true, true, false); static Reference interfacePDFBRemnant ("PDFBRemnant", "The PDF for beam particle B used to generate forced splittings of the remnant." " This overrides both the particle's own PDF setting and the value set by PDFB if used.", &ShowerHandler::PDFBRemnant_, false, false, true, true, false); static Switch interfaceIncludeSpaceTime ("IncludeSpaceTime", "Whether to include the model for the calculation of space-time distances", &ShowerHandler::includeSpaceTime_, false, false, false); static SwitchOption interfaceIncludeSpaceTimeYes (interfaceIncludeSpaceTime, "Yes", "Include the model", true); static SwitchOption interfaceIncludeSpaceTimeNo (interfaceIncludeSpaceTime, "No", "Only include the displacement from the particle-s lifetime for decaying particles", false); static Parameter interfaceMinimumVirtuality ("MinimumVirtuality", "The minimum virtuality for the space-time model", &ShowerHandler::vMin_, GeV2, 0.1*GeV2, 0.0*GeV2, 1000.0*GeV2, false, false, Interface::limited); static Parameter interfaceFactorizationScaleFactor ("FactorizationScaleFactor", "The factorization scale factor.", &ShowerHandler::factorizationScaleFactor_, 1.0, 0.0, 0, false, false, Interface::lowerlim); static Parameter interfaceRenormalizationScaleFactor ("RenormalizationScaleFactor", "The renormalization scale factor.", &ShowerHandler::renormalizationScaleFactor_, 1.0, 0.0, 0, false, false, Interface::lowerlim); static Parameter interfaceHardScaleFactor ("HardScaleFactor", "The hard scale factor.", &ShowerHandler::hardScaleFactor_, 1.0, 0.0, 0, false, false, Interface::lowerlim); static Parameter interfaceMaxTryDecay ("MaxTryDecay", "The maximum number of attempts to generate a decay", &ShowerHandler::maxtryDecay_, 200, 10, 0, false, false, Interface::lowerlim); static Reference interfaceHardScaleProfile ("HardScaleProfile", "The hard scale profile to use.", &ShowerHandler::hardScaleProfile_, false, false, true, true, false); static Switch interfaceMaxPtIsMuF ("MaxPtIsMuF", "", &ShowerHandler::maxPtIsMuF_, false, false, false); static SwitchOption interfaceMaxPtIsMuFYes (interfaceMaxPtIsMuF, "Yes", "", true); static SwitchOption interfaceMaxPtIsMuFNo (interfaceMaxPtIsMuF, "No", "", false); static Switch interfaceRestrictPhasespace ("RestrictPhasespace", "Switch on or off phasespace restrictions", &ShowerHandler::restrictPhasespace_, true, false, false); static SwitchOption interfaceRestrictPhasespaceYes (interfaceRestrictPhasespace, "Yes", "Perform phasespace restrictions", true); static SwitchOption interfaceRestrictPhasespaceNo (interfaceRestrictPhasespace, "No", "Do not perform phasespace restrictions", false); static Command interfaceAddVariation ("AddVariation", "Add a shower variation.", &ShowerHandler::doAddVariation, false); static Switch interfaceDoFSR ("DoFSR", "Switch on or off final state radiation.", &ShowerHandler::doFSR_, true, false, false); static SwitchOption interfaceDoFSRYes (interfaceDoFSR, "Yes", "Switch on final state radiation.", true); static SwitchOption interfaceDoFSRNo (interfaceDoFSR, "No", "Switch off final state radiation.", false); static Switch interfaceDoISR ("DoISR", "Switch on or off initial state radiation.", &ShowerHandler::doISR_, true, false, false); static SwitchOption interfaceDoISRYes (interfaceDoISR, "Yes", "Switch on initial state radiation.", true); static SwitchOption interfaceDoISRNo (interfaceDoISR, "No", "Switch off initial state radiation.", false); static Switch interfaceSplitHardProcess ("SplitHardProcess", "Whether or not to try and split the hard process into production and decay processes", &ShowerHandler::splitHardProcess_, true, false, false); static SwitchOption interfaceSplitHardProcessYes (interfaceSplitHardProcess, "Yes", "Split the hard process", true); static SwitchOption interfaceSplitHardProcessNo (interfaceSplitHardProcess, "No", "Don't split the hard process", false); static Switch interfaceSpinCorrelations ("SpinCorrelations", "Treatment of spin correlations in the parton shower", &ShowerHandler::spinOpt_, 1, false, false); static SwitchOption interfaceSpinCorrelationsNo (interfaceSpinCorrelations, "No", "No spin correlations", 0); static SwitchOption interfaceSpinCorrelationsSpin (interfaceSpinCorrelations, "Yes", "Include the azimuthal spin correlations", 1); static Switch interfaceUseConstituentMasses ("UseConstituentMasses", "Whether or not to use constituent masses for the reconstruction of the particle after showering.", &ShowerHandler::useConstituentMasses_, true, false, false); static SwitchOption interfaceUseConstituentMassesYes (interfaceUseConstituentMasses, "Yes", "Use constituent masses.", true); static SwitchOption interfaceUseConstituentMassesNo (interfaceUseConstituentMasses, "No", "Don't use constituent masses.", false); } Energy ShowerHandler::hardScale() const { assert(false); } void ShowerHandler::cascade() { useMe(); // Initialise the weights in the event object // so that any variations are output regardless of // whether showering occurs for the given event initializeWeights(); // get the PDF's from ThePEG (if locally overridden use the local versions) tcPDFPtr first = PDFA_ ? tcPDFPtr(PDFA_) : firstPDF().pdf(); tcPDFPtr second = PDFB_ ? tcPDFPtr(PDFB_) : secondPDF().pdf(); resetPDFs(make_pair(first,second)); // set the PDFs for the remnant if( ! rempdfs_.first) rempdfs_.first = PDFARemnant_ ? PDFPtr(PDFARemnant_) : const_ptr_cast(first); if( ! rempdfs_.second) rempdfs_.second = PDFBRemnant_ ? PDFPtr(PDFBRemnant_) : const_ptr_cast(second); // get the incoming partons tPPair incomingPartons = eventHandler()->currentCollision()->primarySubProcess()->incoming(); // and the parton bins PBIPair incomingBins = make_pair(lastExtractor()->partonBinInstance(incomingPartons.first), lastExtractor()->partonBinInstance(incomingPartons.second)); // and the incoming hadrons tPPair incomingHadrons = eventHandler()->currentCollision()->incoming(); remnantDecayer()->setHadronContent(incomingHadrons); // check if incoming hadron == incoming parton // and get the incoming hadron if exists or parton otherwise incoming_ = make_pair(incomingBins.first ? incomingBins.first ->particle() : incomingPartons.first, incomingBins.second ? incomingBins.second->particle() : incomingPartons.second); // check the collision is of the beam particles // and if not boost collision to the right frame // i.e. the hadron-hadron CMF of the collision bool btotal(false); LorentzRotation rtotal; if(incoming_.first != incomingHadrons.first || incoming_.second != incomingHadrons.second ) { btotal = true; boostCollision(false); } // set the current ShowerHandler setCurrentHandler(); // first shower the hard process try { SubProPtr sub = eventHandler()->currentCollision()->primarySubProcess(); incomingPartons = cascade(sub,lastXCombPtr()); } catch(ShowerTriesVeto &veto){ throw Exception() << "Failed to generate the shower after " << veto.tries << " attempts in ShowerHandler::cascade()" << Exception::eventerror; } if(showerHardProcessVeto()) throw Veto(); // if a non-hadron collision return (both incoming non-hadronic) if( ( !incomingBins.first|| !isResolvedHadron(incomingBins.first ->particle()))&& ( !incomingBins.second|| !isResolvedHadron(incomingBins.second->particle()))) { // boost back to lab if needed if(btotal) boostCollision(true); // perform the reweighting for the hard process shower combineWeights(); // unset the current ShowerHandler unSetCurrentHandler(); return; } // get the remnants for hadronic collision pair remnants(getRemnants(incomingBins)); // set the starting scale of the forced splitting to the PDF freezing scale remnantDecayer()->initialize(remnants, incoming_, *currentStep(), pdfFreezingScale()); // do the first forcedSplitting try { remnantDecayer()->doSplit(incomingPartons, make_pair(rempdfs_.first,rempdfs_.second), true); } catch (ExtraScatterVeto) { throw Exception() << "Remnant extraction failed in " << "ShowerHandler::cascade() from primary interaction" << Exception::eventerror; } // perform the reweighting for the hard process shower combineWeights(); // if no MPI return if( !isMPIOn() ) { remnantDecayer()->finalize(); // boost back to lab if needed if(btotal) boostCollision(true); // unset the current ShowerHandler unSetCurrentHandler(); return; } // generate the multiple scatters use modified pdf's now: setMPIPDFs(); // additional "hard" processes unsigned int tries(0); // This is the loop over additional hard scatters (most of the time // only one, but who knows...) for(unsigned int i=1; i <= getMPIHandler()->additionalHardProcs(); i++){ //counter for regeneration unsigned int multSecond = 0; // generate the additional scatters while( multSecond < getMPIHandler()->multiplicity(i) ) { // generate the hard scatter tStdXCombPtr lastXC = getMPIHandler()->generate(i); SubProPtr sub = lastXC->construct(); // add to the Step newStep()->addSubProcess(sub); // increment the counters tries++; multSecond++; if(tries == maxtryDP_) throw Exception() << "Failed to establish the requested number " << "of additional hard processes. If this error " << "occurs often, your selection of additional " << "scatter is probably unphysical" << Exception::eventerror; // Generate the shower. If not possible veto the event try { incomingPartons = cascade(sub,lastXC); } catch(ShowerTriesVeto &veto){ throw Exception() << "Failed to generate the shower of " << "a secondary hard process after " << veto.tries << " attempts in Evolver::showerHardProcess()" << Exception::eventerror; } try { // do the forcedSplitting remnantDecayer()->doSplit(incomingPartons, make_pair(remmpipdfs_.first,remmpipdfs_.second), false); } catch(ExtraScatterVeto){ //remove all particles associated with the subprocess newStep()->removeParticle(incomingPartons.first); newStep()->removeParticle(incomingPartons.second); //remove the subprocess from the list newStep()->removeSubProcess(sub); //regenerate the scattering multSecond--; continue; } // connect with the remnants but don't set Remnant colour, // because that causes problems due to the multiple colour lines. if ( !remnants.first ->extract(incomingPartons.first , false) || !remnants.second->extract(incomingPartons.second, false) ) throw Exception() << "Remnant extraction failed in " << "ShowerHandler::cascade() for additional scatter" << Exception::runerror; } // perform the reweighting for the additional hard scatter shower combineWeights(); } // the underlying event processes unsigned int ptveto(1), veto(0); unsigned int max(getMPIHandler()->multiplicity()); for(unsigned int i=0; i maxtryMPI_) break; //generate PSpoint tStdXCombPtr lastXC = getMPIHandler()->generate(); SubProPtr sub = lastXC->construct(); //If Algorithm=1 additional scatters of the signal type // with pt > ptmin have to be vetoed //with probability 1/(m+1), where m is the number of occurances in this event if( getMPIHandler()->Algorithm() == 1 ){ //get the pT Energy pt = sub->outgoing().front()->momentum().perp(); if(pt > getMPIHandler()->PtForVeto() && UseRandom::rnd() < 1./(ptveto+1) ){ ptveto++; i--; continue; } } // add to the SubProcess to the step newStep()->addSubProcess(sub); // Run the Shower. If not possible veto the scattering try { incomingPartons = cascade(sub,lastXC); } // discard this extra scattering, but try the next one catch(ShowerTriesVeto) { newStep()->removeSubProcess(sub); //regenerate the scattering veto++; i--; continue; } try{ //do the forcedSplitting remnantDecayer()->doSplit(incomingPartons, make_pair(remmpipdfs_.first,remmpipdfs_.second), false); } catch (ExtraScatterVeto) { //remove all particles associated with the subprocess newStep()->removeParticle(incomingPartons.first); newStep()->removeParticle(incomingPartons.second); //remove the subprocess from the list newStep()->removeSubProcess(sub); //regenerate the scattering veto++; i--; continue; } //connect with the remnants but don't set Remnant colour, //because that causes problems due to the multiple colour lines. if ( !remnants.first ->extract(incomingPartons.first , false) || !remnants.second->extract(incomingPartons.second, false) ) throw Exception() << "Remnant extraction failed in " << "ShowerHandler::cascade() for MPI hard scattering" << Exception::runerror; //reset veto counter veto = 0; // perform the reweighting for the MPI process shower combineWeights(); } // finalize the remnants remnantDecayer()->finalize(getMPIHandler()->colourDisrupt(), getMPIHandler()->softMultiplicity()); // boost back to lab if needed if(btotal) boostCollision(true); // unset the current ShowerHandler unSetCurrentHandler(); getMPIHandler()->clean(); resetPDFs(make_pair(first,second)); } void ShowerHandler::initializeWeights() { if ( !showerVariations().empty() ) { tEventPtr event = eventHandler()->currentEvent(); for ( map::const_iterator var = showerVariations().begin(); var != showerVariations().end(); ++var ) { // Check that this is behaving as intended //map::iterator wi = event->optionalWeights().find(var->first); //assert(wi == event->optionalWeights().end() ); event->optionalWeights()[var->first] = 1.0; currentWeights_[var->first] = 1.0; } } reweight_ = 1.0; } void ShowerHandler::resetWeights() { for ( map::iterator w = currentWeights_.begin(); w != currentWeights_.end(); ++w ) { w->second = 1.0; } reweight_ = 1.0; } void ShowerHandler::combineWeights() { tEventPtr event = eventHandler()->currentEvent(); for ( map::const_iterator w = currentWeights_.begin(); w != currentWeights_.end(); ++w ) { map::iterator ew = event->optionalWeights().find(w->first); if ( ew != event->optionalWeights().end() ) ew->second *= w->second; else { assert(false && "Weight name unknown."); //event->optionalWeights()[w->first] = w->second; } } if ( reweight_ != 1.0 ) { Ptr::tptr eh = dynamic_ptr_cast::tptr>(eventHandler()); if ( !eh ) { throw Exception() << "ShowerHandler::combineWeights() : Cross section reweighting " << "through the shower is currently only available with standard " << "event generators" << Exception::runerror; } eh->reweight(reweight_); } } string ShowerHandler::doAddVariation(string in) { if ( in.empty() ) return "expecting a name and a variation specification"; string name = StringUtils::car(in); ShowerVariation var; string res = var.fromInFile(StringUtils::cdr(in)); if ( res.empty() ) { if ( !var.firstInteraction && !var.secondaryInteractions ) { // TODO what about decay showers? return "variation does not apply to any shower"; } if ( var.renormalizationScaleFactor == 1.0 && var.factorizationScaleFactor == 1.0 ) { return "variation does not vary anything"; } /* Repository::clog() << "adding a variation with tag '" << name << "' using\nxir = " << var.renormalizationScaleFactor << " xif = " << var.factorizationScaleFactor << "\napplying to:\n" << "first interaction = " << var.firstInteraction << " " << "secondary interactions = " << var.secondaryInteractions << "\n" << flush; */ showerVariations()[name] = var; } return res; } tPPair ShowerHandler::cascade(tSubProPtr, XCPtr) { assert(false); } ShowerHandler::RemPair ShowerHandler::getRemnants(PBIPair incomingBins) { RemPair remnants; // first beam particle if(incomingBins.first&&!incomingBins.first->remnants().empty()) { remnants.first = dynamic_ptr_cast(incomingBins.first->remnants()[0] ); if(remnants.first) { ParticleVector children=remnants.first->children(); for(unsigned int ix=0;ixdataPtr()==remnants.first->dataPtr()) remnants.first = dynamic_ptr_cast(children[ix]); } //remove existing colour lines from the remnants if(remnants.first->colourLine()) remnants.first->colourLine()->removeColoured(remnants.first); if(remnants.first->antiColourLine()) remnants.first->antiColourLine()->removeAntiColoured(remnants.first); } } // seconnd beam particle if(incomingBins.second&&!incomingBins. second->remnants().empty()) { remnants.second = dynamic_ptr_cast(incomingBins.second->remnants()[0] ); if(remnants.second) { ParticleVector children=remnants.second->children(); for(unsigned int ix=0;ixdataPtr()==remnants.second->dataPtr()) remnants.second = dynamic_ptr_cast(children[ix]); } //remove existing colour lines from the remnants if(remnants.second->colourLine()) remnants.second->colourLine()->removeColoured(remnants.second); if(remnants.second->antiColourLine()) remnants.second->antiColourLine()->removeAntiColoured(remnants.second); } } assert(remnants.first || remnants.second); return remnants; } namespace { void addChildren(tPPtr in,set & particles) { particles.insert(in); for(unsigned int ix=0;ixchildren().size();++ix) addChildren(in->children()[ix],particles); } } void ShowerHandler::boostCollision(bool boost) { // calculate boost from lab to rest if(!boost) { Lorentz5Momentum ptotal=incoming_.first ->momentum()+incoming_.second->momentum(); boost_ = LorentzRotation(-ptotal.boostVector()); Axis axis((boost_*incoming_.first ->momentum()).vect().unit()); if(axis.perp2()>0.) { double sinth(sqrt(sqr(axis.x())+sqr(axis.y()))); boost_.rotate(-acos(axis.z()),Axis(-axis.y()/sinth,axis.x()/sinth,0.)); } } // first call performs the boost and second inverse // get the particles to be boosted set particles; addChildren(incoming_.first,particles); addChildren(incoming_.second,particles); // apply the boost for(set::const_iterator cit=particles.begin(); cit!=particles.end();++cit) { (*cit)->transform(boost_); } if(!boost) boost_.invert(); } void ShowerHandler::setMPIPDFs() { if ( !mpipdfs_.first ) { // first have to check for MinBiasPDF tcMinBiasPDFPtr first = dynamic_ptr_cast(firstPDF().pdf()); if(first) mpipdfs_.first = new_ptr(MPIPDF(first->originalPDF())); else mpipdfs_.first = new_ptr(MPIPDF(firstPDF().pdf())); } if ( !mpipdfs_.second ) { tcMinBiasPDFPtr second = dynamic_ptr_cast(secondPDF().pdf()); if(second) mpipdfs_.second = new_ptr(MPIPDF(second->originalPDF())); else mpipdfs_.second = new_ptr(MPIPDF(secondPDF().pdf())); } if( !remmpipdfs_.first ) { tcMinBiasPDFPtr first = dynamic_ptr_cast(rempdfs_.first); if(first) remmpipdfs_.first = new_ptr(MPIPDF(first->originalPDF())); else remmpipdfs_.first = new_ptr(MPIPDF(rempdfs_.first)); } if( !remmpipdfs_.second ) { tcMinBiasPDFPtr second = dynamic_ptr_cast(rempdfs_.second); if(second) remmpipdfs_.second = new_ptr(MPIPDF(second->originalPDF())); else remmpipdfs_.second = new_ptr(MPIPDF(rempdfs_.second)); } // reset the PDFs stored in the base class resetPDFs(mpipdfs_); } bool ShowerHandler::isResolvedHadron(tPPtr particle) { if(!HadronMatcher::Check(particle->data())) return false; for(unsigned int ix=0;ixchildren().size();++ix) { if(particle->children()[ix]->id()==ParticleID::Remnant) return true; } return false; } namespace { bool decayProduct(tSubProPtr subProcess, tPPtr particle) { // must be time-like and not incoming if(particle->momentum().m2()<=ZERO|| particle == subProcess->incoming().first|| particle == subProcess->incoming().second) return false; // if only 1 outgoing and this is it if(subProcess->outgoing().size()==1 && subProcess->outgoing()[0]==particle) return true; // must not be the s-channel intermediate otherwise if(find(subProcess->incoming().first->children().begin(), subProcess->incoming().first->children().end(),particle)!= subProcess->incoming().first->children().end()&& find(subProcess->incoming().second->children().begin(), subProcess->incoming().second->children().end(),particle)!= subProcess->incoming().second->children().end()&& subProcess->incoming().first ->children().size()==1&& subProcess->incoming().second->children().size()==1) return false; // if non-coloured this is enough if(!particle->dataPtr()->coloured()) return true; // if coloured must be unstable if(particle->dataPtr()->stable()) return false; // must not have same particle type as a child int id = particle->id(); for(unsigned int ix=0;ixchildren().size();++ix) if(particle->children()[ix]->id()==id) return false; // otherwise its a decaying particle return true; } PPtr findParent(PPtr original, bool & isHard, set outgoingset, tSubProPtr subProcess) { PPtr parent=original; isHard |=(outgoingset.find(original) != outgoingset.end()); if(!original->parents().empty()) { PPtr orig=original->parents()[0]; if(decayProduct(subProcess,orig)) parent=findParent(orig,isHard,outgoingset,subProcess); } return parent; } } void ShowerHandler::findDecayProducts(PPtr in,PerturbativeProcessPtr hard, DecayProcessMap & decay) const { ParticleVector children=in->children(); for(ParticleVector::const_iterator it=children.begin(); it!=children.end();++it) { // if decayed or should be decayed in shower make the PerturbaitveProcess bool radiates = false; if(!(**it).children().empty()) { // remove d,u,s,c,b quarks and leptons other than on-shell taus if( StandardQCDPartonMatcher::Check((**it).id()) || ( LeptonMatcher::Check((**it).id()) && !(abs((**it).id())==ParticleID::tauminus && abs((**it).mass()-(**it).dataPtr()->mass())id()==(**it).id()) { foundParticle = true; } else if((**it).children()[iy]->id()==ParticleID::g || (**it).children()[iy]->id()==ParticleID::gamma) { foundGauge = true; } } radiates = foundParticle && foundGauge; } } if(radiates) { findDecayProducts(*it,hard,decay); } else if(!(**it).children().empty()|| (decaysInShower((**it).id())&&!(**it).dataPtr()->stable())) { createDecayProcess(*it,hard,decay); } else { hard->outgoing().push_back(make_pair(*it,PerturbativeProcessPtr())); } } } void ShowerHandler::splitHardProcess(tPVector tagged, PerturbativeProcessPtr & hard, DecayProcessMap & decay) const { // temporary storage of the particles set hardParticles; // tagged particles in a set set outgoingset(tagged.begin(),tagged.end()); bool isHard=false; // loop over the tagged particles for (tParticleVector::const_iterator taggedP = tagged.begin(); taggedP != tagged.end(); ++taggedP) { // skip remnants if (eventHandler()->currentCollision()&& eventHandler()->currentCollision()->isRemnant(*taggedP)) continue; // find the parent and whether its a decaying particle bool isDecayProd=false; // check if hard isHard |=(outgoingset.find(*taggedP) != outgoingset.end()); if(splitHardProcess_) { tPPtr parent = *taggedP; // check if from s channel decaying colourless particle while(parent&&!parent->parents().empty()&&!isDecayProd) { parent = parent->parents()[0]; if(parent == subProcess_->incoming().first || parent == subProcess_->incoming().second ) break; isDecayProd = decayProduct(subProcess_,parent); } if (isDecayProd) hardParticles.insert(findParent(parent,isHard,outgoingset,subProcess_)); } if (!isDecayProd) hardParticles.insert(*taggedP); } // there must be something to shower if(hardParticles.empty()) throw Exception() << "No particles to shower in " << "ShowerHandler::splitHardProcess()" << Exception::eventerror; // must be a hard process if(!isHard) throw Exception() << "Starting on decay not yet implemented in " << "ShowerHandler::splitHardProcess()" << Exception::runerror; // create the hard process hard = new_ptr(PerturbativeProcess()); // incoming particles hard->incoming().push_back(make_pair(subProcess_->incoming().first ,PerturbativeProcessPtr())); hard->incoming().push_back(make_pair(subProcess_->incoming().second,PerturbativeProcessPtr())); // outgoing particles for(set::const_iterator it=hardParticles.begin();it!=hardParticles.end();++it) { // if decayed or should be decayed in shower make the tree PPtr orig = *it; bool radiates = false; if(!orig->children().empty()) { // remove d,u,s,c,b quarks and leptons other than on-shell taus if( StandardQCDPartonMatcher::Check(orig->id()) || ( LeptonMatcher::Check(orig->id()) && !(abs(orig->id())==ParticleID::tauminus && abs(orig->mass()-orig->dataPtr()->mass())children().size();++iy) { if(orig->children()[iy]->id()==orig->id()) { foundParticle = true; } else if(orig->children()[iy]->id()==ParticleID::g || orig->children()[iy]->id()==ParticleID::gamma) { foundGauge = true; } } radiates = foundParticle && foundGauge; } } if(radiates) { findDecayProducts(orig,hard,decay); } else if(!(**it).children().empty()|| (decaysInShower((**it).id())&&!(**it).dataPtr()->stable())) { createDecayProcess(*it,hard,decay); } else { hard->outgoing().push_back(make_pair(*it,PerturbativeProcessPtr())); } } } void ShowerHandler::createDecayProcess(PPtr in,PerturbativeProcessPtr hard, DecayProcessMap & decay) const { // there must be an incoming particle assert(in); // create the new process and connect with the parent PerturbativeProcessPtr newDecay=new_ptr(PerturbativeProcess()); newDecay->incoming().push_back(make_pair(in,hard)); Energy width=in->dataPtr()->generateWidth(in->mass()); decay.insert(make_pair(width,newDecay)); hard->outgoing().push_back(make_pair(in,newDecay)); // we need to deal with the decay products if decayed ParticleVector children = in->children(); if(!children.empty()) { for(ParticleVector::const_iterator it = children.begin(); it!= children.end(); ++it) { // if decayed or should be decayed in shower make the tree in->abandonChild(*it); bool radiates = false; if(!(**it).children().empty()) { if(StandardQCDPartonMatcher::Check((**it).id())|| (LeptonMatcher::Check((**it).id())&& !(abs((**it).id())==ParticleID::tauminus && abs((**it).mass()-(**it).dataPtr()->mass())id()==(**it).id()) { foundParticle = true; } else if((**it).children()[iy]->id()==ParticleID::g || (**it).children()[iy]->id()==ParticleID::gamma) { foundGauge = true; } } radiates = foundParticle && foundGauge; } // finally assume all non-decaying particles are in this class // pr 27/11/15 not sure about this bit // if(!radiates) { // radiates = !decaysInShower((**it).id()); // } } if(radiates) { findDecayProducts(*it,newDecay,decay); } else if(!(**it).children().empty()|| (decaysInShower((**it).id())&&!(**it).dataPtr()->stable())) { createDecayProcess(*it,newDecay,decay); } else { newDecay->outgoing().push_back(make_pair(*it,PerturbativeProcessPtr())); } } } } tDMPtr ShowerHandler::decay(PerturbativeProcessPtr process, DecayProcessMap & decayMap, bool radPhotons ) const { PPtr parent = process->incoming()[0].first; assert(parent); if(parent->spinInfo()) parent->spinInfo()->decay(true); unsigned int ntry = 0; ParticleVector children; tDMPtr dm = DMPtr(); while (true) { // exit if fails if (++ntry>=maxtryDecay_) throw Exception() << "Failed to perform decay in ShowerHandler::decay()" << " after " << maxtryDecay_ << " attempts for " << parent->PDGName() << Exception::eventerror; // select decay mode dm = parent->data().selectMode(*parent); if(!dm) throw Exception() << "Failed to select decay mode in ShowerHandler::decay()" << "for " << parent->PDGName() << Exception::eventerror; if(!dm->decayer()) throw Exception() << "No Decayer for selected decay mode " << " in ShowerHandler::decay()" << Exception::runerror; // start of try block try { children = dm->decayer()->decay(*dm, *parent); // if no children have another go if(children.empty()) continue; if(radPhotons){ // generate radiation in the decay tDecayIntegratorPtr hwdec=dynamic_ptr_cast(dm->decayer()); if (hwdec && hwdec->canGeneratePhotons()) children = hwdec->generatePhotons(*parent,children); } // set up parent parent->decayMode(dm); // add children for (unsigned int i = 0, N = children.size(); i < N; ++i ) { children[i]->setLabVertex(parent->labDecayVertex()); //parent->addChild(children[i]); } // if succeeded break out of loop break; } catch(Veto) { } } assert(!children.empty()); for(ParticleVector::const_iterator it = children.begin(); it!= children.end(); ++it) { if(!(**it).children().empty()|| (decaysInShower((**it).id())&&!(**it).dataPtr()->stable())) { createDecayProcess(*it,process,decayMap); } else { process->outgoing().push_back(make_pair(*it,PerturbativeProcessPtr())); } } return dm; } // Note: The tag must be constructed from an ordered particle container. tDMPtr ShowerHandler::findDecayMode(const string & tag) const { static map cache; map::const_iterator pos = cache.find(tag); if ( pos != cache.end() ) return pos->second; tDMPtr dm = CurrentGenerator::current().findDecayMode(tag); cache[tag] = dm; return dm; } /** * Operator for the particle ordering * @param p1 The first ParticleData object * @param p2 The second ParticleData object */ -bool ShowerHandler::ParticleOrdering::operator() (tcPDPtr p1, tcPDPtr p2) { +bool ShowerHandler::ParticleOrdering::operator() (tcPDPtr p1, tcPDPtr p2) const { return abs(p1->id()) > abs(p2->id()) || ( abs(p1->id()) == abs(p2->id()) && p1->id() > p2->id() ) || ( p1->id() == p2->id() && p1->fullName() > p2->fullName() ); } diff --git a/Shower/ShowerHandler.h b/Shower/ShowerHandler.h --- a/Shower/ShowerHandler.h +++ b/Shower/ShowerHandler.h @@ -1,898 +1,898 @@ // -*- C++ -*- // // ShowerHandler.h 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. // #ifndef HERWIG_ShowerHandler_H #define HERWIG_ShowerHandler_H // // This is the declaration of the ShowerHandler class. // #include "ThePEG/Handlers/EventHandler.h" #include "ThePEG/Handlers/CascadeHandler.h" #include "ShowerVariation.h" #include "Herwig/PDF/HwRemDecayer.fh" #include "ThePEG/EventRecord/RemnantParticle.fh" #include "UEBase.h" #include "PerturbativeProcess.h" #include "Herwig/MatrixElement/Matchbox/Matching/HardScaleProfile.h" #include "ShowerHandler.fh" namespace Herwig { using namespace ThePEG; /** \ingroup Shower * * This class is the main driver of the shower: it is responsible for * the proper handling of all other specific collaborating classes * and for the storing of the produced particles in the event record. * * @see \ref ShowerHandlerInterfaces "The interfaces" * * @see ThePEG::CascadeHandler * @see MPIHandler * @see HwRemDecayer */ class ShowerHandler: public CascadeHandler { public: /** * Typedef for a pair of ThePEG::RemnantParticle pointers. */ typedef pair RemPair; public: /** * Default constructor */ ShowerHandler(); /** * Destructor */ virtual ~ShowerHandler(); public: /** * The main method which manages the multiple interactions and starts * the shower by calling cascade(sub, lastXC). */ virtual void cascade(); /** * pointer to "this", the current ShowerHandler. */ static const tShowerHandlerPtr currentHandler() { assert(currentHandler_); return currentHandler_; } /** * pointer to "this", the current ShowerHandler. */ static bool currentHandlerIsSet() { return currentHandler_; } public: /** * Hook to allow vetoing of event after showering hard sub-process * as in e.g. MLM merging. */ virtual bool showerHardProcessVeto() const { return false; } /** * Return true, if this cascade handler will perform reshuffling from hard * process masses. */ virtual bool isReshuffling() const { return true; } /** * Return true, if this cascade handler will put the final state * particles to their constituent mass. If false the nominal mass is used. */ virtual bool retConstituentMasses() const { return useConstituentMasses_; } /** * Return true, if the shower handler can generate a truncated * shower for POWHEG style events generated using Matchbox */ virtual bool canHandleMatchboxTrunc() const { return false; } /** * Get the PDF freezing scale */ Energy pdfFreezingScale() const { return pdfFreezingScale_; } /** * Get the local PDFs. */ PDFPtr getPDFA() const {return PDFA_;} /** * Get the local PDFs. */ PDFPtr getPDFB() const {return PDFB_;} /** * Return true if currently the primary subprocess is showered. */ bool firstInteraction() const { if (!eventHandler()->currentCollision())return true; return ( subProcess_ == eventHandler()->currentCollision()->primarySubProcess() ); } /** * Return the remnant decayer. */ tHwRemDecPtr remnantDecayer() const { return remDec_; } /** * Split the hard process into production and decays * @param tagged The tagged particles from the StepHandler * @param hard The hard perturbative process * @param decay The decay particles */ void splitHardProcess(tPVector tagged, PerturbativeProcessPtr & hard, DecayProcessMap & decay) const; /** * Information if the Showerhandler splits the hard process. */ bool doesSplitHardProcess()const {return splitHardProcess_;} /** * Decay a particle. * radPhotons switches the generation of photon * radiation on/off. * Required for Dipole Shower but not QTilde Shower. */ tDMPtr decay(PerturbativeProcessPtr, DecayProcessMap & decay, bool radPhotons = false) const; /** * Cached lookup of decay modes. * Generator::findDecayMode() is not efficient. */ tDMPtr findDecayMode(const string & tag) const; /** * A struct to order the particles in the same way as in the DecayMode's */ struct ParticleOrdering { - bool operator() (tcPDPtr p1, tcPDPtr p2); + bool operator() (tcPDPtr p1, tcPDPtr p2) const; }; /** * A container for ordered particles required * for constructing tags for decay mode lookup. */ typedef multiset OrderedParticles; public: /** * @name Switches for initial- and final-state radiation */ //@{ /** * Switch for any radiation */ bool doRadiation() const {return doFSR_ || doISR_;} /** * Switch on or off final state radiation. */ bool doFSR() const { return doFSR_;} /** * Switch on or off initial state radiation. */ bool doISR() const { return doISR_;} //@} public: /** * @name Switches for scales */ //@{ /** * Return true if maximum pt should be deduced from the factorization scale */ bool hardScaleIsMuF() const { return maxPtIsMuF_; } /** * The factorization scale factor. */ double factorizationScaleFactor() const { return factorizationScaleFactor_; } /** * The renormalization scale factor. */ double renFac() const { return renormalizationScaleFactor_; } /** * The factorization scale factor. */ double facFac() const { return factorizationScaleFactor_; } /** * The renormalization scale factor. */ double renormalizationScaleFactor() const { return renormalizationScaleFactor_; } /** * The scale factor for the hard scale */ double hardScaleFactor() const { return hardScaleFactor_; } /** * Return true, if the phase space restrictions of the dipole shower should * be applied. */ bool restrictPhasespace() const { return restrictPhasespace_; } /** * Return profile scales */ Ptr::tptr profileScales() const { return hardScaleProfile_; } /** * Return the relevant hard scale to be used in the profile scales */ virtual Energy hardScale() const; /** * Return information about shower phase space choices */ virtual int showerPhaseSpaceOption() const { assert(false && "not implemented in general"); return -1; } //@} public: /** * Access the shower variations */ map& showerVariations() { return showerVariations_; } /** * Return the shower variations */ const map& showerVariations() const { return showerVariations_; } /** * Access the current Weights */ map& currentWeights() { return currentWeights_; } /** * Return the current Weights */ const map& currentWeights() const { return currentWeights_; } /** * Change the current reweighting factor */ void reweight(double w) { reweight_ = w; } /** * Return the current reweighting factor */ double reweight() const { return reweight_; } public : /** * Access to switches for spin correlations */ //@{ /** * Spin Correlations */ unsigned int spinCorrelations() const { return spinOpt_; } /** * Any correlations */ virtual bool correlations() const { return spinOpt_!=0; } //@} public: /** * struct that is used to catch exceptions which are thrown * due to energy conservation issues of additional scatters */ struct ExtraScatterVeto {}; /** * struct that is used to catch exceptions which are thrown * due to fact that the Shower has been invoked more than * a defined threshold on a certain configuration */ struct ShowerTriesVeto { /** variable to store the number of attempts */ const int tries; /** constructor */ ShowerTriesVeto(int t) : tries(t) {} }; public: /** @name Functions used by the persistent I/O system. */ //@{ /** * Function used to write out object persistently. * @param os the persistent output stream written to. */ void persistentOutput(PersistentOStream & os) const; /** * Function used to read in object persistently. * @param is the persistent input stream read from. * @param version the version number of the object when written. */ void persistentInput(PersistentIStream & is, int version); //@} /** * The standard Init function used to initialize the interfaces. * Called exactly once for each class by the class description system * before the main function starts or * when this class is dynamically loaded. */ static void Init(); protected: /** @name Functions to perform the cascade */ //@{ /** * The main method which manages the showering of a subprocess. */ virtual tPPair cascade(tSubProPtr sub, XCPtr xcomb); /** * Set up for the cascade */ void prepareCascade(tSubProPtr sub) { current_ = currentStep(); subProcess_ = sub; } /** * Boost all the particles in the collision so that the collision always occurs * in the rest frame with the incoming particles along the z axis */ void boostCollision(bool boost); //@} protected: /** * Set/unset the current shower handler */ //@{ /** * Set the current handler */ void setCurrentHandler() { currentHandler_ = tShowerHandlerPtr(this); } /** * Unset the current handler */ void unSetCurrentHandler() { currentHandler_ = tShowerHandlerPtr(); } //@} protected: /** * @name Members relating to the underlying event and MPI */ //@{ /** * Return true if multiple parton interactions are switched on * and can be used for this beam setup. */ bool isMPIOn() const { return MPIHandler_ && MPIHandler_->beamOK(); } /** * Access function for the MPIHandler, it should only be called after * checking with isMPIOn. */ tUEBasePtr getMPIHandler() const { assert(MPIHandler_); return MPIHandler_; } /** * Is a beam particle where hadronic structure is resolved */ bool isResolvedHadron(tPPtr); /** * Get the remnants from the ThePEG::PartonBinInstance es and * do some checks. */ RemPair getRemnants(PBIPair incbins); /** * Reset the PDF's after the hard collision has been showered */ void setMPIPDFs(); //@} public: /** * Check if a particle decays in the shower * @param id The PDG code for the particle */ bool decaysInShower(long id) const { return ( particlesDecayInShower_.find( abs(id) ) != particlesDecayInShower_.end() ); } protected: /** * Members to handle splitting up of hard process and decays */ //@{ /** * Find decay products from the hard process and create decay processes * @param parent The parent particle * @param hard The hard process * @param decay The decay processes */ void findDecayProducts(PPtr parent, PerturbativeProcessPtr hard, DecayProcessMap & decay) const; /** * Find decay products from the hard process and create decay processes * @param parent The parent particle * @param hard The parent hard process * @param decay The decay processes */ void createDecayProcess(PPtr parent,PerturbativeProcessPtr hard, DecayProcessMap & decay) const; //@} /** * @name Functions to return information relevant to the process being showered */ //@{ /** * Return the currently used SubProcess. */ tSubProPtr currentSubProcess() const { assert(subProcess_); return subProcess_; } /** * Access to the incoming beam particles */ tPPair incomingBeams() const { return incoming_; } //@} protected: /** * Weight handling for shower variations */ //@ /** * Combine the variation weights which have been encountered */ void combineWeights(); /** * Initialise the weights in currentEvent() */ void initializeWeights(); /** * Reset the current weights */ void resetWeights(); //@} protected: /** * Return the maximum number of attempts for showering * a given subprocess. */ unsigned int maxtry() const { return maxtry_; } protected: /** * Parameters for the space-time model */ //@{ /** * Whether or not to include spa-cetime distances in the shower */ bool includeSpaceTime() const {return includeSpaceTime_;} /** * The minimum virtuality for the space-time model */ Energy2 vMin() const {return vMin_;} //@} protected: /** @name Clone Methods. */ //@{ /** * Make a simple clone of this object. * @return a pointer to the new object. */ virtual IBPtr clone() const; /** Make a clone of this object, possibly modifying the cloned object * to make it sane. * @return a pointer to the new object. */ virtual IBPtr fullclone() const; //@} protected: /** @name Standard Interfaced functions. */ //@{ /** * Initialize this object after the setup phase before saving an * EventGenerator to disk. * @throws InitException if object could not be initialized properly. */ virtual void doinit(); /** * Initialize this object. Called in the run phase just before * a run begins. */ virtual void doinitrun(); /** * Finalize this object. Called in the run phase just after a * run has ended. Used eg. to write out statistics. */ virtual void dofinish(); //@} private: /** * The assignment operator is private and must never be called. * In fact, it should not even be implemented. */ ShowerHandler & operator=(const ShowerHandler &) = delete; private: /** * pointer to "this", the current ShowerHandler. */ static tShowerHandlerPtr currentHandler_; /** * a MPIHandler to administer the creation of several (semihard) * partonic interactions. */ UEBasePtr MPIHandler_; /** * Pointer to the HwRemDecayer */ HwRemDecPtr remDec_; private: /** * Maximum tries for various stages of the showering process */ //@{ /** * Maximum number of attempts for the * main showering loop */ unsigned int maxtry_; /** * Maximum number of attempts for the regeneration of an additional * scattering, before the number of scatters is reduced. */ unsigned int maxtryMPI_; /** * Maximum number of attempts for the regeneration of an additional * hard scattering, before this event is vetoed. */ unsigned int maxtryDP_; /** * Maximum number of attempts to generate a decay */ unsigned int maxtryDecay_; //@} private: /** * Factors for the various scales */ //@{ /** * The factorization scale factor. */ double factorizationScaleFactor_; /** * The renormalization scale factor. */ double renormalizationScaleFactor_; /** * The scale factor for the hard scale */ double hardScaleFactor_; /** * True, if the phase space restrictions of the dipole shower should * be applied. */ bool restrictPhasespace_; /** * True if maximum pt should be deduced from the factorization scale */ bool maxPtIsMuF_; /** * The profile scales */ Ptr::ptr hardScaleProfile_; //@} /** * Option to include spin correlations */ unsigned int spinOpt_; private: /** * Storage of information about the current event */ //@{ /** * The incoming beam particles for the current collision */ tPPair incoming_; /** * Boost to get back to the lab */ LorentzRotation boost_; /** * Const pointer to the currently handeled ThePEG::SubProcess */ tSubProPtr subProcess_; /** * Const pointer to the current step */ tcStepPtr current_; //@} private: /** * PDFs to be used for the various stages and related parameters */ //@{ /** * The PDF freezing scale */ Energy pdfFreezingScale_; /** * PDFs to be used for the various stages and related parameters */ //@{ /** * The PDF for beam particle A. Overrides the particle's own PDF setting. */ PDFPtr PDFA_; /** * The PDF for beam particle B. Overrides the particle's own PDF setting. */ PDFPtr PDFB_; /** * The PDF for beam particle A for remnant splitting. Overrides the particle's own PDF setting. */ PDFPtr PDFARemnant_; /** * The PDF for beam particle B for remnant splitting. Overrides the particle's own PDF setting. */ PDFPtr PDFBRemnant_; /** * The MPI PDF's to be used for secondary scatters. */ pair mpipdfs_; /** * The MPI PDF's to be used for secondary scatters. */ pair rempdfs_; /** * The MPI PDF's to be used for secondary scatters. */ pair remmpipdfs_; //@} private: /** * @name Parameters for initial- and final-state radiation */ //@{ /** * Switch on or off final state radiation. */ bool doFSR_; /** * Switch on or off initial state radiation. */ bool doISR_; //@} private: /** * @name Parameters for particle decays */ //@{ /** * Whether or not to split into hard and decay trees */ bool splitHardProcess_; /** * PDG codes of the particles which decay during showering * this is fast storage for use during running */ set particlesDecayInShower_; /** * PDG codes of the particles which decay during showering * this is a vector that is interfaced so they can be changed */ vector inputparticlesDecayInShower_; //@} private: /** * Parameters for the space-time model */ //@{ /** * Whether or not to include spa-cetime distances in the shower */ bool includeSpaceTime_; /** * The minimum virtuality for the space-time model */ Energy2 vMin_; //@} private: /** * Parameters for the constituent mass treatment. */ //@{ // True if shower should return constituent masses. bool useConstituentMasses_=true; //@} private: /** * Parameters relevant for reweight and variations */ //@{ /** * The shower variations */ map showerVariations_; /** * Command to add a shower variation */ string doAddVariation(string); /** * A reweighting factor applied by the showering */ double reweight_; /** * The shower variation weights */ map currentWeights_; //@} }; } #endif /* HERWIG_ShowerHandler_H */ diff --git a/Tests/Rivet/LHC/LHC-13-Jets-7.in b/Tests/Rivet/LHC/LHC-13-Jets-7.in --- a/Tests/Rivet/LHC/LHC-13-Jets-7.in +++ b/Tests/Rivet/LHC/LHC-13-Jets-7.in @@ -1,4 +1,5 @@ # CMS Jets insert /Herwig/Analysis/RivetAnalysis:Analyses 0 CMS_2016_I1459051 insert /Herwig/Analysis/RivetAnalysis:Analyses 0 ATLAS_2016_CONF_2016_092 insert /Herwig/Analysis/RivetAnalysis:Analyses 0 CMS_2018_I1682495 +insert /Herwig/Analysis/RivetAnalysis:Analyses 0 ATLAS_2018_I1711114 diff --git a/UnderlyingEvent/Makefile.am b/UnderlyingEvent/Makefile.am --- a/UnderlyingEvent/Makefile.am +++ b/UnderlyingEvent/Makefile.am @@ -1,11 +1,11 @@ pkglib_LTLIBRARIES = HwMPI.la HwMPI_la_SOURCES = MPISampler.cc MPISampler.h MPISampler.icc \ MPISampler.fh MPIHandler.cc \ MPIHandler.fh MPIHandler.h \ ProcessHandler.cc ProcessHandler.icc \ ProcessHandler.fh ProcessHandler.h \ MPIXSecReweighter.h MPIXSecReweighter.cc \ stat.h -HwMPI_la_LDFLAGS= $(AM_LDFLAGS) -module -version-info 14:0:0 +HwMPI_la_LDFLAGS= $(AM_LDFLAGS) -module -version-info 15:0:0 HwMPI_la_LIBADD= $(GSLLIBS) HwMPI_la_CPPFLAGS= $(AM_CPPFLAGS) $(GSLINCLUDE) diff --git a/lib/Makefile.am b/lib/Makefile.am --- a/lib/Makefile.am +++ b/lib/Makefile.am @@ -1,49 +1,49 @@ pkglib_LTLIBRARIES = Herwig.la Herwig_la_SOURCES = Herwig_la_LIBTOOLFLAGS = --tag=CXX -Herwig_la_LDFLAGS = $(AM_LDFLAGS) -module -version-info 25:0:0 +Herwig_la_LDFLAGS = $(AM_LDFLAGS) -module -version-info 26:0:0 Herwig_la_LDFLAGS += $(THEPEGLDFLAGS) $(BOOST_SYSTEM_LDFLAGS) $(BOOST_FILESYSTEM_LDFLAGS) $(FCLIBS) Herwig_la_LIBADD = \ $(top_builddir)/Hadronization/libHwHadronization.la \ $(top_builddir)/Models/libHwStandardModel.la \ $(top_builddir)/Decay/libHwDecay.la \ $(top_builddir)/Decay/libHwFormFactor.la \ $(top_builddir)/Decay/libHwDecRad.la \ $(top_builddir)/Utilities/libHwUtils.la \ $(top_builddir)/Models/libHwModelGenerator.la \ $(top_builddir)/Decay/General/libHwGeneralDecay.la \ $(top_builddir)/MatrixElement/General/libHwGeneralME.la \ $(top_builddir)/MatrixElement/libHwME.la \ $(top_builddir)/MatrixElement/Reweighters/libHwReweighters.la \ $(top_builddir)/MatrixElement/Matchbox/libHwMatchbox.la \ $(top_builddir)/Decay/libHwWeakCurrent.la \ $(top_builddir)/Looptools/libHwLooptools.la \ $(top_builddir)/Shower/libHwShower.la \ $(THEPEGLIB) -ldl dist_noinst_SCRIPTS = fix-osx-path POSTPROCESSING = done-all-links if NEED_APPLE_FIXES POSTPROCESSING += apple-fixes endif all-local: $(POSTPROCESSING) done-all-links: Herwig.la find $(top_builddir) \( -name '*.so.*' -or -name '*.so' \) \ -not -name 'lib*' -not -path '$(top_builddir)/lib/*' \ -not -path '$(top_builddir)/.hg/*' -exec $(LN_S) -f \{\} \; $(LN_S) -f .libs/Herwig*so* . echo "stamp" > $@ apple-fixes: fix-osx-path done-all-links ./$< echo "stamp" > $@ clean-local: rm -f *.so *.so.* done-all-links apple-fixes