diff --git a/Generators/BeamHaloGenerator/share/formatFlukaFile.pl b/Generators/BeamHaloGenerator/share/formatFlukaFile.pl
deleted file mode 100644
index 9a50150dc12260b949b8c8dd832e6117a3d27e94..0000000000000000000000000000000000000000
--- a/Generators/BeamHaloGenerator/share/formatFlukaFile.pl
+++ /dev/null
@@ -1,94 +0,0 @@
-#!/usr/bin/perl
-#
-# A.Sbrizzi
-#
-# A script to format FLUKA HL-LHC beam gas files from Anton Lechner format into Roderick Bruce format
-#
-use strict;
-
-die ("Usage: $0 <input file> <output prefix> <number of events>\n")
-    unless ($#ARGV==2);
-
-my $input_file     = $ARGV[0];
-my $output_prefix  = $ARGV[1];
-my $num_events     = $ARGV[2];
-my $file_counter   = 1; 
-my $event_counter  = 0;
-
-my $event_number   = 0;
-my $particle_gen   = 1;
-my $particle_type  = 0;
-my $stat_weight    = 0;
-my $x_position     = 0;
-my $y_position     = 0;
-my $x_cosine       = 0;
-my $y_cosine       = 0;
-my $t_start        = -1;
-my $total_energy   = 0;
-my $kinetic_energy = 0;
-my $t_primary      = 0;
-my $x_primary      = 0;
-my $y_primary      = 0;
-my $z_primary      = 0;
-
-die ("Cannot open $input_file for reading\n")
-    unless open(INPUTFILE, "< $input_file");
-
-my $output_file = sprintf("$output_prefix%05d.events", $file_counter);
-die ("Cannot open $output_file for writing\n")
-    unless open(OUTPUTFILE, '>', $output_file);
-
-my $last_event = -10;
-
-while (my $line = <INPUTFILE>) {
-    
-    # Remove the new line character
-    chomp $line;
-    
-    # If the string is not refined, skip this line.
-    if (defined $line) {
-	
-	# Split the string, using one or more spaces to denote the splitting.
-	my @frags = split(/\s+/,$line);
-
-	$event_number   = $frags[1];
-	$particle_type  = $frags[2];
-	$stat_weight    = $frags[4];
-	$x_position     = $frags[5];
-	$y_position     = $frags[6];
-	$x_cosine       = $frags[7];
-	$y_cosine       = $frags[8];
-	$total_energy   = $frags[9];
-	$kinetic_energy = $frags[10];
-	$t_primary      = $frags[11];
-	$x_primary      = $frags[12];
-	$y_primary      = $frags[13];
-	$z_primary      = $frags[14];
-
-	if ($event_number != $last_event) {
-
-	    $event_counter = $event_counter + 1;
-
-	    if ($event_counter > $num_events) {
-		
-		close(OUTPUTFILE);
-		
-		$file_counter++;
-		$event_counter = 1;
-
-		$output_file = sprintf("$output_prefix%05d.events", $file_counter);
-
-		die ("Cannot open $output_file for writing\n")
-		    unless open(OUTPUTFILE, '>', $output_file);
-	    }
-	}
-
-	$last_event = $event_number;
-    }
-
-    printf OUTPUTFILE "%10d %3d %6d %27.17e %27.17e %27.17e %27.17e %27.17e %27.17e %3d %27.17e %27.17e %27.17e %27.17e %27.17e \n", 
-    $event_counter, $particle_gen, $particle_type, $kinetic_energy, $stat_weight, $x_position, $y_position, $x_cosine, $y_cosine, $t_start, $total_energy, $x_primary, $y_primary, $z_primary, $t_primary;
-}
-
-close(INPUTFILE);
-close(OUTPUTFILE);
diff --git a/Generators/CosmicGenerator/python/CosmicGeneratorConfig.py b/Generators/CosmicGenerator/python/CosmicGeneratorConfig.py
index d61c88962c2b05508a5f09ded58f73adf284ae7a..c20529d3cc38c418da637eca326754f855e0683b 100644
--- a/Generators/CosmicGenerator/python/CosmicGeneratorConfig.py
+++ b/Generators/CosmicGenerator/python/CosmicGeneratorConfig.py
@@ -1,6 +1,4 @@
-
-#  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
-
+# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
 
 class CavernPropertyCalculator(object):
 
@@ -137,13 +135,13 @@ class CavernPropertyCalculator(object):
             else:
                 from AthenaCommon.AppMgr import theApp
                 GeoModelSvc = theApp.service('GeoModelSvc')
-            if (newSize <=  500000) : GeoModelSvc.CavernInfraVersionOverride = 'CavernInfra-04-Bedrock500'
-            elif (newSize <= 1000000) : GeoModelSvc.CavernInfraVersionOverride = 'CavernInfra-04-Bedrock1000'
-            elif (newSize <= 1500000) : GeoModelSvc.CavernInfraVersionOverride = 'CavernInfra-04-Bedrock1500'
-            elif (newSize <= 2000000) : GeoModelSvc.CavernInfraVersionOverride = 'CavernInfra-04-Bedrock2000'
-            elif (newSize <= 3000000) : GeoModelSvc.CavernInfraVersionOverride = 'CavernInfra-04-Bedrock3000'
-            elif (newSize <= 4000000) : GeoModelSvc.CavernInfraVersionOverride = 'CavernInfra-04-Bedrock4000'
-            elif (newSize <= 5000000) : GeoModelSvc.CavernInfraVersionOverride = 'CavernInfra-04-Bedrock5000'
+            if (newSize <=  500000) : GeoModelSvc.CavernInfraVersionOverride = 'CavernInfra-03-Bedrock500'
+            elif (newSize <= 1000000) : GeoModelSvc.CavernInfraVersionOverride = 'CavernInfra-03-Bedrock1000'
+            elif (newSize <= 1500000) : GeoModelSvc.CavernInfraVersionOverride = 'CavernInfra-03-Bedrock1500'
+            elif (newSize <= 2000000) : GeoModelSvc.CavernInfraVersionOverride = 'CavernInfra-03-Bedrock2000'
+            elif (newSize <= 3000000) : GeoModelSvc.CavernInfraVersionOverride = 'CavernInfra-03-Bedrock3000'
+            elif (newSize <= 4000000) : GeoModelSvc.CavernInfraVersionOverride = 'CavernInfra-03-Bedrock4000'
+            elif (newSize <= 5000000) : GeoModelSvc.CavernInfraVersionOverride = 'CavernInfra-03-Bedrock5000'
         else :
             print "No need to resize the bedrock for cosmic generation"
 
diff --git a/Generators/CosmicGenerator/share/CosmicSliceConfig.py b/Generators/CosmicGenerator/share/CosmicSliceConfig.py
index 2d61573e485446389b2c644dc4c4bab56e8905bb..61d5b5257610d50bf5ca0cead218f3bb66b37384 100644
--- a/Generators/CosmicGenerator/share/CosmicSliceConfig.py
+++ b/Generators/CosmicGenerator/share/CosmicSliceConfig.py
@@ -46,12 +46,12 @@ if (bedrockDX > 350000 or bedrockDZ > 350000) :
         GeoModelSvc = Configurable.allConfigurables.get('GeoModelSvc')
     else:
         GeoModelSvc = theApp.service('GeoModelSvc')
-    if (newSize <=  500000) : GeoModelSvc.CavernInfraVersionOverride = 'CavernInfra-04-Bedrock500'
-    elif (newSize <= 1000000) : GeoModelSvc.CavernInfraVersionOverride = 'CavernInfra-04-Bedrock1000'
-    elif (newSize <= 1500000) : GeoModelSvc.CavernInfraVersionOverride = 'CavernInfra-04-Bedrock1500'
-    elif (newSize <= 2000000) : GeoModelSvc.CavernInfraVersionOverride = 'CavernInfra-04-Bedrock2000'
-    elif (newSize <= 3000000) : GeoModelSvc.CavernInfraVersionOverride = 'CavernInfra-04-Bedrock3000'
-    elif (newSize <= 4000000) : GeoModelSvc.CavernInfraVersionOverride = 'CavernInfra-04-Bedrock4000'
-    elif (newSize <= 5000000) : GeoModelSvc.CavernInfraVersionOverride = 'CavernInfra-04-Bedrock5000'
+    if (newSize <=  500000) : GeoModelSvc.CavernInfraVersionOverride = 'CavernInfra-03-Bedrock500'
+    elif (newSize <= 1000000) : GeoModelSvc.CavernInfraVersionOverride = 'CavernInfra-03-Bedrock1000'
+    elif (newSize <= 1500000) : GeoModelSvc.CavernInfraVersionOverride = 'CavernInfra-03-Bedrock1500'
+    elif (newSize <= 2000000) : GeoModelSvc.CavernInfraVersionOverride = 'CavernInfra-03-Bedrock2000'
+    elif (newSize <= 3000000) : GeoModelSvc.CavernInfraVersionOverride = 'CavernInfra-03-Bedrock3000'
+    elif (newSize <= 4000000) : GeoModelSvc.CavernInfraVersionOverride = 'CavernInfra-03-Bedrock4000'
+    elif (newSize <= 5000000) : GeoModelSvc.CavernInfraVersionOverride = 'CavernInfra-03-Bedrock5000'
 else :
     print "No need to resize the bedrock for cosmic generation"
diff --git a/Generators/CosmicGenerator/src/CosmicGenerator.cxx b/Generators/CosmicGenerator/src/CosmicGenerator.cxx
index 7299b573f889b66ac8baf6b916d3d2bdd1df4583..c17c658686f97b1bb63c40635511119a347a4ac8 100644
--- a/Generators/CosmicGenerator/src/CosmicGenerator.cxx
+++ b/Generators/CosmicGenerator/src/CosmicGenerator.cxx
@@ -79,10 +79,7 @@ extern "C" float cosmicrndm_(int* /*dummy*/)
 
 //--------------------------------------------------------------------------
 CosmicGenerator::CosmicGenerator(const std::string& name,
-      ISvcLocator* pSvcLocator)
-  : GenModule(name,pSvcLocator)
-  , m_stopped_tminus(0.)
-  , m_stopped_tplus(0.)
+      ISvcLocator* pSvcLocator): GenModule(name,pSvcLocator)
 //--------------------------------------------------------------------------
 {
   //
diff --git a/Generators/Epos_i/src/Epos.cxx b/Generators/Epos_i/src/Epos.cxx
index 0644dd780cfdcb7254ce0189d6639929949fa245..3731ccad86b66cc02794321970801a926e716e69 100644
--- a/Generators/Epos_i/src/Epos.cxx
+++ b/Generators/Epos_i/src/Epos.cxx
@@ -209,7 +209,7 @@ StatusCode Epos::genInitialize()
   long int si1 = sip[0];
   long int si2 = sip[1];
 
-  int iSeed = si1%1000000000;     // FIXME ?
+  int iSeed = si1;     // FIXME ?
 
   // set up initial values
 
diff --git a/Generators/EvgenJobTransforms/python/EvgenConfig.py b/Generators/EvgenJobTransforms/python/EvgenConfig.py
index 49fc44a3528327b6859adc8e241ec62b00520583..a373b000bd400c33556296973393b291025ff909 100644
--- a/Generators/EvgenJobTransforms/python/EvgenConfig.py
+++ b/Generators/EvgenJobTransforms/python/EvgenConfig.py
@@ -1,4 +1,4 @@
-#  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
 
 ## Generators providing input events via the LHEF format (MC@NLO produces LHEF
 ## when used in connection with Herwig++, which is fine since this variable is
diff --git a/Generators/EvgenJobTransforms/python/evgenTrfArgs.py b/Generators/EvgenJobTransforms/python/evgenTrfArgs.py
index f812dfc1c93f45936b7001843a924b47169b3c67..f011371933a43bb37ac885e556a74298ef557af7 100644
--- a/Generators/EvgenJobTransforms/python/evgenTrfArgs.py
+++ b/Generators/EvgenJobTransforms/python/evgenTrfArgs.py
@@ -1,4 +1,4 @@
-#  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
 
 import PyJobTransforms.trfArgClasses as trfArgClasses
 
@@ -99,20 +99,4 @@ def addStdEvgenArgs(parser):
                         default=trfArgClasses.argInt(0, runarg=True),
                         type=trfArgClasses.argFactory(trfArgClasses.argInt, runarg=True))
 
-    parser.add_argument('--lheOnly', '--lheOnly', group='Evgen',
-                        default=trfArgClasses.argInt(0, runarg=True),
-                        type=trfArgClasses.argFactory(trfArgClasses.argInt, runarg=True),
-                        help='Set to 1 if Evgen file should be removed')
-
-    parser.add_argument("--localPath", group="Evgen",
-                        help="Name of local path to JOs",
-                        type=trfArgClasses.argFactory(trfArgClasses.argString, runarg=True))
 
-    parser.add_argument('--saveList', '--saveList', group='Evgen',
-                        help="a comma-separated list of files to be saved in output or a single digit if the whole output directory is to be saved",
-                        type=trfArgClasses.argFactory(trfArgClasses.argSubstepList, runarg=True))
-
-    parser.add_argument('--cleanOut', '--cleanOut', group='Evgen',
-                        default=trfArgClasses.argInt(0, runarg=True),
-                        type=trfArgClasses.argFactory(trfArgClasses.argInt, runarg=True),
-                        help='Set to any digit !=0 if the output files should be cleaned up --saveList may help to save selected files')
diff --git a/Generators/EvgenJobTransforms/scripts/AfterBurner_tf.py b/Generators/EvgenJobTransforms/scripts/AfterBurner_tf.py
index e2336eab9e4c107ca204337d4f0b773a6006ac2b..5880ed1849dd134271bb3ed80ccc31134721fc9a 100755
--- a/Generators/EvgenJobTransforms/scripts/AfterBurner_tf.py
+++ b/Generators/EvgenJobTransforms/scripts/AfterBurner_tf.py
@@ -1,7 +1,7 @@
-#  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
-
 #! /usr/bin/env python
 
+# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+
 """
 Run event simulation and produce an EVNT file.
 """
diff --git a/Generators/EvgenJobTransforms/scripts/EvtGenFromEVNT_tf.py b/Generators/EvgenJobTransforms/scripts/EvtGenFromEVNT_tf.py
index 8c47ffb87e77d69a49ede6365fc97e04a26fa861..cca31344052b1eb994e6dca0315f4272e4f04875 100755
--- a/Generators/EvgenJobTransforms/scripts/EvtGenFromEVNT_tf.py
+++ b/Generators/EvgenJobTransforms/scripts/EvtGenFromEVNT_tf.py
@@ -1,7 +1,7 @@
-#  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
-
 #! /usr/bin/env python
 
+# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+
 import sys
 import time
 
diff --git a/Generators/EvgenJobTransforms/scripts/Generate_tf.py b/Generators/EvgenJobTransforms/scripts/Generate_tf.py
index 6c37efaa6d737db8fa3b06be282a8117777d409b..5c8d5fe835468d94261d6518fedb8351ef909202 100755
--- a/Generators/EvgenJobTransforms/scripts/Generate_tf.py
+++ b/Generators/EvgenJobTransforms/scripts/Generate_tf.py
@@ -1,7 +1,7 @@
-#  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
-
 #! /usr/bin/env python
 
+# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+
 """
 Run event simulation and produce an EVNT file.
 """
@@ -18,7 +18,7 @@ import PyJobTransforms.trfArgClasses as trfArgClasses
 
 ## Prodsys1 hack...
 # TODO: Remove!
-ListOfDefaultPositionalKeys=['--AMIConfig', '--AMITag', '--argJSON', '--asetup', '--athena', '--athenaMPMergeTargetSize', '--athenaopts', '--attempt', '--checkEventCount', '--command', '--dumpJSON', '--dumpPickle', '--ecmEnergy', '--env', '--eventAcceptanceEfficiency', '--evgenJobOpts', '--execOnly', '--fileValidation', '--firstEvent', '--ignoreErrors', '--ignoreFiles', '--ignorePatterns', '--imf', '--inputEVNT_PreFile', '--inputFileValidation', '--inputGenConfFile', '--inputGeneratorFile', '--jobConfig', '--jobid', '--maxEvents', '--orphanKiller', '--outputEVNTFile', '--outputEVNT_PreFile', '--outputFileValidation', '--outputNTUP_TRUTHFile', '--outputTXTFile', '--parallelFileValidation', '--postExec', '--postInclude', '--preExec', '--preInclude', '--printEvts', '--randomSeed', '--reportName', '--reportType', '--rivetAnas', '--runNumber', '--showGraph', '--showPath', '--showSteps', '--skipEvents', '--skipFileValidation', '--skipInputFileValidation', '--skipOutputFileValidation', '--steering', '--taskid', '--tcmalloc', '--valgrind', '--valgrindbasicopts', '--valgrindextraopts', '--lheOnly', '--localPath', '--cleanOut', '--saveList']
+ListOfDefaultPositionalKeys=['--AMIConfig', '--AMITag', '--argJSON', '--asetup', '--athena', '--athenaMPMergeTargetSize', '--athenaopts', '--attempt', '--checkEventCount', '--command', '--dumpJSON', '--dumpPickle', '--ecmEnergy', '--env', '--eventAcceptanceEfficiency', '--evgenJobOpts', '--execOnly', '--fileValidation', '--firstEvent', '--ignoreErrors', '--ignoreFiles', '--ignorePatterns', '--imf', '--inputEVNT_PreFile', '--inputFileValidation', '--inputGenConfFile', '--inputGeneratorFile', '--jobConfig', '--jobid', '--maxEvents', '--orphanKiller', '--outputEVNTFile', '--outputEVNT_PreFile', '--outputFileValidation', '--outputNTUP_TRUTHFile', '--outputTXTFile', '--parallelFileValidation', '--postExec', '--postInclude', '--preExec', '--preInclude', '--printEvts', '--randomSeed', '--reportName', '--reportType', '--rivetAnas', '--runNumber', '--showGraph', '--showPath', '--showSteps', '--skipEvents', '--skipFileValidation', '--skipInputFileValidation', '--skipOutputFileValidation', '--steering', '--taskid', '--tcmalloc', '--valgrind', '--valgrindbasicopts', '--valgrindextraopts']
 
 class EvgenExecutor(athenaExecutor):
     "Specialised trf executor class for event generation jobs"
@@ -132,16 +132,9 @@ class EvgenExecutor(athenaExecutor):
             else:    
                 msg.info('ATLAS_SW_BASE path: %s' %sw_base)
 
-            local_path = None
-            if ("localPath" in self._trf.argdict ):
-                local_path = self._trf.argdict["localPath"].value
-                print("local path",local_path)
             cvmfs_path = os.path.join(sw_base, "atlas.cern.ch")
             
-            if ((local_path is not None) and (os.path.exists(local_path))) :
-              mk_jo_proxy(local_path, "MC15JobOptions","_joproxy15")
-              print("JO fragments taken from local path i.e. ",local_path)             
-            elif os.path.exists(cvmfs_path):
+            if os.path.exists(cvmfs_path):
                 # TODO: Make the package name configurable
                 if "MC14" in str(joparam):
                     cvmfs_mc14 = os.path.join(cvmfs_path, "repo/sw/Generators/MC14JobOptions/latest/")
@@ -161,29 +154,10 @@ class EvgenExecutor(athenaExecutor):
 
         ## Expand tarball input event and generator conf files, if provided
         if "inputGeneratorFile" in self._trf.argdict:
-#            expand_if_archive(self._trf.argdict["inputGeneratorFile"].value)
-            myinputfiles = self._trf.argdict["inputGeneratorFile"].value
-            genInputFiles = myinputfiles.split(',')
-            for file in genInputFiles:
-               expand_if_archive(file)
+            expand_if_archive(self._trf.argdict["inputGeneratorFile"].value)
         if "inputGenConfFile" in self._trf.argdict:
             expand_if_archive(self._trf.argdict["inputGenConfFile"].value)
 
-def move_files(main_dir,tmp_dir,whitelist):
-    files = os.listdir(tmp_dir)
-    print("list of files ",files)
-    print("white list ",whitelist)    
-    files.sort()
-    for f in files:
-       for i in whitelist:
-            if i in f:
-                src = tmp_dir+"/"+f
-                dest = main_dir+"/"+f
-#                print("src ",src)
-#                print("dest ",dest)
-                os.rename(src,dest)
-                break
-
 
 def getTransform():
     exeSet = set()
@@ -201,65 +175,11 @@ def getTransform():
 @sigUsrStackTrace
 def main():
     msg.info("This is %s" % sys.argv[0])
-    main_dir = os.getcwd()
     trf = getTransform()
     trf.parseCmdLineArgs(sys.argv[1:])
-#    print("main ",main_dir)
-    if (("cleanOut" in trf.argdict) and (trf.argdict["cleanOut"].value != 0)):
-      name_tmpdir = "tmprun"
-      tmp_dir = os.path.join(main_dir, name_tmpdir)
-#    print("tmpdir ",tmp_dir)
-      if os.path.isdir(tmp_dir):
-         shutil.rmtree(tmp_dir, ignore_errors=True)
-      os.mkdir("tmprun")
-      os.chdir("tmprun")
-      tmp_dir = os.getcwd()
-      whitelist_in = ['MC','group','TXT']
-      move_files(tmp_dir,main_dir,whitelist_in)
-      
-#    trf = getTransform()
-#    trf.parseCmdLineArgs(sys.argv[1:])
     trf.execute()
     trf.generateReport()
     msg.info("%s stopped at %s, trf exit code %d" % (sys.argv[0], time.asctime(), trf.exitCode))
-
-
-    if "outputTXTFile" in trf.argdict:
-      whitelist_out.append('TXT')
-
-# read files/dirs that should be saved and if present in cwd - remove
-
-    if (("cleanOut" in trf.argdict) and (trf.argdict["cleanOut"].value!=0)):
-#       print("mamy cleanOut !!!",trf.argdict["cleanOut"].value) 
-       whitelist_out = ['log.generate','.root']
-       if "saveList" in trf.argdict:
-         saveList_dic= trf.argdict["saveList"].value
-         saveList_str= str(saveList_dic)
-         saveList_str=saveList_str[10:-3]
-         saveList= saveList_str.split(",")
-         for item in saveList:
-           test_ex = os.path.join(main_dir,str(item))
-           if os.path.isdir(test_ex):
-             shutil.rmtree(test_ex, ignore_errors=True)
-#           print("directory removed ", test_ex)
-           elif os.path.isfile(test_ex):
-             os.remove(test_ex)
-#           print("file removed ", test_ex)        
-#       new_list = list(list(int(a) for a in b) for b in T1 if a.isdigit())
-         if not saveList[0].isdigit():
-             whitelist_out=whitelist_out+saveList 
-
-       move_files(main_dir,tmp_dir,whitelist_out)
-       os.chdir(main_dir)
-       if "saveList" not in trf.argdict:
-         shutil.rmtree(tmp_dir, ignore_errors=True)
-#    elif firstSaveList!=1:
-       elif not saveList[0].isdigit():
-         shutil.rmtree(tmp_dir, ignore_errors=True)  
-
-    if (("lheOnly" in trf.argdict ) and (trf.argdict["lheOnly"].value == 1)):
-          outputName = ''.join(trf.argdict["outputEVNTFile"].value)
-          os.remove(outputName)
     sys.exit(trf.exitCode)
 
 
diff --git a/Generators/EvgenJobTransforms/scripts/Rivet_tf.py b/Generators/EvgenJobTransforms/scripts/Rivet_tf.py
index bdefb58466914a101419032e22f3da2cba846774..fc5319a96ce5f66c50d7ffc1ed602ea47e7a26b0 100755
--- a/Generators/EvgenJobTransforms/scripts/Rivet_tf.py
+++ b/Generators/EvgenJobTransforms/scripts/Rivet_tf.py
@@ -1,7 +1,7 @@
-#  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
-
 #! /usr/bin/env python
 
+# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+
 """
 Take an input EVNT file and run Rivet on it
 """
diff --git a/Generators/EvgenJobTransforms/share/Generate_TruthJets.py b/Generators/EvgenJobTransforms/share/Generate_TruthJets.py
index 2b7a9845ad42485f3af64ecba2192fba927a6136..2c9eec6fed4cf89893b21c3b2d3d302281c875b2 100644
--- a/Generators/EvgenJobTransforms/share/Generate_TruthJets.py
+++ b/Generators/EvgenJobTransforms/share/Generate_TruthJets.py
@@ -1,6 +1,3 @@
-
-#  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
-
 ## Configure and schedule jet finding algorithms for the jet 
 ## containers defined in the user's JO fragment
 ##
@@ -9,14 +6,12 @@
 
 
 # Convert HepMC event record to xAODTruth for use by jet tools
-print 'bedzie konwersja !!'
 from xAODTruthCnv.xAODTruthCnvConf import xAODMaker__xAODTruthCnvAlg
 if not hasattr(prefiltSeq, 'xAODCnv'):
-    prefiltSeq += xAODMaker__xAODTruthCnvAlg('xAODCnv',WriteTruthMetaData=False)
+    prefiltSeq += xAODMaker__xAODTruthCnvAlg('xAODCnv')
 prefiltSeq.xAODCnv.AODContainerName = 'GEN_EVENT'
 
 # Turn off jet tools specific to detector-level jets
-print 'bedzie wylaczenie !!'
 from JetRec.JetRecFlags import jetFlags
 jetFlags.useTracks = False
 jetFlags.eventShapeTools = []
@@ -28,7 +23,6 @@ else: raise NameError('jetFlags has no attribute usePflow or usePFlow')
 jetFlags.useCaloQualityTool = False
 
 # Attach jet algorithms
-print 'podlacz algorytmy jetowe !!'
 from JetRec.JetAlgorithm import addJetRecoToAlgSequence
 if not hasattr(prefiltSeq, 'jetalg'):
     addJetRecoToAlgSequence(prefiltSeq)
diff --git a/Generators/EvgenJobTransforms/share/Generate_ecmenergies.py b/Generators/EvgenJobTransforms/share/Generate_ecmenergies.py
index f9280d4527a77ba6c9c4bbd61a72f3b7ab726e6e..0eeb8f46a67aa991780ed73bb27a65e6ea1137a0 100644
--- a/Generators/EvgenJobTransforms/share/Generate_ecmenergies.py
+++ b/Generators/EvgenJobTransforms/share/Generate_ecmenergies.py
@@ -1,7 +1,3 @@
-
-#  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
-
-
 ## Propagate energy argument to the generators
 # TODO: Standardise energy setting in the GenModule interface
 
@@ -34,8 +30,8 @@ elif 'Herwig' in evgenConfig.generators:
     genSeq.Herwig.HerwigCommand.append("beam2energy %s" % eBeam)
 elif 'Herwigpp' in evgenConfig.generators:
     genSeq.Herwigpp.Commands.append("set /Herwig/Generators/LHCGenerator:EventHandler:LuminosityFunction:Energy %s" % eCM)
-#elif 'Herwig7' in evgenConfig.generators:
-#    genSeq.Herwig7.Commands.append("set /Herwig/Generators/LHCGenerator:EventHandler:LuminosityFunction:Energy %s" % eCM)
+elif 'Herwig7' in evgenConfig.generators:
+    genSeq.Herwig7.Commands.append("set /Herwig/Generators/LHCGenerator:EventHandler:LuminosityFunction:Energy %s" % eCM)
 elif 'Sherpa' in evgenConfig.generators:
     genSeq.Sherpa_i.Parameters.append("BEAM_ENERGY_1=%s" % eBeam)
     genSeq.Sherpa_i.Parameters.append("BEAM_ENERGY_2=%s" % eBeam)
diff --git a/Generators/EvgenJobTransforms/share/Generate_randomseeds.py b/Generators/EvgenJobTransforms/share/Generate_randomseeds.py
index 430c60cac3f0559c6de9910ca93072071280b4fa..c6087a12d1a8f90a7a4d75d2073eb69b6d7182ba 100644
--- a/Generators/EvgenJobTransforms/share/Generate_randomseeds.py
+++ b/Generators/EvgenJobTransforms/share/Generate_randomseeds.py
@@ -1,7 +1,3 @@
-
-#  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
-
-
 ## Set random seeds depending on used generators
 
 genseeds = {
diff --git a/Generators/EvgenJobTransforms/share/skeleton.ABtoEVGEN.py b/Generators/EvgenJobTransforms/share/skeleton.ABtoEVGEN.py
index 72650afe7cdea5ad43c7c168d3f43e7359677d52..7cc88f6d3cc5f13ee524bc774be692d0961aba9b 100644
--- a/Generators/EvgenJobTransforms/share/skeleton.ABtoEVGEN.py
+++ b/Generators/EvgenJobTransforms/share/skeleton.ABtoEVGEN.py
@@ -1,6 +1,3 @@
-
-#  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
-
 """Functionality core of the Generate_tf transform"""
 
 ##==============================================================
@@ -255,21 +252,16 @@ if joparts[0].startswith("MC"): #< if this is an "official" JO
     expectedgenpart = expectedgenpart.replace("HerwigJimmy", "Herwig")
     def _norm(s):
         # TODO: add EvtGen to this normalization for MC14?
-        return s.replace("Photospp", "").replace("Photos", "").replace("TauolaPP", "").replace("Tauolapp", "").replace("Tauola", "")
+        return s.replace("Photospp", "").replace("Photos", "").replace("Tauola", "").replace("Tauolapp", "").replace("TauolaPP", "")
     def _norm2(s):
         return s.replace("Py", "Pythia").replace("MG","MadGraph").replace("Ph","Powheg").replace("Hpp","Herwigpp").replace("H7","Herwig7").replace("Sh","Sherpa").replace("Ag","Alpgen").replace("EG","EvtGen").replace("PG","ParticleGun")
 
     def _short2(s):
          return s.replace("Pythia","Py").replace("MadGraph","MG").replace("Powheg","Ph").replace("Herwigpp","Hpp").replace("Herwig7","H7").replace("Sherpa","Sh").replace("Alpgen","Ag").replace("EvtGen","EG").replace("PG","ParticleGun")
- 
-    if genpart != _norm(expectedgenpart)  and _norm2(genpart) != _norm(expectedgenpart):
-        evgenLog.error("Expected first part of JO name to be '%s' or '%s', but found '%s'" % (_norm(expectedgenpart), _norm(_short2(expectedgenpart)), genpart))
-        evgenLog.error("gennames '%s' " %(expectedgenpart))
-        sys.exit(1)
 
-#    if genpart != expectedgenpart and _norm(genpart) != _norm(expectedgenpart) and _norm2(genpart) != expectedgenpart and _norm2(genpart) != _norm(expectedgenpart):
-#        evgenLog.error("Expected first part of JO name to be '%s' or '%s' or '%s', but found '%s'" % (_norm(expectedgenpart), expectedgenpart, _short2(expectedgenpart), genpart))
-#        sys.exit(1) 
+    if genpart != expectedgenpart and _norm(genpart) != _norm(expectedgenpart) and _norm2(genpart) != expectedgenpart and _norm2(genpart) != _norm(expectedgenpart):
+        evgenLog.error("Expected first part of JO name to be '%s' or '%s' or '%s', but found '%s'" % (_norm(expectedgenpart), expectedgenpart, _short2(expectedgenpart), genpart))
+        sys.exit(1) 
 
     del _norm
     ## Check if the tune/PDF part is needed, and if so whether it's present
@@ -281,38 +273,17 @@ if joparts[0].startswith("MC"): #< if this is an "official" JO
 
 ## Check that the evgenConfig.minevents setting is acceptable
 ## minevents defines the production event sizes and must be sufficiently "round"
-if hasattr(runArgs,'inputGeneratorFile') and ',' in runArgs.inputGeneratorFile:   
-   multiInput = runArgs.inputGeneratorFile.count(',')+1
-else:
-   multiInput = 0
 if evgenConfig.minevents < 1:
     raise RunTimeError("evgenConfig.minevents must be at least 1")
 else:
-    allowed_minevents_lt1000 = [1, 2, 5, 10, 20, 25, 50, 100, 200, 500, 1000]
+    allowed_minevents_lt1000 = [1, 2, 5, 10, 20, 25, 50, 100, 200, 500]
     msg = "evgenConfig.minevents = %d: " % evgenConfig.minevents
-    if multiInput !=0 :
-        dummy_minevents = evgenConfig.minevents*(multiInput)
-        evgenLog.info('Replacing input minevents '+str(evgenConfig.minevents)+' with calculated '+str(dummy_minevents) + ' rounded to ' + str(int(round(dummy_minevents))))
-        evgenConfig.minevents = dummy_minevents
-        rest1000 = evgenConfig.minevents % 1000
-        if multiInput !=0 :
-            rounding=1
-            if rest1000 < 1000-rest1000:
-                evgenLog.info('Replacing input minevents '+str(evgenConfig.minevents)+' with calculated '+str(evgenConfig.minevents-rest1000))
-                evgenConfig.minevents = evgenConfig.minevents-rest1000
-            else:
-                evgenLog.info('Replacing input minevents '+str(evgenConfig.minevents)+' with calculated '+str(evgenConfig.minevents-rest1000+1000))
-                evgenConfig.minevents = evgenConfig.minevents-rest1000+1000
-        else:    
-           msg += "minevents in range >= 1000 must be a multiple of 1000"
-           raise RuntimeError(msg)
+    if evgenConfig.minevents >= 1000 and evgenConfig.minevents % 1000 != 0:
+        msg += "minevents in range >= 1000 must be a multiple of 1000"
+        raise RuntimeError(msg)
     elif evgenConfig.minevents < 1000 and evgenConfig.minevents not in allowed_minevents_lt1000:
-        if multiInput !=0:
-           rounding=1 
-           evgenConfig.minevents=min(allowed_minevents_lt1000,key=lambda x:abs(x-evgenConfig.minevents))
-        else:
-           msg += "minevents in range <= 1000 must be one of %s" % allowed_minevents_lt1000
-           raise RuntimeError(msg)
+        msg += "minevents in range < 1000 must be one of %s" % allowed_minevents_lt1000
+        raise RuntimeError(msg)
 
 ## Check that the keywords are in the list of allowed words (and exit if processing an official JO)
 if evgenConfig.keywords:
diff --git a/Generators/EvgenJobTransforms/share/skeleton.EVGENtoRivet.py b/Generators/EvgenJobTransforms/share/skeleton.EVGENtoRivet.py
index ca3c0fef61ffaf016a67e325874e18fbae082971..ba0ce1b485ddc4baea5e40e01db49acdca95b832 100644
--- a/Generators/EvgenJobTransforms/share/skeleton.EVGENtoRivet.py
+++ b/Generators/EvgenJobTransforms/share/skeleton.EVGENtoRivet.py
@@ -1,6 +1,3 @@
-
-#  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
-
 """Functionality core of the Rivet_tf transform"""
 
 ##==============================================================
diff --git a/Generators/EvgenJobTransforms/share/skeleton.EvtGenFromEVNT.py b/Generators/EvgenJobTransforms/share/skeleton.EvtGenFromEVNT.py
index 70be345f790ee03b51b3951bd467be86a4f162ef..68fc68f19c89e380a3ff6a5e621e415fb020f26a 100644
--- a/Generators/EvgenJobTransforms/share/skeleton.EvtGenFromEVNT.py
+++ b/Generators/EvgenJobTransforms/share/skeleton.EvtGenFromEVNT.py
@@ -1,5 +1,3 @@
-#  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
-
 #############################
 ## basic jobO configuration
 include("PATJobTransforms/CommonSkeletonJobOptions.py")
diff --git a/Generators/EvgenJobTransforms/share/skeleton.GENtoEVGEN.py b/Generators/EvgenJobTransforms/share/skeleton.GENtoEVGEN.py
index 35c1a2c089c39be112b27c4fdee6d7cd130394a3..a4847fbe2e20cd83281cb75663c609f1c5b126d1 100644
--- a/Generators/EvgenJobTransforms/share/skeleton.GENtoEVGEN.py
+++ b/Generators/EvgenJobTransforms/share/skeleton.GENtoEVGEN.py
@@ -1,6 +1,3 @@
-
-#  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
-
 """Functionality core of the Generate_tf transform"""
 
 ##==============================================================
@@ -9,7 +6,7 @@
 
 ## Create sequences for generators, clean-up algs, filters and analyses
 ## and import standard framework objects with standard local scope names
-import os, re, string, subprocess
+import os, re, string
 import AthenaCommon.AlgSequence as acas
 import AthenaCommon.AppMgr as acam
 from AthenaCommon.AthenaCommonFlags import jobproperties
@@ -123,10 +120,10 @@ if not hasattr(postSeq, "CopyEventWeight"):
 # TODO: Rewrite in Python?
 from EvgenProdTools.EvgenProdToolsConf import CountHepMC
 svcMgr.EventSelector.FirstEvent = runArgs.firstEvent
-theApp.EvtMax = -1
+
 # This is necessary for athenaMP
-#if hasattr(runArgs, "maxEvents"):
-#  theApp.EvtMax = runArgs.maxEvents
+if hasattr(runArgs, "maxEvents"):
+  theApp.EvtMax = runArgs.maxEvents
 
 if not hasattr(postSeq, "CountHepMC"):
     postSeq += CountHepMC()
@@ -134,7 +131,7 @@ if not hasattr(postSeq, "CountHepMC"):
 
 postSeq.CountHepMC.FirstEvent = runArgs.firstEvent
 postSeq.CountHepMC.CorrectHepMC = False
-postSeq.CountHepMC.CorrectEventID = False
+postSeq.CountHepMC.CorrectEventID = True
 
 ## Print out the contents of the first 5 events (after filtering)
 # TODO: Allow configurability from command-line/exec/include args
@@ -263,23 +260,17 @@ if joparts[0].startswith("MC"): #< if this is an "official" JO
     expectedgenpart = expectedgenpart.replace("HerwigJimmy", "Herwig")
     def _norm(s):
         # TODO: add EvtGen to this normalization for MC14?
-        return s.replace("Photospp", "").replace("Photos", "").replace("TauolaPP", "").replace("Tauolapp", "").replace("Tauola", "")
+        return s.replace("Photospp", "").replace("Photos", "").replace("Tauola", "").replace("Tauolapp", "").replace("TauolaPP", "")
     def _norm2(s):
         return s.replace("Py", "Pythia").replace("MG","MadGraph").replace("Ph","Powheg").replace("Hpp","Herwigpp").replace("H7","Herwig7").replace("Sh","Sherpa").replace("Ag","Alpgen").replace("EG","EvtGen").replace("PG","ParticleGun")
         
     def _short2(s):
          return s.replace("Pythia","Py").replace("MadGraph","MG").replace("Powheg","Ph").replace("Herwigpp","Hpp").replace("Herwig7","H7").replace("Sherpa","Sh").replace("Alpgen","Ag").replace("EvtGen","EG").replace("PG","ParticleGun")
      
-#    if genpart != expectedgenpart and _norm(genpart) != _norm(expectedgenpart) and _norm2(genpart) != expectedgenpart and _norm2(genpart) != _norm(expectedgenpart):
-#        evgenLog.error("Expected first part of JO name to be '%s' or '%s' or '%s', but found '%s'" % (_norm(expectedgenpart), expectedgenpart, _short2(expectedgenpart), genpart))
-#        evgenLog.error("gennames '%s' " %(expectedgenpart))
-#        sys.exit(1)
-
-    if genpart != _norm(expectedgenpart)  and _norm2(genpart) != _norm(expectedgenpart):
-        evgenLog.error("Expected first part of JO name to be '%s' or '%s', but found '%s'" % (_norm(expectedgenpart), _norm(_short2(expectedgenpart)), genpart))
+    if genpart != expectedgenpart and _norm(genpart) != _norm(expectedgenpart) and _norm2(genpart) != expectedgenpart and _norm2(genpart) != _norm(expectedgenpart):
+        evgenLog.error("Expected first part of JO name to be '%s' or '%s' or '%s', but found '%s'" % (_norm(expectedgenpart), expectedgenpart, _short2(expectedgenpart), genpart))
         evgenLog.error("gennames '%s' " %(expectedgenpart))
         sys.exit(1)
-
     del _norm
     ## Check if the tune/PDF part is needed, and if so whether it's present
     if not gens_notune(gennames) and len(jo_physshortparts) < 3:
@@ -297,50 +288,20 @@ if gen_require_steering(gennames):
 
 ## Check that the evgenConfig.minevents setting is acceptable
 ## minevents defines the production event sizes and must be sufficiently "round"
-rounding = 0
-if hasattr(runArgs,'inputGeneratorFile') and ',' in runArgs.inputGeneratorFile:   multiInput = runArgs.inputGeneratorFile.count(',')+1
-else:
-   multiInput = 0
-   
 if evgenConfig.minevents < 1:
     raise RunTimeError("evgenConfig.minevents must be at least 1")
 else:
-    allowed_minevents_lt1000 = [1, 2, 5, 10, 20, 25, 50, 100, 200, 500, 1000]
+    allowed_minevents_lt1000 = [1, 2, 5, 10, 20, 25, 50, 100, 200, 500]
     msg = "evgenConfig.minevents = %d: " % evgenConfig.minevents
-    if multiInput !=0 :
-        dummy_minevents = evgenConfig.minevents*(multiInput)
-        evgenLog.info('Replacing input minevents '+str(evgenConfig.minevents)+' with calculated '+str(dummy_minevents))
-        evgenConfig.minevents = dummy_minevents
-
     if evgenConfig.minevents >= 1000 and evgenConfig.minevents % 1000 != 0:
-        rest1000 = evgenConfig.minevents % 1000
-        if multiInput !=0 :
-            rounding=1
-            if rest1000 < 1000-rest1000:
-                evgenLog.info('Replacing minevents '+str(evgenConfig.minevents)+' with roundeded '+str(evgenConfig.minevents-rest1000))
-                evgenConfig.minevents = evgenConfig.minevents-rest1000
-            else:
-                evgenLog.info('Replacing input minevents '+str(evgenConfig.minevents)+' with calculated '+str(evgenConfig.minevents-rest1000+1000))
-                evgenConfig.minevents = evgenConfig.minevents-rest1000+1000
-        else:    
-           msg += "minevents in range >= 1000 must be a multiple of 1000"
-           raise RuntimeError(msg)
+        msg += "minevents in range >= 1000 must be a multiple of 1000"
+        raise RuntimeError(msg)
     elif evgenConfig.minevents < 1000 and evgenConfig.minevents not in allowed_minevents_lt1000:
-        if multiInput !=0:
-           rounding=1
-#           minimum_list = [abs(variable - evgenConfig.minevents) for variable in allowed_minevents_lt1000]
-#           from operator import itemgetter
-#           evgenLog.info("Minimum list: %s" % minimum_list)
-#           evgenLog.info("index of the min. value: " + str(min(enumerate(minimum_list), key=itemgetter(1))[0]) + " and the value is: " + str(allowed_minevents_lt1000[min(enumerate(minimum_list), key=itemgetter(1))[0]]))
-           round_minevents=min(allowed_minevents_lt1000,key=lambda x:abs(x-evgenConfig.minevents))
-           evgenLog.info('Replacing minevents lt 1000 '+str(evgenConfig.minevents)+' with rounded '+str(round_minevents))
-           evgenConfig.minevents=round_minevents
-        else:
-           msg += "minevents in range <= 1000 must be one of %s" % allowed_minevents_lt1000
-           raise RuntimeError(msg)
-#    else:
-    postSeq.CountHepMC.RequestedOutput = evgenConfig.minevents if runArgs.maxEvents == -1 or rounding==1 else runArgs.maxEvents
-    evgenLog.info('Requested output events '+str(postSeq.CountHepMC.RequestedOutput))
+        msg += "minevents in range < 1000 must be one of %s" % allowed_minevents_lt1000
+        raise RuntimeError(msg)
+    else:
+        postSeq.CountHepMC.RequestedOutput = evgenConfig.minevents if runArgs.maxEvents == -1 else runArgs.maxEvents
+
 
 ## Check that the keywords are in the list of allowed words (and exit if processing an official JO)
 if evgenConfig.keywords:
@@ -513,54 +474,6 @@ def find_unique_file(pattern):
         raise RuntimeError("More than one '%s' file found" % pattern)
     return files[0]
 
-# This function merges a list of input LHE file to make one outputFile.  The header is taken from the first
-# file, but the number of events is updated to equal the total number of events in all the input files
-def merge_lhe_files(listOfFiles,outputFile):
-    if(os.path.exists(outputFile)):
-      print "outputFile ",outputFile," already exists.  Will rename to ",outputFile,".OLD"
-      os.rename(outputFile,outputFile+".OLD")
-    output = open(outputFile,'w')
-    holdHeader = ""
-    nevents=0
-    for file in listOfFiles:
-       cmd = "grep /event "+file+" | wc -l"
-       nevents+=int(subprocess.check_output(cmd,stderr=subprocess.STDOUT,shell=True))
-
-    for file in listOfFiles:
-       inHeader = True
-       header = ""
-       print "*** Starting file ",file
-       for line in open(file,"r"):
-##        Reading first event signals that we are done with all the header information
-##        Using this approach means the script will properly handle any metadata stored
-##        at the beginning of the file.  Note:  aside from the number of events, no metadata
-##        is updated after the first header is read (eg the random number seed recorded will be
-##        that of the first file.
-          if("<event" in line and inHeader):
-             inHeader = False
-             if(len(holdHeader)<1):
-                holdHeader = header
-                output.write(header)
-##        each input file ends with "</LesHouchesEvents>".  We don't want to write this out until all
-##        the files have been read.  The elif below writes out all the events.
-          elif(not inHeader and not ("</LesHouchesEvents>" in line)):
-              output.write(line)
-          if(inHeader):
-##           Format for storing number of events different in MG and Powheg 
-             if("nevents" in line):
-##              MG5 format is "n = nevents"
-                tmp = line.split("=")
-                line = line.replace(tmp[0],str(nevents))
-             elif("numevts" in line):
-##              Powheg format is numevts n
-                tmp = line.split(" ")
-                nnn = str(nevents)
-                line = line.replace(tmp[1],nnn)
-             header+=line
-    output.write("</LesHouchesEvents>")
-    output.close()
-
-
 def mk_symlink(srcfile, dstfile):
     "Make a symlink safely"
     if dstfile:
@@ -580,42 +493,13 @@ if eventsFile or datFile:
     if evgenConfig.inputfilecheck and not re.search(evgenConfig.inputfilecheck, runArgs.inputGeneratorFile):
         raise RuntimeError("inputGeneratorFile=%s is incompatible with inputfilecheck '%s' in %s" %
                            (runArgs.inputGeneratorFile, evgenConfig.inputfilecheck, runArgs.jobConfig))
-#    inputroot = os.path.basename(runArgs.inputGeneratorFile).split("._")[0]
+    inputroot = os.path.basename(runArgs.inputGeneratorFile).split("._")[0]
     if datFile:
-#        inputroot = os.path.basename(runArgs.inputGeneratorFile).split("._")[0]
-        inputroot = os.path.basename(runArgs.inputGeneratorFile).split(".tar.")[0]
         realDatFile = find_unique_file('*%s*.dat' % inputroot)
         mk_symlink(realDatFile, datFile)
     if eventsFile:
-#        realEventsFile = find_unique_file('*%s.*.ev*ts' % inputroot)
-#        mk_symlink(realEventsFile, eventsFile)
-        myinputfiles = runArgs.inputGeneratorFile
-        genInputFiles = myinputfiles.split(',')
-        numberOfFiles = len(genInputFiles)
-        # if there is a single file, make a symlink.  If multiple files, merge them into one output eventsFile
-        if(numberOfFiles<2):
-#           inputroot = os.path.basename(runArgs.inputGeneratorFile).split("._")[0]
-           inputroot = os.path.basename(runArgs.inputGeneratorFile).split(".tar.")[0]
-           realEventsFile = find_unique_file('*%s.*ev*ts' % inputroot)
-           mk_symlink(realEventsFile, eventsFile)
-        else:
-           allFiles = []
-           for file in genInputFiles:
-#             Since we can have multiple files from the same task, inputroot must include more of the filename
-#             to make it unique
-#              input0 = os.path.basename(file).split("._")[0]
-#              input1 = (os.path.basename(file).split("._")[1]).split(".")[0]
-#              inputroot = input0+"._"+input1
-              inputroot = os.path.basename(file).split(".tar.")[0]
-#              print "inputroot ",inputroot
-              realEventsFile = find_unique_file('*%s.*ev*ts' % inputroot)
-#             The only input format where merging is permitted is LHE
-              with open(realEventsFile, 'r') as f:
-                 first_line = f.readline()
-                 if(not ("LesHouche" in first_line)):
-                    raise RuntimeError("%s is NOT a LesHouche file" % realEventsFile)
-                 allFiles.append(realEventsFile)
-           merge_lhe_files(allFiles,eventsFile)
+        realEventsFile = find_unique_file('*%s.*.ev*ts' % inputroot)
+        mk_symlink(realEventsFile, eventsFile)
 else:
     if hasattr(runArgs, "inputGeneratorFile") and runArgs.inputGeneratorFile != "NONE":
         raise RuntimeError("inputGeneratorFile arg specified for %s, but generators %s do not require an input file" %
diff --git a/Generators/EvgenJobTransforms/test/EvgenJobTransforms_TestConfiguration.xml b/Generators/EvgenJobTransforms/test/EvgenJobTransforms_TestConfiguration.xml
index f75b771c4553f75ee323677b01b61af96ee27705..84b51db3ee75899b6a2da24370284837c4b4f87d 100644
--- a/Generators/EvgenJobTransforms/test/EvgenJobTransforms_TestConfiguration.xml
+++ b/Generators/EvgenJobTransforms/test/EvgenJobTransforms_TestConfiguration.xml
@@ -54,30 +54,18 @@
       <timelimit>15</timelimit>
       <prescript>source ${ATN_PACKAGE}/test/setup_testenv</prescript>
     </TEST>
-
-    <TEST name="Py8TauolaPPZtautau" type="script" suite="EvgenJobTransforms-Core">
-      <doc>Tests a Pythia8 Z->tautau job, with Photos++, Tauola++ and EG</doc>
-      <classification>
-        <displayClass>OfflineValidation</displayClass>
-        <displayProcess>EvGen</displayProcess>
-        <displayComponent>Athena-Core</displayComponent>
-      </classification>
-      <options_atn>${ATN_PACKAGE}/test/test_ph8TauolappEG_ztautau</options_atn>
-      <timelimit>15</timelimit>
-      <prescript>source ${ATN_PACKAGE}/test/setup_testenv</prescript>
-    </TEST>
    
 
     
-    <TEST name="powhegpy8TauolaPPEG" type="script" suite="EvgenJobTransforms-Core">
-      <doc>Test Powheg+Pythia8+TauolaPP+EvtGen</doc>
+    <TEST name="Py8EvtGen" type="script" suite="EvgenJobTransforms-Core">
+      <doc>Test Pythia8+EvtGen</doc>
       <classification>
         <displayClass>OfflineValidation</displayClass>
         <displayProcess>EvGen</displayProcess>
         <displayComponent>Athena-Core</displayComponent>
       </classification>
-      <options_atn>${ATN_PACKAGE}/test/test_powhegpy8TauolaPPEG</options_atn>
-      <timelimit>25</timelimit>
+      <options_atn>${ATN_PACKAGE}/test/test_pythia8_evtgen</options_atn>
+      <timelimit>15</timelimit>
       <prescript>source ${ATN_PACKAGE}/test/setup_testenv</prescript>
     </TEST>
     
@@ -167,29 +155,17 @@
     
 
     
-    <TEST name="Herwig7" type="script" suite="EvgenJobTransforms-Core">
-      <doc>Test minimum bias generation with Herwig7</doc>
+    <TEST name="Herwig++" type="script" suite="EvgenJobTransforms-Core">
+      <doc>Test minimum bias generation with Herwigpp</doc>
       <classification>
         <displayClass>OfflineValidation</displayClass>
         <displayProcess>EvGen</displayProcess>
         <displayComponent>Athena-Core</displayComponent>
       </classification>
-      <options_atn>${ATN_PACKAGE}/test/test_herwig7</options_atn>
+      <options_atn>${ATN_PACKAGE}/test/test_herwigpp</options_atn>
       <timelimit>15</timelimit>
       <prescript>source ${ATN_PACKAGE}/test/setup_testenv</prescript>
     </TEST>
-
-    <TEST name="Herwig7dijet" type="script" suite="EvgenJobTransforms-Core">
-      <doc>Test dijets generation with Herwig7</doc>
-      <classification>
-        <displayClass>OfflineValidation</displayClass>
-        <displayProcess>EvGen</displayProcess>
-        <displayComponent>Athena-Core</displayComponent>
-      </classification>
-      <options_atn>${ATN_PACKAGE}/test/test_herwig7dijet</options_atn>
-      <timelimit>35</timelimit>
-      <prescript>source ${ATN_PACKAGE}/test/setup_testenv</prescript>
-    </TEST>
     
     <TEST name="PowhegWenu" type="script" suite="EvgenJobTransforms-Core">
       <doc>Test W-enu generation with Powheg</doc>
diff --git a/Generators/EvgenJobTransforms/test/setup_testenv b/Generators/EvgenJobTransforms/test/setup_testenv
index 5b2205f26e832eba8ff2f0095daa0ffb7dfd13b3..881cd7e056a3ee1412fb33ad5bd9d222dff4d793 100644
--- a/Generators/EvgenJobTransforms/test/setup_testenv
+++ b/Generators/EvgenJobTransforms/test/setup_testenv
@@ -1,3 +1,3 @@
 export TESTDATA=/afs/cern.ch/atlas/offline/ProdData/17.2.X
 export JODIR=/afs/cern.ch/atlas/groups/Generators/MC14JobOptions/latest
-export JODIR15=/cvmfs/atlas.cern.ch/repo/sw/Generators/MC15JobOptions/latest
+export JODIR15=/afs/cern.ch/atlas/groups/Generators/MC15JobOptions/latest
diff --git a/Generators/EvgenJobTransforms/test/test_MC14_Pythia6_Wtaunu.py b/Generators/EvgenJobTransforms/test/test_MC14_Pythia6_Wtaunu.py
index d4cbf409574d040df8f268f8c8527b77e85f2aae..2e4e1b2d56b0c20c82819a224359661910c8beaf 100644
--- a/Generators/EvgenJobTransforms/test/test_MC14_Pythia6_Wtaunu.py
+++ b/Generators/EvgenJobTransforms/test/test_MC14_Pythia6_Wtaunu.py
@@ -1,3 +1,5 @@
+# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+
 ## PYTHIA W->tau,nu
 
 evgenConfig.description = "W->tau,nu production with the AUET2B CTEQ6L1 tune"
diff --git a/Generators/EvgenJobTransforms/test/test_MC14_Pythia8_Zee.py b/Generators/EvgenJobTransforms/test/test_MC14_Pythia8_Zee.py
index b1d860a1e830cfffe51b58db54442ba7a6d7d5d7..ebbcff8f7d10ed8f08282720c03d1e386aaede5f 100644
--- a/Generators/EvgenJobTransforms/test/test_MC14_Pythia8_Zee.py
+++ b/Generators/EvgenJobTransforms/test/test_MC14_Pythia8_Zee.py
@@ -1,3 +1,5 @@
+# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+
 ## Pythia8 Z->ee
 
 evgenConfig.description = "Z->ee production with no lepton filter and AU2 CTEQ6L1 tune"
diff --git a/Generators/EvgenJobTransforms/test/test_bphys b/Generators/EvgenJobTransforms/test/test_bphys
index 0572e1052d0e6071d03ddba0d59118373269b5d5..4571835f5c8280e4055263359443c8eb0fc2109e 100755
--- a/Generators/EvgenJobTransforms/test/test_bphys
+++ b/Generators/EvgenJobTransforms/test/test_bphys
@@ -2,7 +2,7 @@
 
 ## Any arguments are considered overrides, and will be added at the end
 export TRF_ECHO=True;
-Generate_tf.py --ecmEnergy=13000 --runNumber=429705 --maxEvents=10 \
-    --jobConfig=$JODIR15/share/DSID429xxx/MC15.429705.Pythia8B_A14NNPDF23LO_pp_JpsimumuZmumu.py \
+Generate_tf.py --ecmEnergy=13000 --runNumber=304697 --maxEvents=10 \
+    --jobConfig=$JODIR15/share/DSID304xxx/MC15.304697.Pythia8BEvtGen_A14NNPDF23LO_pp_JpsimumuZmumu.py \
     --outputEVNTFile=test_bb_Jpsimu4mu4X.EVNT.pool.root \
     $@
diff --git a/Generators/EvgenJobTransforms/test/test_herwig7 b/Generators/EvgenJobTransforms/test/test_herwig7
deleted file mode 100755
index 8a7aa291797469374b0b63bc3b037a2995da9ced..0000000000000000000000000000000000000000
--- a/Generators/EvgenJobTransforms/test/test_herwig7
+++ /dev/null
@@ -1,8 +0,0 @@
-#! /usr/bin/env bash
-
-## Any arguments are considered overrides, and will be added at the end
-export TRF_ECHO=True;
-Generate_tf.py --ecmEnergy=13000 --runNumber=429700 --maxEvents=10 \
-    --jobConfig=$JODIR15/share/DSID429xxx/MC15.429700.Herwig7_MinBias.py  \
-    --outputEVNTFile=test_herwig7_minbias_inelastic.EVNT.pool.root \
-    $@
diff --git a/Generators/EvgenJobTransforms/test/test_herwig7dijet b/Generators/EvgenJobTransforms/test/test_herwig7dijet
deleted file mode 100755
index 549bb0a8e8eff900cc1af607f2de31c64e199053..0000000000000000000000000000000000000000
--- a/Generators/EvgenJobTransforms/test/test_herwig7dijet
+++ /dev/null
@@ -1,8 +0,0 @@
-#! /usr/bin/env bash
-
-## Any arguments are considered overrides, and will be added at the end
-export TRF_ECHO=True;
-Generate_tf.py --ecmEnergy=13000 --runNumber=429699 --maxEvents=10 \
-    --jobConfig=$JODIR15/share/DSID429xxx/MC15.429699.Herwig7_Dijet.py  \
-    --outputEVNTFile=test_herwig7_dijet.EVNT.pool.root \
-    $@
diff --git a/Generators/EvgenJobTransforms/test/test_ph8TauolappEG_ztautau b/Generators/EvgenJobTransforms/test/test_ph8TauolappEG_ztautau
deleted file mode 100755
index 6ff2c1342282aa75f8d03c77edfa5614334b9a2b..0000000000000000000000000000000000000000
--- a/Generators/EvgenJobTransforms/test/test_ph8TauolappEG_ztautau
+++ /dev/null
@@ -1,10 +0,0 @@
-#! /usr/bin/env bash
-
-## Any arguments are considered overrides, and will be added at the end
-export TRF_ECHO=True;
-Generate_tf.py --ecmEnergy=13000 --runNumber=429697 --maxEvents=10 \
-    --jobConfig=$JODIR15/share/DSID429xxx/MC15.429697.Pythia8EvtGen_A14NNPDF23LO_DYtautau_120M180.py  \
-    --outputEVNTFile=test_DYZtautau.EVNT.pool.root \
-    $@
-
-
diff --git a/Generators/EvgenJobTransforms/test/test_powheg_ttbar b/Generators/EvgenJobTransforms/test/test_powheg_ttbar
index 983ac9171f48b71bab7bcb59492f78f792c3ae13..7b2caf52a367955d2700bbdd217b9d78af82b24a 100755
--- a/Generators/EvgenJobTransforms/test/test_powheg_ttbar
+++ b/Generators/EvgenJobTransforms/test/test_powheg_ttbar
@@ -3,6 +3,6 @@
 ## Any arguments are considered overrides, and will be added at the end
 export TRF_ECHO=True;
 Generate_tf.py --ecmEnergy=13000 --runNumber=101010 --maxEvents=10 \
-    --jobConfig=$JODIR/share/tests/MC14.101010.PowhegPythia_Perugia2011_tt_example.py  \
+    --jobConfig=$JODIR/share/tests/MC14.101010.PowhegPythiaPhotosTauola_Perugia2011_tt_example.py  \
     --outputEVNTFile=test_powheg_minbias_inelastic.EVNT.pool.root \
     $@
diff --git a/Generators/EvgenJobTransforms/test/test_powhegpy8TauolaPPEG b/Generators/EvgenJobTransforms/test/test_powhegpy8TauolaPPEG
deleted file mode 100755
index 6fcd23ae2c9a7a670d2355a089938f4e1493c67a..0000000000000000000000000000000000000000
--- a/Generators/EvgenJobTransforms/test/test_powhegpy8TauolaPPEG
+++ /dev/null
@@ -1,8 +0,0 @@
-#! /usr/bin/env bash
-
-## Any arguments are considered overrides, and will be added at the end
-export TRF_ECHO=True;
-Generate_tf.py --ecmEnergy=13000 --runNumber=429696 --maxEvents=10 \
-    --jobConfig=$JODIR15/share/DSID429xxx/MC15.429696.PowhegPythia8EvtGen_AZNLOCTEQ6L1_Ztautau.py \
-    --outputEVNTFile=test_JZ0_evtgen.EVNT.pool.root \
-    $@
diff --git a/Generators/EvgenJobTransforms/test/test_pythia8_powheg b/Generators/EvgenJobTransforms/test/test_pythia8_powheg
index b1df8722a54f30d7d64d9160dbd32518210a4d0b..c218a9fcc8c75846a5dc82fb150f1c4fbf12eb3a 100755
--- a/Generators/EvgenJobTransforms/test/test_pythia8_powheg
+++ b/Generators/EvgenJobTransforms/test/test_pythia8_powheg
@@ -2,8 +2,8 @@
 
 ## Any arguments are considered overrides, and will be added at the end
 export TRF_ECHO=True;
-Generate_tf.py --ecmEnergy=8000 --runNumber=429695 --maxEvents=10 \
-    --jobConfig=$JODIR15/share/DSID429xxx/MC15.429695.PowhegPythia8EvtGen_A14NNPDF23LO_Wplusenu.py \
+Generate_tf.py --ecmEnergy=8000 --runNumber=147800 --maxEvents=10 \
+    --jobConfig=$JODIR/share/tests/MC14.147800.PowhegPythia8_AU2CT10_Wplusenu.py \
     --inputGeneratorFile=$TESTDATA/group.phys-gener.Powheg_CT10.147800.Wplusenu_8TeV.TXT.mc12_v2._00001.tar.gz \
     --outputEVNTFile=test_powhegpythia8_Wpluswnu.EVNT.pool.root \
     $@
diff --git a/Generators/EvgenJobTransforms/test/test_pythia8_ztautau b/Generators/EvgenJobTransforms/test/test_pythia8_ztautau
index 50c730635af4a036ddd7d3c586007bfb96583e1d..e330dba5fac5cd90c0bae52329253262791cac4a 100755
--- a/Generators/EvgenJobTransforms/test/test_pythia8_ztautau
+++ b/Generators/EvgenJobTransforms/test/test_pythia8_ztautau
@@ -2,7 +2,7 @@
 
 ## Any arguments are considered overrides, and will be added at the end
 export TRF_ECHO=True;
-Generate_tf.py --ecmEnergy=13000 --runNumber=429708 --maxEvents=10 \
-    --jobConfig=$JODIR15/share/DSID429xxx/MC15.429708.Pythia8EvtGen_A14NNPDF23LO_Ztautau.py  \
+Generate_tf.py --ecmEnergy=13000 --runNumber=429110 --maxEvents=10 \
+    --jobConfig=$JODIR15/share/DSID429xxx/MC15.429110.Pythia8EvtGen_A14NNPDF23LO_Ztautau.py  \
     --outputEVNTFile=test_Ztautau.EVNT.pool.root \
     $@
diff --git a/Generators/EvgenProdTools/CMakeLists.txt b/Generators/EvgenProdTools/CMakeLists.txt
index b7de7408052892816101a5013331fb093a6495c1..fe58e620547a358be6b82507a79c9b50373b5144 100644
--- a/Generators/EvgenProdTools/CMakeLists.txt
+++ b/Generators/EvgenProdTools/CMakeLists.txt
@@ -9,6 +9,7 @@ atlas_subdir( EvgenProdTools )
 atlas_depends_on_subdirs( PUBLIC
                           Control/AthenaBaseComps
                           Generators/GenAnalysisTools/TruthHelper
+                          Generators/GenInterfaces
                           Generators/GeneratorModules
                           PRIVATE
                           Control/AthenaKernel
diff --git a/Generators/EvgenProdTools/EvgenProdTools/CopyEventWeight.h b/Generators/EvgenProdTools/EvgenProdTools/CopyEventWeight.h
index d5586d1043432ab732d17a04acd9891757b4b763..3ff9ef7ec35271bbff87c51f6a10837891dce0df 100644
--- a/Generators/EvgenProdTools/EvgenProdTools/CopyEventWeight.h
+++ b/Generators/EvgenProdTools/EvgenProdTools/CopyEventWeight.h
@@ -41,4 +41,4 @@ private:
 
 #endif
 
-#endif
+#endif
\ No newline at end of file
diff --git a/Generators/EvgenProdTools/EvgenProdTools/CountHepMC.h b/Generators/EvgenProdTools/EvgenProdTools/CountHepMC.h
index fed77d35ad4fda16c156a3fd040b25e6ba1c23e5..8bbbec1e22082e69e4b84c6a104bbeb34a9f3252 100644
--- a/Generators/EvgenProdTools/EvgenProdTools/CountHepMC.h
+++ b/Generators/EvgenProdTools/EvgenProdTools/CountHepMC.h
@@ -40,4 +40,4 @@ private:
 
 #endif
 
-#endif
+#endif
\ No newline at end of file
diff --git a/Generators/EvgenProdTools/EvgenProdTools/EvgenOTFTopUpSvc.h b/Generators/EvgenProdTools/EvgenProdTools/EvgenOTFTopUpSvc.h
index 9bdb35f19b76fac5ac5c0fc86467424001023f0f..7c8ead95431ec8d3af5661009e414d8206429627 100644
--- a/Generators/EvgenProdTools/EvgenProdTools/EvgenOTFTopUpSvc.h
+++ b/Generators/EvgenProdTools/EvgenProdTools/EvgenOTFTopUpSvc.h
@@ -8,7 +8,7 @@
 #define EVGENPRODTOOLS_EVGENOTFTOPUPSVC_H
 
 #include "AthenaBaseComps/AthService.h"
-#include "EvgenProdTools/IEvgenOTFTopUpSvc.h"
+#include "GenInterfaces/IEvgenOTFTopUpSvc.h"
 #include <string>
 
 /// @brief Service to hold some information for topping up
@@ -62,4 +62,4 @@ private:
 
 #endif
 
-#endif
+#endif
\ No newline at end of file
diff --git a/Generators/EvgenProdTools/EvgenProdTools/IEvgenOTFTopUpSvc.h b/Generators/EvgenProdTools/EvgenProdTools/IEvgenOTFTopUpSvc.h
deleted file mode 100644
index 3ba04f6ef1e579e121feeb5b7236b51fef354a9d..0000000000000000000000000000000000000000
--- a/Generators/EvgenProdTools/EvgenProdTools/IEvgenOTFTopUpSvc.h
+++ /dev/null
@@ -1,41 +0,0 @@
-/*
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
-*/
-
-#ifndef EVGENPRODTOOLS_IEVGENOTFTOPUPSVC_H
-#define EVGENPRODTOOLS_IEVGENOTFTOPUPSVC_H
-
-#include "GaudiKernel/IInterface.h"
-#include <string>
-
-/// @brief IService to hold some information for topping up
-///  algorithms that are running on the fly.  It's a bit tricky,
-///  but this is mostly just a service for holding some numbers...
-///
-
-static const InterfaceID IID_IEvgenOTFTopUpSvc("IEvgenOTFTopUpSvc", 1 , 0);
-
-class IEvgenOTFTopUpSvc : virtual public IInterface {
-public:
-
-  // Getters
-  virtual long   getNPerFile()    const = 0;
-  virtual long   getNUsedSoFar()  const = 0;
-  virtual double getEfficiency()  const = 0;
-  virtual bool   getNewFileFlag() const = 0;
-
-  // Setters - first for Pythia/Herwig to call when they use up events
-  virtual void   usedEvents() = 0;
-  virtual void   usedEvents( const int ) = 0;
-
-  // New file created by the OTF generator algorithm
-  virtual void   newFile( std::string& ) = 0;
-
-  // New file grabbed by the showering generator
-  virtual const std::string& getFile() = 0;
-
-  static const InterfaceID& interfaceID() { return IID_IEvgenOTFTopUpSvc; };
-
-};
-
-#endif
diff --git a/Generators/EvgenProdTools/cmt/.svn/dir-prop-base b/Generators/EvgenProdTools/cmt/.svn/dir-prop-base
deleted file mode 100644
index 498342c0a5a596778ddcf1363020648b3b6274e3..0000000000000000000000000000000000000000
--- a/Generators/EvgenProdTools/cmt/.svn/dir-prop-base
+++ /dev/null
@@ -1,11 +0,0 @@
-K 10
-svn:ignore
-V 79
-cleanup.*sh
-setup.*sh
-install.*history
-native_version.cmt
-version.cmt
-Makefile
-
-END
diff --git a/Generators/EvgenProdTools/cmt/.svn/entries b/Generators/EvgenProdTools/cmt/.svn/entries
deleted file mode 100644
index dcb92044b22488759c389868f1b6747ed7f02481..0000000000000000000000000000000000000000
--- a/Generators/EvgenProdTools/cmt/.svn/entries
+++ /dev/null
@@ -1,62 +0,0 @@
-10
-
-dir
-810106
-svn+ssh://svn.cern.ch/reps/atlasoff/Generators/EvgenProdTools/trunk/cmt
-svn+ssh://svn.cern.ch/reps/atlasoff
-
-
-
-2015-07-20T10:06:37.464503Z
-684250
-will
-has-props
-
-
-
-
-
-
-
-
-
-
-
-
-
-4525493e-7705-40b1-a816-d608a930855b
-
-requirements
-file
-
-
-
-
-2017-09-08T09:59:21.000000Z
-682ebe95f10c7475f2f008230a516129
-2015-07-20T10:06:37.464503Z
-684250
-will
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-1019
-
diff --git a/Generators/EvgenProdTools/cmt/.svn/text-base/requirements.svn-base b/Generators/EvgenProdTools/cmt/.svn/text-base/requirements.svn-base
deleted file mode 100644
index 4970326dc9f6dbb3cc336d964a000a4bfa1da41a..0000000000000000000000000000000000000000
--- a/Generators/EvgenProdTools/cmt/.svn/text-base/requirements.svn-base
+++ /dev/null
@@ -1,33 +0,0 @@
-package EvgenProdTools
-
-author Andy Buckley <andy.buckley@cern.ch>
-author Zach Marshall <zach.marshall@cern.ch>
-author Will Buttinger <will@cern.ch>
-
-use AtlasPolicy AtlasPolicy-*
-use AtlasHepMC        AtlasHepMC-*        External
-use AtlasROOT         AtlasROOT-*         External
-use GeneratorModules  GeneratorModules-*  Generators
-use TruthHelper       TruthHelper-*       Generators/GenAnalysisTools
-use AthenaBaseComps  AthenaBaseComps-*  Control
-
-private
-use AthenaKernel      AthenaKernel-*      Control
-use TruthUtils        TruthUtils-*        Generators
-use GaudiInterface    GaudiInterface-*    External
-use EventInfo         EventInfo-*         Event
-
-
-end_private
-
-#use AtlasHepMC       AtlasHepMC-*       External
-#use AthenaBaseComps  AthenaBaseComps-*  Control
-#use StoreGate        StoreGate-*        Control
-
-apply_pattern dual_use_library files=" *.cxx "
-
-apply_pattern declare_joboptions files="*.py"
-
-apply_pattern declare_runtime extras="*.txt"
-
-apply_pattern declare_python_modules files="*.py"
diff --git a/Generators/EvgenProdTools/cmt/Makefile b/Generators/EvgenProdTools/cmt/Makefile
deleted file mode 100644
index c2c9dbbed79a7894e694cf7a0c7d1bf0756334c3..0000000000000000000000000000000000000000
--- a/Generators/EvgenProdTools/cmt/Makefile
+++ /dev/null
@@ -1,4 +0,0 @@
-include $(CMTROOT)/src/Makefile.header
-
-include $(CMTROOT)/src/constituents.make
-
diff --git a/Generators/EvgenProdTools/cmt/cleanup.csh b/Generators/EvgenProdTools/cmt/cleanup.csh
deleted file mode 100644
index 2978ccae95fb3efd7d502acc177615968a1e79f5..0000000000000000000000000000000000000000
--- a/Generators/EvgenProdTools/cmt/cleanup.csh
+++ /dev/null
@@ -1,27 +0,0 @@
-# echo "cleanup EvgenProdTools EvgenProdTools-00-02-30 in /afs/cern.ch/user/e/ewelina/testarea/20.7.X.Y.Z-VAL/Generators"
-
-if ( $?CMTROOT == 0 ) then
-  setenv CMTROOT /cvmfs/atlas.cern.ch/repo/sw/software/x86_64-slc6-gcc49-opt/20.7.9/CMT/v1r25p20160527
-endif
-source ${CMTROOT}/mgr/setup.csh
-set cmtEvgenProdToolstempfile=`${CMTROOT}/${CMTBIN}/cmt.exe -quiet build temporary_name`
-if $status != 0 then
-  set cmtEvgenProdToolstempfile=/tmp/cmt.$$
-endif
-${CMTROOT}/${CMTBIN}/cmt.exe cleanup -csh -pack=EvgenProdTools -version=EvgenProdTools-00-02-30 -path=/afs/cern.ch/user/e/ewelina/testarea/20.7.X.Y.Z-VAL/Generators  -quiet -without_version_directory $* >${cmtEvgenProdToolstempfile}
-if ( $status != 0 ) then
-  echo "${CMTROOT}/${CMTBIN}/cmt.exe cleanup -csh -pack=EvgenProdTools -version=EvgenProdTools-00-02-30 -path=/afs/cern.ch/user/e/ewelina/testarea/20.7.X.Y.Z-VAL/Generators  -quiet -without_version_directory $* >${cmtEvgenProdToolstempfile}"
-  set cmtcleanupstatus=2
-  /bin/rm -f ${cmtEvgenProdToolstempfile}
-  unset cmtEvgenProdToolstempfile
-  exit $cmtcleanupstatus
-endif
-set cmtcleanupstatus=0
-source ${cmtEvgenProdToolstempfile}
-if ( $status != 0 ) then
-  set cmtcleanupstatus=2
-endif
-/bin/rm -f ${cmtEvgenProdToolstempfile}
-unset cmtEvgenProdToolstempfile
-exit $cmtcleanupstatus
-
diff --git a/Generators/EvgenProdTools/cmt/cleanup.sh b/Generators/EvgenProdTools/cmt/cleanup.sh
deleted file mode 100644
index e2297444256c73a91d827446d4483657862bda16..0000000000000000000000000000000000000000
--- a/Generators/EvgenProdTools/cmt/cleanup.sh
+++ /dev/null
@@ -1,25 +0,0 @@
-# echo "cleanup EvgenProdTools EvgenProdTools-00-02-30 in /afs/cern.ch/user/e/ewelina/testarea/20.7.X.Y.Z-VAL/Generators"
-
-if test "${CMTROOT}" = ""; then
-  CMTROOT=/cvmfs/atlas.cern.ch/repo/sw/software/x86_64-slc6-gcc49-opt/20.7.9/CMT/v1r25p20160527; export CMTROOT
-fi
-. ${CMTROOT}/mgr/setup.sh
-cmtEvgenProdToolstempfile=`${CMTROOT}/${CMTBIN}/cmt.exe -quiet build temporary_name`
-if test ! $? = 0 ; then cmtEvgenProdToolstempfile=/tmp/cmt.$$; fi
-${CMTROOT}/${CMTBIN}/cmt.exe cleanup -sh -pack=EvgenProdTools -version=EvgenProdTools-00-02-30 -path=/afs/cern.ch/user/e/ewelina/testarea/20.7.X.Y.Z-VAL/Generators  -quiet -without_version_directory $* >${cmtEvgenProdToolstempfile}
-if test $? != 0 ; then
-  echo >&2 "${CMTROOT}/${CMTBIN}/cmt.exe cleanup -sh -pack=EvgenProdTools -version=EvgenProdTools-00-02-30 -path=/afs/cern.ch/user/e/ewelina/testarea/20.7.X.Y.Z-VAL/Generators  -quiet -without_version_directory $* >${cmtEvgenProdToolstempfile}"
-  cmtcleanupstatus=2
-  /bin/rm -f ${cmtEvgenProdToolstempfile}
-  unset cmtEvgenProdToolstempfile
-  return $cmtcleanupstatus
-fi
-cmtcleanupstatus=0
-. ${cmtEvgenProdToolstempfile}
-if test $? != 0 ; then
-  cmtcleanupstatus=2
-fi
-/bin/rm -f ${cmtEvgenProdToolstempfile}
-unset cmtEvgenProdToolstempfile
-return $cmtcleanupstatus
-
diff --git a/Generators/EvgenProdTools/cmt/setup.csh b/Generators/EvgenProdTools/cmt/setup.csh
deleted file mode 100644
index 7754b069727a31f6d3c55e42f33ff7549127606d..0000000000000000000000000000000000000000
--- a/Generators/EvgenProdTools/cmt/setup.csh
+++ /dev/null
@@ -1,27 +0,0 @@
-# echo "setup EvgenProdTools EvgenProdTools-00-02-30 in /afs/cern.ch/user/e/ewelina/testarea/20.7.X.Y.Z-VAL/Generators"
-
-if ( $?CMTROOT == 0 ) then
-  setenv CMTROOT /cvmfs/atlas.cern.ch/repo/sw/software/x86_64-slc6-gcc49-opt/20.7.9/CMT/v1r25p20160527
-endif
-source ${CMTROOT}/mgr/setup.csh
-set cmtEvgenProdToolstempfile=`${CMTROOT}/${CMTBIN}/cmt.exe -quiet build temporary_name`
-if $status != 0 then
-  set cmtEvgenProdToolstempfile=/tmp/cmt.$$
-endif
-${CMTROOT}/${CMTBIN}/cmt.exe setup -csh -pack=EvgenProdTools -version=EvgenProdTools-00-02-30 -path=/afs/cern.ch/user/e/ewelina/testarea/20.7.X.Y.Z-VAL/Generators  -quiet -without_version_directory -no_cleanup $* >${cmtEvgenProdToolstempfile}
-if ( $status != 0 ) then
-  echo "${CMTROOT}/${CMTBIN}/cmt.exe setup -csh -pack=EvgenProdTools -version=EvgenProdTools-00-02-30 -path=/afs/cern.ch/user/e/ewelina/testarea/20.7.X.Y.Z-VAL/Generators  -quiet -without_version_directory -no_cleanup $* >${cmtEvgenProdToolstempfile}"
-  set cmtsetupstatus=2
-  /bin/rm -f ${cmtEvgenProdToolstempfile}
-  unset cmtEvgenProdToolstempfile
-  exit $cmtsetupstatus
-endif
-set cmtsetupstatus=0
-source ${cmtEvgenProdToolstempfile}
-if ( $status != 0 ) then
-  set cmtsetupstatus=2
-endif
-/bin/rm -f ${cmtEvgenProdToolstempfile}
-unset cmtEvgenProdToolstempfile
-exit $cmtsetupstatus
-
diff --git a/Generators/EvgenProdTools/cmt/setup.sh b/Generators/EvgenProdTools/cmt/setup.sh
deleted file mode 100644
index 6e6bc458f9878b45369fbc078f74b37261d7b92e..0000000000000000000000000000000000000000
--- a/Generators/EvgenProdTools/cmt/setup.sh
+++ /dev/null
@@ -1,25 +0,0 @@
-# echo "setup EvgenProdTools EvgenProdTools-00-02-30 in /afs/cern.ch/user/e/ewelina/testarea/20.7.X.Y.Z-VAL/Generators"
-
-if test "${CMTROOT}" = ""; then
-  CMTROOT=/cvmfs/atlas.cern.ch/repo/sw/software/x86_64-slc6-gcc49-opt/20.7.9/CMT/v1r25p20160527; export CMTROOT
-fi
-. ${CMTROOT}/mgr/setup.sh
-cmtEvgenProdToolstempfile=`${CMTROOT}/${CMTBIN}/cmt.exe -quiet build temporary_name`
-if test ! $? = 0 ; then cmtEvgenProdToolstempfile=/tmp/cmt.$$; fi
-${CMTROOT}/${CMTBIN}/cmt.exe setup -sh -pack=EvgenProdTools -version=EvgenProdTools-00-02-30 -path=/afs/cern.ch/user/e/ewelina/testarea/20.7.X.Y.Z-VAL/Generators  -quiet -without_version_directory -no_cleanup $* >${cmtEvgenProdToolstempfile}
-if test $? != 0 ; then
-  echo >&2 "${CMTROOT}/${CMTBIN}/cmt.exe setup -sh -pack=EvgenProdTools -version=EvgenProdTools-00-02-30 -path=/afs/cern.ch/user/e/ewelina/testarea/20.7.X.Y.Z-VAL/Generators  -quiet -without_version_directory -no_cleanup $* >${cmtEvgenProdToolstempfile}"
-  cmtsetupstatus=2
-  /bin/rm -f ${cmtEvgenProdToolstempfile}
-  unset cmtEvgenProdToolstempfile
-  return $cmtsetupstatus
-fi
-cmtsetupstatus=0
-. ${cmtEvgenProdToolstempfile}
-if test $? != 0 ; then
-  cmtsetupstatus=2
-fi
-/bin/rm -f ${cmtEvgenProdToolstempfile}
-unset cmtEvgenProdToolstempfile
-return $cmtsetupstatus
-
diff --git a/Generators/EvgenProdTools/cmt/version.cmt b/Generators/EvgenProdTools/cmt/version.cmt
deleted file mode 100644
index 7e25b0d215135880ef98e32b51f98baf8e37fb3e..0000000000000000000000000000000000000000
--- a/Generators/EvgenProdTools/cmt/version.cmt
+++ /dev/null
@@ -1 +0,0 @@
-EvgenProdTools-00-02-30
diff --git a/Generators/EvgenProdTools/examples/jobOption.Pythia8_FixHepMC.py b/Generators/EvgenProdTools/examples/jobOption.Pythia8_FixHepMC.py
index b5558ed556e99d0115f9c7e0d39d38a27c7079dd..f28b5d15ba03a9de2fda189810ddc5a278a760ec 100644
--- a/Generators/EvgenProdTools/examples/jobOption.Pythia8_FixHepMC.py
+++ b/Generators/EvgenProdTools/examples/jobOption.Pythia8_FixHepMC.py
@@ -1,3 +1,5 @@
+# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+
 ## Example job option script to run an event generator with FixHepMC filtering
 ## Author: Andy Buckley <andy.buckley@cern.ch>
 
diff --git a/Generators/EvgenProdTools/python/LogicalExpressionFilter.py b/Generators/EvgenProdTools/python/LogicalExpressionFilter.py
index d1d202c44d220ee8a5d8546b4d9c5068b633f505..02ca5959fc5e0a49c2c0f98e80f9f8126c5c1c5e 100644
--- a/Generators/EvgenProdTools/python/LogicalExpressionFilter.py
+++ b/Generators/EvgenProdTools/python/LogicalExpressionFilter.py
@@ -1,4 +1,4 @@
-#  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
 
 ##==============================================================================
 ## Name:        LogicalExpressionFilter.py
@@ -158,7 +158,7 @@ class LogicalExpressionFilter( PyAthena.Alg ):
 
     def evalFilter(self, filterName):
       if not self.algdict[filterName].isExecuted():
-         self.algdict[filterName].sysExecute( self.getContext() )
+         self.algdict[filterName].sysExecute()
          self.algdict[filterName].setExecuted(True)
       decision = self.algdict[filterName].filterPassed()
       self.msg.verbose(filterName + " decision=" + str(decision))
diff --git a/Generators/EvgenProdTools/src/EvgenOTFTopUpSvc.cxx b/Generators/EvgenProdTools/src/EvgenOTFTopUpSvc.cxx
index 6d742c45fe8a69f3045bf8c35347c91e6aff6b30..c16fcda467fbd3259dff4f90f32313003ac4f5c6 100644
--- a/Generators/EvgenProdTools/src/EvgenOTFTopUpSvc.cxx
+++ b/Generators/EvgenProdTools/src/EvgenOTFTopUpSvc.cxx
@@ -36,4 +36,4 @@ StatusCode EvgenOTFTopUpSvc::queryInterface(const InterfaceID& riid, void** ppvI
   return StatusCode::SUCCESS;
 }
 
-#endif
+#endif
\ No newline at end of file
diff --git a/Generators/EvgenProdTools/src/FixHepMC.cxx b/Generators/EvgenProdTools/src/FixHepMC.cxx
index 0e0d2a48b3f645f601daa04e1aa164d7d831a297..21a75ecadad31874e7c73785720f039dddd63620 100644
--- a/Generators/EvgenProdTools/src/FixHepMC.cxx
+++ b/Generators/EvgenProdTools/src/FixHepMC.cxx
@@ -159,4 +159,4 @@ bool FixHepMC::isLoop(const HepMC::GenParticle* p) {
 
 //@}
 
-#endif
+#endif
\ No newline at end of file
diff --git a/Generators/EvgenProdTools/src/components/EvgenProdTools_entries.cxx b/Generators/EvgenProdTools/src/components/EvgenProdTools_entries.cxx
index a8c317a2f62f7ff60ae93ec67fad7ca3f0c64cf2..826b3db57223b419500db22de687855cbc41be02 100644
--- a/Generators/EvgenProdTools/src/components/EvgenProdTools_entries.cxx
+++ b/Generators/EvgenProdTools/src/components/EvgenProdTools_entries.cxx
@@ -1,6 +1,3 @@
-/*
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
-*/
 #include "GaudiKernel/DeclareFactoryEntries.h"
 
 #include "EvgenProdTools/CopyEventWeight.h"
diff --git a/Generators/EvgenProdTools/src/components/EvgenProdTools_load.cxx b/Generators/EvgenProdTools/src/components/EvgenProdTools_load.cxx
index 89d04ed1759732c8a29ac6a79aed695a7daaf949..294080418112d7f2251aa09a756921ee95b01d19 100644
--- a/Generators/EvgenProdTools/src/components/EvgenProdTools_load.cxx
+++ b/Generators/EvgenProdTools/src/components/EvgenProdTools_load.cxx
@@ -1,7 +1,3 @@
-/*
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
-*/
-
 #include "GaudiKernel/LoadFactoryEntries.h"
 
 LOAD_FACTORY_ENTRIES(EvgenProdTools)
diff --git a/Generators/Sherpa_i/Sherpa_i/Sherpa_i.h b/Generators/Sherpa_i/Sherpa_i/Sherpa_i.h
index d74c55bdf80e5589c1aff417d134a31d1ca12f68..27be67d95ef9ed5552a34eba57183d44a0442a2e 100755
--- a/Generators/Sherpa_i/Sherpa_i/Sherpa_i.h
+++ b/Generators/Sherpa_i/Sherpa_i/Sherpa_i.h
@@ -31,26 +31,10 @@ protected:
   
   SHERPA::Sherpa * p_sherpa;
 
-  /// Sherpa run card snippet (from JO file)
-  std::string m_runcard;
-
-  /// List of additional Sherpa parameters beyond run card snippet (from JO file)
+  std::string m_path;
   std::vector<std::string> m_params;
-
-  /// List of needed OpenLoops process libraries (from JO file)
-  std::vector<std::string> m_openloopslibs;
-
-  /// List of any additional needed files, e.g. custom libraries, PDF sets (from JO file)
-  std::vector<std::string> m_extrafiles;
-
-  /// Number of cores recommended for multi-core integration file
-  int m_ncores;
-
-  /// Memory required for integration/evgen
-  double m_memorymb;
-
   double m_xsscale;
-  bool m_cleanup;
+  std::string m_scalevarref;
 };
 
 
diff --git a/Generators/Sherpa_i/share/Example/MC15.999999.Sherpa_Example.py b/Generators/Sherpa_i/share/Example/MC15.999999.Sherpa_Example.py
index 123195a3855c32abc0d393c039dd4d4286110bf3..e06d487ac4fe58395bf8435daa6b3b463761241f 100644
--- a/Generators/Sherpa_i/share/Example/MC15.999999.Sherpa_Example.py
+++ b/Generators/Sherpa_i/share/Example/MC15.999999.Sherpa_Example.py
@@ -1,10 +1,10 @@
-include("MC15JobOptions/Sherpa_2.2.2_NNPDF30NNLO_Common.py")
+include("MC15JobOptions/Sherpa_NNPDF30NNLO_Common.py")
 
 evgenConfig.description = "Sherpa 2.2.x example JO, Z+0,1-jet production."
-evgenConfig.keywords = [ "2lepton" ]
+evgenConfig.keywords = [ "Example", "DrellYan" ]
 evgenConfig.contact  = [ "atlas-generators-sherpa@cern.ch", "frank.siegert@cern.ch"]
 
-genSeq.Sherpa_i.RunCard="""
+sherpaRunCard="""
 (processes){
   Process 93 93 -> 11 -11 93{1}
   Order (*,2)
@@ -16,10 +16,3 @@ genSeq.Sherpa_i.RunCard="""
   Mass 11 -11 40 E_CMS
 }(selector)
 """
-
-genSeq.Sherpa_i.Parameters = []
-genSeq.Sherpa_i.OpenLoopsLibs = []
-genSeq.Sherpa_i.ExtraFiles = []
-genSeq.Sherpa_i.NCores = 1
-
-genSeq.Sherpa_i.CleanupGeneratedFiles = 1
diff --git a/Generators/Sherpa_i/src/Sherpa_i.cxx b/Generators/Sherpa_i/src/Sherpa_i.cxx
index 0ed453d9be0f58ab734e3269cc9029416057a69d..bce2251532ef405f7888aa268f25ad1cf39f1936 100755
--- a/Generators/Sherpa_i/src/Sherpa_i.cxx
+++ b/Generators/Sherpa_i/src/Sherpa_i.cxx
@@ -25,15 +25,10 @@ CLHEP::HepRandomEngine* p_rndEngine;
 Sherpa_i::Sherpa_i(const std::string& name, ISvcLocator* pSvcLocator) 
   : GenModule(name, pSvcLocator), p_sherpa(NULL)
 {
-  declareProperty("RunCard", m_runcard = "");
+  declareProperty("RunPath", m_path = ".");
   declareProperty("Parameters", m_params);
-  declareProperty("OpenLoopsLibs", m_openloopslibs);
-  declareProperty("ExtraFiles", m_extrafiles);
-  declareProperty("NCores", m_ncores=1);
-  declareProperty("MemoryMB", m_memorymb=2500.);
-
   declareProperty("CrossSectionScaleFactor", m_xsscale=1.0);
-  declareProperty("CleanupGeneratedFiles", m_cleanup=false);
+  declareProperty("ScaleVariationReference", m_scalevarref="MUR1_MUF1_PDF261000");
 }
 
 
@@ -69,24 +64,40 @@ StatusCode Sherpa_i::genInitialize(){
     getParameters(argc, argv);
     p_sherpa->InitializeTheRun(argc,(char **)argv);
     delete [] argv;
-
-    p_sherpa->InitializeTheEventHandler();
   }
   catch (ATOOLS::Exception exception) {
     if (exception.Class()=="Matrix_Element_Handler" && exception.Type()==ATOOLS::ex::normal_exit) {
-      ATH_MSG_ERROR("Have to compile Amegic libraries");
-      ATH_MSG_ERROR("You probably want to run ./makelibs");
+      delete p_sherpa;
+
+      ATH_MSG_INFO("Have to compile Amegic libraries");
+      std::string tmp="cd "+m_path+"; ./makelibs && cd -;";
+      int stat = system(tmp.c_str());
+      if (stat==0) {
+	ATH_MSG_INFO("Finished compiling Amegic libraries");
+      }
+      else {
+	ATH_MSG_ERROR("Error while compiling Amegic libraries.");
+	return StatusCode::FAILURE;
+      }
+
+      int argc;
+      char** argv;
+      getParameters(argc, argv);
+      p_sherpa = new SHERPA::Sherpa();
+      p_sherpa->InitializeTheRun(argc,(char **)argv);
+      delete [] argv;
     }
     else {
       ATH_MSG_ERROR("Unwanted ATOOLS::exception caught.");
       ATH_MSG_ERROR(exception);
+      return StatusCode::FAILURE;
     }
-    return StatusCode::FAILURE;
   }
   catch (std::exception exception) {
     ATH_MSG_ERROR("std::exception caught.");
     return StatusCode::FAILURE;
   }
+  p_sherpa->InitializeTheEventHandler();
 
   return StatusCode::SUCCESS;
 }
@@ -116,6 +127,21 @@ StatusCode Sherpa_i::fillEvt(HepMC::GenEvent* event) {
       if (i==0 || i>3) event->weights()[i] /= weight_normalisation;
       ATH_MSG_DEBUG("Sherpa WEIGHT " << i << " value="<< event->weights()[i]);
     }
+
+    // workaround according to https://sherpa.hepforge.org/trac/ticket/365
+    if (event->weights().has_key(m_scalevarref)) {
+      double correction_factor = event->weights()[0] / event->weights()[m_scalevarref];
+      if (correction_factor != 1.0) {
+        ATH_MSG_DEBUG("correction_factor = " << correction_factor);
+        for (size_t i=4; i<event->weights().size(); ++i) {
+          event->weights()[i] *= correction_factor;
+        }
+      }
+    }
+    else {
+      ATH_MSG_DEBUG("No weight with key " << m_scalevarref);
+    }
+
   }
 
   GeVToMeV(event); //unit check
@@ -142,11 +168,6 @@ StatusCode Sherpa_i::genFinalize() {
 
   p_sherpa->SummarizeRun();
   delete p_sherpa;
-
-  if (m_cleanup) {
-    ATH_MSG_INFO("Deleting left-over files from working directory.");
-    system("rm -rf Results.db Process MIG_*.db MPI_*.dat libSherpa*.so libProc*.so");
-  }
   
   return StatusCode::SUCCESS;
 }
@@ -156,7 +177,11 @@ void Sherpa_i::getParameters(int &argc, char** &argv) {
   std::vector<std::string> params;
 
   // set some ATLAS specific default values as a starting point
+  params.push_back("PATH="+m_path);
   params.push_back("EXTERNAL_RNG=Atlas_RNG");
+  params.push_back("MAX_PROPER_LIFETIME=10.0");
+  params.push_back("BEAM_1=2212");
+  params.push_back("BEAM_2=2212");
 
   /***
       Adopt Atlas Debug Level Scheme
@@ -189,7 +214,6 @@ void Sherpa_i::getParameters(int &argc, char** &argv) {
   strcpy(argv[0], "Sherpa");
 
   ATH_MSG_INFO("Sherpa_i using the following Arguments");
-  ATH_MSG_INFO(m_runcard);
   for(size_t i=0; i<params.size(); i++) {
     ATH_MSG_INFO(" [ " << params[i] << " ] ");
     argv[i+1] = new char[params[i].size()+1];
diff --git a/Projects/Athena/externals/Sherpa.cmake b/Projects/Athena/externals/Sherpa.cmake
index 7c321a184e51825b1697a9e3cf85937e64dfe305..284ecfeb0451daadfbe363ea0d1de142073e41d8 100644
--- a/Projects/Athena/externals/Sherpa.cmake
+++ b/Projects/Athena/externals/Sherpa.cmake
@@ -2,6 +2,6 @@
 # File specifying the location of Sherpa to use.
 #
 
-set( SHERPA_VERSION 2.2.4 )
+set( SHERPA_VERSION 2.2.1 )
 set( SHERPA_ROOT
    ${LCG_RELEASE_DIR}/MCGenerators/sherpa/${SHERPA_VERSION}/${LCG_PLATFORM} )