diff --git a/MatrixElement/FxFx/FxFxLHReader.cc b/MatrixElement/FxFx/FxFxLHReader.cc deleted file mode 100644 --- a/MatrixElement/FxFx/FxFxLHReader.cc +++ /dev/null @@ -1,466 +0,0 @@ -// -*- C++ -*- -// -// FxFxLHReader.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 FxFxLHReader class. -// -#include "FxFxLHReader.h" -#include "ThePEG/Interface/ClassDocumentation.h" -#include "ThePEG/Interface/Reference.h" -#include "ThePEG/Interface/Switch.h" -#include "ThePEG/Interface/Parameter.h" -#include "ThePEG/Utilities/Throw.h" -#include "ThePEG/PDT/DecayMode.h" -#include "ThePEG/Persistency/PersistentOStream.h" -#include "ThePEG/Persistency/PersistentIStream.h" -#include "ThePEG/PDF/PartonExtractor.h" -#include "ThePEG/PDF/NoPDF.h" -#include "ThePEG/Cuts/Cuts.h" -#include "ThePEG/EventRecord/TmpTransform.h" -#include "ThePEG/Utilities/UtilityBase.h" - -using namespace Herwig; - -FxFxLHReader:: -FxFxLHReader(const FxFxLHReader & x) - : LesHouchesReader(x), neve(x.neve), ieve(0), - LHFVersion(x.LHFVersion), outsideBlock(x.outsideBlock), - headerBlock(x.headerBlock), initComments(x.initComments), - initAttributes(x.initAttributes), eventComments(x.eventComments), - eventAttributes(x.eventAttributes), - theFileName(x.theFileName),overSampling_(x.overSampling_) {} - -FxFxLHReader::~FxFxLHReader() {} - -IBPtr FxFxLHReader::clone() const { - return new_ptr(*this); -} - -IBPtr FxFxLHReader::fullclone() const { - return new_ptr(*this); -} - -bool FxFxLHReader::preInitialize() const { - return true; -} - -void FxFxLHReader::doinit() { - LesHouchesReader::doinit(); -} - -void FxFxLHReader::initialize(LesHouchesEventHandler & eh) { - LesHouchesReader::initialize(eh); - if ( LHFVersion.empty() ) - Throw() - << "The file associated with '" << name() << "' does not contain a " - << "proper formatted Les Houches event file. The events may not be " - << "properly sampled." << Exception::warning; -} - - -long FxFxLHReader::scan() { - - open(); - - // Shall we write the events to a cache file for fast reading? If so - // we write to a temporary file if the caches events should be - // randomized. - if ( cacheFileName().length() ) openWriteCacheFile(); - - // Keep track of the number of events scanned. - long neve = 0; - long cuteve = 0; - bool negw = false; - - // If the open() has not already gotten information about subprocesses - // and cross sections we have to scan through the events. - if ( !heprup.NPRUP || cacheFile() || abs(heprup.IDWTUP) != 1 ) { // why scan if IDWTUP != 1? - - HoldFlag<> isScanning(scanning); - - double oldsum = 0.0; - vector lprup; - vector newmax; - vector oldeve; - vector neweve; - for ( int i = 0; ( maxScan() < 0 || i < maxScan() ) && readEvent(); ++i ) { - if ( !checkPartonBin() ) Throw() - << "Found event in LesHouchesReader '" << name() - << "' which cannot be handeled by the assigned PartonExtractor '" - << partonExtractor()->name() << "'." << Exception::runerror; - vector::iterator idit = - find(lprup.begin(), lprup.end(), hepeup.IDPRUP); - int id = lprup.size(); - if ( idit == lprup.end() ) { - lprup.push_back(hepeup.IDPRUP); - newmax.push_back(0.0); - neweve.push_back(0); - oldeve.push_back(0); - } else { - id = idit - lprup.begin(); - } - ++neve; - ++oldeve[id]; - oldsum += hepeup.XWGTUP; - if ( cacheFile() ) { - if ( eventWeight() == 0.0 ) { - ++cuteve; - continue; - } - cacheEvent(); - } - ++neweve[id]; - newmax[id] = max(newmax[id], abs(eventWeight())); - if ( eventWeight() < 0.0 ) negw = true; - } - - xSecWeights.resize(oldeve.size(), 1.0); - for ( int i = 0, N = oldeve.size(); i < N; ++i ) - if ( oldeve[i] ) xSecWeights[i] = double(neweve[i])/double(oldeve[i]); - - if ( maxScan() < 0 || neve > NEvents() ) NEvents(neve - cuteve); - - if ( lprup.size() == heprup.LPRUP.size() ) { - for ( int id = 0, N = lprup.size(); id < N; ++id ) { - vector::iterator idit = - find(heprup.LPRUP.begin(), heprup.LPRUP.end(), hepeup.IDPRUP); - if ( idit == heprup.LPRUP.end() ) { - Throw() - << "When scanning events, the LesHouschesReader '" << name() - << "' found undeclared processes." << Exception::warning; - heprup.NPRUP = 0; - break; - } - int idh = idit - heprup.LPRUP.begin(); - heprup.XMAXUP[idh] = newmax[id]; - } - } - if ( heprup.NPRUP == 0 ) { - // No heprup block was supplied or something went wrong. - heprup.NPRUP = lprup.size(); - heprup.LPRUP.resize(lprup.size()); - heprup.XMAXUP.resize(lprup.size()); - for ( int id = 0, N = lprup.size(); id < N; ++id ) { - heprup.LPRUP[id] = lprup[id]; - heprup.XMAXUP[id] = newmax[id]; - } - } else if ( abs(heprup.IDWTUP) != 1 ) { - // Try to fix things if abs(heprup.IDWTUP) != 1. - double sumxsec = 0.0; - for ( int id = 0; id < heprup.NPRUP; ++id ) sumxsec += heprup.XSECUP[id]; - weightScale = picobarn*neve*sumxsec/oldsum; - } - } - - if ( cacheFile() ) closeCacheFile(); - - if ( negw ) heprup.IDWTUP = min(-abs(heprup.IDWTUP), -1); - - return neve; - -} - -void FxFxLHReader::open() { - if ( filename().empty() ) - throw LesHouchesFileError() - << "No Les Houches file name. " - << "Use 'set " << name() << ":FileName'." - << Exception::runerror; - cfile.open(filename()); - if ( !cfile ) - throw LesHouchesFileError() - << "The FxFxLHReader '" << name() << "' could not open the " - << "event file called '" << theFileName << "'." - << Exception::runerror; - - cfile.readline(); - if ( !cfile.find(" attributes = - StringUtils::xmlAttributes("LesHouchesEvents", cfile.getline()); - LHFVersion = attributes["version"]; - if ( LHFVersion.empty() ) return; - - bool readingHeader = false; - bool readingInit = false; - headerBlock = ""; - - // Loop over all lines until we hit the tag. - while ( cfile.readline() && !cfile.find("") ) { - if ( cfile.find("> heprup.IDBMUP.first >> heprup.IDBMUP.second - >> heprup.EBMUP.first >> heprup.EBMUP.second - >> heprup.PDFGUP.first >> heprup.PDFGUP.second - >> heprup.PDFSUP.first >> heprup.PDFSUP.second - >> heprup.IDWTUP >> heprup.NPRUP ) ) { - heprup.NPRUP = -42; - LHFVersion = ""; - return; - } - heprup.resize(); - - for ( int i = 0; i < heprup.NPRUP; ++i ) { - cfile.readline(); - if ( !( cfile >> heprup.XSECUP[i] >> heprup.XERRUP[i] - >> heprup.XMAXUP[i] >> heprup.LPRUP[i] ) ) { - heprup.NPRUP = -42; - LHFVersion = ""; - return; - } - } - } - else if ( cfile.find("momentum().plus()/ - beams().first->momentum().plus(); - - if ( reweightPDF && - inPDF.first && outPDF.first && inPDF.first != outPDF.first ) { - if ( hepeup.XPDWUP.first <= 0.0 ) - hepeup.XPDWUP.first = - inPDF.first->xfx(inData.first, incoming().first->dataPtr(), - sqr(hepeup.SCALUP*GeV), x1); - double xf = outPDF.first->xfx(inData.first, incoming().first->dataPtr(), - sqr(hepeup.SCALUP*GeV), x1); - lastweight *= xf/hepeup.XPDWUP.first; - hepeup.XPDWUP.first = xf; - } - - double x2 = incoming().second->momentum().minus()/ - beams().second->momentum().minus(); - - if ( reweightPDF && - inPDF.second && outPDF.second && inPDF.second != outPDF.second ) { - if ( hepeup.XPDWUP.second <= 0.0 ) - hepeup.XPDWUP.second = - inPDF.second->xfx(inData.second, incoming().second->dataPtr(), - sqr(hepeup.SCALUP*GeV), x2); - double xf = - outPDF.second->xfx(inData.second, incoming().second->dataPtr(), - sqr(hepeup.SCALUP*GeV), x2); - lastweight *= xf/hepeup.XPDWUP.second; - hepeup.XPDWUP.second = xf; - } - - if ( cutEarly() ) { - if ( !cuts().initSubProcess((incoming().first->momentum() + - incoming().second->momentum()).m2(), - 0.5*log(x1/x2)) ) lastweight = 0.0; - tSubProPtr sub = getSubProcess(); - TmpTransform tmp(sub, Utilities::getBoostToCM(sub->incoming())); - if ( !cuts().passCuts(*sub) ) lastweight = 0.0; - } - - return true; -} - -double FxFxLHReader::getEvent() { - if ( cacheFile() ) { - if (overSampling_) { - if ( !uncacheEvent() ) reopen(); - } else { - if ( !uncacheEvent() || stats.attempts()==NEvents() ) - throw LesHouchesReopenWarning() - << "More events requested than available in LesHouchesReader " - << name() << Exception::runerror; - } - } else { - if (overSampling_) { - if ( !readEvent() ) reopen(); - } else { - if ( !readEvent() || stats.attempts()==NEvents() ) - throw LesHouchesReopenWarning() - << "More events requested than available in LesHouchesReader " - << name() << Exception::runerror; - } - } - ++position; - - double max = maxWeights[hepeup.IDPRUP]*maxFactor; - return max != 0.0? eventWeight()/max: 0.0; - -} - -void FxFxLHReader::skip(long n) { - HoldFlag<> skipflag(skipping); - if(overSampling_) while ( n-- ) getEvent(); -} - -bool FxFxLHReader::doReadEvent() { - if ( !cfile ) return false; - if ( LHFVersion.empty() ) return false; - if ( heprup.NPRUP < 0 ) return false; - eventComments = ""; - outsideBlock = ""; - hepeup.NUP = 0; - hepeup.XPDWUP.first = hepeup.XPDWUP.second = 0.0; - - // Keep reading lines until we hit the next event or the end of - // the event block. Save any inbetween lines. Exit if we didn't - // find an event. - while ( cfile.readline() && !cfile.find("> hepeup.NUP >> hepeup.IDPRUP >> hepeup.XWGTUP - >> hepeup.SCALUP >> hepeup.AQEDUP >> hepeup.AQCDUP ) ) - return false; - hepeup.resize(); - // Read all particle lines. - for ( int i = 0; i < hepeup.NUP; ++i ) { - if ( !cfile.readline() ) return false; - if ( !( cfile >> hepeup.IDUP[i] >> hepeup.ISTUP[i] - >> hepeup.MOTHUP[i].first >> hepeup.MOTHUP[i].second - >> hepeup.ICOLUP[i].first >> hepeup.ICOLUP[i].second - >> hepeup.PUP[i][0] >> hepeup.PUP[i][1] >> hepeup.PUP[i][2] - >> hepeup.PUP[i][3] >> hepeup.PUP[i][4] - >> hepeup.VTIMUP[i] >> hepeup.SPINUP[i] ) ) - return false; - if(std::isnan(hepeup.PUP[i][0])||std::isnan(hepeup.PUP[i][1])|| - std::isnan(hepeup.PUP[i][2])||std::isnan(hepeup.PUP[i][3])|| - std::isnan(hepeup.PUP[i][4])) - throw Exception() - << "nan's as momenta in Les Houches file " - << Exception::eventerror; - } - - // Now read any additional comments. - while ( cfile.readline() && !cfile.find("") ) - eventComments += cfile.getline() + "\n"; - - if ( !cfile ) return false; - return true; - -} - -void FxFxLHReader::close() { - cfile.close(); -} - -void FxFxLHReader::persistentOutput(PersistentOStream & os) const { - os << neve << LHFVersion << outsideBlock << headerBlock << initComments - << initAttributes << eventComments << eventAttributes << theFileName - << overSampling_; -} - -void FxFxLHReader::persistentInput(PersistentIStream & is, int) { - is >> neve >> LHFVersion >> outsideBlock >> headerBlock >> initComments - >> initAttributes >> eventComments >> eventAttributes >> theFileName - >> overSampling_; - ieve = 0; -} - -ClassDescription -FxFxLHReader::initFxFxLHReader; -// Definition of the static class description member. - -void FxFxLHReader::Init() { - - static ClassDocumentation documentation - ("Herwig::FxFxLHReader is an base class to be used for objects " - "which reads event files from matrix element generators. This class is " - "able to read plain event files conforming to the Les Houches Event File " - "accord."); - - static Parameter interfaceFileName - ("FileName", - "The name of a file containing events conforming to the Les Houches " - "protocol to be read into ThePEG. A file name ending in " - ".gz will be read from a pipe which uses " - "zcat. If a file name ends in | the " - "preceeding string is interpreted as a command, the output of which " - "will be read through a pipe.", - &FxFxLHReader::theFileName, "", false, false); - - static Switch interfaceOverSampling - ("OverSampling", - "Allow / Forbid reading of LH events more than once by the " - "LH reader, allowing / protecting against statistical problems.", - &FxFxLHReader::overSampling_, true, false, false); - static SwitchOption AllowOverSampling - (interfaceOverSampling, - "AllowOverSampling", - "The reader will read events in the file more than once if more " - "events are needed to generate the requested number than that in " - "the LH file.", - true); - static SwitchOption ForbidOverSampling - (interfaceOverSampling, - "ForbidOverSampling", - "The reader will NOT read events in the file more than once if more " - "events are needed to generate the requested number than that in " - "the LH file - instead it will stop when all have been read.", - false); - - interfaceFileName.fileType(); - interfaceFileName.rank(11); - -} - diff --git a/MatrixElement/FxFx/FxFxLHReader.fh b/MatrixElement/FxFx/FxFxLHReader.fh deleted file mode 100644 --- a/MatrixElement/FxFx/FxFxLHReader.fh +++ /dev/null @@ -1,22 +0,0 @@ -// -*- C++ -*- -// -// This is the forward declaration of the FxFxLHReader class. -// -#ifndef HERWIG_FxFxLHReader_FH -#define HERWIG_FxFxLHReader_FH - -#include "ThePEG/Config/Pointers.h" - -namespace Herwig { - -class FxFxLHReader; - -} - -namespace ThePEG { - -ThePEG_DECLARE_POINTERS(Herwig::FxFxLHReader,FxFxLHReaderPtr); - -} - -#endif diff --git a/MatrixElement/FxFx/FxFxLHReader.h b/MatrixElement/FxFx/FxFxLHReader.h deleted file mode 100644 --- a/MatrixElement/FxFx/FxFxLHReader.h +++ /dev/null @@ -1,333 +0,0 @@ -// -*- C++ -*- -// -// FxFxLHReader.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. -// -// -// This is the implementation of the non-inlined, non-templated member -// functions of the FxFxLHReader class. -// -#ifndef HERWIG_FxFxLHReader_H -#define HERWIG_FxFxLHReader_H -// This is the declaration of the FxFxLHReader class. - -#include "ThePEG/LesHouches/LesHouchesReader.h" -#include "FxFxLHReader.fh" -#include "ThePEG/PDT/Decayer.h" -#include "ThePEG/Utilities/CFileLineReader.h" -#include - -namespace Herwig { - -using namespace ThePEG; - -/** - * FxFxLHReader derives from the LesHouchesReader base class - * to be used for objects which read event files from matrix element - * generators. It extends LesHouchesReader by defining a file handle to be - * read from, which is opened and closed by the open() and close() - * functions. Note that the file handle is a standard C filehandle and - * not a C++ stream. This is because there is no standard way in C++ - * to connect a pipe to a stream for reading eg. gzipped files. This - * class is able to read plain event files conforming to the Les - * Houches Event File accord. - * - * @see \ref FxFxLHReaderInterfaces "The interfaces" - * defined for FxFxLHReader. - * @see LesHouchesReader - * @see FxFxLHReader - */ -class FxFxLHReader: public LesHouchesReader { - -public: - - /** @name Standard constructors and destructors. */ - //@{ - /** - * Default constructor. - */ - FxFxLHReader() : neve(0), ieve(0) {} - - /** - * Copy-constructor. Note that a file which is opened in the object - * copied from will have to be reopened in this. - */ - FxFxLHReader(const FxFxLHReader &); - - /** - * Destructor. - */ - virtual ~FxFxLHReader(); - //@} - -public: - - /** @name Virtual functions specified by the LesHouchesReader base class. */ - //@{ - /** - * Initialize. This function is called by the LesHouchesEventHandler - * to which this object is assigned. - */ - virtual void initialize(LesHouchesEventHandler & eh); - - /** - * Calls readEvent() or uncacheEvent() to read information into the - * LesHouches common block variables. This function is called by the - * LesHouchesEventHandler if this reader has been selectod to - * produce an event. - * - * @return the weight asociated with this event. If negative weights - * are allowed it should be between -1 and 1, otherwise between 0 - * and 1. If outside these limits the previously estimated maximum - * is violated. Note that the estimated maximum then should be - * updated from the outside. - */ - virtual double getEvent(); - - /** - * Calls doReadEvent() and performs pre-defined reweightings. A - * sub-class overrides this function it must make sure that the - * corresponding reweightings are done. - */ - virtual bool readEvent(); - - /** - * Skip \a n events. Used by LesHouchesEventHandler to make sure - * that a file is scanned an even number of times in case the events - * are not ramdomly distributed in the file. - */ - virtual void skip(long n); - - /** - * Scan the file or stream to obtain information about cross section - * weights and particles etc. This function should fill the - * variables corresponding to the /HEPRUP/ common block. The - * function returns the number of events scanned. - */ - virtual long scan(); - - /** - * Open a file with events. Derived classes should overwrite it and - * first calling it before reading in the run information into the - * corresponding protected variables. - */ - virtual void open(); - - /** - * Close the file from which events have been read. - */ - virtual void close(); - - /** - * Read the next event from the file or stream into the - * corresponding protected variables. Return false if there is no - * more events or if this was not a LHF event file. - */ - virtual bool doReadEvent(); - //@} - - /** - * Return the name of the file from where to read events. - */ - string filename() const { return theFileName; } - -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); - //@} - - /** - * Standard Init function used to initialize the interfaces. - */ - static void Init(); - -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; - //@} - - /** @name Standard (and non-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(); - - /** - * Return true if this object needs to be initialized before all - * other objects because it needs to extract PDFs from the event file. - */ - virtual bool preInitialize() const; - //@ - -protected: - - /** - * The wrapper around the C FILE stream from which to read - */ - CFileLineReader cfile; - -protected: - - /** - * The number of events in this file. - */ - long neve; - - /** - * The current event number. - */ - long ieve; - - /** - * If the file is a standard Les Houches formatted file (LHF) this - * is its version number. If empty, this is not a Les Houches - * formatted file - */ - string LHFVersion; - - /** - * If LHF. All lines (since the last open() or readEvent()) outside - * the header, init and event tags. - */ - string outsideBlock; - - /** - * If LHF. All lines from the header block. - */ - string headerBlock; - - /** - * If LHF. Additional comments found in the init block. - */ - string initComments; - - /** - * If LHF. Map of attributes (name-value pairs) found in the init - * tag. - */ - map initAttributes; - - /** - * If LHF. Additional comments found with the last read event. - */ - string eventComments; - - /** - * If LHF. Map of attributes (name-value pairs) found in the last - * event tag. - */ - map eventAttributes; - -private: - - /** - * The name of the file from where to read events. - */ - string theFileName; - - /** - * Determines whether events in the LH file are or are not read - * more than once in order to generate the requested number of - * events. - */ - bool overSampling_; - -private: - - /** - * Describe an abstract base class with persistent data. - */ - static ClassDescription initFxFxLHReader; - - /** - * Private and non-existent assignment operator. - */ - FxFxLHReader & operator=(const FxFxLHReader &) = delete; - -public: - - /** @cond EXCEPTIONCLASSES */ - /** Exception class used by FxFxLHReader if reading the file - * fails. */ - class LesHouchesFileError: public Exception {}; - /** @endcond */ - -}; - -} - - -#include "ThePEG/Utilities/ClassTraits.h" - -namespace ThePEG { - -/** @cond TRAITSPECIALIZATIONS */ - -/** - * This template specialization informs ThePEG about the - * base class of FxFxLHReader. - */ -template <> -struct BaseClassTrait { - /** Typedef of the base class of FxFxLHReader. */ - typedef LesHouchesReader NthBase; -}; - -/** - * This template specialization informs ThePEG about the name of the - * FxFxLHReader class and the shared object where it is - * defined. - */ -template <> -struct ClassTraits - : public ClassTraitsBase { - /** - * Return the class name. - */ - static string className() { return "Herwig::FxFxLHReader"; } - /** - * Return the name of the shared library to be loaded to get access - * to the FxFxLHReader class and every other class it uses - * (except the base class). - */ - static string library() { return "FxFxLHReader.so"; } - -}; - -/** @endcond */ - -} - -#endif /* HERWIG_FxFxLHReader_H */ diff --git a/MatrixElement/FxFx/Makefile.am b/MatrixElement/FxFx/Makefile.am --- a/MatrixElement/FxFx/Makefile.am +++ b/MatrixElement/FxFx/Makefile.am @@ -1,26 +1,15 @@ pkglib_LTLIBRARIES = HwFxFx.la HwFxFxHandler.la HwFxFxAnalysis.la HwFxFx_la_SOURCES = \ FxFxFileReader.cc FxFxFileReader.fh FxFxFileReader.h\ FxFxEventHandler.cc FxFxEventHandler.h\ -FxFxReader.cc FxFxReader.fh \ +FxFxReader.cc FxFxReader.fh FxFxReader.h\ FxFx.h HwFxFx_la_LDFLAGS = $(AM_LDFLAGS) -module -version-info 1:0:0 HwFxFxHandler_la_SOURCES = \ FxFxHandler.cc FxFxHandler.h HwFxFxHandler_la_LDFLAGS = $(AM_LDFLAGS) -module -version-info 1:0:0 HwFxFxAnalysis_la_SOURCES = \ FxFxAnalysis.cc FxFxAnalysis.h HwFxFxAnalysis_la_LDFLAGS = $(AM_LDFLAGS) -module -version-info 1:0:0 - -# -# FxFxLHReader.cc FxFxReader.h -# FxFxLHReader.fh HW7-Zjets-FxFx-FxFx.in -# FxFxLHReader.h HW7-Zjets-FxFx-Tree.in -# - - - - - diff --git a/MatrixElement/FxFx/HW7-Zjets-FxFx-FxFx.in b/src/HW7-Zjets-FxFx-FxFx.in rename from MatrixElement/FxFx/HW7-Zjets-FxFx-FxFx.in rename to src/HW7-Zjets-FxFx-FxFx.in diff --git a/MatrixElement/FxFx/HW7-Zjets-FxFx-Tree.in b/src/HW7-Zjets-FxFx-Tree.in rename from MatrixElement/FxFx/HW7-Zjets-FxFx-Tree.in rename to src/HW7-Zjets-FxFx-Tree.in diff --git a/src/Makefile.am b/src/Makefile.am --- a/src/Makefile.am +++ b/src/Makefile.am @@ -1,226 +1,228 @@ SUBDIRS = defaults snippets Matchbox Merging defaultsdir = ${pkgdatadir}/defaults bin_PROGRAMS = Herwig Herwig_SOURCES = \ HerwigMain.cc HerwigCLI.cc HerwigCLI.h \ herwigopts.c herwigopts.h BUILT_SOURCES = herwigopts.c herwigopts.h Herwig_LDFLAGS = $(AM_LDFLAGS) -export-dynamic $(THEPEGLDFLAGS) Herwig_LDADD = $(THEPEGLIB) -ldl \ $(top_builddir)/API/libHerwigAPI.la bin_SCRIPTS = herwig-config HELPERFILES = \ CMSSM40.1.1.slha \ NMSSM.spc \ ADD.model \ Leptoquark.model \ LH.model \ LHTP.model \ MSSM.model \ MUED.model \ NMSSM.model \ RPV-Bi.model \ RPV-Tri.model \ RS.model \ Sextet.model \ TTBA.model \ Zprime.model \ RPV-BI.slha \ RPV-TRI.slha \ RPV-UDD.slha INPUTFILES = \ DIS.in \ DIS-Matchbox.in \ GammaGamma.in \ ILC.in \ ILC-MSSM.in \ ILC-MUED.in \ ILC-RS.in \ LEP.in \ LEP-Matchbox.in \ LHC-ADD.in \ LHC-CEX.in \ LHC-GammaGamma.in \ LHC-ResolvedGammaGamma.in \ LHC.in \ LHC-Matchbox.in \ LHC-LQ.in \ LHC-MSSM.in \ LHC-MUED.in \ LHC-NMSSM.in \ LHC-Powheg.in \ LHC-RPV.in \ LHC-RS.in \ LHC-Sextet.in \ LHC-TRP.in \ LHC-TTBA.in \ LHC-MB.in \ LHC-ZP.in \ TVT.in \ TVT-Powheg.in \ TVT-TTBA.in \ LHC-LH.in \ LHC-LHTP.in \ -LHE.in +LHE.in \ +HW7-Zjets-FxFx-FxFx.in\ +HW7-Zjets-FxFx-Tree.in dist_pkgdata_DATA = $(INPUTFILES) $(HELPERFILES) pkgdata_DATA = Makefile-UserModules CLEANFILES = HerwigDefaults.rpo \ *.run *.log *.out *.tex \ multi.test *.output probs.test chisq.value \ LHC-RS-BR.spc LHC-MSSM-BR.spc LHC-RPV-BR.spc clean-local: -rm -rf Herwig ## checking targets ## HerwigDefaults.rpo: Herwig $(srcdir)/defaults/*.in defaults/PDF.in defaults/Analysis.in $(top_builddir)/lib/*.so ./Herwig init -L$(top_builddir)/lib defaults/HerwigDefaults.in -D check_BSM_Full= check_BSM= if WANT_BSM check_BSM += check-LHC-RPV check-LHC-RS check_BSM_Full += \ check-LHC-RPV check-LHC-MSSM check-ILC-MSSM \ check-LHC-NMSSM \ check-LHC-MUED check-ILC-MUED \ check-LHC-RS check-ILC-RS check-LHC-ADD \ check-LHC-LH check-LHC-LHTP \ check-LHC-TRP \ check-LHC-TTBA check-TVT-TTBA \ check-LHC-ZP \ check-LHC-LQ \ check-LHC-Sextet endif check_BSM_Full_valgrind = $(subst check,check-valgrind,$(check_BSM_Full)) check_BSM_valgrind = $(subst check,check-valgrind,$(check_BSM)) check-local: check-LEP check-LHC $(check_BSM) check-DIS check-ILC check-GammaGamma check-LHC-Powheg check-valgrind-local: check-valgrind-LEP check-valgrind-LHC $(check_BSM_valgrind) check-valgrind-DIS check-valgrind-ILC check-valgrind-GammaGamma check-valgrind-LHC-Powheg check-Powheg: check-LHC-Powheg check-TVT-Powheg check-valgrind-Powheg: check-valgrind-LHC-Powheg check-valgrind-TVT-Powheg check-BSM: $(check_BSM_Full) check-valgrind-BSM: $(check_BSM_Full_valgrind) check_Matchbox= \ check-LEP-Matchbox check-DIS-Matchbox check-LHC-Matchbox check_Matchbox_valgrind = $(subst check,check-valgrind,$(check_Matchbox)) check-Matchbox: $(check_Matchbox) check-valgrind-Matchbox: $(check_Matchbox_valgrind) check-extra: check-LHC-CEX check-LHC-GammaGamma check-LHC-ResolvedGammaGamma check-LHC-MB check-TVT check-valgrind-extra: check-valgrind-LHC-CEX check-valgrind-LHC-GammaGamma check-valgrind-LHC-MB check-valgrind-TVT check-all: check-local check-Powheg check-BSM check-Matchbox check-extra check-valgrind-all: check-valgrind-local check-valgrind-Powheg check-valgrind-BSM check-valgrind-Matchbox check-valgrind-extra link-helper-files: @for i in $(HELPERFILES); do \ if test -f $(srcdir)/$$i -a ! -e $$i; then \ $(LN_S) -f $(srcdir)/$$i; fi; done ## valgrind targets ## VALGRIND=valgrind --leak-check=full --num-callers=25 --freelist-vol=100000000 --leak-resolution=med --trace-children=yes check-valgrind-%: $(srcdir)/%.in HerwigDefaults.rpo link-helper-files $(VALGRIND) ./Herwig read -d1 -D $< &> valgrind-$(notdir $(subst .in,,$<))-read.log $(VALGRIND) ./Herwig run $(notdir $(subst .in,.run,$<)) -N 500 -d1 -D &> valgrind-$(notdir $(subst .in,,$<))-run.log valgrind: valgrind-init valgrind-read valgrind-run valgrind-init: $(VALGRIND) ./Herwig init -d1 -D -L$(top_builddir)/lib defaults/HerwigDefaults.in \ &> /tmp/valgrind-init.log valgrind-read: $(VALGRIND) ./Herwig read -d1 -D LHC.in &> /tmp/valgrind-read.log valgrind-run: $(VALGRIND) ./Herwig run -d1 -D -N5 LHC.run &> /tmp/valgrind-run.log CHECKCOMMAND = ./Herwig run $(notdir $(subst .in,.run,$<)) -N500 -d1 -D check-%: $(srcdir)/%.in HerwigDefaults.rpo link-helper-files ./Herwig read -i . $< -D @echo $(CHECKCOMMAND) @$(CHECKCOMMAND) && echo "# $@ OK #" \ || (echo "###### $@ BAD ######"; false) SETUPTHEPEG=$(THEPEGPATH)/bin/setupThePEG THEPEGREPO=$(THEPEGLIBPATH)/ThePEGDefaults.rpo install-data-hook: @echo Creating repository @./Herwig init -L$(DESTDIR)$(pkglibdir) -i$(DESTDIR)$(pkgdatadir) -i$(DESTDIR)$(pkgdatadir)/snippets $(DESTDIR)$(defaultsdir)/HerwigDefaults.in --repo=$(DESTDIR)$(pkgdatadir)/HerwigDefaults.rpo @if test -n "$(DESTDIR)"; \ then sed -i.bak -e "s@$(DESTDIR)@@g" $(DESTDIR)$(pkgdatadir)/HerwigDefaults.rpo; \ rm -f $(DESTDIR)$(pkgdatadir)/HerwigDefaults.rpo.bak; \ fi uninstall-hook: rm -f $(DESTDIR)$(pkgdatadir)/HerwigDefaults.rpo register: register-with-thepeg-repo register-with-thepeg-repo: @if test -x "$(SETUPTHEPEG)" -a -w "$(THEPEGREPO)"; \ then echo Registering with ThePEG; \ "$(SETUPTHEPEG)" --init \ $(DESTDIR)$(defaultsdir)/HerwigDefaults.in \ -r "$(THEPEGREPO)" -o "$(THEPEGREPO)" \ -i $(DESTDIR)$(pkgdatadir) \ -l$(DESTDIR)$(pkglibdir) ; \ if test -n "$(DESTDIR)"; \ then sed -i -e "s@$(DESTDIR)@@g" "$(THEPEGREPO)" ; fi ; \ fi unregister : unregister-from-thepeg-repo unregister-from-thepeg-repo: @if test -x "$(SETUPTHEPEG)" -a -w "$(THEPEGREPO)"; \ then echo Unregistering with ThePEG; \ "$(SETUPTHEPEG)" --init defaults/HerwigCleanup.in \ -r "$(THEPEGREPO)" -o "$(THEPEGREPO)" \ -l$(DESTDIR)$(pkglibdir) ; \ fi EXTRA_DIST = herwigopts.ggo nodist_Herwig_SOURCES = hgstamp.inc BUILT_SOURCES += hgstamp.inc CLEANFILES += hgstamp.inc HGVERSION := $(shell hg -R $(top_srcdir) parents --template '"Herwig {node|short} ({branch})"' 2> /dev/null || echo \"$(PACKAGE_STRING)\" || true ) .PHONY: update_hgstamp hgstamp.inc: update_hgstamp @[ -f $@ ] || touch $@ @echo '$(HGVERSION)' | cmp -s $@ - || echo '$(HGVERSION)' > $@ GENGETOPT = gengetopt %opts.h %opts.c : %opts.ggo $(GENGETOPT) < $<