From 5cbf54347c904e9100dbd51139f22a80a708c3ca Mon Sep 17 00:00:00 2001 From: Ewelina Maria Lobodzinska <ewelina.maria.lobodzinska@cern.ch> Date: Fri, 6 Mar 2020 13:13:21 +0000 Subject: [PATCH] correct the package_filters to the 21.6 standard, add newest changes to the Herwig7_i interface and EvgenJobTransform and EvgenProdTools --- .../EvgenJobTransforms/python/EvgenConfig.py | 25 +- .../EvgenJobTransforms/python/download.py | 1 + .../EvgenJobTransforms/python/evgenTrfArgs.py | 5 +- .../scripts/AfterBurner_tf.py | 35 +- .../scripts/EvtGenFromEVNT_tf.py | 2 +- .../EvgenJobTransforms/scripts/Gen_tf.py | 244 ++++++ .../EvgenJobTransforms/scripts/Rivet_tf.py | 4 +- .../share/Generate_ecmenergies.py | 4 + .../share/Generate_randomseeds.py | 10 + .../EvgenJobTransforms/share/LHEonly.py | 49 ++ .../share/file/CategoryList.txt | 52 ++ .../share/file/evgenkeywords.txt | 259 +++++++ ...keleton.ABtoEVGEN.py => skel.ABtoEVGEN.py} | 211 +++--- ...leton.GENtoEVGEN.py => skel.GENtoEVGEN.py} | 381 +++++++--- .../EvgenJobTransforms/share/skel.GENtoTXT.py | 703 ++++++++++++++++++ .../share/skeleton.EVGENtoRivet.py | 97 --- .../share/skeleton.EvtGenFromEVNT.py | 58 -- .../EvgenJobTransforms_TestConfiguration.xml | 371 --------- .../EvgenJobTransforms/test/setup_testenv | 33 - .../test/test_MC14_Pythia6_Wtaunu.py | 16 - .../test/test_MC14_Pythia8_Zee.py | 14 - .../EvgenJobTransforms/test/test_alpgen_jimmy | 10 - .../test/test_alpgen_pythia | 9 - Generators/EvgenJobTransforms/test/test_bphys | 10 - Generators/EvgenJobTransforms/test/test_epos | 8 - .../test/{test_bphys.sh => test_gen_bphys.sh} | 6 +- .../test/{test_epos.sh => test_gen_epos.sh} | 7 +- ...wig7dijet.sh => test_gen_herwig7_dijet.sh} | 6 +- ...minbias.sh => test_gen_herwig7_minbias.sh} | 6 +- ...ig7_wjets.sh => test_gen_herwig7_wjets.sh} | 6 +- ...ig7_zjets.sh => test_gen_herwig7_zjets.sh} | 6 +- .../test/test_gen_mg_LHEonly_WbWb.sh | 16 + ...8_Zmumu.sh => test_gen_mgpythia8_Zmumu.sh} | 6 +- ...thia8_ttW.sh => test_gen_mgpythia8_ttW.sh} | 6 +- ...tt_NLO.sh => test_gen_mgpythia8_tt_NLO.sh} | 6 +- ...u.sh => test_gen_powhegLHEonly_Ztautau.sh} | 6 +- ...wheg_ttbar.sh => test_gen_powheg_ttbar.sh} | 6 +- ...powheg_wenu.sh => test_gen_powheg_wenu.sh} | 6 +- .../test/test_gen_powhegpy8TauolaPPEG.sh | 16 + .../test/test_gen_py8_JZ2MultiBJetFilt.sh | 15 + ...thia8_jets.sh => test_gen_pythia8_jets.sh} | 6 +- .../test/test_gen_pythia8_minbias.sh | 14 + ...gh.sh => test_gen_pythia8_minbias_high.sh} | 6 +- ...ztautau.sh => test_gen_pythia8_ztautau.sh} | 6 +- .../{test_qgsjet.sh => test_gen_qgsjet.sh} | 6 +- .../test/test_gen_sherpa_Z0.sh | 16 + .../test/test_gen_sherpa_dy.sh | 16 + .../test/test_gen_single.sh | 18 + ...est_starlight.sh => test_gen_starlight.sh} | 6 +- .../EvgenJobTransforms/test/test_herwig7 | 8 - .../EvgenJobTransforms/test/test_herwig7dijet | 8 - .../EvgenJobTransforms/test/test_herwigpp | 8 - .../test/test_mcatnlo_herwigpp | 9 - .../test/test_mcatnlo_jimmy | 10 - .../test/test_mgpythia8_Zmumu | 10 - .../test/test_mgpythia8_ttW | 10 - .../test/test_ph8TauolappEG_ztautau | 10 - .../test/test_ph8TauolappEG_ztautau.sh | 21 - .../test/test_powheg_pythia_evtgen_wt | 9 - .../test/test_powheg_pythia_evtgen_wt.sh | 19 - .../EvgenJobTransforms/test/test_powheg_ttbar | 8 - .../EvgenJobTransforms/test/test_powheg_wenu | 9 - .../test/test_powhegpy8TauolaPPEG | 8 - .../test/test_powhegpy8TauolaPPEG.sh | 18 - .../test/test_pythia8_evtgen | 8 - .../EvgenJobTransforms/test/test_pythia8_jets | 8 - .../test/test_pythia8_minbias | 8 - .../test/test_pythia8_minbias.sh | 19 - .../test/test_pythia8_minbias_high | 8 - .../test/test_pythia8_powheg | 9 - .../test/test_pythia8_powheg.sh | 18 - .../test/test_pythia8_ztautau | 8 - .../EvgenJobTransforms/test/test_qgsjet | 8 - .../EvgenJobTransforms/test/test_sherpa_dy | 8 - .../EvgenJobTransforms/test/test_sherpa_dy.sh | 18 - .../EvgenJobTransforms/test/test_single | 8 - .../EvgenJobTransforms/test/test_single.sh | 20 - Generators/EvgenProdTools/CMakeLists.txt | 6 +- .../EvgenProdTools/CopyEventWeight.h | 2 +- .../EvgenProdTools/CountHepMC.h | 5 +- .../EvgenProdTools/EvgenOTFTopUpSvc.h | 4 +- .../EvgenProdTools/EvgenProdTools/FixHepMC.h | 2 +- .../EvgenProdTools/EvgenProdTools/TestHepMC.h | 17 +- .../examples/jobOption.Pythia8_FixHepMC.py | 2 - .../python/LogicalExpressionFilter.py | 53 +- .../scripts/simple_lhe_plotter.py | 108 +++ .../share/common/EnableFixHepMC.py | 8 + .../share/common/find_unique_file.py | 12 + .../share/common/merge_lhe_files.py | 48 ++ .../share/common/mult_lhe_input.py | 38 + .../share/file/G4particle_whitelist.txt | 371 +++++++++ .../share/file/susyParticlePdgid.txt | 20 + .../EvgenProdTools/src/CopyEventWeight.cxx | 2 +- Generators/EvgenProdTools/src/CountHepMC.cxx | 52 +- .../EvgenProdTools/src/EvgenOTFTopUpSvc.cxx | 2 +- Generators/EvgenProdTools/src/FixHepMC.cxx | 1 + Generators/EvgenProdTools/src/TestHepMC.cxx | 627 +++++++++------- .../src/components/EvgenProdTools_entries.cxx | 1 + Generators/Herwig7_i/CMakeLists.txt | 33 +- .../Herwig7_i/Herwig7EnvironmentConfig.cmake | 11 +- Generators/Herwig7_i/Herwig7_i/Herwig7.h | 7 +- Generators/Herwig7_i/doc/mainpage.h | 2 +- Generators/Herwig7_i/python/Herwig7Config.py | 2 + .../Herwig7_i/python/Herwig7ConfigFxFx.py | 2 - .../Herwig7_i/python/Herwig7ConfigGeneric.py | 2 - .../Herwig7_i/python/Herwig7ConfigLHEF.py | 2 - .../Herwig7_i/python/Herwig7ConfigMatchbox.py | 8 +- .../Herwig7_i/python/Herwig7ConfigMerging.py | 8 +- Generators/Herwig7_i/python/Herwig7Control.py | 1 + Generators/Herwig7_i/python/Herwig7Utils.py | 1 + .../Herwig71_AngularShowerScaleVariations.py | 19 + .../Herwig71_DipoleShowerScaleVariations.py | 19 + ...UEMMHT2014_dipole_multijet_withGridpack.py | 101 +-- ...raph_H7UEMMHT2014_multijet_withGridpack.py | 102 +-- .../BuiltinME/MC15.999999.Herwig7_Dijet.py | 27 + .../example/BuiltinME/mc.Herwig7_Dijet.py | 27 + .../FxFx/mc.MGH7_FxFx_H71-DEFAULT_test.py | 31 + .../mc.PhH7_H71-DEFAULT_LHE_ExistingInfile.py | 26 + ...mc.PhH7_H71-DEFAULT_LHE_ExistingRunfile.py | 25 + .../example/LHEF/mc.MGH7_H71-DEFAULT_LHE.py | 17 + .../example/LHEF/mc.PhH7_H71-DEFAULT_LHE.py | 17 + ...mc.H7_Matchbox_Internal_Zee_H71-DEFAULT.py | 110 +++ ...chbox_Internal_Zee_H71-DEFAULT_Gridpack.py | 110 +++ ..._Internal_Zee_H71-DEFAULT_Gridpack_Int2.py | 110 +++ ..._Matchbox_Internal_Zee_H71-DEFAULT_Int2.py | 110 +++ ....H7_Matchbox_Internal_ttbar_H71-DEFAULT.py | 164 ++++ .../share/file/Herwig71Inclusive.pdt | 509 +++++++++++++ Generators/Herwig7_i/src/Herwig7.cxx | 31 +- .../src/components/Herwig7_i_entries.cxx | 1 + Projects/AthGeneration/CMakeLists.txt | 1 + Projects/AthGeneration/package_filters.txt | 66 +- Projects/Athena/externals/Herwig3.cmake | 4 +- Projects/Athena/externals/ThePEG.cmake | 2 +- Projects/Athena/package_filters.txt | 25 + .../G4ExternalDecay/CMakeLists.txt | 2 +- 135 files changed, 4543 insertions(+), 1711 deletions(-) mode change 100755 => 100644 Generators/EvgenJobTransforms/scripts/EvtGenFromEVNT_tf.py create mode 100755 Generators/EvgenJobTransforms/scripts/Gen_tf.py create mode 100644 Generators/EvgenJobTransforms/share/LHEonly.py create mode 100644 Generators/EvgenJobTransforms/share/file/CategoryList.txt create mode 100644 Generators/EvgenJobTransforms/share/file/evgenkeywords.txt rename Generators/EvgenJobTransforms/share/{skeleton.ABtoEVGEN.py => skel.ABtoEVGEN.py} (73%) rename Generators/EvgenJobTransforms/share/{skeleton.GENtoEVGEN.py => skel.GENtoEVGEN.py} (61%) create mode 100644 Generators/EvgenJobTransforms/share/skel.GENtoTXT.py delete mode 100644 Generators/EvgenJobTransforms/share/skeleton.EVGENtoRivet.py delete mode 100644 Generators/EvgenJobTransforms/share/skeleton.EvtGenFromEVNT.py delete mode 100644 Generators/EvgenJobTransforms/test/EvgenJobTransforms_TestConfiguration.xml delete mode 100644 Generators/EvgenJobTransforms/test/setup_testenv delete mode 100644 Generators/EvgenJobTransforms/test/test_MC14_Pythia6_Wtaunu.py delete mode 100644 Generators/EvgenJobTransforms/test/test_MC14_Pythia8_Zee.py delete mode 100755 Generators/EvgenJobTransforms/test/test_alpgen_jimmy delete mode 100755 Generators/EvgenJobTransforms/test/test_alpgen_pythia delete mode 100755 Generators/EvgenJobTransforms/test/test_bphys delete mode 100755 Generators/EvgenJobTransforms/test/test_epos rename Generators/EvgenJobTransforms/test/{test_bphys.sh => test_gen_bphys.sh} (54%) rename Generators/EvgenJobTransforms/test/{test_epos.sh => test_gen_epos.sh} (56%) rename Generators/EvgenJobTransforms/test/{test_herwig7dijet.sh => test_gen_herwig7_dijet.sh} (55%) rename Generators/EvgenJobTransforms/test/{test_herwig7_minbias.sh => test_gen_herwig7_minbias.sh} (57%) rename Generators/EvgenJobTransforms/test/{test_herwig7_wjets.sh => test_gen_herwig7_wjets.sh} (54%) rename Generators/EvgenJobTransforms/test/{test_herwig7_zjets.sh => test_gen_herwig7_zjets.sh} (54%) create mode 100755 Generators/EvgenJobTransforms/test/test_gen_mg_LHEonly_WbWb.sh rename Generators/EvgenJobTransforms/test/{test_mgpythia8_Zmumu.sh => test_gen_mgpythia8_Zmumu.sh} (54%) rename Generators/EvgenJobTransforms/test/{test_mgpythia8_ttW.sh => test_gen_mgpythia8_ttW.sh} (53%) rename Generators/EvgenJobTransforms/test/{test_mgpythia8_tt_NLO.sh => test_gen_mgpythia8_tt_NLO.sh} (54%) rename Generators/EvgenJobTransforms/test/{test_powhegLHEonly_Ztautau.sh => test_gen_powhegLHEonly_Ztautau.sh} (56%) rename Generators/EvgenJobTransforms/test/{test_powheg_ttbar.sh => test_gen_powheg_ttbar.sh} (53%) rename Generators/EvgenJobTransforms/test/{test_powheg_wenu.sh => test_gen_powheg_wenu.sh} (55%) create mode 100755 Generators/EvgenJobTransforms/test/test_gen_powhegpy8TauolaPPEG.sh create mode 100755 Generators/EvgenJobTransforms/test/test_gen_py8_JZ2MultiBJetFilt.sh rename Generators/EvgenJobTransforms/test/{test_pythia8_jets.sh => test_gen_pythia8_jets.sh} (53%) create mode 100755 Generators/EvgenJobTransforms/test/test_gen_pythia8_minbias.sh rename Generators/EvgenJobTransforms/test/{test_pythia8_minbias_high.sh => test_gen_pythia8_minbias_high.sh} (54%) rename Generators/EvgenJobTransforms/test/{test_pythia8_ztautau.sh => test_gen_pythia8_ztautau.sh} (54%) rename Generators/EvgenJobTransforms/test/{test_qgsjet.sh => test_gen_qgsjet.sh} (55%) create mode 100755 Generators/EvgenJobTransforms/test/test_gen_sherpa_Z0.sh create mode 100755 Generators/EvgenJobTransforms/test/test_gen_sherpa_dy.sh create mode 100755 Generators/EvgenJobTransforms/test/test_gen_single.sh rename Generators/EvgenJobTransforms/test/{test_starlight.sh => test_gen_starlight.sh} (55%) delete mode 100755 Generators/EvgenJobTransforms/test/test_herwig7 delete mode 100755 Generators/EvgenJobTransforms/test/test_herwig7dijet delete mode 100755 Generators/EvgenJobTransforms/test/test_herwigpp delete mode 100755 Generators/EvgenJobTransforms/test/test_mcatnlo_herwigpp delete mode 100755 Generators/EvgenJobTransforms/test/test_mcatnlo_jimmy delete mode 100755 Generators/EvgenJobTransforms/test/test_mgpythia8_Zmumu delete mode 100755 Generators/EvgenJobTransforms/test/test_mgpythia8_ttW delete mode 100755 Generators/EvgenJobTransforms/test/test_ph8TauolappEG_ztautau delete mode 100755 Generators/EvgenJobTransforms/test/test_ph8TauolappEG_ztautau.sh delete mode 100755 Generators/EvgenJobTransforms/test/test_powheg_pythia_evtgen_wt delete mode 100755 Generators/EvgenJobTransforms/test/test_powheg_pythia_evtgen_wt.sh delete mode 100755 Generators/EvgenJobTransforms/test/test_powheg_ttbar delete mode 100755 Generators/EvgenJobTransforms/test/test_powheg_wenu delete mode 100755 Generators/EvgenJobTransforms/test/test_powhegpy8TauolaPPEG delete mode 100755 Generators/EvgenJobTransforms/test/test_powhegpy8TauolaPPEG.sh delete mode 100755 Generators/EvgenJobTransforms/test/test_pythia8_evtgen delete mode 100755 Generators/EvgenJobTransforms/test/test_pythia8_jets delete mode 100755 Generators/EvgenJobTransforms/test/test_pythia8_minbias delete mode 100755 Generators/EvgenJobTransforms/test/test_pythia8_minbias.sh delete mode 100755 Generators/EvgenJobTransforms/test/test_pythia8_minbias_high delete mode 100755 Generators/EvgenJobTransforms/test/test_pythia8_powheg delete mode 100755 Generators/EvgenJobTransforms/test/test_pythia8_powheg.sh delete mode 100755 Generators/EvgenJobTransforms/test/test_pythia8_ztautau delete mode 100755 Generators/EvgenJobTransforms/test/test_qgsjet delete mode 100755 Generators/EvgenJobTransforms/test/test_sherpa_dy delete mode 100755 Generators/EvgenJobTransforms/test/test_sherpa_dy.sh delete mode 100755 Generators/EvgenJobTransforms/test/test_single delete mode 100755 Generators/EvgenJobTransforms/test/test_single.sh create mode 100755 Generators/EvgenProdTools/scripts/simple_lhe_plotter.py create mode 100644 Generators/EvgenProdTools/share/common/EnableFixHepMC.py create mode 100644 Generators/EvgenProdTools/share/common/find_unique_file.py create mode 100644 Generators/EvgenProdTools/share/common/merge_lhe_files.py create mode 100644 Generators/EvgenProdTools/share/common/mult_lhe_input.py create mode 100644 Generators/EvgenProdTools/share/file/G4particle_whitelist.txt create mode 100644 Generators/EvgenProdTools/share/file/susyParticlePdgid.txt create mode 100644 Generators/Herwig7_i/share/common/Herwig71_AngularShowerScaleVariations.py create mode 100644 Generators/Herwig7_i/share/common/Herwig71_DipoleShowerScaleVariations.py create mode 100644 Generators/Herwig7_i/share/example/BuiltinME/MC15.999999.Herwig7_Dijet.py create mode 100644 Generators/Herwig7_i/share/example/BuiltinME/mc.Herwig7_Dijet.py create mode 100644 Generators/Herwig7_i/share/example/FxFx/mc.MGH7_FxFx_H71-DEFAULT_test.py create mode 100644 Generators/Herwig7_i/share/example/Generic/mc.PhH7_H71-DEFAULT_LHE_ExistingInfile.py create mode 100644 Generators/Herwig7_i/share/example/Generic/mc.PhH7_H71-DEFAULT_LHE_ExistingRunfile.py create mode 100644 Generators/Herwig7_i/share/example/LHEF/mc.MGH7_H71-DEFAULT_LHE.py create mode 100644 Generators/Herwig7_i/share/example/LHEF/mc.PhH7_H71-DEFAULT_LHE.py create mode 100644 Generators/Herwig7_i/share/example/Matchbox/mc.H7_Matchbox_Internal_Zee_H71-DEFAULT.py create mode 100644 Generators/Herwig7_i/share/example/Matchbox/mc.H7_Matchbox_Internal_Zee_H71-DEFAULT_Gridpack.py create mode 100644 Generators/Herwig7_i/share/example/Matchbox/mc.H7_Matchbox_Internal_Zee_H71-DEFAULT_Gridpack_Int2.py create mode 100644 Generators/Herwig7_i/share/example/Matchbox/mc.H7_Matchbox_Internal_Zee_H71-DEFAULT_Int2.py create mode 100644 Generators/Herwig7_i/share/example/Matchbox/mc.H7_Matchbox_Internal_ttbar_H71-DEFAULT.py create mode 100644 Generators/Herwig7_i/share/file/Herwig71Inclusive.pdt diff --git a/Generators/EvgenJobTransforms/python/EvgenConfig.py b/Generators/EvgenJobTransforms/python/EvgenConfig.py index c2dbfc83d9d..2c699f9f79a 100644 --- a/Generators/EvgenJobTransforms/python/EvgenConfig.py +++ b/Generators/EvgenJobTransforms/python/EvgenConfig.py @@ -1,12 +1,13 @@ -# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration - +# Copyright (C) 2002-2020 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 ## just used to determine the input file dummy-naming strategy for C++ generators) lhefGenerators = ["Lhef", # generic name: prefer to use the names below - "aMcAtNlo", "McAtNlo", "Powheg", "PowHel", "MadGraph", "CompHep", "CalcHep", - "Whizard", "MCFM", "JHU", "MEtop", "Charybdis", "Charybdis2","BCVEGPY", "Dire4Pythia8", - "BlackMax", "QBH", "gg2ww", "gg2zz", "gg2vv", "HvyN", "VBFNLO", "FPMC", "ProtosLHEF"] + "aMcAtNlo", "McAtNlo", "Powheg", "PowHel", "MadGraph", "CompHep", "CalcHep","Geneva", + "Whizard", "MCFM", "JHU", "MEtop", "Charybdis", "Charybdis2", "BCVEGPY", "Dire4Pythia8", + "BlackMax", "QBH", "gg2ww", "gg2zz", "gg2vv", "HvyN", "VBFNLO", "FPMC", "ProtosLHEF", + "BCVEGPY", "STRINGS"] ## A more general list of generators which provide partonic input, including non-LHEF ones inputGenerators = lhefGenerators + ["Alpgen", "Protos"] @@ -26,11 +27,11 @@ mainGenerators += ["Exhume", "Phojet", "Epos", "QGSJet"] mainGenerators += ["ParticleGenerator", "ParticleGun"] mainGenerators += ["CosmicGenerator", "BeamHaloGenerator"] ## Heavy ion generators -mainGenerators += ["Starlight", "Hijing", "Hydjet", "Reldis", "Pyquen"] +mainGenerators += ["AMPT","Superchic","Starlight", "Hijing", "Hydjet", "Reldis", "Pyquen"] ## Misc generators mainGenerators += ["AcerMC", "TopRex", "LPair"] ## Reading in fully-formed events -mainGenerators += ["HepMCAscii"] +mainGenerators += ["HepMCAscii", "ReadMcAscii"] ## Special QED and decay afterburners afterburnerGenerators = ["Photos", "Photospp", "Tauola", "TauolaPP", "Tauolapp", "EvtGen", "ParticleDecayer"] @@ -41,7 +42,7 @@ afterburnerGenerators = ["Photos", "Photospp", "Tauola", "TauolaPP", "Tauolapp", knownGenerators = inputGenerators + mainGenerators + afterburnerGenerators ## Note which generators should NOT be sanity tested by the TestHepMC alg -notesthepmcGenerators = ["ParticleDecayer", "ParticleGun", "CosmicGenerator", "BeamHaloGenerator", "FPMC", +notesthepmcGenerators = ["Superchic","ParticleDecayer", "ParticleGun", "CosmicGenerator", "BeamHaloGenerator", "FPMC", "Hijing", "Hydjet", "Starlight", "PythiaRhad"] ## Generators with no flexibility/concept of a tune or PDF choice @@ -111,6 +112,7 @@ class EvgenConfig(TransformConfig): notes = String("Extra information about this process e.g. known current problems") contact = ListOfStrings("Contact person for this dataset. Leave empty for 'MC group'") keywords = ListOfStrings("Search keywords for this dataset, e.g. 'QCD', 'EW', 'minbias', ...") + categories = ListOfStrings("Category keywords for this dataset, e.g. 'L1:Top', 'L2:RareTop'") inputfilecheck = String("A regex to check that the input file needed for some generators has a valid name") inputconfcheck = String("A regex to check that the config file needed for some generators has a valid name") specialConfig = String("Special configuration for subsequent prod steps") @@ -119,14 +121,19 @@ class EvgenConfig(TransformConfig): findJets = Boolean("Schedule jet finding algorithms for each defined jet container", False) doNotSaveItems = ListOfStrings("List of StreamEVGEN items to NOT save in output file - note occurs BEFORE extraSaveItems are added") extraSaveItems = ListOfStrings("List of extra StreamEVGEN items to save in output file - note occurs AFTER doNotSaveItems are removed") + inputFilesPerJob = Integer("number of input files per job",0, AllowedExpression("value >= 0")) + nEventsPerJob = Integer("number of input events per job",0, AllowedExpression("value >= 0")) + obsolete = Boolean("Are JOs/common fragment obsolete", False) def __init__(self, name="evgenConfig"): TransformConfig.__init__(self, name) self.contact = ["MC group"] self.auxfiles = ["PDGTABLE.MeV", "pdt.table", "DECAY.DEC", "Bdecays0.dat", "Bs2Jpsiphi.DEC","G4particle_whitelist.txt","susyParticlePdgid.txt"] - self.minevents = 5000 + self.nEventsPerJob = 10000 self.maxeventsstrategy = "ABORT" self.specialConfig = "NONE" +# for the sake of Generate_tf leave minevents for a while + self.minevents = 5000 ## Explicitly block MC11/12 settings of efficiency, input*base, or weighting attrs def __setattr__(self, name, value): diff --git a/Generators/EvgenJobTransforms/python/download.py b/Generators/EvgenJobTransforms/python/download.py index 25b0ad26d8c..30b82118d34 100644 --- a/Generators/EvgenJobTransforms/python/download.py +++ b/Generators/EvgenJobTransforms/python/download.py @@ -37,3 +37,4 @@ def downloadUsingProxy(url, filename=None): msg += "All download attempts failed" return 1, msg return 0, msg + diff --git a/Generators/EvgenJobTransforms/python/evgenTrfArgs.py b/Generators/EvgenJobTransforms/python/evgenTrfArgs.py index bacd7779751..886112ca1d4 100644 --- a/Generators/EvgenJobTransforms/python/evgenTrfArgs.py +++ b/Generators/EvgenJobTransforms/python/evgenTrfArgs.py @@ -1,4 +1,4 @@ -# Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration +# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration import PyJobTransforms.trfArgClasses as trfArgClasses @@ -11,7 +11,7 @@ def addStdEvgenArgs(parser): help='Manual run number setting') parser.add_argument("--ecmEnergy", "--EcmEnergy", group="Evgen", - default=trfArgClasses.argFloat(8000, runarg=True), + default=trfArgClasses.argFloat(13000, runarg=True), help="centre-of-mass energy parameter in GeV", type=trfArgClasses.argFactory(trfArgClasses.argFloat, runarg=True)) @@ -84,6 +84,7 @@ def addStdEvgenArgs(parser): parser.add_argument("--outputTXTFile", group="Evgen", help="optional output TXT file for LHEF events, default is None", type=trfArgClasses.argFactory(trfArgClasses.argLHEFile, io='output', runarg=True)) + parser.add_argument("--generatorRunMode", group="Evgen", help="Run mode to pass on to the event generator", default=trfArgClasses.argString("run", runarg=True), diff --git a/Generators/EvgenJobTransforms/scripts/AfterBurner_tf.py b/Generators/EvgenJobTransforms/scripts/AfterBurner_tf.py index 232d15d4005..502107d577d 100755 --- a/Generators/EvgenJobTransforms/scripts/AfterBurner_tf.py +++ b/Generators/EvgenJobTransforms/scripts/AfterBurner_tf.py @@ -1,5 +1,5 @@ -# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration - +# Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration +# #! /usr/bin/env python """ @@ -14,7 +14,6 @@ from PyJobTransforms.trfArgs import addAthenaArguments from PyJobTransforms.trfDecorators import stdTrfExceptionHandler, sigUsrStackTrace from EvgenJobTransforms.evgenTrfArgs import addStdEvgenArgs import PyJobTransforms.trfArgClasses as trfArgClasses -from EvgenJobTransforms.jo_proxy import mk_jo_proxy ## Prodsys1 hack... @@ -47,6 +46,36 @@ class EvgenExecutor(athenaExecutor): zf.extractall() zf.close() + def get_immediate_subdirectories(a_dir): + return [name for name in os.listdir(a_dir) + if os.path.isdir(os.path.join(a_dir, name))] + + def mk_jo_proxy(targetbasepath, pkgname, proxypath, addtosearch=True): + "Make a JO proxy dir such that the MCxxJobOptions/dddd dirs contents are found via include(MCxxJobOptions/yyyy)" + if proxypath: + if os.path.exists(proxypath): + shutil.rmtree(proxypath) + os.mkdir(proxypath) + os.environ['LOCAL_INSTALL_DIR'] = (os.environ['JOBOPTSEARCHPATH']).split(":")[0] + comdir = os.path.join(targetbasepath, "common") + subdirlist = get_immediate_subdirectories(comdir) + subdirlist1 = ['common/%s' % item for item in subdirlist] + dirlist = ['common','share','gencontrol','susycontrol'] + for d in (dirlist+subdirlist1): + # TODO: we could _maybe_ add the appropriate share/DSIDxxxx/ dir to the path based on the jobConfig arg... too much magic? + if (d != 'common/.svn'): + dpath = os.path.join(proxypath, d) + + if proxypath: + os.mkdir(dpath) + os.symlink(os.path.join(targetbasepath, d), os.path.join(dpath, pkgname)) + if addtosearch: + os.environ["JOBOPTSEARCHPATH"] = dpath+":"+os.environ["JOBOPTSEARCHPATH"] + os.environ["DATAPATH"] =os.path.join(targetbasepath, d)+":"+os.environ["DATAPATH"] + + os.environ["JOBOPTSEARCHPATH"] = os.environ['LOCAL_INSTALL_DIR']+":"+os.environ["JOBOPTSEARCHPATH"] + + ## Handle locating of evgen job options / fragments, either from a tarball or CVMFS if "evgenJobOpts" in self._trf.argdict: ## Use a specified JO tarball tarball = self._trf.argdict["evgenJobOpts"].value diff --git a/Generators/EvgenJobTransforms/scripts/EvtGenFromEVNT_tf.py b/Generators/EvgenJobTransforms/scripts/EvtGenFromEVNT_tf.py old mode 100755 new mode 100644 index 6de8db970d9..9b33ead3f0f --- a/Generators/EvgenJobTransforms/scripts/EvtGenFromEVNT_tf.py +++ b/Generators/EvgenJobTransforms/scripts/EvtGenFromEVNT_tf.py @@ -35,7 +35,6 @@ def main(): def getTransform(): executorSet = set() - print(type(executorSet)) executorSet.add(athenaExecutor(name = 'EvtGenFromEVNT', skeletonFile = 'EvgenJobTransforms/skeleton.EvtGenFromEVNT.py',inData = ['EVNT'], outData = ['EVNT_MRG'])) trf = transform(executor = executorSet) @@ -60,3 +59,4 @@ def addMyArgs(parser): if __name__ == '__main__': main() + diff --git a/Generators/EvgenJobTransforms/scripts/Gen_tf.py b/Generators/EvgenJobTransforms/scripts/Gen_tf.py new file mode 100755 index 00000000000..e3f98ec28c6 --- /dev/null +++ b/Generators/EvgenJobTransforms/scripts/Gen_tf.py @@ -0,0 +1,244 @@ +#! /usr/bin/env python + +# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration +# +""" +# Run event generation and produce an EVNT file. +""" + +import os, sys, time, shutil +from PyJobTransforms.trfLogger import msg +from PyJobTransforms.transform import transform +from PyJobTransforms.trfExe import athenaExecutor +from PyJobTransforms.trfArgs import addAthenaArguments +from PyJobTransforms.trfDecorators import stdTrfExceptionHandler, sigUsrStackTrace +from EvgenJobTransforms.evgenTrfArgs import addStdEvgenArgs +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'] + +class EvgenExecutor(athenaExecutor): + "Specialised trf executor class for event generation jobs" + def __init__(self, name="generate", skeleton=None, substep=None, inData=set(), outData=set()): + athenaExecutor.__init__(self, name=name, skeletonFile=skeleton, substep=substep, inputEventTest=False, tryDropAndReload=False, inData=inData, outData=outData) + + def preExecute(self, input=set(), output=set()): + "Get input tarball, unpack and set up env if an evgenJobOpts arg was provided." + + ## First call the base class preExecute + super(EvgenExecutor, self).preExecute(input, output) + + def expand_if_archive(filename): + "Function to expand a file if it is a zip archive or tarball" + if ".tar" in filename: + import tarfile + tf = tarfile.open(filename) + tf.extractall() + tf.close() + elif filename.endswith(".zip"): + import zipfile + zf = zipfile.ZipFile(filename) + zf.extractall() + zf.close() + + def get_immediate_subdirectories(a_dir): + return [name for name in os.listdir(a_dir) + if os.path.isdir(os.path.join(a_dir, name))] + + ## Handle locating of evgen job options / fragments, either from a tarball or CVMFS + # read the JO directory + os.environ['LOCAL_INSTALL_DIR'] = (os.environ['JOBOPTSEARCHPATH']).split(":")[0] + CommonCvmfsDir = '/cvmfs/atlas.cern.ch/repo/sw/Generators/MCJobOptions/common' + os.environ["JOBOPTSEARCHPATH"] = CommonCvmfsDir+":"+os.environ["JOBOPTSEARCHPATH"] + if os.path.exists('/cvmfs/atlas.cern.ch/repo/sw/Generators/MCJobOptions/common/MadGraphControl/dat/'): + datCvmfsDir = '/cvmfs/atlas.cern.ch/repo/sw/Generators/MCJobOptions/common/MadGraphControl/dat/' + os.environ["DATAPATH"] = datCvmfsDir+":"+os.environ["DATAPATH"] + dsidparam = (self._trf.argdict["jobConfig"].value).values()[0][0] + # Adding cvmfs path to JOBOPTSEARCHPATH + BaseCvmfsPath = "/cvmfs/atlas.cern.ch/repo/sw/Generators/MCJobOptions/" + + if len(dsidparam)==6 and dsidparam.isdigit(): #only dsid is provided, add cvmfs folder like 123xxx to JOBOPTSEARCHPATH + Jodir = dsidparam[:3]+'xxx' + cwdir = os.getcwd() + cwd_ful = os.path.join(cwdir, dsidparam) + if (os.path.isdir(cwd_ful)): + os.environ["JOBOPTSEARCHPATH"] = cwd_ful+":"+os.environ["JOBOPTSEARCHPATH"] + os.environ["DATAPATH"] = cwd_ful+":"+os.environ["DATAPATH"] + else: + cwd_Jodir = os.path.join(cwdir,Jodir) + cwd_Jodir_ful = os.path.join(cwd_Jodir,dsidparam) + if (os.path.isdir(cwd_Jodir_ful)): + os.environ["JOBOPTSEARCHPATH"] = cwd_Jodir_ful+":"+os.environ["JOBOPTSEARCHPATH"] + os.environ["DATAPATH"] = cwd_Jodir_ful+":"+os.environ["DATAPATH"] + else: + JoCvmfsPath = os.path.join(BaseCvmfsPath, Jodir) + JoCvmfsPath_ful = os.path.join(JoCvmfsPath, dsidparam) + os.environ["JOBOPTSEARCHPATH"] = JoCvmfsPath_ful+":"+os.environ["JOBOPTSEARCHPATH"] + os.environ["DATAPATH"] = JoCvmfsPath_ful+":"+os.environ["DATAPATH"] + + + else: #Suppose full path of dsid folder is provided(/afs/.../123xxx/123456), add cvmfs floder and local path(/afs/.../123xxx) to JOBOPTSEARCHPATH + if (os.path.isdir(dsidparam)): + os.environ["JOBOPTSEARCHPATH"] = dsidparam+":"+os.environ["JOBOPTSEARCHPATH"] + os.environ["DATAPATH"] = dsidparam+":"+os.environ["DATAPATH"] + else: + msg.error("JOs not found, please check = '%s'" % dsidparam) + + + + msg.info("Using JOBOPTSEARCHPATH = '%s'" % os.environ["JOBOPTSEARCHPATH"]) + msg.info("Using DATAPATH = '%s'" % os.environ["DATAPATH"]) + + if "evgenJobOpts" in self._trf.argdict: ## Use a specified JO tarball + tarball = self._trf.argdict["evgenJobOpts"].value + ## Prepend the standard tarball URL prefix if the arg is not a full URL + # TODO: also allow a copy from a local filesystem location if it starts with a / (or can be found with os.path)? + if tarball.startswith("http"): + url = tarball + tarball = os.basename(tarball) + else: + url = "http://cern.ch/atlas-computing/links/kitsDirectory/EvgenJobOpts/" + tarball + ## Download the tarball in a Grid-safe way (if it doesn't already exist) + if not os.path.exists(tarball): + from EvgenJobTransforms.download import downloadUsingProxy + status, output = downloadUsingProxy(url) + if status != 0: + raise EnvironmentError('Error downloading tarball %s. Downloader reports: %s' % (tarball, output)) + msg.info('Evgen tarball download success: %s' % output) + ## Expand tarball + expand_if_archive(tarball) + ## Source setup script (requires some shenanigans to update the Python env robustly) + # TODO: trf framework now bans use of exec()... + + # copy config files to cwd + FIRST_DIR = (os.environ['JOBOPTSEARCHPATH']).split(":")[0] + configFiles = [f for f in os.listdir(FIRST_DIR) if ( "GRID" in f)] + if len(configFiles) == 1: + confFile = os.path.join(FIRST_DIR, configFiles[0]) + expand_if_archive(confFile) + msg.info('Configuration input found: %s' % confFile) + elif len(configFiles) >1: + msg.error("Too many *GRID* config files, please check = '%s'" % dsidparam) + + #Expand if a tarball is found in local directory + loc_files = os.listdir(os.getcwd()) + for loc_file in loc_files: + expand_if_archive(loc_file) + + + ## 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) + 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) + files.sort() + for f in files: + for i in whitelist: + if i in f: + src = tmp_dir+"/"+f + dest = main_dir+"/"+f + os.rename(src,dest) + break + + +def getTransform(): + exeSet = set() + msg.info("Transform arguments %s" % sys.argv[1:]) + if "--outputEVNTFile" in str(sys.argv[1:]): + exeSet.add(EvgenExecutor(name="generate", skeleton="EvgenJobTransforms/skel.GENtoEVGEN.py", inData=["inNULL"], outData=["EVNT", "EVNT_Pre", "TXT" ])) + msg.info("Output EVNT file") + elif "--outputTXTFile" in str(sys.argv[1:]): + exeSet.add(EvgenExecutor(name="generate", skeleton="EvgenJobTransforms/skel.GENtoTXT.py", inData=["inNULL"], outData=["TXT"])) + msg.info("Output TXT file") + else: + msg.error("Output cannot be recognised") + + exeSet.add(EvgenExecutor(name="afterburn", skeleton="EvgenJobTransforms/skel.ABtoEVGEN.py", inData=["EVNT_Pre"], outData=["EVNT"])) + exeSet.add(athenaExecutor(name = "AODtoDPD", skeletonFile = "PATJobTransforms/skeleton.AODtoDPD_tf.py", + substep = "a2d", inData = ["EVNT"], outData = ["NTUP_TRUTH"], perfMonFile = "ntuple_AODtoDPD.pmon.gz")) + trf = transform(executor=exeSet) + addAthenaArguments(trf.parser, maxEventsDefaultSubstep='all') + addStdEvgenArgs(trf.parser) + return trf + + +@stdTrfExceptionHandler +@sigUsrStackTrace +def main(): + msg.info("This is %s" % sys.argv[0]) + + main_dir = os.getcwd() + trf = getTransform() + trf.parseCmdLineArgs(sys.argv[1:]) + if (("cleanOut" in trf.argdict) and (trf.argdict["cleanOut"].value != 0)): + name_tmpdir = "tmprun" + tmp_dir = os.path.join(main_dir, name_tmpdir) + 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.execute() + trf.generateReport() + msg.info("%s stopped at %s, trf exit code %d" % (sys.argv[0], time.asctime(), trf.exitCode)) + + +# read files/dirs that should be saved and if present in cwd - remove + + if (("cleanOut" in trf.argdict) and (trf.argdict["cleanOut"].value!=0)): + whitelist_out = ['log.generate','.root'] + if "outputTXTFile" in trf.argdict: + whitelist_out.append('TXT') + 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) + elif os.path.isfile(test_ex): + os.remove(test_ex) + 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 not saveList[0].isdigit(): + shutil.rmtree(tmp_dir, ignore_errors=True) +# if cleanOut is not defined and multipleinput preset, remove the merged file + elif ("inputGeneratorFile" in trf.argdict): + myinputfiles = trf.argdict["inputGeneratorFile"].value + genInputFiles = myinputfiles.split(',') + numberOfFiles = len(genInputFiles) + merge_file = 'merged_lhef._0.events' + if((numberOfFiles>1) and (os.path.exists(merge_file))): + os.remove(merge_file) +# + if (("lheOnly" in trf.argdict ) and (trf.argdict["lheOnly"].value == 1)): + outputName = ''.join(trf.argdict["outputEVNTFile"].value) + os.remove(outputName) + sys.exit(trf.exitCode) + + +# TODO: Open resulting EVNT file to extract cross-section, generator names+versions, etc. from the HepMC::GenRun or whatever... in an executor postExecute? + + +if __name__ == "__main__": + main() diff --git a/Generators/EvgenJobTransforms/scripts/Rivet_tf.py b/Generators/EvgenJobTransforms/scripts/Rivet_tf.py index fc5319a96ce..bdefb584669 100755 --- a/Generators/EvgenJobTransforms/scripts/Rivet_tf.py +++ b/Generators/EvgenJobTransforms/scripts/Rivet_tf.py @@ -1,6 +1,6 @@ -#! /usr/bin/env python +# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration -# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration +#! /usr/bin/env python """ Take an input EVNT file and run Rivet on it diff --git a/Generators/EvgenJobTransforms/share/Generate_ecmenergies.py b/Generators/EvgenJobTransforms/share/Generate_ecmenergies.py index 676db943db0..6b587bca4e8 100644 --- a/Generators/EvgenJobTransforms/share/Generate_ecmenergies.py +++ b/Generators/EvgenJobTransforms/share/Generate_ecmenergies.py @@ -1,3 +1,7 @@ + +# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration + + ## Propagate energy argument to the generators # TODO: Standardise energy setting in the GenModule interface diff --git a/Generators/EvgenJobTransforms/share/Generate_randomseeds.py b/Generators/EvgenJobTransforms/share/Generate_randomseeds.py index c517e473be8..bda44ff6140 100644 --- a/Generators/EvgenJobTransforms/share/Generate_randomseeds.py +++ b/Generators/EvgenJobTransforms/share/Generate_randomseeds.py @@ -1,4 +1,10 @@ + +# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration + + ## Set random seeds depending on used generators +from __future__ import print_function +from __future__ import division genseeds = { 'Pythia' : ["PYTHIA OFFSET {rnd} 47898993 {rnd}", "PYTHIA_INIT 820021 2347532"], @@ -46,8 +52,12 @@ assert evgenConfig.generators if any(gen in ranluxlist for gen in evgenConfig.generators): evgenLog.info("Using RanLux random numbers!") atRndmGenSvc = svcMgr.AtRanluxGenSvc + atRndmGenSvc.EventReseeding = False + printfunc("Events will not be reseeded (RndmGenSvc) ") else: atRndmGenSvc = svcMgr.AtRndmGenSvc + atRndmGenSvc.EventReseeding = False + printfunc "Events will not be reseeded (RndmGenSvc) " ## Pass the random seed from the transform command line into each used generator's seed config string seedstrs = [] diff --git a/Generators/EvgenJobTransforms/share/LHEonly.py b/Generators/EvgenJobTransforms/share/LHEonly.py new file mode 100644 index 00000000000..921b9dcc6b1 --- /dev/null +++ b/Generators/EvgenJobTransforms/share/LHEonly.py @@ -0,0 +1,49 @@ +# Common fragment for generation of 1 Pythia8 event, when producing LHE output only +# the number of events is set to 1 in two places: as Pythia param: Main:numberOfEvents = 1 and evgenconfig.nEventsPerJob=1 (the later one is stronger) +# It is needed to make the transform run +# No output is kept from this generation +## Base config for Pythia8 + +from __main__ import opts +import os +if 'ATHENA_PROC_NUMBER' in os.environ: + evgenLog.info('Noticed that you have run with an athena MP-like whole-node setup. Will re-configure now to make sure that the remainder of the job runs serially.') + njobs = os.environ.pop('ATHENA_PROC_NUMBER') + # Try to modify the opts underfoot + if not hasattr(opts,'nprocs'): mglog.warning('Did not see option!') + else: opts.nprocs = 0 + evgenLog.info('Options: ' + str(opts)) + +from Pythia8_i.Pythia8_iConf import Pythia8_i +genSeq += Pythia8_i("Pythia8") + +genSeq.Pythia8.Commands += [ + "Main:timesAllowErrors = 500", + "Main:numberOfEvents = 1", + "6:m0 = 172.5", + "23:m0 = 91.1876", + "23:mWidth = 2.4952", + "24:m0 = 80.399", + "24:mWidth = 2.085", + "StandardModel:sin2thetaW = 0.23113", + "StandardModel:sin2thetaWbar = 0.23146", + "ParticleDecays:limitTau0 = on", + "ParticleDecays:tau0Max = 10.0"] + +genSeq.Pythia8.Commands += [ + "Tune:pp = 5", + "MultipartonInteractions:bProfile = 4", + "MultipartonInteractions:a1 = 0.03", + "MultipartonInteractions:pT0Ref = 1.90", + "MultipartonInteractions:ecmPow = 0.30", + "PDF:pSet=LHAPDF6:MSTW2008lo68cl", + "ColourReconnection:range=2.28", + "SoftQCD:inelastic = on", + "SpaceShower:rapidityOrder=0"] + +evgenConfig.nEventsPerJob = 1 +del testSeq.TestHepMC + + + + diff --git a/Generators/EvgenJobTransforms/share/file/CategoryList.txt b/Generators/EvgenJobTransforms/share/file/CategoryList.txt new file mode 100644 index 00000000000..e4c7f36b92b --- /dev/null +++ b/Generators/EvgenJobTransforms/share/file/CategoryList.txt @@ -0,0 +1,52 @@ +['L1:Top', 'L2:TTbar'] +['L1:Top', 'L2:TTbarBBbar'] +['L1:Top', 'L2:SingleTop'] +['L1:Top', 'L2:RareTop'] +['L1:V+jets', 'L2:Winc_lv'] +['L1:V+jets', 'L2:Wjets_lv'] +['L1:V+jets', 'L2:Wqq'] +['L1:V+jets', 'L2:Zinc_ll'] +['L1:V+jets', 'L2:Zjets_ll'] +['L1:V+jets', 'L2:Zjets_vv'] +['L1:V+jets', 'L2:Zqq'] +['L1:V+jets', 'L2:ZplusX'] +['L1:V+jets', 'L2:DY'] +['L1:V+jets', 'L2:GammaJets'] +['L1:Multiboson', 'L2:0landIncl_Diboson'] +['L1:Multiboson', 'L2:1l_Diboson'] +['L1:Multiboson', 'L2:2l_Diboson'] +['L1:Multiboson', 'L2:3l_Diboson'] +['L1:Multiboson', 'L2:4l_Diboson'] +['L1:Multiboson', 'L2:Triboson'] +['L1:Multiboson', 'L2:PhotonX'] +['L1:Multijet and minimum bias', 'L2:Dijet'] +['L1:Multijet and minimum bias', 'L2:MultijetOther'] +['L1:Multijet and minimum bias', 'L2:Minbias'] +['L1:B physics', 'L2:BPhysics'] +['L1:ttbar+X', 'L2:TTbarX'] +['L1:Higgs', 'L2:Higgs_ggH'] +['L1:Higgs', 'L2:Higgs_VBF'] +['L1:Higgs', 'L2:Higgs_ttH'] +['L1:Higgs', 'L2:Higgs_VH'] +['L1:Higgs', 'L2:Higgs_BSM_ggH'] +['L1:Higgs', 'L2:Higgs_BSM_VBF'] +['L1:Higgs', 'L2:Higgs_BSM_Other'] +['L1:Exotics', 'L2:Exotics_Wprime'] +['L1:Exotics', 'L2:Exotics_Zprime'] +['L1:Exotics', 'L2:Exotics_BlackHole'] +['L1:Exotics', 'L2:Exotics_ContactInt'] +['L1:Exotics', 'L2:Exotics_Other'] +['L1:Exotics', 'L2:Exotics_RS'] +['L1:Exotics', 'L2:Exotics_DM'] +['L1:Exotics', 'L2:Exotics_Monotop'] +['L1:Exotics', 'L2:Exotics_Top'] +['L1:SUSY', 'L2:SUSY_GG'] +['L1:SUSY', 'L2:SUSY_SS'] +['L1:SUSY', 'L2:SUSY_TT_BB'] +['L1:SUSY', 'L2:SUSY_EWK'] +['L1:SUSY', 'L2:SUSY_Other'] +['L1:Performance', 'L2:Performance'] +['L1:Performance', 'L2:BTag'] +['L1:Performance', 'L2:SingleParticle'] +['L1:other samples', 'L2:Upgrade'] +['L1:other samples', 'L2:Unsorted'] diff --git a/Generators/EvgenJobTransforms/share/file/evgenkeywords.txt b/Generators/EvgenJobTransforms/share/file/evgenkeywords.txt new file mode 100644 index 00000000000..c69c58bf948 --- /dev/null +++ b/Generators/EvgenJobTransforms/share/file/evgenkeywords.txt @@ -0,0 +1,259 @@ +jets +dijet +multijet +monojet +0jet +1jet +2jet +3jet +4jet +5jet +6jet +photon +diphoton +monophoton +monotop +1photon +2photon +3photon +4photon +photonFusion +neutrino +muon +1muon +2muon +3muon +4muon +electron +1electron +2electron +3electron +4electron +tau +1tau +2tau +3tau +4tau +lepton +multilepton +1lepton +2lepton +3lepton +4lepton +leptonic +3flavour +4flavour +5flavour +singleParticle +pi0 +pi+ +pi- +rho +ADD +AQGC +BSM +BSMtop +Bd +Bminus +Bplus +B0 +Bprime +Bs +Dstar +CKKW +CPmixing +chargedHiggs +compressedSUSY +contactInteraction +drellYan +diboson +triboson +direct +gaugino +neutralino +chargino +slepton +squark +sbottom +stop +stau +gluino +gravitino +graviton +sneutrino +Higgs +Higgsino +Higgsless +HiggsCharacterisation +excited +excitedElectron +excitedMuon +excitedQuark +quark +exotic +FCNC +4thGen +AMBSB +GMSB +SUGRA +mSUGRA +SUSY +SM +SSM +CMSSM +MSSM +UED +mUED +heavyBoson +heavyFlavour +heavyVectorTriplet +hiddenValley +Jpsi +K0L +K0S +KKgluon +Kminus +Kplus +Lambda +Lambda121 +Lambda122 +Lambda133 +Lambda233 +Lambda_b0 +leptoSUSY +leptoquark +longLived +minBias +LO +NLO +blackhole +QCD +QED +RPV +RandallSundrum +renormalization +systematic +sameSign +oppositeSign +scalar +scaleDown +scaleUp +simplifiedModel +tripleGaugeCoupling +technicolor +triboson +seeSaw +upgrade +Upsilon +VBF +VBFHiggs +VBS +gluonFusionHiggs +CKM +W +Wprime +WHiggs +Wgamma +Z +Zprime +ZHiggs +Zgamma +ZZ +ZZW +WW +WZ +WWW +WWbb +WWll +WIMP +extraDimensions +warpedED +Wt +allHadronic +hadronic +neutron +proton +antineutron +antiproton +forwardPhysics +top +tHiggs +ttbar +ttHiggs +ttgammagamma +singleTop +ttV +ttZ +ttW +tZ +ttVV +4top +bottom +bottomonium +bTagging +bbbar +bHiggs +bbHiggs +ccbar +charm +charmonium +bino +boosted +cascadeDecay +coherent +compositeness +darkPhoton +diffraction +ND +SD +DD +CD +resonance +dissociation +egamma +electroweak +exclusive +inclusive +invisible +isosinglet +mAMSB +mass +mH125 +MPI +muF +muR +muFup +muRup +muFdown +muRdown +nonResonant +singlyResonant +nonSinglyResonant +nonCommutative +BSMHiggs +pMSSM +partonShower +peaking +performance +pileUp +rareDecay +sChannel +tChannel +scalarOctet +scale +SMHiggs +spin +spin0 +spin12 +spin1 +spin32 +spin2 +stealth +singleParticle +magneticMonopole +NUHM2 +hh +winobino +highElectricChargeObject +longitudinal +transverse diff --git a/Generators/EvgenJobTransforms/share/skeleton.ABtoEVGEN.py b/Generators/EvgenJobTransforms/share/skel.ABtoEVGEN.py similarity index 73% rename from Generators/EvgenJobTransforms/share/skeleton.ABtoEVGEN.py rename to Generators/EvgenJobTransforms/share/skel.ABtoEVGEN.py index aa84dd89c97..6342fa9ea15 100644 --- a/Generators/EvgenJobTransforms/share/skeleton.ABtoEVGEN.py +++ b/Generators/EvgenJobTransforms/share/skel.ABtoEVGEN.py @@ -1,9 +1,6 @@ -"""Functionality core of the Generate_tf transform""" -from __future__ import print_function -from __future__ import division - -from future import standard_library -standard_library.install_aliases() +# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration +# +"""Functionality core of the Gen_tf transform""" ##============================================================== ## Basic configuration @@ -11,6 +8,12 @@ standard_library.install_aliases() ## Create sequences for generators, clean-up algs, filters and analyses ## and import standard framework objects with standard local scope names +from __future__ import print_function +from __future__ import division + +from future import standard_library +standard_library.install_aliases() + import os, re, string import AthenaCommon.AlgSequence as acas import AthenaCommon.AppMgr as acam @@ -18,8 +21,6 @@ from AthenaCommon.AthenaCommonFlags import jobproperties theApp = acam.theApp acam.athMasterSeq += acas.AlgSequence("EvgenGenSeq") genSeq = acam.athMasterSeq.EvgenGenSeq -#acam.athMasterSeq += acas.AlgSequence("EvgenFixSeq") -#fixSeq = acam.athMasterSeq.EvgenFixSeq acam.athMasterSeq += acas.AlgSequence("EvgenPreFilterSeq") prefiltSeq = acam.athMasterSeq.EvgenPreFilterSeq acam.athMasterSeq += acas.AlgSequence("EvgenTestSeq") @@ -56,9 +57,13 @@ svcMgr += AtRanluxGenSvc() ## Jobs should stop if an include fails. jobproperties.AthenaCommonFlags.AllowIgnoreConfigError = False +## Compatibility with jets +from RecExConfig.RecConfFlags import jobproperties +jobproperties.RecConfFlags.AllowBackNavigation = True + ## Set up a standard logger from AthenaCommon.Logging import logging -evgenLog = logging.getLogger('Generate') +evgenLog = logging.getLogger('Generate_ab') ##============================================================== @@ -69,6 +74,14 @@ evgenLog = logging.getLogger('Generate') evgenLog.debug("****************** CHECKING EVENT GENERATION ARGS *****************") evgenLog.debug(str(runArgs)) +if hasattr(runArgs, "runNumber"): + evgenLog.warning("##########################################################################" ) + evgenLog.warning("runNumber - no longer a valid argument, do not use it ! " ) + evgenLog.warning("##########################################################################") + +if hasattr(runArgs, "inputGenConfFile"): + raise RuntimeError("inputGenConfFile is invalid !! Gridpacks and config. files/links to be put into DSID directory ") + ## Ensure that an output name has been given # TODO: Allow generation without writing an output file (if outputEVNTFile is None)? if not hasattr(runArgs, "outputEVNTFile") and not hasattr(runArgs, "outputEVNT_PreFile"): @@ -79,9 +92,6 @@ if not hasattr(runArgs, "ecmEnergy"): raise RuntimeError("No center of mass energy provided.") if not hasattr(runArgs, "randomSeed"): raise RuntimeError("No random seed provided.") -if not hasattr(runArgs, "runNumber"): - raise RuntimeError("No run number provided.") - # TODO: or guess it from the JO name?? if not hasattr(runArgs, "firstEvent"): raise RuntimeError("No first number provided.") @@ -98,11 +108,6 @@ evgenLog.debug("****************** CONFIGURING EVENT GENERATION **************** from EvgenJobTransforms.EvgenConfig import evgenConfig from EvgenJobTransforms.EvgenConfig import gens_known, gens_lhef, gen_sortkey, gens_testhepmc, gens_notune -## Fix non-standard event features -#from EvgenProdTools.EvgenProdToolsConf import FixHepMC -#if not hasattr(fixSeq, "FixHepMC"): -# fixSeq += FixHepMC() - ## Sanity check the event record (not appropriate for all generators) from EvgenProdTools.EvgenProdToolsConf import TestHepMC testSeq += TestHepMC(CmEnergy=runArgs.ecmEnergy*Units.GeV) @@ -114,8 +119,6 @@ svcMgr.THistSvc.Output = ["TestHepMCname DATAFILE='TestHepMC.root' OPT='RECREATE ## Copy the event weight from HepMC to the Athena EventInfo class # TODO: Rewrite in Python? from EvgenProdTools.EvgenProdToolsConf import CopyEventWeight - #if not hasattr(postSeq, "CopyEventWeight"): -# postSeq += CopyEventWeight() ## Configure the event counting (AFTER all filters) # TODO: Rewrite in Python? @@ -126,7 +129,7 @@ svcMgr.EventSelector.FirstEvent = runArgs.firstEvent theApp.EvtMax = -1 if not hasattr(postSeq, "CountHepMC"): postSeq += CountHepMC() -postSeq.CountHepMC.RequestedOutput = evgenConfig.minevents if runArgs.maxEvents == -1 else runArgs.maxEvents +postSeq.CountHepMC.RequestedOutput = evgenConfig.nEventsPerJob if runArgs.maxEvents == -1 else runArgs.maxEvents postSeq.CountHepMC.FirstEvent = runArgs.firstEvent postSeq.CountHepMC.CorrectHepMC = False postSeq.CountHepMC.CorrectEventID = True @@ -181,34 +184,27 @@ def OutputTXTFile(): if len(runArgs.jobConfig) != 1: evgenLog.error("You must supply one and only one jobConfig file argument") sys.exit(1) -jo = runArgs.jobConfig[0] -jofile = os.path.basename(jo) -joparts = jofile.split(".") -## Perform some consistency checks if this appears to be an "official" production JO -officialJO = False -if joparts[0].startswith("MC") and all(c in string.digits for c in joparts[0][2:]): +msg.info("Using JOBOPTSEARCHPATH!! = '%s'" % os.environ["JOBOPTSEARCHPATH"]) +FIRST_DIR = (os.environ['JOBOPTSEARCHPATH']).split(":")[0] + +jofiles = [f for f in os.listdir(FIRST_DIR) if (f.startswith('mc') and f.endswith('.py'))] + +if len(jofiles) !=1: + evgenLog.error("You must supply one and only one jobOption file in DSID directory") + sys.exit(1) + +jofile = jofiles[0] +joparts = (os.path.basename(jofile)).split(".") + +if joparts[0].startswith("mc"): #and all(c in string.digits for c in joparts[0][2:]): officialJO = True - ## Check that the JO does not appear to be an old one, since we can't use those - if int(joparts[0][2:]) < 14: - evgenLog.error("MC14 (or later) job option scripts are needed to work with Generate_tf!") - evgenLog.error(jo + " will not be processed: please rename or otherwise update to a >= MC14 JO.") - sys.exit(1) - ## Check that there are exactly 4 name parts separated by '.': MCxx, DSID, physicsShort, .py - if len(joparts) != 4: - evgenLog.error(jofile + " name format is wrong: must be of the form MC<xx>.<yyyyyy>.<physicsShort>.py: please rename.") - sys.exit(1) - ## Check the DSID part of the name - jo_dsidpart = joparts[1] - try: - jo_dsidpart = int(jo_dsidpart) - if runArgs.runNumber != jo_dsidpart: - raise Exception() - except: - evgenLog.error("Expected dataset ID part of JO name to be '%s', but found '%s'" % (str(runArgs.runNumber), jo_dsidpart)) + ## Check that there are exactly 3 name parts separated by '.': mc, physicsShort, .py + if len(joparts) != 3: + evgenLog.error(jofile + " name format is wrong: must be of the form mc.<physicsShort>.py: please rename.") sys.exit(1) ## Check the length limit on the physicsShort portion of the filename - jo_physshortpart = joparts[2] - if len(jo_physshortpart) > 60: + jo_physshortpart = joparts[1] + if len(jo_physshortpart) > 50: evgenLog.error(jofile + " contains a physicsShort field of more than 60 characters: please rename.") sys.exit(1) ## There must be at least 2 physicsShort sub-parts separated by '_': gens, (tune)+PDF, and process @@ -217,10 +213,16 @@ if joparts[0].startswith("MC") and all(c in string.digits for c in joparts[0][2: evgenLog.error(jofile + " has too few physicsShort fields separated by '_': should contain <generators>(_<tune+PDF_if_available>)_<process>. Please rename.") sys.exit(1) ## NOTE: a further check on physicsShort consistency is done below, after fragment loading + check_jofiles="/cvmfs/atlas.cern.ch/repo/sw/Generators/MC16JobOptions/scripts/check_jo_consistency.py" + if os.path.exists(check_jofiles): + include(check_jofiles) + check_naming(os.path.basename(jofile)) + else: + evgenLog.error("check_jo_consistency.py not found") + sys.exit(1) ## Include the JO fragment -include(jo) - +include(jofile) ##============================================================== ## Config validation and propagation to services, generators, etc. @@ -233,8 +235,13 @@ evgenLog.debug("****************** CHECKING EVGEN CONFIGURATION **************** for opt in str(evgenConfig).split(os.linesep): evgenLog.info(opt) +evgenLog.info(".transform = Gen_tf") ## Sort and check generator name / JO name consistency ## +## Check that the common fragments are not obsolete: +if evgenConfig.obsolete: + evgenLog.error("JOs or icludes are obsolete, please check them") + sys.exit(1) ## Check that the generators list is not empty: if not evgenConfig.generators: evgenLog.error("No entries in evgenConfig.generators: invalid configuration, please check your JO") @@ -265,6 +272,7 @@ if joparts[0].startswith("MC"): #< if this is an "official" JO 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: @@ -273,25 +281,47 @@ if joparts[0].startswith("MC"): #< if this is an "official" JO " It should contain <generators>_<tune+PDF_<process>. Please rename.") sys.exit(1) -## Check that the evgenConfig.minevents setting is acceptable -## minevents defines the production event sizes and must be sufficiently "round" -if evgenConfig.minevents < 1: - raise RunTimeError("evgenConfig.minevents must be at least 1") +## Check that the evgenConfig.nEventsPerJob setting is acceptable +## nEventsPerJob 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.nEventsPerJob < 1: + raise RunTimeError("evgenConfig.nEventsPerJob must be at least 1") else: - allowed_minevents_lt1000 = [1, 2, 5, 10, 20, 25, 50, 100, 200, 500] - msg = "evgenConfig.minevents = %d: " % evgenConfig.minevents - 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: - msg += "minevents in range < 1000 must be one of %s" % allowed_minevents_lt1000 - raise RuntimeError(msg) + allowed_nEventsPerJob_lt1000 = [1, 2, 5, 10, 20, 25, 50, 100, 200, 500, 1000] + msg = "evgenConfig.nEventsPerJob = %d: " % evgenConfig.nEventsPerJob + if multiInput !=0 : + dummy_nEventsPerJob = evgenConfig.nEventsPerJob*(multiInput) + evgenLog.info('Replacing input nEventsPerJob '+str(evgenConfig.nEventsPerJob)+' with calculated '+str(dummy_nEventsPerJob) + ' rounded to ' + str(int(round(dummy_nEventsPerJob)))) + evgenConfig.nEventsPerJob = dummy_nEventsPerJob + rest1000 = evgenConfig.nEventsPerJob % 1000 + if multiInput !=0 : + rounding=1 + if rest1000 < 1000-rest1000: + evgenLog.info('Replacing input nEventsPerJob '+str(evgenConfig.nEventsPerJob)+' with calculated '+str(evgenConfig.nEventsPerJob-rest1000)) + evgenConfig.nEventsPerJob = evgenConfig.nEventsPerJob-rest1000 + else: + evgenLog.info('Replacing input nEventsPerJob '+str(evgenConfig.nEventsPerJob)+' with calculated '+str(evgenConfig.nEventsPerJob-rest1000+1000)) + evgenConfig.nEventsPerJob = evgenConfig.nEventsPerJob-rest1000+1000 + else: + msg += "nEventsPerJob in range >= 1000 must be a multiple of 1000" + raise RuntimeError(msg) + elif evgenConfig.nEventsPerJob < 1000 and evgenConfig.nEventsPerJob not in allowed_nEventsPerJob_lt1000: + if multiInput !=0: + rounding=1 + evgenConfig.nEventsPerJob=min(allowed_nEventsPerJob_lt1000,key=lambda x:abs(x-evgenConfig.nEventsPerJob)) + else: + msg += "nEventsPerJob in range <= 1000 must be one of %s" % allowed_nEventsPerJob_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: ## Get the allowed keywords file from the JO package if possibe # TODO: Make the package name configurable - kwfile = "MC15JobOptions/evgenkeywords.txt" + kwfile = "EvgenJobTransforms/evgenkeywords.txt" kwpath = None for p in os.environ["JOBOPTSEARCHPATH"].split(":"): kwpath = os.path.join(p, kwfile) @@ -303,8 +333,7 @@ if evgenConfig.keywords: if kwpath: kwf = open(kwpath, "r") for l in kwf: - allowed_keywords += l.strip().split() - #allowed_keywords.sort() + allowed_keywords += l.strip().lower().split() ## Check the JO keywords against the allowed ones evil_keywords = [] for k in evgenConfig.keywords: @@ -326,6 +355,8 @@ if evgenConfig.findJets: ## Configure POOL streaming to the output EVNT format file from AthenaPoolCnvSvc.WriteAthenaPool import AthenaPoolOutputStream +from AthenaPoolCnvSvc.AthenaPoolCnvSvcConf import AthenaPoolCnvSvc +svcMgr.AthenaPoolCnvSvc.CommitInterval = 10 #< tweak for MC needs if hasattr(runArgs, "outputEVNTFile"): poolFile = runArgs.outputEVNTFile elif hasattr(runArgs, "outputEVNT_PreFile"): @@ -333,15 +364,12 @@ elif hasattr(runArgs, "outputEVNT_PreFile"): else: raise RuntimeError("Output pool file, either EVNT or EVNT_Pre, is not known.") -#StreamEVGEN = AthenaPoolOutputStream("StreamEVGEN", runArgs.outputEVNTFile) StreamEVGEN = AthenaPoolOutputStream("StreamEVGEN", poolFile) if hasattr(runArgs, "inputEVNT_PreFile") : - # import AthenaPoolCnvSvc.ReadAthenaPool - # from AthenaCommon.AthenaCommonFlags import athenaCommonFlags - # athenaCommonFlags.PoolEvgenInput.set_Value_and_Lock( runArgs.inputEVNT_PreFile ) svcMgr.EventSelector.InputCollections = runArgs.inputEVNT_PreFile StreamEVGEN.TakeItemsFromInput = True +StreamEVGEN.ForceRead = True StreamEVGEN.ItemList += ["EventInfo#*", "McEventCollection#*"] StreamEVGEN.RequireAlgs += ["EvgenFilterSeq"] ## Used for pile-up (remove dynamic variables except flavour labels) @@ -350,17 +378,17 @@ if evgenConfig.saveJets: StreamEVGEN.ItemList += ["xAOD::JetAuxContainer_v1#*.TruthLabelID.PartonTruthLabelID"] ## Set the run numbers -svcMgr.EventSelector.RunNumber = runArgs.runNumber -# TODO: set EventType::mc_channel_number = runArgs.runNumber +dsid = os.path.basename(runArgs.jobConfig[0]) +if not dsid.isdigit(): + dsid = "999999" +svcMgr.EventSelector.RunNumber = int(dsid) + ## Handle beam info import EventInfoMgt.EventInfoMgtInit -svcMgr.TagInfoMgr.ExtraTagValuePairs.update({"beam_energy" : str(int(runArgs.ecmEnergy*Units.GeV/2.0)), - "beam_type" : 'collisions', - ## Add special config option (extended model info for BSM scenarios) - "specialConfiguration" : evgenConfig.specialConfig, - }) - +svcMgr.TagInfoMgr.ExtraTagValuePairs += ["beam_energy", str(int(runArgs.ecmEnergy*Units.GeV/2.0))] +svcMgr.TagInfoMgr.ExtraTagValuePairs += ["beam_type", 'collisions'] +if hasattr( runArgs, "AMITag") and runArgs.AMITag != "NONE": svcMgr.TagInfoMgr.ExtraTagValuePairs += ["AMITag", runArgs.AMITag] ## Propagate energy argument to the generators # TODO: Standardise energy setting in the GenModule interface @@ -369,7 +397,8 @@ include("EvgenJobTransforms/Generate_ecmenergies.py") ## Process random seed arg and pass to generators include("EvgenJobTransforms/Generate_randomseeds.py") - +## Add special config option (extended model info for BSM scenarios) +svcMgr.TagInfoMgr.ExtraTagValuePairs += ["specialConfiguration", evgenConfig.specialConfig ] ## Remove TestHepMC if it's inappropriate for this generator combination # TODO: replace with direct del statements in the generator common JO fragments? @@ -443,11 +472,11 @@ def mk_symlink(srcfile, dstfile): os.remove(dstfile) if not os.path.exists(dstfile): evgenLog.info("Symlinking %s to %s" % (srcfile, dstfile)) - print("Symlinking %s to %s" % (srcfile, dstfile)) os.symlink(srcfile, dstfile) else: evgenLog.debug("Symlinking: %s is already the same as %s" % (dstfile, srcfile)) + ## Do the aux-file copying if evgenConfig.auxfiles: from PyJobTransformsCore.trfutil import get_files @@ -470,30 +499,32 @@ if _checkattr("description", required=True): msg = evgenConfig.description if _checkattr("notes"): msg += " " + evgenConfig.notes - print("MetaData: %s = %s" % ("physicsComment", msg)) + printfunc "MetaData: %s = %s" % ("physicsComment", msg) if _checkattr("generators", required=True): - print("MetaData: %s = %s" % ("generatorName", "+".join(gennames))) + printfunc "MetaData: %s = %s" % ("generatorName", "+".join(gennames)) if _checkattr("process"): - print("MetaData: %s = %s" % ("physicsProcess", evgenConfig.process)) + printfunc "MetaData: %s = %s" % ("physicsProcess", evgenConfig.process) if _checkattr("tune"): - print("MetaData: %s = %s" % ("generatorTune", evgenConfig.tune)) + printfunc "MetaData: %s = %s" % ("generatorTune", evgenConfig.tune) if _checkattr("hardPDF"): - print("MetaData: %s = %s" % ("hardPDF", evgenConfig.hardPDF)) + printfunc "MetaData: %s = %s" % ("hardPDF", evgenConfig.hardPDF) if _checkattr("softPDF"): - print("MetaData: %s = %s" % ("softPDF", evgenConfig.softPDF)) + printfunc "MetaData: %s = %s" % ("softPDF", evgenConfig.softPDF) +if _checkattr("nEventsPerJob"): + printfunc "MetaData: %s = %s" % ("nEventsPerJob", evgenConfig.nEventsPerJob) if _checkattr("keywords"): - print("MetaData: %s = %s" % ("keywords", ", ".join(evgenConfig.keywords).lower())) + printfunc "MetaData: %s = %s" % ("keywords", ", ".join(evgenConfig.keywords).lower()) if _checkattr("specialConfig"): - print("MetaData: %s = %s" % ("specialConfig", evgenConfig.specialConfig)) + printfunc "MetaData: %s = %s" % ("specialConfig", evgenConfig.specialConfig) # TODO: Require that a contact / JO author is always set if _checkattr("contact"): - print("MetaData: %s = %s" % ("contactPhysicist", ", ".join(evgenConfig.contact))) + printfunc "MetaData: %s = %s" % ("contactPhysicist", ", ".join(evgenConfig.contact)) # Output list of generator filters used filterNames = [alg.getType() for alg in acas.iter_algseq(filtSeq)] excludedNames = ['AthSequencer', 'PyAthena::Alg', 'TestHepMC'] filterNames = list(set(filterNames) - set(excludedNames)) -print("MetaData: %s = %s" % ("genFilterNames", ", ".join(filterNames))) +printfunc "MetaData: %s = %s" % ("genFilterNames", ", ".join(filterNames)) ##============================================================== @@ -502,14 +533,14 @@ print("MetaData: %s = %s" % ("genFilterNames", ", ".join(filterNames))) from PyJobTransformsCore.runargs import RunArguments runPars = RunArguments() -runPars.minevents = evgenConfig.minevents +runPars.nEventsPerJob = evgenConfig.nEventsPerJob runPars.maxeventsstrategy = evgenConfig.maxeventsstrategy with open("config.pickle", 'w') as f: - import pickle - pickle.dump(runPars, f) + import cPickle + cPickle.dump(runPars, f) ##============================================================== ## Get ready to run... ##============================================================== -evgenLog.debug("****************** STARTING EVENT GENERATION *****************") +evgenLog.info("****************** STARTING EVENT GENERATION *****************") diff --git a/Generators/EvgenJobTransforms/share/skeleton.GENtoEVGEN.py b/Generators/EvgenJobTransforms/share/skel.GENtoEVGEN.py similarity index 61% rename from Generators/EvgenJobTransforms/share/skeleton.GENtoEVGEN.py rename to Generators/EvgenJobTransforms/share/skel.GENtoEVGEN.py index 4e5b86541a0..3eb7ed0dd8b 100644 --- a/Generators/EvgenJobTransforms/share/skeleton.GENtoEVGEN.py +++ b/Generators/EvgenJobTransforms/share/skel.GENtoEVGEN.py @@ -1,10 +1,6 @@ -"""Functionality core of the Generate_tf transform""" -from __future__ import print_function -from __future__ import division -from builtins import filter - -from future import standard_library -standard_library.install_aliases() +# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration +# +"""Functionality core of the Gen_tf transform""" ##============================================================== ## Basic configuration @@ -12,7 +8,14 @@ standard_library.install_aliases() ## Create sequences for generators, clean-up algs, filters and analyses ## and import standard framework objects with standard local scope names -import os, re, string +from __future__ import print_function +from __future__ import division + +from future import standard_library +standard_library.install_aliases() + +import ast +import os, re, string, subprocess import AthenaCommon.AlgSequence as acas import AthenaCommon.AppMgr as acam from AthenaCommon.AthenaCommonFlags import jobproperties @@ -57,10 +60,13 @@ svcMgr += AtRanluxGenSvc() ## Jobs should stop if an include fails. jobproperties.AthenaCommonFlags.AllowIgnoreConfigError = False +## Compatibility with jets +from RecExConfig.RecConfFlags import jobproperties +jobproperties.RecConfFlags.AllowBackNavigation = True + ## Set up a standard logger from AthenaCommon.Logging import logging -evgenLog = logging.getLogger('Generate') - +evgenLog = logging.getLogger('Gen_tf') ##============================================================== ## Run arg handling @@ -70,6 +76,14 @@ evgenLog = logging.getLogger('Generate') evgenLog.debug("****************** CHECKING EVENT GENERATION ARGS *****************") evgenLog.debug(str(runArgs)) +if hasattr(runArgs, "runNumber"): + evgenLog.warning("##########################################################################" ) + evgenLog.warning("runNumber - no longer a valid argument, do not use it ! " ) + evgenLog.warning("##########################################################################") + +if hasattr(runArgs, "inputGenConfFile"): + raise RuntimeError("inputGenConfFile is invalid !! Gridpacks and config. files/links to be put into DSID directory ") + ## Ensure that an output name has been given # TODO: Allow generation without writing an output file (if outputEVNTFile is None)? if not hasattr(runArgs, "outputEVNTFile") and not hasattr(runArgs, "outputEVNT_PreFile"): @@ -80,8 +94,6 @@ if not hasattr(runArgs, "ecmEnergy"): raise RuntimeError("No center of mass energy provided.") if not hasattr(runArgs, "randomSeed"): raise RuntimeError("No random seed provided.") -if not hasattr(runArgs, "runNumber"): - raise RuntimeError("No run number provided.") # TODO: or guess it from the JO name?? if not hasattr(runArgs, "firstEvent"): raise RuntimeError("No first number provided.") @@ -122,17 +134,17 @@ if not hasattr(postSeq, "CopyEventWeight"): # TODO: Rewrite in Python? from EvgenProdTools.EvgenProdToolsConf import CountHepMC svcMgr.EventSelector.FirstEvent = runArgs.firstEvent - -# This is necessary for athenaMP -if hasattr(runArgs, "maxEvents"): - theApp.EvtMax = runArgs.maxEvents +theApp.EvtMax = -1 +# This is necessary for athenaMP # commented out for now +#if hasattr(runArgs, "maxEvents"): +# theApp.EvtMax = runArgs.maxEvents if not hasattr(postSeq, "CountHepMC"): postSeq += CountHepMC() -#postSeq.CountHepMC.RequestedOutput = evgenConfig.minevents if runArgs.maxEvents == -1 else runArgs.maxEvents +#postSeq.CountHepMC.RequestedOutput = evgenConfig.nEventsPerJob if runArgs.maxEvents == -1 else runArgs.maxEvents postSeq.CountHepMC.FirstEvent = runArgs.firstEvent -postSeq.CountHepMC.CorrectHepMC = False +postSeq.CountHepMC.CorrectHepMC = True postSeq.CountHepMC.CorrectEventID = True ## Print out the contents of the first 5 events (after filtering) @@ -178,46 +190,43 @@ if hasattr(runArgs, "preExec"): evgenLog.info(cmd) exec(cmd) +def get_immediate_subdirectories(a_dir): + return [name for name in os.listdir(a_dir) + if os.path.isdir(os.path.join(a_dir, name))] + # TODO: Explain!!! def OutputTXTFile(): outputTXTFile = None if hasattr(runArgs,"outputTXTFile"): outputTXTFile=runArgs.outputTXTFile return outputTXTFile - ## Main job option include ## Only permit one jobConfig argument for evgen: does more than one _ever_ make sense? if len(runArgs.jobConfig) != 1: + msg.info("runArgs.jobConfig '%s'" % runArgs.jobConfig) evgenLog.error("You must supply one and only one jobConfig file argument") sys.exit(1) -jo = runArgs.jobConfig[0] -jofile = os.path.basename(jo) -joparts = jofile.split(".") + +msg.info("Using JOBOPTSEARCHPATH!! = '%s'" % os.environ["JOBOPTSEARCHPATH"]) +FIRST_DIR = (os.environ['JOBOPTSEARCHPATH']).split(":")[0] + +jofiles = [f for f in os.listdir(FIRST_DIR) if (f.startswith('mc') and f.endswith('.py'))] +if len(jofiles) !=1: + evgenLog.error("You must supply one and only one jobOption file in DSID directory") + sys.exit(1) +jofile = jofiles[0] + +joparts = (os.path.basename(jofile)).split(".") ## Perform some consistency checks if this appears to be an "official" production JO officialJO = False -if joparts[0].startswith("MC") and all(c in string.digits for c in joparts[0][2:]): +if joparts[0].startswith("mc") and all(c in string.digits for c in joparts[0][2:]): officialJO = True - ## Check that the JO does not appear to be an old one, since we can't use those - if int(joparts[0][2:]) < 14: - evgenLog.error("MC14 (or later) job option scripts are needed to work with Generate_tf!") - evgenLog.error(jo + " will not be processed: please rename or otherwise update to a >= MC14 JO.") - sys.exit(1) ## Check that there are exactly 4 name parts separated by '.': MCxx, DSID, physicsShort, .py - if len(joparts) != 4: - evgenLog.error(jofile + " name format is wrong: must be of the form MC<xx>.<yyyyyy>.<physicsShort>.py: please rename.") - sys.exit(1) - ## Check the DSID part of the name - jo_dsidpart = joparts[1] - try: - jo_dsidpart = int(jo_dsidpart) - if runArgs.runNumber != jo_dsidpart: - raise Exception() - except: - evgenLog.error("Expected dataset ID part of JO name to be '%s', but found '%s'" % -(str(runArgs.runNumber), jo_dsidpart)) + if len(joparts) != 3: + evgenLog.error(jofile + " name format is wrong: must be of the form mc.<physicsShort>.py: please rename.") sys.exit(1) ## Check the length limit on the physicsShort portion of the filename - jo_physshortpart = joparts[2] - if len(jo_physshortpart) > 60: + jo_physshortpart = joparts[1] + if len(jo_physshortpart) > 50: evgenLog.error(jofile + " contains a physicsShort field of more than 60 characters: please rename.") sys.exit(1) ## There must be at least 2 physicsShort sub-parts separated by '_': gens, (tune)+PDF, and process @@ -226,9 +235,16 @@ if joparts[0].startswith("MC") and all(c in string.digits for c in joparts[0][2: evgenLog.error(jofile + " has too few physicsShort fields separated by '_': should contain <generators>(_<tune+PDF_if_available>)_<process>. Please rename.") sys.exit(1) ## NOTE: a further check on physicsShort consistency is done below, after fragment loading + check_jofiles="/cvmfs/atlas.cern.ch/repo/sw/Generators/MC16JobOptions/scripts/check_jo_consistency.py" + if os.path.exists(check_jofiles): + include(check_jofiles) + check_naming(os.path.basename(jofile)) + else: + evgenLog.error("check_jo_consistency.py not found") + sys.exit(1) ## Include the JO fragment -include(jo) +include(jofile) ##============================================================== ## Config validation and propagation to services, generators, etc. @@ -240,9 +256,14 @@ evgenLog.debug("****************** CHECKING EVGEN CONFIGURATION **************** ## Print out options for opt in str(evgenConfig).split(os.linesep): evgenLog.info(opt) +evgenLog.info(".transform = Gen_tf") ## Sort and check generator name / JO name consistency ## +## Check that the common fragments are not obsolete: +if evgenConfig.obsolete: + evgenLog.error("JOs or icludes are obsolete, please check them") + sys.exit(1) ## Check that the generators list is not empty: if not evgenConfig.generators: evgenLog.error("No entries in evgenConfig.generators: invalid configuration, please check your JO") @@ -256,7 +277,6 @@ gennames = sorted(evgenConfig.generators, key=gen_sortkey) ## Check that the actual generators, tune, and main PDF are consistent with the JO name if joparts[0].startswith("MC"): #< if this is an "official" JO genpart = jo_physshortparts[0] -# genpart = genpart.replace("Py8", "Pythia8").replace("MG","MadGraph").replace("Ph","Powheg").replace("Hpp",Herwigpp").replace("H7",Herwig7").replace("Sh","Sherpa").replace("Ag","Alpgen").replace("Py","Pythia").replace("EG","EvtGen").replace("PG","ParticleGun") expectedgenpart = ''.join(gennames) ## We want to record that HERWIG was used in metadata, but in the JO naming we just use a "Herwig" label expectedgenpart = expectedgenpart.replace("HerwigJimmy", "Herwig") @@ -264,10 +284,10 @@ if joparts[0].startswith("MC"): #< if this is an "official" JO # TODO: add EvtGen to this normalization for MC14? return s.replace("Photospp", "").replace("Photos", "").replace("TauolaPP", "").replace("Tauolapp", "").replace("Tauola", "") 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") + 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").replace("Gva","Geneva") 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") + 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").replace("Geneva","Gva") 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)) @@ -289,28 +309,33 @@ if gen_require_steering(gennames): raise RuntimeError("'EvtGen' found in job options name, please set '--steering=afterburn'") -## Check that the evgenConfig.minevents setting is acceptable -## minevents defines the production event sizes and must be sufficiently "round" -if evgenConfig.minevents < 1: - raise RunTimeError("evgenConfig.minevents must be at least 1") +## Check that the evgenConfig.nEventsPerJob setting is acceptable +## nEventsPerJob 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: - allowed_minevents_lt1000 = [1, 2, 5, 10, 20, 25, 50, 100, 200, 500] - msg = "evgenConfig.minevents = %d: " % evgenConfig.minevents - 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: - 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 - + multiInput = 0 + +if evgenConfig.nEventsPerJob < 1: + raise RunTimeError("evgenConfig.nEventsPerJob must be at least 1") +else: + allowed_nEventsPerJob_lt1000 = [1, 2, 5, 10, 20, 25, 50, 100, 200, 500, 1000] + msg = "evgenConfig.nEventsPerJob = %d: " % evgenConfig.nEventsPerJob + + if evgenConfig.nEventsPerJob >= 1000 and evgenConfig.nEventsPerJob % 1000 != 0 and 10000 % evgenConfig.nEventsPerJob != 0 : + msg += "nEventsPerJob in range >= 1K must be a multiple of 1K and a divisor of 10K" + raise RuntimeError(msg) + elif evgenConfig.nEventsPerJob < 1000 and evgenConfig.nEventsPerJob not in allowed_nEventsPerJob_lt1000: + msg += "nEventsPerJob in range <= 1000 must be one of %s" % allowed_nEventsPerJob_lt1000 + raise RuntimeError(msg) + postSeq.CountHepMC.RequestedOutput = evgenConfig.nEventsPerJob if runArgs.maxEvents == -1 else runArgs.maxEvents + evgenLog.info('Requested output events '+str(postSeq.CountHepMC.RequestedOutput)) ## Check that the keywords are in the list of allowed words (and exit if processing an official JO) if evgenConfig.keywords: ## Get the allowed keywords file from the JO package if possibe # TODO: Make the package name configurable - kwfile = "MC15JobOptions/evgenkeywords.txt" + kwfile = "EvgenJobTransforms/evgenkeywords.txt" kwpath = None for p in os.environ["JOBOPTSEARCHPATH"].split(":"): kwpath = os.path.join(p, kwfile) @@ -323,7 +348,6 @@ if evgenConfig.keywords: kwf = open(kwpath, "r") for l in kwf: allowed_keywords += l.strip().lower().split() - #allowed_keywords.sort() ## Check the JO keywords against the allowed ones evil_keywords = [] for k in evgenConfig.keywords: @@ -338,13 +362,51 @@ if evgenConfig.keywords: else: evgenLog.warning("Could not find evgenkeywords.txt file %s in $JOBOPTSEARCHPATH" % kwfile) -## Configure and schedule jet finding algorithms -## NOTE: This generates algorithms for jet containers defined in the user's JO fragment -if evgenConfig.findJets: - include("EvgenJobTransforms/Generate_TruthJets.py") +## Check that the L1 and L2 keywords pairs are in the list of allowed words pairs (and exit if processing an official JO) +if evgenConfig.categories: + ## Get the allowed categories file from the JO package if possibe + # TODO: Make the package name configurable + lkwfile = "EvgenJobTransforms/CategoryList.txt" + lkwpath = None + for p in os.environ["JOBOPTSEARCHPATH"].split(":"): + lkwpath = os.path.join(p, lkwfile) + if os.path.exists(lkwpath): + break + lkwpath = None +## Load the allowed categories names from the file + allowed_cat = [] + if lkwpath: + with open(lkwpath, 'r') as catlist: + for line in catlist: + allowed_list = ast.literal_eval(line) + allowed_cat.append(allowed_list) + + ## Check the JO categories against the allowed ones + bad_cat =[] + it = iter(evgenConfig.categories) + for x in it: + l1 = x + l2 = next(it) + if "L1:" in l2 and "L2:" in l1: + l1, l2 = l2, l1 + printfunc "first",l1,"second",l2 + bad_cat.extend([l1, l2]) + for a1,a2 in allowed_cat: + if l1.strip().lower()==a1.strip().lower() and l2.strip().lower()==a2.strip().lower(): + bad_cat=[] + if bad_cat: + msg = "evgenConfig.categories contains non-standard category: %s. " % ", ".join(bad_cat) + msg += "Please check the allowed categories list and fix." + evgenLog.error(msg) + if officialJO: + sys.exit(1) + else: + evgenLog.warning("Could not find CategoryList.txt file %s in $JOBOPTSEARCHPATH" % lkwfile) ## Configure POOL streaming to the output EVNT format file from AthenaPoolCnvSvc.WriteAthenaPool import AthenaPoolOutputStream +from AthenaPoolCnvSvc.AthenaPoolCnvSvcConf import AthenaPoolCnvSvc +svcMgr.AthenaPoolCnvSvc.CommitInterval = 10 #< tweak for MC needs if hasattr(runArgs, "outputEVNTFile"): poolFile = runArgs.outputEVNTFile elif hasattr(runArgs, "outputEVNT_PreFile"): @@ -352,9 +414,9 @@ elif hasattr(runArgs, "outputEVNT_PreFile"): else: raise RuntimeError("Output pool file, either EVNT or EVNT_Pre, is not known.") -#StreamEVGEN = AthenaPoolOutputStream("StreamEVGEN", runArgs.outputEVNTFile) StreamEVGEN = AthenaPoolOutputStream("StreamEVGEN", poolFile) +StreamEVGEN.ForceRead = True StreamEVGEN.ItemList += ["EventInfo#*", "McEventCollection#*"] StreamEVGEN.RequireAlgs += ["EvgenFilterSeq"] ## Used for pile-up (remove dynamic variables except flavour labels) @@ -369,22 +431,26 @@ for removeItem in evgenConfig.doNotSaveItems: StreamEVGEN.ItemList.remove( remov for addItem in evgenConfig.extraSaveItems: StreamEVGEN.ItemList += [ addItem ] ## Set the run numbers -svcMgr.EventSelector.RunNumber = runArgs.runNumber -# TODO: set EventType::mc_channel_number = runArgs.runNumber +dsid = os.path.basename(runArgs.jobConfig[0]) +if not dsid.isdigit(): + dsid = "999999" +svcMgr.EventSelector.RunNumber = int(dsid) ## Include information about generators in metadata import EventInfoMgt.EventInfoMgtInit -svcMgr.TagInfoMgr.ExtraTagValuePairs.update({"lhefGenerator" : '+'.join( filter( gens_lhef, gennames ) ), - "generators" : '+'.join(gennames), - "evgenProcess" : evgenConfig.process, - "evgenTune" : evgenConfig.tune, - "beam_energy" : str(int(runArgs.ecmEnergy*Units.GeV/2.0)), - "beam_type" : 'collisions', - }) - -if hasattr( evgenConfig, "hardPDF" ) : svcMgr.TagInfoMgr.ExtraTagValuePairs.update({"hardPDF" : evgenConfig.hardPDF}) -if hasattr( evgenConfig, "softPDF" ) : svcMgr.TagInfoMgr.ExtraTagValuePairs.update({"softPDF" : evgenConfig.softPDF}) -if hasattr( runArgs, "randomSeed") : svcMgr.TagInfoMgr.ExtraTagValuePairs.update({"randomSeed" : str(runArgs.randomSeed)}) +svcMgr.TagInfoMgr.ExtraTagValuePairs += ["mc_channel_number",str(dsid)] +svcMgr.TagInfoMgr.ExtraTagValuePairs += ["lhefGenerator", '+'.join( filter( gens_lhef, gennames ) ) ] +svcMgr.TagInfoMgr.ExtraTagValuePairs += ["generators", '+'.join(gennames)] +svcMgr.TagInfoMgr.ExtraTagValuePairs += ["evgenProcess", evgenConfig.process] +svcMgr.TagInfoMgr.ExtraTagValuePairs += ["evgenTune", evgenConfig.tune] +if hasattr( evgenConfig, "hardPDF" ) : svcMgr.TagInfoMgr.ExtraTagValuePairs += ["hardPDF", evgenConfig.hardPDF] +if hasattr( evgenConfig, "softPDF" ) : svcMgr.TagInfoMgr.ExtraTagValuePairs += ["softPDF", evgenConfig.softPDF] +if hasattr( runArgs, "randomSeed") : svcMgr.TagInfoMgr.ExtraTagValuePairs += ["randomSeed", str(runArgs.randomSeed)] +if hasattr( runArgs, "AMITag") and runArgs.AMITag != "NONE": svcMgr.TagInfoMgr.ExtraTagValuePairs += ["AMITag", runArgs.AMITag] + +## Handle beam info +svcMgr.TagInfoMgr.ExtraTagValuePairs += ["beam_energy", str(int(runArgs.ecmEnergy*Units.GeV/2.0))] +svcMgr.TagInfoMgr.ExtraTagValuePairs += ["beam_type", 'collisions'] ## Propagate energy argument to the generators # TODO: Standardise energy setting in the GenModule interface @@ -394,7 +460,7 @@ include("EvgenJobTransforms/Generate_ecmenergies.py") include("EvgenJobTransforms/Generate_randomseeds.py") ## Add special config option (extended model info for BSM scenarios) -svcMgr.TagInfoMgr.ExtraTagValuePairs.update({"specialConfiguration" : evgenConfig.specialConfig}) +svcMgr.TagInfoMgr.ExtraTagValuePairs += ["specialConfiguration", evgenConfig.specialConfig ] ## Remove TestHepMC if it's inappropriate for this generator combination # TODO: replace with direct del statements in the generator common JO fragments? @@ -458,9 +524,12 @@ elif "BeamHaloGenerator" in evgenConfig.generators: eventsFile = "beamhalogen.events" elif "HepMCAscii" in evgenConfig.generators: eventsFile = "events.hepmc" +elif "ReadMcAscii" in evgenConfig.generators: + eventsFile = "events.hepmc" elif gens_lhef(evgenConfig.generators): eventsFile = "events.lhe" + ## Helper functions for input file handling def find_unique_file(pattern): "Return a matching file, provided it is unique" @@ -473,6 +542,55 @@ 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)): + printfunc "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 = "" + printfunc "*** 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) + output.write(line) +## 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>\n") + output.close() + + def mk_symlink(srcfile, dstfile): "Make a symlink safely" if dstfile: @@ -480,7 +598,7 @@ def mk_symlink(srcfile, dstfile): os.remove(dstfile) if not os.path.exists(dstfile): evgenLog.info("Symlinking %s to %s" % (srcfile, dstfile)) - print("Symlinking %s to %s" % (srcfile, dstfile)) + printfunc "Symlinking %s to %s" % (srcfile, dstfile) os.symlink(srcfile, dstfile) else: evgenLog.debug("Symlinking: %s is already the same as %s" % (dstfile, srcfile)) @@ -488,17 +606,54 @@ def mk_symlink(srcfile, dstfile): ## Find and symlink dat and event files, so they are available via the name expected by the generator if eventsFile or datFile: if not hasattr(runArgs, "inputGeneratorFile") or runArgs.inputGeneratorFile == "NONE": - raise RuntimeError("%s needs input file (argument inputGeneratorFile)" % runArgs.jobConfig) + raise RuntimeError("%s needs input file (argument inputGeneratorFile)" % runArgs.jobConfigs) 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] if datFile: - realDatFile = find_unique_file('*%s*.dat' % inputroot) - mk_symlink(realDatFile, datFile) + if ".tar" in os.path.basename(runArgs.inputGeneratorFile): + inputroot = os.path.basename(runArgs.inputGeneratorFile).split(".tar.")[0] + else: + inputroot = os.path.basename(runArgs.inputGeneratorFile).split("._")[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): + if ".tar" in os.path.basename(runArgs.inputGeneratorFile): + inputroot = os.path.basename(runArgs.inputGeneratorFile).split(".tar.")[0] + else: + inputroot = os.path.basename(runArgs.inputGeneratorFile).split("._")[0] + + if "events" in inputroot : + inputroot = inputroot.replace(".events","") + 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 + if ".tar" in os.path.basename(runArgs.inputGeneratorFile): + inputroot = os.path.basename(runArgs.inputGeneratorFile).split(".tar.")[0] + else: + input0 = os.path.basename(file).split("._")[0] + input1 = (os.path.basename(file).split("._")[1]).split(".")[0] + inputroot = input0+"._"+input1 + printfunc "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) + 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" % @@ -535,35 +690,43 @@ if _checkattr("description", required=True): msg = evgenConfig.description if _checkattr("notes"): msg += " " + evgenConfig.notes - print("MetaData: %s = %s" % ("physicsComment", msg)) + printfunc "MetaData: %s = %s" % ("physicsComment", msg) if _checkattr("generators", required=True): - print("MetaData: %s = %s" % ("generatorName", "+".join(gennames))) + gennamesvers=[] + for item in gennames: + genera = item.upper() + generat = genera+"VER" + if (generat in os.environ): + gennamesvers.append(item+"(v."+os.environ[generat]+")") + else: + gennamesvers.append(item) + printfunc "MetaData: %s = %s" % ("generatorName", "+".join(gennamesvers)) if _checkattr("process"): - print("MetaData: %s = %s" % ("physicsProcess", evgenConfig.process)) + printfunc "MetaData: %s = %s" % ("physicsProcess", evgenConfig.process) if _checkattr("tune"): - print("MetaData: %s = %s" % ("generatorTune", evgenConfig.tune)) + printfunc "MetaData: %s = %s" % ("generatorTune", evgenConfig.tune) if _checkattr("hardPDF"): - print("MetaData: %s = %s" % ("hardPDF", evgenConfig.hardPDF)) + printfunc "MetaData: %s = %s" % ("hardPDF", evgenConfig.hardPDF) if _checkattr("softPDF"): - print("MetaData: %s = %s" % ("softPDF", evgenConfig.softPDF)) + printfunc "MetaData: %s = %s" % ("softPDF", evgenConfig.softPDF) +if _checkattr("nEventsPerJob"): + printfunc "MetaData: %s = %s" % ("nEventsPerJob", evgenConfig.nEventsPerJob) if _checkattr("keywords"): - print("MetaData: %s = %s" % ("keywords", ", ".join(evgenConfig.keywords).lower())) + printfunc "MetaData: %s = %s" % ("keywords", ", ".join(evgenConfig.keywords).lower()) +if _checkattr("categories"): + printfunc "MetaData: %s = %s" % ("categories", ", ".join(evgenConfig.categories)) if _checkattr("specialConfig"): - print("MetaData: %s = %s" % ("specialConfig", evgenConfig.specialConfig)) + printfunc "MetaData: %s = %s" % ("specialConfig", evgenConfig.specialConfig) # TODO: Require that a contact / JO author is always set if _checkattr("contact"): - print("MetaData: %s = %s" % ("contactPhysicist", ", ".join(evgenConfig.contact))) -#if _checkattr( "randomSeed") : -print("MetaData: %s = %s" % ("randomSeed", str(runArgs.randomSeed))) + printfunc "MetaData: %s = %s" % ("contactPhysicist", ", ".join(evgenConfig.contact)) +printfunc "MetaData: %s = %s" % ("randomSeed", str(runArgs.randomSeed)) - - - # Output list of generator filters used filterNames = [alg.getType() for alg in acas.iter_algseq(filtSeq)] excludedNames = ['AthSequencer', 'PyAthena::Alg', 'TestHepMC'] filterNames = list(set(filterNames) - set(excludedNames)) -print("MetaData: %s = %s" % ("genFilterNames", ", ".join(filterNames))) +printfunc "MetaData: %s = %s" % ("genFilterNames", ", ".join(filterNames)) ##============================================================== @@ -572,14 +735,14 @@ print("MetaData: %s = %s" % ("genFilterNames", ", ".join(filterNames))) from PyJobTransformsCore.runargs import RunArguments runPars = RunArguments() -runPars.minevents = evgenConfig.minevents +runPars.nEventsPerJob = evgenConfig.nEventsPerJob runPars.maxeventsstrategy = evgenConfig.maxeventsstrategy -with open("config.pickle", 'wb') as f: - import pickle - pickle.dump(runPars, f) +with open("config.pickle", 'w') as f: + import cPickle + cPickle.dump(runPars, f) ##============================================================== ## Get ready to run... ##============================================================== -evgenLog.debug("****************** STARTING EVENT GENERATION *****************") +evgenLog.info("****************** STARTING EVENT GENERATION *****************") diff --git a/Generators/EvgenJobTransforms/share/skel.GENtoTXT.py b/Generators/EvgenJobTransforms/share/skel.GENtoTXT.py new file mode 100644 index 00000000000..ea226971bcf --- /dev/null +++ b/Generators/EvgenJobTransforms/share/skel.GENtoTXT.py @@ -0,0 +1,703 @@ +# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration +# +"""Functionality core of the Generate_tf transform""" + +##============================================================== +## Basic configuration +##============================================================== + +## Create sequences for generators, clean-up algs, filters and analyses +## and import standard framework objects with standard local scope names +from __future__ import print_function +from __future__ import division + +from future import standard_library +standard_library.install_aliases() + +import ast +import os, re, string, subprocess +import AthenaCommon.AlgSequence as acas +import AthenaCommon.AppMgr as acam +from AthenaCommon.AthenaCommonFlags import jobproperties +from AthenaCommon.AthenaCommonFlags import athenaCommonFlags +from AthenaCommon.AthenaCommonFlags import jobproperties +theApp = acam.theApp +acam.athMasterSeq += acas.AlgSequence("EvgenGenSeq") +genSeq = acam.athMasterSeq.EvgenGenSeq +acam.athMasterSeq += acas.AlgSequence("EvgenFixSeq") +fixSeq = acam.athMasterSeq.EvgenFixSeq +acam.athMasterSeq += acas.AlgSequence("EvgenPreFilterSeq") +prefiltSeq = acam.athMasterSeq.EvgenPreFilterSeq +acam.athMasterSeq += acas.AlgSequence("EvgenTestSeq") +testSeq = acam.athMasterSeq.EvgenTestSeq +## NOTE: LogicalExpressionFilter is an algorithm, not a sequence +from EvgenProdTools.LogicalExpressionFilter import LogicalExpressionFilter +acam.athMasterSeq += LogicalExpressionFilter("EvgenFilterSeq") +filtSeq = acam.athMsterSeq.EvgenFilterSeq +topSeq = acas.AlgSequence() +anaSeq = topSeq +topSeq += acas.AlgSequence("EvgenPostSeq") +postSeq = topSeq.EvgenPostSeq +##============================================================== +## Configure standard Athena services +##============================================================== + +## Special setup for event generation +include("AthenaCommon/Atlas_Gen.UnixStandardJob.py") +include("PartPropSvc/PartPropSvc.py") + +## Run performance monitoring (memory logging) +from PerfMonComps.PerfMonFlags import jobproperties as perfmonjp +perfmonjp.PerfMonFlags.doMonitoring = True +perfmonjp.PerfMonFlags.doSemiDetailedMonitoring = True + +## Random number services +from AthenaServices.AthenaServicesConf import AtRndmGenSvc, AtRanluxGenSvc +svcMgr += AtRndmGenSvc() +svcMgr += AtRanluxGenSvc() + +## Jobs should stop if an include fails. +jobproperties.AthenaCommonFlags.AllowIgnoreConfigError = False + +## Set up a standard logger +from AthenaCommon.Logging import logging +evgenLog = logging.getLogger('Gen_tf_txt') + +##============================================================== +## Run arg handling +##============================================================== + +## Announce arg checking +evgenLog.debug("****************** CHECKING EVENT GENERATION ARGS *****************") +evgenLog.debug(str(runArgs)) +msg.info ("****************** CHECKING EVENT GENERATION ARGS *****************") +if hasattr(runArgs, "runNumber"): + evgenLog.warning("##########################################################################" ) + evgenLog.warning("runNumber - no longer a valid argument, do not use it ! " ) + evgenLog.warning("##########################################################################") + +if hasattr(runArgs, "inputGenConfFile"): + raise RuntimeError("inputGenConfFile is invalid !! Gridpacks and config. files/links to be put into DSID directory ") + +## Announce start of job configuration +evgenLog.debug("****************** CONFIGURING EVENT GENERATION *****************") +msg.info("****************** CONFIGURING EVENT GENERATION *****************") +## Functions for operating on generator names +## NOTE: evgenConfig, topSeq, svcMgr, theApp, etc. should NOT be explicitly re-imported in JOs +from EvgenJobTransforms.EvgenConfig import evgenConfig +from EvgenJobTransforms.EvgenConfig import gens_known, gens_lhef, gen_sortkey, gens_testhepmc, gens_notune, gen_require_steering + + +## Ensure that an output name has been given +# TODO: Allow generation without writing an output file (if outputEVNTFile is None)? + +##============================================================== +## Configure standard Athena and evgen services +##============================================================== + +## Announce start of job configuration +evgenLog.debug("****************** CONFIGURING MATRIX ELEMENT GENERATION *****************") +msg.info("****************** CONFIGURING MATRIX ELEMENT GENERATION *****************") +evgenLog.debug("****************** CONFIGURING EVENT GENERATION *****************") + +## Functions for operating on generator names +## NOTE: evgenConfig, topSeq, svcMgr, theApp, etc. should NOT be explicitly re-imported in JOs +from EvgenJobTransforms.EvgenConfig import evgenConfig +from EvgenJobTransforms.EvgenConfig import gens_known, gens_lhef, gen_sortkey, gens_testhepmc, gens_notune, gen_require_steering + +## Configure the event counting (AFTER all filters) +# TODO: Rewrite in Python? +from EvgenProdTools.EvgenProdToolsConf import CountHepMC +svcMgr.EventSelector.FirstEvent = runArgs.firstEvent +theApp.EvtMax = -1 + +#evgenConfig.nEventsPerJob = 1 +if not hasattr(postSeq, "CountHepMC"): + postSeq += CountHepMC() + +postSeq.CountHepMC.FirstEvent = runArgs.firstEvent +postSeq.CountHepMC.CorrectHepMC = True +postSeq.CountHepMC.CorrectEventID = True + + +##============================================================== +## Pre- and main config parsing +##============================================================== + +## Announce JO loading +evgenLog.debug("****************** LOADING PRE-INCLUDES AND JOB CONFIG *****************") +msg.info("****************** LOADING PRE-INCLUDES AND JOB CONFIG *****************") + +## Pre-include +if hasattr(runArgs, "preInclude"): + for fragment in runArgs.preInclude: + include(fragment) + +## Pre-exec +if hasattr(runArgs, "preExec"): + evgenLog.info("Transform pre-exec") + for cmd in runArgs.preExec: + evgenLog.info(cmd) + exec(cmd) + +def get_immediate_subdirectories(a_dir): + return [name for name in os.listdir(a_dir) + if os.path.isdir(os.path.join(a_dir, name))] + + +# TODO: Explain!!! +def OutputTXTFile(): + outputTXTFile = None + if hasattr(runArgs,"outputTXTFile"): outputTXTFile=runArgs.outputTXTFile + return outputTXTFile + +## Main job option include +## Only permit one jobConfig argument for evgen: does more than one _ever_ make sense? + +if len(runArgs.jobConfig) != 1: + msg.info("runArgs.jobConfig %s ", % runArgs.jobConfig) + evgenLog.error("You must supply one and only one jobConfig file argument. It has to start from mc. and end with .py") + sys.exit(1) + +printfunc "Using JOBOPTSEARCHPATH (as seen in skeleton) = '%s'" % (os.environ["JOBOPTSEARCHPATH"]) +FIRST_DIR = (os.environ['JOBOPTSEARCHPATH']).split(":")[0] + +dsid_param = runArgs.jobConfig[0] +evgenLog.info("dsid_param " + dsid_param) +dsid = os.path.basename(dsid_param) +evgenLog.info("dsid " + dsid) +jofiles = [f for f in os.listdir(FIRST_DIR) if (f.startswith('mc') and f.endswith('.py'))] +## Only permit one JO file in each dsid folder +if len(jofiles) !=1: + msg.info("runArgs.jobConfig wrong %s ", % runArgs.jobConfig) + evgenLog.error("You must supply one and only one jobOption file in DSID directory. It has to start with mc. and end with .py") + sys.exit(1) +jofile = jofiles[0] +joparts = (os.path.basename(jofile)).split(".") +## Perform some consistency checks if this appears to be an "official" production JO +officialJO = False +if joparts[0].startswith("mc") and all(c in string.digits for c in joparts[0][2:]): + officialJO = True + ## Check that there are exactly 4 name parts separated by '.': MCxx, DSID, physicsShort, .py + if len(joparts) != 3: + evgenLog.error(jofile + " name format is wrong: must be of the form MC<xx>.<physicsShort>.py: please rename.") + sys.exit(1) + + ## Check the length limit on the physicsShort portion of the filename + jo_physshortpart = joparts[1] + if len(jo_physshortpart) > 50: + evgenLog.error(jofile + " contains a physicsShort field of more than 50 characters: please rename.") + sys.exit(1) + ## There must be at least 2 physicsShort sub-parts separated by '_': gens, (tune)+PDF, and process + jo_physshortparts = jo_physshortpart.split("_") + if len(jo_physshortparts) < 2: + evgenLog.error(jofile + " has too few physicsShort fields separated by '_': should contain <generators>(_<tune+PDF_if_available>)_<process>. Please rename.") + sys.exit(1) + ## NOTE: a further check on physicsShort consistency is done below, after fragment loading + check_jofiles="/cvmfs/atlas.cern.ch/repo/sw/Generators/MC16JobOptions/scripts/check_jo_consistency.py" + if os.path.exists(check_jofiles): + evgenLog.info("Checking offical JO file name consistency") + include(check_jofiles) + check_naming(os.path.basename(jofile)) + else: + evgenLog.error("check_jo_consistency.py not found") + sys.exit(1) +## Include the JO fragment +include(jofile) +include("EvgenJobTransforms/LHEonly.py") + +##============================================================== +## Config validation and propagation to services, generators, etc. +##============================================================== + +## Announce start of JO checking +evgenLog.debug("****************** CHECKING EVGEN CONFIGURATION *****************") +msg.info("****************** CHECKING EVGEN CONFIGURATION *****************") + +## Print out options +for opt in str(evgenConfig).split(os.linesep): + evgenLog.info(opt) +evgenLog.info(".transform = Gen_tf") + +## Sort and check generator name / JO name consistency +## +## Check that the common fragments are not obsolete: +if evgenConfig.obsolete: + evgenLog.error("JOs or icludes are obsolete, please check them") + sys.exit(1) +## Check that the generators list is not empty: +if not evgenConfig.generators: + evgenLog.error("No entries in evgenConfig.generators: invalid configuration, please check your JO") + sys.exit(1) +## Check for duplicates: +if len(evgenConfig.generators) > len(set(evgenConfig.generators)): + evgenLog.error("Duplicate entries in evgenConfig.generators: invalid configuration, please check your JO") + sys.exit(1) +## Sort the list of generator names into standard form +gennames = sorted(evgenConfig.generators, key=gen_sortkey) +## Check that the actual generators, tune, and main PDF are consistent with the JO name +if joparts[0].startswith("MC"): #< if this is an "official" JO + genpart = jo_physshortparts[0] + expectedgenpart = ''.join(gennames) + ## We want to record that HERWIG was used in metadata, but in the JO naming we just use a "Herwig" label + 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", "") + 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").replace("Gva","Geneva") + + 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").replace("Geneva","Gva") + + + 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) + + 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: + evgenLog.error(jofile + " with generators " + expectedgenpart + + " has too few physicsShort fields separated by '_'." + + " It should contain <generators>_<tune+PDF_<process>. Please rename.") + sys.exit(1) + +## Check the "--steering=afterburn" command line argument has been set if EvtGen is in the JO name +# Dont't have access to steering flag so check it's effect on output files +if gen_require_steering(gennames): + if hasattr(runArgs, "outputEVNTFile") and not hasattr(runArgs, "outputEVNT_PreFile"): + raise RuntimeError("'EvtGen' found in job options name, please set '--steering=afterburn'") + + +## Check that the evgenConfig.nEventsPerJob setting is acceptable +## nEventsPerJob 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.nEventsPerJob < 1: + raise RunTimeError("evgenConfig.nEventsPerJob must be at least 0") +else: + allowed_nEventsPerJob_lt1000 = [1, 2, 5, 10, 20, 25, 50, 100, 200, 500, 1000] + msg = "evgenConfig.nEventsPerJob = %d: " % evgenConfig.nEventsPerJob + + if evgenConfig.nEventsPerJob >= 1000 and evgenConfig.nEventsPerJob % 1000 != 0 and 10000 % evgenConfig.nEventsPerJob != 0: + msg += "nEventsPerJob in range >= 1000 must be a multiple of 1000 and a divisor of 10000" + raise RuntimeError(msg) + elif evgenConfig.nEventsPerJob < 1000 and evgenConfig.nEventsPerJob not in allowed_nEventsPerJob_lt1000: + msg += "nEventsPerJob in range <= 1000 must be one of %s" % allowed_nEventsPerJob_lt1000 + raise RuntimeError(msg) + postSeq.CountHepMC.RequestedOutput = evgenConfig.nEventsPerJob if runArgs.maxEvents == -1 else runArgs.maxEvents + evgenLog.info('Requested output events '+str(postSeq.CountHepMC.RequestedOutput)) + +## Check that the keywords list is not empty: +if not evgenConfig.keywords: + evgenLog.warning("No entries in evgenConfig.keywords: invalid configuration, please check your JO !!") + +## Check that the keywords are in the list of allowed words (and exit if processing an official JO) +if evgenConfig.keywords: + ## Get the allowed keywords file from the JO package if possibe + # TODO: Make the package name configurable + kwfile = "EvgenJobTransforms/evgenkeywords.txt" + kwpath = None + for p in os.environ["JOBOPTSEARCHPATH"].split(":"): + kwpath = os.path.join(p, kwfile) + if os.path.exists(kwpath): + break + kwpath = None + ## Load the allowed keywords from the file + allowed_keywords = [] + if kwpath: + kwf = open(kwpath, "r") + for l in kwf: + allowed_keywords += l.strip().lower().split() + ## Check the JO keywords against the allowed ones + evil_keywords = [] + for k in evgenConfig.keywords: + if k.lower() not in allowed_keywords: + evil_keywords.append(k) + if evil_keywords: + msg = "evgenConfig.keywords contains non-standard keywords: %s. " % ", ".join(evil_keywords) + msg += "Please check the allowed keywords list and fix." + evgenLog.error(msg) + if officialJO: + sys.exit(1) + else: + evgenLog.warning("Could not find evgenkeywords.txt file %s in $JOBOPTSEARCHPATH" % kwfile) + +## Check that the categories list is not empty: +if not evgenConfig.categories: + evgenLog.warning("No entries in evgenConfig.categories: invalid configuration, please check your JO !!") + +## Check that the L1 and L2 keywords pairs are in the list of allowed words pairs (and exit if processing an official JO) +if evgenConfig.categories: + ## Get the allowed categories file from the JO package if possibe + # TODO: Make the package name configurable + lkwfile = "EvgenJobTransforms/CategoryList.txt" + lkwpath = None + for p in os.environ["JOBOPTSEARCHPATH"].split(":"): + lkwpath = os.path.join(p, lkwfile) + if os.path.exists(lkwpath): + break + lkwpath = None +## Load the allowed categories names from the file + allowed_cat = [] + if lkwpath: + with open(lkwpath, 'r') as catlist: + for line in catlist: + allowed_list = ast.literal_eval(line) + allowed_cat.append(allowed_list) + + ## Check the JO categories against the allowed ones + bad_cat =[] + it = iter(evgenConfig.categories) + for x in it: + l1 = x + l2 = next(it) + if "L1:" in l2 and "L2:" in l1: + l1, l2 = l2, l1 + bad_cat.extend([l1, l2]) + for a1,a2 in allowed_cat: + if l1.strip().lower()==a1.strip().lower() and l2.strip().lower()==a2.strip().lower(): + bad_cat=[] + if bad_cat: + msg = "evgenConfig.categories contains non-standard category: %s. " % ", ".join(bad_cat) + msg += "Please check the allowed categories list and fix." + evgenLog.error(msg) + if officialJO: + sys.exit(1) + else: + evgenLog.warning("Could not find CategoryList.txt file %s in $JOBOPTSEARCHPATH" % lkwfile) + +## Set the run numbers +svcMgr.EventSelector.RunNumber = int(dsid) + +## Include information about generators in metadata +import EventInfoMgt.EventInfoMgtInit +svcMgr.TagInfoMgr.ExtraTagValuePairs += ["mc_channel_number",str(dsid)] +svcMgr.TagInfoMgr.ExtraTagValuePairs += ["lhefGenerator", '+'.join( filter( gens_lhef, gennames ) ) ] +svcMgr.TagInfoMgr.ExtraTagValuePairs += ["generators", '+'.join(gennames)] +svcMgr.TagInfoMgr.ExtraTagValuePairs += ["evgenProcess", evgenConfig.process] +svcMgr.TagInfoMgr.ExtraTagValuePairs += ["evgenTune", evgenConfig.tune] +if hasattr( evgenConfig, "hardPDF" ) : svcMgr.TagInfoMgr.ExtraTagValuePairs += ["hardPDF", evgenConfig.hardPDF] +if hasattr( evgenConfig, "softPDF" ) : svcMgr.TagInfoMgr.ExtraTagValuePairs += ["softPDF", evgenConfig.softPDF] +if hasattr( runArgs, "randomSeed") : svcMgr.TagInfoMgr.ExtraTagValuePairs += ["randomSeed", str(runArgs.randomSeed)] +if hasattr( runArgs, "AMITag") and runArgs.AMITag != "NONE": svcMgr.TagInfoMgr.ExtraTagValuePairs += ["AMITag", runArgs.AMITag] + +## Handle beam info +svcMgr.TagInfoMgr.ExtraTagValuePairs += ["beam_energy", str(int(runArgs.ecmEnergy*Units.GeV/2.0))] +svcMgr.TagInfoMgr.ExtraTagValuePairs += ["beam_type", 'collisions'] + +## Propagate energy argument to the generators +# TODO: Standardise energy setting in the GenModule interface +include("EvgenJobTransforms/Generate_ecmenergies.py") + +## Process random seed arg and pass to generators +include("EvgenJobTransforms/Generate_randomseeds.py") + +## Add special config option (extended model info for BSM scenarios) +svcMgr.TagInfoMgr.ExtraTagValuePairs += ["specialConfiguration", evgenConfig.specialConfig ] + + +## Process random seed arg and pass to generators +#include("EvgenJobTransforms/Generate_randomseeds.py") + + +##============================================================== +## Handling of a post-include/exec args at the end of standard configuration +##============================================================== + +if hasattr(runArgs, "postInclude"): + for fragment in runArgs.postInclude: + include(fragment) + +if hasattr(runArgs, "postExec"): + evgenLog.info("Transform post-exec") + for cmd in runArgs.postExec: + evgenLog.info(cmd) + exec(cmd) + +##============================================================== +## Show the algorithm sequences and algs now that config is complete +##============================================================== +acas.dumpMasterSequence() + + +##============================================================== +## Input file arg handling +##============================================================== + +## Announce start of input file handling +evgenLog.debug("****************** HANDLING EVGEN INPUT FILES *****************") +printfunc("****************** HANDLING EVGEN INPUT FILES *****************") +## Dat files +datFile = None +if "McAtNlo" in evgenConfig.generators and "Herwig" in evgenConfig.generators: + datFile = "inparmMcAtNlo.dat" +elif "Alpgen" in evgenConfig.generators: + datFile = "inparmAlpGen.dat" +elif "Protos" in evgenConfig.generators: + datFile = "protos.dat" +elif "ProtosLHEF" in evgenConfig.generators: + datFile = "protoslhef.dat" +elif "AcerMC" in evgenConfig.generators: + datFile = "inparmAcerMC.dat" +elif "CompHep" in evgenConfig.generators: + datFile = "inparmCompHep.dat" + +## Events files +if "Alpgen" in evgenConfig.generators: + eventsFile = "alpgen.unw_events" +elif "Protos" in evgenConfig.generators: + eventsFile = "protos.events" +elif "ProtosLHEF" in evgenConfig.generators: + eventsFile = "protoslhef.events" +elif "BeamHaloGenerator" in evgenConfig.generators: + eventsFile = "beamhalogen.events" +elif "HepMCAscii" in evgenConfig.generators: + eventsFile = "events.hepmc" +elif "ReadMcAscii" in evgenConfig.generators: + eventsFile = "events.hepmc" +elif gens_lhef(evgenConfig.generators): + #eventsFile = outputTXTFile + eventsFile = "events.lhe" + + +## Helper functions for input file handling +def find_unique_file(pattern): + "Return a matching file, provided it is unique" + import glob + files = glob.glob(pattern) + ## Check that there is exactly 1 match + if not files: + raise RuntimeError("No '%s' file found" % pattern) + elif len(files) > 1: + 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)): + printfunc "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 = "" + printfunc "*** 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) + output.write(line) +## 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>\n") + output.close() + +def mk_symlink(srcfile, dstfile): + "Make a symlink safely" + if dstfile: + if os.path.exists(dstfile) and not os.path.samefile(dstfile, srcfile): + os.remove(dstfile) + if not os.path.exists(dstfile): + evgenLog.info("Symlinking %s to %s" % (srcfile, dstfile)) + os.symlink(srcfile, dstfile) + else: + evgenLog.debug("Symlinking: %s is already the same as %s" % (dstfile, srcfile)) + +## Find and symlink dat and event files, so they are available via the name expected by the generator +if eventsFile or datFile: + if not hasattr(runArgs, "inputGeneratorFile") or runArgs.inputGeneratorFile == "NONE": + raise RuntimeError("%s needs input file (argument inputGeneratorFile)" % runArgs.jobConfig) + 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)) + if datFile: + if ".tar" in os.path.basename(runArgs.inputGeneratorFile): + inputroot = os.path.basename(runArgs.inputGeneratorFile).split(".tar.")[0] + else: + inputroot = os.path.basename(runArgs.inputGeneratorFile).split("._")[0] + + realDatFile = find_unique_file('*%s*.dat' % inputroot) + mk_symlink(realDatFile, datFile) + if 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): + if ".tar" in os.path.basename(runArgs.inputGeneratorFile): + inputroot = os.path.basename(runArgs.inputGeneratorFile).split(".tar.")[0] + else: + inputroot = os.path.basename(runArgs.inputGeneratorFile).split("._")[0] + + if "events" in inputroot : + inputroot = inputroot.replace(".events","") + 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 + if ".tar" in os.path.basename(runArgs.inputGeneratorFile): + inputroot = os.path.basename(runArgs.inputGeneratorFile).split(".tar.")[0] + else: + input0 = os.path.basename(file).split("._")[0] + input1 = (os.path.basename(file).split("._")[1]).split(".")[0] + inputroot = input0+"._"+input1 + 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) + +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" % + (runArgs.jobConfig, str(gennames))) + if evgenConfig.inputfilecheck: + raise RuntimeError("evgenConfig.inputfilecheck specified in %s, but generators %s do not require an input file" % + (runArgs.jobConfig, str(gennames))) + +## Check conf files, as above but for a different command line arg, and with omission allowed +if hasattr(runArgs, "inputGenConfFile") and runArgs.inputGenConfFile != "NONE": + if evgenConfig.inputconfcheck and not re.search(evgenConfig.inputconfcheck, runArgs.inputGenConfFile): + raise RuntimeError("inputGenConfFile=%s is incompatible with inputconfcheck (%s) in %s" % + (runArgs.inputGenConfFile, evgenConfig.inputconfcheck, runArgs.jobConfig)) + +## Do the aux-file copying +if evgenConfig.auxfiles: + from PyJobTransformsCore.trfutil import get_files + get_files(evgenConfig.auxfiles, keepDir=False, errorIfNotFound=True) + +##============================================================== +## Write out metadata for reporting to AMI +##============================================================== + +def _checkattr(attr, required=False): + if not hasattr(evgenConfig, attr) or not getattr(evgenConfig, attr): + msg = "evgenConfig attribute '%s' not found." % attr + if required: + raise RuntimeError("Required " + msg) + return False + return True +# counting the number of events in LHE output +with open(eventsFile) as f: + contents = f.read() + count_ev = contents.count("<event>") + +printfunc "MetaData: %s = %s" % ("Number of produced LHE events ", count_ev) + +if _checkattr("description", required=True): + msg = evgenConfig.description + if _checkattr("notes"): + msg += " " + evgenConfig.notes +if _checkattr("generators", required=True): + gennamesvers=[] + for item in gennames: + genera = item.upper() + generat = genera+"VER" + if (generat in os.environ): + gennamesvers.append(item+"(v."+os.environ[generat]+")") + else: + gennamesvers.append(item) + printfunc "MetaData: %s = %s" % ("generatorName", "+".join(gennamesvers)) +if _checkattr("process"): + printfunc "MetaData: %s = %s" % ("physicsProcess", evgenConfig.process) +if _checkattr("tune"): + printfunc "MetaData: %s = %s" % ("generatorTune", evgenConfig.tune) +if _checkattr("hardPDF"): + printfunc "MetaData: %s = %s" % ("hardPDF", evgenConfig.hardPDF) +if _checkattr("softPDF"): + printfunc "MetaData: %s = %s" % ("softPDF", evgenConfig.softPDF) +if _checkattr("nEventsPerJob"): + printfunc "MetaData: %s = %s" % ("nEventsPerJob", evgenConfig.nEventsPerJob) +if _checkattr("keywords"): + printfunc "MetaData: %s = %s" % ("keywords", ", ".join(evgenConfig.keywords).lower() ), +if _checkattr("categories"): + printfunc ( ", " + ", ".join(evgenConfig.categories)) +else: + printfunc (" ") + +#if _checkattr("categories"): # will be uncommented when categories included into metadata +# printfunc "MetaData: %s = %s" % ("categories", ", ".join(evgenConfig.categories)) +if _checkattr("specialConfig"): + printfunc "MetaData: %s = %s" % ("specialConfig", evgenConfig.specialConfig) +# TODO: Require that a contact / JO author is always set +if _checkattr("contact"): + printfunc "MetaData: %s = %s" % ("contactPhysicist", ", ".join(evgenConfig.contact)) +#if _checkattr( "randomSeed") : # comment out for the time being +printfunc "MetaData: %s = %s" % ("randomSeed", str(runArgs.randomSeed)) + + + + +# Output list of generator filters used +filterNames = [alg.getType() for alg in acas.iter_algseq(filtSeq)] +excludedNames = ['AthSequencer', 'PyAthena::Alg', 'TestHepMC'] +filterNames = list(set(filterNames) - set(excludedNames)) +printfunc "MetaData: %s = %s" % ("genFilterNames", ", ".join(filterNames)) + + +##============================================================== +## Dump evgenConfig so it can be recycled in post-run actions +##============================================================== + +from PyJobTransformsCore.runargs import RunArguments +runPars = RunArguments() +runPars.nEventsPerJob = evgenConfig.nEventsPerJob +runPars.maxeventsstrategy = evgenConfig.maxeventsstrategy +with open("config.pickle", 'w') as f: + import cPickle + cPickle.dump(runPars, f) + + +##============================================================== +## Get ready to run... +##============================================================== + +evgenLog.debug("****************** STARTING EVENT GENERATION *****************") +printfunc ("****************** STARTING EVENT GENERATION *****************") +printfunc ("**************************************************************") +printfunc ("****************** PLEASE IGNORE THE LOG FROM PYTHIA ************") +printfunc ("****************** GENERATION OF ONE PYTHIA EVENT ***************") +printfunc ("******************** IS NEEDED TO MAKE *************") +printfunc ("****************** THE TRANSFORM WORK ***************************") +printfunc ("**************************************************************") + diff --git a/Generators/EvgenJobTransforms/share/skeleton.EVGENtoRivet.py b/Generators/EvgenJobTransforms/share/skeleton.EVGENtoRivet.py deleted file mode 100644 index 50b5ee5519d..00000000000 --- a/Generators/EvgenJobTransforms/share/skeleton.EVGENtoRivet.py +++ /dev/null @@ -1,97 +0,0 @@ -"""Functionality core of the Rivet_tf transform""" - -from future import standard_library -standard_library.install_aliases() - -##============================================================== -## Basic configuration -##============================================================== - -## Create sequence for Rivet -import os, re, string -import AthenaCommon.AlgSequence as acas -import AthenaCommon.AppMgr as acam -from AthenaCommon.AthenaCommonFlags import jobproperties -theApp = acam.theApp -topSeq = acas.AlgSequence() -anaSeq = topSeq - - -##============================================================== -## Configure standard Athena services -##============================================================== - -## Special setup for event generation -include("AthenaCommon/Atlas.UnixStandardJob.py") - -## Run performance monitoring (memory logging) -from PerfMonComps.PerfMonFlags import jobproperties as perfmonjp -perfmonjp.PerfMonFlags.doMonitoring = True -perfmonjp.PerfMonFlags.doSemiDetailedMonitoring = True - -## Jobs should stop if an include fails. -jobproperties.AthenaCommonFlags.AllowIgnoreConfigError = False - -## Set up a standard logger -from AthenaCommon.Logging import logging -evgenLog = logging.getLogger('Generate') - -## Announce arg checking -evgenLog.debug("****************** CHECKING Rivet ARGS *****************") -evgenLog.debug(str(runArgs)) - -if not hasattr(runArgs, "rivetAnas"): - raise RuntimeError("No Rivet analysis provided") - -## Announce start of Rivet setup -evgenLog.debug("****************** CONFIGURING Rivet *****************") - -import AthenaPoolCnvSvc.ReadAthenaPool -svcMgr.EventSelector.FirstEvent = runArgs.firstEvent -theApp.EvtMax = -1 -if hasattr(runArgs, "maxEvents"): - theApp.EvtMax = runArgs.maxEvents - -## Add Rivet_i to the job -from Rivet_i.Rivet_iConf import Rivet_i -anaSeq += Rivet_i() -anaSeq.Rivet_i.Analyses = runArgs.rivetAnas -anaSeq.Rivet_i.DoRootHistos = True - -if not hasattr(runArgs, "inputEVNTFile") : - raise RuntimeError("Must specify input EVNT file using inputEVNTFile") -else : - svcMgr.EventSelector.InputCollections = runArgs.inputEVNTFile - -from GaudiSvc.GaudiSvcConf import THistSvc -svcMgr += THistSvc() - -rootFile="Rivet.root" - -if hasattr(runArgs, "outputYODAFile"): - anaSeq.Rivet_i.HistoFile = runArgs.outputYODAFile - rootFile = runArgs.outputYODAFile.replace(".yoda", ".root") - -svcMgr.THistSvc.Output += ["Rivet DATAFILE='" + rootFile + "' OPT='RECREATE'"] - - -##============================================================== -## Show the algorithm sequences and algs now that config is complete -##============================================================== -acas.dumpMasterSequence() - -##============================================================== -## Dump evgenConfig so it can be recycled in post-run actions -##============================================================== - -from PyJobTransformsCore.runargs import RunArguments -runPars = RunArguments() -with open("config.pickle", 'w') as f: - import pickle - pickle.dump(runPars, f) - - -##============================================================== -## Get ready to run... -##============================================================== -evgenLog.debug("****************** STARTING Rivet *****************") diff --git a/Generators/EvgenJobTransforms/share/skeleton.EvtGenFromEVNT.py b/Generators/EvgenJobTransforms/share/skeleton.EvtGenFromEVNT.py deleted file mode 100644 index 15a3fcee6f6..00000000000 --- a/Generators/EvgenJobTransforms/share/skeleton.EvtGenFromEVNT.py +++ /dev/null @@ -1,58 +0,0 @@ -from __future__ import print_function -############################# -## basic jobO configuration -include("PATJobTransforms/CommonSkeletonJobOptions.py") -## load pool support -import AthenaPoolCnvSvc.ReadAthenaPool -import AthenaPoolCnvSvc.WriteAthenaPool - -## input -ServiceMgr.EventSelector.InputCollections = runArgs.inputEVNTFile - -## output stream -from AthenaPoolCnvSvc.WriteAthenaPool import AthenaPoolOutputStream - -outStream = AthenaPoolOutputStream("StreamEVGEN", runArgs.outputEVNT_MRGFile) - -# Pre-exec -if hasattr(runArgs,"preExec"): - recoLog.info("transform pre-exec") - for cmd in runArgs.preExec: - recoLog.info(cmd) - exec(cmd) - -## Pre-include -if hasattr(runArgs,"preInclude"): - for fragment in runArgs.preInclude: - print("preInclude",fragment) - include(fragment) - - -## copy everything from the input file -## must force reading of all input objects -outStream.TakeItemsFromInput = True -outStream.ItemList += [ "McEventCollection#*" ] - - -## Post-include -if hasattr(runArgs,"postInclude"): - for fragment in runArgs.postInclude: - include(fragment) - -## Post-exec -if hasattr(runArgs,"postExec"): - recoLog.info("transform post-exec") - for cmd in runArgs.postExec: - recoLog.info(cmd) - exec(cmd) - - -from EvgenJobTransforms.EvgenConfig import evgenConfig -if evgenConfig.auxfiles: - from PyJobTransformsCore.trfutil import get_files - get_files(evgenConfig.auxfiles, keepDir=False, errorIfNotFound=True) - -########## EOF ############### - - - diff --git a/Generators/EvgenJobTransforms/test/EvgenJobTransforms_TestConfiguration.xml b/Generators/EvgenJobTransforms/test/EvgenJobTransforms_TestConfiguration.xml deleted file mode 100644 index a6457e91859..00000000000 --- a/Generators/EvgenJobTransforms/test/EvgenJobTransforms_TestConfiguration.xml +++ /dev/null @@ -1,371 +0,0 @@ -<?xml version="1.0"?> -<!DOCTYPE unifiedTestConfiguration SYSTEM "http://www.hep.ucl.ac.uk/atlas/AtlasTesting/DTD/unifiedTestConfiguration.dtd"> - -<unifiedTestConfiguration> - - <atn> - - <TEST name="Py8Minbias" type="script" suite="EvgenJobTransforms-Core"> - <doc>Test inclusive, unfiltered minimum bias generation</doc> - <classification> - <displayClass>OfflineValidation</displayClass> - <displayProcess>EvGen</displayProcess> - <displayComponent>Athena-Core</displayComponent> - </classification> - <options_atn>${ATN_PACKAGE}/test/test_pythia8_minbias</options_atn> - <timelimit>15</timelimit> - <prescript>source ${ATN_PACKAGE}/test/setup_testenv</prescript> - </TEST> - - <TEST name="Py8Pileup" type="script" suite="EvgenJobTransforms-Core"> - <doc>Test high-pT minimum bias generation for pile-up sampling</doc> - <classification> - <displayClass>OfflineValidation</displayClass> - <displayProcess>EvGen</displayProcess> - <displayComponent>Athena-Core</displayComponent> - </classification> - <options_atn>${ATN_PACKAGE}/test/test_pythia8_minbias_high</options_atn> - <timelimit>15</timelimit> - <prescript>source ${ATN_PACKAGE}/test/setup_testenv</prescript> - </TEST> - - - <!-- Fails momentum balance test. - <TEST name="Py8Jets" type="script" suite="EvgenJobTransforms-Core"> - <doc>Test a Pythia8 jet slice, with a very low filter efficiency</doc> - <classification> - <displayClass>OfflineValidation</displayClass> - <displayProcess>EvGen</displayProcess> - <displayComponent>Athena-Core</displayComponent> - </classification> - <options_atn>${ATN_PACKAGE}/test/test_pythia8_jets</options_atn> - <timelimit>15</timelimit> - <prescript>source ${ATN_PACKAGE}/test/setup_testenv</prescript> - </TEST> - --> - - - <TEST name="Py8Ztautau" type="script" suite="EvgenJobTransforms-Core"> - <doc>Tests a Pythia8 Z->tautau job, with Photos++</doc> - <classification> - <displayClass>OfflineValidation</displayClass> - <displayProcess>EvGen</displayProcess> - <displayComponent>Athena-Core</displayComponent> - </classification> - <options_atn>${ATN_PACKAGE}/test/test_pythia8_ztautau</options_atn> - <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> - - - <!-- Powheg is not in git builds. - <TEST name="powhegpy8TauolaPPEG" type="script" suite="EvgenJobTransforms-Core"> - <doc>Test Powheg+Pythia8+TauolaPP+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> - <prescript>source ${ATN_PACKAGE}/test/setup_testenv</prescript> - </TEST> - --> - - - - <TEST name="Py8Powheg" type="script" suite="EvgenJobTransforms-Core"> - <doc>Test POWHEG+Pythia8</doc> - <classification> - <displayClass>OfflineValidation</displayClass> - <displayProcess>EvGen</displayProcess> - <displayComponent>Athena-Core</displayComponent> - </classification> - <options_atn>${ATN_PACKAGE}/test/test_pythia8_powheg</options_atn> - <timelimit>15</timelimit> - <prescript>source ${ATN_PACKAGE}/test/setup_testenv</prescript> - </TEST> - - - - <TEST name="McAtNloJimmy" type="script" suite="EvgenJobTransforms-Core"> - <doc>Test MC@NLO+HERWIG+JIMMY</doc> - <classification> - <displayClass>OfflineValidation</displayClass> - <displayProcess>EvGen</displayProcess> - <displayComponent>Athena-Core</displayComponent> - </classification> - <options_atn>${ATN_PACKAGE}/test/test_mcatnlo_jimmy</options_atn> - <timelimit>15</timelimit> - <prescript>source ${ATN_PACKAGE}/test/setup_testenv</prescript> - </TEST> - - - <!-- - <TEST name="McAtNloHerwigpp" type="script" suite="EvgenJobTransforms-Core"> - <doc>Test MC@NLO+Herwig++</doc> - <classification> - <displayClass>OfflineValidation</displayClass> - <displayProcess>EvGen</displayProcess> - <displayComponent>Athena-Core</displayComponent> - </classification> - <options_atn>${ATN_PACKAGE}/test/test_mcatnlo_herwigpp</options_atn> - <timelimit>15</timelimit> - <prescript>source ${ATN_PACKAGE}/test/setup_testenv</prescript> - </TEST> - --> - - - <TEST name="AlpgenJimmy" type="script" suite="EvgenJobTransforms-Core"> - <doc>Test Alpgen+HERWIG+JIMMY</doc> - <classification> - <displayClass>OfflineValidation</displayClass> - <displayProcess>EvGen</displayProcess> - <displayComponent>Athena-Core</displayComponent> - </classification> - <options_atn>${ATN_PACKAGE}/test/test_alpgen_jimmy</options_atn> - <timelimit>15</timelimit> - <prescript>source ${ATN_PACKAGE}/test/setup_testenv</prescript> - </TEST> - - - - <TEST name="AlpgenPythia" type="script" suite="EvgenJobTransforms-Core"> - <doc>Test Alpgen+PYTHIA</doc> - <classification> - <displayClass>OfflineValidation</displayClass> - <displayProcess>EvGen</displayProcess> - <displayComponent>Athena-Core</displayComponent> - </classification> - <options_atn>${ATN_PACKAGE}/test/test_alpgen_pythia</options_atn> - <timelimit>15</timelimit> - <prescript>source ${ATN_PACKAGE}/test/setup_testenv</prescript> - </TEST> - - - - <TEST name="QGSJet" type="script" suite="EvgenJobTransforms-Core"> - <doc>Test minimum bias generation with QGSJet</doc> - <classification> - <displayClass>OfflineValidation</displayClass> - <displayProcess>EvGen</displayProcess> - <displayComponent>Athena-Core</displayComponent> - </classification> - <options_atn>${ATN_PACKAGE}/test/test_qgsjet</options_atn> - <timelimit>15</timelimit> - <prescript>source ${ATN_PACKAGE}/test/setup_testenv</prescript> - </TEST> - - - <!--- Need a newer version of Herwig7_i than is in master. - <TEST name="Herwig7" type="script" suite="EvgenJobTransforms-Core"> - <doc>Test minimum bias generation with Herwig7</doc> - <classification> - <displayClass>OfflineValidation</displayClass> - <displayProcess>EvGen</displayProcess> - <displayComponent>Athena-Core</displayComponent> - </classification> - <options_atn>${ATN_PACKAGE}/test/test_herwig7</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> - --> - - <!-- powheg is not in git builds. - <TEST name="PowhegWenu" type="script" suite="EvgenJobTransforms-Core"> - <doc>Test W-enu generation with Powheg</doc> - <classification> - <displayClass>OfflineValidation</displayClass> - <displayProcess>EvGen</displayProcess> - <displayComponent>Athena-Core</displayComponent> - </classification> - <options_atn>${ATN_PACKAGE}/test/test_powheg_wenu</options_atn> - <timelimit>30</timelimit> - <prescript>source ${ATN_PACKAGE}/test/setup_testenv</prescript> - </TEST> - - <TEST name="Powhegttbar" type="script" suite="EvgenJobTransforms-Core"> - <doc>Test ttbar generation with Powheg</doc> - <classification> - <displayClass>OfflineValidation</displayClass> - <displayProcess>EvGen</displayProcess> - <displayComponent>Athena-Core</displayComponent> - </classification> - <options_atn>${ATN_PACKAGE}/test/test_powheg_ttbar</options_atn> - <timelimit>20</timelimit> - <prescript>source ${ATN_PACKAGE}/test/setup_testenv</prescript> - </TEST> - - <TEST name="PowhegtW" type="script" suite="EvgenJobTransforms-Core"> - <doc>Test ttbar generation with Powheg</doc> - <classification> - <displayClass>OfflineValidation</displayClass> - <displayProcess>EvGen</displayProcess> - <displayComponent>Athena-Core</displayComponent> - </classification> - <options_atn>${ATN_PACKAGE}/test/test_powheg_pythia_evtgen_wt</options_atn> - <timelimit>30</timelimit> - <prescript>source ${ATN_PACKAGE}/test/setup_testenv</prescript> - </TEST> - --> - - <!-- Fails momentum balance test. - <TEST name="MadGraphttW" type="script" suite="EvgenJobTransforms-Core"> - <doc>Test ttbar generation with MadGraph</doc> - <classification> - <displayClass>OfflineValidation</displayClass> - <displayProcess>EvGen</displayProcess> - <displayComponent>Athena-Core</displayComponent> - </classification> - <options_atn>${ATN_PACKAGE}/test/test_mgpythia8_ttW</options_atn> - <timelimit>30</timelimit> - <prescript>source ${ATN_PACKAGE}/test/setup_testenv</prescript> - </TEST> - --> - - <!-- Fails momentum balance test. - <TEST name="MadGraphZmumu" type="script" suite="EvgenJobTransforms-Core"> - <doc>Test ttbar generation with MadGraph</doc> - <classification> - <displayClass>OfflineValidation</displayClass> - <displayProcess>EvGen</displayProcess> - <displayComponent>Athena-Core</displayComponent> - </classification> - <options_atn>${ATN_PACKAGE}/test/test_mgpythia8_Zmumu</options_atn> - <timelimit>30</timelimit> - <prescript>source ${ATN_PACKAGE}/test/setup_testenv</prescript> - </TEST> - --> - - - <TEST name="SherpaDY" type="script" suite="EvgenJobTransforms-Core"> - <doc>Test DY Z-ee generation with Sherpa</doc> - <classification> - <displayClass>OfflineValidation</displayClass> - <displayProcess>EvGen</displayProcess> - <displayComponent>Athena-Core</displayComponent> - </classification> - <options_atn>${ATN_PACKAGE}/test/test_sherpa_dy</options_atn> - <timelimit>20</timelimit> - <prescript>source ${ATN_PACKAGE}/test/setup_testenv</prescript> - </TEST> - - - <!-- - <TEST name="Epos" type="script" suite="EvgenJobTransforms-Core"> - <doc>Test minimum bias generation with EPOS</doc> - <classification> - <displayClass>OfflineValidation</displayClass> - <displayProcess>EvGen</displayProcess> - <displayComponent>Athena-Core</displayComponent> - </classification> - <options_atn>${ATN_PACKAGE}/test/test_epos</options_atn> - <timelimit>15</timelimit> - <prescript>source ${ATN_PACKAGE}/test/setup_testenv</prescript> - </TEST> - --> - - - - <TEST name="BPhys" type="script" suite="EvgenJobTransforms-Core"> - <doc>Test B->JPsiX generation with Pythia8B</doc> - <classification> - <displayClass>OfflineValidation</displayClass> - <displayProcess>EvGen</displayProcess> - <displayComponent>Athena-Core</displayComponent> - </classification> - <options_atn>${ATN_PACKAGE}/test/test_bphys</options_atn> - <timelimit>15</timelimit> - <prescript>source ${ATN_PACKAGE}/test/setup_testenv</prescript> - </TEST> - - - <TEST name="Single" type="script" suite="EvgenJobTransforms-Core"> - <doc>Test single particle generation with ParticleGun</doc> - <classification> - <displayClass>OfflineValidation</displayClass> - <displayProcess>EvGen</displayProcess> - <displayComponent>Athena-Core</displayComponent> - </classification> - <options_atn>${ATN_PACKAGE}/test/test_single</options_atn> - <timelimit>15</timelimit> - <prescript>source ${ATN_PACKAGE}/test/setup_testenv</prescript> - </TEST> - - </atn> - - - <kv> - - <kvtest name="EvgenPy8Zee" enabled="true"> - <release>ALL</release> - <priority>10</priority> - <kvsuite>MC14</kvsuite> - <trf>Generate_tf.py</trf> - <desc>Pythia8 Z -> e e event generation</desc> - <author>Andy Buckley [andy.buckley@cern.ch]</author> - <inpath></inpath> - <infile></infile> - <inpool></inpool> - <outpath>${T_DATAPATH}/EvgenZeePyJT-${T_RELEASE}</outpath> - <outfile>${T_PREFIX}-EvgenZeePyJT-${T_RELEASE}.pool.root</outfile> - <logfile>${T_PREFIX}-EvgenZeePyJT-${T_RELEASE}.log</logfile> - <signature> - --ecmEnergy=8000 --runNumber=147800 --maxEvents=1000 --randomSeed=26740107 --jobConfig=EvgenJobTransforms/test_MC14_Pythia8_Zee.py --outputEVNTFile="${T_OUTFILE}" - </signature> - <copyfiles> - ${T_OUTFILE} ${T_LOGFILE} PoolFileCatalog.xml metadata.xml jobInfo.xml - </copyfiles> - <checkfiles>${T_OUTPATH}/${T_OUTFILE}</checkfiles> - </kvtest> - - <kvtest name="EvgenPy6Wtaunu" enabled="true"> - <release>ALL</release> - <priority>10</priority> - <kvsuite>MC12</kvsuite> - <trf>Generate_tf.py</trf> - <desc>PYTHIA6 W -> tau nu event generation</desc> - <author>Andy Buckley [andy.buckley@cern.ch]</author> - <inpath></inpath> - <infile></infile> - <inpool></inpool> - <outpath>${T_DATAPATH}/EvgenWtaunuPyJT-${T_RELEASE}</outpath> - <outfile>${T_PREFIX}-EvgenWtaunuPyJT-${T_RELEASE}.pool.root</outfile> - <logfile>${T_PREFIX}-EvgenWtaunuPyJT-${T_RELEASE}.log</logfile> - <signature> - --ecmEnergy=8000 --runNumber=147800 --maxEvents=1000 --randomSeed=26740107 --jobConfig=EvgenJobTransforms/test_MC14_Pythia6_Wtaunu.py --outputEVNTFile="${T_OUTFILE}" - </signature> - <copyfiles> - ${T_OUTFILE} ${T_LOGFILE} PoolFileCatalog.xml metadata.xml jobInfo.xml - </copyfiles> - <checkfiles>${T_OUTPATH}/${T_OUTFILE}</checkfiles> - </kvtest> - - </kv> - - -</unifiedTestConfiguration> diff --git a/Generators/EvgenJobTransforms/test/setup_testenv b/Generators/EvgenJobTransforms/test/setup_testenv deleted file mode 100644 index 079a9261c2b..00000000000 --- a/Generators/EvgenJobTransforms/test/setup_testenv +++ /dev/null @@ -1,33 +0,0 @@ -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 - -if [ "$MADPATH" = "" ]; then - for p in `echo $LD_LIBRARY_PATH | tr : ' '`; do - if [ "${p%LCG_*}" != "$p" ]; then - while [ "$p" != "/" ]; do - d=`basename $p` - if [ "${d#LCG_}" != "$d" ]; then - for mgdir in `echo $p/MCGenerators/madgraph5amc/*`; do - export MADPATH=$mgdir/$LCG_PLATFORM - break 3 - done - break 2 - fi - p=`dirname $p` - done - break - fi - done -fi - -if [ "$HERWIG7_PATH" = "" ]; then - for p in `echo $LD_LIBRARY_PATH | tr : ' '`; do - if [ `basename $p` = "Herwig" ]; then - d=`dirname $p` - d=`dirname $d` - export HERWIG7_PATH=$d - break - fi - done -fi diff --git a/Generators/EvgenJobTransforms/test/test_MC14_Pythia6_Wtaunu.py b/Generators/EvgenJobTransforms/test/test_MC14_Pythia6_Wtaunu.py deleted file mode 100644 index 2e4e1b2d56b..00000000000 --- a/Generators/EvgenJobTransforms/test/test_MC14_Pythia6_Wtaunu.py +++ /dev/null @@ -1,16 +0,0 @@ -# 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" -evgenConfig.keywords = ["electroweak", "W", "leptons", "tau"] - -include("MC14JobOptions/Pythia_AUET2B_CTEQ6L1_Common.py") -include("MC14JobOptions/Pythia_Photos.py") -include("MC14JobOptions/Pythia_Tauola.py") - -genSeq.Pythia.PythiaCommand += ["pysubs msel 0", - "pysubs msub 2 1", # Create W bosons - "pysubs ckin 1 60.0"] # Lower invariant mass - -include("MC14JobOptions/Pythia_Decay_Wtaunu.py") diff --git a/Generators/EvgenJobTransforms/test/test_MC14_Pythia8_Zee.py b/Generators/EvgenJobTransforms/test/test_MC14_Pythia8_Zee.py deleted file mode 100644 index ebbcff8f7d1..00000000000 --- a/Generators/EvgenJobTransforms/test/test_MC14_Pythia8_Zee.py +++ /dev/null @@ -1,14 +0,0 @@ -# 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" -evgenConfig.keywords = ["electroweak", "Z", "leptons"] - -include("MC14JobOptions/Pythia8_AU2_CTEQ6L1_Common.py") -include("MC14JobOptions/Pythia8_Photos.py") - -genSeq.Pythia8.Commands += ["WeakSingleBoson:ffbar2gmZ = on", # create Z bosons - "PhaseSpace:mHatMin = 60.", # lower invariant mass - "23:onMode = off", # switch off all Z decays - "23:onIfAny = 11"] # switch on Z->ee decays diff --git a/Generators/EvgenJobTransforms/test/test_alpgen_jimmy b/Generators/EvgenJobTransforms/test/test_alpgen_jimmy deleted file mode 100755 index 73a8be26e9e..00000000000 --- a/Generators/EvgenJobTransforms/test/test_alpgen_jimmy +++ /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; -LD_PRELOAD=libphotos.so \ -Generate_tf.py --ecmEnergy=8000 --runNumber=107680 --maxEvents=5 \ - --jobConfig=$JODIR/share/tests/MC14.107680.AlpgenHerwig_AUET2CTEQ6L1_WenuNp0.py \ - --outputEVNTFile=test_AlpgenHerwigJimmy_WenuNp0.EVNT.pool.root \ - --inputGeneratorFile=$TESTDATA/group.phys-gener.alpgen214.107680.WenuNp0_CTEQ6L1_8TeV.TXT.mc12_v1._00001.tar.gz \ - $@ diff --git a/Generators/EvgenJobTransforms/test/test_alpgen_pythia b/Generators/EvgenJobTransforms/test/test_alpgen_pythia deleted file mode 100755 index c11ceb9bf27..00000000000 --- a/Generators/EvgenJobTransforms/test/test_alpgen_pythia +++ /dev/null @@ -1,9 +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=8000 --runNumber=117680 --maxEvents=2 \ - --jobConfig=$JODIR/share/tests/MC14.117680.AlpgenPythia_P2011C_WenuNp0.py \ - --outputEVNTFile=test_AlpgenPythia_WenuNp0.EVNT.pool.root \ - --inputGeneratorFile=$TESTDATA/group.phys-gener.alpgen214.107680.WenuNp0_CTEQ6L1_8TeV.TXT.mc12_v1._00001.tar.gz \ - $@ diff --git a/Generators/EvgenJobTransforms/test/test_bphys b/Generators/EvgenJobTransforms/test/test_bphys deleted file mode 100755 index a1ed4f1d7d0..00000000000 --- a/Generators/EvgenJobTransforms/test/test_bphys +++ /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=429705 --maxEvents=10 \ - --jobConfig=$JODIR15/share/DSID429xxx/MC15.429705.Pythia8B_A14NNPDF23LO_pp_JpsimumuZmumu.py \ - --outputEVNTFile=test_bb_Jpsimu4mu4X.EVNT.pool.root \ - $@ \ - | grep -v cmt - diff --git a/Generators/EvgenJobTransforms/test/test_epos b/Generators/EvgenJobTransforms/test/test_epos deleted file mode 100755 index 307a3237ead..00000000000 --- a/Generators/EvgenJobTransforms/test/test_epos +++ /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=8000 --runNumber=129080 --maxEvents=10 \ - --jobConfig=$JODIR/share/tests/MC14.129080.Epos_minbias_inelastic.py \ - --outputEVNTFile=test_epos_minbias_inelastic.EVNT.pool.root \ - $@ diff --git a/Generators/EvgenJobTransforms/test/test_bphys.sh b/Generators/EvgenJobTransforms/test/test_gen_bphys.sh similarity index 54% rename from Generators/EvgenJobTransforms/test/test_bphys.sh rename to Generators/EvgenJobTransforms/test/test_gen_bphys.sh index 373853b1ba1..21ba0f97eee 100755 --- a/Generators/EvgenJobTransforms/test/test_bphys.sh +++ b/Generators/EvgenJobTransforms/test/test_gen_bphys.sh @@ -1,15 +1,13 @@ #!/bin/bash # art-description: Generation test Pythia8B Jpsimumu Zmumu -# art-include: master/Athena +# art-include: master/AthGeneration # art-type: build # art-output: *.root # art-output: log.generate ## 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=/cvmfs/atlas.cern.ch/repo/sw/Generators/MC15JobOptions/latest/share/DSID429xxx/MC15.429705.Pythia8B_A14NNPDF23LO_pp_JpsimumuZmumu.py \ +Gen_tf.py --ecmEnergy=13000 --maxEvents=10 --jobConfig=421101 \ --outputEVNTFile=test_bb_Jpsimu4mu4X.EVNT.pool.root \ echo "art-result: $? generate" -rm -fr _joproxy15 diff --git a/Generators/EvgenJobTransforms/test/test_epos.sh b/Generators/EvgenJobTransforms/test/test_gen_epos.sh similarity index 56% rename from Generators/EvgenJobTransforms/test/test_epos.sh rename to Generators/EvgenJobTransforms/test/test_gen_epos.sh index 932fc3af621..f30340bf508 100755 --- a/Generators/EvgenJobTransforms/test/test_epos.sh +++ b/Generators/EvgenJobTransforms/test/test_gen_epos.sh @@ -1,16 +1,15 @@ #!/bin/bash # art-description: Generation test Epos min_bias -# art-include: master/Athena +# art-include: master/AthGeneration # art-type: build # art-output: *.root # art-output: log.generate ## Any arguments are considered overrides, and will be added at the end export TRF_ECHO=True; -Generate_tf.py --ecmEnergy=13000 --runNumber=361224 --maxEvents=10 \ - --jobConfig=/cvmfs/atlas.cern.ch/repo/sw/Generators/MC15JobOptions/latest/share/DSID361xxx/MC15.361224.Epos_minbias_inelastic.py \ +Gen_tf.py --ecmEnergy=13000 --maxEvents=10 \ + --jobConfig=421102 \ --outputEVNTFile=test_epos_minbias_inelastic.EVNT.pool.root \ echo "art-result: $? generate" -rm -fr _joproxy15 diff --git a/Generators/EvgenJobTransforms/test/test_herwig7dijet.sh b/Generators/EvgenJobTransforms/test/test_gen_herwig7_dijet.sh similarity index 55% rename from Generators/EvgenJobTransforms/test/test_herwig7dijet.sh rename to Generators/EvgenJobTransforms/test/test_gen_herwig7_dijet.sh index e2586de6aff..2767023d6e7 100755 --- a/Generators/EvgenJobTransforms/test/test_herwig7dijet.sh +++ b/Generators/EvgenJobTransforms/test/test_gen_herwig7_dijet.sh @@ -1,16 +1,14 @@ #!/bin/bash # art-description: Generation test H7 dijets -# art-include: master/Athena +# art-include: master/AthGeneration # art-type: build # art-output: *.root # art-output: log.generate ## 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=/cvmfs/atlas.cern.ch/repo/sw/Generators/MC15JobOptions/latest/share/DSID429xxx/MC15.429699.Herwig7_Dijet.py \ +Gen_tf.py --ecmEnergy=13000 --jobConfig=421106 --maxEvents=10 \ --outputEVNTFile=test_herwig7_dijet.EVNT.pool.root \ echo "art-result: $? generate" -rm -fr _joproxy15 diff --git a/Generators/EvgenJobTransforms/test/test_herwig7_minbias.sh b/Generators/EvgenJobTransforms/test/test_gen_herwig7_minbias.sh similarity index 57% rename from Generators/EvgenJobTransforms/test/test_herwig7_minbias.sh rename to Generators/EvgenJobTransforms/test/test_gen_herwig7_minbias.sh index a6bae656500..e8c0e3d288e 100755 --- a/Generators/EvgenJobTransforms/test/test_herwig7_minbias.sh +++ b/Generators/EvgenJobTransforms/test/test_gen_herwig7_minbias.sh @@ -1,18 +1,16 @@ #!/bin/bash # art-description: Generation test H7 min_bias -# art-include: master/Athena +# art-include: master/AthGeneration # art-type: build # art-output: *.root # art-output: log.generate ## 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=/cvmfs/atlas.cern.ch/repo/sw/Generators/MC15JobOptions/latest/share/DSID429xxx/MC15.429700.Herwig7_MinBias.py \ +Gen_tf.py --ecmEnergy=13000 --maxEvents=10 --jobConfig=421103 \ --outputEVNTFile=test_herwig7_minbias_inelastic.EVNT.pool.root \ echo "art-result: $? generate" -rm -rf _joproxy15 diff --git a/Generators/EvgenJobTransforms/test/test_herwig7_wjets.sh b/Generators/EvgenJobTransforms/test/test_gen_herwig7_wjets.sh similarity index 54% rename from Generators/EvgenJobTransforms/test/test_herwig7_wjets.sh rename to Generators/EvgenJobTransforms/test/test_gen_herwig7_wjets.sh index 868643a014e..6590c3b8f5e 100755 --- a/Generators/EvgenJobTransforms/test/test_herwig7_wjets.sh +++ b/Generators/EvgenJobTransforms/test/test_gen_herwig7_wjets.sh @@ -1,15 +1,13 @@ #!/bin/bash # art-description: Generation test H7 Wjets -# art-include: master/Athena +# art-include: master/AthGeneration # art-type: build # art-output: *.root # art-output: log.generate ## Any arguments are considered overrides, and will be added at the end export TRF_ECHO=True; -Generate_tf.py --ecmEnergy=13000 --runNumber=429722 --maxEvents=10 \ - --jobConfig=/cvmfs/atlas.cern.ch/repo/sw/Generators/MC15JobOptions/latest/share/DSID429xxx/MC15.429722.Herwig7_H7UE_MMHT2014lo68cl_Wjets.py \ +Gen_tf.py --ecmEnergy=13000 --jobConfig=421104 --maxEvents=10 \ --outputEVNTFile=test_herwig7_wjets_inelastic.EVNT.pool.root \ echo "art-result: $? generate" -rm -fr _joproxy15 diff --git a/Generators/EvgenJobTransforms/test/test_herwig7_zjets.sh b/Generators/EvgenJobTransforms/test/test_gen_herwig7_zjets.sh similarity index 54% rename from Generators/EvgenJobTransforms/test/test_herwig7_zjets.sh rename to Generators/EvgenJobTransforms/test/test_gen_herwig7_zjets.sh index 79e91ad6e5c..95429e0c05e 100755 --- a/Generators/EvgenJobTransforms/test/test_herwig7_zjets.sh +++ b/Generators/EvgenJobTransforms/test/test_gen_herwig7_zjets.sh @@ -1,17 +1,15 @@ #!/bin/bash # art-description: Generation test H7 Zjets -# art-include: master/Athena +# art-include: master/AthGeneration # art-type: build # art-output: *.root # art-output: log.generate ## Any arguments are considered overrides, and will be added at the end export TRF_ECHO=True; -Generate_tf.py --ecmEnergy=13000 --runNumber=429721 --maxEvents=10 \ - --jobConfig=/cvmfs/atlas.cern.ch/repo/sw/Generators/MC15JobOptions/latest/share/DSID429xxx/MC15.429721.Herwig7_H7UE_MMHT2014lo68cl_Zjets.py \ +Gen_tf.py --ecmEnergy=13000 --jobConfig=421105 --maxEvents=10 \ --outputEVNTFile=test_herwig7_zjets_inelastic.EVNT.pool.root \ echo "art-result: $? generate" -rm -fr _joproxy15 diff --git a/Generators/EvgenJobTransforms/test/test_gen_mg_LHEonly_WbWb.sh b/Generators/EvgenJobTransforms/test/test_gen_mg_LHEonly_WbWb.sh new file mode 100755 index 00000000000..542cf7caade --- /dev/null +++ b/Generators/EvgenJobTransforms/test/test_gen_mg_LHEonly_WbWb.sh @@ -0,0 +1,16 @@ +#!/bin/bash +# art-description: Generation test MadGraph LHE-only for W+bW-b +# art-type: build +# art-include: master/AthGeneration +# art-output: *.root +# art-output: log.generate + +## Any arguments are considered overrides, and will be added at the end +export TRF_ECHO=True; +rm *; +Gen_tf.py --ecmEnergy=13000 --jobConfig=421125 \ + --outputTXTFile=test_mg_WbWb.TXT \ + +echo "art-result: $? generate" + + diff --git a/Generators/EvgenJobTransforms/test/test_mgpythia8_Zmumu.sh b/Generators/EvgenJobTransforms/test/test_gen_mgpythia8_Zmumu.sh similarity index 54% rename from Generators/EvgenJobTransforms/test/test_mgpythia8_Zmumu.sh rename to Generators/EvgenJobTransforms/test/test_gen_mgpythia8_Zmumu.sh index 9dc994d7990..1186746c5f2 100755 --- a/Generators/EvgenJobTransforms/test/test_mgpythia8_Zmumu.sh +++ b/Generators/EvgenJobTransforms/test/test_gen_mgpythia8_Zmumu.sh @@ -1,18 +1,16 @@ #!/bin/bash # art-description: Generation test MG+Py8 Z->mumu # art-type: build -# art-include: master/Athena +# art-include: master/AthGeneration # art-output: *.root # art-output: log.generate ## Any arguments are considered overrides, and will be added at the end export TRF_ECHO=True; rm *; -Generate_tf.py --ecmEnergy=13000 --runNumber=361505 --maxEvents=10 \ - --jobConfig=/cvmfs/atlas.cern.ch/repo/sw/Generators/MC15JobOptions/latest/share/DSID361xxx/MC15.361505.MadGraphPythia8EvtGen_A14NNPDF23LO_Zmumu_Np0.py \ +Gen_tf.py --ecmEnergy=13000 --jobConfig=421107 --maxEvents=10 \ --outputEVNTFile=test_mgpythia8_Zmumu.EVNT.pool.root \ echo "art-result: $? generate" -rm -fr _joproxy15 diff --git a/Generators/EvgenJobTransforms/test/test_mgpythia8_ttW.sh b/Generators/EvgenJobTransforms/test/test_gen_mgpythia8_ttW.sh similarity index 53% rename from Generators/EvgenJobTransforms/test/test_mgpythia8_ttW.sh rename to Generators/EvgenJobTransforms/test/test_gen_mgpythia8_ttW.sh index 5acfc614f2b..b045ef8c25d 100755 --- a/Generators/EvgenJobTransforms/test/test_mgpythia8_ttW.sh +++ b/Generators/EvgenJobTransforms/test/test_gen_mgpythia8_ttW.sh @@ -1,6 +1,6 @@ #!/bin/bash # art-description: Generation test MG+Py8 ttW -# art-include: master/Athena +# art-include: master/AthGeneration # art-type: build # art-output: *.root # art-output: log.generate @@ -8,11 +8,9 @@ ## Any arguments are considered overrides, and will be added at the end export TRF_ECHO=True; rm *; -Generate_tf.py --ecmEnergy=13000 --runNumber=410066 --maxEvents=10 \ - --jobConfig=/cvmfs/atlas.cern.ch/repo/sw/Generators/MC15JobOptions/latest/share/DSID410xxx/MC15.410066.MadGraphPythia8EvtGen_A14NNPDF23LO_ttW_Np0.py \ +Gen_tf.py --ecmEnergy=13000 --jobConfig=421108 --maxEvents=10 \ --outputEVNTFile=test_mgpythia8_ttW.EVNT.pool.root \ echo "art-result: $? generate" -rm -fr _joproxy15 diff --git a/Generators/EvgenJobTransforms/test/test_mgpythia8_tt_NLO.sh b/Generators/EvgenJobTransforms/test/test_gen_mgpythia8_tt_NLO.sh similarity index 54% rename from Generators/EvgenJobTransforms/test/test_mgpythia8_tt_NLO.sh rename to Generators/EvgenJobTransforms/test/test_gen_mgpythia8_tt_NLO.sh index 3bb7b8296d8..c3521dd3d90 100755 --- a/Generators/EvgenJobTransforms/test/test_mgpythia8_tt_NLO.sh +++ b/Generators/EvgenJobTransforms/test/test_gen_mgpythia8_tt_NLO.sh @@ -1,6 +1,6 @@ #!/bin/bash # art-description: Generation test MG+Py8 tt NLO -# art-include: master/Athena +# art-include: master/AthGeneration # art-type: build # art-output: *.root # art-output: log.generate @@ -8,11 +8,9 @@ ## Any arguments are considered overrides, and will be added at the end export TRF_ECHO=True; rm *; -Generate_tf.py --ecmEnergy=13000 --runNumber=412121 --maxEvents=10 \ - --jobConfig=/cvmfs/atlas.cern.ch/repo/sw/Generators/MC15JobOptions/latest/share/DSID412xxx/MC15.412121.aMcAtNloHerwig7EvtGen_MEN30NLO_ttbar_incl_LHE.py \ +Gen_tf.py --ecmEnergy=13000 --jobConfig=421109 --maxEvents=10 \ --outputEVNTFile=test_mgpythia8_tt_NLO.EVNT.pool.root \ echo "art-result: $? generate" -rm -fr _joproxy15 diff --git a/Generators/EvgenJobTransforms/test/test_powhegLHEonly_Ztautau.sh b/Generators/EvgenJobTransforms/test/test_gen_powhegLHEonly_Ztautau.sh similarity index 56% rename from Generators/EvgenJobTransforms/test/test_powhegLHEonly_Ztautau.sh rename to Generators/EvgenJobTransforms/test/test_gen_powhegLHEonly_Ztautau.sh index dce387a41d3..d6acf4c8d3e 100755 --- a/Generators/EvgenJobTransforms/test/test_powhegLHEonly_Ztautau.sh +++ b/Generators/EvgenJobTransforms/test/test_gen_powhegLHEonly_Ztautau.sh @@ -1,18 +1,16 @@ #!/bin/bash # art-description: Generation test Powheg LHE only Z->tautau # art-type: build -# art-include: master/Athena +# art-include: master/AthGeneration # art-output: *.root # art-output: log.generate ## Any arguments are considered overrides, and will be added at the end export TRF_ECHO=True; rm *; -Generate_tf_txt.py --ecmEnergy=13000 --runNumber=369108 \ - --jobConfig=/cvmfs/atlas.cern.ch/repo/sw/Generators/MC15JobOptions/latest/share/DSID369xxx/MC15.369108.Powheg_AZNLOCTEQ6L1_Ztautau.py \ +Gen_tf.py --ecmEnergy=13000 --jobConfig=421111 \ --outputTXTFile=test_powheg_Ztautau.TXT \ echo "art-result: $? generate" -rm -fr _joproxy15 diff --git a/Generators/EvgenJobTransforms/test/test_powheg_ttbar.sh b/Generators/EvgenJobTransforms/test/test_gen_powheg_ttbar.sh similarity index 53% rename from Generators/EvgenJobTransforms/test/test_powheg_ttbar.sh rename to Generators/EvgenJobTransforms/test/test_gen_powheg_ttbar.sh index 558dee6c688..9823773568e 100755 --- a/Generators/EvgenJobTransforms/test/test_powheg_ttbar.sh +++ b/Generators/EvgenJobTransforms/test/test_gen_powheg_ttbar.sh @@ -1,17 +1,15 @@ #!/bin/bash # art-description: Generation test Powheg+Pythia8 ttbar -# art-include: master/Athena +# art-include: master/AthGeneration # art-type: build # art-output: *.root # art-output: log.generate ## Any arguments are considered overrides, and will be added at the end export TRF_ECHO=True; -Generate_tf.py --ecmEnergy=13000 --runNumber=410006 --maxEvents=10 \ - --jobConfig=/cvmfs/atlas.cern.ch/repo/sw/Generators/MC15JobOptions/latest/share/DSID410xxx/MC15.410006.PowhegPythia8EvtGen_A14_ttbar_hdamp172p5_nonallhad.py \ +Gen_tf.py --ecmEnergy=13000 --jobConfig=421115 --maxEvents=10 \ --outputEVNTFile=test_powheg_ttbar.EVNT.pool.root \ echo "art-result: $? generate" -rm -fr _joproxy15 diff --git a/Generators/EvgenJobTransforms/test/test_powheg_wenu.sh b/Generators/EvgenJobTransforms/test/test_gen_powheg_wenu.sh similarity index 55% rename from Generators/EvgenJobTransforms/test/test_powheg_wenu.sh rename to Generators/EvgenJobTransforms/test/test_gen_powheg_wenu.sh index 340ae747b57..24c8a1838d0 100755 --- a/Generators/EvgenJobTransforms/test/test_powheg_wenu.sh +++ b/Generators/EvgenJobTransforms/test/test_gen_powheg_wenu.sh @@ -1,18 +1,16 @@ #!/bin/bash # art-description: Generation test Powheg+Pythia8 W->enu -# art-include: master/Athena +# art-include: master/AthGeneration # art-type: build # art-output: *.root # art-output: log.generate ## Any arguments are considered overrides, and will be added at the end export TRF_ECHO=True; rm *; -Generate_tf.py --ecmEnergy=13000 --runNumber=361100 --maxEvents=10 \ - --jobConfig=/cvmfs/atlas.cern.ch/repo/sw/Generators/MC15JobOptions/latest/share/DSID361xxx/MC15.361100.PowhegPythia8EvtGen_AZNLOCTEQ6L1_Wplusenu.py \ +Gen_tf.py --ecmEnergy=13000 --jobConfig=421116 --maxEvents=10 \ --outputEVNTFile=test_powheg_wenu_inelastic.EVNT.pool.root \ echo "art-result: $? generate" -rm -fr _joproxy15 diff --git a/Generators/EvgenJobTransforms/test/test_gen_powhegpy8TauolaPPEG.sh b/Generators/EvgenJobTransforms/test/test_gen_powhegpy8TauolaPPEG.sh new file mode 100755 index 00000000000..f20bcfb7420 --- /dev/null +++ b/Generators/EvgenJobTransforms/test/test_gen_powhegpy8TauolaPPEG.sh @@ -0,0 +1,16 @@ +#!/bin/bash +# art-description: Generation test PowhegPythia8Tauolapp Z +# art-include: master/AthGeneration +# art-type: build +# art-output: *.root +# art-output: log.generate +## Any arguments are considered overrides, and will be added at the end +export TRF_ECHO=True; +Gen_tf.py --ecmEnergy=13000 --jobConfig=421112 --maxEvents=10 \ + --outputEVNTFile=test_TauolaPP_evtgen.EVNT.pool.root \ + +echo "art-result: $? generate" + + + + diff --git a/Generators/EvgenJobTransforms/test/test_gen_py8_JZ2MultiBJetFilt.sh b/Generators/EvgenJobTransforms/test/test_gen_py8_JZ2MultiBJetFilt.sh new file mode 100755 index 00000000000..e76e8b3da32 --- /dev/null +++ b/Generators/EvgenJobTransforms/test/test_gen_py8_JZ2MultiBJetFilt.sh @@ -0,0 +1,15 @@ +#!/bin/bash +# art-description: Generation test Pythia8 with two jet filters QCDTruthJetJZ2 with R=0.6 and MultiBJetFilter with R=0.4 +# art-type: build +# art-include: master/AthGeneration +# art-output: *.root +# art-output: log.generate + +## Any arguments are considered overrides, and will be added at the end +export TRF_ECHO=True; +Gen_tf.py --ecmEnergy=13000 --jobConfig=421126 --maxEvents=10 \ + --outputEVNTFile=test_Py8JZ2MultiBJetFilt.EVNT.pool.root \ + +echo "art-result: $? generate" + + diff --git a/Generators/EvgenJobTransforms/test/test_pythia8_jets.sh b/Generators/EvgenJobTransforms/test/test_gen_pythia8_jets.sh similarity index 53% rename from Generators/EvgenJobTransforms/test/test_pythia8_jets.sh rename to Generators/EvgenJobTransforms/test/test_gen_pythia8_jets.sh index 6413f2d2c53..4672c85a288 100755 --- a/Generators/EvgenJobTransforms/test/test_pythia8_jets.sh +++ b/Generators/EvgenJobTransforms/test/test_gen_pythia8_jets.sh @@ -1,16 +1,14 @@ #!/bin/bash # art-description: Generation test Pythia8 dijets -# art-include: master/Athena +# art-include: master/AthGeneration # art-type: build # art-output: *.root # art-output: log.generate ## Any arguments are considered overrides, and will be added at the end export TRF_ECHO=True; -Generate_tf.py --ecmEnergy=13000 --runNumber=369000 --maxEvents=5 \ - --jobConfig=/cvmfs/atlas.cern.ch/repo/sw/Generators/MC15JobOptions/latest/share/DSID369xxx/MC15.369000.Pythia8EvtGen_A14NNPDF23LO_jetjet_JZ0.py \ +Gen_tf.py --ecmEnergy=13000 --jobConfig=421110 --maxEvents=10 \ --outputEVNTFile=test_jets.EVNT.pool.root \ echo "art-result: $? generate" -rm -fr _joproxy15 diff --git a/Generators/EvgenJobTransforms/test/test_gen_pythia8_minbias.sh b/Generators/EvgenJobTransforms/test/test_gen_pythia8_minbias.sh new file mode 100755 index 00000000000..cb25c5ba70a --- /dev/null +++ b/Generators/EvgenJobTransforms/test/test_gen_pythia8_minbias.sh @@ -0,0 +1,14 @@ +#!/bin/bash +# art-description: Generation test Pythia8 min_bias +# art-include: master/AthGeneration +# art-type: build +# art-output: *.root +# art-output: log.generate + +## Any arguments are considered overrides, and will be added at the end +export TRF_ECHO=True; +Gen_tf.py --ecmEnergy=13000 --jobConfig=421113 --maxEvents=10 \ + --outputEVNTFile=test_minbias_inelastic.EVNT.pool.root \ + +echo "art-result: $? generate" + diff --git a/Generators/EvgenJobTransforms/test/test_pythia8_minbias_high.sh b/Generators/EvgenJobTransforms/test/test_gen_pythia8_minbias_high.sh similarity index 54% rename from Generators/EvgenJobTransforms/test/test_pythia8_minbias_high.sh rename to Generators/EvgenJobTransforms/test/test_gen_pythia8_minbias_high.sh index 58c4ecbb0e6..9a39474c301 100755 --- a/Generators/EvgenJobTransforms/test/test_pythia8_minbias_high.sh +++ b/Generators/EvgenJobTransforms/test/test_gen_pythia8_minbias_high.sh @@ -1,18 +1,16 @@ #!/bin/bash # art-description: Generation test Pythia8 min_bias inelastic high # art-type: build -# art-include: master/Athena +# art-include: master/AthGeneration # art-output: *.root # art-output: log.generate ## Any arguments are considered overrides, and will be added at the end export TRF_ECHO=True; -Generate_tf.py --ecmEnergy=13000 --runNumber=369035 --maxEvents=10 \ - --jobConfig=/cvmfs/atlas.cern.ch/repo/sw/Generators/MC15JobOptions/latest/share/DSID369xxx/MC15.369035.Pythia8EvtGen_A2MSTW2008LO_minbias_inelastic_high.py \ +Gen_tf.py --ecmEnergy=13000 --jobConfig=421114 --maxEvents=10 \ --outputEVNTFile=test_minbias_high.EVNT.pool.root \ echo "art-result: $? generate" -rm -fr _joproxy15 diff --git a/Generators/EvgenJobTransforms/test/test_pythia8_ztautau.sh b/Generators/EvgenJobTransforms/test/test_gen_pythia8_ztautau.sh similarity index 54% rename from Generators/EvgenJobTransforms/test/test_pythia8_ztautau.sh rename to Generators/EvgenJobTransforms/test/test_gen_pythia8_ztautau.sh index 80939245aeb..f4cde9277ce 100755 --- a/Generators/EvgenJobTransforms/test/test_pythia8_ztautau.sh +++ b/Generators/EvgenJobTransforms/test/test_gen_pythia8_ztautau.sh @@ -1,17 +1,15 @@ #!/bin/bash # art-description: Generation test Pythia8 Z->tautau # art-type: build -# art-include: master/Athena +# art-include: master/AthGeneration # art-output: *.root # art-output: log.generate ## 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=/afs/cern.ch/atlas/groups/Generators/MC15JobOptions/latest/share/DSID429xxx/MC15.429708.Pythia8EvtGen_A14NNPDF23LO_Ztautau.py \ +Gen_tf.py --ecmEnergy=13000 --jobConfig=421100 --maxEvents=10 \ --outputEVNTFile=test_Ztautau.EVNT.pool.root \ echo "art-result: $? generate" -rm -fr _joproxy15 diff --git a/Generators/EvgenJobTransforms/test/test_qgsjet.sh b/Generators/EvgenJobTransforms/test/test_gen_qgsjet.sh similarity index 55% rename from Generators/EvgenJobTransforms/test/test_qgsjet.sh rename to Generators/EvgenJobTransforms/test/test_gen_qgsjet.sh index ce25119941b..29b42c2d8b7 100755 --- a/Generators/EvgenJobTransforms/test/test_qgsjet.sh +++ b/Generators/EvgenJobTransforms/test/test_gen_qgsjet.sh @@ -1,18 +1,16 @@ #!/bin/bash # art-description: Generation test QGSjet # art-type: build -# art-include: master/Athena +# art-include: master/AthGeneration # art-output: *.root # art-output: log.generate ## Any arguments are considered overrides, and will be added at the end export TRF_ECHO=True; -Generate_tf.py --ecmEnergy=13000 --runNumber=361235 --maxEvents=10 \ - --jobConfig=/cvmfs/atlas.cern.ch/repo/sw/Generators/MC15JobOptions/latest/share/DSID361xxx/MC15.361235.QGSJet_minbias_inelastic.py \ +Gen_tf.py --ecmEnergy=13000 --jobConfig=421117 --maxEvents=10 \ --outputEVNTFile=test_qgsjet_minbias_inelastic.EVNT.pool.root \ echo "art-result: $? generate" -rm -fr _joproxy15 diff --git a/Generators/EvgenJobTransforms/test/test_gen_sherpa_Z0.sh b/Generators/EvgenJobTransforms/test/test_gen_sherpa_Z0.sh new file mode 100755 index 00000000000..7a05829fac4 --- /dev/null +++ b/Generators/EvgenJobTransforms/test/test_gen_sherpa_Z0.sh @@ -0,0 +1,16 @@ +#!/bin/bash +# art-description: Generation test Sherpa Z0 +# art-type: build +# art-include: master/AthGeneration +# art-output: *.root +# art-output: log.generate + +## Any arguments are considered overrides, and will be added at the end +export TRF_ECHO=True; +Gen_tf.py --ecmEnergy=13000 --jobConfig=421003 --maxEvents=10 \ + --outputEVNTFile=test_sherpa_z0.EVNT.pool.root \ + +echo "art-result: $? generate" + + + diff --git a/Generators/EvgenJobTransforms/test/test_gen_sherpa_dy.sh b/Generators/EvgenJobTransforms/test/test_gen_sherpa_dy.sh new file mode 100755 index 00000000000..f30a0df9d93 --- /dev/null +++ b/Generators/EvgenJobTransforms/test/test_gen_sherpa_dy.sh @@ -0,0 +1,16 @@ +#!/bin/bash +# art-description: Generation test Sherpa DY without inputs +# art-type: build +# art-include: master/AthGeneration +# art-output: *.root +# art-output: log.generate + +## Any arguments are considered overrides, and will be added at the end +export TRF_ECHO=True; +Gen_tf.py --ecmEnergy=13000 --jobConfig=421001 --maxEvents=10 \ + --outputEVNTFile=test_sherpa_dy_inelastic.EVNT.pool.root \ + +echo "art-result: $? generate" + + + diff --git a/Generators/EvgenJobTransforms/test/test_gen_single.sh b/Generators/EvgenJobTransforms/test/test_gen_single.sh new file mode 100755 index 00000000000..bbfd3103bdf --- /dev/null +++ b/Generators/EvgenJobTransforms/test/test_gen_single.sh @@ -0,0 +1,18 @@ +#!/bin/bash +# art-description: MC Generators test Particel Gun single particle production +# art-type: build +# art-include: mster/AthGeneration +# art-output: *.root +# art-output: log.generate + +## Any arguments are considered overrides, and will be added at the end +export TRF_ECHO=True; +Gen_tf.py --ecmEnergy=8000 --jobConfig=421119 --maxEvents=10 \ + --outputEVNTFile=test_single_nu.EVNT.pool.root \ + +echo "art-result: $? generate" + + + + + diff --git a/Generators/EvgenJobTransforms/test/test_starlight.sh b/Generators/EvgenJobTransforms/test/test_gen_starlight.sh similarity index 55% rename from Generators/EvgenJobTransforms/test/test_starlight.sh rename to Generators/EvgenJobTransforms/test/test_gen_starlight.sh index 7ff711b279b..666eb4a22b3 100755 --- a/Generators/EvgenJobTransforms/test/test_starlight.sh +++ b/Generators/EvgenJobTransforms/test/test_gen_starlight.sh @@ -1,18 +1,16 @@ #!/bin/bash # art-description: Generation test Starlight # art-type: build -# art-include: master/Athena +# art-include: master/AthGeneration # art-output: *.root # art-output: log.generate ## Any arguments are considered overrides, and will be added at the end export TRF_ECHO=True; -Generate_tf.py --ecmEnergy=5020 --runNumber=420252 --maxEvents=10 \ - --jobConfig=/cvmfs/atlas.cern.ch/repo/sw/Generators/MC15JobOptions/latest/share/DSID420xxx/MC15.420252.Starlight_gammagamma2ee_3p6M8.py \ +Gen_tf.py --ecmEnergy=5020 --jobConfig=421120 --maxEvents=10 \ --outputEVNTFile=test_starlight_gammagamma2ee.EVNT.pool.root \ echo "art-result: $? generate" -rm -fr _joproxy15 diff --git a/Generators/EvgenJobTransforms/test/test_herwig7 b/Generators/EvgenJobTransforms/test/test_herwig7 deleted file mode 100755 index 8a7aa291797..00000000000 --- 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 549bb0a8e8e..00000000000 --- 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_herwigpp b/Generators/EvgenJobTransforms/test/test_herwigpp deleted file mode 100755 index e06da92b833..00000000000 --- a/Generators/EvgenJobTransforms/test/test_herwigpp +++ /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=361225 --maxEvents=10 \ - --jobConfig=$JODIR15/share/DSID361xxx/MC15.361225.Herwigpp_UEEE4_CTEQ6L1_MinBias.py \ - --outputEVNTFile=test_herwigpp_minbias_inelastic.EVNT.pool.root \ - $@ diff --git a/Generators/EvgenJobTransforms/test/test_mcatnlo_herwigpp b/Generators/EvgenJobTransforms/test/test_mcatnlo_herwigpp deleted file mode 100755 index 8aecb0e7b74..00000000000 --- a/Generators/EvgenJobTransforms/test/test_mcatnlo_herwigpp +++ /dev/null @@ -1,9 +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=8000 --runNumber=429686 --maxEvents=10 \ - --jobConfig=$JODIR15/share/DSID429xxx/MC15.429686.McAtNloHerwig7_CT10_H7UE_MMHT2014lo_ttbar_LeptonFilter.py \ - --inputGeneratorFile=$TESTDATA/group.phys-gener.mcatnlo409.110200.ttbar_8TeV.TXT.mc12_v1._00001.tar.gz \ - --outputEVNTFile=test_mcatnloherwigpp_ttbar_leptonfilter.EVNT.pool.root \ - $@ diff --git a/Generators/EvgenJobTransforms/test/test_mcatnlo_jimmy b/Generators/EvgenJobTransforms/test/test_mcatnlo_jimmy deleted file mode 100755 index bd3c0459776..00000000000 --- a/Generators/EvgenJobTransforms/test/test_mcatnlo_jimmy +++ /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; -LD_PRELOAD=libphotos.so \ -Generate_tf.py --ecmEnergy=8000 --runNumber=105200 --maxEvents=10 \ - --jobConfig=$JODIR/share/tests/MC14.105200.McAtNloHerwig_CT10_ttbar_LeptonFilter.py \ - --inputGeneratorFile=$TESTDATA/group.phys-gener.mcatnlo406.105200.ttbar_8TeV.TXT.mc12_v1._02667.tar.gz \ - --outputEVNTFile=test_mcatnlojimmy_ttbar_leptonfilter.EVNT.pool.root \ - $@ diff --git a/Generators/EvgenJobTransforms/test/test_mgpythia8_Zmumu b/Generators/EvgenJobTransforms/test/test_mgpythia8_Zmumu deleted file mode 100755 index 96e7829b58f..00000000000 --- a/Generators/EvgenJobTransforms/test/test_mgpythia8_Zmumu +++ /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; -rm *; -DISPLAY='' \ -Generate_tf.py --ecmEnergy=13000 --runNumber=361505 --maxEvents=10 \ - --jobConfig=$JODIR15/share/DSID361xxx/MC15.361505.MadGraphPythia8EvtGen_A14NNPDF23LO_Zmumu_Np0.py \ - --outputEVNTFile=test_mgpythia8_Zmumu.EVNT.pool.root \ - $@ diff --git a/Generators/EvgenJobTransforms/test/test_mgpythia8_ttW b/Generators/EvgenJobTransforms/test/test_mgpythia8_ttW deleted file mode 100755 index e62a7611d53..00000000000 --- a/Generators/EvgenJobTransforms/test/test_mgpythia8_ttW +++ /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; -rm *; -DISPLAY='' \ -Generate_tf.py --ecmEnergy=13000 --runNumber=410066 --maxEvents=10 \ - --jobConfig=$JODIR15/share/DSID410xxx/MC15.410066.MadGraphPythia8EvtGen_A14NNPDF23LO_ttW_Np0.py \ - --outputEVNTFile=test_mgpythia8_ttW.EVNT.pool.root \ - $@ diff --git a/Generators/EvgenJobTransforms/test/test_ph8TauolappEG_ztautau b/Generators/EvgenJobTransforms/test/test_ph8TauolappEG_ztautau deleted file mode 100755 index 6ff2c134228..00000000000 --- 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_ph8TauolappEG_ztautau.sh b/Generators/EvgenJobTransforms/test/test_ph8TauolappEG_ztautau.sh deleted file mode 100755 index af52818ad57..00000000000 --- a/Generators/EvgenJobTransforms/test/test_ph8TauolappEG_ztautau.sh +++ /dev/null @@ -1,21 +0,0 @@ -#!/bin/bash -# art-description: Generation test Pythia8Tauolapp Z->tautau -# art-include: master/Athena -# art-type: build -# art-output: *.root -# art-output: log.generate - -## 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=/cvmfs/atlas.cern.ch/repo/sw/Generators/MC15JobOptions/latest/share/DSID429xxx/MC15.429697.Pythia8EvtGen_A14NNPDF23LO_DYtautau_120M180.py \ - --outputEVNTFile=test_DYZtautau.EVNT.pool.root \ - -echo "art-result: $? generate" -rm -fr _joproxy15 - - - - - - diff --git a/Generators/EvgenJobTransforms/test/test_powheg_pythia_evtgen_wt b/Generators/EvgenJobTransforms/test/test_powheg_pythia_evtgen_wt deleted file mode 100755 index 901033d8770..00000000000 --- a/Generators/EvgenJobTransforms/test/test_powheg_pythia_evtgen_wt +++ /dev/null @@ -1,9 +0,0 @@ -#! /usr/bin/env bash - -## Any arguments are considered overrides, and will be added at the end -export TRF_ECHO=True; -rm -f *.dat; -Generate_tf.py --ecmEnergy=13000 --runNumber=410013 --maxEvents=10 \ - --jobConfig=$JODIR15/share/DSID410xxx/MC15.410013.PowhegPythiaEvtGen_P2012_Wt_inclusive_top.py --steering=afterburn \ - --outputEVNTFile=test_powheg_wt_inelastic.EVNT.pool.root \ - $@ diff --git a/Generators/EvgenJobTransforms/test/test_powheg_pythia_evtgen_wt.sh b/Generators/EvgenJobTransforms/test/test_powheg_pythia_evtgen_wt.sh deleted file mode 100755 index bd885e2419b..00000000000 --- a/Generators/EvgenJobTransforms/test/test_powheg_pythia_evtgen_wt.sh +++ /dev/null @@ -1,19 +0,0 @@ -#!/bin/bash -# art-description: Generation test PowhegPythia Wt (inclusive top) -# art-include: master/Athena -# art-type: build -# art-output: *.root -# art-output: log.generate -## Any arguments are considered overrides, and will be added at the end -export TRF_ECHO=True; -rm -f *.dat; -Generate_tf.py --ecmEnergy=13000 --runNumber=410013 --maxEvents=10 \ - --jobConfig=/cvmfs/atlas.cern.ch/repo/sw/Generators/MC15JobOptions/latest/share/DSID410xxx/MC15.410013.PowhegPythiaEvtGen_P2012_Wt_inclusive_top.py --steering=afterburn \ - --outputEVNTFile=test_powheg_wt_inelastic.EVNT.pool.root \ - -echo "art-result: $? generate" -rm -fr _joproxy15 - - - - diff --git a/Generators/EvgenJobTransforms/test/test_powheg_ttbar b/Generators/EvgenJobTransforms/test/test_powheg_ttbar deleted file mode 100755 index 983ac9171f4..00000000000 --- a/Generators/EvgenJobTransforms/test/test_powheg_ttbar +++ /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=101010 --maxEvents=10 \ - --jobConfig=$JODIR/share/tests/MC14.101010.PowhegPythia_Perugia2011_tt_example.py \ - --outputEVNTFile=test_powheg_minbias_inelastic.EVNT.pool.root \ - $@ diff --git a/Generators/EvgenJobTransforms/test/test_powheg_wenu b/Generators/EvgenJobTransforms/test/test_powheg_wenu deleted file mode 100755 index 98936e1f16d..00000000000 --- a/Generators/EvgenJobTransforms/test/test_powheg_wenu +++ /dev/null @@ -1,9 +0,0 @@ -#! /usr/bin/env bash - -## Any arguments are considered overrides, and will be added at the end -export TRF_ECHO=True; -rm *; -Generate_tf.py --ecmEnergy=13000 --runNumber=361100 --maxEvents=10 \ - --jobConfig=$JODIR15/share/DSID361xxx/MC15.361100.PowhegPythia8EvtGen_AZNLOCTEQ6L1_Wplusenu.py \ - --outputEVNTFile=test_powheg_wenu_inelastic.EVNT.pool.root \ - $@ diff --git a/Generators/EvgenJobTransforms/test/test_powhegpy8TauolaPPEG b/Generators/EvgenJobTransforms/test/test_powhegpy8TauolaPPEG deleted file mode 100755 index 6fcd23ae2c9..00000000000 --- 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_powhegpy8TauolaPPEG.sh b/Generators/EvgenJobTransforms/test/test_powhegpy8TauolaPPEG.sh deleted file mode 100755 index 4c2522e100a..00000000000 --- a/Generators/EvgenJobTransforms/test/test_powhegpy8TauolaPPEG.sh +++ /dev/null @@ -1,18 +0,0 @@ -#!/bin/bash -# art-description: Generation test PowhegPythia8Tauolapp Z -# art-include: master/Athena -# art-type: build -# art-output: *.root -# art-output: log.generate -## 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=/cvmfs/atlas.cern.ch/repo/sw/Generators/MC15JobOptions/latest/share/DSID429xxx/MC15.429696.PowhegPythia8EvtGen_AZNLOCTEQ6L1_Ztautau.py \ - --outputEVNTFile=test_JZ0_evtgen.EVNT.pool.root \ - -echo "art-result: $? generate" -rm -fr _joproxy15 - - - - diff --git a/Generators/EvgenJobTransforms/test/test_pythia8_evtgen b/Generators/EvgenJobTransforms/test/test_pythia8_evtgen deleted file mode 100755 index 19296e609ab..00000000000 --- a/Generators/EvgenJobTransforms/test/test_pythia8_evtgen +++ /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=361000 --maxEvents=10 \ - --jobConfig=$JODIR15/share/DSID361xxx/MC15.361000.Pythia8EvtGen_A14NNPDF23LO_jetjet_JZ0.py \ - --outputEVNTFile=test_JZ0_evtgen.EVNT.pool.root \ - $@ diff --git a/Generators/EvgenJobTransforms/test/test_pythia8_jets b/Generators/EvgenJobTransforms/test/test_pythia8_jets deleted file mode 100755 index 3ff259e2296..00000000000 --- a/Generators/EvgenJobTransforms/test/test_pythia8_jets +++ /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=361000 --maxEvents=5 \ - --jobConfig=$JODIR15/share/DSID361xxx/MC15.361000.Pythia8EvtGen_A14NNPDF23LO_jetjet_JZ0.py \ - --outputEVNTFile=test_jets.EVNT.pool.root \ - $@ diff --git a/Generators/EvgenJobTransforms/test/test_pythia8_minbias b/Generators/EvgenJobTransforms/test/test_pythia8_minbias deleted file mode 100755 index ca67f745a90..00000000000 --- a/Generators/EvgenJobTransforms/test/test_pythia8_minbias +++ /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=361033 --maxEvents=10 \ - --jobConfig=$JODIR15/share/DSID361xxx/MC15.361033.Pythia8EvtGen_A2MSTW2008LO_minbias_inelastic.py \ - --outputEVNTFile=test_minbias_inelastic.EVNT.pool.root \ - $@ diff --git a/Generators/EvgenJobTransforms/test/test_pythia8_minbias.sh b/Generators/EvgenJobTransforms/test/test_pythia8_minbias.sh deleted file mode 100755 index 584b29f4bb4..00000000000 --- a/Generators/EvgenJobTransforms/test/test_pythia8_minbias.sh +++ /dev/null @@ -1,19 +0,0 @@ -#!/bin/bash -# art-description: Generation test Pythia8 min_bias -# art-include: master/Athena -# art-type: build -# art-output: *.root -# art-output: log.generate - -#get_files -jo MC15.361033.Pythia8EvtGen_A2MSTW2008LO_minbias_inelastic.py - -## Any arguments are considered overrides, and will be added at the end -export TRF_ECHO=True; -Generate_tf.py --ecmEnergy=13000 --runNumber=361033 --maxEvents=10 \ - --jobConfig=/cvmfs/atlas.cern.ch/repo/sw/Generators/MC15JobOptions/latest/share/DSID361xxx/MC15.361033.Pythia8EvtGen_A2MSTW2008LO_minbias_inelastic.py \ - --outputEVNTFile=test_minbias_inelastic.EVNT.pool.root \ - -echo "art-result: $? generate" -rm -fr _joproxy15 - -#rm -fr MC15.361033.Pythia8EvtGen_A2MSTW2008LO_minbias_inelastic.py diff --git a/Generators/EvgenJobTransforms/test/test_pythia8_minbias_high b/Generators/EvgenJobTransforms/test/test_pythia8_minbias_high deleted file mode 100755 index 91c688c2e02..00000000000 --- a/Generators/EvgenJobTransforms/test/test_pythia8_minbias_high +++ /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=361035 --maxEvents=10 \ - --jobConfig=$JODIR15/share/DSID361xxx/MC15.361035.Pythia8EvtGen_A2MSTW2008LO_minbias_inelastic_high.py \ - --outputEVNTFile=test_minbias_high.EVNT.pool.root \ - $@ diff --git a/Generators/EvgenJobTransforms/test/test_pythia8_powheg b/Generators/EvgenJobTransforms/test/test_pythia8_powheg deleted file mode 100755 index b1df8722a54..00000000000 --- a/Generators/EvgenJobTransforms/test/test_pythia8_powheg +++ /dev/null @@ -1,9 +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=8000 --runNumber=429695 --maxEvents=10 \ - --jobConfig=$JODIR15/share/DSID429xxx/MC15.429695.PowhegPythia8EvtGen_A14NNPDF23LO_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_powheg.sh b/Generators/EvgenJobTransforms/test/test_pythia8_powheg.sh deleted file mode 100755 index 69b7e4b8eaa..00000000000 --- a/Generators/EvgenJobTransforms/test/test_pythia8_powheg.sh +++ /dev/null @@ -1,18 +0,0 @@ -#!/bin/bash -# art-description: Generation test Pythia8 Powheg -# art-include: master/Athena -# art-type: build -# art-output: *.root -# art-output: log.generate - -## 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=/cvmfs/atlas.cern.ch/repo/sw/Generators/MC15JobOptions/latest/share/DSID429xxx/MC15.429695.PowhegPythia8EvtGen_A14NNPDF23LO_Wplusenu.py \ - --inputGeneratorFile=/afs/cern.ch/atlas/offline/ProdData/17.2.X/group.phys-gener.Powheg_CT10.147800.Wplusenu_8TeV.TXT.mc12_v2._00001.tar.gz \ - --outputEVNTFile=test_powhegpythia8_Wpluswnu.EVNT.pool.root \ - -echo "art-result: $? generate" -rm -fr _joproxy15 - - diff --git a/Generators/EvgenJobTransforms/test/test_pythia8_ztautau b/Generators/EvgenJobTransforms/test/test_pythia8_ztautau deleted file mode 100755 index 50c730635af..00000000000 --- a/Generators/EvgenJobTransforms/test/test_pythia8_ztautau +++ /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=429708 --maxEvents=10 \ - --jobConfig=$JODIR15/share/DSID429xxx/MC15.429708.Pythia8EvtGen_A14NNPDF23LO_Ztautau.py \ - --outputEVNTFile=test_Ztautau.EVNT.pool.root \ - $@ diff --git a/Generators/EvgenJobTransforms/test/test_qgsjet b/Generators/EvgenJobTransforms/test/test_qgsjet deleted file mode 100755 index bc28d217807..00000000000 --- a/Generators/EvgenJobTransforms/test/test_qgsjet +++ /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=361235 --maxEvents=10 \ - --jobConfig=$JODIR15/share/DSID361xxx/MC15.361235.QGSJet_minbias_inelastic.py \ - --outputEVNTFile=test_qgsjet_minbias_inelastic.EVNT.pool.root \ - $@ diff --git a/Generators/EvgenJobTransforms/test/test_sherpa_dy b/Generators/EvgenJobTransforms/test/test_sherpa_dy deleted file mode 100755 index 803e896c33a..00000000000 --- a/Generators/EvgenJobTransforms/test/test_sherpa_dy +++ /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=191919 --maxEvents=10 \ - --jobConfig=$JODIR/share/tests/MC14.191919.Sherpa_NNPDF30NNLO_DrellYan.py \ - --outputEVNTFile=test_sherpa_dy_inelastic.EVNT.pool.root \ - $@ diff --git a/Generators/EvgenJobTransforms/test/test_sherpa_dy.sh b/Generators/EvgenJobTransforms/test/test_sherpa_dy.sh deleted file mode 100755 index b50b710fd01..00000000000 --- a/Generators/EvgenJobTransforms/test/test_sherpa_dy.sh +++ /dev/null @@ -1,18 +0,0 @@ -#!/bin/bash -# art-description: Generation test Sherpa DY -# art-type: build -# art-include: master/Athena -# art-output: *.root -# art-output: log.generate - -## Any arguments are considered overrides, and will be added at the end -export TRF_ECHO=True; -Generate_tf.py --ecmEnergy=13000 --runNumber=191919 --maxEvents=10 \ - --jobConfig=/afs/cern.ch/atlas/groups/Generators/MC14JobOptions/latest/share/tests/MC14.191919.Sherpa_NNPDF30NNLO_DrellYan.py \ - --outputEVNTFile=test_sherpa_dy_inelastic.EVNT.pool.root \ - -echo "art-result: $? generate" -rm -fr _joproxy14 - - - diff --git a/Generators/EvgenJobTransforms/test/test_single b/Generators/EvgenJobTransforms/test/test_single deleted file mode 100755 index 8874bca09dc..00000000000 --- a/Generators/EvgenJobTransforms/test/test_single +++ /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=8000 --runNumber=999999 --maxEvents=10 \ - --jobConfig=$JODIR/share/tests/MC14.999999.ParticleGun_single_nu.py \ - --outputEVNTFile=test_single_nu.EVNT.pool.root \ - $@ diff --git a/Generators/EvgenJobTransforms/test/test_single.sh b/Generators/EvgenJobTransforms/test/test_single.sh deleted file mode 100755 index f626277b411..00000000000 --- a/Generators/EvgenJobTransforms/test/test_single.sh +++ /dev/null @@ -1,20 +0,0 @@ -#!/bin/bash -# art-description: MC Generators test single particle production -# art-type: build -# art-include: master/Athena -# art-output: *.root -# art-output: log.generate - -## Any arguments are considered overrides, and will be added at the end -export TRF_ECHO=True; -Generate_tf.py --ecmEnergy=8000 --runNumber=999999 --maxEvents=10 \ - --jobConfig=/afs/cern.ch/atlas/groups/Generators/MC14JobOptions/latest/share/tests/MC14.999999.ParticleGun_single_nu.py \ - --outputEVNTFile=test_single_nu.EVNT.pool.root \ - -echo "art-result: $? generate" -rm -fr _joproxy14 - - - - - diff --git a/Generators/EvgenProdTools/CMakeLists.txt b/Generators/EvgenProdTools/CMakeLists.txt index fe58e620547..3273be6c85f 100644 --- a/Generators/EvgenProdTools/CMakeLists.txt +++ b/Generators/EvgenProdTools/CMakeLists.txt @@ -36,6 +36,6 @@ atlas_add_component( EvgenProdTools # Install files from the package: atlas_install_python_modules( python/*.py ) -atlas_install_joboptions( share/*.py ) -atlas_install_runtime( share/*.txt ) - +atlas_install_joboptions( share/common/*.py ) +atlas_install_runtime( share/file/*.txt ) +atlas_install_scripts( scripts/simple_lhe_plotter.py ) diff --git a/Generators/EvgenProdTools/EvgenProdTools/CopyEventWeight.h b/Generators/EvgenProdTools/EvgenProdTools/CopyEventWeight.h index 3ff9ef7ec35..d5586d10434 100644 --- a/Generators/EvgenProdTools/EvgenProdTools/CopyEventWeight.h +++ b/Generators/EvgenProdTools/EvgenProdTools/CopyEventWeight.h @@ -41,4 +41,4 @@ private: #endif -#endif \ No newline at end of file +#endif diff --git a/Generators/EvgenProdTools/EvgenProdTools/CountHepMC.h b/Generators/EvgenProdTools/EvgenProdTools/CountHepMC.h index 8bbbec1e220..1e4e196cfd5 100644 --- a/Generators/EvgenProdTools/EvgenProdTools/CountHepMC.h +++ b/Generators/EvgenProdTools/EvgenProdTools/CountHepMC.h @@ -32,12 +32,15 @@ private: int m_nCount; int m_firstEv; + int m_newRunNumber; bool m_corHepMC; bool m_corEvtID; + bool m_corRunNumber; + std::string m_inputKeyName; }; #endif -#endif \ No newline at end of file +#endif diff --git a/Generators/EvgenProdTools/EvgenProdTools/EvgenOTFTopUpSvc.h b/Generators/EvgenProdTools/EvgenProdTools/EvgenOTFTopUpSvc.h index 7c8ead95431..ce82d00d677 100644 --- a/Generators/EvgenProdTools/EvgenProdTools/EvgenOTFTopUpSvc.h +++ b/Generators/EvgenProdTools/EvgenProdTools/EvgenOTFTopUpSvc.h @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration */ #ifndef XAOD_ANALYSIS @@ -62,4 +62,4 @@ private: #endif -#endif \ No newline at end of file +#endif diff --git a/Generators/EvgenProdTools/EvgenProdTools/FixHepMC.h b/Generators/EvgenProdTools/EvgenProdTools/FixHepMC.h index 4f770862961..e3c15f77011 100644 --- a/Generators/EvgenProdTools/EvgenProdTools/FixHepMC.h +++ b/Generators/EvgenProdTools/EvgenProdTools/FixHepMC.h @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration */ #ifndef XAOD_ANALYSIS diff --git a/Generators/EvgenProdTools/EvgenProdTools/TestHepMC.h b/Generators/EvgenProdTools/EvgenProdTools/TestHepMC.h index ac6c3a61e69..0594707d20b 100644 --- a/Generators/EvgenProdTools/EvgenProdTools/TestHepMC.h +++ b/Generators/EvgenProdTools/EvgenProdTools/TestHepMC.h @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration */ #ifndef XAOD_ANALYSIS @@ -17,6 +17,7 @@ #include<fstream> +using namespace std; /// Filtering algorithm to sanity check HepMC event features. /// @@ -47,6 +48,9 @@ public: double m_eff_warn_threshold, m_eff_fail_threshold, m_tau_eff_threshold; double m_accur_margin; bool m_doHist; + bool m_beamEnergyTest, m_vtxNaNTest, m_vtxDisplacedTest, m_momNaNTest, m_lifeTimeTest, m_energyG4Test; + bool m_energyImbalanceTest, m_momImbalanceTest, m_negativeEnergyTest, m_tachyonsTest, m_unstableNoVtxTest; + bool m_pi0NoVtxTest, m_undisplacedDaughtersTest, m_unknownPDGIDTest; std::vector<int> m_vertexStatuses; @@ -80,13 +84,14 @@ public: int m_Status1ShortLifetime; int m_undisplacedDecayDaughtersOfDisplacedVtxCheckRate; int m_nonG4_energyCheckRate; + int m_unknownPDGIDCheckRate; std::string m_paramFile; - - std::ifstream m_G4file; - std::ifstream m_susyFile; - std::vector<int> m_G4pdgID_tab; - std::vector<int> m_SusyPdgID_tab; + std::string m_unknownPDGIDFile; + + vector<int> m_G4pdgID_tab; + vector<int> m_SusyPdgID_tab; + vector<int> m_uknownPDGID_tab; TruthHelper::IsGenNonInteracting m_nonint; /// @todo Can we use the GenAnalysis / AthHistoAlg methods for histo management? diff --git a/Generators/EvgenProdTools/examples/jobOption.Pythia8_FixHepMC.py b/Generators/EvgenProdTools/examples/jobOption.Pythia8_FixHepMC.py index f28b5d15ba0..b5558ed556e 100644 --- a/Generators/EvgenProdTools/examples/jobOption.Pythia8_FixHepMC.py +++ b/Generators/EvgenProdTools/examples/jobOption.Pythia8_FixHepMC.py @@ -1,5 +1,3 @@ -# 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 4602b6bfaae..8cd3cf537fa 100644 --- a/Generators/EvgenProdTools/python/LogicalExpressionFilter.py +++ b/Generators/EvgenProdTools/python/LogicalExpressionFilter.py @@ -1,5 +1,4 @@ -# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration - +# Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration ##============================================================================== ## Name: LogicalExpressionFilter.py ## @@ -23,8 +22,8 @@ from GaudiKernel.GaudiHandles import * from AthenaCommon.AlgSequence import AlgSequence from AthenaCommon.Logging import logging -import tokenize -from io import StringIO +import tokenize, random +from cStringIO import StringIO class LogicalExpressionFilter( PyAthena.Alg ): _isLocked=False @@ -34,8 +33,12 @@ class LogicalExpressionFilter( PyAthena.Alg ): super(LogicalExpressionFilter, self).__init__(**kw) self.nEventsProcessed=0 self.nEventsPassed=0 + self.nEventsProcessedPosWeighted=0 + self.nEventsProcessedNegWeighted=0 self.nEventsProcessedWeighted=0 self.nEventsPassedWeighted=0 + self.nEventsPassedPosWeighted=0 + self.nEventsPassedNegWeighted=0 self.Expression = kw.get('Expression', '') self.UseEventWeight = kw.get('UseEventWeight',True) self.McEventKey = kw.get('McEventKey','GEN_EVENT') @@ -47,6 +50,9 @@ class LogicalExpressionFilter( PyAthena.Alg ): # Create the filters list self.filters = [] + # Optional sampling - needs random numbers + self.Sampling = -1. + #where the transformed cmd goes self.cmd = "" @@ -77,8 +83,8 @@ class LogicalExpressionFilter( PyAthena.Alg ): error = 'could not retrieve IAlgManager/ApplicationMgr' self.msg.error (error) raise RuntimeError (error) - import cppyy - _alg = cppyy.libPyROOT.MakeNullPointer("IAlgorithm") + import PyCintex + _alg = PyCintex.libPyROOT.MakeNullPointer("IAlgorithm") if algmgr.createAlgorithm(filterType,filterName,_alg).isFailure() or not _alg: self.msg.error ('could not create alg: ' + filterTypeAndName) raise RuntimeError ('could not create alg: ' + filterTypeAndName) @@ -150,15 +156,20 @@ class LogicalExpressionFilter( PyAthena.Alg ): #execute command once to validate #response = bool(eval(self.cmd)) - except Exception as e: + except Exception, e: self.msg.fatal("%s is not a valid Python expression string. Exception: %s" % (self.Expression,e)) return StatusCode.Failure + # If needed, set up a random number generator + if self.Sampling>=0: + random.seed(1234) + return StatusCode.Success def evalFilter(self, filterName): if not self.algdict[filterName].isExecuted(): - self.algdict[filterName].sysExecute(self.getContext()) +# self.algdict[filterName].sysExecute( self.getContext() ) # only rel. 21+ + self.algdict[filterName].sysExecute() self.algdict[filterName].setExecuted(True) decision = self.algdict[filterName].filterPassed() self.msg.verbose(filterName + " decision=" + str(decision)) @@ -183,12 +194,31 @@ class LogicalExpressionFilter( PyAthena.Alg ): else: event_weight = weights[0] + response = bool(eval(self.cmd)) if self.cmd else True + + if self.Sampling>0 and self.Sampling<=1 and not response: + for a in xrange(len(mc[0].weights())): mc[0].weights()[a] /= self.Sampling + mc[0].weights().push_back( int(response) ) + event_weight /= self.Sampling + response = random.random()<self.Sampling + + if self.Sampling==0: + mc[0].weights().push_back( int(response) ) + self.nEventsProcessed+=1 self.nEventsProcessedWeighted+=event_weight - response = bool(eval(self.cmd)) if self.cmd else True + if event_weight > 0 : + self.nEventsProcessedPosWeighted+=event_weight + else : + self.nEventsProcessedNegWeighted+=abs(event_weight) + if response: self.nEventsPassed+=1 self.nEventsPassedWeighted+=event_weight + if event_weight > 0 : + self.nEventsPassedPosWeighted+=event_weight + else : + self.nEventsPassedNegWeighted+=abs(event_weight) self.msg.debug("My decision is: %s" % response) self.setFilterPassed(response) return StatusCode.Success @@ -205,6 +235,11 @@ class LogicalExpressionFilter( PyAthena.Alg ): self.msg.info("Filter Efficiency = %f [%s / %s]" % (efficiency,self.nEventsPassed,self.nEventsProcessed)) self.msg.info("Weighted Filter Efficiency = %f [%f / %f]" % (efficiencyWeighted,self.nEventsPassedWeighted,self.nEventsProcessedWeighted)) print("MetaData: GenFiltEff = %e" % (efficiencyWeighted if self.UseEventWeight else efficiency)) + + print("MetaData: sumOfPosWeights = %e" % (self.nEventsPassedPosWeighted if self.UseEventWeight else self.nEventsPassed)) + print("MetaData: sumOfNegWeights = %e" % (self.nEventsPassedNegWeighted if self.UseEventWeight else self.nEventsPassed)) + print("MetaData: sumOfPosWeightsNoFilter = %e" % (self.nEventsProcessedPosWeighted if self.UseEventWeight else self.nEventsProcessed)) + print("MetaData: sumOfNegWeightsNoFilter = %e" % (self.nEventsProcessedNegWeighted if self.UseEventWeight else self.nEventsProcessed)) return StatusCode.Success diff --git a/Generators/EvgenProdTools/scripts/simple_lhe_plotter.py b/Generators/EvgenProdTools/scripts/simple_lhe_plotter.py new file mode 100755 index 00000000000..b969e10d686 --- /dev/null +++ b/Generators/EvgenProdTools/scripts/simple_lhe_plotter.py @@ -0,0 +1,108 @@ +#!/usr/bin/env python + +# Basic ROOT setup +import ROOT,sys,os,math,glob,array +ROOT.SetSignalPolicy( ROOT.kSignalFast ) +ROOT.gROOT.SetBatch(True) +ROOT.gErrorIgnoreLevel = ROOT.kError + +# Check for the right input files +if len(sys.argv)>1: + inputfilenames = [] + for a in sys.argv[1].split(','): inputfilenames+=glob.glob(a) +else: + print 'Please specify an input LHE file (or comma-separated lists of them)' + sys.exit(1) + +# Set up histograms +# Energy and PDG ID of incoming partons +e_init_0 = ROOT.TH1D('e_init_0','',100,0,2000) +e_init_1 = ROOT.TH1D('e_init_1','',100,0,2000) +pdg_init = ROOT.TH1D('pdg_init','',25,0,25) +# Hard outgoing partons, just plot pTs +pt_hard_0 = ROOT.TH1D('pt_hard_0','',100,0,1000) +pt_hard_1 = ROOT.TH1D('pt_hard_1','',100,0,1000) +# Generally after the first two, we're into extra partons +pt_extra_0 = ROOT.TH1D('pt_extra_0','',100,0,1000) +pt_extra_1 = ROOT.TH1D('pt_extra_1','',100,0,1000) +pt_extra_2 = ROOT.TH1D('pt_extra_2','',100,0,1000) +pt_extra_3 = ROOT.TH1D('pt_extra_3','',100,0,1000) +pt_extra_4 = ROOT.TH1D('pt_extra_4','',100,0,1000) +pt_extra_5 = ROOT.TH1D('pt_extra_5','',100,0,1000) +pdg_extras = ROOT.TH1D('pdg_extras','',100,0,1000) +# And LHE multiplicity +multip = ROOT.TH1D('mult','',20,0,20) +weights = ROOT.TH1D('weights','',100,0,1000) +# Array of all the histograms for later writing +histograms = [e_init_0,e_init_1,pdg_init,pt_hard_0,pt_hard_1,pt_extra_0,pt_extra_1,pt_extra_2,pt_extra_3,pt_extra_4,pt_extra_5,pdg_extras,multip,weights] + +# Now loop through input file +for inputfilename in inputfilenames: + # LHE format documented in https://arxiv.org/pdf/1405.1067.pdf + with open(inputfilename,'r') as inputfile: + event = False + npartons = -1 + extras = 0 + ep_pt = 0. + for line in inputfile: + # Check for the ktdurham cut + if 'ktdurham' in line and '=' in line: + # Print the matching cut for info + print 'Matching cut:',float(line.split()[0]) + continue + # Check for a comment + if len(line.split('#')[0].strip())==0: continue + # Check if we have entered an event + if not event and not '<event>' in line: + continue + # Check if we are just starting an event + if not event and '<event>' in line: + event = True + continue + # Check if we have finished and are doing something else + if '<' in line or '>' in line: + event = False + npartons = -1 + continue + # Check to parse the first line of the event + if npartons<0: + npartons = int(line.split()[0]) + multip.Fill(npartons-2) # Final state multiplicity + weight = float(line.split()[2]) + weights.Fill(weight) + extras = npartons-4 + continue + # Deal with the inital state partons first + if npartons>extras+2: + if npartons>extras+3: e_init_0.Fill( float(line.split()[9]) ) + else: e_init_1.Fill( float(line.split()[9]) ) + pdg_init.Fill( abs(int(line.split()[0])) ) + npartons -= 1 + continue + momentum_x = float(line.split()[6]) + momentum_y = float(line.split()[7]) + pt = math.sqrt(momentum_x*momentum_x+momentum_y*momentum_y) + # Now deal with hard scatter partons + if npartons>extras: + if npartons>extras+1: pt_hard_0.Fill(pt) + else: pt_hard_1.Fill(pt) + npartons -= 1 + continue + # Now we are into the extras + if extras==npartons: pt_extra_0.Fill(pt) + elif extras-1==npartons: pt_extra_1.Fill(pt) + elif extras-2==npartons: pt_extra_2.Fill(pt) + elif extras-3==npartons: pt_extra_3.Fill(pt) + elif extras-4==npartons: pt_extra_4.Fill(pt) + elif extras-5==npartons: pt_extra_5.Fill(pt) + pdg_extras.Fill( abs(int(line.split()[0])) ) + npartons-=1 + # End of loop over input file lines +# Done holding open LHE file + +# Write all the histograms for future use +output_hists = ROOT.TFile.Open('output_hists.root','RECREATE') +output_hists.cd() +for h in histograms: + h.Write(h.GetName()) +output_hists.Close() diff --git a/Generators/EvgenProdTools/share/common/EnableFixHepMC.py b/Generators/EvgenProdTools/share/common/EnableFixHepMC.py new file mode 100644 index 00000000000..169e35bf7ab --- /dev/null +++ b/Generators/EvgenProdTools/share/common/EnableFixHepMC.py @@ -0,0 +1,8 @@ +# This fragment turns on the FixHepMC algorithm +from AthenaCommon.AlgSequence import AlgSequence +topAlg = AlgSequence() +print "Running FixHepMC" +if not hasattr(topAlg, "FixHepMC"): + # TODO: what if it exists but at the wrong point in the sequence? Move to the end? + from EvgenProdTools.EvgenProdToolsConf import FixHepMC + topAlg += FixHepMC() diff --git a/Generators/EvgenProdTools/share/common/find_unique_file.py b/Generators/EvgenProdTools/share/common/find_unique_file.py new file mode 100644 index 00000000000..dc37297d456 --- /dev/null +++ b/Generators/EvgenProdTools/share/common/find_unique_file.py @@ -0,0 +1,12 @@ +## Helper functions for input file handling +def find_unique_file(pattern): + "Return a matching file, provided it is unique" + import glob + files = glob.glob(pattern) + ## Check that there is exactly 1 match + if not files: + raise RuntimeError("No '%s' file found" % pattern) + elif len(files) > 1: + raise RuntimeError("More than one '%s' file found" % pattern) + return files[0] + diff --git a/Generators/EvgenProdTools/share/common/merge_lhe_files.py b/Generators/EvgenProdTools/share/common/merge_lhe_files.py new file mode 100644 index 00000000000..c91c809a173 --- /dev/null +++ b/Generators/EvgenProdTools/share/common/merge_lhe_files.py @@ -0,0 +1,48 @@ +# 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) + output.write(line) +## 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 and "Required accuracy" not 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>\n") + output.close() + diff --git a/Generators/EvgenProdTools/share/common/mult_lhe_input.py b/Generators/EvgenProdTools/share/common/mult_lhe_input.py new file mode 100644 index 00000000000..d07f4e42b01 --- /dev/null +++ b/Generators/EvgenProdTools/share/common/mult_lhe_input.py @@ -0,0 +1,38 @@ +include("EvgenProdTools/merge_lhe_files.py") +include("EvgenProdTools/find_unique_file.py") + +myInputFiles = runArgs.inputGeneratorFile +genInputFiles = myInputFiles.split(',') +numberOfFiles = len(genInputFiles) + +if numberOfFiles > 1: + allFiles = [] + for file in genInputFiles: + print "input file name ",file +# Since we can have multiple files from the same task, inputroot must include more of the filename +# to make it unique + if ".tar" in os.path.basename(file): + inputroot = os.path.basename(file).split(".tar.")[0] + else: + input0 = os.path.basename(file).split("._")[0] + input1 = (os.path.basename(file).split("._")[1]).split(".")[0] + inputroot = input0+"._"+input1 +# 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) + + print ("Found more than one LHE file: {}".format(numberOfFiles)) +# my_lhe_file = "merged_lhef.events" +# skeleton.GENtoEVGEN splits the file name on "._" (in rel. 20.7.9.9.6,MCProd, +# so insert this in the merged file name - to make it run also for this release) + my_lhe_file = "merged_lhef._0.events" + merge_lhe_files(allFiles, my_lhe_file ) + print ("Using uncompressed LHE file '{}' as inputGeneratorFile".format(my_lhe_file)) + runArgs.inputGeneratorFile = my_lhe_file + + diff --git a/Generators/EvgenProdTools/share/file/G4particle_whitelist.txt b/Generators/EvgenProdTools/share/file/G4particle_whitelist.txt new file mode 100644 index 00000000000..313f20a1bdd --- /dev/null +++ b/Generators/EvgenProdTools/share/file/G4particle_whitelist.txt @@ -0,0 +1,371 @@ +12 nu(e) 0.0 (MeV/c) lepton nu(e) 0 +-12 nu(e)bar 0.0 (MeV/c) lepton nu(e) 0 +14 nu(mu) 0.0 (MeV/c) lepton nu(mu) 0 +-14 nu(mu)bar 0.0 (MeV/c) lepton nu(mu) 0 +16 nu(tau) 0.0 (MeV/c) lepton nu(tau) 0 +-16 nu(tau)bar 0.0 (MeV/c) lepton nu(tau) 0 +11 e- 0.510999 (MeV/c) lepton e 0 +22 gamma 0 (MeV/c) gamma photon 0 +-11 e+ 0.510999 (MeV/c) lepton e 0 +-13 mu+ 105.658 (MeV/c) lepton mu 0 +13 mu- 105.658 (MeV/c) lepton mu 0 +211 pi+ 139.57 (MeV/c) meson pi 0 +-211 pi- 139.57 (MeV/c) meson pi 0 +321 kaon+ 493.677 (MeV/c) meson kaon 0 +-321 kaon- 493.677 (MeV/c) meson kaon 0 +15 tau- 1776.82 (MeV/c) lepton tau 0 +-15 tau+ 1776.82 (MeV/c) lepton tau 0 +111 pi0 134.977 (MeV/c) meson pi 0 +221 eta 547.853 (MeV/c) meson eta 0 +331 eta_prime 957.78 (MeV/c) meson eta_prime 0 +311 kaon0 497.614 (MeV/c) meson kaon 0 +-311 anti_kaon0 497.614 (MeV/c) meson kaon 0 +130 kaon0L 497.614 (MeV/c) meson kaon 0 +310 kaon0S 497.614 (MeV/c) meson kaon 0 +411 D+ 1869.57 (MeV/c) meson D 0 +-411 D- 1869.57 (MeV/c) meson D 0 +421 D0 1864.8 (MeV/c) meson D 0 +-421 anti_D0 1864.8 (MeV/c) meson D 0 +431 Ds+ 1968.45 (MeV/c) meson Ds 0 +-431 Ds- 1968.45 (MeV/c) meson Ds 0 +441 etac 2980.3 (MeV/c) meson etac 0 +443 J/psi 3096.92 (MeV/c) meson J/psi 0 +521 B+ 5279.17 (MeV/c) meson B 0 +-521 B- 5279.17 (MeV/c) meson B 0 +511 B0 5279.5 (MeV/c) meson B 0 +-511 anti_B0 5279.5 (MeV/c) meson B 0 +531 Bs0 5366.3 (MeV/c) meson Bs 0 +-531 anti_Bs0 5366.3 (MeV/c) meson Bs 0 +541 Bc+ 6277 (MeV/c) meson Bc 0 +-541 Bc- 6277 (MeV/c) meson Bc 0 +553 Upsilon 9460.3 (MeV/c) meson Upsilon 0 +2112 neutron 939.565 (MeV/c) baryon nucleon 0 +-2112 anti_neutron 939.565 (MeV/c) baryon nucleon 0 +3122 lambda 1115.68 (MeV/c) baryon lambda 0 +-3122 anti_lambda 1115.68 (MeV/c) baryon lambda 0 +3212 sigma0 1192.64 (MeV/c) baryon sigma 0 +-3212 anti_sigma0 1192.64 (MeV/c) baryon sigma 0 +3222 sigma+ 1189.37 (MeV/c) baryon sigma 0 +-3222 anti_sigma+ 1189.37 (MeV/c) baryon sigma 0 +3112 sigma- 1197.45 (MeV/c) baryon sigma 0 +-3112 anti_sigma- 1197.45 (MeV/c) baryon sigma 0 +3322 xi0 1314.86 (MeV/c) baryon xi 0 +-3322 anti_xi0 1314.86 (MeV/c) baryon xi 0 +3312 xi- 1321.71 (MeV/c) baryon xi 0 +-3312 anti_xi- 1321.71 (MeV/c) baryon xi 0 +3334 omega- 1672.45 (MeV/c) baryon omega 0 +-3334 anti_omega- 1672.45 (MeV/c) baryon omega 0 +4122 lambda_c+ 2286.46 (MeV/c) baryon lambda_c 0 +4222 sigma_c++ 2454.02 (MeV/c) baryon sigma_c 0 +4212 sigma_c+ 2452.9 (MeV/c) baryon sigma_c 0 +4112 sigma_c0 2453.76 (MeV/c) baryon sigma_c 0 +4232 xi_c+ 2467.8 (MeV/c) baryon xi_c 0 +4132 xi_c0 2470.88 (MeV/c) baryon xi_c 0 +4332 omega_c0 2695.2 (MeV/c) baryon omega_c 0 +-4122 anti_lambda_c+ 2286.46 (MeV/c) baryon lambda_c 0 +-4222 anti_sigma_c++ 2454.02 (MeV/c) baryon sigma_c 0 +-4212 anti_sigma_c+ 2452.9 (MeV/c) baryon sigma_c 0 +-4112 anti_sigma_c0 2453.76 (MeV/c) baryon sigma_c 0 +-4232 anti_xi_c+ 2467.8 (MeV/c) baryon xi_c 0 +-4132 anti_xi_c0 2470.88 (MeV/c) baryon xi_c 0 +-4332 anti_omega_c0 2695.2 (MeV/c) baryon omega_c 0 +5122 lambda_b 5620.2 (MeV/c) baryon lambda_b 0 +5222 sigma_b+ 5807.8 (MeV/c) baryon sigma_b 0 +5112 sigma_b- 5815.2 (MeV/c) baryon sigma_b 0 +5232 xi_b0 5790.5 (MeV/c) baryon xi_b 0 +5132 xi_b- 5790.5 (MeV/c) baryon xi_b 0 +5332 omega_b- 6071 (MeV/c) baryon omega_b 0 +-5122 anti_lambda_b 5620.2 (MeV/c) baryon lambda_b 0 +-5222 anti_sigma_b+ 5807.8 (MeV/c) baryon sigma_b 0 +-5112 anti_sigma_b- 5815.2 (MeV/c) baryon sigma_b 0 +-5232 anti_xi_b0 5790.5 (MeV/c) baryon xi_b 0 +-5132 anti_xi_b- 5790.5 (MeV/c) baryon xi_b 0 +-5332 anti_omega_b- 6071 (MeV/c) baryon omega_b 0 +2224 delta++ 1232 (MeV/c) baryon 1 +2214 delta+ 1232 (MeV/c) baryon 1 +2114 delta0 1232 (MeV/c) baryon 1 +1114 delta- 1232 (MeV/c) baryon 1 +-2224 anti_delta++ 1232 (MeV/c) baryon 1 +-2214 anti_delta+ 1232 (MeV/c) baryon 1 +-2114 anti_delta0 1232 (MeV/c) baryon 1 +-1114 anti_delta- 1232 (MeV/c) baryon 1 +223 omega 782.65 (MeV/c) meson 1 +333 phi 1019.46 (MeV/c) meson 1 +213 rho+ 775.8 (MeV/c) meson 1 +-213 rho- 775.8 (MeV/c) meson 1 +113 rho0 775.49 (MeV/c) meson 1 +9000211 a0(980)+ 980 (MeV/c) meson 1 +-9000211 a0(980)- 980 (MeV/c) meson 1 +9000111 a0(980)0 980 (MeV/c) meson 1 +9000221 f0(600) 800 (MeV/c) meson 1 +9010221 f0(980) 980 (MeV/c) meson 1 +9020221 eta(1405) 1409.8 (MeV/c) meson 1 +9030221 f0(1500) 1505 (MeV/c) meson 1 +10331 f0(1710) 1720 (MeV/c) meson 1 +323 k_star+ 891.66 (MeV/c) meson 1 +313 k_star0 895.94 (MeV/c) meson 1 +-323 k_star- 891.66 (MeV/c) meson 1 +-313 anti_k_star0 895.94 (MeV/c) meson 1 +12112 N(1440)0 1440 (MeV/c) baryon 1 +12212 N(1440)+ 1440 (MeV/c) baryon 1 +-12112 anti_N(1440)0 1440 (MeV/c) baryon 1 +-12212 anti_N(1440)+ 1440 (MeV/c) baryon 1 +1214 N(1520)0 1520 (MeV/c) baryon 1 +2124 N(1520)+ 1520 (MeV/c) baryon 1 +-1214 anti_N(1520)0 1520 (MeV/c) baryon 1 +-2124 anti_N(1520)+ 1520 (MeV/c) baryon 1 +22112 N(1535)0 1535 (MeV/c) baryon 1 +22212 N(1535)+ 1535 (MeV/c) baryon 1 +-22112 anti_N(1535)0 1535 (MeV/c) baryon 1 +-22212 anti_N(1535)+ 1535 (MeV/c) baryon 1 +32112 N(1650)0 1655 (MeV/c) baryon 1 +32212 N(1650)+ 1655 (MeV/c) baryon 1 +-32112 anti_N(1650)0 1655 (MeV/c) baryon 1 +-32212 anti_N(1650)+ 1655 (MeV/c) baryon 1 +2116 N(1675)0 1675 (MeV/c) baryon 1 +2216 N(1675)+ 1675 (MeV/c) baryon 1 +-2116 anti_N(1675)0 1675 (MeV/c) baryon 1 +-2216 anti_N(1675)+ 1675 (MeV/c) baryon 1 +12116 N(1680)0 1685 (MeV/c) baryon 1 +12216 N(1680)+ 1685 (MeV/c) baryon 1 +-12116 anti_N(1680)0 1685 (MeV/c) baryon 1 +-12216 anti_N(1680)+ 1685 (MeV/c) baryon 1 +21214 N(1700)0 1700 (MeV/c) baryon 1 +22124 N(1700)+ 1700 (MeV/c) baryon 1 +-21214 anti_N(1700)0 1700 (MeV/c) baryon 1 +-22124 anti_N(1700)+ 1700 (MeV/c) baryon 1 +42112 N(1710)0 1710 (MeV/c) baryon 1 +42212 N(1710)+ 1710 (MeV/c) baryon 1 +-42112 anti_N(1710)0 1710 (MeV/c) baryon 1 +-42212 anti_N(1710)+ 1710 (MeV/c) baryon 1 +31214 N(1720)0 1720 (MeV/c) baryon 1 +32124 N(1720)+ 1720 (MeV/c) baryon 1 +-31214 anti_N(1720)0 1720 (MeV/c) baryon 1 +-32124 anti_N(1720)+ 1720 (MeV/c) baryon 1 +1218 N(2190)0 2190 (MeV/c) baryon 1 +2128 N(2190)+ 2190 (MeV/c) baryon 1 +-1218 anti_N(2190)0 2190 (MeV/c) baryon 1 +-2128 anti_N(2190)+ 2190 (MeV/c) baryon 1 +31114 delta(1600)- 1600 (MeV/c) baryon 1 +32114 delta(1600)0 1600 (MeV/c) baryon 1 +32214 delta(1600)+ 1600 (MeV/c) baryon 1 +32224 delta(1600)++ 1600 (MeV/c) baryon 1 +-31114 anti_delta(1600)- 1600 (MeV/c) baryon 1 +-32114 anti_delta(1600)0 1600 (MeV/c) baryon 1 +-32214 anti_delta(1600)+ 1600 (MeV/c) baryon 1 +-32224 anti_delta(1600)++ 1600 (MeV/c) baryon 1 +1112 delta(1620)- 1630 (MeV/c) baryon 1 +1212 delta(1620)0 1630 (MeV/c) baryon 1 +2122 delta(1620)+ 1630 (MeV/c) baryon 1 +2222 delta(1620)++ 1630 (MeV/c) baryon 1 +-1112 anti_delta(1620)- 1630 (MeV/c) baryon 1 +-1212 anti_delta(1620)0 1630 (MeV/c) baryon 1 +-2122 anti_delta(1620)+ 1630 (MeV/c) baryon 1 +-2222 anti_delta(1620)++ 1630 (MeV/c) baryon 1 +11114 delta(1700)- 1700 (MeV/c) baryon 1 +12114 delta(1700)0 1700 (MeV/c) baryon 1 +12214 delta(1700)+ 1700 (MeV/c) baryon 1 +12224 delta(1700)++ 1700 (MeV/c) baryon 1 +-11114 anti_delta(1700)- 1700 (MeV/c) baryon 1 +-12114 anti_delta(1700)0 1700 (MeV/c) baryon 1 +-12214 anti_delta(1700)+ 1700 (MeV/c) baryon 1 +-12224 anti_delta(1700)++ 1700 (MeV/c) baryon 1 +1116 delta(1905)- 1890 (MeV/c) baryon 1 +1216 delta(1905)0 1890 (MeV/c) baryon 1 +2126 delta(1905)+ 1890 (MeV/c) baryon 1 +2226 delta(1905)++ 1890 (MeV/c) baryon 1 +-1116 anti_delta(1905)- 1890 (MeV/c) baryon 1 +-1216 anti_delta(1905)0 1890 (MeV/c) baryon 1 +-2126 anti_delta(1905)+ 1890 (MeV/c) baryon 1 +-2226 anti_delta(1905)++ 1890 (MeV/c) baryon 1 +21112 delta(1910)- 1910 (MeV/c) baryon 1 +21212 delta(1910)0 1910 (MeV/c) baryon 1 +22122 delta(1910)+ 1910 (MeV/c) baryon 1 +22222 delta(1910)++ 1910 (MeV/c) baryon 1 +-21112 anti_delta(1910)- 1910 (MeV/c) baryon 1 +-21212 anti_delta(1910)0 1910 (MeV/c) baryon 1 +-22122 anti_delta(1910)+ 1910 (MeV/c) baryon 1 +-22222 anti_delta(1910)++ 1910 (MeV/c) baryon 1 +21114 delta(1920)- 1920 (MeV/c) baryon 1 +22114 delta(1920)0 1920 (MeV/c) baryon 1 +22214 delta(1920)+ 1920 (MeV/c) baryon 1 +22224 delta(1920)++ 1920 (MeV/c) baryon 1 +-21114 anti_delta(1920)- 1920 (MeV/c) baryon 1 +-22114 anti_delta(1920)0 1920 (MeV/c) baryon 1 +-22214 anti_delta(1920)+ 1920 (MeV/c) baryon 1 +-22224 anti_delta(1920)++ 1920 (MeV/c) baryon 1 +11116 delta(1930)- 1960 (MeV/c) baryon 1 +11216 delta(1930)0 1960 (MeV/c) baryon 1 +12126 delta(1930)+ 1960 (MeV/c) baryon 1 +12226 delta(1930)++ 1960 (MeV/c) baryon 1 +-11116 anti_delta(1930)- 1960 (MeV/c) baryon 1 +-11216 anti_delta(1930)0 1960 (MeV/c) baryon 1 +-12126 anti_delta(1930)+ 1960 (MeV/c) baryon 1 +-12226 anti_delta(1930)++ 1960 (MeV/c) baryon 1 +1118 delta(1950)- 1930 (MeV/c) baryon 1 +2118 delta(1950)0 1930 (MeV/c) baryon 1 +2218 delta(1950)+ 1930 (MeV/c) baryon 1 +2228 delta(1950)++ 1930 (MeV/c) baryon 1 +-1118 anti_delta(1950)- 1930 (MeV/c) baryon 1 +-2118 anti_delta(1950)0 1930 (MeV/c) baryon 1 +-2218 anti_delta(1950)+ 1930 (MeV/c) baryon 1 +-2228 anti_delta(1950)++ 1930 (MeV/c) baryon 1 +13122 lambda(1405) 1405.1 (MeV/c) baryon 1 +-13122 anti_lambda(1405) 1405.1 (MeV/c) baryon 1 +3124 lambda(1520) 1519.5 (MeV/c) baryon 1 +-3124 anti_lambda(1520) 1519.5 (MeV/c) baryon 1 +23122 lambda(1600) 1600 (MeV/c) baryon 1 +-23122 anti_lambda(1600) 1600 (MeV/c) baryon 1 +33122 lambda(1670) 1670 (MeV/c) baryon 1 +-33122 anti_lambda(1670) 1670 (MeV/c) baryon 1 +13124 lambda(1690) 1690 (MeV/c) baryon 1 +-13124 anti_lambda(1690) 1690 (MeV/c) baryon 1 +43122 lambda(1800) 1800 (MeV/c) baryon 1 +-43122 anti_lambda(1800) 1800 (MeV/c) baryon 1 +53122 lambda(1810) 1810 (MeV/c) baryon 1 +-53122 anti_lambda(1810) 1810 (MeV/c) baryon 1 +3126 lambda(1820) 1820 (MeV/c) baryon 1 +-3126 anti_lambda(1820) 1820 (MeV/c) baryon 1 +13126 lambda(1830) 1830 (MeV/c) baryon 1 +-13126 anti_lambda(1830) 1830 (MeV/c) baryon 1 +23124 lambda(1890) 1890 (MeV/c) baryon 1 +-23124 anti_lambda(1890) 1890 (MeV/c) baryon 1 +3128 lambda(2100) 2100 (MeV/c) baryon 1 +-3128 anti_lambda(2100) 2100 (MeV/c) baryon 1 +23126 lambda(2110) 2110 (MeV/c) baryon 1 +-23126 anti_lambda(2110) 2110 (MeV/c) baryon 1 +3114 sigma(1385)- 1387.2 (MeV/c) baryon 1 +3214 sigma(1385)0 1383.7 (MeV/c) baryon 1 +3224 sigma(1385)+ 1382.8 (MeV/c) baryon 1 +-3114 anti_sigma(1385)- 1387.2 (MeV/c) baryon 1 +-3214 anti_sigma(1385)0 1383.7 (MeV/c) baryon 1 +-3224 anti_sigma(1385)+ 1382.8 (MeV/c) baryon 1 +13112 sigma(1660)- 1660 (MeV/c) baryon 1 +13212 sigma(1660)0 1660 (MeV/c) baryon 1 +13222 sigma(1660)+ 1660 (MeV/c) baryon 1 +-13112 anti_sigma(1660)- 1660 (MeV/c) baryon 1 +-13212 anti_sigma(1660)0 1660 (MeV/c) baryon 1 +-13222 anti_sigma(1660)+ 1660 (MeV/c) baryon 1 +13114 sigma(1670)- 1670 (MeV/c) baryon 1 +13214 sigma(1670)0 1670 (MeV/c) baryon 1 +13224 sigma(1670)+ 1670 (MeV/c) baryon 1 +-13114 anti_sigma(1670)- 1670 (MeV/c) baryon 1 +-13214 anti_sigma(1670)0 1670 (MeV/c) baryon 1 +-13224 anti_sigma(1670)+ 1670 (MeV/c) baryon 1 +23112 sigma(1750)- 1750 (MeV/c) baryon 1 +23212 sigma(1750)0 1750 (MeV/c) baryon 1 +23222 sigma(1750)+ 1750 (MeV/c) baryon 1 +-23112 anti_sigma(1750)- 1750 (MeV/c) baryon 1 +-23212 anti_sigma(1750)0 1750 (MeV/c) baryon 1 +-23222 anti_sigma(1750)+ 1750 (MeV/c) baryon 1 +3116 sigma(1775)- 1775 (MeV/c) baryon 1 +3216 sigma(1775)0 1775 (MeV/c) baryon 1 +3226 sigma(1775)+ 1775 (MeV/c) baryon 1 +-3116 anti_sigma(1775)- 1775 (MeV/c) baryon 1 +-3216 anti_sigma(1775)0 1775 (MeV/c) baryon 1 +-3226 anti_sigma(1775)+ 1775 (MeV/c) baryon 1 +13116 sigma(1915)- 1915 (MeV/c) baryon 1 +13216 sigma(1915)0 1915 (MeV/c) baryon 1 +13226 sigma(1915)+ 1915 (MeV/c) baryon 1 +-13116 anti_sigma(1915)- 1915 (MeV/c) baryon 1 +-13216 anti_sigma(1915)0 1915 (MeV/c) baryon 1 +-13226 anti_sigma(1915)+ 1915 (MeV/c) baryon 1 +23114 sigma(1940)- 1940 (MeV/c) baryon 1 +23214 sigma(1940)0 1940 (MeV/c) baryon 1 +23224 sigma(1940)+ 1940 (MeV/c) baryon 1 +-23114 anti_sigma(1940)- 1940 (MeV/c) baryon 1 +-23214 anti_sigma(1940)0 1940 (MeV/c) baryon 1 +-23224 anti_sigma(1940)+ 1940 (MeV/c) baryon 1 +3118 sigma(2030)- 2030 (MeV/c) baryon 1 +3218 sigma(2030)0 2030 (MeV/c) baryon 1 +3228 sigma(2030)+ 2030 (MeV/c) baryon 1 +-3118 anti_sigma(2030)- 2030 (MeV/c) baryon 1 +-3218 anti_sigma(2030)0 2030 (MeV/c) baryon 1 +-3228 anti_sigma(2030)+ 2030 (MeV/c) baryon 1 +3314 xi(1530)- 1535 (MeV/c) baryon 1 +3324 xi(1530)0 1531.8 (MeV/c) baryon 1 +-3314 anti_xi(1530)- 1535 (MeV/c) baryon 1 +-3324 anti_xi(1530)0 1531.8 (MeV/c) baryon 1 +13314 xi(1820)- 1823 (MeV/c) baryon 1 +13324 xi(1820)0 1823 (MeV/c) baryon 1 +-13314 anti_xi(1820)- 1823 (MeV/c) baryon 1 +-13324 anti_xi(1820)0 1823 (MeV/c) baryon 1 +-10213 b1(1235)- 1229.5 (MeV/c) meson 1 +10113 b1(1235)0 1229.5 (MeV/c) meson 1 +10213 b1(1235)+ 1229.5 (MeV/c) meson 1 +10223 h1(1170) 1170 (MeV/c) meson 1 +10313 k1(1270)0 1272 (MeV/c) meson 1 +10323 k1(1270)+ 1272 (MeV/c) meson 1 +-10323 k1(1270)- 1272 (MeV/c) meson 1 +-10313 anti_k1(1270)0 1272 (MeV/c) meson 1 +-10211 a0(1450)- 1474 (MeV/c) meson 1 +10111 a0(1450)0 1474 (MeV/c) meson 1 +10211 a0(1450)+ 1474 (MeV/c) meson 1 +-20213 a1(1260)- 1230 (MeV/c) meson 1 +20113 a1(1260)0 1230 (MeV/c) meson 1 +20213 a1(1260)+ 1230 (MeV/c) meson 1 +20223 f1(1285) 1281.8 (MeV/c) meson 1 +20333 f1(1420) 1426.4 (MeV/c) meson 1 +20313 k1(1400)0 1403 (MeV/c) meson 1 +20323 k1(1400)+ 1403 (MeV/c) meson 1 +-20323 k1(1400)- 1403 (MeV/c) meson 1 +-20313 anti_k1(1400)0 1403 (MeV/c) meson 1 +-215 a2(1320)- 1318.3 (MeV/c) meson 1 +115 a2(1320)0 1318.3 (MeV/c) meson 1 +215 a2(1320)+ 1318.3 (MeV/c) meson 1 +225 f2(1270) 1275.1 (MeV/c) meson 1 +335 f2_prime(1525) 1525 (MeV/c) meson 1 +315 k2_star(1430)0 1432.4 (MeV/c) meson 1 +325 k2_star(1430)+ 1425.6 (MeV/c) meson 1 +-325 k2_star(1430)- 1425.6 (MeV/c) meson 1 +-315 anti_k2_star(1430)0 1432.4 (MeV/c) meson 1 +-10215 pi2(1670)- 1672.2 (MeV/c) meson 1 +10115 pi2(1670)0 1672.2 (MeV/c) meson 1 +10215 pi2(1670)+ 1672.2 (MeV/c) meson 1 +10225 eta2(1645) 1617 (MeV/c) meson 1 +10335 eta2(1870) 1842 (MeV/c) meson 1 +10315 k2(1770)0 1773 (MeV/c) meson 1 +10325 k2(1770)+ 1773 (MeV/c) meson 1 +-10325 k2(1770)- 1773 (MeV/c) meson 1 +-10315 anti_k2(1770)0 1773 (MeV/c) meson 1 +-30213 rho(1700)- 1720 (MeV/c) meson 1 +30113 rho(1700)0 1720 (MeV/c) meson 1 +30213 rho(1700)+ 1720 (MeV/c) meson 1 +30223 omega(1650) 1670 (MeV/c) meson 1 +30313 k_star(1680)0 1717 (MeV/c) meson 1 +30323 k_star(1680)+ 1717 (MeV/c) meson 1 +-30323 k_star(1680)- 1717 (MeV/c) meson 1 +-30313 anti_k_star(1680)0 1717 (MeV/c) meson 1 +-217 rho3(1690)- 1688.8 (MeV/c) meson 1 +117 rho3(1690)0 1688.8 (MeV/c) meson 1 +217 rho3(1690)+ 1688.8 (MeV/c) meson 1 +227 omega3(1670) 1667 (MeV/c) meson 1 +337 phi3(1850) 1854 (MeV/c) meson 1 +317 k3_star(1780)0 1776 (MeV/c) meson 1 +327 k3_star(1780)+ 1776 (MeV/c) meson 1 +-327 k3_star(1780)- 1776 (MeV/c) meson 1 +-317 anti_k3_star(1780)0 1776 (MeV/c) meson 1 +-100211 pi(1300)- 1300 (MeV/c) meson 1 +100111 pi(1300)0 1300 (MeV/c) meson 1 +100211 pi(1300)+ 1300 (MeV/c) meson 1 +100221 eta(1295) 1294 (MeV/c) meson 1 +100331 eta(1475) 1476 (MeV/c) meson 1 +100311 k(1460)0 1460 (MeV/c) meson 1 +100321 k(1460)+ 1460 (MeV/c) meson 1 +-100321 k(1460)- 1460 (MeV/c) meson 1 +-100311 anti_k(1460)0 1460 (MeV/c) meson 1 +-100213 rho(1450)- 1465 (MeV/c) meson 1 +100113 rho(1450)0 1465 (MeV/c) meson 1 +100213 rho(1450)+ 1465 (MeV/c) meson 1 +100223 omega(1420) 1425 (MeV/c) meson 1 +100333 phi(1680) 1680 (MeV/c) meson 1 +100313 k_star(1410)0 1414 (MeV/c) meson 1 +100323 k_star(1410)+ 1414 (MeV/c) meson 1 +-100323 k_star(1410)- 1414 (MeV/c) meson 1 +-100313 anti_k_star(1410)0 1414 (MeV/c) meson 1 +9060225 f2(2010) 2010 (MeV/c) meson 1 +999 geantino 0 (MeV/c) geantino geantino 0 +998 chargedgeantino 0 (MeV/c) geantino geantino 0 +0 unboundPN 1877.84 (MeV/c) nucleus 1 +0 dineutron 1879.13 (MeV/c) nucleus 1 +0 diproton 1876.54 (MeV/c) nucleus 1 diff --git a/Generators/EvgenProdTools/share/file/susyParticlePdgid.txt b/Generators/EvgenProdTools/share/file/susyParticlePdgid.txt new file mode 100644 index 00000000000..ee302205bd7 --- /dev/null +++ b/Generators/EvgenProdTools/share/file/susyParticlePdgid.txt @@ -0,0 +1,20 @@ +1000011 +1000012 +1000013 +1000014 +1000015 +1000016 +2000011 +2000013 +2000015 +1000021 +1000022 +1000023 +1000024 +1000025 +1000035 +1000037 +1000039 +999 +998 + diff --git a/Generators/EvgenProdTools/src/CopyEventWeight.cxx b/Generators/EvgenProdTools/src/CopyEventWeight.cxx index c3a87819be3..ca30cf2137f 100644 --- a/Generators/EvgenProdTools/src/CopyEventWeight.cxx +++ b/Generators/EvgenProdTools/src/CopyEventWeight.cxx @@ -22,7 +22,7 @@ CopyEventWeight::CopyEventWeight(const string& name, ISvcLocator* svcLoc) StatusCode CopyEventWeight::execute() { // Check that the collection isn't empty - /// @todo What is the best thing to do if it is?! + /// @odo What is the best thing to do if it is?! const size_t nEvents = events_const()->size(); if (nEvents == 0) { ATH_MSG_WARNING("McEventCollection is empty"); diff --git a/Generators/EvgenProdTools/src/CountHepMC.cxx b/Generators/EvgenProdTools/src/CountHepMC.cxx index bf949f64c5f..1d0c4ece52c 100644 --- a/Generators/EvgenProdTools/src/CountHepMC.cxx +++ b/Generators/EvgenProdTools/src/CountHepMC.cxx @@ -28,6 +28,9 @@ CountHepMC::CountHepMC(const std::string& name, ISvcLocator* pSvcLocator) : declareProperty("FirstEvent", m_firstEv=1); declareProperty("CorrectHepMC", m_corHepMC=false); declareProperty("CorrectEventID", m_corEvtID=false); + declareProperty("CorrectRunNumber", m_corRunNumber=false); + declareProperty("NewRunNumber", m_newRunNumber=999999); + declareProperty("inputKeyName", m_inputKeyName = "GEN_EVENT"); } @@ -47,19 +50,36 @@ StatusCode CountHepMC::initialize() { StatusCode CountHepMC::execute() { - /// @todo Replace the old event ? + /// @todo Replace the old event ? m_nPass++; ATH_MSG_DEBUG("Current count = " << m_nPass); - + ATH_MSG_INFO("Options for HepMC event number, EvtID event number, EvtID run number = " << m_corHepMC << m_corEvtID << m_corRunNumber ); // Fix the event number int newnum = m_nPass + m_firstEv - 1; if (m_corHepMC) { - // Replace the old event - HepMC::GenEvent* new_evt = new HepMC::GenEvent(*event()); - new_evt->set_event_number(newnum); - events()->pop_back(); - events()->push_back(new_evt); + std::string key = m_inputKeyName; + +// retrieve event from Transient Store (Storegate) + const McEventCollection* oldmcEvtColl=0; + + if (evtStore()->retrieve(oldmcEvtColl, key).isSuccess()){ + McEventCollection* newmcEvtColl = 0; + newmcEvtColl = const_cast<McEventCollection*> (oldmcEvtColl); + + McEventCollection::const_iterator evt = newmcEvtColl->begin(); + HepMC::GenEvent* hepMC = new HepMC::GenEvent(*(*evt)); + + hepMC->set_event_number(newnum); + newmcEvtColl->pop_back(); + newmcEvtColl->push_back(hepMC); + + } +else{ + ATH_MSG_ERROR("No McEventCollection object found"); + return StatusCode::SUCCESS; + } + } if (m_corEvtID) { @@ -76,6 +96,24 @@ StatusCode CountHepMC::execute() { } } +if (m_corRunNumber) { + // Change the EventID in the eventinfo header + const EventInfo* pInputEvt(0); + ATH_MSG_INFO("Set new run number called !!" << m_newRunNumber); + if (evtStore()->retrieve(pInputEvt).isSuccess()) { + assert(pInputEvt); + EventID* eventID = const_cast<EventID*>(pInputEvt->event_ID()); + ATH_MSG_INFO("git eventid !! " ); + eventID->set_run_number(m_newRunNumber); + ATH_MSG_INFO("Set new run number" << m_newRunNumber); + ATH_MSG_DEBUG("Set new run number in event_ID"); + } else { + ATH_MSG_ERROR("No EventInfo object found"); + return StatusCode::SUCCESS; + } + } + + if (m_nPass == m_nCount) { ATH_MSG_INFO("Stopping the event processing...." << m_nPass << "/" << m_nCount); IEventProcessor* apm = 0; diff --git a/Generators/EvgenProdTools/src/EvgenOTFTopUpSvc.cxx b/Generators/EvgenProdTools/src/EvgenOTFTopUpSvc.cxx index c16fcda467f..6d742c45fe8 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 \ No newline at end of file +#endif diff --git a/Generators/EvgenProdTools/src/FixHepMC.cxx b/Generators/EvgenProdTools/src/FixHepMC.cxx index 0652494768f..ec0a87331e2 100644 --- a/Generators/EvgenProdTools/src/FixHepMC.cxx +++ b/Generators/EvgenProdTools/src/FixHepMC.cxx @@ -165,3 +165,4 @@ bool FixHepMC::isLoop(const HepMC::GenParticle* p) { //@} #endif + diff --git a/Generators/EvgenProdTools/src/TestHepMC.cxx b/Generators/EvgenProdTools/src/TestHepMC.cxx index 758eed2eae8..7f345166ab8 100644 --- a/Generators/EvgenProdTools/src/TestHepMC.cxx +++ b/Generators/EvgenProdTools/src/TestHepMC.cxx @@ -1,11 +1,14 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration */ - #ifndef XAOD_ANALYSIS #include "EvgenProdTools/TestHepMC.h" #include "GaudiKernel/DataSvc.h" +#include "TruthUtils/PIDHelpers.h" + +// For find +#include <algorithm> using namespace std; @@ -29,9 +32,26 @@ TestHepMC::TestHepMC(const string& name, ISvcLocator* pSvcLocator) declareProperty("EffFailThreshold", m_eff_fail_threshold=0.98); // fraction declareProperty("AccuracyMargin", m_accur_margin=0.); //MeV - declareProperty( "G4ExtraWhiteFile", m_paramFile = "g4_extrawhite.param" ); + declareProperty("G4ExtraWhiteFile", m_paramFile = "g4_extrawhite.param" ); + declareProperty("UnknownPDGIDFile", m_unknownPDGIDFile = "pdgid_extras.txt" ); declareProperty("NoDecayVertexStatuses", m_vertexStatuses ); + + declareProperty("BeamEnergyTest", m_beamEnergyTest = true); //switching off inactive + declareProperty("VtxNaNTest", m_vtxNaNTest = true); + declareProperty("VtxDisplacedTest", m_vtxDisplacedTest = true); + declareProperty("MomNaNTest", m_momNaNTest = true); + declareProperty("LifeTimeTest", m_lifeTimeTest = true); + declareProperty("EnergyG4Test", m_energyG4Test = true); + declareProperty("EnergyImbalanceTest", m_energyImbalanceTest = true); + declareProperty("MomImbalanceTest", m_momImbalanceTest = true); + declareProperty("NegativeEnergyTest", m_negativeEnergyTest = true); + declareProperty("TachyonsTest", m_tachyonsTest = true); + declareProperty("UnstableNoVtxTest", m_unstableNoVtxTest = true); + declareProperty("Pi0NoVtxTest", m_pi0NoVtxTest = true); + declareProperty("UndisplacedDaughtersTest", m_undisplacedDaughtersTest = true); + declareProperty("UknownPDGIDTest", m_unknownPDGIDTest = true); + m_vertexStatuses.push_back( 1 ); m_vertexStatuses.push_back( 3 ); m_vertexStatuses.push_back( 4 ); @@ -73,6 +93,7 @@ TestHepMC::TestHepMC(const string& name, ISvcLocator* pSvcLocator) m_vtxDisplacedMoreThan_1m_CheckRateCnt = 0; m_undisplacedDecayDaughtersOfDisplacedVtxCheckRate = 0; m_nonG4_energyCheckRate = 0; + m_unknownPDGIDCheckRate = 0; m_h_energy_dispVtxCheck = 0; m_h_energy_dispVtxCheck_lt10 = 0; @@ -106,138 +127,139 @@ StatusCode TestHepMC::initialize() { CHECK(GenBase::initialize()); if (m_doHist){ - CHECK(m_thistSvc.retrieve()); - - m_h_energy_dispVtxCheck = new TH1F("h_energy_dispVtxCheck", "h_energy_dispVtxCheck", 2000, 0., 2000.); - m_h_energy_dispVtxCheck_lt10 = new TH1F("h_energy_dispVtxCheck_lt10", "h_energy_dispVtxCheck_lt10", 1000, 0., 10.); - m_h_pdgid_dispVtxCheck = new TH1F("h_pdgid_dispVtxCheck", "h_pdgid_dispVtxCheck", 10000, 0., 10000.); - m_h_status_dispVtxCheck = new TH1F("h_status_dispVtxCheck", "h_status_dispVtxCheck", 10000, 0., 10000.); - m_h_px_dispVtxCheck = new TH1F("h_px_dispVtxCheck", "h_px_dispVtxCheck", 4000, -2000., 2000.); - m_h_py_dispVtxCheck = new TH1F("h_py_dispVtxCheck", "h_py_dispVtxCheck", 4000, -2000., 2000.); - m_h_pz_dispVtxCheck = new TH1F("h_pz_dispVtxCheck", "h_pz_dispVtxCheck", 4000, -2000., 2000.); - m_h_vx_dispVtxCheck = new TH1F("h_vx_dispVtxCheck", "h_vx_dispVtxCheck", 40000, -200., 200); - m_h_vy_dispVtxCheck = new TH1F("h_vy_dispVtxCheck", "h_vy_dispVtxCheck", 40000, -200., 200); - m_h_vz_dispVtxCheck = new TH1F("h_vz_dispVtxCheck", "h_vz_dispVtxCheck", 40000, -200., 200); - m_h_vxprod_dispVtxCheck = new TH1F("h_vxprod_dispVtxCheck", "h_vxprod_dispVtxCheck", 40000, -200., 200.); - m_h_vyprod_dispVtxCheck = new TH1F("h_vyprod_dispVtxCheck", "h_vyprod_dispVtxCheck", 40000, -200., 200.); - m_h_vzprod_dispVtxCheck = new TH1F("h_vzprod_dispVtxCheck", "h_vzprod_dispVtxCheck", 40000, -200., 200.); - m_h_vtxprod_dispVtxCheck = new TH1F("h_vtxprod_dispVtxCheck", "h_vtxprod_dispVtxCheck", 20000, 0., 200.); - m_h_vtxend_dispVtxCheck = new TH1F("h_vtxend_dispVtxCheck", "h_vtxend_dispVtxCheck", 20000, 0., 200.); - m_h_photon_mass = new TH1F("h_photon_mass", "h_photon_mass", 20000, -10000., 10000); - m_h_photon_energy = new TH1F("h_photon_energy", "h_photon_energy", 20000, -10000., 10000); - m_h_photon_e2_p2_e2 = new TH1F("h_photon_e2_p2_e2", "h_photon_e2_p2_e2", 20000, -10., 10); - m_h_energyImbalance = new TH1F("h_energyImbalance", "h_energyImbalance", 2000, 0., 2000.); - m_h_momentumImbalance_px = new TH1F("h_momentumImbalance_px", "h_momentumImbalance_px", 2000,0., 2000.); - m_h_momentumImbalance_py = new TH1F("h_momentumImbalance_py", "h_momentumImbalance_py", 2000,0., 2000.); - m_h_momentumImbalance_pz = new TH1F("h_momentumImbalance_pz", "h_momentumImbalance_pz", 2000,0., 2000.); - m_h_beamparticle1_Energy = new TH1F("h_beamparticle1_Energy", "h_beamparticle1_Energy", 14000,0., 14000.); - m_h_beamparticle2_Energy = new TH1F("h_beamparticle2_Energy", "h_beamparticle2_Energy", 14000,0., 14000.); - m_h_cmEnergyDiff = new TH1F("h_cmEnergyDiff", "h_cmEnergyDiff", 8000, -4000., 4000.); - - CHECK(m_thistSvc->regHist("/TestHepMCname/h_energy_dispVtxCheck", m_h_energy_dispVtxCheck)); - CHECK(m_thistSvc->regHist("/TestHepMCname/h_energy_dispVtxCheck_lt10", m_h_energy_dispVtxCheck_lt10)); - CHECK(m_thistSvc->regHist("/TestHepMCname/h_pdgid_dispVtxCheck", m_h_pdgid_dispVtxCheck)); - CHECK(m_thistSvc->regHist("/TestHepMCname/h_status_dispVtxCheck", m_h_status_dispVtxCheck)); - CHECK(m_thistSvc->regHist("/TestHepMCname/h_px_dispVtxCheck", m_h_px_dispVtxCheck)); - CHECK(m_thistSvc->regHist("/TestHepMCname/h_py_dispVtxCheck", m_h_py_dispVtxCheck)); - CHECK(m_thistSvc->regHist("/TestHepMCname/h_pz_dispVtxCheck", m_h_pz_dispVtxCheck)); - CHECK(m_thistSvc->regHist("/TestHepMCname/h_vx_dispVtxCheck", m_h_vx_dispVtxCheck)); - CHECK(m_thistSvc->regHist("/TestHepMCname/h_vy_dispVtxCheck", m_h_vy_dispVtxCheck)); - CHECK(m_thistSvc->regHist("/TestHepMCname/h_vz_dispVtxCheck", m_h_vz_dispVtxCheck)); - CHECK(m_thistSvc->regHist("/TestHepMCname/h_vxprod_dispVtxCheck", m_h_vxprod_dispVtxCheck)); - CHECK(m_thistSvc->regHist("/TestHepMCname/h_vyprod_dispVtxCheck", m_h_vyprod_dispVtxCheck)); - CHECK(m_thistSvc->regHist("/TestHepMCname/h_vzprod_dispVtxCheck", m_h_vzprod_dispVtxCheck)); - CHECK(m_thistSvc->regHist("/TestHepMCname/h_vtxprod_dispVtxCheck", m_h_vtxprod_dispVtxCheck)); - CHECK(m_thistSvc->regHist("/TestHepMCname/h_vtxend_dispVtxCheck", m_h_vtxend_dispVtxCheck)); - CHECK(m_thistSvc->regHist("/TestHepMCname/h_photon_mass", m_h_photon_mass)); - CHECK(m_thistSvc->regHist("/TestHepMCname/h_photon_energy", m_h_photon_energy)); - CHECK(m_thistSvc->regHist("/TestHepMCname/h_photon_e2_p2_e2", m_h_photon_e2_p2_e2)); - CHECK(m_thistSvc->regHist("/TestHepMCname/h_energyImbalance", m_h_energyImbalance)); - CHECK(m_thistSvc->regHist("/TestHepMCname/h_momentumImbalance_px", m_h_momentumImbalance_px)); - CHECK(m_thistSvc->regHist("/TestHepMCname/h_momentumImbalance_py", m_h_momentumImbalance_py)); - CHECK(m_thistSvc->regHist("/TestHepMCname/h_momentumImbalance_pz", m_h_momentumImbalance_pz)); - CHECK(m_thistSvc->regHist("/TestHepMCname/h_beamparticle1_Energy", m_h_beamparticle1_Energy)); - CHECK(m_thistSvc->regHist("/TestHepMCname/h_beamparticle2_Energy", m_h_beamparticle2_Energy)); - CHECK(m_thistSvc->regHist("/TestHepMCname/h_cmEnergyDiff", m_h_cmEnergyDiff)); - - ATH_MSG_INFO("No decay vertex is ignored for particles with status (list):" ); - for ( unsigned int i = 0; i < m_vertexStatuses.size(); i++ ) ATH_MSG_INFO(" : " << m_vertexStatuses.at(i) ); - ATH_MSG_INFO("Vertex statuses finsihed"); + CHECK(m_thistSvc.retrieve()); + + m_h_energy_dispVtxCheck = new TH1F("h_energy_dispVtxCheck", "h_energy_dispVtxCheck", 2000, 0., 2000.); + m_h_energy_dispVtxCheck_lt10 = new TH1F("h_energy_dispVtxCheck_lt10", "h_energy_dispVtxCheck_lt10", 1000, 0., 10.); + m_h_pdgid_dispVtxCheck = new TH1F("h_pdgid_dispVtxCheck", "h_pdgid_dispVtxCheck", 10000, 0., 10000.); + m_h_status_dispVtxCheck = new TH1F("h_status_dispVtxCheck", "h_status_dispVtxCheck", 10000, 0., 10000.); + m_h_px_dispVtxCheck = new TH1F("h_px_dispVtxCheck", "h_px_dispVtxCheck", 4000, -2000., 2000.); + m_h_py_dispVtxCheck = new TH1F("h_py_dispVtxCheck", "h_py_dispVtxCheck", 4000, -2000., 2000.); + m_h_pz_dispVtxCheck = new TH1F("h_pz_dispVtxCheck", "h_pz_dispVtxCheck", 4000, -2000., 2000.); + m_h_vx_dispVtxCheck = new TH1F("h_vx_dispVtxCheck", "h_vx_dispVtxCheck", 40000, -200., 200); + m_h_vy_dispVtxCheck = new TH1F("h_vy_dispVtxCheck", "h_vy_dispVtxCheck", 40000, -200., 200); + m_h_vz_dispVtxCheck = new TH1F("h_vz_dispVtxCheck", "h_vz_dispVtxCheck", 40000, -200., 200); + m_h_vxprod_dispVtxCheck = new TH1F("h_vxprod_dispVtxCheck", "h_vxprod_dispVtxCheck", 40000, -200., 200.); + m_h_vyprod_dispVtxCheck = new TH1F("h_vyprod_dispVtxCheck", "h_vyprod_dispVtxCheck", 40000, -200., 200.); + m_h_vzprod_dispVtxCheck = new TH1F("h_vzprod_dispVtxCheck", "h_vzprod_dispVtxCheck", 40000, -200., 200.); + m_h_vtxprod_dispVtxCheck = new TH1F("h_vtxprod_dispVtxCheck", "h_vtxprod_dispVtxCheck", 20000, 0., 200.); + m_h_vtxend_dispVtxCheck = new TH1F("h_vtxend_dispVtxCheck", "h_vtxend_dispVtxCheck", 20000, 0., 200.); + m_h_photon_mass = new TH1F("h_photon_mass", "h_photon_mass", 20000, -10000., 10000); + m_h_photon_energy = new TH1F("h_photon_energy", "h_photon_energy", 20000, -10000., 10000); + m_h_photon_e2_p2_e2 = new TH1F("h_photon_e2_p2_e2", "h_photon_e2_p2_e2", 20000, -10., 10); + m_h_energyImbalance = new TH1F("h_energyImbalance", "h_energyImbalance", 2000, 0., 2000.); + m_h_momentumImbalance_px = new TH1F("h_momentumImbalance_px", "h_momentumImbalance_px", 2000,0., 2000.); + m_h_momentumImbalance_py = new TH1F("h_momentumImbalance_py", "h_momentumImbalance_py", 2000,0., 2000.); + m_h_momentumImbalance_pz = new TH1F("h_momentumImbalance_pz", "h_momentumImbalance_pz", 2000,0., 2000.); + m_h_beamparticle1_Energy = new TH1F("h_beamparticle1_Energy", "h_beamparticle1_Energy", 14000,0., 14000.); + m_h_beamparticle2_Energy = new TH1F("h_beamparticle2_Energy", "h_beamparticle2_Energy", 14000,0., 14000.); + m_h_cmEnergyDiff = new TH1F("h_cmEnergyDiff", "h_cmEnergyDiff", 8000, -4000., 4000.); + + CHECK(m_thistSvc->regHist("/TestHepMCname/h_energy_dispVtxCheck", m_h_energy_dispVtxCheck)); + CHECK(m_thistSvc->regHist("/TestHepMCname/h_energy_dispVtxCheck_lt10", m_h_energy_dispVtxCheck_lt10)); + CHECK(m_thistSvc->regHist("/TestHepMCname/h_pdgid_dispVtxCheck", m_h_pdgid_dispVtxCheck)); + CHECK(m_thistSvc->regHist("/TestHepMCname/h_status_dispVtxCheck", m_h_status_dispVtxCheck)); + CHECK(m_thistSvc->regHist("/TestHepMCname/h_px_dispVtxCheck", m_h_px_dispVtxCheck)); + CHECK(m_thistSvc->regHist("/TestHepMCname/h_py_dispVtxCheck", m_h_py_dispVtxCheck)); + CHECK(m_thistSvc->regHist("/TestHepMCname/h_pz_dispVtxCheck", m_h_pz_dispVtxCheck)); + CHECK(m_thistSvc->regHist("/TestHepMCname/h_vx_dispVtxCheck", m_h_vx_dispVtxCheck)); + CHECK(m_thistSvc->regHist("/TestHepMCname/h_vy_dispVtxCheck", m_h_vy_dispVtxCheck)); + CHECK(m_thistSvc->regHist("/TestHepMCname/h_vz_dispVtxCheck", m_h_vz_dispVtxCheck)); + CHECK(m_thistSvc->regHist("/TestHepMCname/h_vxprod_dispVtxCheck", m_h_vxprod_dispVtxCheck)); + CHECK(m_thistSvc->regHist("/TestHepMCname/h_vyprod_dispVtxCheck", m_h_vyprod_dispVtxCheck)); + CHECK(m_thistSvc->regHist("/TestHepMCname/h_vzprod_dispVtxCheck", m_h_vzprod_dispVtxCheck)); + CHECK(m_thistSvc->regHist("/TestHepMCname/h_vtxprod_dispVtxCheck", m_h_vtxprod_dispVtxCheck)); + CHECK(m_thistSvc->regHist("/TestHepMCname/h_vtxend_dispVtxCheck", m_h_vtxend_dispVtxCheck)); + CHECK(m_thistSvc->regHist("/TestHepMCname/h_photon_mass", m_h_photon_mass)); + CHECK(m_thistSvc->regHist("/TestHepMCname/h_photon_energy", m_h_photon_energy)); + CHECK(m_thistSvc->regHist("/TestHepMCname/h_photon_e2_p2_e2", m_h_photon_e2_p2_e2)); + CHECK(m_thistSvc->regHist("/TestHepMCname/h_energyImbalance", m_h_energyImbalance)); + CHECK(m_thistSvc->regHist("/TestHepMCname/h_momentumImbalance_px", m_h_momentumImbalance_px)); + CHECK(m_thistSvc->regHist("/TestHepMCname/h_momentumImbalance_py", m_h_momentumImbalance_py)); + CHECK(m_thistSvc->regHist("/TestHepMCname/h_momentumImbalance_pz", m_h_momentumImbalance_pz)); + CHECK(m_thistSvc->regHist("/TestHepMCname/h_beamparticle1_Energy", m_h_beamparticle1_Energy)); + CHECK(m_thistSvc->regHist("/TestHepMCname/h_beamparticle2_Energy", m_h_beamparticle2_Energy)); + CHECK(m_thistSvc->regHist("/TestHepMCname/h_cmEnergyDiff", m_h_cmEnergyDiff)); + + ATH_MSG_INFO("No decay vertex is ignored for particles with status (list):" ); + for ( unsigned int i = 0; i < m_vertexStatuses.size(); i++ ) ATH_MSG_INFO(" : " << m_vertexStatuses.at(i) ); + ATH_MSG_INFO("Vertex statuses finished"); + + } // End of histogramming setup + + // open the files and read G4particle_whitelist.txt + std::ifstream G4file; + G4file.open("G4particle_whitelist.txt"); + std::string line; + int G4pdgID; + if (!G4file.fail()){ + while(std::getline(G4file,line)){ + std::stringstream ss(line); + ss >> G4pdgID; + m_G4pdgID_tab.push_back(G4pdgID); + } + G4file.close(); + } + else { + ATH_MSG_WARNING("Failed to open G4particle_whitelist.txt, checking that all particles are known by Genat4 cannot be performed"); + } + // Open the param file (G4 white list) + G4file.open(m_paramFile.c_str()); + if (!G4file.fail()){ + ATH_MSG_INFO("extra white list for G4 found " << m_paramFile.c_str()); + while(std::getline(G4file,line)){ + std::stringstream ss(line); + ss >> G4pdgID; + m_G4pdgID_tab.push_back(G4pdgID); + } + G4file.close(); + } + else { + ATH_MSG_INFO("extra white list for G4 not provided "); } - //open the files and read G4particle_whitelist.txt - m_G4file.open("G4particle_whitelist.txt"); - std::string line; - int G4pdgID; - - if (!m_G4file.fail()){ - - while(std::getline(m_G4file,line)){ - std::stringstream ss(line); - ss >> G4pdgID; - - m_G4pdgID_tab.push_back(G4pdgID); - - } - m_G4file.close(); - } - else{ - ATH_MSG_WARNING("Failed to open G4particle_whitelist.txt, checking that all particles are known by Genat4 cannot be performed"); - } - - //open the files and read G4particle_whitelist.txt - m_G4file.open(m_paramFile.c_str()); - // std::string line; - // int G4pdgID; - - if (!m_G4file.fail()){ - ATH_MSG_INFO("extra white list for G4 found " << m_paramFile.c_str()); - while(std::getline(m_G4file,line)){ - std::stringstream ss(line); - ss >> G4pdgID; - - m_G4pdgID_tab.push_back(G4pdgID); - - } - m_G4file.close(); - } - else{ - ATH_MSG_INFO("extra white list for G4 not provided "); - } - - //open the files and read susyParticlePdgid.txt - m_susyFile.open("susyParticlePdgid.txt"); - string line1; - int susyPdgID; - - if (!m_susyFile.fail()){ - - while(getline(m_susyFile,line1)){ - stringstream ss1(line1); - ss1 >> susyPdgID; - - m_SusyPdgID_tab.push_back(susyPdgID); - - } - m_susyFile.close(); - } - else{ - ATH_MSG_WARNING("Failed to open susyParticlePdgid.txt, listing particles not present in PDTTable"); - } + // Open the files and read susyParticlePdgid.txt + std::ifstream susyFile; + susyFile.open("susyParticlePdgid.txt"); + int susyPdgID; + if (!susyFile.fail()){ + while(getline(susyFile,line)){ + stringstream ss1(line); + ss1 >> susyPdgID; + m_SusyPdgID_tab.push_back(susyPdgID); + } + susyFile.close(); + } + else{ + ATH_MSG_WARNING("Failed to open susyParticlePdgid.txt, listing particles not present in PDTTable"); + } + + // Open the file of extra PDG IDs that don't need to obey the rules + std::ifstream pdgFile; + pdgFile.open(m_unknownPDGIDFile.c_str()); + int pdgID; + if (!pdgFile.fail()){ + ATH_MSG_INFO("extra white list for PDG IDs found " << m_unknownPDGIDFile.c_str()); + while(std::getline(pdgFile,line)){ + std::stringstream ss(line); + ss >> pdgID; + m_uknownPDGID_tab.push_back(pdgID); + } + pdgFile.close(); + } + else { + ATH_MSG_INFO("extra white list for PDG IDs not provided"); + } return StatusCode::SUCCESS; } StatusCode TestHepMC::execute() { - // If the efficiency after 100 events is below 10%, there is an important bug going on: - // we fail the job immediately so it doesn't run for ever - const double tmp_efficiency = double(m_nPass) / double(m_nPass + m_nFail); - if ((m_nPass + m_nFail) > 100 && tmp_efficiency < 0.1) { - ATH_MSG_FATAL("The efficiency after " << m_nPass + m_nFail << " events is " << tmp_efficiency*100. << "% !!!"); - return StatusCode::FAILURE; - } + + // Holder for filter outcome; allows us to check all filters on each event and diagnose multiple problems at once + bool filter_pass = true; // Loop over all events in McEventCollection /// @todo Use C++ for(:) @@ -274,18 +296,17 @@ StatusCode TestHepMC::execute() { if (m_cm_energy > 0 && fabs(cmenergy - m_cm_energy) > m_cme_diff) { ATH_MSG_FATAL("Beam particles have incorrect energy: " << m_cm_energy/1000. << " GeV expected, vs. " << cmenergy/1000. << " GeV found"); setFilterPassed(false); - if (m_doHist){ - m_h_beamparticle1_Energy->Fill(beams.first->momentum().e()*1.E-03); - m_h_beamparticle2_Energy->Fill(beams.second->momentum().e()*1.E-03); - m_h_cmEnergyDiff->Fill((cmenergy-m_cm_energy)*1.E-03); - } + if (m_doHist){ + m_h_beamparticle1_Energy->Fill(beams.first->momentum().e()*1.E-03); + m_h_beamparticle2_Energy->Fill(beams.second->momentum().e()*1.E-03); + m_h_cmEnergyDiff->Fill((cmenergy-m_cm_energy)*1.E-03); + } ++m_beamEnergyCheckRate; - //return StatusCode::SUCCESS; + // Special case: this is so bad that we immediately fail out return StatusCode::FAILURE; } } - // Check vertices int vtxDisplacedstatuscode12CheckRateCnt=0; int vtxDisplacedstatuscodenot12CheckRateCnt=0; @@ -298,12 +319,13 @@ StatusCode TestHepMC::execute() { std::isnan(pos.y()) || std::isinf(pos.y()) || std::isnan(pos.z()) || std::isinf(pos.z()) ) { ATH_MSG_WARNING("NaN (Not A Number) or inf found in the event record vertex positions"); - ++m_nFail; + ++m_vtxNANandINFCheckRate; if (m_dumpEvent) (*itr)->print(); - setFilterPassed(false); - return StatusCode::SUCCESS; - } + if (m_vtxNaNTest) { + filter_pass = false; + } + } // Done of checking for nans and infinities // Check for too-far-displaced vertices // Anything which propagates macroscopically should be set stable in evgen for G4 to handle @@ -314,70 +336,66 @@ StatusCode TestHepMC::execute() { if (dist2 > m_max_dist*m_max_dist) { ATH_MSG_WARNING("Found vertex position displaced by more than " << m_max_dist << "mm: " << dist << "mm"); ++m_vtxDisplacedMoreThan_1m_CheckRateCnt; - ++m_nFail; - setFilterPassed(false); - return StatusCode::SUCCESS; + + if (m_vtxDisplacedTest) { + filter_pass = false; + } } if (dist_trans2 > m_max_dist_trans*m_max_dist_trans) { ATH_MSG_WARNING("Found vertex position displaced by more than " << m_max_dist_trans << "mm in transverse distance: " << dist_trans << "mm"); HepMC::GenVertex::particle_iterator par = (*vitr)->particles_begin(HepMC::parents); for (; par != (*vitr)->particles_end(HepMC::parents); ++par) { - // std::cout << "Outgoing particle : " << std::endl; - // (*par)->print(); ATH_MSG_WARNING("Outgoing particle : "); if (m_dumpEvent) (*par)->print(); ATH_MSG_WARNING("production vertex = " << (*par)->production_vertex()->point3d().x() << ", " << (*par)->production_vertex()->point3d().y() << ", " << (*par)->production_vertex()->point3d().z()); ATH_MSG_WARNING("end vertex = " << (*par)->end_vertex()->point3d().x() << ", " << (*par)->end_vertex()->point3d().y() << ", " << (*par)->end_vertex()->point3d().z()); ATH_MSG_WARNING("parents info: "); - // std::cout << "production vertex = " << (*par)->production_vertex()->point3d().x() << ", " << (*par)->production_vertex()->point3d().y() << ", " << (*par)->production_vertex()->point3d().z() << endl; - // std::cout << "end vertex = " << (*par)->end_vertex()->point3d().x() << ", " << (*par)->end_vertex()->point3d().y() << ", " << (*par)->end_vertex()->point3d().z() << endl; - // std::cout << << std::endl; if ((*par)->production_vertex()) { HepMC::GenVertex::particle_iterator p_parents = (*par)->production_vertex()->particles_begin(HepMC::parents); for(; p_parents != (*par)->production_vertex()->particles_end(HepMC::parents); ++p_parents) { - // cout << "\t"; - if (m_dumpEvent) (*p_parents)->print(); - ATH_MSG_WARNING("\t"); - + // cout << "\t"; + if (m_dumpEvent) (*p_parents)->print(); + ATH_MSG_WARNING("\t"); } - } + } // Done with fancy print - if ((*par)->status()==1 || (*par)->status()==2) + if ((*par)->status()==1 || (*par)->status()==2){ vtxDisplacedstatuscode12CheckRateCnt += 1; - else + } else { vtxDisplacedstatuscodenot12CheckRateCnt += 1; + } - - if (m_doHist){ - m_h_energy_dispVtxCheck->Fill((*par)->momentum().e()*1e-3); - if ((*par)->momentum().e()*1e-3 < 10.) { - m_h_energy_dispVtxCheck_lt10->Fill((*par)->momentum().e()*1e-3);} - m_h_pdgid_dispVtxCheck->Fill((*par)->pdg_id()); - m_h_status_dispVtxCheck->Fill((*par)->status()); - m_h_px_dispVtxCheck->Fill((*par)->momentum().px()*1e-3); - m_h_py_dispVtxCheck->Fill((*par)->momentum().py()*1e-3); - m_h_pz_dispVtxCheck->Fill((*par)->momentum().pz()*1e-3); - m_h_vx_dispVtxCheck->Fill((*par)->end_vertex()->point3d().x()); - m_h_vy_dispVtxCheck->Fill((*par)->end_vertex()->point3d().y()); - m_h_vz_dispVtxCheck->Fill((*par)->end_vertex()->point3d().z()); - m_h_vxprod_dispVtxCheck->Fill((*par)->production_vertex()->point3d().x()); - m_h_vyprod_dispVtxCheck->Fill((*par)->production_vertex()->point3d().y()); - m_h_vzprod_dispVtxCheck->Fill((*par)->production_vertex()->point3d().z()); - double endvx = (*par)->end_vertex()->point3d().x(); - double endvy = (*par)->end_vertex()->point3d().y(); - double endvz = (*par)->end_vertex()->point3d().z(); - double prodvx = (*par)->production_vertex()->point3d().x(); - double prodvy = (*par)->production_vertex()->point3d().y(); - double prodvz = (*par)->production_vertex()->point3d().z(); - double enddis = sqrt(endvx*endvx + endvy*endvy + endvz*endvz); - double proddis = sqrt(prodvx*prodvx + prodvy*prodvy + prodvz*prodvz); - m_h_vtxend_dispVtxCheck->Fill(enddis); - m_h_vtxprod_dispVtxCheck->Fill(proddis); - } - } - } - } + if (m_doHist){ + m_h_energy_dispVtxCheck->Fill((*par)->momentum().e()*1e-3); + if ((*par)->momentum().e()*1e-3 < 10.) { + m_h_energy_dispVtxCheck_lt10->Fill((*par)->momentum().e()*1e-3); + } + m_h_pdgid_dispVtxCheck->Fill((*par)->pdg_id()); + m_h_status_dispVtxCheck->Fill((*par)->status()); + m_h_px_dispVtxCheck->Fill((*par)->momentum().px()*1e-3); + m_h_py_dispVtxCheck->Fill((*par)->momentum().py()*1e-3); + m_h_pz_dispVtxCheck->Fill((*par)->momentum().pz()*1e-3); + m_h_vx_dispVtxCheck->Fill((*par)->end_vertex()->point3d().x()); + m_h_vy_dispVtxCheck->Fill((*par)->end_vertex()->point3d().y()); + m_h_vz_dispVtxCheck->Fill((*par)->end_vertex()->point3d().z()); + m_h_vxprod_dispVtxCheck->Fill((*par)->production_vertex()->point3d().x()); + m_h_vyprod_dispVtxCheck->Fill((*par)->production_vertex()->point3d().y()); + m_h_vzprod_dispVtxCheck->Fill((*par)->production_vertex()->point3d().z()); + double endvx = (*par)->end_vertex()->point3d().x(); + double endvy = (*par)->end_vertex()->point3d().y(); + double endvz = (*par)->end_vertex()->point3d().z(); + double prodvx = (*par)->production_vertex()->point3d().x(); + double prodvy = (*par)->production_vertex()->point3d().y(); + double prodvz = (*par)->production_vertex()->point3d().z(); + double enddis = sqrt(endvx*endvx + endvy*endvy + endvz*endvz); + double proddis = sqrt(prodvx*prodvx + prodvy*prodvy + prodvz*prodvz); + m_h_vtxend_dispVtxCheck->Fill(enddis); + m_h_vtxprod_dispVtxCheck->Fill(proddis); + } // End of the filling of histograms for bad vertices + } // End of a loop over theparents of the bad vertex + } // Found a bad vertex + } // Loop over all vertices if (vtxDisplacedstatuscode12CheckRateCnt>0) ++m_vtxDisplacedstatuscode12CheckRate; if (vtxDisplacedstatuscodenot12CheckRateCnt>0) ++m_vtxDisplacedstatuscodenot12CheckRate; @@ -389,6 +407,7 @@ StatusCode TestHepMC::execute() { const int pstatus = (*pitr)->status(); const int ppdgid = (*pitr)->pdg_id(); const int pbarcode = (*pitr)->barcode(); + // Check for NaNs and infs in momentum components if ( std::isnan(pmom.px()) || std::isinf(pmom.px()) || std::isnan(pmom.py()) || std::isinf(pmom.py()) || @@ -396,11 +415,12 @@ StatusCode TestHepMC::execute() { std::isnan(pmom.e()) || std::isinf(pmom.e()) ) { ATH_MSG_WARNING("NaN (Not A Number) or inf found in the event record momenta"); ++m_partMomentumNANandINFCheckRate; - ++m_nFail; + if (m_dumpEvent) (*pitr)->print(); - setFilterPassed(false); - return StatusCode::SUCCESS; - } + if (m_momNaNTest) { + filter_pass = false; + } + } // End of check for NaNs and infiinities // Check for undecayed pi0s if (pstatus == 1 || pstatus == 2) { @@ -408,7 +428,7 @@ StatusCode TestHepMC::execute() { unDecPi0.push_back( pbarcode); ++m_undecayedPi0CheckRate; } - } + } // End of check for undecayed pi0s //check stable particle lifetimes if (pstatus == 1) { @@ -417,63 +437,65 @@ StatusCode TestHepMC::execute() { double plifetime = pd->lifetime()*1e+12; // why lifetime doesn't come in common units??? if (plifetime != 0 && plifetime < m_min_tau) { // particles with infinite lifetime get a 0 in the PDT ATH_MSG_WARNING("Stable particle found with lifetime = " << plifetime << "~ns!!"); - if (m_dumpEvent) (*pitr)->print(); + if (m_dumpEvent) (*pitr)->print(); ++m_Status1ShortLifetime; - ++m_nFail; - setFilterPassed(false); - return StatusCode::SUCCESS; - } - } + + if (m_lifeTimeTest) { + filter_pass = false; + } + } // Particle did not have infinite lifetime + } // The particle has a data table (so a lifetime) else{ int susyPart = 0; vector<int>::size_type count = 0; while (susyPart==0 && (count < m_SusyPdgID_tab.size() )){ - // no warning for SUSY particles from the list susyParticlePdgid.txt + // no warning for SUSY particles from the list susyParticlePdgid.txt if (m_SusyPdgID_tab[count] == abs(ppdgid)) { - // cout << "susy particle " << ppdgid << endl; susyPart=1; - } + } count++; - } - if (susyPart==0){ + } // Look through the SUSY table to see if this one should be counted + if (susyPart==0){ ATH_MSG_WARNING("Stable particle not found in PDT, no lifetime check done"); - if (m_dumpEvent) (*pitr)->print(); - - } - } - } + if (m_dumpEvent) (*pitr)->print(); + } // It's a SUSY particle -- skip the lifetime check + } // The particle has no data table + } // Test if the particle is stable //Check that stable particles are known by G4 or they are non-interacting HepPDT::ParticleID pid(ppdgid); int first_dig = ppdgid; - while(first_dig > 9) first_dig /= 10; - + while (first_dig > 9) first_dig /= 10; + if ((pstatus == 1 ) && (!(*pitr)->end_vertex()) && (!m_nonint.operator()(*pitr)) && (!pid.isNucleus()) && (first_dig != 9) ) { - int known_byG4 = 0; - vector<int>::size_type count =0; + int known_byG4 = 0; + vector<int>::size_type count =0; + while (known_byG4==0 && count < m_G4pdgID_tab.size()){ + if(ppdgid == m_G4pdgID_tab[count]) known_byG4=1; + count++; + } + if(known_byG4==0){ + nonG4_energy += pmom.e(); + ATH_MSG_WARNING("Interacting particle not known by Geant4 with ID " << ppdgid); + } + } // End of check that stable particles are known to G4 or are non-interacting - while (known_byG4==0 && count < m_G4pdgID_tab.size()){ -// std::cout<< "G4 pdgid " << m_G4pdgID_tab[count] << std::endl; - if(ppdgid == m_G4pdgID_tab[count]) known_byG4=1; - count++; - } - if(known_byG4==0){ - nonG4_energy += pmom.e(); - ATH_MSG_WARNING("Interacting particle not known by Geant4 with ID " << ppdgid); - } - } + // Check for bad PDG IDs + if (!MC::PID::isValid(ppdgid)){ + ATH_MSG_WARNING("Invalid PDG ID found: " << ppdgid); + if (m_unknownPDGIDTest && std::find(m_uknownPDGID_tab.begin(),m_uknownPDGID_tab.end(),ppdgid)!=m_uknownPDGID_tab.end()){ + filter_pass = false; + } + } // End of check for invalid PDG IDs - // Check for unstables with no end vertex, such as undecayed gluons, Ws, Zs, and h [not status 3 to avoid probles with photos] - if (!(*pitr)->end_vertex() && - ( ( std::find( m_vertexStatuses.begin(), m_vertexStatuses.end(), pstatus ) == m_vertexStatuses.end() ) - || - ((abs(ppdgid) == 23 || ppdgid == 24 || ppdgid == 25) && pstatus != 3))) { + // Check for unstables with no end vertex, + if (!(*pitr)->end_vertex() && pstatus == 2) { unstNoEnd.push_back(pbarcode); ++m_unstableNoEndVtxCheckRate; - } + } // End of check for unstable with no end vertex // Sum final state mom/energy, and note negative energy / tachyonic particles // std::cout << "status " << pstatus << " e " << pmom.e() << " pz " << pmom.pz()<< std::endl; @@ -482,13 +504,16 @@ StatusCode TestHepMC::execute() { totalPy += pmom.py(); totalPz += pmom.pz(); totalE += pmom.e(); - if (pmom.e() < 0) {negEnPart.push_back(pbarcode); ++m_negativeEnergyTachyonicCheckRate;} + if (pmom.e() < 0) { + negEnPart.push_back(pbarcode); + ++m_negativeEnergyTachyonicCheckRate; + } const double aener = fabs(pmom.e()); if ( aener+m_accur_margin < fabs(pmom.px()) || aener+m_accur_margin < fabs(pmom.py()) || aener+m_accur_margin < fabs(pmom.pz()) ) { tachyons.push_back(pbarcode); ++m_negativeEnergyTachyonicCheckRate; } - } + } // End of sums for momentum and energy conservation // Decay checks (uses PdgToSearch attr value, for tau by default) /// @todo Clean up / improve / apply to *all* decaying species @@ -514,14 +539,14 @@ StatusCode TestHepMC::execute() { //most taus should not decay immediately const HepMC::FourVector tau_decaypos = vtx->position(); const double tau_displacement = tau_decaypos.x()*tau_decaypos.x() + tau_decaypos.y()*tau_decaypos.y() + tau_decaypos.z()*tau_decaypos.z(); - //tau_child!=1 exclude cases in which a tau is copied to another vertex or emits a photon + //tau_child != 1 exclude cases in which a tau is copied to another vertex or emits a photon if ((tau_displacement < 1.e-6) && (tau_child!=1)) ++m_FastDecayedTau; } else { ATH_MSG_WARNING("UNDECAYED PARTICLE WITH PDG_ID = " << m_pdg); ++m_decayCheckRate; if (m_dumpEvent) (*itr)->print(); } - } + } // End of checks for specific particle (tau by default) // Check for undisplaced decay daughters from long-lived hadrons if ((*pitr)->end_vertex()) { @@ -544,10 +569,10 @@ StatusCode TestHepMC::execute() { << " @ " << displacement << "mm)"); undisplaceds.push_back(pbarcode2); ++m_undisplacedLLHdaughtersCheckRate; - } - } - } - } + } // Check for displacement below 1 um + } // Loop over all particles coming from the decay vertex + } // Displacement of greater than 1 um + } // End of check for undisplaced decay daughters from long-lived hadrons // Check for photons with non-zero masses /// @todo Persuade generator authors to set proper generated masses in HepMC, then *really* require mass = 0 @@ -557,132 +582,147 @@ StatusCode TestHepMC::execute() { ATH_MSG_WARNING("Photon with non-zero mass found! Mass: " << mass << " MeV, BARCODE=" << pbarcode); ++m_nonZeroPhotonMassCheckRate; } - } + } // End check for photons with too-large a mass - } + } // End of loop over particles in the event // Energy of interacting particles not known by Geant4 if(nonG4_energy > m_nonG4_energy_threshold) { ATH_MSG_WARNING("The energy of interacting particles not known by Geant4 is = " << nonG4_energy << " MeV"); - setFilterPassed(false); + if (m_energyG4Test) { + filter_pass = false; + } ++m_nonG4_energyCheckRate; - ++m_nFail; - return StatusCode::SUCCESS; - } + } // End of check for interacting particles not known by G4 // Energy balance double lostE = fabs(totalE - cmenergy); if (lostE > m_energy_diff) { ATH_MSG_WARNING("ENERGY BALANCE FAILED : E-difference = " << lostE << " MeV"); - // std::cout << "balance " << totalPx << " " << totalPy << " " << totalPz << " " << totalE << std::endl; ATH_MSG_WARNING("balance " << totalPx << " " << totalPy << " " << totalPz << " " << totalE); - if (m_doHist){ - m_h_energyImbalance->Fill(lostE*1.E-03); - // std::cout << "hidt filled " << std::endl; - } + if (m_doHist){ + m_h_energyImbalance->Fill(lostE*1.E-03); + } if (m_dumpEvent) (*itr)->print(); - setFilterPassed(false); + if (m_energyImbalanceTest) { + filter_pass = false; + } ++m_energyBalanceCheckRate; - ++m_nFail; - return StatusCode::SUCCESS; - } + } // End of energy balance check // Momentum balance if ( fabs(totalPx) > m_energy_diff || fabs(totalPy) > m_energy_diff || fabs(totalPz) > m_energy_diff ) { ATH_MSG_WARNING("MOMENTUM BALANCE FAILED : SumPx = " << totalPx << " SumPy = " << totalPy << " SumPz = " << totalPz << " MeV"); - //if (m_dumpEvent || fabs(totalPx) > m_max_energy_diff || fabs(totalPy) > m_max_energy_diff || fabs(totalPz) > m_max_energy_diff) (*itr)->print(); - if (m_doHist){ - m_h_momentumImbalance_px->Fill(fabs(totalPx)*1.E-03); - m_h_momentumImbalance_py->Fill(fabs(totalPy)*1.E-03); - m_h_momentumImbalance_pz->Fill(fabs(totalPz)*1.E-03); - } + if (m_doHist){ + m_h_momentumImbalance_px->Fill(fabs(totalPx)*1.E-03); + m_h_momentumImbalance_py->Fill(fabs(totalPy)*1.E-03); + m_h_momentumImbalance_pz->Fill(fabs(totalPz)*1.E-03); + } if (m_dumpEvent) (*itr)->print(); - setFilterPassed(false); + if (m_momImbalanceTest) { + filter_pass = false; + } ++m_momentumBalanceCheckRate; - ++m_nFail; - return StatusCode::SUCCESS; - } + } // End of momentum balance check // Negative energy particles if (!negEnPart.empty()) { stringstream ss; ss << "NEGATIVE ENERGY PARTICLES FOUND : BARCODES ="; - for (vector<int>::const_iterator b = negEnPart.begin(); b != negEnPart.end(); ++b) + for (vector<int>::const_iterator b = negEnPart.begin(); b != negEnPart.end(); ++b){ ss << " " << *b; + } ATH_MSG_WARNING(ss.str()); if (m_dumpEvent) (*itr)->print(); - setFilterPassed(false); + if (m_negativeEnergyTest) { + filter_pass = false; + } ++m_negativeEnergyCheckRate; - ++m_nFail; - return StatusCode::SUCCESS; - } + } // End of negative energy particle chedk // Tachyons if (!tachyons.empty()) { stringstream ss; ss << "PARTICLES WITH |E| < |Pi| (i=x,y,z) FOUND : BARCODES ="; - for (vector<int>::const_iterator b = tachyons.begin(); b != tachyons.end(); ++b) + for (vector<int>::const_iterator b = tachyons.begin(); b != tachyons.end(); ++b){ ss << " " << *b; + } ATH_MSG_WARNING(ss.str()); if (m_dumpEvent) (*itr)->print(); - setFilterPassed(false); + if (m_tachyonsTest) { + filter_pass = false; + } ++m_energyBalanceCheckRate; - ++m_nFail; - return StatusCode::SUCCESS; - } + } // End of tachyon check // Unstable particles with no decay vertex if (!unstNoEnd.empty()) { stringstream ss; ss << "Unstable particle with no decay vertex found: BARCODES ="; - for (vector<int>::const_iterator b = unstNoEnd.begin(); b != unstNoEnd.end(); ++b) + for (vector<int>::const_iterator b = unstNoEnd.begin(); b != unstNoEnd.end(); ++b){ ss << " " << *b; + } ATH_MSG_WARNING(ss.str()); if (m_dumpEvent) (*itr)->print(); - setFilterPassed(false); + if (m_unstableNoVtxTest) { + filter_pass = false; + } ++m_unstablePartNoDecayVtxCheckRate; - ++m_nFail; - return StatusCode::SUCCESS; - } + } // End of unstable particle with no decay vertex check // Undecayed pi0 if (!unDecPi0.empty()) { stringstream ss; ss << "pi0 with no decay vertex found: BARCODES ="; - for (vector<int>::const_iterator b = unDecPi0.begin(); b != unDecPi0.end(); ++b) + for (vector<int>::const_iterator b = unDecPi0.begin(); b != unDecPi0.end(); ++b){ ss << " " << *b; + } ATH_MSG_WARNING(ss.str()); if (m_dumpEvent) (*itr)->print(); - setFilterPassed(false); + if (m_pi0NoVtxTest) { + filter_pass = false; + } ++m_undecayedPi0CheckRate; - ++m_nFail; - return StatusCode::SUCCESS; - } + } // End of undecayed pi0 check // Undisplaced decay daughters of displaced vertices if (!undisplaceds.empty()) { stringstream ss; ss << "Undisplaced decay vertices from displaced particle: BARCODES ="; - for (vector<int>::const_iterator b = undisplaceds.begin(); b != undisplaceds.end(); ++b) + for (vector<int>::const_iterator b = undisplaceds.begin(); b != undisplaceds.end(); ++b){ ss << " " << *b; + } ATH_MSG_WARNING(ss.str()); if (m_dumpEvent) (*itr)->print(); - setFilterPassed(false); + if (m_undisplacedDaughtersTest) { + filter_pass = false; + } ++m_undisplacedDecayDaughtersOfDisplacedVtxCheckRate; - ++m_nFail; - return StatusCode::SUCCESS; - } + } // End of undisplaced decay daughter of displaced vertices check - } + } // End of loop over MCEventCollection - // End of execution for each event - ++m_nPass; + // End of execution for each event - update filter value + if (!filter_pass){ + setFilterPassed(false); + ++m_nFail; + } else { + ++m_nPass; + } - return StatusCode::SUCCESS; + // If the efficiency after 100 events is below 10%, there is an important bug going on: + // we fail the job immediately so it doesn't run for ever + const double tmp_efficiency = double(m_nPass) / double(m_nPass + m_nFail); + if ((m_nPass + m_nFail) > 100 && tmp_efficiency < 0.1) { + ATH_MSG_FATAL("The efficiency after " << m_nPass + m_nFail << " events is " << tmp_efficiency*100. << "% !!!"); + return StatusCode::FAILURE; } + return StatusCode::SUCCESS; +} + StatusCode TestHepMC::finalize() { @@ -692,10 +732,12 @@ StatusCode TestHepMC::finalize() { ATH_MSG_INFO(" Event rate with beam particles and status not equal to 4 = " << m_beamParticleswithStatusNotFourCheckRate*100.0/double(m_nPass + m_nFail) << "% (not included in test efficiency)"); ATH_MSG_INFO(" Event rate with incorrect beam particle energies = " << m_beamEnergyCheckRate*100.0/double(m_nPass + m_nFail) << "% (not included in test efficiency)"); ATH_MSG_INFO(" Event rate with NaN (Not A Number) or inf found in the event record vertex positions = " << m_vtxNANandINFCheckRate*100.0/double(m_nPass + m_nFail) << "%"); - ATH_MSG_INFO(" Event rate with vertices displaced more than " << m_max_dist_trans << "~mm in transverse direction for particles with status codes 1 and 2 = " << m_vtxDisplacedstatuscode12CheckRate*100.0/double(m_nPass + m_nFail) << "% (not included in test efficiency)"); + if (!m_vtxNaNTest) ATH_MSG_INFO(" The check for NaN or inf in vtx. record is switched off, so is not included in the final TestHepMC efficiency "); ATH_MSG_INFO(" Event rate with vertices displaced more than " << m_max_dist_trans << "~mm in transverse direction for particles with status code other than 1 and 2 = " << m_vtxDisplacedstatuscodenot12CheckRate*100.0/double(m_nPass + m_nFail) << "% (not included in test efficiency)"); ATH_MSG_INFO(" Event rate with vertices displaced more than " << m_max_dist << "~mm = " << m_vtxDisplacedMoreThan_1m_CheckRateCnt*100.0/double(m_nPass + m_nFail) << "%"); + if (!m_vtxDisplacedTest) ATH_MSG_INFO(" The check for displaced vertices is switched off, so is not included in the final TestHepMC efficiency "); ATH_MSG_INFO(" Event rate with NAN (Not A Number) or inf found in particle momentum values = " << m_partMomentumNANandINFCheckRate*100.0/double(m_nPass + m_nFail) << "%"); + if (!m_momNaNTest) ATH_MSG_INFO(" The check for NaN/inf in momentum record is switched off, so is not included in the final TestHepMC efficiency "); ATH_MSG_INFO(" Event rate with undecayed pi0's with status 1 or 2 = " << m_undecayedPi0statuscode12CheckRate*100.0/double(m_nPass + m_nFail) << "% (not included in test efficiency)"); ATH_MSG_INFO(" Event rate with unstable particles with no end vertex = " << m_unstableNoEndVtxCheckRate*100.0/double(m_nPass + m_nFail) << "% (not included in test efficiency)"); ATH_MSG_INFO(" Event rate with negative total energy like for tachyonic particles = " << m_negativeEnergyTachyonicCheckRate*100.0/double(m_nPass + m_nFail) << "% (not included in test efficiency)"); @@ -703,16 +745,27 @@ StatusCode TestHepMC::finalize() { ATH_MSG_INFO(" Event rate with undisplaced daughters of long lived hadrons = " << m_undisplacedLLHdaughtersCheckRate*100.0/double(m_nPass + m_nFail) << "% (not included in test efficiency)"); ATH_MSG_INFO(" Event rate with non zero photon mass = " << m_nonZeroPhotonMassCheckRate*100.0/double(m_nPass + m_nFail) << "% (not included in test efficiency)"); ATH_MSG_INFO(" Event rate with no energy balance = " << m_energyBalanceCheckRate*100.0/double(m_nPass + m_nFail) << "%"); + if (!m_energyImbalanceTest) ATH_MSG_INFO(" The check for energy imbalance is switched off, so is not included in the final TestHepMC efficiency "); ATH_MSG_INFO(" Event rate with no momentum balance = " << m_momentumBalanceCheckRate*100.0/double(m_nPass + m_nFail) << "%"); + if (!m_momImbalanceTest) ATH_MSG_INFO(" The check for momentum imbalance is switched off, so is not included in the final TestHepMC efficiency "); ATH_MSG_INFO(" Event rate with negative energy particles = " << m_negativeEnergyCheckRate*100.0/double(m_nPass + m_nFail) << "%"); + if (!m_negativeEnergyTest) ATH_MSG_INFO(" The check for particles with negative energy is switched off, so is not included in the final TestHepMC efficiency "); ATH_MSG_INFO(" Event rate with tachyons = " << m_tachyonCheckRate*100.0/double(m_nPass + m_nFail) << "%"); + if (!m_tachyonsTest) ATH_MSG_INFO(" The check for tachyons is switched off, so is not included in the final TestHepMC efficiency "); ATH_MSG_INFO(" Event rate with stable or unstable particles with no parents = " << m_stableUnstableNoParentCheckRate*100.0/double(m_nPass + m_nFail) << "%"); ATH_MSG_INFO(" Event rate with unstable particle with no decay vertex = " << m_unstablePartNoDecayVtxCheckRate*100.0/double(m_nPass + m_nFail) << "%"); + if (!m_unstableNoVtxTest) ATH_MSG_INFO(" The check for unstable part. without end vertex is switched off, so is not included in the final TestHepMC efficiency "); ATH_MSG_INFO(" Event rate with undecayed Pi0's = " << m_undecayedPi0CheckRate*100.0/double(m_nPass + m_nFail) << "%"); + if (!m_pi0NoVtxTest) ATH_MSG_INFO(" The check for undecayed pi0's is switched off, so is not included in the final TestHepMC efficiency "); ATH_MSG_INFO(" Event rate with undisplaced decay daughters of displaced vertices = " << m_undisplacedDecayDaughtersOfDisplacedVtxCheckRate*100.0/double(m_nPass + m_nFail) << "%"); + if (!m_undisplacedDaughtersTest) ATH_MSG_INFO(" The check for undisplaced daughters is switched off, so is not included in the final TestHepMC efficiency "); ATH_MSG_INFO(" Event rate with particles with status 1 but lifetime < " << m_min_tau << "~ns = " << m_Status1ShortLifetime*100.0/double(m_nPass + m_nFail) << "%"); + if (!m_lifeTimeTest) ATH_MSG_INFO(" The check for status 1 particles with too short lifetime is switched off, so is not included in the final TestHepMC efficiency "); ATH_MSG_INFO(" Event rate with energy sum of interacting particles non known by Geant4 above " << m_nonG4_energy_threshold << " MeV = " << m_nonG4_energyCheckRate*100.0/double(m_nPass + m_nFail) << "%"); - + if (!m_energyG4Test) ATH_MSG_INFO(" The check for energy not known by G4 is switched off, so is not included in the final TestHepMC efficiency "); + ATH_MSG_INFO(" Event rate with unknown PDG IDs " << m_unknownPDGIDCheckRate*100.0/double(m_nPass+m_nFail) << "%"); + if (!m_unknownPDGIDTest) ATH_MSG_INFO(" The check for unknown PDG IDs is sitched off, so it is not included in the final TestHepMC efficiency "); + const double tau_fastDrate = double(m_FastDecayedTau) / double(m_TotalTaus); if(tau_fastDrate > m_tau_eff_threshold){ ATH_MSG_FATAL("MORE THAN " << 100.*m_tau_eff_threshold << "% OF TAUS DECAYING IMMEDIATELY! " << m_FastDecayedTau << " found, out of: " << m_TotalTaus); diff --git a/Generators/EvgenProdTools/src/components/EvgenProdTools_entries.cxx b/Generators/EvgenProdTools/src/components/EvgenProdTools_entries.cxx index eae9b630136..eed57fac101 100644 --- a/Generators/EvgenProdTools/src/components/EvgenProdTools_entries.cxx +++ b/Generators/EvgenProdTools/src/components/EvgenProdTools_entries.cxx @@ -12,3 +12,4 @@ DECLARE_COMPONENT( TestHepMC ) DECLARE_COMPONENT( EvgenOTFTopUpSvc ) DECLARE_COMPONENT( SimTimeEstimate ) + diff --git a/Generators/Herwig7_i/CMakeLists.txt b/Generators/Herwig7_i/CMakeLists.txt index 8616fea38e7..9a200b44ec8 100644 --- a/Generators/Herwig7_i/CMakeLists.txt +++ b/Generators/Herwig7_i/CMakeLists.txt @@ -1,4 +1,3 @@ -# $Id$ ################################################################################ # Package: Herwig7_i ################################################################################ @@ -15,36 +14,40 @@ atlas_depends_on_subdirs( GaudiKernel Tools/PathResolver ) -#set( THEPEG_LCGVERSION 2.1.4 ) -#set( THEPEG_LCGROOT -# /cvmfs/sft.cern.ch/lcg/releases/LCG_94/MCGenerators/thepeg/${THEPEG_LCGVERSION}/${LCG_PLATFORM}/ ) -# -#set( HERWIG3_LCGVERSION 7.1.4 ) -#set( HERWIG3_LCGROOT -# /cvmfs/sft.cern.ch/lcg/releases/LCG_94/MCGenerators/herwig++/${HERWIG3_LCGVERSION}/${LCG_PLATFORM}/ ) - # External dependencies: find_package( Boost ) -find_package( Herwig3 ) +find_package( Herwig3 COMPONENTS HerwigAPI ) find_package( ThePEG ) find_package( GSL ) +# find_package( OpenLoops ) +find_package( VBFNLO ) # Remove the --as-needed linker flags: atlas_disable_as_needed() +# Add extra flag for H7 versions >=7.2 +set( _extraDefs ) +if(DEFINED HW3_VER_IS_72) + set( _extraDefs -DHWVER_IS_72=\"${HW3_VER_IS_72}\" ) +endif() + # Component(s) in the package: atlas_add_component( Herwig7_i Herwig7_i/*.h src/*.cxx src/components/*.cxx INCLUDE_DIRS ${Boost_INCLUDE_DIRS} ${HERWIG3_INCLUDE_DIRS} - ${THEPEG_INCLUDE_DIRS} ${GSL_INCLUDE_DIRS} - PRIVATE_DEFINITIONS -DHWVERSION=\"${HERWIG7_VERSION}\" - LINK_LIBRARIES ${HERWIG3_LCGROOT}/lib/Herwig/libHerwigAPI.so ${Boost_LIBRARIES} ${HERWIG7_LIBRARIES} ${THEPEG_LIBRARIES} ${GSL_LIBRARIES} + ${THEPEG_INCLUDE_DIRS} ${GSL_INCLUDE_DIRS} ${VBFNLO_INCLUDE_DIRS} + DEFINITIONS -DHWVERSION=\"${HERWIG3_LCGVERSION}\" ${_extraDefs} + LINK_LIBRARIES ${HERWIG3_LIBRARIES} ${Boost_LIBRARIES} + ${THEPEG_LIBRARIES} ${GSL_LIBRARIES} ${VBFNLO_LIBRARIES} GeneratorModulesLib EventInfo GaudiKernel PathResolver ) +# ${OPENLOOPS_INCLUDE_DIRS} ${OPENLOOPS_LIBRARIES} # Install files from the package: atlas_install_python_modules( python/*.py ) -atlas_install_joboptions( share/*.py ) +atlas_install_joboptions( share/common/*.py ) +atlas_install_runtime( share/file/*.pdt share/file/*.dat ) +# Set up some environment variables for Herwig. set( Herwig7Environment_DIR ${CMAKE_CURRENT_SOURCE_DIR} - CACHE PATH "Location of HerwigppEnvironment.cmake" ) + CACHE PATH "Location of Herwig7Environment.cmake" ) find_package( Herwig7Environment ) diff --git a/Generators/Herwig7_i/Herwig7EnvironmentConfig.cmake b/Generators/Herwig7_i/Herwig7EnvironmentConfig.cmake index e493c244488..fa6bd36e709 100644 --- a/Generators/Herwig7_i/Herwig7EnvironmentConfig.cmake +++ b/Generators/Herwig7_i/Herwig7EnvironmentConfig.cmake @@ -6,17 +6,14 @@ # Set the environment variable(s): find_package( Herwig3 ) -find_package ( ThePEG ) +find_package( ThePEG ) if( HERWIG3_FOUND AND THEPEG_FOUND ) - get_filename_component( _herwig3Path "${HERWIG3_LCGROOT}" DIRECTORY ) - set( HERWIG7ENVIRONMENT_ENVIRONMENT - FORCESET HERWIG7_PATH ${_herwig3Path}/${LCG_PLATFORM} - FORCESET HERWIG7VER ${HERWIG3_LCGVERSION} + set( HERWIG7ENVIRONMENT_ENVIRONMENT + FORCESET HERWIG7_PATH ${HERWIG3_LCGROOT} + FORCESET HERWIG7VER ${HERWIG3_LCGVERSION} FORCESET THEPEGVER ${THEPEG_LCGVERSION}) - unset( _herwig3Path ) endif() # Silently declare the module found: set( HERWIG7ENVIRONMENT_FOUND TRUE ) - diff --git a/Generators/Herwig7_i/Herwig7_i/Herwig7.h b/Generators/Herwig7_i/Herwig7_i/Herwig7.h index 8ca89533c42..cd781573a50 100644 --- a/Generators/Herwig7_i/Herwig7_i/Herwig7.h +++ b/Generators/Herwig7_i/Herwig7_i/Herwig7.h @@ -1,8 +1,7 @@ -// -*- C++ -*- - /* Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration */ +// -*- C++ -*- /*! \file Herwig7.h * \brief Athena interface for the %Herwig7 generator @@ -78,7 +77,11 @@ public: virtual unsigned int jobSize() const { return(m_jobsize); } /// The number of subprocesses to integrate per integratoin job virtual unsigned int maxJobs() const { return(m_maxjobs); } /// The maximum number of integration jobs + /// Bail out and print usage information virtual void quitWithHelp() const { + std::cerr << "=================================\n"; + std::cerr << "HERE I CAN PUT SOME ERROR MESSAGE\n"; + std::cerr << "=================================\n"; ThePEG::Repository::cleanup(); exit( EXIT_FAILURE ); } diff --git a/Generators/Herwig7_i/doc/mainpage.h b/Generators/Herwig7_i/doc/mainpage.h index a8e97ca5b82..b468f6c8614 100644 --- a/Generators/Herwig7_i/doc/mainpage.h +++ b/Generators/Herwig7_i/doc/mainpage.h @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration */ /** diff --git a/Generators/Herwig7_i/python/Herwig7Config.py b/Generators/Herwig7_i/python/Herwig7Config.py index 71723c4d65d..8f2ed3b366e 100644 --- a/Generators/Herwig7_i/python/Herwig7Config.py +++ b/Generators/Herwig7_i/python/Herwig7Config.py @@ -433,3 +433,5 @@ set /Herwig/Particles/pbar-:PDF /Herwig/Partons/BudnevPDF set /Herwig/Generators/EventGenerator:EventHandler:CascadeHandler:MPIHandler NULL """ + + diff --git a/Generators/Herwig7_i/python/Herwig7ConfigFxFx.py b/Generators/Herwig7_i/python/Herwig7ConfigFxFx.py index b7a6ef5d354..c85bf5ffc6b 100644 --- a/Generators/Herwig7_i/python/Herwig7ConfigFxFx.py +++ b/Generators/Herwig7_i/python/Herwig7ConfigFxFx.py @@ -1,7 +1,5 @@ #! /usr/bin/env python -## Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration - ## \file Herwig7ConfigFxFx.py ## \brief Configuration class for showering FxFx-merged LHE files from MG5_aMC@NLO ## \author Krishna Kulkarni (krishna.kulkarni@cern.ch) diff --git a/Generators/Herwig7_i/python/Herwig7ConfigGeneric.py b/Generators/Herwig7_i/python/Herwig7ConfigGeneric.py index 29e880b467a..ea7a388cc1d 100644 --- a/Generators/Herwig7_i/python/Herwig7ConfigGeneric.py +++ b/Generators/Herwig7_i/python/Herwig7ConfigGeneric.py @@ -1,7 +1,5 @@ #! /usr/bin/env python -## Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration - ## \file Herwig7ConfigGeneric.py ## \brief Python class for reproducing standalone runs inside of athena diff --git a/Generators/Herwig7_i/python/Herwig7ConfigLHEF.py b/Generators/Herwig7_i/python/Herwig7ConfigLHEF.py index 7bd132f0324..9fcb055a8bf 100644 --- a/Generators/Herwig7_i/python/Herwig7ConfigLHEF.py +++ b/Generators/Herwig7_i/python/Herwig7ConfigLHEF.py @@ -1,7 +1,5 @@ #! /usr/bin/env python -## Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration - ## \file Herwig7ConfigLHEF.py ## \brief Configuration class for showering LHE files from MG5_aMC@NLO or PowhegBox ## \author Daniel Rauch (daniel.rauch@desy.de) diff --git a/Generators/Herwig7_i/python/Herwig7ConfigMatchbox.py b/Generators/Herwig7_i/python/Herwig7ConfigMatchbox.py index a08173615f7..518824b5a48 100644 --- a/Generators/Herwig7_i/python/Herwig7ConfigMatchbox.py +++ b/Generators/Herwig7_i/python/Herwig7ConfigMatchbox.py @@ -1,7 +1,5 @@ #! /usr/bin/env python -## Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration - ## \file Herwig7ConfigMatchbox.py ## \brief Configuration class for Matchbox runs with %Herwig7 ## \author Daniel Rauch (daniel.rauch@desy.de) @@ -237,7 +235,8 @@ class Hw7ConfigMatchbox(hw7Config.Hw7Config): GoSam_path = os.environ['GOSAM_PATH'] except: # \todo Get rid of this and just use the environment variable `GOSAMPATH` - GoSam_path = '/afs/.cern.ch/sw/lcg/external/MCGenerators_lcgcmt67c/gosam/2.0.3/x86_64-slc6-gcc47-opt' + GoSam_path = '/cvmfs/sft.cern.ch/lcg/releases/LCG_88/MCGenerators/gosam/2.0.4/x86_64-slc6-gcc62-opt' + os.environ["LD_LIBRARY_PATH"]="/cvmfs/sft.cern.ch/lcg/releases/LCG_88/MCGenerators/gosam/2.0.4/x86_64-slc6-gcc62-opt/lib:"+os.environ["LD_LIBRARY_PATH"] athMsgLog.warn(hw7Utils.ansi_format_warning("Falling back to hard-coded GoSam installation location at '{}' - please ensure that the GOSAM_PATH environment variable is correctly set".format(GoSam_path))) if not os.path.isfile(os.path.join(GoSam_path, 'bin', 'gosam.py')): athMsgLog.warn(hw7Utils.ansi_format_warning("The GoSam installation can't be found from $GOSAMPATH = {}, so don't be surprised if your run crashes in you are using matrix elements from GoSam in Herwig7 / Matchbox. Please ensure that the location exists, that you have permissions to access it and that it contains the script 'bin/gosam.py'".format(GoSam_path))) @@ -245,7 +244,8 @@ class Hw7ConfigMatchbox(hw7Config.Hw7Config): try: OpenLoops_path= os.environ['OPENLOOPS_PATH'] except: - OpenLoops_path = '/afs/.cern.ch/sw/lcg/releases/MCGenerators/openloops/1.3.1-1f1f6/x86_64-slc6-gcc49-opt' + OpenLoops_path = '/cvmfs/sft.cern.ch/lcg/releases/LCG_88/MCGenerators/openloops/2.0.0/x86_64-slc6-gcc62-opt' + os.environ["LD_LIBRARY_PATH"]="/cvmfs/sft.cern.ch/lcg/releases/LCG_88/MCGenerators/openloops/2.0.0/x86_64-slc6-gcc62-opt/lib:"+os.environ["LD_LIBRARY_PATH"] athMsgLog.warn(hw7Utils.ansi_format_warning("Falling back to hard-coded OPENLOOPS installation location at '{}' - please ensure that the OPENLOOPS_PATH environment variable is correctly set".format(OpenLoops_path))) if not os.path.isdir(os.path.join(OpenLoops_path, "proclib")): athMsgLog.warn(hw7Utils.ansi_format_warning("The OpenLoops process libraries can't be found from $OPENLOOPS_PATH = {}".format(OpenLoops_path))) diff --git a/Generators/Herwig7_i/python/Herwig7ConfigMerging.py b/Generators/Herwig7_i/python/Herwig7ConfigMerging.py index 9980dade7c1..c45e2f559a7 100644 --- a/Generators/Herwig7_i/python/Herwig7ConfigMerging.py +++ b/Generators/Herwig7_i/python/Herwig7ConfigMerging.py @@ -1,7 +1,5 @@ #! /usr/bin/env python -## Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration - ## \file Herwig7ConfigMatchbox.py ## \brief Configuration class for Matchbox runs with %Herwig7 ## \author Daniel Rauch (daniel.rauch@desy.de) @@ -237,7 +235,8 @@ class Hw7ConfigMerging(hw7Config.Hw7Config): GoSam_path = os.environ['GOSAM_PATH'] except: # \todo Get rid of this and just use the environment variable `GOSAMPATH` - GoSam_path = '/afs/.cern.ch/sw/lcg/external/MCGenerators_lcgcmt67c/gosam/2.0.3/x86_64-slc6-gcc47-opt' + GoSam_path = '/cvmfs/sft.cern.ch/lcg/releases/LCG_88/MCGenerators/gosam/2.0.4/x86_64-slc6-gcc62-opt' + os.environ["LD_LIBRARY_PATH"]="/cvmfs/sft.cern.ch/lcg/releases/LCG_88/MCGenerators/gosam/2.0.4/x86_64-slc6-gcc62-opt/lib:"+os.environ["LD_LIBRARY_PATH"] athMsgLog.warn(hw7Utils.ansi_format_warning("Falling back to hard-coded GoSam installation location at '{}' - please ensure that the GOSAM_PATH environment variable is correctly set".format(GoSam_path))) if not os.path.isfile(os.path.join(GoSam_path, 'bin', 'gosam.py')): athMsgLog.warn(hw7Utils.ansi_format_warning("The GoSam installation can't be found from $GOSAMPATH = {}, so don't be surprised if your run crashes in you are using matrix elements from GoSam in Herwig7 / Matchbox. Please ensure that the location exists, that you have permissions to access it and that it contains the script 'bin/gosam.py'".format(GoSam_path))) @@ -245,7 +244,8 @@ class Hw7ConfigMerging(hw7Config.Hw7Config): try: OpenLoops_path= os.environ['OPENLOOPS_PATH'] except: - OpenLoops_path = '/afs/.cern.ch/sw/lcg/releases/MCGenerators/openloops/1.3.1-1f1f6/x86_64-slc6-gcc49-opt' + OpenLoops_path = '/cvmfs/sft.cern.ch/lcg/releases/LCG_88/MCGenerators/openloops/2.0.0/x86_64-slc6-gcc62-opt' + os.environ["LD_LIBRARY_PATH"]="/cvmfs/sft.cern.ch/lcg/releases/LCG_88/MCGenerators/openloops/2.0.0/x86_64-slc6-gcc62-opt/lib:"+os.environ["LD_LIBRARY_PATH"] athMsgLog.warn(hw7Utils.ansi_format_warning("Falling back to hard-coded OPENLOOPS installation location at '{}' - please ensure that the OPENLOOPS_PATH environment variable is correctly set".format(OpenLoops_path))) if not os.path.isdir(os.path.join(OpenLoops_path, "proclib")): athMsgLog.warn(hw7Utils.ansi_format_warning("The OpenLoops process libraries can't be found from $OPENLOOPS_PATH = {}".format(OpenLoops_path))) diff --git a/Generators/Herwig7_i/python/Herwig7Control.py b/Generators/Herwig7_i/python/Herwig7Control.py index d03f2f44891..ccf5588af6b 100644 --- a/Generators/Herwig7_i/python/Herwig7Control.py +++ b/Generators/Herwig7_i/python/Herwig7Control.py @@ -484,3 +484,4 @@ def exit_banner(gridpack, cross_section, cross_section_error): banner += "## ##\n" banner += "##########################################################################################\n" return(banner) + diff --git a/Generators/Herwig7_i/python/Herwig7Utils.py b/Generators/Herwig7_i/python/Herwig7Utils.py index 1f021fbe2f4..37fa0849200 100644 --- a/Generators/Herwig7_i/python/Herwig7Utils.py +++ b/Generators/Herwig7_i/python/Herwig7Utils.py @@ -266,3 +266,4 @@ def ansi_format_warning(text): ## Red colouring def ansi_format_error(text): return (ansi_format(text, "Red")) + diff --git a/Generators/Herwig7_i/share/common/Herwig71_AngularShowerScaleVariations.py b/Generators/Herwig7_i/share/common/Herwig71_AngularShowerScaleVariations.py new file mode 100644 index 00000000000..3528ff4e8ef --- /dev/null +++ b/Generators/Herwig7_i/share/common/Herwig71_AngularShowerScaleVariations.py @@ -0,0 +1,19 @@ +## JobOption fragment for Herwig 7.1.3 +assert hasattr(genSeq, "Herwig7") + +Herwig7Config.add_commands(""" +cd /Herwig/Shower +do ShowerHandler:AddVariation MUR2_MUF2_SHOWER_HARD 2 2 Hard +do ShowerHandler:AddVariation MUR2_MUF1_SHOWER_HARD 2 1 Hard +do ShowerHandler:AddVariation MUR1_MUF2_SHOWER_HARD 1 2 Hard +do ShowerHandler:AddVariation MUR1_MUF0.5_SHOWER_HARD 1 0.5 Hard +do ShowerHandler:AddVariation MUR0.5_MUF1_SHOWER_HARD 0.5 1 Hard +do ShowerHandler:AddVariation MUR0.5_MUF0.5_SHOWER_HARD 0.5 0.5 Hard +do ShowerHandler:AddVariation MUR2_MUF2_SHOWER_SEC 2 2 Secondary +do ShowerHandler:AddVariation MUR2_MUF1_SHOWER_SEC 2 1 Secondary +do ShowerHandler:AddVariation MUR1_MUF2_SHOWER_SEC 1 2 Secondary +do ShowerHandler:AddVariation MUR1_MUF0.5_SHOWER_SEC 1 0.5 Secondary +do ShowerHandler:AddVariation MUR0.5_MUF1_SHOWER_SEC 0.5 1 Secondary +do ShowerHandler:AddVariation MUR0.5_MUF0.5_SHOWER_SEC 0.5 0.5 Secondary +set SplittingGenerator:Detuning 2.0 +""") diff --git a/Generators/Herwig7_i/share/common/Herwig71_DipoleShowerScaleVariations.py b/Generators/Herwig7_i/share/common/Herwig71_DipoleShowerScaleVariations.py new file mode 100644 index 00000000000..33d2a14e4ff --- /dev/null +++ b/Generators/Herwig7_i/share/common/Herwig71_DipoleShowerScaleVariations.py @@ -0,0 +1,19 @@ +## JobOption fragment for Herwig 7.1.3 +assert hasattr(genSeq, "Herwig7") + +Herwig7Config.add_commands(""" +cd /Herwig/DipoleShower +do DipoleShowerHandler:AddVariation MUR2_MUF2_SHOWER_HARD 2 2 Hard +do DipoleShowerHandler:AddVariation MUR2_MUF1_SHOWER_HARD 2 1 Hard +do DipoleShowerHandler:AddVariation MUR1_MUF2_SHOWER_HARD 1 2 Hard +do DipoleShowerHandler:AddVariation MUR1_MUF0.5_SHOWER_HARD 1 0.5 Hard +do DipoleShowerHandler:AddVariation MUR0.5_MUF1_SHOWER_HARD 0.5 1 Hard +do DipoleShowerHandler:AddVariation MUR0.5_MUF0.5_SHOWER_HARD 0.5 0.5 Hard +do DipoleShowerHandler:AddVariation MUR2_MUF2_SHOWER_SEC 2 2 Secondary +do DipoleShowerHandler:AddVariation MUR2_MUF1_SHOWER_SEC 2 1 Secondary +do DipoleShowerHandler:AddVariation MUR1_MUF2_SHOWER_SEC 1 2 Secondary +do DipoleShowerHandler:AddVariation MUR1_MUF0.5_SHOWER_SEC 1 0.5 Secondary +do DipoleShowerHandler:AddVariation MUR0.5_MUF1_SHOWER_SEC 0.5 1 Secondary +do DipoleShowerHandler:AddVariation MUR0.5_MUF0.5_SHOWER_SEC 0.5 0.5 Secondary +set DipoleShowerHandler:Detuning 2.0 +""") diff --git a/Generators/Herwig7_i/share/common/Herwig7EG_Matchbox_MG_H7UEMMHT2014_dipole_multijet_withGridpack.py b/Generators/Herwig7_i/share/common/Herwig7EG_Matchbox_MG_H7UEMMHT2014_dipole_multijet_withGridpack.py index c4f8401911d..65385b1e171 100644 --- a/Generators/Herwig7_i/share/common/Herwig7EG_Matchbox_MG_H7UEMMHT2014_dipole_multijet_withGridpack.py +++ b/Generators/Herwig7_i/share/common/Herwig7EG_Matchbox_MG_H7UEMMHT2014_dipole_multijet_withGridpack.py @@ -11,18 +11,21 @@ evgenConfig.generators += ["Herwig7"] evgenConfig.tune = "MMHT2014" ## initialize generator configuration object -generator = Hw7ConfigMatchbox(genSeq, runArgs, run_name="HerwigMatchbox", beams="pp") +Herwig7Config = Hw7ConfigMatchbox(genSeq, runArgs, run_name="HerwigMatchbox", beams="pp") ## configure generator -generator.me_pdf_commands(order="NLO", name="MMHT2014nlo68cl") -generator.tune_commands() +include("MC15JobOptions/Herwig71_EvtGen.py") +Herwig7Config.me_pdf_commands(order="NLO", name="MMHT2014nlo68cl") +Herwig7Config.tune_commands() # HT slice boundaries -pTDict = {0:0,1:0,2:15,3:50,4:150,5:350,6:600,7:950,8:1500,9:2200,10:2800,11:3500,12:4200} +pTDict = {0:0,1:6,2:15,3:50,4:150,5:350,6:600,7:950,8:1500,9:2200,10:2800,11:3500,12:4200} multDict = {0:1.1,1:1.2,2:2.2,3:4.0,4:5.0,5:6.0,6:7.0,7:8.0,8:9.0,9:10.0,10:10.0,11:10.0,12:10.0} #Herwig7EvtGen_Matchbox_MadGraph_H7UEMMHT2014_multijet.py -name_info = name.split("_JZ")[1].split(".py")[0] +name_info = name.split("_JZ")[1].split("WithSW.py")[0] +if "plus" in name_info: + name_info = 9 slice = int(name_info) mergingscale = 30 @@ -33,7 +36,8 @@ if runArgs.maxEvents > 0: else: nevents=5000*evt_multiplier -generator.add_commands(""" +Herwig7Config.add_commands(""" +## Model assumptions read Matchbox/StandardModelLike.in read Matchbox/DiagonalCKM.in @@ -46,86 +50,61 @@ set Factory:OrderInAlphaEW 0 ## You may use identifiers such as p, pbar, j, l, mu+, h0 etc. do Factory:Process p p -> j j -################################################## -## Matrix element library selection -################################################## - -## Select a generic tree/loop combination or a -## specialized NLO package - -# read Matchbox/MadGraph-GoSam.in -# read Matchbox/MadGraph-MadGraph.in -# read Matchbox/MadGraph-NJet.in - +#read Matchbox/MadGraph-NJet.in read Matchbox/MadGraph-OpenLoops.in -# read Matchbox/HJets.in -# read Matchbox/VBFNLO.in - -################################################## -## Cut selection -## See the documentation for more options -################################################## -cd /Herwig/Cuts/ - ## cuts on additional jets - +cd /Herwig/Cuts/ read Matchbox/DefaultPPJets.in insert JetCuts:JetRegions 0 FirstJet """ + "set FirstJet:PtMin "+str(pTDict[slice])+"*GeV" """ -################################################## ## Scale choice -## See the documentation for more options -################################################## - cd /Herwig/MatrixElements/Matchbox set Factory:ScaleChoice /Herwig/MatrixElements/Matchbox/Scales/MaxJetPtScale -################################################## -## Matching and shower selection -## Please also see flavour scheme settings -## towards the end of the input file. -################################################## +## - - - bias to high pt. +cd /Herwig/MatrixElements/Matchbox +create Herwig::MergingReweight MPreWeight HwDipoleShower.so +insert Factory:Preweighters 0 MPreWeight +set MPreWeight:MaxPTPower 4 +set /Herwig/Samplers/MonacoSampler:Kappa 0.02 +## +## Matching and shower selection +# read Matchbox/MCatNLO-DefaultShower.in read Matchbox/MCatNLO-DipoleShower.in -# read Matchbox/Powheg-DefaultShower.in -## use for strict LO/NLO comparisons -# read Matchbox/MCatLO-DefaultShower.in -## use for improved LO showering -# read Matchbox/LO-DefaultShower.in - -#read Matchbox/FiveFlavourScheme.in -## required for dipole shower and fixed order in five flavour scheme + +## PDF choice read Matchbox/FiveFlavourNoBMassScheme.in +read Matchbox/MMHT2014.in +do /Herwig/MatrixElements/Matchbox/Factory:ProductionMode """) +include("MC15JobOptions/Herwig71_DipoleShowerScaleVariations.py") + # Using author's default -generator.sampler_commands("MonacoSampler", 20000, 4, 50000, 1, 100) +Herwig7Config.sampler_commands("MonacoSampler", 20000, 4, 50000, 1, 100) if runArgs.generatorRunMode == 'build': - generator.do_build(10) + Herwig7Config.do_build(10) elif runArgs.generatorRunMode == 'integrate': - generator.do_integrate(runArgs.generatorJobNumber) + Herwig7Config.do_integrate(runArgs.generatorJobNumber) elif runArgs.generatorRunMode == 'mergegrids': - generator.do_mergegrids(10,gridpack="Herwig7_gridpack.tar.gz") + Herwig7Config.do_mergegrids(10,gridpack="Herwig7_gridpack.tar.gz") elif runArgs.generatorRunMode == 'run': - if runArgs.runNumber == 364902: generator.do_run(gridpack="group.phys-gener.Herwig7_Matchbox_MG_H7UEMMHT2014.364902.multijet_dipole_JZ2.TXT.mc15_v2._00001.tar.gz") - elif runArgs.runNumber == 364903: generator.do_run(gridpack="group.phys-gener.Herwig7_Matchbox_MG_H7UEMMHT2014.364903.multijet_dipole_JZ3.TXT.mc15_v2._00001.tar.gz") - elif runArgs.runNumber == 364904: generator.do_run(gridpack="group.phys-gener.Herwig7_Matchbox_MG_H7UEMMHT2014.364904.multijet_dipole_JZ4.TXT.mc15_v2._00001.tar.gz") - elif runArgs.runNumber == 364905: generator.do_run(gridpack="group.phys-gener.Herwig7_Matchbox_MG_H7UEMMHT2014.364905.multijet_dipole_JZ5.TXT.mc15_v2._00001.tar.gz") - elif runArgs.runNumber == 364906: generator.do_run(gridpack="group.phys-gener.Herwig7_Matchbox_MG_H7UEMMHT2014.364906.multijet_dipole_JZ6.TXT.mc15_v2._00001.tar.gz") - elif runArgs.runNumber == 364907: generator.do_run(gridpack="group.phys-gener.Herwig7_Matchbox_MG_H7UEMMHT2014.364907.multijet_dipole_JZ7.TXT.mc15_v2._00001.tar.gz") - elif runArgs.runNumber == 364908: generator.do_run(gridpack="group.phys-gener.Herwig7_Matchbox_MG_H7UEMMHT2014.364908.multijet_dipole_JZ8.TXT.mc15_v2._00001.tar.gz") - elif runArgs.runNumber == 364909: generator.do_run(gridpack="group.phys-gener.Herwig7_Matchbox_MG_H7UEMMHT2014.364909.multijet_dipole_JZ9.TXT.mc15_v2._00001.tar.gz") - elif runArgs.runNumber == 364910: generator.do_run(gridpack="group.phys-gener.Herwig7_Matchbox_MG_H7UEMMHT2014.364910.multijet_dipole_JZ10.TXT.mc15_v2._00001.tar.gz") - elif runArgs.runNumber == 364911: generator.do_run(gridpack="group.phys-gener.Herwig7_Matchbox_MG_H7UEMMHT2014.364911.multijet_dipole_JZ11.TXT.mc15_v2._00001.tar.gz") - elif runArgs.runNumber == 364912: generator.do_run(gridpack="group.phys-gener.Herwig7_Matchbox_MG_H7UEMMHT2014.364912.multijet_dipole_JZ12.TXT.mc15_v2._00001.tar.gz") - - + if runArgs.runNumber == 364933: Herwig7Config.do_run(gridpack="group.phys-gener.Herwig7_Matchbox_MG_H7UEMMHT2014.364933.multijet_dipole_JZ1W.TXT.mc15_v4._00001.tar.gz") + if runArgs.runNumber == 364902: Herwig7Config.do_run(gridpack="group.phys-gener.Herwig7_Matchbox_MG_H7UEMMHT2014.364902.multijet_dipole_JZ2W.TXT.mc15_v4._00001.tar.gz") + if runArgs.runNumber == 364903: Herwig7Config.do_run(gridpack="group.phys-gener.Herwig7_Matchbox_MG_H7UEMMHT2014.364903.multijet_dipole_JZ3W.TXT.mc15_v4._00001.tar.gz") + if runArgs.runNumber == 364904: Herwig7Config.do_run(gridpack="group.phys-gener.Herwig7_Matchbox_MG_H7UEMMHT2014.364904.multijet_dipole_JZ4W.TXT.mc15_v4._00001.tar.gz") + if runArgs.runNumber == 364905: Herwig7Config.do_run(gridpack="group.phys-gener.Herwig7_Matchbox_MG_H7UEMMHT2014.364905.multijet_dipole_JZ5W.TXT.mc15_v4._00001.tar.gz") + if runArgs.runNumber == 364906: Herwig7Config.do_run(gridpack="group.phys-gener.Herwig7_Matchbox_MG_H7UEMMHT2014.364906.multijet_dipole_JZ6W.TXT.mc15_v4._00001.tar.gz") + if runArgs.runNumber == 364907: Herwig7Config.do_run(gridpack="group.phys-gener.Herwig7_Matchbox_MG_H7UEMMHT2014.364907.multijet_dipole_JZ7W.TXT.mc15_v4._00001.tar.gz") + if runArgs.runNumber == 364908: Herwig7Config.do_run(gridpack="group.phys-gener.Herwig7_Matchbox_MG_H7UEMMHT2014.364908.multijet_dipole_JZ8W.TXT.mc15_v4._00001.tar.gz") + if runArgs.runNumber == 364909: Herwig7Config.do_run(gridpack="group.phys-gener.Herwig7_Matchbox_MG_H7UEMMHT2014.364909.multijet_dipole_JZ9W.TXT.mc15_v4._00001.tar.gz") diff --git a/Generators/Herwig7_i/share/common/Herwig7EvtGen_Matchbox_MadGraph_H7UEMMHT2014_multijet_withGridpack.py b/Generators/Herwig7_i/share/common/Herwig7EvtGen_Matchbox_MadGraph_H7UEMMHT2014_multijet_withGridpack.py index 268a953de42..1d4048d7566 100644 --- a/Generators/Herwig7_i/share/common/Herwig7EvtGen_Matchbox_MadGraph_H7UEMMHT2014_multijet_withGridpack.py +++ b/Generators/Herwig7_i/share/common/Herwig7EvtGen_Matchbox_MadGraph_H7UEMMHT2014_multijet_withGridpack.py @@ -11,18 +11,20 @@ evgenConfig.generators += ["Herwig7"] evgenConfig.tune = "MMHT2014" ## initialize generator configuration object -generator = Hw7ConfigMatchbox(genSeq, runArgs, run_name="HerwigMatchbox", beams="pp") +Herwig7Config = Hw7ConfigMatchbox(genSeq, runArgs, run_name="HerwigMatchbox", beams="pp") ## configure generator -generator.me_pdf_commands(order="NLO", name="MMHT2014nlo68cl") -generator.tune_commands() +include("MC15JobOptions/Herwig71_EvtGen.py") +Herwig7Config.me_pdf_commands(order="NLO", name="MMHT2014nlo68cl") +Herwig7Config.tune_commands() # HT slice boundaries -pTDict = {0:0,1:0,2:15,3:50,4:150,5:350,6:600,7:950,8:1500,9:2200,10:2800,11:3500,12:4200} +pTDict = {0:0,1:6,2:15,3:50,4:150,5:350,6:600,7:950,8:1500,9:2200,10:2800,11:3500,12:4200} multDict = {0:1.1,1:1.2,2:2.2,3:4.0,4:5.0,5:6.0,6:7.0,7:8.0,8:9.0,9:10.0,10:10.0,11:10.0,12:10.0} -#Herwig7EvtGen_Matchbox_MadGraph_H7UEMMHT2014_multijet.py -name_info = name.split("_JZ")[1].split(".py")[0] +name_info = name.split("_JZ")[1].split("WithSW.py")[0] +if "plus" in name_info: + name_info = 9 slice = int(name_info) mergingscale = 30 @@ -33,7 +35,8 @@ if runArgs.maxEvents > 0: else: nevents=5000*evt_multiplier -generator.add_commands(""" +Herwig7Config.add_commands(""" +## Model assumptions read Matchbox/StandardModelLike.in read Matchbox/DiagonalCKM.in @@ -46,84 +49,61 @@ set Factory:OrderInAlphaEW 0 ## You may use identifiers such as p, pbar, j, l, mu+, h0 etc. do Factory:Process p p -> j j -################################################## -## Matrix element library selection -################################################## - -## Select a generic tree/loop combination or a -## specialized NLO package - -# read Matchbox/MadGraph-GoSam.in -# read Matchbox/MadGraph-MadGraph.in -# read Matchbox/MadGraph-NJet.in - +#read Matchbox/MadGraph-NJet.in read Matchbox/MadGraph-OpenLoops.in -# read Matchbox/HJets.in -# read Matchbox/VBFNLO.in - -################################################## -## Cut selection -## See the documentation for more options -################################################## -cd /Herwig/Cuts/ - ## cuts on additional jets - +cd /Herwig/Cuts/ read Matchbox/DefaultPPJets.in insert JetCuts:JetRegions 0 FirstJet """ + "set FirstJet:PtMin "+str(pTDict[slice])+"*GeV" """ -################################################## ## Scale choice -## See the documentation for more options -################################################## - cd /Herwig/MatrixElements/Matchbox set Factory:ScaleChoice /Herwig/MatrixElements/Matchbox/Scales/MaxJetPtScale -################################################## -## Matching and shower selection -## Please also see flavour scheme settings -## towards the end of the input file. -################################################## +## - - - bias to high pt. +cd /Herwig/MatrixElements/Matchbox +create Herwig::MergingReweight MPreWeight HwDipoleShower.so +insert Factory:Preweighters 0 MPreWeight +set MPreWeight:MaxPTPower 4 +set /Herwig/Samplers/MonacoSampler:Kappa 0.02 +## +## Matching and shower selection read Matchbox/MCatNLO-DefaultShower.in -# read Matchbox/Powheg-DefaultShower.in -## use for strict LO/NLO comparisons -# read Matchbox/MCatLO-DefaultShower.in -## use for improved LO showering -# read Matchbox/LO-DefaultShower.in - -read Matchbox/FiveFlavourScheme.in -## required for dipole shower and fixed order in five flavour scheme -# read Matchbox/FiveFlavourNoBMassScheme.in +#read Matchbox/MCatNLO-DipoleShower.in + +## PDF choice +read Matchbox/FiveFlavourNoBMassScheme.in +read Matchbox/MMHT2014.in +do /Herwig/MatrixElements/Matchbox/Factory:ProductionMode """) +include("MC15JobOptions/Herwig71_AngularShowerScaleVariations.py") + # Using author's default -generator.sampler_commands("MonacoSampler", 20000, 4, 50000, 1, 100) +Herwig7Config.sampler_commands("MonacoSampler", 20000, 4, 50000, 1, 100) if runArgs.generatorRunMode == 'build': - generator.do_build(10) + Herwig7Config.do_build(10) elif runArgs.generatorRunMode == 'integrate': - generator.do_integrate(runArgs.generatorJobNumber) + Herwig7Config.do_integrate(runArgs.generatorJobNumber) elif runArgs.generatorRunMode == 'mergegrids': - generator.do_mergegrids(10,gridpack="Herwig7_gridpack.tar.gz") + Herwig7Config.do_mergegrids(10,gridpack="Herwig7_gridpack.tar.gz") elif runArgs.generatorRunMode == 'run': - if runArgs.runNumber == 364922: generator.do_run(gridpack="group.phys-gener.Herwig7_Matchbox_MG_H7UEMMHT2014.364922.multijet_angular_JZ2.TXT.mc15_v2._00001.tar.gz") - elif runArgs.runNumber == 364923: generator.do_run(gridpack="group.phys-gener.Herwig7_Matchbox_MG_H7UEMMHT2014.364923.multijet_angular_JZ3.TXT.mc15_v2._00001.tar.gz") - elif runArgs.runNumber == 364924: generator.do_run(gridpack="group.phys-gener.Herwig7_Matchbox_MG_H7UEMMHT2014.364924.multijet_angular_JZ4.TXT.mc15_v2._00001.tar.gz") - elif runArgs.runNumber == 364925: generator.do_run(gridpack="group.phys-gener.Herwig7_Matchbox_MG_H7UEMMHT2014.364925.multijet_angular_JZ5.TXT.mc15_v2._00001.tar.gz") - elif runArgs.runNumber == 364926: generator.do_run(gridpack="group.phys-gener.Herwig7_Matchbox_MG_H7UEMMHT2014.364926.multijet_angular_JZ6.TXT.mc15_v2._00001.tar.gz") - elif runArgs.runNumber == 364927: generator.do_run(gridpack="group.phys-gener.Herwig7_Matchbox_MG_H7UEMMHT2014.364927.multijet_angular_JZ7.TXT.mc15_v2._00001.tar.gz") - elif runArgs.runNumber == 364928: generator.do_run(gridpack="group.phys-gener.Herwig7_Matchbox_MG_H7UEMMHT2014.364928.multijet_angular_JZ8.TXT.mc15_v2._00001.tar.gz") - elif runArgs.runNumber == 364929: generator.do_run(gridpack="group.phys-gener.Herwig7_Matchbox_MG_H7UEMMHT2014.364929.multijet_angular_JZ9.TXT.mc15_v2._00001.tar.gz") - elif runArgs.runNumber == 364930: generator.do_run(gridpack="group.phys-gener.Herwig7_Matchbox_MG_H7UEMMHT2014.364930.multijet_angular_JZ10.TXT.mc15_v2._00001.tar.gz") - elif runArgs.runNumber == 364931: generator.do_run(gridpack="group.phys-gener.Herwig7_Matchbox_MG_H7UEMMHT2014.364931.multijet_angular_JZ11.TXT.mc15_v2._00001.tar.gz") - elif runArgs.runNumber == 364932: generator.do_run(gridpack="group.phys-gener.Herwig7_Matchbox_MG_H7UEMMHT2014.364932.multijet_angular_JZ12.TXT.mc15_v2._00001.tar.gz") + if runArgs.runNumber == 364934: Herwig7Config.do_run(gridpack="group.phys-gener.Herwig7_Matchbox_MG_H7UEMMHT2014.364934.multijet_angular_JZ1W.TXT.mc15_v4._00001.tar.gz") + if runArgs.runNumber == 364922: Herwig7Config.do_run(gridpack="group.phys-gener.Herwig7_Matchbox_MG_H7UEMMHT2014.364922.multijet_angular_JZ2W.TXT.mc15_v4._00001.tar.gz") + if runArgs.runNumber == 364923: Herwig7Config.do_run(gridpack="group.phys-gener.Herwig7_Matchbox_MG_H7UEMMHT2014.364923.multijet_angular_JZ3W.TXT.mc15_v4._00001.tar.gz") + if runArgs.runNumber == 364924: Herwig7Config.do_run(gridpack="group.phys-gener.Herwig7_Matchbox_MG_H7UEMMHT2014.364924.multijet_angular_JZ4W.TXT.mc15_v4._00001.tar.gz") + if runArgs.runNumber == 364925: Herwig7Config.do_run(gridpack="group.phys-gener.Herwig7_Matchbox_MG_H7UEMMHT2014.364925.multijet_angular_JZ5W.TXT.mc15_v4._00001.tar.gz") + if runArgs.runNumber == 364926: Herwig7Config.do_run(gridpack="group.phys-gener.Herwig7_Matchbox_MG_H7UEMMHT2014.364926.multijet_angular_JZ6W.TXT.mc15_v4._00001.tar.gz") + if runArgs.runNumber == 364927: Herwig7Config.do_run(gridpack="group.phys-gener.Herwig7_Matchbox_MG_H7UEMMHT2014.364927.multijet_angular_JZ7W.TXT.mc15_v4._00001.tar.gz") + if runArgs.runNumber == 364928: Herwig7Config.do_run(gridpack="group.phys-gener.Herwig7_Matchbox_MG_H7UEMMHT2014.364928.multijet_angular_JZ8W.TXT.mc15_v4._00001.tar.gz") + if runArgs.runNumber == 364929: Herwig7Config.do_run(gridpack="group.phys-gener.Herwig7_Matchbox_MG_H7UEMMHT2014.364929.multijet_angular_JZ9W.TXT.mc15_v4._00001.tar.gz") diff --git a/Generators/Herwig7_i/share/example/BuiltinME/MC15.999999.Herwig7_Dijet.py b/Generators/Herwig7_i/share/example/BuiltinME/MC15.999999.Herwig7_Dijet.py new file mode 100644 index 00000000000..0188cddd345 --- /dev/null +++ b/Generators/Herwig7_i/share/example/BuiltinME/MC15.999999.Herwig7_Dijet.py @@ -0,0 +1,27 @@ +## Initialise Herwig7 for run with built-in/old-style matrix elements +include("MC15JobOptions/Herwig7_BuiltinME.py") + +## Provide config information +evgenConfig.generators += ["Herwig7"] +evgenConfig.tune = "MMHT2014" +evgenConfig.description = "Herwig7 dijet sample with MMHT2014 PDF and corresponding tune" +evgenConfig.keywords = ["SM","QCD", "dijet"] +evgenConfig.contact = ["Daniel Rauch (daniel.rauch@desy.de)"] + +## Configure Herwig7 +Herwig7Config.me_pdf_commands(order="NLO", name="MMHT2014nlo68cl") +Herwig7Config.shower_pdf_commands(order="NLO", name="MMHT2014nlo68cl") +Herwig7Config.tune_commands(ps_tune_name = "H7-PS-MMHT2014LO", ue_tune_name = "H7-UE-MMHT") + +Herwig7Config.add_commands(""" +## ------------------ +## Hard process setup +## ------------------ +insert /Herwig/MatrixElements/SubProcess:MatrixElements[0] /Herwig/MatrixElements/MEQCD2to2 +set /Herwig/UnderlyingEvent/MPIHandler:IdenticalToUE 0 +set /Herwig/Cuts/JetKtCut:MinKT 15*GeV +set /Herwig/Cuts/LeptonKtCut:MinKT 0.0*GeV +""") + +## run the generator +Herwig7Config.run() diff --git a/Generators/Herwig7_i/share/example/BuiltinME/mc.Herwig7_Dijet.py b/Generators/Herwig7_i/share/example/BuiltinME/mc.Herwig7_Dijet.py new file mode 100644 index 00000000000..b6f44e23092 --- /dev/null +++ b/Generators/Herwig7_i/share/example/BuiltinME/mc.Herwig7_Dijet.py @@ -0,0 +1,27 @@ +## Initialise Herwig7 for run with built-in/old-style matrix elements +include("Herwig7_i/Herwig7_BuiltinME.py") + +## Provide config information +evgenConfig.generators += ["Herwig7"] +evgenConfig.tune = "H7.1-Default" +evgenConfig.description = "Herwig7 dijet sample with MMHT2014 PDF and H7.1-Default tune" +evgenConfig.keywords = ["SM","QCD", "dijet"] +evgenConfig.contact = ["Daniel Rauch (daniel.rauch@desy.de)"] + +## Configure Herwig7 +Herwig7Config.me_pdf_commands(order="NLO", name="MMHT2014nlo68cl") +Herwig7Config.shower_pdf_commands(order="NLO", name="MMHT2014nlo68cl") +Herwig7Config.tune_commands() + +Herwig7Config.add_commands(""" +## ------------------ +## Hard process setup +## ------------------ +insert /Herwig/MatrixElements/SubProcess:MatrixElements[0] /Herwig/MatrixElements/MEQCD2to2 +set /Herwig/UnderlyingEvent/MPIHandler:IdenticalToUE 0 +set /Herwig/Cuts/JetKtCut:MinKT 15*GeV +set /Herwig/Cuts/LeptonKtCut:MinKT 0.0*GeV +""") + +## run the generator +Herwig7Config.run() diff --git a/Generators/Herwig7_i/share/example/FxFx/mc.MGH7_FxFx_H71-DEFAULT_test.py b/Generators/Herwig7_i/share/example/FxFx/mc.MGH7_FxFx_H71-DEFAULT_test.py new file mode 100644 index 00000000000..c29d07aa628 --- /dev/null +++ b/Generators/Herwig7_i/share/example/FxFx/mc.MGH7_FxFx_H71-DEFAULT_test.py @@ -0,0 +1,31 @@ +from Herwig7_i.Herwig7_iConf import Herwig7 +from Herwig7_i.Herwig7ConfigFxFx import Hw7ConfigFxFx + +genSeq += Herwig7() + +## Provide config information +evgenConfig.generators += ["aMcAtNlo", "Herwig7"] +evgenConfig.tune = "H7.1-Default" +evgenConfig.description = "MG5aMCatNLO/Herwig7 FxFx" +evgenConfig.keywords = ["SM","ttbar"] +evgenConfig.contact = ["Krishna Kulkarni (krishna.kulkarni@cern.ch), Daniel Rauch (daniel.rauch@desy.de)", "atlas-generators-herwig7@cern.ch"] + +## Configure Herwig7 +## These are the commands corresponding to what would go +## into the regular Herwig infile + +## initialize generator configuration object +generator = Hw7ConfigFxFx(genSeq, runArgs, run_name="HerwigFxFx") + +## configure generator +generator.me_pdf_commands(order="NLO", name="PDF4LHC15_nlo_mc") +generator.tune_commands() +generator.fxfx_commands(merging_scale=100, njets_max=2, lhe_filename=runArgs.inputGeneratorFile, me_pdf_order="NLO") + +## specific to pp-tt+0/1/2j +generator.add_commands(""" +set /Herwig/Partons/RemnantDecayer:AllowTop Yes +""") + +## run generator +generator.run() diff --git a/Generators/Herwig7_i/share/example/Generic/mc.PhH7_H71-DEFAULT_LHE_ExistingInfile.py b/Generators/Herwig7_i/share/example/Generic/mc.PhH7_H71-DEFAULT_LHE_ExistingInfile.py new file mode 100644 index 00000000000..c3835cd6ad5 --- /dev/null +++ b/Generators/Herwig7_i/share/example/Generic/mc.PhH7_H71-DEFAULT_LHE_ExistingInfile.py @@ -0,0 +1,26 @@ +## These JobOptions are meant for development / debugging purposes only. +## Please do not use them for physics purposes. +## +## Specifically, standalone (outside of athena) Herwig7 runs can be reproduced +## inside of athena by re-using a standalone Herwig7 infile. + +## Initialise Herwig7 for standalone run reproduction +from Herwig7_i.Herwig7_iConf import Herwig7 +from Herwig7_i.Herwig7ConfigGeneric import Hw7ConfigGeneric +genSeq += Herwig7() +Herwig7Config = Hw7ConfigGeneric(genSeq, runArgs, "Herwig.in", "Herwig.run") + +## Provide config information +evgenConfig.generators += ["Powheg", "Herwig7"] +evgenConfig.tune = "H7.1-Default" +evgenConfig.description = "PowhegBox/Herwig7 LHEF" +evgenConfig.keywords = ["SM","Z","electron"] +evgenConfig.contact = ["Daniel Rauch (daniel.rauch@desy.de)"] + +## Run event generator using the +## +## Herwig read <infile> +## Herwig run <runfile> -s <seed> +## +## sequence +Herwig7Config.read_run() diff --git a/Generators/Herwig7_i/share/example/Generic/mc.PhH7_H71-DEFAULT_LHE_ExistingRunfile.py b/Generators/Herwig7_i/share/example/Generic/mc.PhH7_H71-DEFAULT_LHE_ExistingRunfile.py new file mode 100644 index 00000000000..ad1c73262ed --- /dev/null +++ b/Generators/Herwig7_i/share/example/Generic/mc.PhH7_H71-DEFAULT_LHE_ExistingRunfile.py @@ -0,0 +1,25 @@ +## These JobOptions are meant for development / debugging purposes only. +## Please do not use them for physics purposes. +## +## Specifically, standalone (outside of athena) Herwig7 runs can be reproduced +## inside of athena by re-using a standalone Herwig7 runfile. + +## Initialise Herwig7 for standalone run reproduction +from Herwig7_i.Herwig7_iConf import Herwig7 +from Herwig7_i.Herwig7ConfigGeneric import Hw7ConfigGeneric +genSeq += Herwig7() +Herwig7Config = Hw7ConfigGeneric(genSeq, runArgs, runfile_name="Herwig.run") + +## Provide config information +evgenConfig.generators += ["Powheg", "Herwig7"] +evgenConfig.tune = "H7.1-Default" +evgenConfig.description = "PowhegBox/Herwig7 LHEF" +evgenConfig.keywords = ["SM","Z","electron"] +evgenConfig.contact = ["Daniel Rauch (daniel.rauch@desy.de)"] + +## Run event generator doing the +## +## Herwig run <runfile> -s <seed> +## +## step +Herwig7Config.run() diff --git a/Generators/Herwig7_i/share/example/LHEF/mc.MGH7_H71-DEFAULT_LHE.py b/Generators/Herwig7_i/share/example/LHEF/mc.MGH7_H71-DEFAULT_LHE.py new file mode 100644 index 00000000000..d7c51268bfb --- /dev/null +++ b/Generators/Herwig7_i/share/example/LHEF/mc.MGH7_H71-DEFAULT_LHE.py @@ -0,0 +1,17 @@ +## Initialise Herwig7 for LHEF showering +include("Herwig7_i/Herwig7_LHEF.py") + +## Provide config information +evgenConfig.generators += ["aMcAtNlo", "Herwig7"] +evgenConfig.tune = "H7.1-Default" +evgenConfig.description = "MG5aMCatNLO/Herwig7 LHEF" +evgenConfig.keywords = ["SM","Z","electron"] +evgenConfig.contact = ["Daniel Rauch (daniel.rauch@desy.de)"] + +## Configure Herwig7 +Herwig7Config.me_pdf_commands(order="NLO", name="CT10") +Herwig7Config.tune_commands() +Herwig7Config.lhef_mg5amc_commands(lhe_filename=runArgs.inputGeneratorFile, me_pdf_order="NLO") + +## run generator +Herwig7Config.run() diff --git a/Generators/Herwig7_i/share/example/LHEF/mc.PhH7_H71-DEFAULT_LHE.py b/Generators/Herwig7_i/share/example/LHEF/mc.PhH7_H71-DEFAULT_LHE.py new file mode 100644 index 00000000000..a1a98ac916f --- /dev/null +++ b/Generators/Herwig7_i/share/example/LHEF/mc.PhH7_H71-DEFAULT_LHE.py @@ -0,0 +1,17 @@ +## Initialise Herwig7 for LHEF showering +include("Herwig7_i/Herwig7_LHEF.py") + +## Provide config information +evgenConfig.generators += ["Powheg", "Herwig7"] +evgenConfig.tune = "H7.1-Default" +evgenConfig.description = "PowhegBox/Herwig7 LHEF" +evgenConfig.keywords = ["SM","Z","electron"] +evgenConfig.contact = ["Daniel Rauch (daniel.rauch@desy.de)"] + +## Configure Herwig7 +Herwig7Config.me_pdf_commands(order="NLO", name="CT10") +Herwig7Config.tune_commands() +Herwig7Config.lhef_powhegbox_commands(lhe_filename=runArgs.inputGeneratorFile, me_pdf_order="NLO") + +## run generator +Herwig7Config.run() diff --git a/Generators/Herwig7_i/share/example/Matchbox/mc.H7_Matchbox_Internal_Zee_H71-DEFAULT.py b/Generators/Herwig7_i/share/example/Matchbox/mc.H7_Matchbox_Internal_Zee_H71-DEFAULT.py new file mode 100644 index 00000000000..cdea02a6884 --- /dev/null +++ b/Generators/Herwig7_i/share/example/Matchbox/mc.H7_Matchbox_Internal_Zee_H71-DEFAULT.py @@ -0,0 +1,110 @@ +from Herwig7_i.Herwig7_iConf import Herwig7 +from Herwig7_i.Herwig7ConfigMatchbox import Hw7ConfigMatchbox + +genSeq += Herwig7() + +## Provide config information +evgenConfig.generators += ["Herwig7"] +evgenConfig.tune = "H7.1-Default" +evgenConfig.description = "Herwig7 Zee sample with CT10 ME PDF and H7.1-Default PS and UE tune" +evgenConfig.keywords = ["SM","Z","electron"] +evgenConfig.contact = ["Daniel Rauch (daniel.rauch@desy.de)"] + + +## initialize generator configuration object +generator = Hw7ConfigMatchbox(genSeq, runArgs, run_name="HerwigMatchbox", beams="pp") + +## configure generator +generator.me_pdf_commands(order="NLO", name="CT10") +generator.tune_commands() + + +generator.add_commands(""" +################################################## +## Process selection +################################################## + +## Model assumptions +read Matchbox/StandardModelLike.in + +## Set the hard process +set /Herwig/MatrixElements/Matchbox/Factory:OrderInAlphaS 0 +set /Herwig/MatrixElements/Matchbox/Factory:OrderInAlphaEW 2 +do /Herwig/MatrixElements/Matchbox/Factory:Process p p -> e+ e- + + +################################################## +## Matrix element library selection +################################################## + +# read Matchbox/MadGraph-GoSam.in +# read Matchbox/MadGraph-MadGraph.in +# read Matchbox/MadGraph-NJet.in +# read Matchbox/MadGraph-OpenLoops.in +# read Matchbox/HJets.in +# read Matchbox/VBFNLO.in + + +################################################## +## Cut selection +## See the documentation for more options +################################################## + +set /Herwig/Cuts/ChargedLeptonPairMassCut:MinMass 60*GeV +set /Herwig/Cuts/ChargedLeptonPairMassCut:MaxMass 120*GeV + +## cuts on additional jets + +# read Matchbox/DefaultPPJets.in + +# insert JetCuts:JetRegions 0 FirstJet +# insert JetCuts:JetRegions 1 SecondJet +# insert JetCuts:JetRegions 2 ThirdJet +# insert JetCuts:JetRegions 3 FourthJet + +################################################## +## Scale choice +## See the documentation for more options +################################################## + +cd /Herwig/MatrixElements/Matchbox +set Factory:ScaleChoice /Herwig/MatrixElements/Matchbox/Scales/LeptonPairMassScale + +################################################## +## Matching and shower selection +## Please also see flavour scheme settings +## towards the end of the input file. +################################################## + +# read Matchbox/MCatNLO-DefaultShower.in +# read Matchbox/Powheg-DefaultShower.in +## use for strict LO/NLO comparisons +read Matchbox/MCatLO-DefaultShower.in +## use for improved LO showering +# read Matchbox/LO-DefaultShower.in + +# read Matchbox/MCatNLO-DipoleShower.in +# read Matchbox/Powheg-DipoleShower.in +## use for strict LO/NLO comparisons +# read Matchbox/MCatLO-DipoleShower.in +## use for improved LO showering +# read Matchbox/LO-DipoleShower.in + +# read Matchbox/LO-NoShower.in +# read Matchbox/NLO-NoShower.in + + +################################################## +## PDF choice +################################################## + +read Matchbox/FiveFlavourScheme.in +## required for dipole shower and fixed order in five flavour scheme +# read Matchbox/FiveFlavourNoBMassScheme.in +""") + +## Replicate authors NLO sampler commands in Interface +generator.sampler_commands("MonacoSampler", 20000, 4, 50000, 1, 100) + +## run generator +generator.run(cleanup_herwig_scratch=False) diff --git a/Generators/Herwig7_i/share/example/Matchbox/mc.H7_Matchbox_Internal_Zee_H71-DEFAULT_Gridpack.py b/Generators/Herwig7_i/share/example/Matchbox/mc.H7_Matchbox_Internal_Zee_H71-DEFAULT_Gridpack.py new file mode 100644 index 00000000000..3e79668cf47 --- /dev/null +++ b/Generators/Herwig7_i/share/example/Matchbox/mc.H7_Matchbox_Internal_Zee_H71-DEFAULT_Gridpack.py @@ -0,0 +1,110 @@ +from Herwig7_i.Herwig7_iConf import Herwig7 +from Herwig7_i.Herwig7ConfigMatchbox import Hw7ConfigMatchbox + +genSeq += Herwig7() + +## Provide config information +evgenConfig.generators += ["Herwig7"] +evgenConfig.tune = "H7.1-Default" +evgenConfig.description = "Herwig7 Zee sample with CT10 ME PDF and H7.1-Default PS and UE tune" +evgenConfig.keywords = ["SM","Z","electron"] +evgenConfig.contact = ["Daniel Rauch (daniel.rauch@desy.de)"] + + +## initialize generator configuration object +generator = Hw7ConfigMatchbox(genSeq, runArgs, run_name="HerwigMatchbox", beams="pp") + +## configure generator +generator.me_pdf_commands(order="NLO", name="CT10") +generator.tune_commands() + + +generator.add_commands(""" +################################################## +## Process selection +################################################## + +## Model assumptions +read Matchbox/StandardModelLike.in + +## Set the hard process +set /Herwig/MatrixElements/Matchbox/Factory:OrderInAlphaS 0 +set /Herwig/MatrixElements/Matchbox/Factory:OrderInAlphaEW 2 +do /Herwig/MatrixElements/Matchbox/Factory:Process p p -> e+ e- + + +################################################## +## Matrix element library selection +################################################## + +# read Matchbox/MadGraph-GoSam.in +# read Matchbox/MadGraph-MadGraph.in +# read Matchbox/MadGraph-NJet.in +# read Matchbox/MadGraph-OpenLoops.in +# read Matchbox/HJets.in +# read Matchbox/VBFNLO.in + + +################################################## +## Cut selection +## See the documentation for more options +################################################## + +set /Herwig/Cuts/ChargedLeptonPairMassCut:MinMass 60*GeV +set /Herwig/Cuts/ChargedLeptonPairMassCut:MaxMass 120*GeV + +## cuts on additional jets + +# read Matchbox/DefaultPPJets.in + +# insert JetCuts:JetRegions 0 FirstJet +# insert JetCuts:JetRegions 1 SecondJet +# insert JetCuts:JetRegions 2 ThirdJet +# insert JetCuts:JetRegions 3 FourthJet + +################################################## +## Scale choice +## See the documentation for more options +################################################## + +cd /Herwig/MatrixElements/Matchbox +set Factory:ScaleChoice /Herwig/MatrixElements/Matchbox/Scales/LeptonPairMassScale + +################################################## +## Matching and shower selection +## Please also see flavour scheme settings +## towards the end of the input file. +################################################## + +# read Matchbox/MCatNLO-DefaultShower.in +# read Matchbox/Powheg-DefaultShower.in +## use for strict LO/NLO comparisons +read Matchbox/MCatLO-DefaultShower.in +## use for improved LO showering +# read Matchbox/LO-DefaultShower.in + +# read Matchbox/MCatNLO-DipoleShower.in +# read Matchbox/Powheg-DipoleShower.in +## use for strict LO/NLO comparisons +# read Matchbox/MCatLO-DipoleShower.in +## use for improved LO showering +# read Matchbox/LO-DipoleShower.in + +# read Matchbox/LO-NoShower.in +# read Matchbox/NLO-NoShower.in + + +################################################## +## PDF choice +################################################## + +read Matchbox/FiveFlavourScheme.in +## required for dipole shower and fixed order in five flavour scheme +# read Matchbox/FiveFlavourNoBMassScheme.in +""") + +## Replicate authors NLO sampler commands in Interface +generator.sampler_commands("MonacoSampler", 20000, 4, 50000, 1, 100) + +## run generator +generator.run(gridpack="Internal-Zee.tar.gz") diff --git a/Generators/Herwig7_i/share/example/Matchbox/mc.H7_Matchbox_Internal_Zee_H71-DEFAULT_Gridpack_Int2.py b/Generators/Herwig7_i/share/example/Matchbox/mc.H7_Matchbox_Internal_Zee_H71-DEFAULT_Gridpack_Int2.py new file mode 100644 index 00000000000..0750a212585 --- /dev/null +++ b/Generators/Herwig7_i/share/example/Matchbox/mc.H7_Matchbox_Internal_Zee_H71-DEFAULT_Gridpack_Int2.py @@ -0,0 +1,110 @@ +from Herwig7_i.Herwig7_iConf import Herwig7 +from Herwig7_i.Herwig7ConfigMatchbox import Hw7ConfigMatchbox + +genSeq += Herwig7() + +## Provide config information +evgenConfig.generators += ["Herwig7"] +evgenConfig.tune = "H7.1-Default" +evgenConfig.description = "Herwig7 Zee sample with CT10 ME PDF and H7.1-Default PS and UE tune" +evgenConfig.keywords = ["SM","Z","electron"] +evgenConfig.contact = ["Daniel Rauch (daniel.rauch@desy.de)"] + + +## initialize generator configuration object +generator = Hw7ConfigMatchbox(genSeq, runArgs, run_name="HerwigMatchbox", beams="pp") + +## configure generator +generator.me_pdf_commands(order="NLO", name="CT10") +generator.tune_commands() + + +generator.add_commands(""" +################################################## +## Process selection +################################################## + +## Model assumptions +read Matchbox/StandardModelLike.in + +## Set the hard process +set /Herwig/MatrixElements/Matchbox/Factory:OrderInAlphaS 0 +set /Herwig/MatrixElements/Matchbox/Factory:OrderInAlphaEW 2 +do /Herwig/MatrixElements/Matchbox/Factory:Process p p -> e+ e- + + +################################################## +## Matrix element library selection +################################################## + +# read Matchbox/MadGraph-GoSam.in +# read Matchbox/MadGraph-MadGraph.in +# read Matchbox/MadGraph-NJet.in +# read Matchbox/MadGraph-OpenLoops.in +# read Matchbox/HJets.in +# read Matchbox/VBFNLO.in + + +################################################## +## Cut selection +## See the documentation for more options +################################################## + +set /Herwig/Cuts/ChargedLeptonPairMassCut:MinMass 60*GeV +set /Herwig/Cuts/ChargedLeptonPairMassCut:MaxMass 120*GeV + +## cuts on additional jets + +# read Matchbox/DefaultPPJets.in + +# insert JetCuts:JetRegions 0 FirstJet +# insert JetCuts:JetRegions 1 SecondJet +# insert JetCuts:JetRegions 2 ThirdJet +# insert JetCuts:JetRegions 3 FourthJet + +################################################## +## Scale choice +## See the documentation for more options +################################################## + +cd /Herwig/MatrixElements/Matchbox +set Factory:ScaleChoice /Herwig/MatrixElements/Matchbox/Scales/LeptonPairMassScale + +################################################## +## Matching and shower selection +## Please also see flavour scheme settings +## towards the end of the input file. +################################################## + +# read Matchbox/MCatNLO-DefaultShower.in +# read Matchbox/Powheg-DefaultShower.in +## use for strict LO/NLO comparisons +read Matchbox/MCatLO-DefaultShower.in +## use for improved LO showering +# read Matchbox/LO-DefaultShower.in + +# read Matchbox/MCatNLO-DipoleShower.in +# read Matchbox/Powheg-DipoleShower.in +## use for strict LO/NLO comparisons +# read Matchbox/MCatLO-DipoleShower.in +## use for improved LO showering +# read Matchbox/LO-DipoleShower.in + +# read Matchbox/LO-NoShower.in +# read Matchbox/NLO-NoShower.in + + +################################################## +## PDF choice +################################################## + +read Matchbox/FiveFlavourScheme.in +## required for dipole shower and fixed order in five flavour scheme +# read Matchbox/FiveFlavourNoBMassScheme.in +""") + +## Replicate authors NLO sampler commands in Interface +generator.sampler_commands("MonacoSampler", 20000, 4, 50000, 1, 100) + +## run generator +generator.run(2, gridpack="Internal-Zee.tar.gz") diff --git a/Generators/Herwig7_i/share/example/Matchbox/mc.H7_Matchbox_Internal_Zee_H71-DEFAULT_Int2.py b/Generators/Herwig7_i/share/example/Matchbox/mc.H7_Matchbox_Internal_Zee_H71-DEFAULT_Int2.py new file mode 100644 index 00000000000..8a0e9540ae2 --- /dev/null +++ b/Generators/Herwig7_i/share/example/Matchbox/mc.H7_Matchbox_Internal_Zee_H71-DEFAULT_Int2.py @@ -0,0 +1,110 @@ +from Herwig7_i.Herwig7_iConf import Herwig7 +from Herwig7_i.Herwig7ConfigMatchbox import Hw7ConfigMatchbox + +genSeq += Herwig7() + +## Provide config information +evgenConfig.generators += ["Herwig7"] +evgenConfig.tune = "H7.1-Default" +evgenConfig.description = "Herwig7 Zee sample with CT10 ME PDF and H7.1-Default PS and UE tune" +evgenConfig.keywords = ["SM","Z","electron"] +evgenConfig.contact = ["Daniel Rauch (daniel.rauch@desy.de)"] + + +## initialize generator configuration object +generator = Hw7ConfigMatchbox(genSeq, runArgs, run_name="HerwigMatchbox", beams="pp") + +## configure generator +generator.me_pdf_commands(order="NLO", name="CT10") +generator.tune_commands() + + +generator.add_commands(""" +################################################## +## Process selection +################################################## + +## Model assumptions +read Matchbox/StandardModelLike.in + +## Set the hard process +set /Herwig/MatrixElements/Matchbox/Factory:OrderInAlphaS 0 +set /Herwig/MatrixElements/Matchbox/Factory:OrderInAlphaEW 2 +do /Herwig/MatrixElements/Matchbox/Factory:Process p p -> e+ e- + + +################################################## +## Matrix element library selection +################################################## + +# read Matchbox/MadGraph-GoSam.in +# read Matchbox/MadGraph-MadGraph.in +# read Matchbox/MadGraph-NJet.in +# read Matchbox/MadGraph-OpenLoops.in +# read Matchbox/HJets.in +# read Matchbox/VBFNLO.in + + +################################################## +## Cut selection +## See the documentation for more options +################################################## + +set /Herwig/Cuts/ChargedLeptonPairMassCut:MinMass 60*GeV +set /Herwig/Cuts/ChargedLeptonPairMassCut:MaxMass 120*GeV + +## cuts on additional jets + +# read Matchbox/DefaultPPJets.in + +# insert JetCuts:JetRegions 0 FirstJet +# insert JetCuts:JetRegions 1 SecondJet +# insert JetCuts:JetRegions 2 ThirdJet +# insert JetCuts:JetRegions 3 FourthJet + +################################################## +## Scale choice +## See the documentation for more options +################################################## + +cd /Herwig/MatrixElements/Matchbox +set Factory:ScaleChoice /Herwig/MatrixElements/Matchbox/Scales/LeptonPairMassScale + +################################################## +## Matching and shower selection +## Please also see flavour scheme settings +## towards the end of the input file. +################################################## + +# read Matchbox/MCatNLO-DefaultShower.in +# read Matchbox/Powheg-DefaultShower.in +## use for strict LO/NLO comparisons +read Matchbox/MCatLO-DefaultShower.in +## use for improved LO showering +# read Matchbox/LO-DefaultShower.in + +# read Matchbox/MCatNLO-DipoleShower.in +# read Matchbox/Powheg-DipoleShower.in +## use for strict LO/NLO comparisons +# read Matchbox/MCatLO-DipoleShower.in +## use for improved LO showering +# read Matchbox/LO-DipoleShower.in + +# read Matchbox/LO-NoShower.in +# read Matchbox/NLO-NoShower.in + + +################################################## +## PDF choice +################################################## + +read Matchbox/FiveFlavourScheme.in +## required for dipole shower and fixed order in five flavour scheme +# read Matchbox/FiveFlavourNoBMassScheme.in +""") + +## Replicate authors NLO sampler commands in Interface +generator.sampler_commands("MonacoSampler", 20000, 4, 50000, 1, 100) + +## run the generator +generator.run(2) diff --git a/Generators/Herwig7_i/share/example/Matchbox/mc.H7_Matchbox_Internal_ttbar_H71-DEFAULT.py b/Generators/Herwig7_i/share/example/Matchbox/mc.H7_Matchbox_Internal_ttbar_H71-DEFAULT.py new file mode 100644 index 00000000000..31ae34637e8 --- /dev/null +++ b/Generators/Herwig7_i/share/example/Matchbox/mc.H7_Matchbox_Internal_ttbar_H71-DEFAULT.py @@ -0,0 +1,164 @@ +from Herwig7_i.Herwig7_iConf import Herwig7 +from Herwig7_i.Herwig7ConfigMatchbox import Hw7ConfigMatchbox + +genSeq += Herwig7() + +## Provide config information +evgenConfig.generators += ["Herwig7"] +evgenConfig.tune = "H7.1-Default" +evgenConfig.description = "Herwig7 ttbar sample with H7.1-Default tune and NNPDF30 ME PDF" +evgenConfig.keywords = ["SM","ttbar"] +evgenConfig.contact = ["Tetiana Moskalets (tetiana.moskalets@cern.ch)"] + +## initialize generator configuration object +generator = Hw7ConfigMatchbox(genSeq, runArgs, run_name="HerwigMatchbox", beams="pp") + +## configure generator +generator.me_pdf_commands(order="NLO", name="NNPDF30_nlo_as_0118") +generator.shower_pdf_commands(order="NLO", name="NNPDF30_nlo_as_0118") +# generator.tune_commands() +generator.add_commands(""" +################################################## +## Process selection +################################################## + +## Model assumptions +read Matchbox/StandardModelLike.in + +## Set the hard process +set /Herwig/MatrixElements/Matchbox/Factory:OrderInAlphaS 2 +set /Herwig/MatrixElements/Matchbox/Factory:OrderInAlphaEW 0 +do /Herwig/MatrixElements/Matchbox/Factory:Process p p -> t tbar + +read Matchbox/OnShellTopProduction.in + +################################################## +## Matrix element library selection +################################################## + +# read Matchbox/MadGraph-GoSam.in +# read Matchbox/MadGraph-MadGraph.in +# read Matchbox/MadGraph-NJet.in +read Matchbox/MadGraph-OpenLoops.in +# read Matchbox/HJets.in +# read Matchbox/VBFNLO.in + +cd /Herwig/MatrixElements/Matchbox +insert Factory:DiagramGenerator:ExcludeInternal 0 /Herwig/Particles/e- +insert Factory:DiagramGenerator:ExcludeInternal 0 /Herwig/Particles/nu_ebar +insert Factory:DiagramGenerator:ExcludeInternal 0 /Herwig/Particles/mu+ +insert Factory:DiagramGenerator:ExcludeInternal 0 /Herwig/Particles/nu_mu +insert Factory:DiagramGenerator:ExcludeInternal 0 /Herwig/Particles/h0 + +################################################## +## Cut selection +## See the documentation for more options +################################################## + +################################################## +## Scale choice +## See the documentation for more options +################################################## + +cd /Herwig/MatrixElements/Matchbox/ +set Factory:ScaleChoice Scales/TopPairMTScale + +################################################## +## Matching and shower selection +## Please also see flavour scheme settings +## towards the end of the input file. +################################################## + +read Matchbox/MCatNLO-DefaultShower.in +# read Matchbox/MCatNLO-DipoleShower.in +# read Matchbox/Powheg-DefaultShower.in +# read Matchbox/Powheg-DipoleShower.in + +################################################## +## Run with the original POWHEG formalism +################################################## + +# cd /Herwig/MatrixElements/Matchbox +# set MEMatching:RestrictPhasespace No +# set MEMatching:HardScaleProfile NULL + +################################################## +## Veto scale variations +################################################## + +# read Matchbox/MuQUp.in +# read Matchbox/MuQDown.in + +################################################## +## muR/muF scale variations +################################################## + +# read Matchbox/MuUp.in +# read Matchbox/MuDown.in + +################################################## +## PDF selection +################################################## + +cd /Herwig/Partons +create ThePEG::LHAPDF myPDFset ThePEGLHAPDF.so +set myPDFset:RemnantHandler HadronRemnants +set myPDFset:PDFName NNPDF30_nlo_as_0118 +cd /Herwig/Couplings +set NLOAlphaS:input_scale 91.199997*GeV +set NLOAlphaS:input_alpha_s 0.118 +set NLOAlphaS:max_active_flavours 5 + +cd /Herwig/Partons +set /Herwig/Particles/p+:PDF myPDFset +set /Herwig/Particles/pbar-:PDF myPDFset + +set /Herwig/Partons/PPExtractor:FirstPDF myPDFset +set /Herwig/Partons/PPExtractor:SecondPDF myPDFset + +set /Herwig/Shower/LtoLGammaSudakov:pTmin 0.000001 +#set /Herwig/Shower/AlphaQCD:AlphaMZ +#set /Herwig/Shower/GtoQQbarSplitFn:AngularOrdered Yes +#set /Herwig/Shower/Evolver:MECorrMode 1 +#set /Herwig/Shower/PartnerFinder:PartnerMethod Random +#set /Herwig/Shower/PartnerFinder:ScaleChoice Partner +#set /Herwig/Shower/ShowerHandler:RestrictPhasespace Yes +#set /Herwig/Shower/ShowerHandler:MaxPtIsMuF Yes +#set /Herwig/Shower/GammatoQQbarSudakov:Alpha /Herwig/Shower/AlphaQED +set /Herwig/Shower/QtoGammaQSudakov:Alpha /Herwig/Shower/AlphaQED + +cd /Herwig/Particles +set t:NominalMass 172.5*GeV +set t:HardProcessMass 172.5*GeV +set t:Width 1.3167*GeV + +set W+:NominalMass 80.399*GeV +set W+:HardProcessMass 80.399*GeV +set W+:Width 2.09974*GeV + +set Z0:NominalMass 91.1876*GeV +set Z0:HardProcessMass 91.1876*GeV +set Z0:Width 2.50966*GeV + +#set /Herwig/Model:EW/Scheme GMuScheme +#set /Herwig/Model:EW/FermiConstant 1.16637e-05 +#set /Herwig/Model:EW/RecalculateEW On +#set /Herwig/MatrixElements/Matchbox/Factory:FixedQEDCouplings Yes + +cd /Herwig/Analysis +set Basics:CheckQuark No + +################################################## +## PDF choice +################################################## + +read Matchbox/FiveFlavourScheme.in +## required for dipole shower and fixed order in five flavour scheme +# read Matchbox/FiveFlavourNoBMassScheme.in +""") + +## Replicate authors NLO sampler commands in Interface +generator.sampler_commands("MonacoSampler", 20000, 4, 50000, 1, 100) + +## run generator +generator.run() diff --git a/Generators/Herwig7_i/share/file/Herwig71Inclusive.pdt b/Generators/Herwig7_i/share/file/Herwig71Inclusive.pdt new file mode 100644 index 00000000000..bb3c4cb9d60 --- /dev/null +++ b/Generators/Herwig7_i/share/file/Herwig71Inclusive.pdt @@ -0,0 +1,509 @@ +* +* name id mass/GeV width/GeV max_Dm/GeV 3*charge 2*spin lifetime*c/mm PythiaId +add p Particle K_4*+ 329 2.0450000e+00 1.9800000e-01 2.0000000e-01 3 8 0.0000000e+00 0 +add p Particle h_b(2P) 110553 10.258 0.0000000e+00 0.0000000e+00 0 2 0.0000000e+00 110553 +add p Particle b 5 5.0000000e+00 0.0000000e+00 0.0000000e+00 -1 1 0.0000000e+00 5 +add p Particle anti-nu_e -12 0.0000000e+00 0.0000000e+00 0.0000000e+00 0 1 0.0000000e+00 -12 +add p Particle D_2*0 425 2.4611 4.9000000e-02 3.0900000e-01 0 4 0.0000000e+00 425 +add p Particle Upsilon 553 9.4603000e+00 5.4000022e-05 5.0000000e-04 0 2 0.0000000e+00 553 +add p Particle anti-B'_10 -20513 5.762 5.0000000e-02 2.0000000e-01 0 2 0.0000000e+00 -20513 +add p Particle anti-K0 -311 0.497648 0.0000000e+00 0.0000000e+00 0 0 0.0000000e+00 -311 +add p Particle Lambda(1405)0 13122 1.4051000e+00 5.0000000e-02 7.0000000e-02 0 1 0.0000000e+00 0 +add p Particle K*+ 323 8.9166000e-01 5.0800000e-02 2.3000000e-01 3 2 0.0000000e+00 323 +add p Particle e+ -11 5.1099891e-04 0.0000000e+00 0.0000000e+00 3 1 0.0000000e+00 -11 +add p Particle B0H 510 5.2795300e+00 0.0000000e+00 0.0000000e+00 0 0 4.5718350e-01 0 +add p Particle K_2*- -325 1.4256000e+00 9.8500000e-02 7.0000000e-01 -3 4 0.0000000e+00 -325 +add p Particle B'_10 20513 5.762 5.0000000e-02 2.0000000e-01 0 2 0.0000000e+00 20513 +add p Particle K- -321 4.9367700e-01 0.0000000e+00 0.0000000e+00 -3 0 3.7118102e+03 -321 +add p Particle eta_b2(2D) 110555 1.0441000e+01 0.0000000e+00 0.0000000e+00 0 4 0.0000000e+00 110555 +add p Particle K'*0 100313 1.4140000e+00 2.3200000e-01 6.0000000e-01 0 2 0.0000000e+00 0 +add p Particle B_s10 10533 5.8294 5.0000000e-02 1.0000000e-02 0 2 0.0000000e+00 10533 +add p Particle K_S0 310 0.497648 0.0000000e+00 0.0000000e+00 0 0 2.6843981e+01 310 +add p Particle Upsilon_1(2D) 130553 10.435 0.0000000e+00 0.0000000e+00 0 2 0.0000000e+00 130553 +add p Particle B_0*- -10521 5.726 5.0000000e-02 2.0000000e-01 -3 0 0.0000000e+00 -10521 +add p Particle D'_10 20423 2.438 3.8400000e-01 3.0000000e-01 0 2 0.0000000e+00 20423 +add p Particle B+ 521 5.27915 0.0000000e+00 0.0000000e+00 3 0 4.9203926e-01 521 +add p Particle B_0*+ 10521 5.726 5.0000000e-02 2.0000000e-01 3 0 0.0000000e+00 10521 +add p Particle Sigma_b*- 5114 5.8364000e+00 0.0000000e+00 0.0000000e+00 -3 3 0.0000000e+00 5114 +add p Particle anti-Lambda(1405)0 -13122 1.4051000e+00 5.0000000e-02 7.0000000e-02 0 1 0.0000000e+00 0 +add p Particle anti-B_s10 -10533 5.8294 5.0000000e-02 1.0000000e-02 0 2 0.0000000e+00 -10533 +add p Particle B0L 150 5.2795300e+00 0.0000000e+00 0.0000000e+00 0 0 4.5718350e-01 0 +add p Particle anti-B_0*0 -10511 5.726 5.0000000e-02 2.0000000e-01 0 0 0.0000000e+00 -10511 +add p Particle anti-Sigma(1660)0 -13212 1.6600000e+00 1.0000000e-01 4.0000000e-01 0 1 0.0000000e+00 0 +add p Particle Xi_b0 5232 5.7905000e+00 0.0000000e+00 0.0000000e+00 0 1 4.4853851e-01 5232 +add p Particle D_2*- -415 2.459 3.7000000e-02 3.1200000e-01 -3 4 0.0000000e+00 -415 +add p Particle b_1- -10213 1.2295000e+00 1.4200000e-01 2.5000000e-01 -3 2 0.0000000e+00 -10213 +add p Particle K*0 313 0.896 4.8700000e-02 2.3000000e-01 0 2 0.0000000e+00 313 +add p Particle anti-K'*0 -100313 1.4140000e+00 2.3200000e-01 6.0000000e-01 0 2 0.0000000e+00 0 +add p Particle anti-Lambda(1600)0 -23122 1.6000000e+00 1.5000000e-01 2.5000000e-01 0 1 0.0000000e+00 0 +add p Particle B'_1+ 20523 5.762 5.0000000e-02 2.0000000e-01 3 2 0.0000000e+00 20523 +add p Particle tau- 15 1.7768200e+00 0.0000000e+00 0.0000000e+00 -3 1 8.7133309e-02 15 +add p Particle f'_1 20333 1.4263 5.4900000e-02 1.0000000e-01 0 2 0.0000000e+00 20333 +add p Particle D(2S)- -100411 2.5800000e+00 0.0000000e+00 0.0000000e+00 -3 0 0.0000000e+00 0 +add p Particle D_s2*- -435 2.5735 2.0000000e-02 6.0000000e-02 -3 4 0.0000000e+00 -435 +add p Particle n0 2112 9.3956535e-01 0.0000000e+00 0.0000000e+00 0 1 2.6430554e+14 2112 +add p Particle anti-Xi*+ -3314 1.5350000e+00 9.9000000e-03 5.0000000e-02 3 3 0.0000000e+00 -3314 +add p Particle D*- -413 2.01 9.6000002e-05 4.0000000e-04 -3 2 0.0000000e+00 -413 +add p Particle a_1+ 20213 1.24 4.2000000e-01 6.0000000e-01 3 2 0.0000000e+00 20213 +add p Particle D*+ 413 2.01 9.6000002e-05 4.0000000e-04 3 2 0.0000000e+00 413 +add p Particle rndmflav 82 0.0000000e+00 0.0000000e+00 0.0000000e+00 0 0 0.0000000e+00 82 +add p Particle anti-uu_1 -2203 7.7133000e-01 0.0000000e+00 0.0000000e+00 -4 2 0.0000000e+00 -2203 +add p Particle anti-c -4 1.3500000e+00 0.0000000e+00 0.0000000e+00 -2 1 0.0000000e+00 -4 +add p Particle Upsilon(5S) 9000553 1.0876000e+01 5.5000000e-02 1.6500000e+00 0 2 0.0000000e+00 0 +add p Particle Xi_cc++ 4422 3.5979800e+00 0.0000000e+00 0.0000000e+00 6 1 1.0000000e-01 4422 +add p Particle B_c- -541 6.2770000e+00 0.0000000e+00 0.0000000e+00 -3 0 1.3610824e-01 -541 +add p Particle anti-Sigma*+ -3114 1.3872000e+00 3.9400000e-02 4.0000000e-02 3 3 0.0000000e+00 -3114 +add p Particle anti-b'-hadron -87 4.0000000e+02 0.0000000e+00 0.0000000e+00 1 0 0.0000000e+00 0 +add p Particle Upsilon_1(1D) 30553 10.1551 0.0000000e+00 0.0000000e+00 0 2 0.0000000e+00 30553 +add p Particle eta_c(2S) 100441 3.638 1.4000000e-02 2.0000000e-02 0 0 0.0000000e+00 100441 +add p Particle anti-Delta- -2214 1.2320000e+00 1.1800000e-01 1.4000000e-01 -3 3 0.0000000e+00 -2214 +add p Particle anti-D_0*0 -10421 2.369 2.7000000e-01 2.9900000e-01 0 0 0.0000000e+00 -10421 +add p Particle anti-nu_L -18 4.0000000e+02 0.0000000e+00 0.0000000e+00 0 1 0.0000000e+00 -18 +add p Particle Lambda(1830)0 13126 1.8300000e+00 9.5000000e-02 4.8000000e-01 0 5 0.0000000e+00 0 +add p Particle Lambda0 3122 1.1156830e+00 0.0000000e+00 0.0000000e+00 0 1 7.8911214e+01 3122 +add p Particle uu_1 2203 7.7133000e-01 0.0000000e+00 0.0000000e+00 4 2 0.0000000e+00 2203 +add p Particle psi(4160) 9010443 4.1530000e+00 1.0300000e-01 1.5000000e-01 0 2 0.0000000e+00 0 +add p Particle Xi'_b0 5322 5.9600000e+00 6.5821220e-06 1.0000000e-04 0 1 0.0000000e+00 5322 +add p Particle b'-hadron 87 4.0000000e+02 0.0000000e+00 0.0000000e+00 -1 0 0.0000000e+00 0 +add p Particle Omega- 3334 1.6724500e+00 0.0000000e+00 0.0000000e+00 -3 3 2.4612961e+01 3334 +add p Particle B_10 10513 5.7206 5.0000000e-02 2.0000000e-01 0 2 0.0000000e+00 10513 +add p Particle anti-ud_1 -2103 7.7133000e-01 0.0000000e+00 0.0000000e+00 -1 2 0.0000000e+00 -2103 +add p Particle t-hadron 86 1.7500000e+02 0.0000000e+00 0.0000000e+00 2 0 0.0000000e+00 0 +add p Particle anti-t-hadron -86 1.7500000e+02 0.0000000e+00 0.0000000e+00 -2 0 0.0000000e+00 0 +add p Particle anti-Sigma0 -3212 1.1926420e+00 8.9000000e-06 1.3000000e-04 0 1 0.0000000e+00 -3212 +add p Particle B'_1- -20523 5.762 5.0000000e-02 2.0000000e-01 -3 2 0.0000000e+00 -20523 +add p Particle Lambda_c(2593)+ 14122 2.5954000e+00 3.6000000e-03 5.4000000e-02 3 1 0.0000000e+00 0 +add p Particle anti-Lambda(1820)0 -3126 1.8200000e+00 8.0000000e-02 4.0000000e-01 0 5 0.0000000e+00 0 +add p Particle Omega_cc+ 4432 3.7866300e+00 0.0000000e+00 0.0000000e+00 3 1 1.0000000e-01 4432 +add p Particle anti-Delta-- -2224 1.2320000e+00 1.1800000e-01 1.4000000e-01 -6 3 0.0000000e+00 -2224 +add p Particle B_2*0 515 5.7468 2.3000000e-02 2.0000000e-01 0 4 0.0000000e+00 515 +add p Particle K'_10 20313 1.402 1.7400000e-01 4.0000000e-01 0 2 0.0000000e+00 20313 +add p Particle sigma_0 9000221 0.86 0.0000000e+00 4.7800000e-01 0 0 0.0000000e+00 0 +add p Particle anti-Xi_cc*-- -4424 3.6564800e+00 0.0000000e+00 0.0000000e+00 -6 3 0.0000000e+00 -4424 +add p Particle anti-D_10 -10423 2.4223 2.7100000e-02 2.7200000e-01 0 2 0.0000000e+00 -10423 +add p Particle anti-Lambda_c(2593)- -14122 2.5954000e+00 3.6000000e-03 5.4000000e-02 -3 1 0.0000000e+00 0 +add p Particle B_1- -10523 5.7206 5.0000000e-02 2.0000000e-01 -3 2 0.0000000e+00 -10523 +add p Particle anti-Xi_cc- -4412 3.5979800e+00 0.0000000e+00 0.0000000e+00 -3 1 1.0000000e-01 -4412 +add p Particle D_s- -431 1.9682 0.0000000e+00 0.0000000e+00 -3 0 1.4985341e-01 -431 +add p Particle anti-Lambda_c- -4122 2.2864600e+00 0.0000000e+00 0.0000000e+00 -3 1 5.9805135e-02 -4122 +add p Particle Xi_cc+ 4412 3.5979800e+00 0.0000000e+00 0.0000000e+00 3 1 1.0000000e-01 4412 +add p Particle B_1+ 10523 5.7206 5.0000000e-02 2.0000000e-01 3 2 0.0000000e+00 10523 +add p Particle D_0*- -10411 2.369 2.7000000e-01 3.0300000e-01 -3 0 0.0000000e+00 -10411 +add p Particle anti-Xi_cc-- -4422 3.5979800e+00 0.0000000e+00 0.0000000e+00 -6 1 1.0000000e-01 -4422 +add p Particle anti-Sigma_b*+ -5114 5.8364000e+00 0.0000000e+00 0.0000000e+00 3 3 0.0000000e+00 -5114 +add p Particle chi_b2(3P) 200555 1.0526400e+01 0.0000000e+00 0.0000000e+00 0 4 0.0000000e+00 200555 +add p Particle K''*- -30323 1.7170000e+00 3.2000000e-01 7.0000000e-01 -3 2 0.0000000e+00 0 +add p Particle vpho 10022 0.0000000e+00 0.0000000e+00 0.0000000e+00 0 2 0.0000000e+00 0 +add p Particle K_4*- -329 2.0450000e+00 1.9800000e-01 2.0000000e-01 -3 8 0.0000000e+00 0 +add p Particle K_L0 130 0.497648 0.0000000e+00 0.0000000e+00 0 0 1.5334650e+04 130 +add p Particle eta_b(3S) 200551 10.337 0.0000000e+00 0.0000000e+00 0 0 0.0000000e+00 0 +add p Particle K''*+ 30323 1.7170000e+00 3.2000000e-01 7.0000000e-01 3 2 0.0000000e+00 0 +add p Particle Lambda(1800)0 43122 1.8000000e+00 3.0000000e-01 4.5000000e-01 0 1 0.0000000e+00 0 +add p Particle anti-Lambda(1800)0 -43122 1.8000000e+00 3.0000000e-01 4.5000000e-01 0 1 0.0000000e+00 0 +add p Particle K_10 10313 1.2720000e+00 9.0000000e-02 2.0000000e-01 0 2 0.0000000e+00 10313 +add p Particle D*(2S)- -100413 2.6400000e+00 0.0000000e+00 0.0000000e+00 -3 2 0.0000000e+00 0 +add p Particle CELLjet 98 0.0000000e+00 0.0000000e+00 0.0000000e+00 0 0 0.0000000e+00 98 +add p Particle B_c2*- -545 7.3500000e+00 0.0000000e+00 6.0000000e-02 -3 4 0.0000000e+00 -545 +add p Particle K_0*0 10311 1.414 2.7000000e-01 6.0000000e-01 0 0 0.0000000e+00 10311 +add p Particle D_s0*- -10431 2.3173 1.0000033e-03 1.0000000e-02 -3 0 0.0000000e+00 -10431 +add p Particle h_b(3P) 210553 1.0516000e+01 0.0000000e+00 0.0000000e+00 0 2 0.0000000e+00 210553 +add p Particle Lambda_c+ 4122 2.2864600e+00 0.0000000e+00 0.0000000e+00 3 1 5.9805135e-02 4122 +add p Particle Xi_c0 4132 2.4708800e+00 0.0000000e+00 0.0000000e+00 0 1 3.3450330e-02 4132 +add p Particle D_s0*+ 10431 2.3173 1.0000033e-03 1.0000000e-02 3 0 0.0000000e+00 10431 +add p Particle junction 88 0.0000000e+00 0.0000000e+00 0.0000000e+00 0 0 0.0000000e+00 88 +add p Particle K'_1- -20323 1.402 1.7400000e-01 4.0000000e-01 -3 2 0.0000000e+00 -20323 +add p Particle X_2(3872) 9910445 3.8722000e+00 3.1700598e-04 2.9000000e-03 0 4 0.0000000e+00 9910445 +add p Particle K+ 321 4.9367700e-01 0.0000000e+00 0.0000000e+00 3 0 3.7118102e+03 321 +add p Particle anti-Xi_cc*- -4414 3.6564800e+00 0.0000000e+00 0.0000000e+00 -3 3 0.0000000e+00 -4414 +add p Particle s 3 1.9900000e-01 0.0000000e+00 0.0000000e+00 -1 1 0.0000000e+00 3 +add p Particle D*(2S)+ 100413 2.6400000e+00 0.0000000e+00 0.0000000e+00 3 2 0.0000000e+00 0 +add p Particle D_s*+ 433 2.112 6.5821023e-06 1.0000000e-04 3 2 0.0000000e+00 433 +add p Particle anti-Omega_c*0 -4334 2.7659000e+00 0.0000000e+00 0.0000000e+00 0 3 0.0000000e+00 -4334 +add p Particle D_0*+ 10411 2.369 2.7000000e-01 3.0300000e-01 3 0 0.0000000e+00 10411 +add p Particle anti-p- -2212 9.3827201e-01 0.0000000e+00 0.0000000e+00 -3 1 0.0000000e+00 -2212 +add p Particle anti-bd_1 -5103 5.4014500e+00 0.0000000e+00 0.0000000e+00 2 2 0.0000000e+00 -5103 +add p Particle h_b 10553 9.873 0.0000000e+00 0.0000000e+00 0 2 0.0000000e+00 10553 +add p Particle anti-Lambda(1830)0 -13126 1.8300000e+00 9.5000000e-02 4.8000000e-01 0 5 0.0000000e+00 0 +add p Particle anti-u -2 5.6000000e-03 0.0000000e+00 0.0000000e+00 -2 1 0.0000000e+00 -2 +add p Particle mu+ -13 1.0565837e-01 0.0000000e+00 0.0000000e+00 3 1 6.5875415e+05 -13 +add p Particle bc_0 5401 6.6714300e+00 0.0000000e+00 0.0000000e+00 1 0 0.0000000e+00 5401 +add p Particle alpha 1000020040 3.7274170e+00 0.0000000e+00 0.0000000e+00 6 0 0.0000000e+00 0 +add p Particle Sigma*- 3114 1.3872000e+00 3.9400000e-02 4.0000000e-02 -3 3 0.0000000e+00 3114 +add p Particle K''*0 30313 1.7170000e+00 3.2000000e-01 7.0000000e-01 0 2 0.0000000e+00 0 +add p Particle B*- -523 5.325 6.5819970e-06 1.0000000e-04 -3 2 0.0000000e+00 -523 +add p Particle phasespa 83 0.0000000e+00 0.0000000e+00 0.0000000e+00 0 0 0.0000000e+00 83 +add p Particle b_10 10113 1.2295000e+00 1.4200000e-01 2.5000000e-01 0 2 0.0000000e+00 10113 +add p Particle D+ 411 1.86962 0.0000000e+00 0.0000000e+00 3 0 3.1178033e-01 411 +add p Particle b-hadron 85 5.0000000e+00 0.0000000e+00 0.0000000e+00 -1 0 3.8699999e-01 85 +add p Particle anti-Xi_b*0 -5324 5.9700000e+00 0.0000000e+00 0.0000000e+00 0 3 0.0000000e+00 -5324 +add p Particle chi_b1(3P) 220553 1.0516000e+01 0.0000000e+00 0.0000000e+00 0 2 0.0000000e+00 220553 +add p Particle D*(2S)0 100423 2.6400000e+00 0.0000000e+00 0.0000000e+00 0 2 0.0000000e+00 0 +add p Particle anti-D*0 -423 2.0067 6.5821023e-06 3.0000000e-04 0 2 0.0000000e+00 -423 +add p Particle Lambda(1810)0 53122 1.8100000e+00 1.5000000e-01 4.6000000e-01 0 1 0.0000000e+00 0 +add p Particle rho0 113 0.7755 1.4910000e-01 4.8000000e-01 0 2 0.0000000e+00 113 +add p Particle anti-B*0 -513 5.325 6.5819970e-06 1.0000000e-04 0 2 0.0000000e+00 -513 +add p Particle pi- -211 1.3957018e-01 0.0000000e+00 0.0000000e+00 -3 0 7.8056061e+03 -211 +add p Particle anti-B'_s10 -20533 5.856 5.0000000e-02 2.0000000e-02 0 2 0.0000000e+00 -20533 +add p Particle h_1 10223 1.1700000e+00 3.6000000e-01 2.0000000e-01 0 2 0.0000000e+00 10223 +add p Particle geantino 480000000 0.0000000e+00 0.0000000e+00 0.0000000e+00 0 0 0.0000000e+00 0 +add p Particle indep 93 0.0000000e+00 0.0000000e+00 0.0000000e+00 0 0 0.0000000e+00 93 +add p Particle Cerenkov 20022 0.0000000e+00 0.0000000e+00 0.0000000e+00 0 2 0.0000000e+00 0 +add p Particle anti-Sigma*0 -3214 1.3837000e+00 3.6000000e-02 3.5000000e-02 0 3 0.0000000e+00 -3214 +add p Particle a_10 20113 1.24 4.2000000e-01 6.0000000e-01 0 2 0.0000000e+00 20113 +add p Particle Higgs+ 37 3.0000000e+02 4.1766900e+00 0.0000000e+00 3 0 0.0000000e+00 37 +add p Particle Sigma*0 3214 1.3837000e+00 3.6000000e-02 3.5000000e-02 0 3 0.0000000e+00 3214 +add p Particle Xi_cc*+ 4414 3.6564800e+00 0.0000000e+00 0.0000000e+00 3 3 0.0000000e+00 4414 +add p Particle f'_2 335 1.5250000e+00 7.3000000e-02 2.0000000e-01 0 4 0.0000000e+00 335 +add p Particle Xi_b- 5132 5.7905000e+00 0.0000000e+00 0.0000000e+00 -3 1 4.6989749e-01 5132 +add p Particle anti-K_4*0 -319 2.0450000e+00 1.9800000e-01 2.0000000e-01 0 8 0.0000000e+00 0 +add p Particle rho(2S)+ 100213 1.459 4.0000000e-01 5.0000000e-01 3 2 0.0000000e+00 0 +add p Particle eta_c 441 2.9804 2.8600000e-02 1.5000000e-01 0 0 0.0000000e+00 441 +add p Particle D_0*0 10421 2.369 2.7000000e-01 2.9900000e-01 0 0 0.0000000e+00 10421 +add p Particle bu_1 5203 5.4014500e+00 0.0000000e+00 0.0000000e+00 1 2 0.0000000e+00 5203 +add p Particle anti-su_1 -3203 9.2953000e-01 0.0000000e+00 0.0000000e+00 -1 2 0.0000000e+00 -3203 +add p Particle K_2*0 315 1.4324000e+00 1.0900000e-01 7.0000000e-01 0 4 0.0000000e+00 315 +add p Particle anti-Omega_c0 -4332 2.6952000e+00 0.0000000e+00 0.0000000e+00 0 1 2.0558015e-02 -4332 +add p Particle D_s1- -20433 2.4589 1.0000033e-03 1.0000000e-02 -3 2 0.0000000e+00 -20433 +add p Particle anti-deuteron -1000010020 1.8756130e+00 0.0000000e+00 0.0000000e+00 -3 0 0.0000000e+00 0 +add p Particle cd_1 4103 2.0080800e+00 0.0000000e+00 0.0000000e+00 1 2 0.0000000e+00 4103 +add p Particle B_c1+ 10543 7.3000000e+00 0.0000000e+00 6.0000000e-02 3 2 0.0000000e+00 10543 +add p Particle D_s2*+ 435 2.5735 2.0000000e-02 6.0000000e-02 3 4 0.0000000e+00 435 +add p Particle Omega_b- 5332 6.0700000e+00 0.0000000e+00 0.0000000e+00 -3 1 3.4027060e-01 5332 +add p Particle B_c0*- -10541 7.2500000e+00 0.0000000e+00 6.0000000e-02 -3 0 0.0000000e+00 -10541 +add p Particle Upsilon(4S) 300553 1.0579400e+01 2.0500000e-02 3.9000000e-02 0 2 0.0000000e+00 300553 +add p Particle Sigma_b*+ 5224 5.8290000e+00 0.0000000e+00 0.0000000e+00 3 3 0.0000000e+00 5224 +add p Particle anti-Delta0 -2114 1.2320000e+00 1.1800000e-01 1.4000000e-01 0 3 0.0000000e+00 -2114 +add p Particle sd_0 3101 8.0473000e-01 0.0000000e+00 0.0000000e+00 -2 0 0.0000000e+00 3101 +add p Particle anti-sd_0 -3101 8.0473000e-01 0.0000000e+00 0.0000000e+00 2 0 0.0000000e+00 -3101 +add p Particle D_s1+ 20433 2.4589 1.0000033e-03 1.0000000e-02 3 2 0.0000000e+00 20433 +add p Particle Upsilon(2S) 100553 1.0023260e+01 3.2000002e-05 4.0000000e-04 0 2 0.0000000e+00 100553 +add p Particle eta' 331 9.5778000e-01 1.9900000e-04 2.0000000e-03 0 0 0.0000000e+00 331 +add p Particle anti-Sigma(1775)0 -3216 1.7750000e+00 1.2000000e-01 5.0000000e-01 0 5 0.0000000e+00 0 +add p Particle D_10 10423 2.4223 2.7100000e-02 2.7200000e-01 0 2 0.0000000e+00 10423 +add p Particle Sigma_b*0 5214 5.8290000e+00 0.0000000e+00 0.0000000e+00 0 3 0.0000000e+00 5214 +add p Particle K*- -323 8.9166000e-01 5.0800000e-02 2.3000000e-01 -3 2 0.0000000e+00 -323 +add p Particle anti-nu_mu -14 0.0000000e+00 0.0000000e+00 0.0000000e+00 0 1 0.0000000e+00 -14 +add p Particle Sigma_b+ 5222 5.8078000e+00 6.5821220e-06 1.0000000e-04 3 1 0.0000000e+00 5222 +add p Particle anti-K_2*0 -315 1.4324000e+00 1.0900000e-01 7.0000000e-01 0 4 0.0000000e+00 -315 +add p Particle chi_c1 20443 3.5106600e+00 8.6000000e-04 1.0000000e-02 0 2 0.0000000e+00 20443 +add p Particle D'_1+ 20413 2.438 3.8400000e-01 3.0000000e-01 3 2 0.0000000e+00 20413 +add p Particle anti-Xi_b+ -5132 5.7905000e+00 0.0000000e+00 0.0000000e+00 3 1 4.6989749e-01 -5132 +add p Particle anti-Xss -30363 1.8000000e+00 0.0000000e+00 1.0000000e+00 0 2 0.0000000e+00 -30363 +add p Particle D- -411 1.86962 0.0000000e+00 0.0000000e+00 -3 0 3.1178033e-01 -411 +add p Particle B*0 513 5.325 6.5819970e-06 1.0000000e-04 0 2 0.0000000e+00 513 +add p Particle Xu+ 44 1.0000000e+00 0.0000000e+00 0.0000000e+00 3 0 0.0000000e+00 44 +add p Particle B'_s10 20533 5.856 5.0000000e-02 2.0000000e-02 0 2 0.0000000e+00 20533 +add p Particle anti-Xi0 -3322 1.3148600e+00 0.0000000e+00 0.0000000e+00 0 1 8.6941386e+01 -3322 +add p Particle Xi*0 3324 1.5318000e+00 9.1000000e-03 5.0000000e-02 0 3 0.0000000e+00 3324 +add p Particle anti-b-hadron -85 5.0000000e+00 0.0000000e+00 0.0000000e+00 1 0 3.8699999e-01 -85 +add p Particle CLUSjet 97 0.0000000e+00 0.0000000e+00 0.0000000e+00 0 0 0.0000000e+00 97 +add p Particle d 1 9.9000000e-03 0.0000000e+00 0.0000000e+00 -1 1 0.0000000e+00 1 +add p Particle psi(4415) 9020443 4.4210000e+00 6.2000000e-02 8.0000000e-02 0 2 0.0000000e+00 0 +add p Particle B_0*0 10511 5.726 5.0000000e-02 2.0000000e-01 0 0 0.0000000e+00 10511 +add p Particle h'_1 10333 1.3860000e+00 0.0000000e+00 1.0000000e-02 0 2 0.0000000e+00 10333 +add p Particle anti-Xi_c- -4232 2.4678000e+00 0.0000000e+00 0.0000000e+00 -3 1 1.3245433e-01 -4232 +add p Particle anti-b -5 5.0000000e+00 0.0000000e+00 0.0000000e+00 1 1 0.0000000e+00 -5 +add p Particle cu_0 4201 1.9690800e+00 0.0000000e+00 0.0000000e+00 4 0 0.0000000e+00 4201 +add p Particle K_1- -10323 1.2720000e+00 9.0000000e-02 2.0000000e-01 -3 2 0.0000000e+00 -10323 +add p Particle f_1 20223 1.2818000e+00 2.4300000e-02 5.0000000e-02 0 2 0.0000000e+00 20223 +add p Particle omega(2S) 100223 1.4250000e+00 2.1500000e-01 4.0000000e-01 0 2 0.0000000e+00 0 +add p Particle Sigma*+ 3224 1.3828000e+00 3.5800000e-02 3.5000000e-02 3 3 0.0000000e+00 3224 +add p Particle bu_0 5201 5.3889700e+00 0.0000000e+00 0.0000000e+00 1 0 0.0000000e+00 5201 +add p Particle a_1- -20213 1.24 4.2000000e-01 6.0000000e-01 -3 2 0.0000000e+00 -20213 +add p Particle f'_0 30221 1.3500000e+00 3.5000000e-01 3.5000000e-01 0 0 0.0000000e+00 10331 +add p Particle anti-K''*0 -30313 1.7170000e+00 3.2000000e-01 7.0000000e-01 0 2 0.0000000e+00 0 +add p Particle rho(3S)- -30213 1.7200000e+00 2.5000000e-01 5.0000000e-01 -3 2 0.0000000e+00 0 +add p Particle K_2*+ 325 1.4256000e+00 9.8500000e-02 7.0000000e-01 3 4 0.0000000e+00 325 +add p Particle D'_s1- -10433 2.53535 1.0000033e-03 1.0000000e-02 -3 2 0.0000000e+00 -10433 +add p Particle D'_s1+ 10433 2.53535 1.0000033e-03 1.0000000e-02 3 2 0.0000000e+00 10433 +add p Particle K'_1+ 20323 1.402 1.7400000e-01 4.0000000e-01 3 2 0.0000000e+00 20323 +add p Particle anti-Omega_b+ -5332 6.0700000e+00 0.0000000e+00 0.0000000e+00 3 1 3.4027060e-01 -5332 +add p Particle b_1+ 10213 1.2295000e+00 1.4200000e-01 2.5000000e-01 3 2 0.0000000e+00 10213 +add p Particle rho- -213 0.7755 1.4910000e-01 4.8000000e-01 -3 2 0.0000000e+00 -213 +add p Particle B_c*- -543 6.321 0.0000000e+00 0.0000000e+00 -3 2 0.0000000e+00 -543 +add p Particle Upsilon(3S) 200553 1.0355200e+01 2.0299998e-05 2.6000000e-04 0 2 0.0000000e+00 200553 +add p Particle B*+ 523 5.325 6.5819970e-06 1.0000000e-04 3 2 0.0000000e+00 523 +add p Particle Sigma(1660)0 13212 1.6600000e+00 1.0000000e-01 4.0000000e-01 0 1 0.0000000e+00 0 +add p Particle anti-cu_0 -4201 1.9690800e+00 0.0000000e+00 0.0000000e+00 -4 0 0.0000000e+00 -4201 +add p Particle su_1 3203 9.2953000e-01 0.0000000e+00 0.0000000e+00 1 2 0.0000000e+00 3203 +add p Particle f_2 225 1.2754 1.8510000e-01 2.7000000e-01 0 4 0.0000000e+00 225 +add p Particle anti-c-hadron -84 2.0000000e+00 0.0000000e+00 0.0000000e+00 -2 0 1.0000000e-01 -84 +add p Particle a_2- -215 1.3183000e+00 1.0700000e-01 5.0000000e-01 -3 4 0.0000000e+00 -215 +add p Particle c-hadron 84 2.0000000e+00 0.0000000e+00 0.0000000e+00 2 0 1.0000000e-01 84 +add p Particle anti-cd_1 -4103 2.0080800e+00 0.0000000e+00 0.0000000e+00 -1 2 0.0000000e+00 -4103 +add p Particle b' 7 4.0000000e+02 0.0000000e+00 0.0000000e+00 -1 1 0.0000000e+00 7 +add p Particle anti-Sigma_b*- -5224 5.8290000e+00 0.0000000e+00 0.0000000e+00 -3 3 0.0000000e+00 -5224 +add p Particle anti-t -6 1.7500000e+02 1.3981600e+00 1.3981560e+01 -2 1 0.0000000e+00 -6 +add p Particle t 6 1.7500000e+02 1.3981600e+00 1.3981560e+01 2 1 0.0000000e+00 6 +add p Particle pi+ 211 1.3957018e-01 0.0000000e+00 0.0000000e+00 3 0 7.8056061e+03 211 +add p Particle anti-Lambda(1690)0 -13124 1.6900000e+00 6.0000000e-02 3.0000000e-01 0 3 0.0000000e+00 0 +add p Particle Delta0 2114 1.2320000e+00 1.1800000e-01 1.4000000e-01 0 3 0.0000000e+00 2114 +add p Particle B- -521 5.27915 0.0000000e+00 0.0000000e+00 -3 0 4.9203926e-01 -521 +add p Particle ud_1 2103 7.7133000e-01 0.0000000e+00 0.0000000e+00 1 2 0.0000000e+00 2103 +add p Particle Z''0 33 9.0000000e+02 0.0000000e+00 0.0000000e+00 0 2 0.0000000e+00 33 +add p Particle anti-ss_1 -3303 1.0936100e+00 0.0000000e+00 0.0000000e+00 2 2 0.0000000e+00 -3303 +add p Particle anti-cd_0 -4101 1.9690800e+00 0.0000000e+00 0.0000000e+00 -1 0 0.0000000e+00 -4101 +add p Particle anti-cs_0 -4301 2.1543200e+00 0.0000000e+00 0.0000000e+00 -1 0 0.0000000e+00 -4301 +add p Particle D_s+ 431 1.9682 0.0000000e+00 0.0000000e+00 3 0 1.4985341e-01 431 +add p Particle anti-D_2*0 -425 2.4611 4.9000000e-02 3.0900000e-01 0 4 0.0000000e+00 -425 +add p Particle L- 17 4.0000000e+02 0.0000000e+00 0.0000000e+00 -3 1 0.0000000e+00 17 +add p Particle omega 223 7.8265000e-01 8.4899999e-03 1.8000000e-01 0 2 0.0000000e+00 223 +add p Particle e- 11 5.1099891e-04 0.0000000e+00 0.0000000e+00 -3 1 0.0000000e+00 11 +add p Particle a_20 115 1.3183000e+00 1.0700000e-01 5.0000000e-01 0 4 0.0000000e+00 115 +add p Particle t' 8 4.0000000e+02 0.0000000e+00 0.0000000e+00 2 1 0.0000000e+00 8 +add p Particle cs_0 4301 2.1543200e+00 0.0000000e+00 0.0000000e+00 1 0 0.0000000e+00 4301 +add p Particle pi(2S)+ 100211 1.3000000e+00 4.0000000e-01 5.0000000e-01 3 0 0.0000000e+00 0 +add p Particle cu_1 4203 2.0080800e+00 0.0000000e+00 0.0000000e+00 4 2 0.0000000e+00 4203 +add p Particle Sigma_b0 5212 5.8000000e+00 6.5821220e-06 1.0000000e-04 0 1 0.0000000e+00 5212 +add p Particle anti-su_0 -3201 8.0473000e-01 0.0000000e+00 0.0000000e+00 -1 0 0.0000000e+00 -3201 +add p Particle anti-D'_10 -20423 2.438 3.8400000e-01 3.0000000e-01 0 2 0.0000000e+00 -20423 +add p Particle anti-Sigma_c- -4212 2.4529000e+00 1.6455309e-03 2.4680000e-02 -3 1 0.0000000e+00 -4212 +add p Particle chi_b1(2P) 120553 10.25546 0.0000000e+00 0.0000000e+00 0 2 0.0000000e+00 120553 +add p Particle bd_0 5101 5.3889700e+00 0.0000000e+00 0.0000000e+00 -2 0 0.0000000e+00 5101 +add p Particle Omega_cc*+ 4434 3.8246600e+00 0.0000000e+00 0.0000000e+00 3 3 0.0000000e+00 4434 +add p Particle anti-Lambda(1670)0 -33122 1.6700000e+00 3.5000000e-02 1.8000000e-01 0 1 0.0000000e+00 0 +add p Particle nu_e 12 0.0000000e+00 0.0000000e+00 0.0000000e+00 0 1 0.0000000e+00 12 +add p Particle CMshower 94 0.0000000e+00 0.0000000e+00 0.0000000e+00 0 0 0.0000000e+00 94 +add p Particle su_0 3201 8.0473000e-01 0.0000000e+00 0.0000000e+00 1 0 0.0000000e+00 3201 +add p Particle Omega_b*- 5334 6.1300000e+00 0.0000000e+00 0.0000000e+00 -3 3 0.0000000e+00 5334 +add p Particle eta_b(2S) 100551 9.996 0.0000000e+00 0.0000000e+00 0 0 0.0000000e+00 0 +add p Particle h_c 10443 3.52593 0.0000000e+00 2.0000000e-02 0 2 0.0000000e+00 10443 +add p Particle W+ 24 8.0399000e+01 2.0800000e+00 1.0000000e+01 3 2 0.0000000e+00 24 +add p Particle a_2+ 215 1.3183000e+00 1.0700000e-01 5.0000000e-01 3 4 0.0000000e+00 215 +add p Particle K_0*- -10321 1.414 2.7000000e-01 6.0000000e-01 -3 0 0.0000000e+00 -10321 +add p Particle Upsilon_3(1D) 557 10.1651 0.0000000e+00 0.0000000e+00 0 6 0.0000000e+00 557 +add p Particle eta_b2(1D) 10555 10.158 0.0000000e+00 0.0000000e+00 0 4 0.0000000e+00 10555 +add p Particle cluster 91 0.0000000e+00 0.0000000e+00 0.0000000e+00 0 0 0.0000000e+00 91 +add p Particle D*0 423 2.0067 6.5821023e-06 3.0000000e-04 0 2 0.0000000e+00 423 +add p Particle Sigma_c*0 4114 2.5180000e+00 1.6100000e-02 9.1900000e-02 0 3 0.0000000e+00 4114 +add p Particle K_3*- -327 1.7760000e+00 1.5900000e-01 7.0000000e-01 -3 6 0.0000000e+00 0 +add p Particle anti-rndmflav -82 0.0000000e+00 0.0000000e+00 0.0000000e+00 0 0 0.0000000e+00 -82 +add p Particle anti-Sigma_c*0 -4114 2.5180000e+00 1.6100000e-02 9.1900000e-02 0 3 0.0000000e+00 -4114 +add p Particle anti-K_10 -10313 1.2720000e+00 9.0000000e-02 2.0000000e-01 0 2 0.0000000e+00 -10313 +add p Particle omega(1650) 30223 1.6700000e+00 3.1500000e-01 0.0000000e+00 0 2 0.0000000e+00 0 +add p Particle anti-t' -8 4.0000000e+02 0.0000000e+00 0.0000000e+00 -2 1 0.0000000e+00 -8 +add p Particle Lambda_b0 5122 5.6202000e+00 0.0000000e+00 0.0000000e+00 0 1 4.2717954e-01 5122 +add p Particle chi_b0(3P) 210551 1.0500700e+01 0.0000000e+00 0.0000000e+00 0 0 0.0000000e+00 210551 +add p Particle anti-Omega+ -3334 1.6724500e+00 0.0000000e+00 0.0000000e+00 3 3 2.4612961e+01 -3334 +add p Particle bs_1 5303 5.5753600e+00 0.0000000e+00 0.0000000e+00 -2 2 0.0000000e+00 5303 +add p Particle tritium 1000010030 2.8092500e+00 0.0000000e+00 0.0000000e+00 3 0 0.0000000e+00 0 +add p Particle Lambda(1670)0 33122 1.6700000e+00 3.5000000e-02 1.8000000e-01 0 1 0.0000000e+00 0 +add p Particle anti-cc_1 -4403 3.2753100e+00 0.0000000e+00 0.0000000e+00 -4 2 0.0000000e+00 -4403 +add p Particle anti-Sigma(1670)0 -13214 1.6700000e+00 6.0000000e-02 3.0000000e-01 0 3 0.0000000e+00 0 +add p Particle B_s0 531 5.3663000e+00 0.0000000e+00 0.0000000e+00 0 0 4.4151442e-01 531 +add p Particle A0 36 3.0000000e+02 3.3752000e+00 0.0000000e+00 0 0 0.0000000e+00 36 +add p Particle anti-Lambda_c(2625)- -4124 2.6281000e+00 0.0000000e+00 2.8500000e-02 -3 3 0.0000000e+00 0 +add p Particle THRUaxis 96 0.0000000e+00 0.0000000e+00 0.0000000e+00 0 0 0.0000000e+00 96 +add p Particle chi_b2(2P) 100555 10.26865 0.0000000e+00 0.0000000e+00 0 4 0.0000000e+00 100555 +add p Particle SPHEaxis 95 0.0000000e+00 0.0000000e+00 0.0000000e+00 0 0 0.0000000e+00 95 +add p Particle B'_c1- -20543 7.3000000e+00 0.0000000e+00 2.0000000e-01 -3 2 0.0000000e+00 -20543 +add p Particle string 92 0.0000000e+00 0.0000000e+00 0.0000000e+00 0 0 0.0000000e+00 92 +add p Particle eta(2S) 100221 1.2940000e+00 5.5000000e-02 2.0000000e-01 0 0 0.0000000e+00 0 +add p Particle Xi'_c0 4312 2.5779000e+00 0.0000000e+00 0.0000000e+00 0 1 0.0000000e+00 4312 +add p Particle cc_1 4403 3.2753100e+00 0.0000000e+00 0.0000000e+00 4 2 0.0000000e+00 4403 +add p Particle anti-Xi_c0 -4132 2.4708800e+00 0.0000000e+00 0.0000000e+00 0 1 3.3450330e-02 -4132 +add p Particle anti-D(2S)0 -100421 2.5800000e+00 0.0000000e+00 0.0000000e+00 0 0 0.0000000e+00 0 +add p Particle a_00 9000111 0.999 7.5000000e-02 5.0000000e-02 0 0 0.0000000e+00 10111 +add p Particle Delta+ 2214 1.2320000e+00 1.1800000e-01 1.4000000e-01 3 3 0.0000000e+00 2214 +add p Particle sd_1 3103 9.2953000e-01 0.0000000e+00 0.0000000e+00 -2 2 0.0000000e+00 3103 +add p Particle pi(2S)- -100211 1.3000000e+00 4.0000000e-01 5.0000000e-01 -3 0 0.0000000e+00 0 +add p Particle bb_1 5503 1.0073540e+01 0.0000000e+00 0.0000000e+00 -2 2 0.0000000e+00 5503 +add p Particle K_3*+ 327 1.7760000e+00 1.5900000e-01 7.0000000e-01 3 6 0.0000000e+00 0 +add p Particle anti-bs_1 -5303 5.5753600e+00 0.0000000e+00 0.0000000e+00 2 2 0.0000000e+00 -5303 +add p Particle cs_1 4303 2.1796700e+00 0.0000000e+00 0.0000000e+00 1 2 0.0000000e+00 4303 +add p Particle anti-bu_1 -5203 5.4014500e+00 0.0000000e+00 0.0000000e+00 -1 2 0.0000000e+00 -5203 +add p Particle phi(1680) 100333 1.6800000e+00 1.5000000e-01 0.0000000e+00 0 2 0.0000000e+00 0 +add p Particle Sigma_c++ 4222 2.4540300e+00 2.2300000e-03 2.7000000e-02 6 1 0.0000000e+00 4222 +add p Particle Xss 30363 1.8000000e+00 0.0000000e+00 1.0000000e+00 0 2 0.0000000e+00 30363 +add p Particle anti-Omega_cc*- -4434 3.8246600e+00 0.0000000e+00 0.0000000e+00 -3 3 0.0000000e+00 -4434 +add p Particle anti-sd_1 -3103 9.2953000e-01 0.0000000e+00 0.0000000e+00 2 2 0.0000000e+00 -3103 +add p Particle W'+ 34 5.0000000e+02 0.0000000e+00 0.0000000e+00 3 2 0.0000000e+00 34 +add p Particle Sigma(1670)0 13214 1.6700000e+00 6.0000000e-02 3.0000000e-01 0 3 0.0000000e+00 0 +add p Particle bd_1 5103 5.4014500e+00 0.0000000e+00 0.0000000e+00 -2 2 0.0000000e+00 5103 +add p Particle anti-B0 -511 5.27953 0.0000000e+00 0.0000000e+00 0 0 4.5547414e-01 -511 +add p Particle phi 333 1.01946 4.2600000e-03 3.2000000e-02 0 2 0.0000000e+00 333 +add p Particle B0 511 5.27953 0.0000000e+00 0.0000000e+00 0 0 4.5547414e-01 511 +add p Particle system 90 0.0000000e+00 0.0000000e+00 0.0000000e+00 0 0 0.0000000e+00 90 +add p Particle Xi_c*0 4314 2.6459000e+00 0.0000000e+00 0.0000000e+00 0 3 0.0000000e+00 4314 +add p Particle anti-Xi_c*- -4324 2.6459000e+00 0.0000000e+00 0.0000000e+00 -3 3 0.0000000e+00 -4324 +add p Particle Lambda(1600)0 23122 1.6000000e+00 1.5000000e-01 2.5000000e-01 0 1 0.0000000e+00 0 +add p Particle anti-Lambda(1520)0 -3124 1.5195000e+00 1.5600000e-02 1.8000000e-01 0 3 0.0000000e+00 0 +add p Particle anti-B_s*0 -533 5.4128 6.5821220e-06 1.0000000e-04 0 2 0.0000000e+00 -533 +add p Particle Higgs0 25 1.2500000e+02 3.7400000e-03 0.0000000e+00 0 0 0.0000000e+00 25 +add p Particle D(2S)0 100421 2.5800000e+00 0.0000000e+00 0.0000000e+00 0 0 0.0000000e+00 0 +add p Particle Xi_cc*++ 4424 3.6564800e+00 0.0000000e+00 0.0000000e+00 6 3 0.0000000e+00 4424 +add p Particle anti-R0 -41 5.0000000e+03 0.0000000e+00 4.1729150e+03 0 2 0.0000000e+00 -41 +add p Particle psi(3770) 30443 3.7711 2.7300000e-02 3.0000000e-02 0 2 0.0000000e+00 30443 +add p Particle B_2*- -525 5.7468 2.3000000e-02 2.0000000e-01 -3 4 0.0000000e+00 -525 +add p Particle anti-Xi*0 -3324 1.5318000e+00 9.1000000e-03 5.0000000e-02 0 3 0.0000000e+00 -3324 +add p Particle rho+ 213 0.7755 1.4910000e-01 4.8000000e-01 3 2 0.0000000e+00 213 +add p Particle K'*+ 100323 1.4140000e+00 2.3200000e-01 6.0000000e-01 3 2 0.0000000e+00 0 +add p Particle R0 41 5.0000000e+03 0.0000000e+00 4.1729150e+03 0 2 0.0000000e+00 41 +add p Particle Xsu 30353 1.6000000e+00 0.0000000e+00 1.0000000e+00 3 2 0.0000000e+00 30353 +add p Particle anti-Xsu -30353 1.6000000e+00 0.0000000e+00 1.0000000e+00 -3 2 0.0000000e+00 -30353 +add p Particle anti-Sigma+ -3112 1.1974490e+00 0.0000000e+00 0.0000000e+00 3 1 4.4349875e+01 -3112 +add p Particle Lambda_c(2625)+ 4124 2.6281000e+00 0.0000000e+00 2.8500000e-02 3 3 0.0000000e+00 0 +add p Particle Xi'_c+ 4322 2.5756000e+00 0.0000000e+00 0.0000000e+00 3 1 0.0000000e+00 4322 +add p Particle anti-K_3*0 -317 1.7760000e+00 1.5900000e-01 7.0000000e-01 0 6 0.0000000e+00 0 +add p Particle Lambda(1520)0 3124 1.5195000e+00 1.5600000e-02 1.8000000e-01 0 3 0.0000000e+00 0 +add p Particle anti-B_s0*0 -10531 5.818 5.0000000e-02 6.5000000e-02 0 0 0.0000000e+00 -10531 +add p Particle Sigma(1775)0 3216 1.7750000e+00 1.2000000e-01 5.0000000e-01 0 5 0.0000000e+00 0 +add p Particle tau+ -15 1.7768200e+00 0.0000000e+00 0.0000000e+00 3 1 8.7133309e-02 -15 +add p Particle anti-Sigma- -3222 1.1893700e+00 0.0000000e+00 0.0000000e+00 -3 1 2.4041533e+01 -3222 +add p Particle K_4*0 319 2.0450000e+00 1.9800000e-01 2.0000000e-01 0 8 0.0000000e+00 0 +add p Particle D'_1- -20413 2.438 3.8400000e-01 3.0000000e-01 -3 2 0.0000000e+00 -20413 +add p Particle B_2*+ 525 5.7468 2.3000000e-02 2.0000000e-01 3 4 0.0000000e+00 525 +add p Particle anti-He3 -1000020030 2.8092300e+00 0.0000000e+00 0.0000000e+00 -6 0 0.0000000e+00 0 +add p Particle anti-K'_10 -20313 1.402 1.7400000e-01 4.0000000e-01 0 2 0.0000000e+00 -20313 +add p Particle Z(4430)- -9042413 4.4330000e+00 3.1700598e-04 0.0000000e+00 -3 2 0.0000000e+00 -9042413 +add p Particle D_2*+ 415 2.459 3.7000000e-02 3.1200000e-01 3 4 0.0000000e+00 415 +add p Particle Z0 23 9.1187600e+01 2.4952000e+00 1.0000000e+01 0 2 0.0000000e+00 23 +add p Particle Xi0 3322 1.3148600e+00 0.0000000e+00 0.0000000e+00 0 1 8.6941386e+01 3322 +add p Particle chi_c2 445 3.5562000e+00 1.9700000e-03 6.0000000e-03 0 4 0.0000000e+00 445 +add p Particle B_s0*0 10531 5.818 5.0000000e-02 6.5000000e-02 0 0 0.0000000e+00 10531 +add p Particle anti-Omega_b*+ -5334 6.1300000e+00 0.0000000e+00 0.0000000e+00 3 3 0.0000000e+00 -5334 +add p Particle Xsd 30343 1.6000000e+00 0.0000000e+00 1.0000000e+00 0 2 0.0000000e+00 30343 +add p Particle bc_1 5403 6.6739700e+00 0.0000000e+00 0.0000000e+00 1 2 0.0000000e+00 5403 +add p Particle anti-bc_1 -5403 6.6739700e+00 0.0000000e+00 0.0000000e+00 -1 2 0.0000000e+00 -5403 +add p Particle Xi_c*+ 4324 2.6459000e+00 0.0000000e+00 0.0000000e+00 3 3 0.0000000e+00 4324 +add p Particle anti-Sigma_b- -5222 5.8078000e+00 6.5821220e-06 1.0000000e-04 -3 1 0.0000000e+00 -5222 +add p Particle bs_0 5301 5.5672500e+00 0.0000000e+00 0.0000000e+00 -2 0 0.0000000e+00 5301 +add p Particle chi_b1 20553 9.89278 9.8928000e+00 0.0000000e+00 0 2 0.0000000e+00 20553 +add p Particle Omega_c0 4332 2.6952000e+00 0.0000000e+00 0.0000000e+00 0 1 2.0558015e-02 4332 +add p Particle chi_b0(2P) 110551 1.0232500e+01 0.0000000e+00 0.0000000e+00 0 0 0.0000000e+00 110551 +add p Particle anti-D0 -421 1.86484 0.0000000e+00 0.0000000e+00 0 0 1.2296383e-01 -421 +add p Particle anti-Xsd -30343 1.6000000e+00 0.0000000e+00 1.0000000e+00 0 2 0.0000000e+00 -30343 +add p Particle anti-cu_1 -4203 2.0080800e+00 0.0000000e+00 0.0000000e+00 -4 2 0.0000000e+00 -4203 +add p Particle K0 311 0.497648 0.0000000e+00 0.0000000e+00 0 0 0.0000000e+00 311 +add p Particle psi(2S) 100443 3.686093 3.0400000e-04 8.0000000e-04 0 2 0.0000000e+00 100443 +add p Particle anti-B_2*0 -515 5.7468 2.3000000e-02 2.0000000e-01 0 4 0.0000000e+00 -515 +add p Particle mu- 13 1.0565837e-01 0.0000000e+00 0.0000000e+00 -3 1 6.5875415e+05 13 +add p Particle anti-Xi'_b+ -5312 5.9600000e+00 6.5821220e-06 1.0000000e-04 3 1 0.0000000e+00 -5312 +add p Particle anti-tritium -1000010030 2.8092500e+00 0.0000000e+00 0.0000000e+00 -3 0 0.0000000e+00 0 +add p Particle u 2 5.6000000e-03 0.0000000e+00 0.0000000e+00 2 1 0.0000000e+00 2 +add p Particle Xi_b*0 5324 5.9700000e+00 0.0000000e+00 0.0000000e+00 0 3 0.0000000e+00 5324 +add p Particle ud_0 2101 5.7933000e-01 0.0000000e+00 0.0000000e+00 1 0 0.0000000e+00 2101 +add p Particle anti-bc_0 -5401 6.6714300e+00 0.0000000e+00 0.0000000e+00 -1 0 0.0000000e+00 -5401 +add p Particle K_3*0 317 1.7760000e+00 1.5900000e-01 7.0000000e-01 0 6 0.0000000e+00 0 +add p Particle anti-ud_0 -2101 5.7933000e-01 0.0000000e+00 0.0000000e+00 -1 0 0.0000000e+00 -2101 +add p Particle rho(3S)+ 30213 1.7200000e+00 2.5000000e-01 5.0000000e-01 3 2 0.0000000e+00 0 +add p Particle anti-Omega_cc- -4432 3.7866300e+00 0.0000000e+00 0.0000000e+00 -3 1 1.0000000e-01 -4432 +add p Particle Sigma+ 3222 1.1893700e+00 0.0000000e+00 0.0000000e+00 3 1 2.4041533e+01 3222 +add p Particle anti-Sigma_c0 -4112 2.4537600e+00 2.3000000e-03 2.4000000e-02 0 1 0.0000000e+00 -4112 +add p Particle Sigma_c+ 4212 2.4529000e+00 1.6455309e-03 2.4680000e-02 3 1 0.0000000e+00 4212 +add p Particle He3 1000020030 2.8092300e+00 0.0000000e+00 0.0000000e+00 6 0 0.0000000e+00 0 +add p Particle anti-Lambda0 -3122 1.1156830e+00 0.0000000e+00 0.0000000e+00 0 1 7.8911214e+01 -3122 +add p Particle D0 421 1.86484 0.0000000e+00 0.0000000e+00 0 0 1.2296383e-01 421 +add p Particle Upsilon_2(1D) 20555 10.1611 0.0000000e+00 0.0000000e+00 0 4 0.0000000e+00 20555 +add p Particle psi(4040) 9000443 4.0390000e+00 8.0000000e-02 1.0000000e-01 0 2 0.0000000e+00 0 +add p Particle B_s0L 350 5.3663000e+00 0.0000000e+00 0.0000000e+00 0 0 4.2184546e-01 0 +add p Particle Xi'_b- 5312 5.9600000e+00 6.5821220e-06 1.0000000e-04 -3 1 0.0000000e+00 5312 +add p Particle anti-Xi'_c- -4322 2.5756000e+00 0.0000000e+00 0.0000000e+00 -3 1 0.0000000e+00 -4322 +add p Particle anti-bu_0 -5201 5.3889700e+00 0.0000000e+00 0.0000000e+00 -1 0 0.0000000e+00 -5201 +add p Particle Xu- -44 1.0000000e+00 0.0000000e+00 0.0000000e+00 -3 0 0.0000000e+00 -44 +add p Particle Sigma_c0 4112 2.4537600e+00 2.3000000e-03 2.4000000e-02 0 1 0.0000000e+00 4112 +add p Particle K'*- -100323 1.4140000e+00 2.3200000e-01 6.0000000e-01 -3 2 0.0000000e+00 0 +add p Particle table 99 0.0000000e+00 0.0000000e+00 0.0000000e+00 0 0 0.0000000e+00 99 +add p Particle Higgs'0 35 3.0000000e+02 8.3884200e+00 0.0000000e+00 0 0 0.0000000e+00 35 +add p Particle anti-bs_0 -5301 5.5672500e+00 0.0000000e+00 0.0000000e+00 2 0 0.0000000e+00 -5301 +add p Particle Sigma- 3112 1.1974490e+00 0.0000000e+00 0.0000000e+00 -3 1 4.4349875e+01 3112 +add p Particle anti-Sigma_b*0 -5214 5.8290000e+00 0.0000000e+00 0.0000000e+00 0 3 0.0000000e+00 -5214 +add p Particle anti-B_10 -10513 5.7206 5.0000000e-02 2.0000000e-01 0 2 0.0000000e+00 -10513 +add p Particle anti-s -3 1.9900000e-01 0.0000000e+00 0.0000000e+00 1 1 0.0000000e+00 -3 +add p Particle anti-Xi'_b0 -5322 5.9600000e+00 6.5821220e-06 1.0000000e-04 0 1 0.0000000e+00 -5322 +add p Particle chi_b0 10551 9.85944 0.0000000e+00 0.0000000e+00 0 0 0.0000000e+00 10551 +add p Particle D_1+ 10413 2.4234 2.0000000e-02 2.7000000e-01 3 2 0.0000000e+00 10413 +add p Particle J/psi 443 3.0969160e+00 9.2900000e-05 2.0000000e-04 0 2 0.0000000e+00 443 +add p Particle eta 221 0.54751 0.0000000e+00 0.0000000e+00 0 0 0.0000000e+00 221 +add p Particle specflav 81 0.0000000e+00 0.0000000e+00 0.0000000e+00 0 0 0.0000000e+00 81 +add p Particle W- -24 8.0399000e+01 2.0800000e+00 1.0000000e+01 -3 2 0.0000000e+00 -24 +add p Particle nu_mu 14 0.0000000e+00 0.0000000e+00 0.0000000e+00 0 1 0.0000000e+00 14 +add p Particle p+ 2212 9.3827201e-01 0.0000000e+00 0.0000000e+00 3 1 0.0000000e+00 2212 +add p Particle anti-Sigma*- -3224 1.3828000e+00 3.5800000e-02 3.5000000e-02 -3 3 0.0000000e+00 -3224 +add p Particle Omega_c*0 4334 2.7659000e+00 0.0000000e+00 0.0000000e+00 0 3 0.0000000e+00 4334 +add p Particle Xi_b*- 5314 5.9700000e+00 0.0000000e+00 0.0000000e+00 -3 3 0.0000000e+00 5314 +add p Particle pi0 111 0.1349776 0.0000000e+00 0.0000000e+00 0 0 0.0000000e+00 111 +add p Particle D_s*- -433 2.112 6.5821023e-06 1.0000000e-04 -3 2 0.0000000e+00 -433 +add p Particle a_0+ 9000211 0.999 7.5000000e-02 5.0000000e-02 3 0 0.0000000e+00 10211 +add p Particle nu_L 18 4.0000000e+02 0.0000000e+00 0.0000000e+00 0 1 0.0000000e+00 18 +add p Particle Xi_c+ 4232 2.4678000e+00 0.0000000e+00 0.0000000e+00 3 1 1.3245433e-01 4232 +add p Particle K_0*+ 10321 1.414 2.7000000e-01 6.0000000e-01 3 0 0.0000000e+00 10321 +add p Particle rho(2S)- -100213 1.459 4.0000000e-01 5.0000000e-01 -3 2 0.0000000e+00 0 +add p Particle eta_b 551 9.397 0.0000000e+00 0.0000000e+00 0 0 0.0000000e+00 551 +add p Particle ss_1 3303 1.0936100e+00 0.0000000e+00 0.0000000e+00 -2 2 0.0000000e+00 3303 +add p Particle anti-d -1 9.9000000e-03 0.0000000e+00 0.0000000e+00 1 1 0.0000000e+00 -1 +add p Particle anti-Xi_b*+ -5314 5.9700000e+00 0.0000000e+00 0.0000000e+00 3 3 0.0000000e+00 -5314 +add p Particle anti-K*0 -313 0.896 4.8700000e-02 2.3000000e-01 0 2 0.0000000e+00 -313 +add p Particle anti-B_s0 -531 5.3663000e+00 0.0000000e+00 0.0000000e+00 0 0 4.4151442e-01 -531 +add p Particle Delta- 1114 1.2320000e+00 1.1800000e-01 1.4000000e-01 -3 3 0.0000000e+00 1114 +add p Particle anti-n0 -2112 9.3956535e-01 0.0000000e+00 0.0000000e+00 0 1 2.6430554e+14 -2112 +add p Particle W'- -34 5.0000000e+02 0.0000000e+00 0.0000000e+00 -3 2 0.0000000e+00 -34 +add p Particle B_c0*+ 10541 7.2500000e+00 0.0000000e+00 6.0000000e-02 3 0 0.0000000e+00 10541 +add p Particle B_s2*0 535 5.8396 5.0245206e-02 2.9000000e-02 0 4 0.0000000e+00 535 +add p Particle X_1(3872) 9920443 3.8722000e+00 3.1700598e-04 2.9000000e-03 0 2 0.0000000e+00 9920443 +add p Particle anti-Sigma_c-- -4222 2.4540300e+00 2.2300000e-03 2.7000000e-02 -6 1 0.0000000e+00 -4222 +add p Particle anti-B_s2*0 -535 5.8396 5.0245206e-02 2.9000000e-02 0 4 0.0000000e+00 -535 +add p Particle Delta++ 2224 1.2320000e+00 1.1800000e-01 1.4000000e-01 6 3 0.0000000e+00 2224 +add p Particle Upsilon_2(2D) 120555 10.441 0.0000000e+00 0.0000000e+00 0 4 0.0000000e+00 120555 +add p Particle chi_c0 10441 3.41476 1.0400000e-02 5.0000000e-02 0 0 0.0000000e+00 10441 +add p Particle Xu0 43 1.0000000e+00 0.0000000e+00 0.0000000e+00 0 0 0.0000000e+00 43 +add p Particle anti-Xi'_c0 -4312 2.5779000e+00 0.0000000e+00 0.0000000e+00 0 1 0.0000000e+00 -4312 +add p Particle chi_b2 555 9.91221 0.0000000e+00 0.0000000e+00 0 4 0.0000000e+00 555 +add p Particle B'_c1+ 20543 7.3000000e+00 0.0000000e+00 2.0000000e-01 3 2 0.0000000e+00 20543 +add p Particle deuteron 1000010020 1.8756130e+00 0.0000000e+00 0.0000000e+00 3 0 0.0000000e+00 0 +add p Particle anti-Lambda(1810)0 -53122 1.8100000e+00 1.5000000e-01 4.6000000e-01 0 1 0.0000000e+00 0 +add p Particle B_c*+ 543 6.321 0.0000000e+00 0.0000000e+00 3 2 0.0000000e+00 543 +add p Particle B_c2*+ 545 7.3500000e+00 0.0000000e+00 6.0000000e-02 3 4 0.0000000e+00 545 +add p Particle Xi*- 3314 1.5350000e+00 9.9000000e-03 5.0000000e-02 -3 3 0.0000000e+00 3314 +add p Particle f_0(1500) 9030221 1.507 1.0900000e-01 3.0000000e-01 0 0 0.0000000e+00 0 +add p Particle anti-Delta+ -1114 1.2320000e+00 1.1800000e-01 1.4000000e-01 3 3 0.0000000e+00 -1114 +add p Particle Sigma0 3212 1.1926420e+00 8.9000000e-06 1.3000000e-04 0 1 0.0000000e+00 3212 +add p Particle Z(4430)+ 9042413 4.4330000e+00 3.1700598e-04 0.0000000e+00 3 2 0.0000000e+00 9042413 +add p Particle B_c+ 541 6.2770000e+00 0.0000000e+00 0.0000000e+00 3 0 1.3610824e-01 541 +add p Particle B_s*0 533 5.4128 6.5821220e-06 1.0000000e-04 0 2 0.0000000e+00 533 +add p Particle rho(2S)0 100113 1.459 4.0000000e-01 5.0000000e-01 0 2 0.0000000e+00 0 +add p Particle anti-alpha -1000020040 3.7274170e+00 0.0000000e+00 0.0000000e+00 -6 0 0.0000000e+00 0 +add p Particle dd_1 1103 7.7133000e-01 0.0000000e+00 0.0000000e+00 -2 2 0.0000000e+00 1103 +add p Particle Xi- 3312 1.3217100e+00 0.0000000e+00 0.0000000e+00 -3 1 4.9093768e+01 3312 +add p Particle Lambda(1820)0 3126 1.8200000e+00 8.0000000e-02 4.0000000e-01 0 5 0.0000000e+00 0 +add p Particle anti-Sigma_b0 -5212 5.8000000e+00 6.5821220e-06 1.0000000e-04 0 1 0.0000000e+00 -5212 +add p Particle anti-Sigma_b+ -5112 5.8152000e+00 6.5821220e-06 1.0000000e-04 3 1 0.0000000e+00 -5112 +add p Particle cd_0 4101 1.9690800e+00 0.0000000e+00 0.0000000e+00 1 0 0.0000000e+00 4101 +add p Particle anti-cs_1 -4303 2.1796700e+00 0.0000000e+00 0.0000000e+00 -1 2 0.0000000e+00 -4303 +add p Particle K_1+ 10323 1.2720000e+00 9.0000000e-02 2.0000000e-01 3 2 0.0000000e+00 10323 +add p Particle Higgs- -37 3.0000000e+02 4.1766900e+00 0.0000000e+00 -3 0 0.0000000e+00 -37 +add p Particle anti-K_0*0 -10311 1.414 2.7000000e-01 6.0000000e-01 0 0 0.0000000e+00 -10311 +add p Particle anti-Xi_c*0 -4314 2.6459000e+00 0.0000000e+00 0.0000000e+00 0 3 0.0000000e+00 -4314 +add p Particle anti-Xi+ -3312 1.3217100e+00 0.0000000e+00 0.0000000e+00 3 1 4.9093768e+01 -3312 +add p Particle anti-D*(2S)0 -100423 2.6400000e+00 0.0000000e+00 0.0000000e+00 0 2 0.0000000e+00 0 +add p Particle anti-dd_1 -1103 7.7133000e-01 0.0000000e+00 0.0000000e+00 2 2 0.0000000e+00 -1103 +add p Particle anti-b' -7 4.0000000e+02 0.0000000e+00 0.0000000e+00 1 1 0.0000000e+00 -7 +add p Particle a_0- -9000211 0.999 7.5000000e-02 5.0000000e-02 -3 0 0.0000000e+00 -10211 +add p Particle anti-nu_tau -16 0.0000000e+00 0.0000000e+00 0.0000000e+00 0 1 0.0000000e+00 -16 +add p Particle Z'0 32 5.0000000e+02 0.0000000e+00 0.0000000e+00 0 2 0.0000000e+00 32 +add p Particle g 21 0.0000000e+00 0.0000000e+00 0.0000000e+00 0 2 0.0000000e+00 21 +add p Particle nu_tau 16 0.0000000e+00 0.0000000e+00 0.0000000e+00 0 1 0.0000000e+00 16 +add p Particle c 4 1.3500000e+00 0.0000000e+00 0.0000000e+00 2 1 0.0000000e+00 4 +add p Particle Upsilon_3(2D) 100557 10.444 0.0000000e+00 0.0000000e+00 0 6 0.0000000e+00 100557 +add p Particle Lambda(1690)0 13124 1.6900000e+00 6.0000000e-02 3.0000000e-01 0 3 0.0000000e+00 0 +add p Particle f_0 9010221 0.965 7.0000000e-02 5.0000000e-03 0 0 0.0000000e+00 10221 +add p Particle pi(2S)0 100111 1.3000000e+00 4.0000000e-01 5.0000000e-01 0 0 0.0000000e+00 0 +add p Particle Sigma_c*+ 4214 2.5175000e+00 2.0000000e-03 3.0000000e-02 3 3 0.0000000e+00 4214 +add p Particle Sigma(1750)0 23212 1.7500000e+00 9.0000000e-02 4.5000000e-01 0 1 0.0000000e+00 0 +add p Particle D_1- -10413 2.4234 2.0000000e-02 2.7000000e-01 -3 2 0.0000000e+00 -10413 +add p Particle anti-bd_0 -5101 5.3889700e+00 0.0000000e+00 0.0000000e+00 2 0 0.0000000e+00 -5101 +add p Particle B_c1- -10543 7.3000000e+00 0.0000000e+00 6.0000000e-02 -3 2 0.0000000e+00 -10543 +add p Particle D(2S)+ 100411 2.5800000e+00 0.0000000e+00 0.0000000e+00 3 0 0.0000000e+00 0 +add p Particle anti-Sigma_c*- -4214 2.5175000e+00 2.0000000e-03 3.0000000e-02 -3 3 0.0000000e+00 -4214 +add p Particle anti-Lambda_b0 -5122 5.6202000e+00 0.0000000e+00 0.0000000e+00 0 1 4.2717954e-01 -5122 +add p Particle rho(3S)0 30113 1.7200000e+00 2.5000000e-01 5.0000000e-01 0 2 0.0000000e+00 0 +add p Particle anti-bb_1 -5503 1.0073540e+01 0.0000000e+00 0.0000000e+00 2 2 0.0000000e+00 -5503 +add p Particle Sigma_b- 5112 5.8152000e+00 6.5821220e-06 1.0000000e-04 -3 1 0.0000000e+00 5112 +add p Particle anti-Sigma(1750)0 -23212 1.7500000e+00 9.0000000e-02 4.5000000e-01 0 1 0.0000000e+00 0 +add p Particle anti-Sigma_c*-- -4224 2.5184000e+00 1.4900000e-02 9.2000000e-02 -6 3 0.0000000e+00 -4224 +add p Particle Sigma_c*++ 4224 2.5184000e+00 1.4900000e-02 9.2000000e-02 6 3 0.0000000e+00 4224 +add p Particle B_s0H 530 5.3663000e+00 0.0000000e+00 0.0000000e+00 0 0 4.6074353e-01 0 +add p Particle L+ -17 4.0000000e+02 0.0000000e+00 0.0000000e+00 3 1 0.0000000e+00 -17 +add p Particle anti-Xi_b0 -5232 5.7905000e+00 0.0000000e+00 0.0000000e+00 0 1 4.4853851e-01 -5232 +add p Particle gamma 22 0.0000000e+00 0.0000000e+00 0.0000000e+00 0 2 0.0000000e+00 22 +end diff --git a/Generators/Herwig7_i/src/Herwig7.cxx b/Generators/Herwig7_i/src/Herwig7.cxx index bfdde6eafe0..06868412df5 100644 --- a/Generators/Herwig7_i/src/Herwig7.cxx +++ b/Generators/Herwig7_i/src/Herwig7.cxx @@ -1,7 +1,9 @@ // -*- C++ -*- /* - Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration */ + + /*! \file Herwig7.cxx * \brief Implementation of the Herwig 7 Athena interface. * \author Daniel Rauch (daniel.rauch@desy.de) @@ -31,10 +33,34 @@ #include "boost/thread/thread.hpp" #include "boost/filesystem.hpp" #include "boost/algorithm/string.hpp" +#include "boost/foreach.hpp" +#define foreach BOOST_FOREACH // Setup HepMC traits definition for ThePEG's converter to work #include "ThePEG/Vectors/HepMCConverter.h" +#ifdef HWVER_IS_72 +namespace ThePEG { + template<> + struct HepMCTraits<HepMC::GenEvent> + : public HepMCTraitsBase<HepMC::GenEvent, + HepMC::GenParticle, + HepMC::GenParticle *, + HepMC::GenVertex, + HepMC::GenVertex *, + HepMC::Polarization, + HepMC::PdfInfo> + { + static bool hasUnits() { + #ifdef HEPMC_HAS_UNITS + return true; + #else + return false; + #endif + } + }; +} +#else namespace ThePEG { template<> struct HepMCTraits<HepMC::GenEvent> @@ -53,6 +79,7 @@ namespace ThePEG { } }; } +#endif using namespace std; @@ -142,7 +169,7 @@ StatusCode Herwig7::genInitialize() { const string sharepath = "/InstallArea/" + cmtconfig + "/share"; const string libpath = "/InstallArea/" + cmtconfig + "/lib"; // Prepend to the repository and loader command file search paths - for (const string& p : cmtpaths) { + foreach (const string& p, cmtpaths) { const string cmtsharepath = p + sharepath; ATH_MSG_DEBUG("Appending " + cmtsharepath + " to ThePEG repository and command file search paths"); reposearchpaths = reposearchpaths + (reposearchpaths.length() == 0 ? "" : ":") + cmtsharepath; diff --git a/Generators/Herwig7_i/src/components/Herwig7_i_entries.cxx b/Generators/Herwig7_i/src/components/Herwig7_i_entries.cxx index 737251ef0e3..e2db77d0e0c 100644 --- a/Generators/Herwig7_i/src/components/Herwig7_i_entries.cxx +++ b/Generators/Herwig7_i/src/components/Herwig7_i_entries.cxx @@ -2,3 +2,4 @@ DECLARE_COMPONENT( Herwig7 ) + diff --git a/Projects/AthGeneration/CMakeLists.txt b/Projects/AthGeneration/CMakeLists.txt index f538c30b54c..431e7f8ab7f 100644 --- a/Projects/AthGeneration/CMakeLists.txt +++ b/Projects/AthGeneration/CMakeLists.txt @@ -28,6 +28,7 @@ find_package( Davix ) find_package( PNG ) find_package( BLAS ) find_package( AIDA ) +find_package( VDT ) # Set up the compilation option(s) for AthGeneration. add_definitions( -DGENERATIONBASE ) diff --git a/Projects/AthGeneration/package_filters.txt b/Projects/AthGeneration/package_filters.txt index e14eb7ea8bd..2e528bc71a3 100644 --- a/Projects/AthGeneration/package_filters.txt +++ b/Projects/AthGeneration/package_filters.txt @@ -1,6 +1,8 @@ # # Package filtering rules for the AthGeneration project build. # ++ AtlasTest/NightlyTestTools/ATNight ++ AtlasTest/NightlyTestTools/Nicos + AtlasTest/TestTools + Calorimeter/CaloConditions + Calorimeter/CaloGeoHelpers @@ -24,7 +26,9 @@ + Control/AthenaPython + Control/AthenaServices + Control/CLIDComps ++ Control/CLIDSvc + Control/CxxUtils ++ Control/DataModel + Control/DataModelAthenaPool + Control/DataModelRoot + Control/GaudiSequencer @@ -45,42 +49,61 @@ + Control/StoreGateBindings + Control/xAODRootAccess + Control/xAODRootAccessInterfaces +#+ Database/.* + Database/APR/CollectionBase + Database/APR/CollectionUtilities + Database/APR/FileCatalog + Database/APR/ImplicitCollection + Database/APR/POOLCore + Database/APR/PersistencySvc +#+ Database/APR/RelationalCollection +#+ Database/APR/RootCollection + Database/APR/RootStorageSvc + Database/APR/StorageSvc ++ Database/APR/TrigCollQuery ++ Database/APR/XMLCatalog + Database/AthenaPOOL/AthenaPoolCnvSvc ++ Database/AthenaPOOL/AthenaPoolKernel + Database/AthenaPOOL/AthenaPoolServices + Database/AthenaPOOL/AthenaPoolUtilities + Database/AthenaPOOL/DBDataModel + Database/AthenaPOOL/EventSelectorAthenaPool + Database/AthenaPOOL/OutputStreamAthenaPool + Database/AthenaPOOL/PoolSvc ++ Database/AthenaPOOL/RDBAccessSvc + Database/AthenaPOOL/RootConversions +#+ Database/AthenaPOOL/RootFileTools +#+ Database/AthenaPOOL/StlAthenaPoolCnv ++ Database/AthenaRoot/AthenaRootComps ++ Database/AthenaRoot/AthenaRootKernel ++ Database/AthenaRoot/RootAuxDynIO +#+ Database/AtlasSTLAddReflex + Database/AtlasSealCLHEP +#+ Database/CondDBObjects + Database/ConnectionManagement/AtlasAuthentication + Database/ConnectionManagement/DBReplicaSvc + Database/CoraCool + Database/IOVDbAthenaPool + Database/IOVDbDataModel + Database/IOVDbMetaDataTools +#+ Database/IOVDbPTCnv + Database/IOVDbSvc + Database/IOVDbTPCnv + Database/PersistentDataModel + Database/PersistentDataModelAthenaPool + Database/PersistentDataModelTPCnv +#+ Database/RegistrationServices + Database/TPTools +#+ DataQuality/GoodRunsLists + DetectorDescription/AtlasDetDescr ++ DetectorDescription/GeoModel/GeoModelKernel + DetectorDescription/GeoModel/GeoModelInterfaces + DetectorDescription/GeoModel/GeoModelUtilities + DetectorDescription/GeoPrimitives + DetectorDescription/IdDict + DetectorDescription/IdDictParser + DetectorDescription/Identifier +#+ Event/ByteStreamData + Event/EventAthenaPool + Event/EventBookkeeperAthenaPool + Event/EventBookkeeperMetaData @@ -89,6 +112,7 @@ + Event/EventContainers + Event/EventInfo + Event/EventInfoMgt ++ Event/EventInfoUtils + Event/EventKernel + Event/EventPTCnv + Event/EventPrimitives @@ -97,6 +121,7 @@ + Event/NavFourMom + Event/PyDumper + Event/xAOD/xAODBase +#+ Event/xAOD/xAODBTagging + Event/xAOD/xAODCaloEvent + Event/xAOD/xAODCore + Event/xAOD/xAODCoreAthenaPool @@ -110,53 +135,85 @@ + Event/xAOD/xAODMuon + Event/xAOD/xAODPrimitives + Event/xAOD/xAODTracking +#+ Event/xAOD/xAODTrigger + Event/xAOD/xAODTruth + Event/xAOD/xAODTruthAthenaPool + Event/xAOD/xAODTruthCnv + External/AtlasDataArea ++ External/AtlasPyFwdBwdPorts + External/Pythia8 ++ External/pyAMI +- Generators/AcerMC_i +- Generators/AlpGen_i +- Generators/Baur_i + Generators/Charybdis_i +- Generators/CompHep_i +- Generators/Exhume_i - Generators/EmbeddedTrackGenerator - Generators/ExoGraviton_i - Generators/GravADD_i +- Generators/Herwig_i +- Generators/Herwigpp_i - Generators/Horace_i - Generators/HvGen_i - Generators/MadCUP_i +- Generators/MadGraph_i - Generators/Matchig_i +- Generators/McAtNlo_i - Generators/Protos_i - Generators/Pyquench_i +- Generators/Pythia_i - Generators/PythiaB +- Generators/PythiaBc_i +- Generators/PythiaChL_i - Generators/PythiaExo_i +- Generators/PythiaRhad_i +- Generators/PythiaSgluon_i - Generators/Reldis_i - Generators/VBFNLOControl - Generators/TrackRecordGenerator + Generators/.* + InnerDetector/InDetExample/InDetRecExample +#+ InnerDetector/InDetRecTools/InDetTrackSelectionTool + LArCalorimeter/LArCabling + LArCalorimeter/LArGeoModel/LArHV + LArCalorimeter/LArGeoModel/LArReadoutGeometry + LArCalorimeter/LArIdentifier + MuonSpectrometer/MuonIdHelpers +#+ PhysicsAnalysis/AnalysisCommon/PATCore +#+ PhysicsAnalysis/AnalysisCommon/PATInterfaces + PhysicsAnalysis/AnalysisCommon/ParticleEvent + PhysicsAnalysis/AnalysisCommon/ParticleJetTools +#+ PhysicsAnalysis/Interfaces/AsgAnalysisInterfaces + PhysicsAnalysis/PATJobTransforms + PhysicsAnalysis/TruthParticleID/McParticleEvent + PhysicsAnalysis/TruthParticleID/McParticleKernel +#+ Projects/AthGeneration +#+ Projects/AthGeneration/.* +#+ Reconstruction/eflowRec + Reconstruction/EventShapes/EventShapeInterface + Reconstruction/Jet/JetEDM + Reconstruction/Jet/JetEvent + Reconstruction/Jet/JetInterface + Reconstruction/Jet/JetRec +#+ Reconstruction/Jet/JetRecConfig + Reconstruction/MissingETEvent + Reconstruction/Particle +#+ Reconstruction/RecAlgs +#+ Reconstruction/RecEvent +#+ Reconstruction/RecEventAthenaPool +#+ Reconstruction/RecEventTPCnv + Reconstruction/RecExample/RecExCommon + Reconstruction/RecExample/RecExConfig + Simulation/Tools/AtlasCLHEP_RandomGenerators + Tools/ART ++ Tools/AtlasDoxygen ++ Tools/CodeCheck + Tools/JobTransforms + Tools/KitValidation + Tools/PathResolver + Tools/PmbCxxUtils ++ Tools/PyCmt + Tools/PyJobTransforms + Tools/PyJobTransformsCore + Tools/PyUtils @@ -164,7 +221,10 @@ + Tools/XMLCoreParser + Tracking/TrkDetDescr/TrkDetDescrUtils + Tracking/TrkDetDescr/TrkDetElementBase +#+ Tracking/TrkDetDescr/TrkDistortedSurfaces +#+ Tracking/TrkDetDescr/TrkGeometry + Tracking/TrkDetDescr/TrkSurfaces +#+ Tracking/TrkDetDescr/TrkVolumes + Tracking/TrkEvent/TrkEventPrimitives + Tracking/TrkEvent/TrkMaterialOnTrack + Tracking/TrkEvent/TrkMeasurementBase @@ -172,11 +232,15 @@ + Tracking/TrkEvent/TrkParameters + Tracking/TrkEvent/TrkParametersBase + Tracking/TrkEvent/TrkParticleBase -+ Tracking/TrkEvent/TrkSegment +#+ Tracking/TrkEvent/TrkPatternParameters +#+ Tracking/TrkEvent/TrkSegment + Tracking/TrkEvent/TrkTrack + Tracking/TrkEvent/TrkTrackLink + Tracking/TrkEvent/TrkTrackSummary + Tracking/TrkEvent/VxVertex +#+ Tracking/TrkExtrapolation/TrkExInterfaces +#+ Tracking/TrkExtrapolation/TrkExUtils +#+ Tracking/TrkTools/TrkToolInterfaces + PhysicsAnalysis/MCTruthClassifier # Ignore everything else - .* diff --git a/Projects/Athena/externals/Herwig3.cmake b/Projects/Athena/externals/Herwig3.cmake index 91c1517ab36..70a428981e7 100644 --- a/Projects/Athena/externals/Herwig3.cmake +++ b/Projects/Athena/externals/Herwig3.cmake @@ -2,6 +2,8 @@ # File specifying the location of Herwig3 to use. # -set( HERWIG3_LCGVERSION 7.1.5 ) +set( HERWIG3_LCGVERSION 7.2.0 ) +# Comment the following line for H7 versions <7.2 +set( HW3_VER_IS_72 1 ) set( HERWIG3_LCGROOT ${LCG_RELEASE_DIR}/MCGenerators/herwig++/${HERWIG3_LCGVERSION}/${LCG_PLATFORM} ) diff --git a/Projects/Athena/externals/ThePEG.cmake b/Projects/Athena/externals/ThePEG.cmake index 60b9a6f8670..cf5c807c458 100644 --- a/Projects/Athena/externals/ThePEG.cmake +++ b/Projects/Athena/externals/ThePEG.cmake @@ -2,6 +2,6 @@ # File specifying the location of ThePEG to use. # -set( THEPEG_LCGVERSION 2.1.5 ) +set( THEPEG_LCGVERSION 2.2.0 ) set( THEPEG_LCGROOT ${LCG_RELEASE_DIR}/MCGenerators/thepeg/${THEPEG_LCGVERSION}/${LCG_PLATFORM} ) diff --git a/Projects/Athena/package_filters.txt b/Projects/Athena/package_filters.txt index 2a92586f9ff..f6fba1194bb 100644 --- a/Projects/Athena/package_filters.txt +++ b/Projects/Athena/package_filters.txt @@ -23,6 +23,31 @@ - graphics/VP1/VP1Systems/VP1TriggerDecisionSystems + graphics/VP1/.* +# Some generators that are no longer needed in the release +- Generators/AcerMC_i +- Generators/AlpGen_i +- Generators/CompHep_i +- Generators/EmbeddedTrackGenerator +- Generators/ExoGraviton_i +- Generators/GravADD_i +- Generators/Herwig_i +- Generators/Horace_i +- Generators/HvGen_i +- Generators/MadCUP_i +- Generators/MadGraph_i +- Generators/Matchig_i +- Generators/McAtNlo_i +- Generators/Protos_i +- Generators/Pyquench_i +- Generators/Pythia_i +- Generators/PythiaB +- Generators/PythiaChL_i +- Generators/PythiaExo_i +- Generators/PythiaRhad_i +- Generators/PythiaSgluon_i +- Generators/Reldis_i +- Generators/VBFNLOControl + # Some analysis packages that are not part of Athena - Control/AthLinksSA - PhysicsAnalysis/AnalysisCommon/CPAnalysisExamples diff --git a/Simulation/G4Extensions/G4ExternalDecay/CMakeLists.txt b/Simulation/G4Extensions/G4ExternalDecay/CMakeLists.txt index 55cbfb63d86..772d4500d8d 100644 --- a/Simulation/G4Extensions/G4ExternalDecay/CMakeLists.txt +++ b/Simulation/G4Extensions/G4ExternalDecay/CMakeLists.txt @@ -42,6 +42,6 @@ atlas_add_library( G4ExternalDecay INCLUDE_DIRS ${XERCESC_INCLUDE_DIRS} ${CLHEP_INCLUDE_DIRS} ${LHAPDF_INCLUDE_DIRS} ${GEANT4_INCLUDE_DIRS} ${PYTHIA8_INCLUDE_DIRS} ${extra_includes} PRIVATE_INCLUDE_DIRS ${HEPMC_INCLUDE_DIRS} DEFINITIONS ${CLHEP_DEFINITIONS} - LINK_LIBRARIES ${XERCESC_LIBRARIES} ${CLHEP_LIBRARIES} ${PYTHIA8_LIBRARIES} ${LHAPDF_LIBRARIES} ${GEANT4_LIBRARIES} Pythia_iLib Pythia8_iLib ${extra_libs} + LINK_LIBRARIES ${XERCESC_LIBRARIES} ${CLHEP_LIBRARIES} ${PYTHIA8_LIBRARIES} ${LHAPDF_LIBRARIES} ${GEANT4_LIBRARIES} Pythia8_iLib ${extra_libs} PRIVATE_LINK_LIBRARIES ${HEPMC_LIBRARIES} ) -- GitLab