Skip to content
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
2 changes: 1 addition & 1 deletion sbndcode/LArSoftConfigurations/gen/genie_sbnd.fcl
Original file line number Diff line number Diff line change
Expand Up @@ -376,7 +376,7 @@ sbnd_genie_simple_rockbox: {
# As we are changing the FV we need to recalculate the maximum path lengths
# This file was generated by running with:
# GeomScan: "flux: 10000 1.1 1"
GeomScan: "file: GENIE/sbnd_rock_maxpathlength_fluxI_gdmlv02_00.xml"
GeomScan: "file: GENIE/sbnd_rock_maxpathlength_fluxL_gdmlv02_03.xml"
}


Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# This FHiCL file generates the geomscal file needed for GENIE rockbox.
# Author: Marco Del Tutto (mdeltutt@fnal.gov)
#
# Run with:
#
# bash> lar -c make_genie_geomscan_file_sbnd.fcl -n 1
#
# This will generate a file called "maxpathlength.xml". Rename this file
# to include the current flux config and gdml version. For example,
# for flux config L and gdml v02_03, assign it the following name:
#
# bash> mv maxpathlength.xml sbnd_rock_maxpathlength_fluxL_gdmlv02_03.xml
#
# Lastly, this file needs to live in sbnd_data. Specifically, in
# sbnd_data/GENIE/. Ask the currect release manager to copy your
# file in sbnd_data/GENIE/ and tag a new sbnd_data version.

#include "prodgenie_corsika_proton_rockbox_sbnd.fcl"

physics.producers.generator.GeomScan: "flux: 10000 1.1 1"

1 change: 1 addition & 0 deletions test/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ cet_enable_asserts()
add_subdirectory(Geometry)
add_subdirectory(LArSoftConfigurations)
add_subdirectory(JobConfigurations)
add_subdirectory(GENIE)
#add_subdirectory(CRT)
add_subdirectory(fcl)

Expand Down
6 changes: 6 additions & 0 deletions test/GENIE/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
cet_test(CheckGENIEGeomScan HANDBUILT
TEST_EXEC python
TEST_ARGS ${CMAKE_CURRENT_SOURCE_DIR}/check_genie_geom_scan.py
DATAFILES check_genie_geom_scan.py
)

40 changes: 40 additions & 0 deletions test/GENIE/check_genie_geom_scan.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
import fhicl

pset = fhicl.make_pset('prodgenie_corsika_proton_rockbox_sbnd.fcl')

#
# Extract flux and GDML used to make the GeomScan file
#
pset_geom_scan = pset['physics']['producers']['generator']['GeomScan']

geom_scan_flux_config = pset_geom_scan.split('flux')[1][0]
geom_scan_gdml_version = pset_geom_scan.split('gdml')[1][:6]

print('Using GeomScan file:', pset_geom_scan)
print('\t -> using flux configuration:', geom_scan_flux_config)
print('\t -> using gdml version:', geom_scan_gdml_version)


#
# Extract flux and GDML set in services and GENIE
#
pset_gdml = pset['services']['Geometry']['GDML']
pset_flux = pset['physics']['producers']['generator']['FluxSearchPaths']

flux_config = pset_flux.split('config')[1][0]
gdml_version = pset_gdml.split('sbnd_')[1][:6]

print('Using:')
print('\t -> gdml version:', gdml_version)
print('\t -> flux configuration:', flux_config)

#
# Check that the two are the same, if not, need to regenerate the GeomScan file
#
message = 'Please regenerate the GeomScan file. Instructions are in fcl file make_genie_geomscan_file_sbnd.fcl.'

assert geom_scan_flux_config == flux_config, f"Have you updated/changed the flux files? {message}"

assert geom_scan_gdml_version == gdml_version, f"Have you updated/changed the GDML file? {message}"


13 changes: 7 additions & 6 deletions ups/product_deps
Original file line number Diff line number Diff line change
Expand Up @@ -256,7 +256,8 @@ product version qual flags <table_format=2>
sbncode v10_04_06_01 -
cetmodules v3_24_01 - only_for_build
sbnd_data v01_29_00 - optional
sbndutil v10_04_06_01 - optional
sbndutil v10_04_06_01 - optional
fhiclpy v4_03_05 -
end_product_list
####################################

Expand Down Expand Up @@ -311,11 +312,11 @@ end_product_list
# case it is optional.
#
####################################
qualifier sbncode sbndutil sbnd_data notes
c14:debug c14:debug c14:debug -nq-
c14:prof c14:prof c14:prof -nq-
e26:debug e26:debug e26:debug -nq-
e26:prof e26:prof e26:prof -nq-
qualifier sbncode sbndutil sbnd_data fhiclpy notes
c14:debug c14:debug c14:debug -nq- c14:debug
c14:prof c14:prof c14:prof -nq- c14:prof
e26:debug e26:debug e26:debug -nq- e26:debug
e26:prof e26:prof e26:prof -nq- e26:prof
end_qualifier_list
####################################

Expand Down