Skip to content
Snippets Groups Projects
Commit 510a6dd0 authored by Dmitry Popov's avatar Dmitry Popov
Browse files

v106r2p4 release

parent e5e4dea7
No related branches found
No related tags found
1 merge request!76v106r2p4 release
Showing with 647 additions and 534 deletions
......@@ -4,7 +4,7 @@ set(GEANT4_SRCS_REPOSITORY https://gitlab.cern.ch/lhcb/Geant4-srcs.git CACHE STR
set(GEANT4FILES_VERSION v106r1 CACHE STRING "Version for Geant4Files to match Geant4-src version")
find_package(GaudiProject)
gaudi_project(Geant4 v106r2p3
gaudi_project(Geant4 v106r2p4
DATA Geant4Files VERSION ${GEANT4FILES_VERSION})
# FIXME: hack for compatibility with CMT build
......
......@@ -74,6 +74,13 @@ ExternalProject_Add(Geant4
foreach(ext CLHEP EXPAT XercesC X11 OpenGL Motif)
find_package(${ext})
endforeach()
if(TARGET CLHEP::CLHEP)
# CLHEPConfig.cmake does not set the variables used in GaudiProjectConfig.cmake
# to prepare the environment, so we help a bit
if(DEFINED CLHEP_DIR)
get_filename_component(CLHEP_LIBRARY_DIR "${CLHEP_DIR}" PATH CACHE)
endif()
endif()
# Copy the Geant4 sources as it was done with CMT
set(G4SRC ${CMAKE_CURRENT_BINARY_DIR}/Geant4-prefix/src/Geant4/source)
......
#!/usr/bin/env python
# -*- coding: utf-8 -*-
###############################################################################
# (c) Copyright 2000-2020 CERN for the benefit of the LHCb Collaboration #
# #
# This software is distributed under the terms of the GNU General Public #
# Licence version 3 (GPL Version 3), copied verbatim in the file "COPYING". #
# #
# In applying this licence, CERN does not waive the privileges and immunities #
# granted to it by virtue of its status as an Intergovernmental Organization #
# or submit itself to any jurisdiction. #
###############################################################################
import ROOT
import subprocess
import argparse
import logging
from math import log10
import logging
logging.basicConfig()
_logger = logging.getLogger("GAMMA2DILEPTONPROD")
......@@ -17,19 +28,24 @@ parser = argparse.ArgumentParser("DILEPTONPROD")
parser.add_argument("--nevts", default=10000, help="Number of Events")
parser.add_argument("--energies", default="[1000]", help="Energies List")
parser.add_argument("--thickness", default="[0.3]", help="List of thicknesses")
parser.add_argument("--scale", default="100000", help="Scale DiMuon Conversion Cross Section by factor")
parser.add_argument("--debug", default=False, action="store_true", help="Debug Mode")
parser.add_argument("--outputdir", default="G4GammaCVTestROOTFiles", help="Output Location")
parser.add_argument("--scale", default="100000",
help="Scale DiMuon Conversion Cross Section by factor")
parser.add_argument("--debug", default=False,
action="store_true", help="Debug Mode")
parser.add_argument("--outputdir",
default="G4GammaCVTestROOTFiles", help="Output Location")
args = parser.parse_args()
if args.debug:
_logger.setLevel("DEBUG")
def get_list(argument):
import re
elements = re.findall(r'[\d|\.]+', argument)
return elements
return elements
energies = get_list(args.energies)
thickness = get_list(args.thickness)
......@@ -49,98 +65,113 @@ subprocess.check_call("mkdir -p {}".format(args.outputdir), shell=True)
for energy in energies:
for t in thickness:
_logger.info("%s\n\nRunning Gamma->l+ l- Conversion in Aluminium with options:\n"+
"\n\tNumber of Events :\t%s "+
"\n\tBeam Energy :\t%s GeV"+
"\n\tTarget Thickness :\t%s mm"+
"\n\tDiMuon XSec Scale Factor :\t%s"+
"\n\tOutput Directory :\t%s\n",
'='*40, args.nevts, energy, t, args.scale, args.outputdir)
_logger.info("%s\n\nRunning Gamma->l+ l- Conversion in Aluminium with options:\n" +
"\n\tNumber of Events :\t%s " +
"\n\tBeam Energy :\t%s GeV" +
"\n\tTarget Thickness :\t%s mm" +
"\n\tDiMuon XSec Scale Factor :\t%s" +
"\n\tOutput Directory :\t%s\n",
'='*40, args.nevts, energy, t, args.scale, args.outputdir)
_logger.info('='*40)
subprocess.check_call("G4GammaToDiLeptonConversionTest.exe --nevts {} --energy {}".format(args.nevts, energy) +
" --thickness {} --scale {} --outputdir {}".format(t, args.scale, args.outputdir), shell=True)
subprocess.check_call("G4GammaToDiLeptonConversionTest.exe --nevts {} --energy {}"
.format(args.nevts, energy) +
" --thickness {} --scale {} --outputdir {}"
.format(t, args.scale, args.outputdir), shell=True)
_logger.info("Creating Single Combined Plots ROOT File...")
import ROOT
_output = ROOT.TFile.Open("G4GammaCVTestROOTFiles/G4GammaToDiLeptonConversionTest.root", "NEW")
_histo_dim_dict = {'DiElectron' : {'Hist' : {'InvMass' : (100, 0, 100),
'ThetaSep' : (50, 0, 6E-4),
'InvMass2D' : (100, 1, 3),
'Theta' : (100, 0, 0.02),
'EFrac' : (100,0,1)},
'Symbol' : 'e'},
'DiMuon' : {'Hist' : {'InvMass' : (150, 250, 550),
'Theta' : (100, 0, 0.07),
'ThetaSep' : (50, 0, 1E-1),
'InvMass2D' : (50, 200, 500),
'EFrac' : (100,0,1)},
'Symbol' : '#mu' } }
_output = ROOT.TFile.Open("G4GammaCVTestROOTFiles/G4GammaToDiLeptonConversionTest.root",
"NEW")
_histo_dim_dict = {'DiElectron': {'Hist': {'InvMass': (100, 0, 100),
'ThetaSep': (50, 0, 6E-4),
'InvMass2D': (100, 1, 3),
'Theta': (100, 0, 0.02),
'EFrac': (100, 0, 1)},
'Symbol': 'e'},
'DiMuon': {'Hist': {'InvMass': (150, 250, 550),
'Theta': (100, 0, 0.07),
'ThetaSep': (50, 0, 1E-1),
'InvMass2D': (50, 200, 500),
'EFrac': (100, 0, 1)},
'Symbol': '#mu'}}
for energy in energies:
for t in thickness:
_logger.debug("Opening file '%s'", "{}/TestEM6_Al_{}mm_{}GeV_{}.root".format(args.outputdir, t, energy, args.nevts))
_tmp = ROOT.TFile.Open("{}/TestEM6_Al_{}mm_{}GeV_{}.root".format(args.outputdir, t, energy, args.nevts))
_logger.debug("Opening file '%s'", "{}/TestEM6_Al_{}mm_{}GeV_{}.root"
.format(args.outputdir, t, energy, args.nevts))
_tmp = ROOT.TFile.Open("{}/TestEM6_Al_{}mm_{}GeV_{}.root"
.format(args.outputdir, t, energy, args.nevts))
for particle in _histo_dim_dict.keys():
_logger.debug("Attempting to retrieve TTree '%s'", particle)
_tree = _tmp.Get(particle)
assert _tree.GetEntries() > 0, "No Entries Found!"
hist_mm = ROOT.TH1F("{}_InvMass_{}GeV_{}mm_Al".format(particle, energy, t),
"{} Invariant Mass from {}GeV Photons in {}mm of Aluminium".format(particle, energy, t),
*_histo_dim_dict[particle]['Hist']['InvMass'])
hist_mm.GetXaxis().SetTitle("M_{%s}/MeV" % '{s}{s}'.format(s=_histo_dim_dict[particle]['Symbol']))
hist_tp = ROOT.TH1F("{}_Angle_{}GeV_{}mm_Al".format(particle, energy, t),
"#gamma-{} Angle for {}GeV Photons in {}mm of Aluminium".format(_histo_dim_dict[particle]['Symbol']+'^{#pm}', energy, t),
*_histo_dim_dict[particle]['Hist']['Theta'])
hist_tp.GetXaxis().SetTitle("#theta(p_{%s}, p_{%s})" % ('#gamma', _histo_dim_dict[particle]['Symbol']+'^{#pm}'))
hist_efp = ROOT.TH1F("{}_EnergyFrac_{}GeV_{}mm_Al".format(particle, energy, t),
"Energy Fraction of {} for {}GeV Photons in {}mm of Aluminium".format(_histo_dim_dict[particle]['Symbol']+'^{#pm}', energy, t),
*_histo_dim_dict[particle]['Hist']['EFrac'])
hist_efp.GetXaxis().SetTitle("E_{%s}/E_{%s}" % (_histo_dim_dict[particle]['Symbol']+'^{#pm}', "#gamma"))
hist_2d_sep_ang_mm = ROOT.TH2F("{}_Separation_Angle_vs_InvMass_{}GeV_{}mm_Al".format(particle, energy, t),
"Separation Angle Between {} Pair vs Invariant Mass for {}GeV Photons in {}mm of Aluminium".format(particle, energy, t),
_histo_dim_dict[particle]['Hist']['InvMass2D'][0],
_histo_dim_dict[particle]['Hist']['InvMass2D'][1],
_histo_dim_dict[particle]['Hist']['InvMass2D'][2],
_histo_dim_dict[particle]['Hist']['ThetaSep'][0],
_histo_dim_dict[particle]['Hist']['ThetaSep'][1],
10*_histo_dim_dict[particle]['Hist']['ThetaSep'][2]/float(energy))
hist_2d_sep_ang_mm.GetXaxis().SetTitle("M_{%s}/MeV" % '{s}{s}'.format(s=_histo_dim_dict[particle]['Symbol']))
hist_2d_sep_ang_mm.GetYaxis().SetTitle("#theta(p_{%s},p_{%s})" % (_histo_dim_dict[particle]['Symbol']+'^{+}',
_histo_dim_dict[particle]['Symbol']+'^{-}'))
hist_2d_sep_ang_mm.GetYaxis().SetTitleOffset(1.2)
for event in _tree: # ROOT broke when using Draw(hist >> hist_tmp(i,j,k)) method
hist_mm.Fill(getattr(event, '{}_InvMass'.format(particle)))
hist_tp.Fill(getattr(event, '{}_ThetaPlus'.format(particle)))
hist_tp.Fill(getattr(event, '{}_ThetaMinus'.format(particle)))
hist_efp.Fill(getattr(event, '{}_EnergyFracPlus'.format(particle)))
hist_efp.Fill(getattr(event, '{}_EnergyFracMinus'.format(particle)))
hist_2d_sep_ang_mm.Fill(getattr(event, '{}_InvMass'.format(particle)), getattr(event, '{}_ThetaSep'.format(particle)))
_output.cd()
hist_mm.Write(hist_mm.GetName(),ROOT.TObject.kOverwrite)
hist_tp.Write(hist_tp.GetName(),ROOT.TObject.kOverwrite)
hist_efp.Write(hist_efp.GetName(),ROOT.TObject.kOverwrite)
hist_2d_sep_ang_mm.Write(hist_2d_sep_ang_mm.GetName(),ROOT.TObject.kOverwrite)
hist_mm.Delete()
hist_tp.Delete()
hist_efp.Delete()
hist_2d_sep_ang_mm.Delete()
_logger.debug("Attempting to retrieve TTree '%s'", particle)
_tree = _tmp.Get(particle)
assert _tree.GetEntries() > 0, "No Entries Found!"
hist_mm = ROOT.TH1F("{}_InvMass_{}GeV_{}mm_Al".format(particle, energy, t),
"{} Invariant Mass from {}GeV Photons in {}mm of Aluminium"
.format(particle, energy, t),
*_histo_dim_dict[particle]['Hist']['InvMass'])
hist_mm.GetXaxis().SetTitle("M_{%s}/MeV" % '{s}{s}'
.format(s=_histo_dim_dict[particle]['Symbol']))
hist_tp = ROOT.TH1F("{}_Angle_{}GeV_{}mm_Al".format(particle, energy, t),
"#gamma-{} Angle for {}GeV Photons in {}mm of Aluminium"
.format(_histo_dim_dict[particle]['Symbol']+'^{#pm}', energy, t),
*_histo_dim_dict[particle]['Hist']['Theta'])
hist_tp.GetXaxis().SetTitle("#theta(p_{%s}, p_{%s})" %
('#gamma', _histo_dim_dict[particle]['Symbol']+'^{#pm}'))
hist_efp = ROOT.TH1F("{}_EnergyFrac_{}GeV_{}mm_Al".format(particle, energy, t),
"Energy Fraction of {} for {}GeV Photons in {}mm of Aluminium"
.format(_histo_dim_dict[particle]['Symbol']+'^{#pm}', energy, t),
*_histo_dim_dict[particle]['Hist']['EFrac'])
hist_efp.GetXaxis().SetTitle("E_{%s}/E_{%s}" %
(_histo_dim_dict[particle]['Symbol']+'^{#pm}', "#gamma"))
hist_2d_sep_ang_mm = ROOT.TH2F("{}_Separation_Angle_vs_InvMass_{}GeV_{}mm_Al".format(particle, energy, t),
"Separation Angle Between {} Pair vs Invariant Mass for {}GeV Photons in {}mm of Aluminium"
.format(particle, energy, t),
_histo_dim_dict[particle]['Hist']['InvMass2D'][0],
_histo_dim_dict[particle]['Hist']['InvMass2D'][1],
_histo_dim_dict[particle]['Hist']['InvMass2D'][2],
_histo_dim_dict[particle]['Hist']['ThetaSep'][0],
_histo_dim_dict[particle]['Hist']['ThetaSep'][1],
10*_histo_dim_dict[particle]['Hist']['ThetaSep'][2]/float(energy))
hist_2d_sep_ang_mm.GetXaxis().SetTitle("M_{%s}/MeV" % '{s}{s}'
.format(s=_histo_dim_dict[particle]['Symbol']))
hist_2d_sep_ang_mm.GetYaxis().SetTitle("#theta(p_{%s},p_{%s})" %
(_histo_dim_dict[particle]['Symbol']+'^{+}',
_histo_dim_dict[particle]['Symbol']+'^{-}'))
hist_2d_sep_ang_mm.GetYaxis().SetTitleOffset(1.2)
# ROOT broke when using Draw(hist >> hist_tmp(i,j,k)) method
for event in _tree:
hist_mm.Fill(getattr(event, '{}_InvMass'.format(particle)))
hist_tp.Fill(getattr(event, '{}_ThetaPlus'.format(particle)))
hist_tp.Fill(getattr(event, '{}_ThetaMinus'.format(particle)))
hist_efp.Fill(getattr(event, '{}_EnergyFracPlus'
.format(particle)))
hist_efp.Fill(getattr(event, '{}_EnergyFracMinus'
.format(particle)))
hist_2d_sep_ang_mm.Fill(getattr(event, '{}_InvMass'.format(particle)),
getattr(event, '{}_ThetaSep'.format(particle)))
_output.cd()
hist_mm.Write(hist_mm.GetName(), ROOT.TObject.kOverwrite)
hist_tp.Write(hist_tp.GetName(), ROOT.TObject.kOverwrite)
hist_efp.Write(hist_efp.GetName(), ROOT.TObject.kOverwrite)
hist_2d_sep_ang_mm.Write(hist_2d_sep_ang_mm.GetName(),
ROOT.TObject.kOverwrite)
hist_mm.Delete()
hist_tp.Delete()
hist_efp.Delete()
hist_2d_sep_ang_mm.Delete()
_tmp.Close()
_output.Write()
_output.Close()
#!/usr/bin/env python
# -*- coding: utf-8 -*-
###############################################################
# Autor : Luca Pescatore
# Mail : luca.pescatore@cern.ch
# Purpose : Run iteratively the had00.exe program to get
# cross sections as a function of energy in Geant4
# different particles and target pmaterials.
################################################################
###############################################################################
# (c) Copyright 2000-2020 CERN for the benefit of the LHCb Collaboration #
# #
# This software is distributed under the terms of the GNU General Public #
# Licence version 3 (GPL Version 3), copied verbatim in the file "COPYING". #
# #
# In applying this licence, CERN does not waive the privileges and immunities #
# granted to it by virtue of its status as an Intergovernmental Organization #
# or submit itself to any jurisdiction. #
###############################################################################
"""
Stirring application for the Hadronic cross-sections test (aka Hadr00)
"""
import sys
import os
......@@ -70,13 +76,14 @@ def fillGraph(nbins, energy, value):
def process(particle, target, phys_list):
print "Producing: ", phys_list, particle, target
print("Producing: ", phys_list, particle, target)
with NamedTemporaryFile() as tmp:
with NamedTemporaryFile(mode="w") as tmp:
tmp.write(template.format(particle=particle, target=target))
tmp.flush()
job = Popen(['G4HadronicXSectionsTest.exe', tmp.name, phys_list], stdout=PIPE, stderr=PIPE)
job = Popen(['G4HadronicXSectionsTest.exe', tmp.name,
phys_list], stdout=PIPE, stderr=PIPE)
job_out, job_err = job.communicate()
if job.returncode:
......@@ -85,7 +92,8 @@ def process(particle, target, phys_list):
if not os.path.exists("tables"):
os.makedirs("tables")
tables = open(os.path.join('tables', '{0}_{1}_{2}.txt'.format(phys_list, particle, target)), "w")
tables = open(os.path.join('tables', '{0}_{1}_{2}.txt'
.format(phys_list, particle, target)), "w")
tables.write("Energy Elastic Inelastic Total\n")
regex = re.compile(r'^\s*\d+\s+([0-9.]+)\s+([0-9.]+)\s+([0-9.]+)\s+([0-9.]+)')
......@@ -95,11 +103,11 @@ def process(particle, target, phys_list):
inelastic = array('d')
total = array('d')
for line in job_out.split(os.linesep):
for line in job_out.decode('ISO-8859-1').split(os.linesep):
if found:
m = regex.match(line)
if m:
en, el, inel, tot = map(float, m.groups())
en, el, inel, tot = list(map(float, m.groups()))
energy.append(en)
elastic.append(el)
inelastic.append(inel)
......@@ -113,17 +121,17 @@ def process(particle, target, phys_list):
if not os.path.exists("root"):
os.makedirs("root")
output = TFile(os.path.join('root',
'{0}_{1}_{2}.root'.format(phys_list, particle, target)),
"RECREATE")
output = TFile(os.path.join('root', '{0}_{1}_{2}.root'
.format(phys_list, particle, target)), "RECREATE")
data = {'Elastic': elastic, 'Inelastic': inelastic, 'Total': total}
for key, value in data.iteritems():
for key, value in data.items():
gr = fillGraph(nbins, energy, value)
gr.SetName(key)
gr.SetTitle("%s cross section for %s interacting with %s" % (key, particle, target))
gr.SetTitle("{} cross section for {} interacting with {}"
.format(key, particle, target))
gr.GetXaxis().SetTitle("Energy (MeV)")
gr.GetYaxis().SetTitle("%s cross section (b)" % key)
gr.GetYaxis().SetTitle("{} cross section (b)".format(key))
gr.SetLineWidth(2)
gr.Write()
output.Close()
......
......@@ -32,6 +32,8 @@
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
#include "Geant4/G4GlobalConfig.hh"
#ifdef G4MULTITHREADED
#include "Geant4/G4MTRunManager.hh"
#else
......
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import argparse
import os
import subprocess
###############################################################################
# (c) Copyright 2000-2020 CERN for the benefit of the LHCb Collaboration #
# #
# This software is distributed under the terms of the GNU General Public #
# Licence version 3 (GPL Version 3), copied verbatim in the file "COPYING". #
# #
# In applying this licence, CERN does not waive the privileges and immunities #
# granted to it by virtue of its status as an Intergovernmental Organization #
# or submit itself to any jurisdiction. #
###############################################################################
"""
Stirring application for the Multiple Scattering in Thin Layer test (aka TestEm5).
Stirring application for the Multiple Scattering in Thin Layer test (aka TestEm5).
"""
import argparse
import os
import subprocess
def create_cfg_file(n_runs=1000, name='G4MScInThinLayerTest.mac'):
"""
Create the stirring file with Geant4 directives for
all runs, energies and limits.
"""
with open('G4MScInThinLayerTest.mac', 'w') as outfile:
outfile.write('/control/verbose 1\n' +
'/run/verbose 1\n' +
'/testem/det/setAbsMat Silicon\n' +
'/testem/det/setAbsThick 300 um\n' +
'/testem/det/setAbsYZ 42 mm\n' +
'/testem/phys/addPhysics emstandard_opt2\n' +
'/run/setCut 5 mm\n')
energies = [1, 2, 3, 4, 5, 7, 9, 12, 15, 20, 25, 30, 40]
limits = [4.0, 3.0, 2.0, 1.5, 1.0, 0.6, 0.5, 0.5, 0.4, 0.2, 0.2, 0.15, 0.15]
for en in energies:
lim = 0
for i in range(0, n_runs):
outfile.write(('/run/initialize\n' +
'/testem/gun/setDefault\n' +
'/gun/particle e-\n' +
'/gun/energy {:.2f} GeV\n' +
'/analysis/setFileName Output_{:.2f}\n' +
'/analysis/h1/set 1 100 0 100 keV #energy depostied in absorber\n' +
'/analysis/h1/set 10 100 0 100 keV #K.E at exit of world\n' +
'/analysis/h1/set 11 100 0 100 keV #Energy fluence dE/dOmega\n' +
'/analysis/h1/set 12 100 0.0 0.09 mrad #space angle dN/dOmega\n' +
'/analysis/h1/set 13 100 -{:.2f} {:.2f} mrad #projected angle at exit of world\n' +
'/analysis/h1/set 14 100 -14 14 nm #projected positon at exit of world\n' +
'/analysis/h1/set 15 100 0 44 mm #radius at exit of world\n' +
'/run/beamOn 10000\n').format(en, en, limits[lim], limits[lim]))
lim += 1
"""
Create the stirring file with Geant4 directives for
all runs, energies and limits.
"""
with open('G4MScInThinLayerTest.mac', 'w') as outfile:
outfile.write('/control/verbose 1\n' +
'/run/verbose 1\n' +
'/testem/det/setAbsMat Silicon\n' +
'/testem/det/setAbsThick 300 um\n' +
'/testem/det/setAbsYZ 42 mm\n' +
'/testem/phys/addPhysics emstandard_opt2\n' +
'/run/setCut 5 mm\n')
energies = [1, 2, 3, 4, 5, 7, 9, 12, 15, 20, 25, 30, 40]
limits = [4.0, 3.0, 2.0, 1.5, 1.0, 0.6,
0.5, 0.5, 0.4, 0.2, 0.2, 0.15, 0.15]
for en in energies:
lim = 0
for i in range(0, n_runs):
outfile.write(('/run/initialize\n' +
'/testem/gun/setDefault\n' +
'/gun/particle e-\n' +
'/gun/energy {:.2f} GeV\n' +
'/analysis/setFileName Output_{:.2f}\n' +
'/analysis/h1/set 1 100 0 100 keV #energy depostied in absorber\n' +
'/analysis/h1/set 10 100 0 100 keV #K.E at exit of world\n' +
'/analysis/h1/set 11 100 0 100 keV #Energy fluence dE/dOmega\n' +
'/analysis/h1/set 12 100 0.0 0.09 mrad #space angle dN/dOmega\n' +
'/analysis/h1/set 13 100 -{:.2f} {:.2f} mrad #projected angle at exit of world\n' +
'/analysis/h1/set 14 100 -14 14 nm #projected positon at exit of world\n' +
'/analysis/h1/set 15 100 0 44 mm #radius at exit of world\n' +
'/run/beamOn 10000\n').format(en, en, limits[lim], limits[lim]))
lim += 1
def main():
args_parser = argparse.ArgumentParser(
description='Stirring application for the Multiple Scattering in Thin Layer test (aka TestEm5).')
args_parser = argparse.ArgumentParser(
description='Stirring application for the Multiple Scattering in Thin Layer test (aka TestEm5).')
args_parser.add_argument('n_runs',
help='Number of runs for determining uncertainties (int)',
nargs='?',
action='store',
type=int,
default=1000)
args_parser.add_argument('n_runs',
help='Number of runs for determining uncertainties (int)',
nargs='?',
action='store',
type=int,
default=1000)
parsed_args, leftovers = args_parser.parse_known_args()
parsed_args, leftovers = args_parser.parse_known_args()
print 'Starting MSc in Thin Layer test with ' + str(parsed_args.n_runs) + ' run(s)...'
print('Starting MSc in Thin Layer test with ' +
str(parsed_args.n_runs) + ' run(s)...')
workspace = os.path.join(os.sep, os.getcwd(), 'G4MScInThinLayerTestOutput')
if not os.path.exists(workspace):
os.makedirs(workspace)
workspace = os.path.join(os.sep, os.getcwd(), 'G4MScInThinLayerTestOutput')
if not os.path.exists(workspace):
os.makedirs(workspace)
os.chdir(workspace)
print 'Working directory:', os.getcwd()
os.chdir(workspace)
print('Working directory:', os.getcwd())
cfg_file_name = 'G4MScInThinLayerTest.mac'
cfg_file_name = 'G4MScInThinLayerTest.mac'
print 'Creating the Geant4 directives file...'
create_cfg_file(n_runs=parsed_args.n_runs, name=cfg_file_name)
print('Creating the Geant4 directives file...')
create_cfg_file(n_runs=parsed_args.n_runs, name=cfg_file_name)
print 'Executing the test...'
cmd = ' '.join(['G4MScInThinLayerTest.exe', cfg_file_name, str(parsed_args.n_runs)])
subprocess.call(cmd, shell=True)
print('Executing the test...')
cmd = ' '.join(['G4MScInThinLayerTest.exe',
cfg_file_name, str(parsed_args.n_runs)])
subprocess.call(cmd, shell=True)
if __name__ == '__main__':
main()
main()
#EOF
# EOF
#!/usr/bin/env python
# -*- coding: utf-8 -*-
###############################################################################
# (c) Copyright 2000-2020 CERN for the benefit of the LHCb Collaboration #
# #
# This software is distributed under the terms of the GNU General Public #
# Licence version 3 (GPL Version 3), copied verbatim in the file "COPYING". #
# #
# In applying this licence, CERN does not waive the privileges and immunities #
# granted to it by virtue of its status as an Intergovernmental Organization #
# or submit itself to any jurisdiction. #
###############################################################################
import os
import subprocess
"""
Stirring application for the RICH test beam simulation test (aka RichTbSimH).
Stirring application for the RICH test beam simulation test (aka RichTbSimH).
"""
def main():
print 'Starting RICH test beam simulation test...'
print('Starting RICH test beam simulation test...')
workspace = os.path.join(os.sep, os.getcwd(), 'G4RichTbSimHTestOutput')
if not os.path.exists(workspace):
os.makedirs(workspace)
workspace = os.path.join(os.sep, os.getcwd(), 'G4RichTbSimHTestOutput')
if not os.path.exists(workspace):
os.makedirs(workspace)
os.chdir(workspace)
print 'Working directory:', os.getcwd()
os.chdir(workspace)
print('Working directory:', os.getcwd())
print 'Executing the test...'
cmd = 'G4RichTbSimHTest.exe'
subprocess.call(cmd, shell=True)
print('Executing the test...')
cmd = 'G4RichTbSimHTest.exe'
subprocess.call(cmd, shell=True)
if __name__ == '__main__':
main()
main()
#EOF
# EOF
......@@ -31,6 +31,8 @@
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
#include "Geant4/G4GlobalConfig.hh"
#ifdef G4MULTITHREADED
#include "Geant4/G4MTRunManager.hh"
#else
......
2021-06-17 Geant4 v106r2p4
===
This release is based on `GEANT4 r10.6.2`, uses `LCG 100` and `Geant4Files v106r1`.
This version is released on `Sim10` branch.
## Latest Changes
#### General
**Switched to `LCG 100`
**[MR !75] Fix Geant4 LD_LIBRARY_PATH when using CLHEPConfig.cmake
#### LHCb G4 Standalone Tests
**[MR !70] Port G4HadronicXSectionsTest to Python3
**[MR !71] Port G4MScInThinLayerTest to Python3
**[MR !72] Port G4SamplingCaloTest to Python3
**[MR !73] Port G4RichTbSimHTest to Python3
**[MR !74] Port G4GammaToDiLeptonConversionTest to Python3
# Set the version of HEPTools to use
set(heptools_version 97a)
set(heptools_version 100)
# this check is needed because the toolchain is called when checking the
# compiler (without the proper cache)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment