From 2b43762c1912ccb3ebe07af092885f74d95dffd9 Mon Sep 17 00:00:00 2001 From: Sakib Rahman Date: Fri, 17 Feb 2023 11:37:14 -0600 Subject: [PATCH 01/22] First commit with simple geometry --- geometry_standalone_edep/mollerMother.gdml | 56 ++++++++++++++++++++++ 1 file changed, 56 insertions(+) create mode 100644 geometry_standalone_edep/mollerMother.gdml diff --git a/geometry_standalone_edep/mollerMother.gdml b/geometry_standalone_edep/mollerMother.gdml new file mode 100644 index 000000000..5ef4ec4fd --- /dev/null +++ b/geometry_standalone_edep/mollerMother.gdml @@ -0,0 +1,56 @@ + + + + + + +]> + + + + + &positions; + &matrices; + + + + + &materials; + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + From 9d44fd4c536e054d9422e1a00e9b800511c33e39 Mon Sep 17 00:00:00 2001 From: Sakib Rahman Date: Fri, 17 Feb 2023 13:59:20 -0600 Subject: [PATCH 02/22] Remove dependence on main geometry folder --- geometry_standalone_edep/mollerMother.gdml | 25 ++++++++++++---------- 1 file changed, 14 insertions(+), 11 deletions(-) diff --git a/geometry_standalone_edep/mollerMother.gdml b/geometry_standalone_edep/mollerMother.gdml index 5ef4ec4fd..c10302996 100644 --- a/geometry_standalone_edep/mollerMother.gdml +++ b/geometry_standalone_edep/mollerMother.gdml @@ -1,22 +1,25 @@ - - - - -]> - - &positions; - &matrices; - - &materials; + + + + + + + + + + + + + + From 9342e0dc0e2afb1242d58c97297a639c32c162e8 Mon Sep 17 00:00:00 2001 From: Sakib Rahman Date: Fri, 17 Feb 2023 14:07:04 -0600 Subject: [PATCH 03/22] Proxy parallel world volume --- geometry_standalone_edep/mollerParallel.gdml | 81 ++++++++++++++++++++ 1 file changed, 81 insertions(+) create mode 100644 geometry_standalone_edep/mollerParallel.gdml diff --git a/geometry_standalone_edep/mollerParallel.gdml b/geometry_standalone_edep/mollerParallel.gdml new file mode 100644 index 000000000..ee1bc4130 --- /dev/null +++ b/geometry_standalone_edep/mollerParallel.gdml @@ -0,0 +1,81 @@ + + + + +]> + + + + + &positions; + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + From 33013d7fa68c86832a9d3e567754a4fa815c9fcb Mon Sep 17 00:00:00 2001 From: Sakib Rahman Date: Fri, 17 Feb 2023 14:09:16 -0600 Subject: [PATCH 04/22] Remove dependence on main geometry --- geometry_standalone_edep/mollerParallel.gdml | 6 ------ 1 file changed, 6 deletions(-) diff --git a/geometry_standalone_edep/mollerParallel.gdml b/geometry_standalone_edep/mollerParallel.gdml index ee1bc4130..242feefea 100644 --- a/geometry_standalone_edep/mollerParallel.gdml +++ b/geometry_standalone_edep/mollerParallel.gdml @@ -1,14 +1,8 @@ - - -]> - - &positions; From 029ba844bf182887fd1e54453b13b4787c9e84b8 Mon Sep 17 00:00:00 2001 From: Sakib Rahman Date: Fri, 17 Feb 2023 15:20:37 -0600 Subject: [PATCH 05/22] Script to generate geometry and run macro for alternate material and thickness definitions --- .../generateStandalone.py | 97 +++++++++++++++++++ 1 file changed, 97 insertions(+) create mode 100644 scripts/standalone_edep_studies/generateStandalone.py diff --git a/scripts/standalone_edep_studies/generateStandalone.py b/scripts/standalone_edep_studies/generateStandalone.py new file mode 100644 index 000000000..2b6eeaee3 --- /dev/null +++ b/scripts/standalone_edep_studies/generateStandalone.py @@ -0,0 +1,97 @@ +#!/usr/bin/env python +import sys +import os +import math +import time +import argparse + + +parser= argparse.ArgumentParser(description="Change material and thickness based on given input parameters. Example: python changeMaterial.py -m G4_Pb -t 400") +parser.add_argument("-m", dest="material", action="store", required=True, help="Provide material") +parser.add_argument("-t", dest="thickness", action="store", required=True, help="Provide a length that is 10 radiation length of the material") +parser.add_argument("-p", dest="particle", action="store", required=True, help="Provide particle name such as e+") +parser.add_argument("-e", dest="energy", action="store", required=True, help="Provide energy of particle") +parser.add_argument("-n", dest="nevents", action="store", required=True, help="Provide number of events") + + +args=parser.parse_args() + +macro_file = os.path.realpath("macros/run.mac") +output_file=os.path.realpath("geometry_standalone_edep/mollerMother.gdml") + +f=open(output_file, "w+") + +out =" \n \ +\n \ + \n \ + \n \ + \n \ + \n \ + \n \ + \n \ + \n \ + \n \ + \n \ + \n \ + \n \ + \n \ + \n \ + \n \ + \n \ + \n \ + \n \ + \n \ + \n \ + \n \ + \n \ + \n \ + \n \ + \n \ + \n \ + \n \ + \n \ + \n \ + \n \ + \n \ + \n \ + \n \ + \n \ + \n \ + \n \ + \n \ + \n \ + \n \ + \n \ + \n \ + \n \ + \n \ + \n \ +" + +f.write(out) + +m=open(macro_file, "w+") + +out = " \ +/remoll/setgeofile geometry_standalone_edep/mollerMother.gdml \n \ +/remoll/physlist/register QGSP_BERT_HP \n \ +/remoll/physlist/parallel/enable \n \ +/remoll/parallel/setfile geometry_standalone_edep/mollerParallel.gdml \n \ +/run/initialize \n \ +/remoll/evgen/set beam \n \ +/remoll/oldras false \n \ +/remoll/evgen/beam/rasx 0.0 \n \ +/remoll/evgen/beam/rasy 0.0 \n \ +/remoll/evgen/beam/corrx 0.0 \n \ +/remoll/evgen/beam/corry 0.0 \n \ +/remoll/evgen/beam/partName "+args.particle+" \n \ +/remoll/beamene "+args.energy+" \n \ +/remoll/evgen/beam/z -498 \n \ +/remoll/SD/enable_all \n \ +/remoll/SD/detect lowenergyneutral 10 \n \ +/remoll/SD/detect secondaries 10 \n \ +/remoll/filename "+args.particle+"_"+args.energy+".root\n \ +/run/beamOn "+args.nevents+"\n \ +" + +m.write(out) From a0532332d72051a62504230be34441cfed402fc2 Mon Sep 17 00:00:00 2001 From: Sakib Rahman Date: Fri, 17 Feb 2023 16:09:47 -0600 Subject: [PATCH 06/22] Job submission script for beluga --- .../submitBelugaJobs.sh | 23 +++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 scripts/standalone_edep_studies/submitBelugaJobs.sh diff --git a/scripts/standalone_edep_studies/submitBelugaJobs.sh b/scripts/standalone_edep_studies/submitBelugaJobs.sh new file mode 100644 index 000000000..0587c4f02 --- /dev/null +++ b/scripts/standalone_edep_studies/submitBelugaJobs.sh @@ -0,0 +1,23 @@ +#!/bin/bash + +#SBATCH --account=rrg-jmammei +#SBATCH --job-name=remoll-standalone-edep +#SBATCH --time=00:30:00 +#SBATCH --nodes=1 +#SBATCH --ntasks=1 +#SBATCH --cpus-per-task=5 +#SBATCH --mem=10G +#SBATCH --output=/lustre03/project/6049248/commonFiles/log/%A_%a.out +#SBATCH --error=/lustre03/project/6049248/commonFiles/log/%A_%a.err + +cp -r /lustre03/project/6049248/commonFiles/remoll $TMPDIR + +cd $TMPDIR/remoll + +python scripts/standalone_edep_studies/generateStandalone.py -m G4_W -t 1000 -n 1000 -p e+ -e 100 + +./build/remoll macros/run.mac + +mv G4_W_1000mm_e+_100MeV.root /lustre03/project/6049248/commonFiles/out + + From 88d0d16f28f9abe304f248407959939d4277a9bc Mon Sep 17 00:00:00 2001 From: Sakib Rahman Date: Fri, 17 Feb 2023 16:12:10 -0600 Subject: [PATCH 07/22] Update script so that root file name has more information --- scripts/standalone_edep_studies/generateStandalone.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/scripts/standalone_edep_studies/generateStandalone.py b/scripts/standalone_edep_studies/generateStandalone.py index 2b6eeaee3..5427d16a0 100644 --- a/scripts/standalone_edep_studies/generateStandalone.py +++ b/scripts/standalone_edep_studies/generateStandalone.py @@ -8,9 +8,9 @@ parser= argparse.ArgumentParser(description="Change material and thickness based on given input parameters. Example: python changeMaterial.py -m G4_Pb -t 400") parser.add_argument("-m", dest="material", action="store", required=True, help="Provide material") -parser.add_argument("-t", dest="thickness", action="store", required=True, help="Provide a length that is 10 radiation length of the material") +parser.add_argument("-t", dest="thickness", action="store", required=True, help="Provide a thickness in mm that is 10 radiation length of the material") parser.add_argument("-p", dest="particle", action="store", required=True, help="Provide particle name such as e+") -parser.add_argument("-e", dest="energy", action="store", required=True, help="Provide energy of particle") +parser.add_argument("-e", dest="energy", action="store", required=True, help="Provide energy of particle in MeV") parser.add_argument("-n", dest="nevents", action="store", required=True, help="Provide number of events") @@ -85,12 +85,12 @@ /remoll/evgen/beam/corrx 0.0 \n \ /remoll/evgen/beam/corry 0.0 \n \ /remoll/evgen/beam/partName "+args.particle+" \n \ -/remoll/beamene "+args.energy+" \n \ +/remoll/beamene "+args.energy+" MeV\n \ /remoll/evgen/beam/z -498 \n \ /remoll/SD/enable_all \n \ /remoll/SD/detect lowenergyneutral 10 \n \ /remoll/SD/detect secondaries 10 \n \ -/remoll/filename "+args.particle+"_"+args.energy+".root\n \ +/remoll/filename "+args.material+"_"+args.thickness+"mm_"+args.particle+"_"+args.energy+"MeV.root\n \ /run/beamOn "+args.nevents+"\n \ " From a0f88d19362115775875d22a94a67c9f5a1f232e Mon Sep 17 00:00:00 2001 From: Sakib Rahman Date: Fri, 17 Feb 2023 16:29:26 -0600 Subject: [PATCH 08/22] Uniquely identify each file --- scripts/standalone_edep_studies/submitBelugaJobs.sh | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/scripts/standalone_edep_studies/submitBelugaJobs.sh b/scripts/standalone_edep_studies/submitBelugaJobs.sh index 0587c4f02..99c00cbdd 100644 --- a/scripts/standalone_edep_studies/submitBelugaJobs.sh +++ b/scripts/standalone_edep_studies/submitBelugaJobs.sh @@ -18,6 +18,4 @@ python scripts/standalone_edep_studies/generateStandalone.py -m G4_W -t 1000 -n ./build/remoll macros/run.mac -mv G4_W_1000mm_e+_100MeV.root /lustre03/project/6049248/commonFiles/out - - +mv G4_W_1000mm_e+_100MeV.root /lustre03/project/6049248/commonFiles/out/G4_W_1000mm_e+_100MeV_${SLURM_JOBID}_${SLURM_ARRAY_TASK_ID}.root From 794774104267d18c15b5309b8dc1bdfbda8992db Mon Sep 17 00:00:00 2001 From: Sakib Rahman Date: Sun, 5 Mar 2023 01:40:48 -0600 Subject: [PATCH 09/22] Generalize script to produce layered spectrometer straight sections Allow to form single slab geometry like before or straight sections of spectrometer coils --- .../generateStandalone.py | 370 +++++++++++++++--- 1 file changed, 305 insertions(+), 65 deletions(-) diff --git a/scripts/standalone_edep_studies/generateStandalone.py b/scripts/standalone_edep_studies/generateStandalone.py index 5427d16a0..fcc6763f8 100644 --- a/scripts/standalone_edep_studies/generateStandalone.py +++ b/scripts/standalone_edep_studies/generateStandalone.py @@ -4,60 +4,65 @@ import math import time import argparse +import csv -parser= argparse.ArgumentParser(description="Change material and thickness based on given input parameters. Example: python changeMaterial.py -m G4_Pb -t 400") -parser.add_argument("-m", dest="material", action="store", required=True, help="Provide material") -parser.add_argument("-t", dest="thickness", action="store", required=True, help="Provide a thickness in mm that is 10 radiation length of the material") -parser.add_argument("-p", dest="particle", action="store", required=True, help="Provide particle name such as e+") -parser.add_argument("-e", dest="energy", action="store", required=True, help="Provide energy of particle in MeV") -parser.add_argument("-n", dest="nevents", action="store", required=True, help="Provide number of events") - - -args=parser.parse_args() - -macro_file = os.path.realpath("macros/run.mac") -output_file=os.path.realpath("geometry_standalone_edep/mollerMother.gdml") - -f=open(output_file, "w+") - -out =" \n \ -\n \ - \n \ - \n \ - \n \ - \n \ - \n \ - \n \ - \n \ - \n \ - \n \ +def printMaterials(): + out="\ + \n\ + \n\ + \n\ + \n\ + \n\ + \n\ \n \ - \n \ - \n \ - \n \ - \n \ - \n \ - \n \ - \n \ + \n\ + \n\ + \n\ + \n\ + \n\ + \n \ + \n\ + \n\ + \n\ + \n\ + \n\ + \n\ + \n\ + \n\ + \n\ + \n\ + \n\ + \n\ + \n\ + \n\ + \n\ + " + + return out + +def single_slab(p): + detname = ["layer1_log"] + detid = [10] + out="\ \n \ \n \ \n \ \n \ \n \ - \n \ - \n \ - \n \ - \n \ - \n \ - \n \ - \n \ - \n \ + \n \ + \n \ + \n \ + \n \ + \n \ + \n \ + \n \ + \n \ \n \ \n \ \n \ - \n \ - \n \ + \n \ + \n \ \n \ \n \ \n \ @@ -65,33 +70,268 @@ \n \ \n \ \n \ - \n \ -" + \n \ + " + return [detname, detid, out] + +def layers(p): + detname=['second_sglass_logic', 'W_sideplate_logic', 'first_sglass_logic', 'second_sglass_logic1', 'W_sideplate_logic1', 'first_sglass_logic1','top_sglass_logic', 'bot_sglass_logic'] + detid = [1,2,3,4,5,6,7,8] + out="\ + \n \ + \n \ + \n \ + \n \ + \n \ + \n \ + \n \ + \n \ + \n \ + \n \ + \n \ + \n \ + \n \ + \n \ + \n \ + \n \ + \n \ + \n \ + \n \ + \n \ + \n \ + \n \ + \n \ + \n \ + \n \ + \n \ + \n \ + \n \ + \n \ + \n \ + \n \ + \n \ + \n \ + \n \ + \n \ + \n \ + \n \ + \n \ + \n \ + \n \ + \n \ + \n \ + \n \ + \n \ + \n \ + \n \ + \n \ + \n \ + \n \ + \n \ + \n \ + \n \ + \n \ + \n \ + \n \ + \n \ + \n \ + \n \ + \n \ + \n \ + \n \ + \n \ + \n \ + \n \ + \n \ + \n \ + \n \ + \n" + detname + for i in range(0,int(p["n_conductors"])): + detname.append("water_tube_logic_"+str(i)) + detname.append("single_conductor_logic_"+str(i)) + detid.append(50+i) + detid.append(60+i) + out+=" \n \ + \n \ + \n \ + \n \ + \n \ + \n \ + \n \ + \n \ + \n \ + \n \ + \n \ + \n \ + \n \ + \n \ + \n \ + \n \ + \n \ + \n" + if i \n \ + \n \ + \n \ + \n \ + \n \ + \n \ + \n " + out+=" \n \ + \n \ + \n \ + \n \ + \n \ + \n \ + \n \ + \n \ + \n \ + \n \ + \n \ + \n \ + \n \ + \n \ + \n \ + \n \ + \n \ + \n \ + \n \ + \n \ + \n \ + \n \ + \n \ + \n \ + \n \ + \n \ + \n\ + \n \ + \n \ + \n \ + \n \ + \n \ + \n \ + \n \ + \n " + + for i in range(0,int(p["n_conductors"])): + out+=" \n \ + \n \ + \n \ + \n " + if i \n \ + \n \ + \n \ + \n " + out+=" \n \ + \n \ + \n \ + \n \ + \n \ + \n \ + \n \ + \n \ + \n \ + \n \ + \n \ + \n \ + \n \ + \n \ + \n \ + \n \ + " + return [detname, detid, out] + +parser= argparse.ArgumentParser(description="Generate geometry to run standalone sims. Example: python generateStandalone.py -c config1.list") +parser.add_argument("-c", dest="par_list", action="store", required=True, help="Include a config file with list of parameters") + +args=parser.parse_args() + +p={} # dictionary of parameter values + +with open(args.par_list) as csvfile: + reader=csv.reader(csvfile, delimiter=',', quotechar='|') + for row in reader: + p[row[0]]=row[1].strip() + + +macro_file = os.path.realpath(p["run_macro"]) +output_file=os.path.realpath(p["output_geometry"]) + +f=open(output_file, "w+") + +out ="" + +if (p["single_slab"] =="true"): + out =" \n\ + \n \ + \n\ + \n \ + \n " + out+=printMaterials() + layerinfo=single_slab(p) + out+=layerinfo[2] + +else: + p["gap_height"] = (float(p["stack_height"])-float(p["n_conductors"])*float(p["single_conductor_height"]))/(float(p["n_conductors"])-1) + out =" \n \ + \n \ + \n \ + \n \ + \n \ + \n \ + \n \ + \n \ + \n \ + \n \ + \n \ + \n \ + \n \ + " + out+=printMaterials() + layerinfo = layers(p) + out+=layerinfo[2] f.write(out) m=open(macro_file, "w+") -out = " \ -/remoll/setgeofile geometry_standalone_edep/mollerMother.gdml \n \ -/remoll/physlist/register QGSP_BERT_HP \n \ -/remoll/physlist/parallel/enable \n \ -/remoll/parallel/setfile geometry_standalone_edep/mollerParallel.gdml \n \ -/run/initialize \n \ -/remoll/evgen/set beam \n \ -/remoll/oldras false \n \ -/remoll/evgen/beam/rasx 0.0 \n \ -/remoll/evgen/beam/rasy 0.0 \n \ -/remoll/evgen/beam/corrx 0.0 \n \ -/remoll/evgen/beam/corry 0.0 \n \ -/remoll/evgen/beam/partName "+args.particle+" \n \ -/remoll/beamene "+args.energy+" MeV\n \ -/remoll/evgen/beam/z -498 \n \ -/remoll/SD/enable_all \n \ -/remoll/SD/detect lowenergyneutral 10 \n \ -/remoll/SD/detect secondaries 10 \n \ -/remoll/filename "+args.material+"_"+args.thickness+"mm_"+args.particle+"_"+args.energy+"MeV.root\n \ -/run/beamOn "+args.nevents+"\n \ + +out = "\ +/remoll/setgeofile geometry_standalone_edep/mollerMother.gdml \n\ +/remoll/physlist/register QGSP_BERT_HP \n\ +/remoll/physlist/parallel/enable \n\ +/remoll/parallel/setfile geometry_standalone_edep/mollerParallel.gdml \n\ +/run/initialize \n\ +" +for i in layerinfo[0]: + out+="/remoll/geometry/userlimits/usermaxallowedstep "+i+" "+p["max_step_limit_charged_particles"]+"*mm \n\ +" +out+="/remoll/evgen/set beam \n\ +/remoll/oldras false \n\ +/remoll/evgen/beam/rasrefz "+p["beam_z_pos"]+" mm \n\ +/remoll/evgen/beam/rasx 0.0 \n\ +/remoll/evgen/beam/rasy 0.0 \n\ +/remoll/evgen/beam/corrx 0.0 \n\ +/remoll/evgen/beam/corry 0.0 \n\ +/remoll/evgen/beam/partName "+p["particle"]+" \n\ +/remoll/beamene "+p["energy"]+" \n\ +/remoll/evgen/beam/origin "+p["beam_x_pos"]+" "+p["beam_y_pos"]+" "+p["beam_z_pos"]+" mm \n\ +/remoll/evgen/beam/th "+p["beam_th_dir"]+" deg \n\ +/remoll/evgen/beam/ph "+p["beam_ph_dir"]+" deg \n\ +/remoll/SD/disable_all \n" +for i in layerinfo[1]: + out += "\ +/remoll/SD/enable "+str(i)+" \n\ +/remoll/SD/detect lowenergyneutral "+str(i)+" \n\ +/remoll/SD/detect secondaries "+str(i)+" \n" +out+="\ +/remoll/filename "+p["particle"]+"_"+p["energy"]+".root\n\ +/run/beamOn "+p["nevents"]+"\n\ " m.write(out) + From d6f36472fb1cf0ebbe9f941a7610c0b8683b258f Mon Sep 17 00:00:00 2001 From: Sakib Rahman Date: Sun, 5 Mar 2023 01:44:08 -0600 Subject: [PATCH 10/22] Example downstream coil config --- scripts/standalone_edep_studies/DSconfig.list | 28 +++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 scripts/standalone_edep_studies/DSconfig.list diff --git a/scripts/standalone_edep_studies/DSconfig.list b/scripts/standalone_edep_studies/DSconfig.list new file mode 100644 index 000000000..6362ee92a --- /dev/null +++ b/scripts/standalone_edep_studies/DSconfig.list @@ -0,0 +1,28 @@ +single_slab, false +nevents, 2000 +particle, e+ +energy, 100 +n_conductors, 6 +single_conductor_height, 9.7 +single_conductor_width, 24.0 +sideplate_width, 0.2 +first_insulation_width, 0.4 +second_insulation_width, 0.4 +topbot_insulation_width, 1.0 +stack_height, 61.75 +conductor_hole_radius, 3.05 +insulation_mat, mix6337 +sideplate_mat, mix6337 +conductor_hole_mat, G4_WATER +conductor_mat, G4_Cu +x_rotation, 90 +y_rotation, 0 +z_rotation, 0 +beam_x_pos, 0 +beam_y_pos, 0 +beam_z_pos, -40 +beam_th_dir, 10 +beam_ph_dir, 0 +max_step_limit_charged_particles, 0.1 +run_macro, macros/run.mac +output_geometry, geometry_standalone_edep/mollerMother.gdml From 293ebd530704cd000b604ebfea8c9c40b95e23a0 Mon Sep 17 00:00:00 2001 From: Sakib Rahman Date: Sun, 5 Mar 2023 01:45:41 -0600 Subject: [PATCH 11/22] Set root file name based on config name provided by the config file --- scripts/standalone_edep_studies/generateStandalone.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/standalone_edep_studies/generateStandalone.py b/scripts/standalone_edep_studies/generateStandalone.py index fcc6763f8..94c697443 100644 --- a/scripts/standalone_edep_studies/generateStandalone.py +++ b/scripts/standalone_edep_studies/generateStandalone.py @@ -329,7 +329,7 @@ def layers(p): /remoll/SD/detect lowenergyneutral "+str(i)+" \n\ /remoll/SD/detect secondaries "+str(i)+" \n" out+="\ -/remoll/filename "+p["particle"]+"_"+p["energy"]+".root\n\ +/remoll/filename "+p["config_name"]+".root\n\ /run/beamOn "+p["nevents"]+"\n\ " From 9f630cc4e57c9f880a5cdc5e23d1f1529082082c Mon Sep 17 00:00:00 2001 From: Sakib Rahman Date: Sun, 5 Mar 2023 01:46:43 -0600 Subject: [PATCH 12/22] Add config name to configuration file --- scripts/standalone_edep_studies/DSconfig.list | 1 + 1 file changed, 1 insertion(+) diff --git a/scripts/standalone_edep_studies/DSconfig.list b/scripts/standalone_edep_studies/DSconfig.list index 6362ee92a..52faba4de 100644 --- a/scripts/standalone_edep_studies/DSconfig.list +++ b/scripts/standalone_edep_studies/DSconfig.list @@ -1,3 +1,4 @@ +config_name, DSconfig single_slab, false nevents, 2000 particle, e+ From 488f6948dbca9d11aac899603678c797a67ec562 Mon Sep 17 00:00:00 2001 From: Sakib Rahman Date: Sun, 5 Mar 2023 01:49:06 -0600 Subject: [PATCH 13/22] Adapt job submission script to use configuration file instead of individual parameters --- scripts/standalone_edep_studies/submitBelugaJobs.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/standalone_edep_studies/submitBelugaJobs.sh b/scripts/standalone_edep_studies/submitBelugaJobs.sh index 99c00cbdd..272f42b89 100644 --- a/scripts/standalone_edep_studies/submitBelugaJobs.sh +++ b/scripts/standalone_edep_studies/submitBelugaJobs.sh @@ -14,8 +14,8 @@ cp -r /lustre03/project/6049248/commonFiles/remoll $TMPDIR cd $TMPDIR/remoll -python scripts/standalone_edep_studies/generateStandalone.py -m G4_W -t 1000 -n 1000 -p e+ -e 100 +python scripts/standalone_edep_studies/generateStandalone.py -c script/standalone_edep_studies/DSconfig.list ./build/remoll macros/run.mac -mv G4_W_1000mm_e+_100MeV.root /lustre03/project/6049248/commonFiles/out/G4_W_1000mm_e+_100MeV_${SLURM_JOBID}_${SLURM_ARRAY_TASK_ID}.root +mv DSconfig.root /lustre03/project/6049248/commonFiles/out/DSconfig_${SLURM_JOBID}_${SLURM_ARRAY_TASK_ID}.root From b1ccdc3a145f941ffba7c56807d82b718e48cfec Mon Sep 17 00:00:00 2001 From: Sakib Rahman Date: Sun, 5 Mar 2023 01:55:38 -0600 Subject: [PATCH 14/22] Fix typo --- scripts/standalone_edep_studies/submitBelugaJobs.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/standalone_edep_studies/submitBelugaJobs.sh b/scripts/standalone_edep_studies/submitBelugaJobs.sh index 272f42b89..f6551d97e 100644 --- a/scripts/standalone_edep_studies/submitBelugaJobs.sh +++ b/scripts/standalone_edep_studies/submitBelugaJobs.sh @@ -14,7 +14,7 @@ cp -r /lustre03/project/6049248/commonFiles/remoll $TMPDIR cd $TMPDIR/remoll -python scripts/standalone_edep_studies/generateStandalone.py -c script/standalone_edep_studies/DSconfig.list +python scripts/standalone_edep_studies/generateStandalone.py -c scripts/standalone_edep_studies/DSconfig.list ./build/remoll macros/run.mac From 6b6dd43f2c3bcb7c2690067c4a0930366b0eff4a Mon Sep 17 00:00:00 2001 From: Sakib Rahman Date: Sun, 5 Mar 2023 02:06:22 -0600 Subject: [PATCH 15/22] Example upstream configuration file --- scripts/standalone_edep_studies/USconfig.list | 29 +++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 scripts/standalone_edep_studies/USconfig.list diff --git a/scripts/standalone_edep_studies/USconfig.list b/scripts/standalone_edep_studies/USconfig.list new file mode 100644 index 000000000..57c46220c --- /dev/null +++ b/scripts/standalone_edep_studies/USconfig.list @@ -0,0 +1,29 @@ +config_name, USconfig +single_slab, false +nevents, 2000 +particle, e+ +energy, 100 +n_conductors, 5 +single_conductor_height, 9.0 +single_conductor_width, 9.0 +sideplate_width, 0.5 +first_insulation_width, 0.5 +second_insulation_width, 0.5 +topbot_insulation_width, 1.0 +stack_height, 47.845 +conductor_hole_radius, 2.85 +insulation_mat, mix6337 +sideplate_mat, G4_W +conductor_hole_mat, G4_WATER +conductor_mat, G4_Cu +x_rotation, 0 +y_rotation, 0 +z_rotation, 0 +beam_x_pos, 0 +beam_y_pos, 0 +beam_z_pos, -20 +beam_th_dir, 10 +beam_ph_dir, 0 +run_macro, run.mac +output_geometry, mollerMother.gdml +max_step_limit_charged_particles, 0.1 From 9d3d78611271d3dc566964ccc379b63073e8ad4f Mon Sep 17 00:00:00 2001 From: Sakib Rahman Date: Sun, 5 Mar 2023 02:19:38 -0600 Subject: [PATCH 16/22] Needs relative path from remoll main folder --- scripts/standalone_edep_studies/USconfig.list | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/standalone_edep_studies/USconfig.list b/scripts/standalone_edep_studies/USconfig.list index 57c46220c..162ba157f 100644 --- a/scripts/standalone_edep_studies/USconfig.list +++ b/scripts/standalone_edep_studies/USconfig.list @@ -24,6 +24,6 @@ beam_y_pos, 0 beam_z_pos, -20 beam_th_dir, 10 beam_ph_dir, 0 -run_macro, run.mac -output_geometry, mollerMother.gdml +run_macro, macros/run.mac +output_geometry, geometry_standalone_edep/mollerMother.gdml max_step_limit_charged_particles, 0.1 From 34856f5825b378770e90c2137eef1bbb260a606f Mon Sep 17 00:00:00 2001 From: Sakib Rahman Date: Sun, 5 Mar 2023 02:35:05 -0600 Subject: [PATCH 17/22] First iteration of instructions --- scripts/standalone_edep_studies/README.md | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 scripts/standalone_edep_studies/README.md diff --git a/scripts/standalone_edep_studies/README.md b/scripts/standalone_edep_studies/README.md new file mode 100644 index 000000000..ab89b95d1 --- /dev/null +++ b/scripts/standalone_edep_studies/README.md @@ -0,0 +1,21 @@ +# README + +To generate a new config: +```python generateStandalone.py -c ``` + +Important variables: + +Position and Direction: +For upstream coils, leave x_rotation, y_rotation and z_rotation as 0. To change direction of beam hitting a spot on the coil, you need to modify the beam pos and beam dir variables. + +For downstream coils, set x_rotation to 90. Leave the other two as 0. To change direction of beam hitting a spot on the coil, you need to modify the beam pos and beam dir variables. + + +Charged particle Step Length: +You can check the effect of varying the charged particle step length. This is set using the max_step_limit_charged_particles variable in the config file. Note that this will not set limits on gammas. + +Running simulations: +Short jobs (nEvents<2000) can be run from command line: +./build/remoll macros/run.mac + +For long jobs (nEvents), adapt and use the given job submission script. From 8d71ebce18883930b87453bbcad2a69543e562b2 Mon Sep 17 00:00:00 2001 From: Sakib Rahman Date: Sun, 5 Mar 2023 03:01:39 -0600 Subject: [PATCH 18/22] Include information about detector ids --- scripts/standalone_edep_studies/README.md | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/scripts/standalone_edep_studies/README.md b/scripts/standalone_edep_studies/README.md index ab89b95d1..9e02f1030 100644 --- a/scripts/standalone_edep_studies/README.md +++ b/scripts/standalone_edep_studies/README.md @@ -19,3 +19,15 @@ Short jobs (nEvents<2000) can be run from command line: ./build/remoll macros/run.mac For long jobs (nEvents), adapt and use the given job submission script. + +Detector IDs: +1, 6 = Outer most insulation layer +2, 5 = Side Plates +3, 4 = Inner most insulation layer +7, 8 = Top and bottom insulation layer + +50-59: Conductor hole +60-69: Conductor +70-79: Gaps between conductor layers filled with insulation + + From 02495ffdd3d6813fb0613a80301686bf61ddf47e Mon Sep 17 00:00:00 2001 From: Sakib Rahman Date: Sun, 5 Mar 2023 18:57:20 -0600 Subject: [PATCH 19/22] Add material definition of G10 mixture used in full sim --- .../standalone_edep_studies/generateStandalone.py | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/scripts/standalone_edep_studies/generateStandalone.py b/scripts/standalone_edep_studies/generateStandalone.py index 94c697443..527ff196b 100644 --- a/scripts/standalone_edep_studies/generateStandalone.py +++ b/scripts/standalone_edep_studies/generateStandalone.py @@ -10,6 +10,18 @@ def printMaterials(): out="\ \n\ + \n\ + \n\ + \n\ + \n\ + \n\ + \n\ + \n\ + \n\ + \n\ + \n\ + \n\ + \n\ \n\ \n\ \n\ From 11eb1188581216eaa6c0c32cff304e9bff5c5a06 Mon Sep 17 00:00:00 2001 From: Sakib Rahman Date: Mon, 6 Mar 2023 12:47:43 -0600 Subject: [PATCH 20/22] Adapt code to latest submission config --- scripts/standalone_edep_studies/USconfig.list | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/scripts/standalone_edep_studies/USconfig.list b/scripts/standalone_edep_studies/USconfig.list index 162ba157f..fe712ccdb 100644 --- a/scripts/standalone_edep_studies/USconfig.list +++ b/scripts/standalone_edep_studies/USconfig.list @@ -1,6 +1,6 @@ -config_name, USconfig +config_name, USconfig1 single_slab, false -nevents, 2000 +nevents, 100 particle, e+ energy, 100 n_conductors, 5 @@ -19,11 +19,11 @@ conductor_mat, G4_Cu x_rotation, 0 y_rotation, 0 z_rotation, 0 -beam_x_pos, 0 -beam_y_pos, 0 +beam_x_pos, -220.81 +beam_y_pos, 59.17 beam_z_pos, -20 -beam_th_dir, 10 -beam_ph_dir, 0 +beam_th_dir, 85 +beam_ph_dir, -15 run_macro, macros/run.mac output_geometry, geometry_standalone_edep/mollerMother.gdml max_step_limit_charged_particles, 0.1 From 3d83d3c0d203fb9ddd901eab0205d6a1f91520fe Mon Sep 17 00:00:00 2001 From: Sakib Rahman Date: Mon, 6 Mar 2023 13:14:37 -0600 Subject: [PATCH 21/22] Optimal resource requirements on beluga --- scripts/standalone_edep_studies/submitBelugaJobs.sh | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/scripts/standalone_edep_studies/submitBelugaJobs.sh b/scripts/standalone_edep_studies/submitBelugaJobs.sh index f6551d97e..3640852f1 100644 --- a/scripts/standalone_edep_studies/submitBelugaJobs.sh +++ b/scripts/standalone_edep_studies/submitBelugaJobs.sh @@ -5,8 +5,8 @@ #SBATCH --time=00:30:00 #SBATCH --nodes=1 #SBATCH --ntasks=1 -#SBATCH --cpus-per-task=5 -#SBATCH --mem=10G +#SBATCH --cpus-per-task=4 +#SBATCH --mem=16GB #SBATCH --output=/lustre03/project/6049248/commonFiles/log/%A_%a.out #SBATCH --error=/lustre03/project/6049248/commonFiles/log/%A_%a.err @@ -14,8 +14,8 @@ cp -r /lustre03/project/6049248/commonFiles/remoll $TMPDIR cd $TMPDIR/remoll -python scripts/standalone_edep_studies/generateStandalone.py -c scripts/standalone_edep_studies/DSconfig.list +python scripts/standalone_edep_studies/generateStandalone.py -c scripts/standalone_edep_studies/USconfig.list ./build/remoll macros/run.mac -mv DSconfig.root /lustre03/project/6049248/commonFiles/out/DSconfig_${SLURM_JOBID}_${SLURM_ARRAY_TASK_ID}.root +mv USconfig.root /lustre03/project/6049248/commonFiles/out/USconfig1_${SLURM_JOBID}_${SLURM_ARRAY_TASK_ID}.root From c6bd3f251bef03c738be5bf552b59fc921d49de8 Mon Sep 17 00:00:00 2001 From: Sakib Rahman Date: Mon, 6 Mar 2023 13:15:13 -0600 Subject: [PATCH 22/22] Fix typo --- scripts/standalone_edep_studies/submitBelugaJobs.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/standalone_edep_studies/submitBelugaJobs.sh b/scripts/standalone_edep_studies/submitBelugaJobs.sh index 3640852f1..578010d5b 100644 --- a/scripts/standalone_edep_studies/submitBelugaJobs.sh +++ b/scripts/standalone_edep_studies/submitBelugaJobs.sh @@ -18,4 +18,4 @@ python scripts/standalone_edep_studies/generateStandalone.py -c scripts/standalo ./build/remoll macros/run.mac -mv USconfig.root /lustre03/project/6049248/commonFiles/out/USconfig1_${SLURM_JOBID}_${SLURM_ARRAY_TASK_ID}.root +mv USconfig.root /lustre03/project/6049248/commonFiles/out/USconfig_${SLURM_JOBID}_${SLURM_ARRAY_TASK_ID}.root