Page Menu
Home
HEPForge
Search
Configure Global Search
Log In
Files
F7877686
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
9 KB
Subscribers
None
View Options
Index: contrib/Sacrifice/ChangeLog
===================================================================
--- contrib/Sacrifice/ChangeLog (revision 889)
+++ contrib/Sacrifice/ChangeLog (revision 890)
@@ -1,59 +1,62 @@
+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
\ No newline at end of file
Index: contrib/Sacrifice/src/PythiaMain.cxx
===================================================================
--- contrib/Sacrifice/src/PythiaMain.cxx (revision 889)
+++ contrib/Sacrifice/src/PythiaMain.cxx (revision 890)
@@ -1,185 +1,185 @@
#ifdef PYTHIA8176
#include "Pythia.h"
#include "HepMCInterface.h"
#define HepMCConverter HepMC::I_Pythia8
#else
#include "Pythia8/Pythia.h"
#include "Pythia8/Pythia8ToHepMC.h"
#define HepMCConverter HepMC::Pythia8ToHepMC
#endif
#include "Sacrifice/UserHooksFactory.hh"
#include "Sacrifice/Exceptions.hh"
#include "Sacrifice/BeamParticle.hh"
#include "Sacrifice/Utils.hh"
#include "Sacrifice/HepMCIOHandler.hh"
#include "Sacrifice/MCUtilsHandler.hh"
#include "Sacrifice/PhotosHandler.hh"
#include "Sacrifice/binreloc.h"
#include "tclap/CmdLine.h"
#include "HepMC/GenEvent.h"
#include "HepMC/Units.h"
#include "boost/lexical_cast.hpp"
#include <string>
#include <stdexcept>
int main(int argc, char **argv){
char *envPath=0;
envPath = getenv("PYTHIA8DATA");
string path;
if(envPath){
path = envPath;
}else{
BrInitError brError;
br_init_lib(&brError);
path = br_find_data_dir(DEFAULTDATADIR);
}
//Do this first so we always get the Pythia banner and version information
Pythia8::Pythia pythia(path);
std::string pythiaVersion = boost::lexical_cast<std::string>(pythia.settings.parm("Pythia:versionNumber") + 0.00000000001);
pythiaVersion.erase(5);
std::string message = "Main program for steering Pythia " + pythiaVersion + ". Bug reports to James Monk <jmonk@cern.ch>";
TCLAP::CmdLine cmd(message, ' ', "0.9.9");
Sacrifice::HepMCIOHandler hepMCHandler(cmd);
Sacrifice::PhotosHandler photosHandler(cmd);
Sacrifice::MCUtilsHandler mcutils(cmd);
TCLAP::ValueArg<int> seedArg("r", "random-seed", "Random seed", false, -1, "int");
TCLAP::MultiArg<std::string> inputArg("i", "input", "Input command file", false, "string");
TCLAP::ValueArg<std::string> beam1Arg("f", "beam1", "Forward-going beam type (default PROTON)", false, "PROTON", "string");
TCLAP::ValueArg<std::string> beam2Arg("b", "beam2", "Backward-going beam type (default PROTON)", false, "PROTON", "string");
- TCLAP::ValueArg<double> energyArg("e", "collision-energy", "Collision energy in GeV (default 7000 GeV)", false, 7000., "double");
+ TCLAP::ValueArg<double> energyArg("e", "collision-energy", "Collision energy in GeV (default 7000 GeV)", false, 8000., "double");
TCLAP::ValueArg<int> nEventsArg("n", "nEvents", "Number of events to generate (default 100)", false, 100, "int");
TCLAP::MultiArg<std::string> paramsArgs("c", "command", "Commands to be read directly in to Pythia. Over-rides command file.", false, "string");
TCLAP::ValueArg<std::string> dataArg("d", "particle-data", "XML file of particle data. Over-rides default in $PYTHIA8DATA.", false, "", "string");
TCLAP::ValueArg<std::string> lhefArg("l", "lhe-file"," Les Houches Event File input", false, "", "string");
TCLAP::ValueArg<std::string> libArg("L", "load-library", "Library of user hooks to be loaded", false, "Plugin", "string");
TCLAP::ValueArg<std::string> hooksArg("u", "user-hook", "Name of user hook to add", false, "", "string");
TCLAP::SwitchArg printArg("w", "write", "Write HepMC events to stdout", false);
cmd.add(seedArg);
cmd.add(inputArg);
cmd.add(beam1Arg);
cmd.add(beam2Arg);
cmd.add(energyArg);
cmd.add(nEventsArg);
cmd.add(paramsArgs);
cmd.add(dataArg);
cmd.add(lhefArg);
cmd.add(libArg);
cmd.add(hooksArg);
cmd.add(printArg);
cmd.parse( argc, argv );
HepMCConverter pythiaToHepMC;
pythiaToHepMC.set_store_pdf(true);
if(photosHandler.isEnabled()){
photosHandler.initialise();
}
for(vector<std::string>::const_iterator inputFile = inputArg.getValue().begin();
inputFile != inputArg.getValue().end(); ++inputFile){
std::string path = Sacrifice::findParamFile(*inputFile);
if(!pythia.readFile(path)){
throw std::runtime_error("Could not interpret all of the commands in the input file " + path + "!");
}else{
std::cout<<" Read commands from "<<path<<std::endl<<std::endl;
}
}
for(vector<std::string>::const_iterator command = paramsArgs.getValue().begin();
command != paramsArgs.getValue().end(); ++command){
if(!pythia.readString(*command)){
std::string msg = "Pythia could not understand the command " + *command;
throw std::runtime_error(msg);
}
}
if(seedArg.getValue() > 0){
std::string seedString = "Random:seed=" + boost::lexical_cast<string>(seedArg.getValue());
bool understood = pythia.readString("Random:setSeed=on");
understood = understood && pythia.readString(seedString);
if(! understood) throw std::runtime_error("Your version of Pythia does not understand the random seed commands!");
}
if(photosHandler.isEnabled()){
bool understood = pythia.readString("TimeShower:QEDshowerByL = off");
if(! understood) throw std::runtime_error("Your version of Pythia does not understand the command to turn off QED FSR!");
}
Sacrifice::BeamParticle beam1(beam1Arg.getValue());
Sacrifice::BeamParticle beam2(beam2Arg.getValue());
if(hooksArg.getValue() != ""){
Sacrifice::UserHooksFactory::loadLibrary(libArg.getValue());
if(!pythia.setUserHooksPtr(Sacrifice::UserHooksFactory::create(hooksArg.getValue())))
throw std::runtime_error("Unable to use UserHook: " + hooksArg.getValue());
}
/// @todo This doesn't work at the moment... the beam particles are not correctly handled and process init fails
if(dataArg.getValue() != ""){
if(!pythia.particleData.reInit(dataArg.getValue(), true)) throw std::runtime_error("Could not read particle data file: " + dataArg.getValue());
}
bool isInitialised = false;
if(lhefArg.getValue() != ""){
isInitialised = pythia.init(lhefArg.getValue());
}else{
isInitialised = pythia.init(beam1.asID(), beam2.asID(), energyArg.getValue());
}
if(!isInitialised) throw std::runtime_error("Could not initialise Pythia");
for(int eventNumber = 0; eventNumber < nEventsArg.getValue(); ++eventNumber){
if(!pythia.next()){
if(pythia.info.atEndOfFile()){
std::cout<<"Reached end of LHE file"<<std::endl;
break;
}
}
#ifdef HEPMC_HAS_UNITS ///
HepMC::GenEvent *hepMCEvent = new HepMC::GenEvent(HepMC::Units::GEV, HepMC::Units::MM);
#else
HepMC::GenEvent *hepMCEvent = new HepMC::GenEvent();
#endif /// HEPMC_HAS_UNITS
pythiaToHepMC.fill_next_event(pythia, hepMCEvent);
if(photosHandler.isEnabled()){
photosHandler.process(hepMCEvent);
}
if(mcutils.isAvailable()) mcutils.filter(hepMCEvent);
if(printArg.getValue()){
hepMCEvent->print();
}
hepMCHandler.writeEvent(hepMCEvent);
delete hepMCEvent;
}
pythia.statistics();
}
File Metadata
Details
Attached
Mime Type
text/x-diff
Expires
Tue, Nov 19, 4:11 PM (1 d, 13 h)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
3800711
Default Alt Text
(9 KB)
Attached To
rAGILESVN agilesvn
Event Timeline
Log In to Comment