Page MenuHomeHEPForge

No OneTemporary

diff --git a/DipoleShower/DipoleShowerHandler.cc b/DipoleShower/DipoleShowerHandler.cc
--- a/DipoleShower/DipoleShowerHandler.cc
+++ b/DipoleShower/DipoleShowerHandler.cc
@@ -1,834 +1,833 @@
// -*- C++ -*-
//
// DipoleShowerHandler.cc is a part of Herwig++ - A multi-purpose Monte Carlo event generator
// Copyright (C) 2002-2007 The Herwig Collaboration
//
// Herwig++ is licenced under version 2 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 DipoleShowerHandler class.
//
#include "DipoleShowerHandler.h"
#include "ThePEG/Interface/ClassDocumentation.h"
#include "ThePEG/Interface/Reference.h"
#include "ThePEG/Interface/RefVector.h"
#include "ThePEG/Interface/Parameter.h"
#include "ThePEG/Interface/Switch.h"
#include "ThePEG/Persistency/PersistentOStream.h"
#include "ThePEG/Persistency/PersistentIStream.h"
// include theses to have complete types
#include "Herwig++/Shower/Base/Evolver.h"
#include "Herwig++/Shower/Base/ShowerParticle.h"
#include "Herwig++/PDF/MPIPDF.h"
#include "Herwig++/PDF/MinBiasPDF.h"
#include "Herwig++/Shower/Base/ShowerTree.h"
#include "Herwig++/Shower/Base/KinematicsReconstructor.h"
#include "Herwig++/Shower/Base/PartnerFinder.h"
#include "Herwig++/PDF/HwRemDecayer.h"
#include "Herwig++/DipoleShower/Utility/DipolePartonSplitter.h"
using namespace Herwig;
DipoleShowerHandler::DipoleShowerHandler()
: ShowerHandler(), chainOrderVetoScales(true),
nEmissions(0), discardNoEmissions(false),
doFSR(true), doISR(true), realignmentScheme(0),
verbosity(0), printEvent(0), nTries(0),
didRadiate(false), didRealign(false),
theFactorizationScaleFactor(1.0),
theRenormalizationScaleFactor(1.0) {}
DipoleShowerHandler::~DipoleShowerHandler() {}
IBPtr DipoleShowerHandler::clone() const {
return new_ptr(*this);
}
IBPtr DipoleShowerHandler::fullclone() const {
return new_ptr(*this);
}
tPPair DipoleShowerHandler::cascade(tSubProPtr sub, XCPtr) {
prepareCascade(sub);
if ( !doFSR && ! doISR )
return sub->incoming();
eventRecord().clear();
eventRecord().prepare(sub,dynamic_ptr_cast<tStdXCombPtr>(lastXCombPtr()),pdfs());
if ( eventRecord().outgoing().empty() && !doISR )
return sub->incoming();
if ( !eventRecord().incoming().first->coloured() &&
!eventRecord().incoming().second->coloured() &&
!doFSR )
return sub->incoming();
nTries = 0;
while ( true ) {
try {
didRadiate = false;
didRealign = false;
hardScales();
if ( verbosity > 1 ) {
generator()->log() << "DipoleShowerHandler starting off:\n";
eventRecord().debugLastEvent(generator()->log());
generator()->log() << flush;
}
unsigned int nEmitted = 0;
doCascade(nEmitted);
if ( discardNoEmissions ) {
if ( !didRadiate )
throw Veto();
if ( nEmissions )
if ( nEmissions != nEmitted )
throw Veto();
}
if ( intrinsicPtGenerator ) {
if ( eventRecord().incoming().first->coloured() &&
eventRecord().incoming().second->coloured() ) {
SpinOneLorentzRotation rot =
intrinsicPtGenerator->kick(eventRecord().incoming(),
eventRecord().intermediates());
eventRecord().transform(rot);
}
}
didRealign = realign();
constituentReshuffle();
break;
} catch (RedoShower&) {
if ( ++nTries > maxtry() )
throw ShowerTriesVeto(maxtry());
eventRecord().clear();
eventRecord().prepare(sub,dynamic_ptr_cast<tStdXCombPtr>(lastXCombPtr()),pdfs());
continue;
} catch (...) {
throw;
}
}
return eventRecord().fillEventRecord(newStep(),firstInteraction(),didRealign);
}
void DipoleShowerHandler::constituentReshuffle() {
if ( constituentReshuffler ) {
constituentReshuffler->reshuffle(eventRecord().outgoing(),
eventRecord().incoming(),
eventRecord().intermediates());
}
}
void DipoleShowerHandler::hardScales() {
Energy maxPt = generator()->maximumCMEnergy();
if ( eventRecord().incoming().first->coloured() &&
eventRecord().incoming().second->coloured() ) {
for ( PList::const_iterator p = eventRecord().outgoing().begin();
p != eventRecord().outgoing().end(); ++p )
maxPt = min(maxPt,(**p).momentum().perp());
}
for ( list<DipoleChain>::iterator ch = eventRecord().chains().begin();
ch != eventRecord().chains().end(); ++ch ) {
Energy minVetoScale = -1.*GeV;
for ( list<Dipole>::iterator dip = ch->dipoles().begin();
dip != ch->dipoles().end(); ++dip ) {
// max scale per config
Energy maxFirst = 0.0*GeV;
Energy maxSecond = 0.0*GeV;
for ( vector<Ptr<DipoleSplittingKernel>::ptr>::iterator k =
kernels.begin(); k != kernels.end(); ++k ) {
pair<bool,bool> conf = make_pair(true,false);
if ( (**k).canHandle(dip->index(conf)) ) {
Energy scale =
evolutionOrdering()->hardScale(dip->emitter(conf),dip->spectator(conf),
dip->emitterX(conf),dip->spectatorX(conf),
**k,dip->index(conf));
maxFirst = max(maxFirst,scale);
}
conf = make_pair(false,true);
if ( (**k).canHandle(dip->index(conf)) ) {
Energy scale =
evolutionOrdering()->hardScale(dip->emitter(conf),dip->spectator(conf),
dip->emitterX(conf),dip->spectatorX(conf),
**k,dip->index(conf));
maxSecond = max(maxSecond,scale);
}
}
if ( dip->leftParticle()->vetoScale() >= ZERO ) {
maxFirst = min(maxFirst,sqrt(dip->leftParticle()->vetoScale()));
if ( minVetoScale >= ZERO )
minVetoScale = min(minVetoScale,sqrt(dip->leftParticle()->vetoScale()));
else
minVetoScale = sqrt(dip->leftParticle()->vetoScale());
}
if ( dip->rightParticle()->vetoScale() >= ZERO ) {
maxSecond = min(maxSecond,sqrt(dip->rightParticle()->vetoScale()));
if ( minVetoScale >= ZERO )
minVetoScale = min(minVetoScale,sqrt(dip->rightParticle()->vetoScale()));
else
minVetoScale = sqrt(dip->rightParticle()->vetoScale());
}
maxFirst = min(maxPt,maxFirst);
dip->emitterScale(make_pair(true,false),maxFirst);
maxSecond = min(maxPt,maxSecond);
dip->emitterScale(make_pair(false,true),maxSecond);
}
if ( !evolutionOrdering()->independentDipoles() &&
chainOrderVetoScales &&
minVetoScale >= ZERO ) {
for ( list<Dipole>::iterator dip = ch->dipoles().begin();
dip != ch->dipoles().end(); ++dip ) {
dip->leftScale(min(dip->leftScale(),minVetoScale));
dip->rightScale(min(dip->rightScale(),minVetoScale));
}
}
}
}
Energy DipoleShowerHandler::getWinner(DipoleSplittingInfo& winner,
const Dipole& dip,
pair<bool,bool> conf) {
if ( !dip.index(conf).initialStateEmitter() &&
!doFSR ) {
winner.didStopEvolving();
return 0.0*GeV;
}
if ( dip.index(conf).initialStateEmitter() &&
!doISR ) {
winner.didStopEvolving();
return 0.0*GeV;
}
DipoleSplittingInfo candidate;
candidate.index(dip.index(conf));
candidate.configuration(conf);
candidate.emitterX(dip.emitterX(conf));
candidate.spectatorX(dip.spectatorX(conf));
if ( generators().find(candidate.index()) == generators().end() )
getGenerators(candidate.index());
//
// NOTE -- needs proper fixing at some point
//
// For some very strange reason, equal_range gives back
// key ranges it hasn't been asked for. This particularly
// happens e.g. for FI dipoles of the same kind, but different
// PDF (hard vs MPI PDF). I can't see a reason for this,
// as DipoleIndex properly implements comparison for equality
// and (lexicographic) ordering; for the time being, we
// use equal_range, extented by an explicit check for wether
// the key is indeed what we wanted. See line after (*) comment
// below.
//
pair<GeneratorMap::iterator,GeneratorMap::iterator> gens
= generators().equal_range(candidate.index());
tPPtr emitter = dip.emitter(conf);
tPPtr spectator = dip.spectator(conf);
Energy startScale = dip.emitterScale(conf);
Energy winnerScale = 0.0*GeV;
GeneratorMap::iterator winnerGen = generators().end();
for ( GeneratorMap::iterator gen = gens.first; gen != gens.second; ++gen ) {
// (*) see NOTE above
if ( !(gen->first == candidate.index()) )
continue;
if ( startScale <= gen->second->splittingKinematics()->IRCutoff() )
continue;
Energy dScale =
gen->second->splittingKinematics()->dipoleScale(emitter->momentum(),
spectator->momentum());
// in very exceptional cases happening in DIS
if ( isnan(dScale/GeV ) )
throw RedoShower();
candidate.scale(dScale);
candidate.continuesEvolving();
candidate.hardPt(evolutionOrdering()->maxPt(startScale,candidate,*(gen->second->splittingKernel())));
gen->second->generate(candidate);
Energy nextScale = evolutionOrdering()->evolutionScale(gen->second->lastSplitting(),*(gen->second->splittingKernel()));
if ( nextScale > winnerScale ) {
winner = candidate;
gen->second->completeSplitting(winner);
winnerGen = gen;
winnerScale = nextScale;
}
}
if ( winnerGen == generators().end() ) {
winner.didStopEvolving();
return 0.0*GeV;
}
if ( winner.stoppedEvolving() )
return 0.0*GeV;
return winnerScale;
}
void DipoleShowerHandler::doCascade(unsigned int& emDone) {
if ( nEmissions )
if ( emDone == nEmissions )
return;
DipoleSplittingInfo winner;
DipoleSplittingInfo dipoleWinner;
while ( eventRecord().haveChain() ) {
if ( verbosity > 2 ) {
generator()->log() << "DipoleShowerHandler selecting splittings for the chain:\n"
<< eventRecord().currentChain() << flush;
}
list<Dipole>::iterator winnerDip = eventRecord().currentChain().dipoles().end();
Energy winnerScale = 0.0*GeV;
Energy nextLeftScale = 0.0*GeV;
Energy nextRightScale = 0.0*GeV;
for ( list<Dipole>::iterator dip = eventRecord().currentChain().dipoles().begin();
dip != eventRecord().currentChain().dipoles().end(); ++dip ) {
nextLeftScale = getWinner(dipoleWinner,*dip,make_pair(true,false));
if ( nextLeftScale > winnerScale ) {
winnerScale = nextLeftScale;
winner = dipoleWinner;
winnerDip = dip;
}
nextRightScale = getWinner(dipoleWinner,*dip,make_pair(false,true));
if ( nextRightScale > winnerScale ) {
winnerScale = nextRightScale;
winner = dipoleWinner;
winnerDip = dip;
}
if ( evolutionOrdering()->independentDipoles() ) {
Energy dipScale = max(nextLeftScale,nextRightScale);
if ( dip->leftScale() > dipScale )
dip->leftScale(dipScale);
if ( dip->rightScale() > dipScale )
dip->rightScale(dipScale);
}
}
if ( verbosity > 1 ) {
if ( winnerDip != eventRecord().currentChain().dipoles().end() )
generator()->log() << "DipoleShowerHandler selected the splitting:\n"
<< winner << " for the dipole\n"
<< (*winnerDip) << flush;
else
generator()->log() << "DipoleShowerHandler could not select a splitting above the IR cutoff\n"
<< flush;
}
// pop the chain if no dipole did radiate
if ( winnerDip == eventRecord().currentChain().dipoles().end() ) {
eventRecord().popChain();
continue;
}
// otherwise perform the splitting
didRadiate = true;
pair<list<Dipole>::iterator,list<Dipole>::iterator> children;
DipoleChain* firstChain = 0;
DipoleChain* secondChain = 0;
eventRecord().split(winnerDip,winner,children,firstChain,secondChain);
assert(firstChain && secondChain);
evolutionOrdering()->setEvolutionScale(winnerScale,winner,*firstChain,children);
if ( !secondChain->dipoles().empty() )
evolutionOrdering()->setEvolutionScale(winnerScale,winner,*secondChain,children);
if ( verbosity > 1 ) {
generator()->log() << "DipoleShowerHandler did split the last selected dipole into:\n"
<< (*children.first) << (*children.second) << flush;
}
if ( verbosity > 2 ) {
generator()->log() << "After splitting the last selected dipole, "
<< "DipoleShowerHandler encountered the following chains:\n"
<< (*firstChain) << (*secondChain) << flush;
}
if ( nEmissions )
if ( ++emDone == nEmissions )
return;
}
}
bool DipoleShowerHandler::realign() {
if ( !didRadiate && !intrinsicPtGenerator )
return false;
if ( eventRecord().incoming().first->coloured() ||
eventRecord().incoming().second->coloured() ) {
if ( eventRecord().incoming().first->momentum().perp2()/GeV2 < 1e-10 &&
eventRecord().incoming().second->momentum().perp2()/GeV2 < 1e-10 )
return false;
pair<Lorentz5Momentum,Lorentz5Momentum> inMomenta
(eventRecord().incoming().first->momentum(),
eventRecord().incoming().second->momentum());
SpinOneLorentzRotation transform((inMomenta.first+inMomenta.second).findBoostToCM());
Axis dir = (transform * inMomenta.first).vect().unit();
Axis rot (-dir.y(),dir.x(),0);
double theta = dir.theta();
if ( lastParticles().first->momentum().z() < ZERO )
theta = -theta;
transform.rotate(-theta,rot);
inMomenta.first = transform*inMomenta.first;
inMomenta.second = transform*inMomenta.second;
assert(inMomenta.first.z() > ZERO &&
inMomenta.second.z() < ZERO);
Energy2 sHat =
(eventRecord().incoming().first->momentum() +
eventRecord().incoming().second->momentum()).m2();
- Energy q = inMomenta.first.z();
pair<Energy,Energy> masses(eventRecord().incoming().first->mass(),
eventRecord().incoming().second->mass());
pair<Energy,Energy> qs;
if ( !eventRecord().incoming().first->coloured() ) {
assert(masses.second == ZERO);
qs.first = eventRecord().incoming().first->momentum().z();
qs.second = (sHat-sqr(masses.first))/(2.*(qs.first+sqrt(sqr(masses.first)+sqr(qs.first))));
} else if ( !eventRecord().incoming().second->coloured() ) {
assert(masses.first == ZERO);
qs.second = eventRecord().incoming().second->momentum().z();
qs.first = (sHat-sqr(masses.second))/(2.*(qs.second+sqrt(sqr(masses.second)+sqr(qs.second))));
} else {
assert(masses.first == ZERO && masses.second == ZERO);
if ( realignmentScheme == 0 ) {
double yX = eventRecord().pX().rapidity();
double yInt = (transform*eventRecord().pX()).rapidity();
double dy = yX-yInt;
qs.first = (sqrt(sHat)/2.)*exp(dy);
qs.second = (sqrt(sHat)/2.)*exp(-dy);
} else if ( realignmentScheme == 1 ) {
Energy sS = sqrt((lastParticles().first->momentum() +
lastParticles().second->momentum()).m2());
qs.first = eventRecord().fractions().first * sS / 2.;
qs.second = eventRecord().fractions().second * sS / 2.;
}
}
double beta =
(qs.first-qs.second) /
( sqrt(sqr(masses.first)+sqr(qs.first)) +
sqrt(sqr(masses.second)+sqr(qs.second)) );
transform.boostZ(beta);
Lorentz5Momentum tmp;
if ( eventRecord().incoming().first->coloured() ) {
tmp = eventRecord().incoming().first->momentum();
tmp = transform * tmp;
eventRecord().incoming().first->set5Momentum(tmp);
}
if ( eventRecord().incoming().second->coloured() ) {
tmp = eventRecord().incoming().second->momentum();
tmp = transform * tmp;
eventRecord().incoming().second->set5Momentum(tmp);
}
eventRecord().transform(transform);
return true;
}
return false;
}
void DipoleShowerHandler::resetAlphaS(Ptr<AlphaSBase>::tptr as) {
for ( vector<Ptr<DipoleSplittingKernel>::ptr>::iterator k = kernels.begin();
k != kernels.end(); ++k )
(**k).alphaS(as);
// clear the generators to be rebuild
// actually, there shouldn't be any generators
// when this happens.
generators().clear();
}
void DipoleShowerHandler::resetReweight(Ptr<DipoleSplittingReweight>::tptr rw) {
for ( GeneratorMap::iterator k = generators().begin();
k != generators().end(); ++k )
k->second->splittingReweight(rw);
}
void DipoleShowerHandler::getGenerators(const DipoleIndex& ind,
Ptr<DipoleSplittingReweight>::tptr rw) {
bool gotone = false;
for ( vector<Ptr<DipoleSplittingKernel>::ptr>::iterator k =
kernels.begin(); k != kernels.end(); ++k ) {
if ( (**k).canHandle(ind) ) {
if ( verbosity > 0 ) {
generator()->log() << "DipoleShowerHandler encountered the dipole configuration\n"
<< ind << " in event number "
<< eventHandler()->currentEvent()->number()
<< "\nwhich can be handled by the splitting kernel '"
<< (**k).name() << "'.\n" << flush;
}
gotone = true;
Ptr<DipoleSplittingGenerator>::ptr nGenerator =
new_ptr(DipoleSplittingGenerator());
nGenerator->splittingKernel(*k);
nGenerator->splittingKernel()->renormalizationScaleFactor(theRenormalizationScaleFactor);
nGenerator->splittingKernel()->factorizationScaleFactor(theFactorizationScaleFactor);
GeneratorMap::const_iterator equivalent = generators().end();
for ( GeneratorMap::const_iterator eq = generators().begin();
eq != generators().end(); ++eq ) {
if ( !eq->second->wrapping() )
if ( (**k).canHandleEquivalent(ind,*(eq->second->splittingKernel()),eq->first) ) {
equivalent = eq;
if ( verbosity > 0 ) {
generator()->log() << "The dipole configuration "
<< ind
<< " can equivalently be handled by the existing\n"
<< "generator for configuration "
<< eq->first << " using the kernel '"
<< eq->second->splittingKernel()->name()
<< "'\n" << flush;
}
break;
}
}
if ( equivalent != generators().end() ) {
nGenerator->wrap(equivalent->second);
}
DipoleSplittingInfo dummy;
dummy.index(ind);
nGenerator->splittingReweight(rw);
nGenerator->prepare(dummy);
generators().insert(make_pair(ind,nGenerator));
}
}
if ( !gotone ) {
generator()->logWarning(Exception()
<< "DipoleShowerHandler could not "
<< "find a splitting kernel which is able "
<< "to handle splittings off the dipole "
<< ind << ".\n"
<< "Please check the input files."
<< Exception::warning);
}
}
// If needed, insert default implementations of virtual function defined
// in the InterfacedBase class here (using ThePEG-interfaced-impl in Emacs).
void DipoleShowerHandler::doinit() {
ShowerHandler::doinit();
if ( theGlobalAlphaS )
resetAlphaS(theGlobalAlphaS);
}
void DipoleShowerHandler::dofinish() {
ShowerHandler::dofinish();
}
void DipoleShowerHandler::doinitrun() {
ShowerHandler::doinitrun();
}
void DipoleShowerHandler::persistentOutput(PersistentOStream & os) const {
os << kernels << theEvolutionOrdering
<< constituentReshuffler << intrinsicPtGenerator
<< theGlobalAlphaS << chainOrderVetoScales
<< nEmissions << discardNoEmissions << doFSR << doISR
<< realignmentScheme << verbosity << printEvent
<< theFactorizationScaleFactor << theRenormalizationScaleFactor;
}
void DipoleShowerHandler::persistentInput(PersistentIStream & is, int) {
is >> kernels >> theEvolutionOrdering
>> constituentReshuffler >> intrinsicPtGenerator
>> theGlobalAlphaS >> chainOrderVetoScales
>> nEmissions >> discardNoEmissions >> doFSR >> doISR
>> realignmentScheme >> verbosity >> printEvent
>> theFactorizationScaleFactor >> theRenormalizationScaleFactor;
}
ClassDescription<DipoleShowerHandler> DipoleShowerHandler::initDipoleShowerHandler;
// Definition of the static class description member.
void DipoleShowerHandler::Init() {
static ClassDocumentation<DipoleShowerHandler> documentation
("The DipoleShowerHandler class manages the showering using "
"the dipole shower algorithm.",
"The shower evolution was performed using the algorithm described in "
"\\cite{Platzer:2009jq} and \\cite{Platzer:2011bc}.",
"%\\cite{Platzer:2009jq}\n"
"\\bibitem{Platzer:2009jq}\n"
"S.~Platzer and S.~Gieseke,\n"
"``Coherent Parton Showers with Local Recoils,''\n"
" JHEP {\\bf 1101}, 024 (2011)\n"
"arXiv:0909.5593 [hep-ph].\n"
"%%CITATION = ARXIV:0909.5593;%%\n"
"%\\cite{Platzer:2011bc}\n"
"\\bibitem{Platzer:2011bc}\n"
"S.~Platzer and S.~Gieseke,\n"
"``Dipole Showers and Automated NLO Matching in Herwig++,''\n"
"arXiv:1109.6256 [hep-ph].\n"
"%%CITATION = ARXIV:1109.6256;%%");
static RefVector<DipoleShowerHandler,DipoleSplittingKernel> interfaceKernels
("Kernels",
"Set the splitting kernels to be used by the dipole shower.",
&DipoleShowerHandler::kernels, -1, false, false, true, false, false);
static Reference<DipoleShowerHandler,DipoleEvolutionOrdering> interfaceEvolutionOrdering
("EvolutionOrdering",
"Set the evolution ordering to be used.",
&DipoleShowerHandler::theEvolutionOrdering, false, false, true, false, false);
static Reference<DipoleShowerHandler,ConstituentReshuffler> interfaceConstituentReshuffler
("ConstituentReshuffler",
"The object to be used to reshuffle partons to their constitutent mass shells.",
&DipoleShowerHandler::constituentReshuffler, false, false, true, true, false);
static Reference<DipoleShowerHandler,IntrinsicPtGenerator> interfaceIntrinsicPtGenerator
("IntrinsicPtGenerator",
"Set the object in charge to generate intrinsic pt for incoming partons.",
&DipoleShowerHandler::intrinsicPtGenerator, false, false, true, true, false);
static Reference<DipoleShowerHandler,AlphaSBase> interfaceGlobalAlphaS
("GlobalAlphaS",
"Set a global strong coupling for all splitting kernels.",
&DipoleShowerHandler::theGlobalAlphaS, false, false, true, true, false);
static Switch<DipoleShowerHandler,bool> interfaceDoFSR
("DoFSR",
"Switch on or off final state radiation.",
&DipoleShowerHandler::doFSR, true, false, false);
static SwitchOption interfaceDoFSROn
(interfaceDoFSR,
"On",
"Switch on final state radiation.",
true);
static SwitchOption interfaceDoFSROff
(interfaceDoFSR,
"Off",
"Switch off final state radiation.",
false);
static Switch<DipoleShowerHandler,bool> interfaceDoISR
("DoISR",
"Switch on or off initial state radiation.",
&DipoleShowerHandler::doISR, true, false, false);
static SwitchOption interfaceDoISROn
(interfaceDoISR,
"On",
"Switch on initial state radiation.",
true);
static SwitchOption interfaceDoISROff
(interfaceDoISR,
"Off",
"Switch off initial state radiation.",
false);
static Switch<DipoleShowerHandler,int> interfaceRealignmentScheme
("RealignmentScheme",
"The realignment scheme to use.",
&DipoleShowerHandler::realignmentScheme, 0, false, false);
static SwitchOption interfaceRealignmentSchemePreserveRapidity
(interfaceRealignmentScheme,
"PreserveRapidity",
"Preserve the rapidity of non-coloured outgoing system.",
0);
static SwitchOption interfaceRealignmentSchemeEvolutionFractions
(interfaceRealignmentScheme,
"EvolutionFractions",
"Use momentum fractions as generated by the evolution.",
1);
static SwitchOption interfaceRealignmentSchemeCollisionFrame
(interfaceRealignmentScheme,
"CollisionFrame",
"Determine realignment from collision frame.",
2);
static Switch<DipoleShowerHandler,bool> interfaceChainOrderVetoScales
("ChainOrderVetoScales",
"[experimental] Switch on or off the chain ordering for veto scales.",
&DipoleShowerHandler::chainOrderVetoScales, true, false, false);
static SwitchOption interfaceChainOrderVetoScalesOn
(interfaceChainOrderVetoScales,
"On",
"Switch on chain ordering for veto scales.",
true);
static SwitchOption interfaceChainOrderVetoScalesOff
(interfaceChainOrderVetoScales,
"Off",
"Switch off chain ordering for veto scales.",
false);
interfaceChainOrderVetoScales.rank(-1);
static Parameter<DipoleShowerHandler,unsigned int> interfaceNEmissions
("NEmissions",
"[debug option] Limit the number of emissions to be generated. Zero does not limit the number of emissions.",
&DipoleShowerHandler::nEmissions, 0, 0, 0,
false, false, Interface::lowerlim);
interfaceNEmissions.rank(-1);
static Switch<DipoleShowerHandler,bool> interfaceDiscardNoEmissions
("DiscardNoEmissions",
"[debug option] Discard events without radiation.",
&DipoleShowerHandler::discardNoEmissions, false, false, false);
static SwitchOption interfaceDiscardNoEmissionsOn
(interfaceDiscardNoEmissions,
"On",
"Discard events without radiation.",
true);
static SwitchOption interfaceDiscardNoEmissionsOff
(interfaceDiscardNoEmissions,
"Off",
"Do not discard events without radiation.",
false);
interfaceDiscardNoEmissions.rank(-1);
static Parameter<DipoleShowerHandler,int> interfaceVerbosity
("Verbosity",
"[debug option] Set the level of debug information provided.",
&DipoleShowerHandler::verbosity, 0, 0, 0,
false, false, Interface::lowerlim);
interfaceVerbosity.rank(-1);
static Parameter<DipoleShowerHandler,int> interfacePrintEvent
("PrintEvent",
"[debug option] The number of events for which debugging information should be provided.",
&DipoleShowerHandler::printEvent, 0, 0, 0,
false, false, Interface::lowerlim);
interfacePrintEvent.rank(-1);
static Parameter<DipoleShowerHandler,double> interfaceFactorizationScaleFactor
("FactorizationScaleFactor",
"The factorization scale factor.",
&DipoleShowerHandler::theFactorizationScaleFactor, 1.0, 0.0, 0,
false, false, Interface::lowerlim);
static Parameter<DipoleShowerHandler,double> interfaceRenormalizationScaleFactor
("RenormalizationScaleFactor",
"The renormalization scale factor.",
&DipoleShowerHandler::theRenormalizationScaleFactor, 1.0, 0.0, 0,
false, false, Interface::lowerlim);
}
diff --git a/Exsample2/Makefile.am b/Exsample2/Makefile.am
deleted file mode 100644
--- a/Exsample2/Makefile.am
+++ /dev/null
@@ -1,9 +0,0 @@
-# SUBDIRS = exsample
-
-pkglib_LTLIBRARIES = HwExsample2.la
-HwExsample2_la_LDFLAGS = -module -version-info 11:1:0
-HwExsample2_la_SOURCES = \
-exsampler.h exsampler.cc
-
-# HwExsample2_la_LIBADD = \
-# exsample/libexsample.la
diff --git a/Exsample2/exsample/Makefile.am b/Exsample2/exsample/Makefile.am
deleted file mode 100644
--- a/Exsample2/exsample/Makefile.am
+++ /dev/null
@@ -1,19 +0,0 @@
-noinst_LTLIBRARIES = libexsample.la
-libexsample_la_SOURCES = \
-adaption_info.h \
-adaption_info.icc \
-binary_tree.h \
-cell.h \
-cell.icc \
-config.h \
-exponential_generator.h \
-exponential_generator.icc \
-generator.h \
-generator.icc \
-linear_interpolator.h \
-linear_interpolator.icc \
-selectors.h \
-selectors.icc \
-statistics.h \
-statistics.icc \
-utility.h
diff --git a/Exsample2/exsampler.cc b/Exsample2/exsampler.cc
deleted file mode 100644
--- a/Exsample2/exsampler.cc
+++ /dev/null
@@ -1,312 +0,0 @@
-// -*- C++ -*-
-
-// exsample2/exsampler.cc is part of matchbox
-// (C) 2008 Simon Platzer -- sp@particle.uni-karlsruhe.de
-
-#include "exsampler.h"
-#include "ThePEG/Interface/ClassDocumentation.h"
-#include "ThePEG/Interface/Parameter.h"
-
-#include "ThePEG/Handlers/StandardXComb.h"
-#include "ThePEG/PDT/ParticleData.h"
-
-#include "ThePEG/Persistency/PersistentOStream.h"
-#include "ThePEG/Persistency/PersistentIStream.h"
-
-#include <sstream>
-
-using namespace matchbox;
-using namespace exsample;
-
-exsampler::exsampler()
- : presampling_points_(2000),
- freeze_grid_(0),
- efficiency_threshold_(.95),
- gain_threshold_(.1),
- samplers_(), eg_wrappers_(),
- bin_selector_(), integrals_(),
- missing_events_(), oversampling_bins_(),
- sum_weights_(0),
- integral_(0.), integral_abs_(0.), variance_(0.),
- max_integral_(0.), last_bin_(-1),
- last_weight_(0.) {}
-
-exsampler::~exsampler() {}
-
-ThePEG::IBPtr exsampler::clone() const {
- return ThePEG::new_ptr(*this);
-}
-
-ThePEG::IBPtr exsampler::fullclone() const {
- return ThePEG::new_ptr(*this);
-}
-
-std::string exsampler::process(int bin) const {
- std::ostringstream os("");
- const ThePEG::StandardEventHandler& eh = *eventHandler();
- const ThePEG::StandardXComb& xc = *eh.xCombs()[bin];
- os << xc.mePartonData()[0]->PDGName() << " "
- << xc.mePartonData()[1]->PDGName() << " -> ";
- for ( ThePEG::cPDVector::const_iterator pid =
- xc.mePartonData().begin() + 2;
- pid != xc.mePartonData().end(); ++pid )
- os << (**pid).PDGName() << " ";
- return os.str();
-}
-
-void exsampler::dofinish() {
- ThePEG::SamplerBase::dofinish();
-
- integral_ = 0.;
- integral_abs_ = 0.;
- variance_ = 0.;
- max_integral_ = 0.;
-
- int b = 0;
-
- bool compensating = false;
-
- for (std::vector<sampler_type>::iterator s = samplers_.begin();
- s != samplers_.end(); ++s, ++b) {
-
- std::cout << "integrated cross section for "
- << process(b) << "is ("
- << samplers_[b].integral() << " +/- "
- << samplers_[b].integral_uncertainty()
- << ") nb"
- << (s->compensating() ? " (*)" : "") << "\n";
-
- if ( s->compensating() )
- compensating = true;
-
- s->finalize();
- integral_ += s->integral();
- integral_abs_ += std::abs(s->integral());
- variance_ += s->integral_variance();
- max_integral_ = std::max(max_integral_,s->integral());
- }
-
- std::cout << "integrated cross section is ("
- << integral_ << " +/- "
- << std::sqrt(variance_) << ") nb\n" << std::flush;
-
- if ( compensating )
- std::cout << "warning -- samplers marked with (*) are still in compensating mode\n" << std::flush;
-
-}
-
-void exsampler::doinitrun() {
- ThePEG::SamplerBase::doinitrun();
- initialize();
-}
-
-void exsampler::persistentOutput(ThePEG::PersistentOStream & os) const {
- // *** ATTENTION *** os << ; // Add all member variable which should be written persistently here.
- os << presampling_points_
- << freeze_grid_ << efficiency_threshold_
- << gain_threshold_ << samplers_.size();
-
- for (std::vector<sampler_type>::const_iterator s = samplers_.begin();
- s != samplers_.end(); ++s)
- s->put(os);
-
-}
-
-void exsampler::persistentInput(ThePEG::PersistentIStream & is, int) {
- // *** ATTENTION *** is >> ; // Add all member variable which should be read persistently here.
- is >> presampling_points_
- >> freeze_grid_ >> efficiency_threshold_
- >> gain_threshold_;
- std::size_t nsamplers;
- is >> nsamplers;
- samplers_.resize(nsamplers);
-
- for (std::vector<sampler_type>::iterator s = samplers_.begin();
- s != samplers_.end(); ++s)
- s->get(is);
-
-}
-
-ThePEG::ClassDescription<exsampler> exsampler::initexsampler;
-// Definition of the static class description member.
-
-void exsampler::Init() {
-
- static ThePEG::ClassDocumentation<exsampler> documentation
- ("There is no documentation for the exsampler class");
-
- static ThePEG::Parameter<exsampler,unsigned long> interfacepresampling_points
- ("presampling_points",
- "Set the number of presampling points per cell",
- &exsampler::presampling_points_, 2000, 0, 0,
- false, false, ThePEG::Interface::lowerlim);
-
- static ThePEG::Parameter<exsampler,unsigned long> interfacefreeze_grid
- ("freeze_grid",
- "Set the number of events after which the grid should be frozen",
- &exsampler::freeze_grid_, 0, 0, 0,
- false, false, ThePEG::Interface::lowerlim);
-
- static ThePEG::Parameter<exsampler,double> interfaceefficiency_threshold
- ("efficiency_threshold",
- "Set the efficiency threshold",
- &exsampler::efficiency_threshold_, .95, 0., 1.,
- false, false, ThePEG::Interface::limited);
-
- static ThePEG::Parameter<exsampler,double> interfacegain_threshold
- ("gain_threshold",
- "Set the gain threshold",
- &exsampler::gain_threshold_, .1, 0., 1.,
- false, false, ThePEG::Interface::limited);
-
-}
-
-void exsampler::initialize() {
-
- integral_ = 0.;
- integral_abs_ = 0.;
- variance_ = 0.;
- max_integral_ = 0.;
-
- if (samplers_.empty())
- samplers_.resize(eventHandler()->nBins());
-
- eg_wrappers_.resize(eventHandler()->nBins());
- integrals_.resize(eventHandler()->nBins());
- missing_events_.resize(eventHandler()->nBins(),0);
-
- for (int b = 0; b < eventHandler()->nBins(); ++b) {
-
- last_bin_ = b;
-
- eg_wrappers_[b] = eg_exsample2_wrapper(b,eventHandler());
- samplers_[b].function(&eg_wrappers_[b]);
-
- samplers_[b].sampling_parameters().presampling_points = presampling_points_;
- samplers_[b].sampling_parameters().freeze_grid = freeze_grid_;
- samplers_[b].sampling_parameters().maxtry = eventHandler()->maxLoop();
- samplers_[b].sampling_parameters().efficiency_threshold = efficiency_threshold_;
- samplers_[b].sampling_parameters().gain_threshold = gain_threshold_;
-
- samplers_[b].initialize(dummy_);
- integrals_[b] = samplers_[b].integral();
- integral_ += samplers_[b].integral();
- integral_abs_ += std::abs(samplers_[b].integral());
- variance_ += samplers_[b].integral_variance();
- max_integral_ = std::max(max_integral_,samplers_[b].integral());
-
- std::cout << "estimated cross section for " << process(b) << "is ("
- << samplers_[b].integral() << " +/- "
- << samplers_[b].integral_uncertainty()
- << ") nb\n";
-
- }
-
- std::cout << "estimated cross section is ("
- << integral_ << " +/- "
- << std::sqrt(variance_) << ") nb\n" << std::flush;
-
- double sum = 0.;
-
- for (int b = 0; b < eventHandler()->nBins(); ++b) {
- sum += std::abs(samplers_[b].integral());
- bin_selector_.insert(std::make_pair(sum/integral_abs_,b));
- }
-
-}
-
-void exsampler::update() {
-
- double old_integral_abs = integral_abs_;
- std::vector<double> old_integrals = integrals_;
-
- integral_ = 0.;
- integral_abs_ = 0.;
- variance_ = 0.;
- max_integral_ = 0.;
-
- for (std::vector<sampler_type>::iterator s = samplers_.begin();
- s != samplers_.end(); ++s) {
-
- integral_ += s->integral();
- integral_abs_ += std::abs(s->integral());
- variance_ += s->integral_variance();
- max_integral_ = std::max(max_integral_,s->integral());
-
- }
-
- bin_selector_.clear();
-
- double sum = 0.;
-
- for (int b = 0; b < eventHandler()->nBins(); ++b) {
-
- sum += std::abs(samplers_[b].integral());
- integrals_[b] = samplers_[b].integral();
- bin_selector_.insert(std::make_pair(sum/integral_abs_,b));
-
- long missing =
- static_cast<long>(round(samplers_[b].stats().accepted()*
- ((old_integral_abs * std::abs(integrals_[b])) /
- (integral_abs_ * std::abs(old_integrals[b]))-1.)));
-
- missing_events_[b] += missing;
- if (missing_events_[b] > 0)
- oversampling_bins_.insert(b);
-
- }
-
-}
-
-double exsampler::generate() {
-
- while (true) {
-
- try {
-
- if (oversampling_bins_.empty()) {
- last_bin_ = bin_selector_.upper_bound(ThePEG::UseRandom::rnd())->second;
- if (missing_events_[last_bin_] < 0) {
- ++missing_events_[last_bin_];
- continue;
- }
- } else {
- last_bin_ = *oversampling_bins_.begin();
- if (--missing_events_[last_bin_] == 0)
- oversampling_bins_.erase(last_bin_);
- }
-
- last_weight_ = samplers_[last_bin_].generate(dummy_);
- lastPoint() = samplers_[last_bin_].last_point();
- break;
-
- } catch (selection_maxtry&) {
-
- throw maxtry_exception()
- << "The maximum number of attempts to select a cell was exceeded\n"
- << "for process " << process(last_bin_)
- << ThePEG::Exception::eventerror;
-
- } catch (hit_and_miss_maxtry&) {
-
- throw maxtry_exception()
- << "The maximum number of attempts to select an event was exceeded\n"
- << "process " << process(last_bin_)
- << ThePEG::Exception::eventerror;
-
- } catch (generator_update&) {
-
- update();
- continue;
-
- } catch (...) {
- throw;
- }
-
- }
-
- sum_weights_ += last_weight_;
- return last_weight_;
-
-}
-
diff --git a/Exsample2/exsampler.h b/Exsample2/exsampler.h
deleted file mode 100644
--- a/Exsample2/exsampler.h
+++ /dev/null
@@ -1,353 +0,0 @@
-// -*- C++ -*-
-
-// exsample2/exsampler.h is part of matchbox
-// (C) 2008 Simon Platzer -- sp@particle.uni-karlsruhe.de
-
-#ifndef matchbox_exsample2_exsampler_h
-#define matchbox_exsample2_exsampler_h
-
-#include <map>
-
-#include "ThePEG/Handlers/SamplerBase.h"
-#include "ThePEG/Handlers/StandardEventHandler.h"
-#include "ThePEG/Utilities/Exception.h"
-#include "ThePEG/Repository/UseRandom.h"
-
-#include "exsample/generator.h"
-
-namespace matchbox {
-
- /**
- * exsample2 function interface conforming
- * wrapper around standard event handler
- */
- struct eg_exsample2_wrapper {
-
- inline eg_exsample2_wrapper ()
- : bin_(-1), event_handler_() {}
-
- inline eg_exsample2_wrapper (int b,
- ThePEG::tStdEHPtr eh)
- : bin_(b), event_handler_(eh) {}
-
-
- /**
- * Evaluate with given random numbers.
- */
- inline double evaluate (const std::vector<double>& p) const {
- double ret;
- try {
- ret = event_handler_->dSigDR(p) / ThePEG::nanobarn;
- } catch (ThePEG::Veto&) {
- ret = 0.0;
- } catch (...) {
- throw;
- }
- return ret;
- }
-
- /**
- * Return the dimensionality in random
- * numbers needed to generate events
- */
- inline std::size_t dimension () const {
- return event_handler_->nDim(bin_);
- }
-
- /**
- * Return the lower left and upper right
- * corners of the support of this function
- */
- inline std::pair<std::vector<double>,std::vector<double> > support () const {
- std::vector<double> lower(dimension(),0.);
- std::vector<double> upper(dimension(),1.);
- return std::make_pair(lower,upper);
- }
-
- /**
- * Indicate start of presampling
- */
- inline void start_presampling () { }
-
- /**
- * Indicate end of presampling
- */
- inline void stop_presampling () { }
-
- private:
-
- int bin_;
- ThePEG::tStdEHPtr event_handler_;
-
- };
-
- /**
- * Here is the documentation of the exsampler class.
- *
- * @see \ref exsamplerInterfaces "The interfaces"
- * defined for exsampler.
- */
- class exsampler
- : public ThePEG::SamplerBase {
-
- public:
-
- /** @name Standard constructors and destructors. */
- //@{
- /**
- * The default constructor.
- */
- exsampler();
-
- /**
- * The destructor.
- */
- virtual ~exsampler();
- //@}
-
- public:
-
- typedef exsample::generator<eg_exsample2_wrapper,ThePEG::UseRandom> sampler_type;
-
- /** @name Virtual functions from SamplerBase. */
- //@{
- /**
- * Initialize the the sampler, possibly doing presampling of the
- * phase space.
- */
- virtual void initialize();
-
- /**
- * Generarate a new phase space point and return a weight associated
- * with it. This weight should preferably be 1.
- */
- virtual double generate();
-
- /**
- * Reject the last chosen phase space point.
- */
- virtual inline void rejectLast() {
- samplers_[last_bin_].reject();
- sum_weights_ -= last_weight_;
- }
-
- /**
- * If the sampler is able to sample several different functions
- * separately, this function should return the last chosen
- * function. This default version always returns 0.
- */
- virtual inline int lastBin() const { return last_bin_; }
-
- /**
- * Return the total integrated cross section determined from the
- * Monte Carlo sampling so far.
- */
- virtual inline ThePEG::CrossSection integratedXSec() const {
- return integral_ * ThePEG::nanobarn;
- }
-
- /**
- * Return the error on the total integrated cross section determined
- * from the Monte Carlo sampling so far.
- */
- virtual ThePEG::CrossSection integratedXSecErr() const {
- return std::sqrt(variance_) * ThePEG::nanobarn;
- }
-
- /**
- * Return the overestimated integrated cross section.
- */
- virtual ThePEG::CrossSection maxXSec() const {
- return max_integral_ * ThePEG::nanobarn;
- }
-
- /**
- * Return the sum of the weights returned by generate() so far (of
- * the events that were not rejeted).
- */
- virtual inline double sumWeights() const { return sum_weights_; }
- //@}
-
- public:
-
- /** @name Functions used by the persistent I/O system. */
- //@{
- /**
- * Function used to write out object persistently.
- * @name os the persistent output stream written to.
- */
- void persistentOutput(ThePEG::PersistentOStream & os) const;
-
- /**
- * Function used to read in object persistently.
- * @name is the persistent input stream read from.
- * @name version the version number of the object when written.
- */
- void persistentInput(ThePEG::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();
-
- public:
-
- struct maxtry_exception : public ThePEG::Exception {};
-
- protected:
-
- /** @name Standard Interfaced functions. */
- //@{
-
- /**
- * 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();
-
- //@}
-
- protected:
-
- /** @name Clone Methods. */
- //@{
- /**
- * Make a simple clone of this object.
- * @return a pointer to the new object.
- */
- virtual ThePEG::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 ThePEG::IBPtr fullclone() const;
- //@}
-
- private:
-
- /// update integrals and stuff
- void update ();
-
- /// get process by bin id
- std::string process(int bin) const;
-
- ///@name interface helpers to adaption_info objects
- //@{
-
- unsigned long presampling_points_;
-
- unsigned long freeze_grid_;
-
- double efficiency_threshold_;
-
- double gain_threshold_;
-
- //@}
-
- /// map bin ids to generators
- std::vector<sampler_type> samplers_;
-
- /// map bin ids to wrappers used
- std::vector<eg_exsample2_wrapper> eg_wrappers_;
-
- /// map used to select bins
- std::map<double,int> bin_selector_;
-
- /// current integrals of the bins
- std::vector<double> integrals_;
-
- /// map bins to number of missing events
- std::vector<long> missing_events_;
-
- /// bins which do need oversampling
- std::set<int> oversampling_bins_;
-
- /// the sum of accepted weights
- double sum_weights_;
-
- /// the total integrated corss section
- double integral_;
-
- /// sum of absoulte values of integrals
- double integral_abs_;
-
- /// the ucertainty on the integrated cross section
- double variance_;
-
- /// the maximum integrated cross section
- double max_integral_;
-
- /// the last selected bin
- int last_bin_;
-
- /// the last generated weight
- double last_weight_;
-
- /// dummy statistics to fix functionality required by rewrite
- exsample::statistics dummy_;
-
- private:
-
- /**
- * The static object used to initialize the description of this class.
- * Indicates that this is an abstract class with persistent data.
- */
- static ThePEG::ClassDescription<exsampler> initexsampler;
-
- /**
- * The assignment operator is private and must never be called.
- * In fact, it should not even be implemented.
- */
- exsampler & operator=(const exsampler &);
-
- };
-
-}
-
-#include "ThePEG/Utilities/ClassTraits.h"
-
-namespace ThePEG {
-
- /** @cond TRAITSPECIALIZATIONS */
-
- /** This template specialization informs ThePEG about the
- * base classes of exsampler. */
- template <>
- struct BaseClassTrait<matchbox::exsampler,1> {
- /** Typedef of the first base class of exsampler. */
- typedef ThePEG::SamplerBase NthBase;
- };
-
- /** This template specialization informs ThePEG about the name of
- * the exsampler class and the shared object where it is defined. */
- template <>
- struct ClassTraits<matchbox::exsampler>
- : public ClassTraitsBase<matchbox::exsampler> {
- /** Return a platform-independent class name */
- static string className() { return "matchbox::exsampler"; }
- /**
- * The name of a file containing the dynamic library where the class
- * exsampler is implemented. It may also include several, space-separated,
- * libraries if the class exsampler depends on other classes (base classes
- * excepted). In this case the listed libraries will be dynamically
- * linked in the order they are specified.
- */
- static string library() { return "HwExsample2.so"; }
- };
-
- /** @endcond */
-
-}
-
-#endif /* matchbox_exsample2_exsampler_h */
diff --git a/Makefile.am b/Makefile.am
--- a/Makefile.am
+++ b/Makefile.am
@@ -1,28 +1,28 @@
SUBDIRS = include \
Utilities PDT Decay PDF Models \
- Shower DipoleShower Exsample2 Hadronization MatrixElement \
+ Shower DipoleShower Hadronization MatrixElement \
UnderlyingEvent Analysis Looptools \
lib src Doc Contrib Tests
EXTRA_DIST = GUIDELINES
DISTCHECK_CONFIGURE_FLAGS = --enable-debug --with-thepeg=$(THEPEGPATH)
ACLOCAL_AMFLAGS = -I m4
DISTCLEANFILES = config.herwig
libclean:
find . -name '*.la' -print0 | xargs -0 rm -rf
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/configure.ac b/configure.ac
--- a/configure.ac
+++ b/configure.ac
@@ -1,173 +1,172 @@
dnl Process this file with autoconf to produce a configure script.
AC_PREREQ([2.59])
AC_INIT([Herwig++],[SVN],[herwig@projects.hepforge.org],[Herwig++])
AC_CONFIG_SRCDIR([Utilities/HerwigStrategy.cc])
AC_CONFIG_AUX_DIR([Config])
AC_CONFIG_MACRO_DIR([m4])
AC_CONFIG_HEADERS([Config/config.h])
dnl AC_PRESERVE_HELP_ORDER
AC_CANONICAL_HOST
case "${host}" in
*-darwin[[0156]].*)
AC_MSG_ERROR([Herwig++ requires OS X 10.3 or later])
;;
*-darwin7.*)
if test "x$MACOSX_DEPLOYMENT_TARGET" != "x10.3"; then
AC_MSG_ERROR(
[Please add 'MACOSX_DEPLOYMENT_TARGET=10.3' to the configure line.])
fi
;;
esac
dnl === disable debug symbols by default =====
if test "x$CXXFLAGS" = "x"; then
CXXFLAGS=-O3
fi
if test "x$CFLAGS" = "x"; then
CFLAGS=-O3
fi
dnl Looptools manual requires optimization off
if test "x$FCFLAGS" = "x"; then
FCFLAGS=-O0
fi
dnl ==========================================
AC_LANG([C++])
AM_INIT_AUTOMAKE([1.9 gnu dist-bzip2 -Wall])
m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])
dnl Checks for programs.
AC_PROG_CXX([g++])
AC_PROG_INSTALL
AC_PROG_MAKE_SET
AC_PROG_LN_S
dnl modified search order
AC_PROG_FC([gfortran g95 g77])
dnl xlf95 f95 fort ifort ifc efc pgf95 lf95 ftn xlf90 f90 pgf90 pghpf epcf90 xlf f77 frt pgf77 cf77 fort77 fl32 af77])
AC_LANG_PUSH([Fortran])
AC_MSG_CHECKING([if the Fortran compiler ($FC) works])
AC_COMPILE_IFELSE(
AC_LANG_PROGRAM([],[ print *[,]"Hello"]),
[AC_MSG_RESULT([yes])],
[AC_MSG_RESULT([no])
AC_MSG_ERROR([A Fortran compiler is required to build Herwig++.])
]
)
AC_LANG_POP([Fortran])
LT_PREREQ([2.2])
LT_INIT([disable-static dlopen pic-only])
dnl ####################################
dnl ####################################
dnl for Doc/fixinterfaces.pl
AC_PATH_PROG(PERL, perl)
HERWIG_CHECK_GSL
HERWIG_CHECK_THEPEG
HERWIG_CHECK_BOOST
HERWIG_COMPILERFLAGS
HERWIG_LOOPTOOLS
HERWIG_PDF_PATH
FASTJET_CHECK_FASTJET
HERWIG_VERSIONSTRING
HERWIG_CHECK_ABS_BUG
HERWIG_ENABLE_MODELS
SHARED_FLAG=-shared
AM_CONDITIONAL(NEED_APPLE_FIXES,
[test "xx${host/darwin/foundit}xx" != "xx${host}xx"])
if test "xx${host/darwin/foundit}xx" != "xx${host}xx"; then
APPLE_DSO_FLAGS=-Wl,-undefined,dynamic_lookup
SHARED_FLAG=-bundle
fi
AC_SUBST([APPLE_DSO_FLAGS])
AC_SUBST([SHARED_FLAG])
AC_CONFIG_FILES([UnderlyingEvent/Makefile
Models/Makefile
Models/StandardModel/Makefile
Models/RSModel/Makefile
Models/General/Makefile
Models/Susy/Makefile
Models/Susy/NMSSM/Makefile
Models/UED/Makefile
Models/Transplanckian/Makefile
Models/Leptoquarks/Makefile
Models/Zprime/Makefile
Models/TTbAsymm/Makefile
Models/ADD/Makefile
Models/Sextet/Makefile
Decay/Makefile
Decay/FormFactors/Makefile
Decay/Tau/Makefile
Decay/Baryon/Makefile
Decay/VectorMeson/Makefile
Decay/Perturbative/Makefile
Decay/ScalarMeson/Makefile
Decay/TensorMeson/Makefile
Decay/WeakCurrents/Makefile
Decay/Partonic/Makefile
Decay/General/Makefile
Decay/Radiation/Makefile
Doc/refman.conf
Doc/refman.h
PDT/Makefile
PDF/Makefile
MatrixElement/Makefile
MatrixElement/General/Makefile
MatrixElement/Lepton/Makefile
MatrixElement/Hadron/Makefile
MatrixElement/DIS/Makefile
MatrixElement/Powheg/Makefile
MatrixElement/Gamma/Makefile
Shower/SplittingFunctions/Makefile
Shower/Default/Makefile
Shower/Base/Makefile
Shower/Makefile
DipoleShower/Makefile
DipoleShower/Base/Makefile
DipoleShower/Kernels/Makefile
DipoleShower/Kinematics/Makefile
DipoleShower/Utility/Makefile
DipoleShower/AlphaS/Makefile
- Exsample2/exsample/Makefile
Utilities/Makefile
Hadronization/Makefile
lib/Makefile
include/Makefile
src/Makefile
src/defaults/Makefile
src/herwig-config
Doc/Makefile
Doc/HerwigDefaults.in
Looptools/Makefile
Analysis/Makefile
src/Makefile-UserModules
src/defaults/Analysis.in
Contrib/Makefile
Contrib/make_makefiles.sh
Tests/Makefile
Makefile])
AC_CONFIG_FILES([Doc/fixinterfaces.pl],[chmod +x Doc/fixinterfaces.pl])
HERWIG_OVERVIEW
AC_CONFIG_COMMANDS([summary],[cat config.herwig])
AC_OUTPUT

File Metadata

Mime Type
text/x-diff
Expires
Mon, Jan 20, 10:27 PM (1 d, 14 h)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
4242671
Default Alt Text
(50 KB)

Event Timeline