Page MenuHomeHEPForge

No OneTemporary

Index: contrib/Sacrifice/UserHooks/EnhanceMPI.cxx
===================================================================
--- contrib/Sacrifice/UserHooks/EnhanceMPI.cxx (revision 917)
+++ contrib/Sacrifice/UserHooks/EnhanceMPI.cxx (revision 918)
@@ -1,99 +1,98 @@
#include "UserHookUtils.hh"
#include "Sacrifice/UserHooksFactory.hh"
-#include "boost/lexical_cast.hpp"
#include <stdexcept>
#include <iostream>
namespace Pythia8{
class EnhanceMPI;
}
Sacrifice::UserHooksFactory::Creator<Pythia8::EnhanceMPI> EnhanceMPICreator("EnhanceMPI");
namespace Pythia8{
class EnhanceMPI : public UserHooks{
public:
EnhanceMPI(): m_pTCut(10.), m_nMPIVeto(3){
std::cout<<"**********************************************************"<<std::endl;
std::cout<<"* *"<<std::endl;
std::cout<<"* Enhancing MPI emissions with UserHook! *"<<std::endl;
std::cout<<"* *"<<std::endl;
std::cout<<"**********************************************************"<<std::endl;
}
~EnhanceMPI(){}
bool doVetoMPIStep(int nMPI, const Event &event){
// MPI 1 is the hard process. We do not veto that!
if(nMPI < 2){
m_passedEvent = false;
return false;
}
if(m_passedEvent) return false;
// start at the end of the event record and work back
// This is prior to showering, so there should be at most 2 new MPI emissions
// event[0] is documentation, so stop before that.
size_t nEmissions=0;
for(int ii=event.size()-1; ii > 0 && nEmissions != 2; --ii){
if(event[ii].status() != 33) continue;
if(event[ii].pT() > m_pTCut){
m_passedEvent = true;
return false;
}
++nEmissions;
}
if(nMPI == m_nMPIVeto && !m_passedEvent){
// std::cout<<"Vetoing event on too-little MPI"<<std::endl;
return true;
}
return false;
}
bool doVetoPartonLevel(const Event &event){
if(m_passedEvent) return false;
return true;
}
/// Switch on calling of doVetoMPIStep
bool canVetoMPIStep(){return true;}
/// Call doVetoMIStep three times
/// First is the hard process
/// second is first MPI emission
/// *or*
/// the second part of a double diffractive event
/// *or*
/// the second hard process if there is on.
/// Therefore check up to 3
int numberVetoMPIStep(){return m_nMPIVeto;}
/// Switch on veto of ISR
bool canVetoISREmission(){return false;}
/// Switch off veto of FSR
bool canVetoFSREmission(){return false;}
/// Check the event after the generation of the parton level but before hadronisation
bool canVetoPartonLevel(){return true;}
private:
double m_pTCut;
bool m_passedEvent;
int m_nMPIVeto;
};
-}
\ No newline at end of file
+}
Index: contrib/Sacrifice/UserHooks/SuppressMPI.cxx
===================================================================
--- contrib/Sacrifice/UserHooks/SuppressMPI.cxx (revision 917)
+++ contrib/Sacrifice/UserHooks/SuppressMPI.cxx (revision 918)
@@ -1,79 +1,78 @@
#include "UserHookUtils.hh"
#include "Sacrifice/UserHooksFactory.hh"
-#include "boost/lexical_cast.hpp"
#include <stdexcept>
#include <iostream>
namespace Pythia8{
class SuppressMPI;
}
Sacrifice::UserHooksFactory::Creator<Pythia8::SuppressMPI> SuppressMPICreator("SuppressMPI");
namespace Pythia8{
class SuppressMPI : public UserHooks{
public:
SuppressMPI(): m_pTCut(10.), m_nMPIVeto(3){
std::cout<<"************************************************************"<<std::endl;
std::cout<<"* *"<<std::endl;
std::cout<<"* Suppressing MPI emissions with UserHook! *"<<std::endl;
std::cout<<"* *"<<std::endl;
std::cout<<"************************************************************"<<std::endl;
}
~SuppressMPI(){}
bool doVetoMPIStep(int nMPI, const Event &event){
// MPI 1 is the hard process. We do not veto that!
if(nMPI < 2){
return false;
}
// start at the end of the event record and work back
// This is prior to showering, so there should be at most 2 new MPI emissions
// event[0] is documentation, so stop before that.
size_t nEmissions=0;
for(int ii=event.size()-1; ii > 0 && nEmissions != 2; --ii){
if(event[ii].status() != 33) continue;
if(event[ii].pT() > m_pTCut){
return true;
}
++nEmissions;
}
return false;
}
/// Switch on calling of doVetoMPIStep
bool canVetoMPIStep(){return true;}
/// Call doVetoMIStep three times
/// First is the hard process
/// second is first MPI emission
/// *or*
/// the second part of a double diffractive event
/// *or*
/// the second hard process if there is on.
/// Therefore check up to 3
int numberVetoMPIStep(){return m_nMPIVeto;}
/// Switch on veto of ISR
bool canVetoISREmission(){return false;}
/// Switch off veto of FSR
bool canVetoFSREmission(){return false;}
private:
double m_pTCut;
int m_nMPIVeto;
};
-}
\ No newline at end of file
+}
Index: contrib/Sacrifice/share/setupPythia.sh.in
===================================================================
--- contrib/Sacrifice/share/setupPythia.sh.in (revision 917)
+++ contrib/Sacrifice/share/setupPythia.sh.in (revision 918)
@@ -1,7 +1,7 @@
prefix=@prefix@
exec_prefix=@exec_prefix@
export PATH="$exec_prefix/bin:$PATH"
-export @LIBPATHVARNAME@="@PYTHIA_LIBDIR@:@PHOTOS_LIBDIR@:@LHAPDF_LIBDIR@:@HEPMC_LIBDIR@:@BOOST_LIBDIR@:$@LIBPATHVARNAME@"
+export @LIBPATHVARNAME@="@PYTHIA_LIBDIR@:@PHOTOS_LIBDIR@:@LHAPDF_LIBDIR@:@HEPMC_LIBDIR@:$@LIBPATHVARNAME@"
export LHAPATH="@LHAPDF_LHAPATH@"
-#export PYTHIA8DATA="@PYTHIA_DATA@"
\ No newline at end of file
+#export PYTHIA8DATA="@PYTHIA_DATA@"
Index: contrib/Sacrifice/configure.ac
===================================================================
--- contrib/Sacrifice/configure.ac (revision 917)
+++ contrib/Sacrifice/configure.ac (revision 918)
@@ -1,163 +1,163 @@
AC_PREREQ(2.59)
-AC_INIT( [Sacrifice], [1.1.0], [jmonk@cern.ch], [Sacrifice])
+AC_INIT( [Sacrifice], [1.1.1], [jmonk@cern.ch], [Sacrifice])
AC_CONFIG_AUX_DIR([config])
AC_CONFIG_SRCDIR([src/PythiaMain.cxx])
AC_CONFIG_HEADERS([config/config.h])
AM_INIT_AUTOMAKE
AC_CONFIG_MACRO_DIR([m4])
AC_SUBST(LT_OBJDIR)
AC_LANG(C++)
AC_PROG_CXX
AX_CXX_COMPILE_STDCXX_11([noext],[mandatory])
AC_PROG_INSTALL
AC_PROG_LIBTOOL
AC_PROG_LN_S
AM_PROG_CC_C_O
## LT_INIT doesn't work with autoconf 2.59
#LT_INIT
##These are for tclap
AC_CXX_HAVE_SSTREAM
AC_CXX_HAVE_STRSTREAM
# lib suffix differs on OS X
AC_DEFINE_DYNAMIC_LIBS
# Do we have and LCG tag, AFS area.
# Can user-define the LCG tag for annoying cases (CENT OS!)
AC_ARG_WITH([LCGTag],
[AC_HELP_STRING([--with-LCGTag], [Specify the LCG tag (default=auto detect)])],
[auto_lcg=no], [auto_lcg=yes])
AS_IF([test x$auto_lcg == xno],
[LCG_TAG=$with_LCGTag],
[LCG_TAG=no]
)
AC_SEARCH_LCG
AC_GET_MCUTILS([AC_MSG_NOTICE([MCUtils headers present in include/MCUtils])],[AC_MSG_ERROR([Unable to download MCUtils or HEPUtils headers])])
AC_ARG_WITH([MCUtils],
[AC_HELP_STRING([--with-MCUtils], [enable MCUtils for HepMC filtering and (optionally) give the installation location (default disabled)])],
[],[with_MCUtils=yes])
AC_ARG_WITH([HepMC],
[AC_HELP_STRING([--with-HepMC], [enable HepMC and give the installation location (=no to disable)])],
)
AS_IF([test x$with_HepMC != xno],
[AC_SEARCH_HEPMC([enable_HepMC=yes],
[AS_IF( [test x$with_HepMC = x], [enable_HepMC=no], [AC_MSG_ERROR([HepMC package requested but not found!!])])])],
[enable_HepMC=no])
if test x$enable_HepMC = xyes; then
AC_MSG_NOTICE([Building with HepMC])
AS_IF([test x$with_MCUtils != xno],
[AC_SEARCH_MCUTILS([enable_MCUtils=yes],
[AC_MSG_ERROR([MCUtils support requested, but package not found!!])])],
[enable_MCUtils=no])
else
AC_MSG_NOTICE([*** Not building with HepMC - output of HepMC events will be disabled!! ***])
if test x$with_MCUtils != xno ; then
AC_MSG_ERROR([MCUtils support requested, but HepMC not found or requested!])
fi
fi
AM_CONDITIONAL(ENABLE_HEPMC, [test x$enable_HepMC = xyes])
AM_CONDITIONAL(ENABLE_MCUTILS, [test x$enable_MCUtils = xyes])
AC_ARG_WITH([pythia_version],
[AC_HELP_STRING([--with-pythia-version], [Request a particular Pythia 8 version if using AFS/LCG])],
[do_pythia_version=yes], [do_pythia_version=no])
AS_IF([test x$do_pythia_version == xyes],
[PYTHIA_VERSION=$with_pythia_version],
[PYTHIA_VERSION=no]
)
AC_ARG_WITH([LHAPDF],
[AC_HELP_STRING([--with-LHAPDF], [enable LHAPDF and give the installation location (=no to disable)])],
)
AS_IF([test x$with_LHAPDF != xno],
[AC_SEARCH_LHAPDF([enable_LHAPDF=yes],
[AS_IF( [test x$with_LHAPDF = x], [enable_LHAPDF=no], [AC_MSG_ERROR([LHAPDF package requested but not found!!])])])],
[enable_LHAPDF=no])
if test x$enable_LHAPDF = xyes; then
AC_MSG_NOTICE([Building with LHAPDF])
else
AC_MSG_NOTICE([*** Not building with LHAPDF - use of external PDF sets will be disabled!! ***])
fi
AM_CONDITIONAL(ENABLE_LHAPDF, [test x$enable_LHAPDF = xyes])
AC_ARG_WITH([photos],
[AC_HELP_STRING([--with-photos], [enable Photos and give the installation location (default disabled)])],
[test_photos=yes],[test_photos=no])
##
AC_ARG_ENABLE([photos],
[AC_HELP_STRING([--enable-photos], [Enable Photos++ and search default paths for libraries])],
[test_photos=yes],
[])
##
AS_IF( [test x$test_photos = xyes ],
[AS_IF( [test x$with_photos != xno ],
[AC_SEARCH_PHOTOS([enable_photos=yes],
[AC_MSG_ERROR([Photos++ support requested but package not found!!])])],
[enable_photos=no])],
[enable_photos=no])
if test x$enable_photos = xyes; then
AC_MSG_NOTICE([Building with Photos++ support])
else
AC_MSG_NOTICE([*** Building without Photos++ support!! ***])
fi
AM_CONDITIONAL(ENABLE_PHOTOS, [test x$enable_photos = xyes])
AC_ARG_WITH([pythia],
[AC_HELP_STRING([--with-pythia], [Give the Pythia 8 library and header installation location])],
)
AC_SEARCH_PYTHIA([AC_MSG_NOTICE([Found Pythia 8 library and headers])],
[AC_MSG_ERROR([Could not find Pythia 8 library and headers!!])])
AX_CHECK_ZLIB([have_zlib=yes],[have_zlib=no])
AC_MSG_NOTICE([have zlib = $have_zlib ])
AM_CONDITIONAL(ENABLE_GZIP, [test x$have_zlib = xyes] )
AM_CXXFLAGS="$AM_CXXFLAGS -Wall -O2"
AM_CPPFLAGS="$AM_CPPFLAGS -Wall -O2 -I\$(top_builddir)/ -I\$(top_builddir)/include"
if test x$have_zlib = xyes ; then
AM_LDFLAGS="$AM_LDFLAGS -L${ZLIB_HOME}/lib -lz"
AM_CPPFLAGS="$AM_CPPFLAGS -I${ZLIB_HOME}/include"
AM_CXXFLAGS="$AM_CPPFLAGS -I${ZLIB_HOME}/include"
AC_SUBST(AM_LDFLAGS)
fi
AC_SUBST(AM_CXXFLAGS)
AC_SUBST(AM_CPPFLAGS)
AC_CONFIG_FILES([ Makefile
src/Makefile
include/Makefile
include/Sacrifice/Makefile
include/MCUtils/Makefile
include/tclap/Makefile
share/Makefile
share/setupPythia.sh
UserHooks/Makefile ])
AC_OUTPUT
Index: contrib/Sacrifice/ChangeLog
===================================================================
--- contrib/Sacrifice/ChangeLog (revision 917)
+++ contrib/Sacrifice/ChangeLog (revision 918)
@@ -1,90 +1,90 @@
2017-11-06 James Monk <jmonk@cern.ch>
* Removal of boost dependency, replaced by C++11
* Clean up old uneccessary UserHooks
* Use zstr instead of boost for gzipping
* Update to newest MCUtils (1.3.1) + HEPUtils
* Default beam not set (Pythia sets pp) - allows beam to be set in cmd file, but still over-ridden on command line
* Default beam energy set to 13 TeV
- * Tagging as 1.1.0
+ * Tagging as 1.1.1
2016-11-17 James Monk <jmonk@cern.ch>
* Fix test for zlib support in pythia lib
2016-04-01 James Monk <jmonk@cern.ch>
* set_crash_on_problem now set true
* tagging for release as 1.0.0
2014-11-26 James Monk <jmonk@cern.ch>
* Fix multiple weights and CCKW-L cross section
* Update A2-MSTW2008LO and AU2-CT10 for new Py8.2 PDF syntax
* Add lhapdfdummy to linker only for Pythia version less than 8.2
* Option to slim the event record (-s) is now off by default. The option -s on the commandline now turns on the full event slimming (removes everything except final state particles)
2016-11-15 James Monk <jmonk@cern.ch>
* Ignore events with 0 CKKW-L weight
2014-09-18 James Monk <jmonk@cern.ch>
* Update build and params for Pythia 8.200
2014-02-26 James Monk <jmonk@cern.ch>
* change default beam energy to 8000 GeV
2014-02-03 James Monk <jmonk@cern.ch>
* improve header directory structure to include/Sacrifice include/tclap etc.
* Download tarball of MCUtils headers and install in include if not already present there.
* Use the downloaded MCUtils unless otherwise specified
#increase version to 0.9.9, make tarball
2013-11-25 James Monk <jmonk@cern.ch>
* Compatibility with Pythia 8.180
2013-07-29 James Monk <jmonk@cern.ch>
* PTRel_boostVetoedShower.cxx: another vetoed shower, this time implemented with a
boost that evolves during the evtn due to recoil. Should be identical to main31
2013-07-14 James Monk <jmonk@cern.ch>
* HepMC no longer optional. Doesn't really make sense, since HepMC output is the whole point
* Add option to produced gzip compressed output.
Option will only be present if Pythia itself was compiled with gzip support.
2013-07-10 James Monk <jmonk@cern.ch>
* Optional support for MCUtils to provide reduced HepMC size through filtering
2013-07-08 James Monk <jmonk@cern.ch>
* Suppress and Enhance MPI Userhooks. Veto events with MPI above and below a threshold
2013-07-01 James Monk <jmonk@cern.ch>
* update m4 scripts for slc6 gcc 46
* setupPythia.sh script adds LHAPATH
2013-06-19 James Monk <jmonk@cern.ch>
* User hook for vetoed shower using relative pT and reduced scale, a la main31
2013-02-13 James Monk <jmonk@cern.ch>
* Update build system to support Pythia with gzip
2013-01-28 James Monk <jmonk@cern.ch>
* Selection of UserHooks for vetoed shower with PoWHEG
WZVetoedShower.cxx vetoes emissions relative to the beam
QCDVetoedShower.cxx compares each emission to each PoWHEG leg
PoWHEGVetoedShower vetoes relative to the beam, but determines a new
definition of the veto scale
* The above author suggested veto schemes need testing and validating!
* Improved UserHook library loading (local directory, SACRIFICE_LIB_PATH, install lib dir)
2013-01-24 James Monk <jmonk@cern.ch>
* Allow user configuration of the lcg tag for troublesome setups
2012-12-13 James Monk <jmonk@cern.ch>
* Add support for loading user hooks on the cmd line
2012-05-21 James Monk <jmonk@cern.ch>
* Initial check-in to AGILe svn repository
* Supports Pythia 8 with HepMC, LHAPDF, PHOTOS++
* ./configure ^should^ discover all libraries from genser, if available
* Photos support optional (--enable-photos to turn it on)
* ~Replicates the ATLAS setup, including PHOTOS++ wrangling
* Setup script installed in share: source share/setupPythia8.sh
2012-02-22 James Monk <jmonk@cern.ch>
* Initial version of Pythia 8 main program + build system

File Metadata

Mime Type
text/x-diff
Expires
Sun, Feb 23, 2:55 PM (1 d, 7 h)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
4486734
Default Alt Text
(15 KB)

Event Timeline