diff --git a/GeneratorInterface/LHEInterface/data/create_lhe_powheg.sh b/GeneratorInterface/LHEInterface/data/create_lhe_powheg.sh index f87527bbe5424..e642e011cd593 100755 --- a/GeneratorInterface/LHEInterface/data/create_lhe_powheg.sh +++ b/GeneratorInterface/LHEInterface/data/create_lhe_powheg.sh @@ -144,7 +144,7 @@ EOF cd POWHEG-BOX/${process} mv Makefile Makefile.orig -cat Makefile.orig | sed -e "s#STATIC[ \t]*=[ \t]*-static#STATIC=-dynamic#g" | sed -e "s#PDF[ \t]*=[ \t]*native#PDF=lhapdf#g"> Makefile +cat Makefile.orig | sed -e "s#[#]*STATIC[ \t]*=[ \t]*-[a-z]*#STATIC=-dynamic#g" | sed -e "s#^PDF[ \t]*=[ \t]*[a-z]*#PDF=lhapdf#g">Makefile echo "LIBS+=-lz -lstdc++" >> Makefile diff --git a/GeneratorInterface/LHEInterface/data/run_madgraph_gridpack.sh b/GeneratorInterface/LHEInterface/data/run_madgraph_gridpack.sh index bfb33da8c388e..671151194811b 100755 --- a/GeneratorInterface/LHEInterface/data/run_madgraph_gridpack.sh +++ b/GeneratorInterface/LHEInterface/data/run_madgraph_gridpack.sh @@ -1,6 +1,7 @@ #!/bin/bash -set -o verbose +#set -o verbose +set -e echo " ______________________________________ " echo " Running Madgraph5.... " @@ -40,11 +41,11 @@ echo "%MSG-MG5 number of events requested = $nevt" rnum=${12} echo "%MSG-MG5 random seed used for the run = $rnum" -# retrieve the wanted gridpack from the official repository -fn-fileget -c `cmsGetFnConnect frontier://smallfiles` ${repo}/${name}_gridpack.tar.gz +# retrieve the wanted gridpack from the official repository +## || true is a temporary workaround to work with option -e and overcome the fact that the exist code of fn-fileget is 1 even if it succeeds +fn-fileget -c `cmsGetFnConnect frontier://smallfiles` ${repo}/${name}_gridpack.tar.gz || true # force the f77 compiler to be the CMS defined one - ln -sf `which gfortran` f77 ln -sf `which gfortran` g77 PATH=`pwd`:${PATH} @@ -52,25 +53,30 @@ PATH=`pwd`:${PATH} tar xzf ${name}_gridpack.tar.gz ; rm -f ${name}_gridpack.tar.gz ; cd madevent ## compile according to MG version 1.3.30 or 1.4.3 - ########### BEGIN - REPLACE process ################ # REPLACE script is runned automatically by run.sh if REPLACE dir is found ### # REPLACE will replace el with el/mu/taus by default, if you need something else you need to edit the replace_card1.dat if [ ${replace} == true ] ; then - cd .. - mkdir REPLACE - cat > replace_card1.dat < -11:11 13 15 --12: -12 -14 -16 --11:-11 -13 -15 -12: 12 14 16 -done -EOF - cp ./madevent/bin/replace.pl ./replace_card1.dat ./REPLACE/ - cd - + echo "%MSG-MG5: REPLACE is not working on SLC6 nodes and had been disabled." + echo "%MSG-MG5: Please produce your gridpack with explicit lepton flavours in the proc_card.dat" +#########THE USE OF REPLACE HAS BEEN DISABLED! +#########this is due to a clash between zlib in cmssw and Compress::Zlib in SLC6 nodes +# cd .. +# mkdir REPLACE +# cat > replace_card1.dat < +#11:11 13 15 +#-12: -12 -14 -16 +#-11:-11 -13 -15 +#12: 12 14 16 +#done +#EOF +# cp ./madevent/bin/replace.pl ./replace_card1.dat ./REPLACE/ +# chmod a+x ./REPLACE/replace.pl +# cd - + exit 1 fi ########## END - REPLACE ######################### @@ -82,12 +88,16 @@ fi if [ "${decay}" != true ] ; then rm -rf DECAY +else + cd .. + cp -r ./madevent/bin/internal/DECAY . + cd - fi ######END - DECAY ##### - # run the production stage +cd .. ./run.sh ${nevt} ${rnum} ls -al @@ -96,7 +106,7 @@ file="events" if [ ! -f ${file}.lhe.gz ]; then echo "%MSG-MG5 events.lhe.gz file is not in the same folder with run.sh script, abort !!! " - exit + exit 1 fi diff --git a/GeneratorInterface/LHEInterface/python/lhe2HepMCConverter_cff.py b/GeneratorInterface/LHEInterface/python/lhe2HepMCConverter_cff.py new file mode 100644 index 0000000000000..ff535a146d302 --- /dev/null +++ b/GeneratorInterface/LHEInterface/python/lhe2HepMCConverter_cff.py @@ -0,0 +1,6 @@ +import FWCore.ParameterSet.Config as cms + +generator = cms.EDProducer("LHE2HepMCConverter", + LHEEventProduct = cms.InputTag("source"), + LHERunInfoProduct = cms.InputTag("source") +)