Skip to content

Commit c2a5fe8

Browse files
Adding LHCb calorimeter geometry and macro for example1 (apt-sim#311)
1 parent 70e47b4 commit c2a5fe8

5 files changed

+53477
-0
lines changed

examples/CMakeLists.txt

+1
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33

44
# - Common data for testing
55
configure_file(data/cms2018_sd.gdml ${PROJECT_BINARY_DIR}/cms2018_sd.gdml)
6+
configure_file(data/lhcb2024_downstream_calos.gdml ${PROJECT_BINARY_DIR}/lhcb2024_downstream_calos.gdml)
67
configure_file(data/ppttbar.hepmc3 ${PROJECT_BINARY_DIR}/ppttbar.hepmc3)
78

89
# - Subprojects

examples/Example1/CMakeLists.txt

+1
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,7 @@ target_link_libraries(example1
6666
SET(GDML ${PROJECT_BINARY_DIR}/cms2018_sd.gdml)
6767
configure_file("macros/example1.mac.in" "${PROJECT_BINARY_DIR}/example1.mac")
6868
configure_file("macros/example1_ttbar.mac.in" "${PROJECT_BINARY_DIR}/example1_ttbar.mac")
69+
configure_file("macros/example1_ttbar_LHCb.mac.in" "${PROJECT_BINARY_DIR}/example1_ttbar_LHCb.mac")
6970
configure_file("macros/example1_ttbar_noadept.mac.in" "${PROJECT_BINARY_DIR}/example1_ttbar_noadept.mac")
7071

7172
# Tests
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
1+
# SPDX-FileCopyrightText: 2023 CERN
2+
# SPDX-License-Identifier: Apache-2.0
3+
# example23.in
4+
#
5+
6+
## =============================================================================
7+
## Geant4 macro for modelling simplified sampling calorimeters
8+
## =============================================================================
9+
##
10+
/run/numberOfThreads 1
11+
/control/verbose 0
12+
/run/verbose 0
13+
/process/verbose 0
14+
/tracking/verbose 0
15+
/event/verbose 0
16+
##
17+
/adept/setSeed 1
18+
19+
/detector/filename lhcb2024_downstream_calos.gdml
20+
# Temporary workaround since we don't have a G4 to VecGeom converter
21+
/adept/setVecGeomGDML lhcb2024_downstream_calos.gdml
22+
/adept/setVerbosity 0
23+
## Threshold for buffering tracks before sending to GPU
24+
/adept/setTransportBufferThreshold 2000
25+
## Total number of GPU track slots (not per thread)
26+
/adept/setMillionsOfTrackSlots 8
27+
/adept/setMillionsOfHitSlots 1
28+
29+
# If true, particles are transported on the GPU across the whole geometry, GPU regions are ignored
30+
/adept/setTrackInAllRegions true
31+
# In order to do the GPU transport only in specific regions
32+
#/adept/addGPURegion EcalRegion
33+
#/adept/addGPURegion HcalRegion
34+
35+
36+
## -----------------------------------------------------------------------------
37+
## Optionally, set a constant magnetic filed:
38+
## -----------------------------------------------------------------------------
39+
/detector/setField 0 0 0 tesla
40+
#/detector/setField 0 0 3.8 tesla
41+
42+
## -----------------------------------------------------------------------------
43+
## Set secondary production threshold, init. the run and set primary properties
44+
## -----------------------------------------------------------------------------
45+
/run/setCut 0.7 mm
46+
/run/initialize
47+
48+
## User-defined Event verbosity: 1 = total edep, 2 = energy deposit per placed sensitive volume
49+
/eventAction/verbose 2
50+
51+
/gun/hepmc
52+
# Geometry only contains calorimeters, use a point close to the ECAL
53+
/gun/position 0 1 12 m
54+
/generator/hepmcAscii/maxevents 256
55+
/generator/hepmcAscii/firstevent 0
56+
/generator/hepmcAscii/open ppttbar.hepmc3
57+
/generator/hepmcAscii/verbose 0
58+
59+
## -----------------------------------------------------------------------------
60+
## Run the simulation with the given number of events and print list of processes
61+
## -----------------------------------------------------------------------------
62+
63+
/adept/setSeed 1
64+
65+
# run events with parametrised simulation
66+
# by default all created models are active
67+
/run/beamOn 8
68+

0 commit comments

Comments
 (0)