Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add 11.2_1 geant-val results #7

Merged
merged 5 commits into from
Apr 10, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 <br /> Dataset #1 tag 1.2_1 <br /> (Geant4.11.2.p01 FTFP_BERT(+tune1,2,3), FTFP_INCLXX, QGSP_BERT) <br /> Added on 10/4/2024 <br /> | 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 <br /> Dataset #1 tag 1.1_1 <br /> (Geant4.11.0.p04 FTFP_BERT, FTFP_INCLXX, QGSP_BERT) <br /> (Geant4.11.1.p01 FTFP_BERT(+tune_1,2,3), FTFP_INCLXX, QGSP_BERT) <br /> Added on 3/5/2023 <br /> | 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 <br /> Dataset #2 tag 1.0_2<br /> (Geant4.10.06.p03, Geant4.10.5.p01, Geant4.10.4.p01, CALICESiWTB v1.0, FTFP_BERT, FTFP_INCLXX, QGSP_BERT) <br /> Added on 16/4/2022 <br /> | 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 <br /> Dataset #1 tag 1.0_1<br /> (Geant4.10.07.p03, CALICESiWTB v1.0, FTFP_BERT, FTFP_INCLXX, QGSP_BERT) <br /> Added on 14/4/2022 <br /> | 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.|
Expand Down
2 changes: 1 addition & 1 deletion geantval_scripts/CALICESiWTB/params.conf
Original file line number Diff line number Diff line change
@@ -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
Expand Down
183 changes: 92 additions & 91 deletions geantval_scripts/CALICESiWTB/parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand All @@ -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
)
'''
'''
##**************************************************

21 changes: 21 additions & 0 deletions geantval_scripts/configs/11.2.p01.sh
Original file line number Diff line number Diff line change
@@ -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
8 changes: 8 additions & 0 deletions scripts/CALICESiWTB_lxplus_11.2.sh
Original file line number Diff line number Diff line change
@@ -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)
Loading