Skip to content

Commit

Permalink
Adding ttbar macro and re-triggering build
Browse files Browse the repository at this point in the history
  • Loading branch information
JuanGonzalezCaminero committed Feb 9, 2024
1 parent 6d2b881 commit 9cf7a03
Show file tree
Hide file tree
Showing 4 changed files with 69 additions and 1 deletion.
1 change: 1 addition & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,7 @@ if(BUILD_TESTING)
endif()

configure_file(examples/data/cms2018_sd.gdml ${CMAKE_BINARY_DIR}/cms2018_sd.gdml)
configure_file(examples/data/ppttbar.hepmc3 ${CMAKE_BINARY_DIR}/ppttbar.hepmc3)

set(ADEPT_G4_INTEGRATION_SRCS
src/AdePTTrackingManager.cc
Expand Down
1 change: 1 addition & 0 deletions examples/Example1/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -69,5 +69,6 @@ target_link_libraries(example1
# Install macros and geometry file

configure_file("macros/example1.mac.in" "${CMAKE_BINARY_DIR}/example1.mac")
configure_file("macros/example1_ttbar.mac.in" "${CMAKE_BINARY_DIR}/example1_ttbar.mac")

# Tests
66 changes: 66 additions & 0 deletions examples/Example1/macros/example1_ttbar.mac.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
# SPDX-FileCopyrightText: 2023 CERN
# SPDX-License-Identifier: Apache-2.0
# example23.in
#

## =============================================================================
## Geant4 macro for modelling simplified sampling calorimeters
## =============================================================================
##
/run/numberOfThreads 1
/control/verbose 0
/run/verbose 0
/process/verbose 0
/tracking/verbose 0
/event/verbose 0
##
/adept/setSeed 1

/detector/filename cms2018_sd.gdml
# Temporary workaround since we don't have a G4 to VecGeom converter
/adept/setVecGeomGDML cms2018_sd.gdml
/adept/setVerbosity 0
## Threshold for buffering tracks before sending to GPU
/adept/setTransportBufferThreshold 2000
## Total number of GPU track slots (not per thread)
/adept/setMillionsOfTrackSlots 1
/adept/setMillionsOfHitSlots 1

# If true, particles are transported on the GPU across the whole geometry, GPU regions are ignored
/adept/setTrackInAllRegions true
# In order to do the GPU transport only in specific regions
/adept/addGPURegion EcalRegion
/adept/addGPURegion HcalRegion


## -----------------------------------------------------------------------------
## Optionally, set a constant magnetic filed:
## -----------------------------------------------------------------------------
/detector/setField 0 0 0 tesla
#/detector/setField 0 0 3.8 tesla

## -----------------------------------------------------------------------------
## Set secondary production threshold, init. the run and set primary properties
## -----------------------------------------------------------------------------
/run/setCut 0.7 mm
/run/initialize

## User-defined Event verbosity: 1 = total edep, 2 = energy deposit per placed sensitive volume
/eventAction/verbose 2

/gun/hepmc
/generator/hepmcAscii/maxevents 256
/generator/hepmcAscii/firstevent 0
/generator/hepmcAscii/open ppttbar.hepmc3
/generator/hepmcAscii/verbose 0

## -----------------------------------------------------------------------------
## Run the simulation with the given number of events and print list of processes
## -----------------------------------------------------------------------------

/adept/setSeed 1

# run events with parametrised simulation
# by default all created models are active
/run/beamOn 1

2 changes: 1 addition & 1 deletion src/AdePTGeant4Integration.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -419,7 +419,7 @@ void AdePTGeant4Integration::FillG4Step(GPUHit *aGPUHit,

void AdePTGeant4Integration::ReturnTracks(std::vector<adeptint::TrackData> *tracksFromDevice, int debugLevel)
{
G4cout << "Returning " << tracksFromDevice->size() << " tracks from device" << G4endl;
// G4cout << "Returning " << tracksFromDevice->size() << " tracks from device" << G4endl;

constexpr double tolerance = 10. * vecgeom::kTolerance;
int tid = GetThreadID();
Expand Down

0 comments on commit 9cf7a03

Please sign in to comment.