From 35acf1cdee62c0a3bd8ad67c34aa65de37b792b6 Mon Sep 17 00:00:00 2001 From: Lorenzo Pezzotti Date: Mon, 8 Apr 2024 16:41:36 +0200 Subject: [PATCH 1/5] Add lxplus usage example script el9 G4-11.2.p01 Add example script for usage on lxplus el9 machine sourcing G4-11.2.p01. --- scripts/CALICESiWTB_lxplus_11.2.sh | 8 ++++++++ 1 file changed, 8 insertions(+) create mode 100644 scripts/CALICESiWTB_lxplus_11.2.sh diff --git a/scripts/CALICESiWTB_lxplus_11.2.sh b/scripts/CALICESiWTB_lxplus_11.2.sh new file mode 100644 index 0000000..ecd3de1 --- /dev/null +++ b/scripts/CALICESiWTB_lxplus_11.2.sh @@ -0,0 +1,8 @@ +#!/bin/sh + +source /cvmfs/sft.cern.ch/lcg/contrib/gcc/12/x86_64-el9-gcc12-opt/setup.sh +source /cvmfs/geant4.cern.ch/geant4/11.2.p01/x86_64-el9-gcc12-optdeb-MT/CMake-setup.sh +export CXX=`which g++` +export CC=`which gcc` +cmake3 -DGeant4_DIR=/cvmfs/geant4.cern.ch/geant4/11.2.p01/x86_64-el9-gcc12-optdeb-MT/lib64/Geant4-11.2.1/ ../CALICESiWTB/ +make -j$(nproc) From 283c8e15d404f3e65905e6d4b6365367687ccaed Mon Sep 17 00:00:00 2001 From: Lorenzo Pezzotti Date: Tue, 9 Apr 2024 11:53:10 +0200 Subject: [PATCH 2/5] Add FTF tunes in geant-val params Add FTF tunes (1,2,3) in physics lists used by geant-val via params.conf file. It should have been added in v1.1 when results with FTF tunes have been added to geant-val for the first time. --- geantval_scripts/CALICESiWTB/params.conf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/geantval_scripts/CALICESiWTB/params.conf b/geantval_scripts/CALICESiWTB/params.conf index 41015be..509ca82 100644 --- a/geantval_scripts/CALICESiWTB/params.conf +++ b/geantval_scripts/CALICESiWTB/params.conf @@ -1,4 +1,4 @@ -!PHYSLIST=FTFP_BERT, QGSP_BERT, FTFP_INCLXX +!PHYSLIST=FTFP_BERT, FTFP_BERT_tune1, FTFP_BERT_tune2, FTFP_BERT_tune3, QGSP_BERT, FTFP_INCLXX !CONST:ENERGY_UNIT=GeV PARTICLE | ENERGY | PHYSLIST | NEVENTS pi- | 2 | PHYSLIST | 100000 From f8de2f26ed09d19b287ac3440415c5539b9210a3 Mon Sep 17 00:00:00 2001 From: Lorenzo Pezzotti Date: Tue, 9 Apr 2024 13:42:22 +0200 Subject: [PATCH 3/5] Change indentation in parser.py Change idnentation in parser.py, convert tab in spaces. Upgrade to python3. --- geantval_scripts/CALICESiWTB/parser.py | 183 +++++++++++++------------ 1 file changed, 92 insertions(+), 91 deletions(-) diff --git a/geantval_scripts/CALICESiWTB/parser.py b/geantval_scripts/CALICESiWTB/parser.py index 771c1d0..e0e024f 100644 --- a/geantval_scripts/CALICESiWTB/parser.py +++ b/geantval_scripts/CALICESiWTB/parser.py @@ -18,14 +18,14 @@ def GetObservables(filename): with open(filename) as f: - line = f.readline() + line = f.readline() listline = line.split() listfloat = [float(x) for x in listline] return listfloat def GetDataObservables(filename): with open(filename) as f: - line = f.readlines() + line = f.readlines() listline = line[0].split() listfloat = [float(x) for x in listline] listlineerror = line[1].split() @@ -38,121 +38,122 @@ class Test(BaseParser): def parse(self, jobs): - ordenergies = [2,4,6,8,10] - - common_data = [] - common_json = [] + ordenergies = [2,4,6,8,10] + + common_data = [] + common_json = [] - xpseudolayer_values = [x for x in range(0,53)] + xpseudolayer_values = [x for x in range(0,53)] xlayer_values = [x for x in range(0,23)] - ystaterrorMC_pseudolayer = [0. for x in range(0,53)] - ystaterrorMC_layer = [0. for x in range(0,23)] - - #Prepare jobs for analysis - # - energies = [float(x["ENERGY"]) for x in jobs] - files = [os.path.join(x["path"],"CALICESiWTBout.root") for x in jobs] - print "Found "+ str(len(jobs)) + " jobs with energies (GeV): " + str(energies) + " ,physlist: " + str(set([x["PHYSLIST"] for x in jobs])) - #longitudinal profiles analysis - # - print "Running longitudinal profiles analysis" - for counter,energy in enumerate(ordenergies): - #Find job with corresponding energy - job = [x for x in jobs if int(x["ENERGY"])==energy][0] - path = job["path"] - #infile = TFile.Open(os.path.join(job["path"],"CALICESiWTBout.root")) - root_command = "cd " + job["path"] + ";root -l 'MyLongitudinalPlots.C(" + str(counter) + "," + "\"CALICESiWTBout.root\")'" - #print root_command - os.system(root_command) - yenergy_values = GetObservables(path+"/"+str(energy)+"GeVenergy.txt") - yhit_values = GetObservables(path+"/"+str(energy)+"GeVhit.txt") - print "--->energy values: " + str(yenergy_values) + " ,physlist: " + str(set([x["PHYSLIST"] for x in jobs])) - print "--->hit values: " + str(yhit_values) + " ,physlist: " + str(set([x["PHYSLIST"] for x in jobs])) + ystaterrorMC_pseudolayer = [0. for x in range(0,53)] + ystaterrorMC_layer = [0. for x in range(0,23)] + + #Prepare jobs for analysis + # + energies = [float(x["ENERGY"]) for x in jobs] + files = [os.path.join(x["path"],"CALICESiWTBout.root") for x in jobs] + print("Found "+ str(len(jobs)) + " jobs with energies (GeV): " + str(energies) + " ,physlist: " + str(set([x["PHYSLIST"] for x in jobs]))) + #longitudinal profiles analysis + # + print("Running longitudinal profiles analysis") + for counter,energy in enumerate(ordenergies): + #Find job with corresponding energy + job = [x for x in jobs if int(x["ENERGY"])==energy][0] + path = job["path"] + #infile = TFile.Open(os.path.join(job["path"],"CALICESiWTBout.root")) + root_command = "cd " + job["path"] + ";root -l 'MyLongitudinalPlots.C(" + str(counter) + "," + "\"CALICESiWTBout.root\")'" + #print root_command + os.system(root_command) + yenergy_values = GetObservables(path+"/"+str(energy)+"GeVenergy.txt") + yhit_values = GetObservables(path+"/"+str(energy)+"GeVhit.txt") + print("--->energy values: " + str(yenergy_values) + " ,physlist: " + str(set([x["PHYSLIST"] for x in jobs]))) + print("--->hit values: " + str(yhit_values) + " ,physlist: " + str(set([x["PHYSLIST"] for x in jobs]))) - #Create JSON output files for energy (graph) - # - yield getJSON(jobs[0], "chart", - mctool_name="GEANT4", - mctool_model=jobs[0]["PHYSLIST"], - observableName="energy per layer", - #secondaryParticle="e-", - beamParticle=job["PARTICLE"], - targetName="CALICE-SiW", - beamEnergies=[energy], + #Create JSON output files for energy (graph) + # + yield getJSON(jobs[0], "chart", + mctool_name="GEANT4", + mctool_model=jobs[0]["PHYSLIST"], + observableName="energy per layer", + #secondaryParticle="e-", + beamParticle=job["PARTICLE"], + targetName="CALICE-SiW", + beamEnergies=[energy], title="Energy per layer (pi-)", xAxisName="Shower depth [pseudolayer]", yAxisName="Erec/pseudolayer [MIP]", xValues=xpseudolayer_values, yValues=yenergy_values, - yStatErrorsMinus=ystaterrorMC_pseudolayer, - yStatErrorsPlus=ystaterrorMC_pseudolayer + yStatErrorsMinus=ystaterrorMC_pseudolayer, + yStatErrorsPlus=ystaterrorMC_pseudolayer ) - #Create JSON output files for hit (graph) - # - yield getJSON(jobs[0], "chart", - mctool_name="GEANT4", - mctool_model=jobs[0]["PHYSLIST"], - observableName="hit per layer", - #secondaryParticle="e-", - beamParticle=job["PARTICLE"], - targetName="CALICE-SiW", - beamEnergies=[energy], + #Create JSON output files for hit (graph) + # + yield getJSON(jobs[0], "chart", + mctool_name="GEANT4", + mctool_model=jobs[0]["PHYSLIST"], + observableName="hit per layer", + #secondaryParticle="e-", + beamParticle=job["PARTICLE"], + targetName="CALICE-SiW", + beamEnergies=[energy], title="Hit per layer (pi-)", xAxisName="Shower depth [layer]", yAxisName="Entries (normalised to unity)", xValues=xlayer_values, yValues=yhit_values, - yStatErrorsMinus=ystaterrorMC_layer, - yStatErrorsPlus=ystaterrorMC_layer + yStatErrorsMinus=ystaterrorMC_layer, + yStatErrorsPlus=ystaterrorMC_layer ) - #Part for data json creation (extract FTFP_BERT phys list jobs) - ''' - if str(jobs[0]["PHYSLIST"])=="FTFP_BERT": - y_energy_data, y_energy_data_error = GetDataObservables(path+"/"+str(energy)+"GeVenergydata.txt") - y_hit_data, y_hit_data_error = GetDataObservables(path+"/"+str(energy)+"GeVhitdata.txt") - - #Create JSON output files for energy (graph) - # - yield getJSON(jobs[0], "chart", - mctool_name="experiment", - mctool_model="experiment", - mctool_version="experiment", - testName="experiment", - inspireId=1330291, - observableName="energy per layer", - #secondaryParticle="e-", - beamParticle="pi-", - targetName="CALICE-SiW", - beamEnergies=[energy], + #Part for data json creation (extract FTFP_BERT phys list jobs) + ''' + if str(jobs[0]["PHYSLIST"])=="FTFP_BERT": + y_energy_data, y_energy_data_error = GetDataObservables(path+"/"+str(energy)+"GeVenergydata.txt") + y_hit_data, y_hit_data_error = GetDataObservables(path+"/"+str(energy)+"GeVhitdata.txt") + + #Create JSON output files for energy (graph) + # + yield getJSON(jobs[0], "chart", + mctool_name="experiment", + mctool_model="experiment", + mctool_version="experiment", + testName="experiment", + inspireId=1330291, + observableName="energy per layer", + #secondaryParticle="e-", + beamParticle="pi-", + targetName="CALICE-SiW", + beamEnergies=[energy], title="Energy per layer (pi-)", xAxisName="Shower depth [pseudolayer]", yAxisName="Erec/pseudolayer [MIP]", xValues=xpseudolayer_values, yValues=y_energy_data, - yStatErrorsMinus=y_energy_data_error, - yStatErrorsPlus=y_energy_data_error + yStatErrorsMinus=y_energy_data_error, + yStatErrorsPlus=y_energy_data_error ) - #Create JSON output files for hit (graph) - # - yield getJSON(jobs[0], "chart", - mctool_name="experiment", - mctool_model="experiment", - mctool_version="experiment", - testName="experiment", - inspireId=1330291, - observableName="hit per layer", - #secondaryParticle="e-", - beamParticle="pi-", - targetName="CALICE-SiW", - beamEnergies=[energy], + #Create JSON output files for hit (graph) + # + yield getJSON(jobs[0], "chart", + mctool_name="experiment", + mctool_model="experiment", + mctool_version="experiment", + testName="experiment", + inspireId=1330291, + observableName="hit per layer", + #secondaryParticle="e-", + beamParticle="pi-", + targetName="CALICE-SiW", + beamEnergies=[energy], title="Hit per layer (pi-)", xAxisName="Shower depth [layer]", yAxisName="Entries (normalised to unity)", xValues=xlayer_values, yValues=y_hit_data, - yStatErrorsMinus=y_hit_data_error, - yStatErrorsPlus=y_hit_data_error + yStatErrorsMinus=y_hit_data_error, + yStatErrorsPlus=y_hit_data_error ) - ''' + ''' ##************************************************** + From a71aeec3e362a8bcd74202148f6d830f6d678c22 Mon Sep 17 00:00:00 2001 From: Lorenzo Pezzotti Date: Wed, 10 Apr 2024 17:27:32 +0200 Subject: [PATCH 4/5] Add geant-val config for 1.2_1 dataset Add config file used for geant-val 1.2_1 dataset production (on el9 machines). --- geantval_scripts/configs/11.2.p01.sh | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 geantval_scripts/configs/11.2.p01.sh diff --git a/geantval_scripts/configs/11.2.p01.sh b/geantval_scripts/configs/11.2.p01.sh new file mode 100644 index 0000000..7f22c96 --- /dev/null +++ b/geantval_scripts/configs/11.2.p01.sh @@ -0,0 +1,21 @@ +#!/bin/bash + +export G4GCC_VERSION="12" +export G4GCC_PLATFORM="x86_64-el9-gcc12-opt" +export GEANT4_VERSION="11.2" +export GEANT4_PLATFORM="x86_64-el9-gcc12-optdeb-MT" +export GCC_VERSION="12" +export GCC_PLATFORM="x86_64-el9-gcc12-opt" + +source /cvmfs/sft.cern.ch/lcg/contrib/gcc/${G4GCC_VERSION}/${G4GCC_PLATFORM}/setup.sh +source /cvmfs/geant4.cern.ch/geant4/${GEANT4_VERSION}/${GEANT4_PLATFORM}/bin/geant4.sh +source /cvmfs/sft.cern.ch/lcg/contrib/gcc/${GCC_VERSION}/${GCC_PLATFORM}/setup.sh + +# Test path +GVALPATH="/cvmfs/geant4.cern.ch/opt-geant-val/$GEANT4_VERSION/$GEANT4_PLATFORM/bin:/cvmfs/geant4.cern.ch/opt/$GEANT4_VERSION/$GEANT4_PLATFORM/bin" +YOURPATH="/afs/cern.ch/work/l/lopezzot/Fellow/CALICE/build/" +export PATH="$GVALPATH:$PATH:$YOURPATH" + +# Geant Val exports +export VERSION=$GEANT4_VERSION +export PLATFORM=$GEANT4_PLATFORM From 41eb4041dca8cefa759bd7cd865f2b57376b0c9b Mon Sep 17 00:00:00 2001 From: Lorenzo Pezzotti Date: Wed, 10 Apr 2024 17:34:15 +0200 Subject: [PATCH 5/5] Add 1.2_1 dataset in table Add entry in geant-val results table for 1.2_1 dataset. --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index c7d67e0..c9878b7 100644 --- a/README.md +++ b/README.md @@ -143,6 +143,7 @@ The following are results deployed on Geant Val so far. A copy of the used confi | CALICESiWTB | Reproduce data | Reproduce analysis | Comments | | ------------- | ---------- | ----------- | ----------- | +| v1.2
Dataset #1 tag 1.2_1
(Geant4.11.2.p01 FTFP_BERT(+tune1,2,3), FTFP_INCLXX, QGSP_BERT)
Added on 10/4/2024
| python mc-config-generator.py submit -t CALICESiWTB -d OUTPUT -v version -q "testmatch" -r | python mc-config-generator.py parse -t CALICESiWTB -d OUTPUT | Produced with new el9 machines on lxplus. | | v1.1
Dataset #1 tag 1.1_1
(Geant4.11.0.p04 FTFP_BERT, FTFP_INCLXX, QGSP_BERT)
(Geant4.11.1.p01 FTFP_BERT(+tune_1,2,3), FTFP_INCLXX, QGSP_BERT)
Added on 3/5/2023
| python mc-config-generator.py submit -t CALICESiWTB -d OUTPUT -v version -q "testmatch" -r | python mc-config-generator.py parse -t CALICESiWTB -d OUTPUT | Nothing. | | v1.0
Dataset #2 tag 1.0_2
(Geant4.10.06.p03, Geant4.10.5.p01, Geant4.10.4.p01, CALICESiWTB v1.0, FTFP_BERT, FTFP_INCLXX, QGSP_BERT)
Added on 16/4/2022
| python mc-config-generator.py submit -t CALICESiWTB -d OUTPUT -v version -q "testmatch" -r | python mc-config-generator.py parse -t CALICESiWTB -d OUTPUT | Results for three Geant4 versions, three physics list. Results for 10.5.p01 and 10.4.p01 obtained in single thread mode.| | v1.0
Dataset #1 tag 1.0_1
(Geant4.10.07.p03, CALICESiWTB v1.0, FTFP_BERT, FTFP_INCLXX, QGSP_BERT)
Added on 14/4/2022
| python mc-config-generator.py submit -t CALICESiWTB -d OUTPUT -v 10.7.p03 -q "testmatch" -r | python mc-config-generator.py parse -t CALICESiWTB -d OUTPUT | Results for one Geant4 versions, three physics list. Results for experiment included as well, use last parser part for it.|