The CLIC electromagnetic calorimeter is foreseen to be a sampling calorimeter with high granularity and is thus particularly well-suited to test the CLUE algorithm.
A simple recipe follows to run k4CLUE as part of the CLIC reconstruction chain:
source /cvmfs/sw-nightlies.hsf.org/key4hep/setup.sh
git clone --recurse-submodules https://github.com/key4hep/k4Clue.git
git clone git@github.com:key4hep/k4MarlinWrapper.git
git clone https://github.com/iLCSoft/CLICPerformance
cd CLICPerformance/clicConfig
ddsim --steeringFile clic_steer.py --compactFile $LCGEO/CLIC/compact/CLIC_o3_v14/CLIC_o3_v14.xml --enableGun --gun.distribution uniform --gun.particle gamma --gun.energy "10*GeV" --outputFile gamma_10GeV_edm4hep.root --numberOfEvents 10
cp $K4MARLINWRAPPER/examples/clicRec_e4h_input.py .
k4run clicRec_e4h_input.py --EventDataSvc.input gamma_10GeV_edm4hep.root
#Run CLUE in CLIC reconstruction
cp ../../k4Clue/gaudi_opts/clicRec_e4h_input_gun_clue.py .
k4run clicRec_e4h_input_gun_clue.py --EventDataSvc.input gamma_10GeV_edm4hep.root
#Run CLUE standalone
cp ../../k4Clue/gaudi_opts/clue_gaudi_wrapper.py .
k4run clue_gaudi_wrapper.py --EventDataSvc.input my_output.root
In case you have changed something from the original repo and you have rebuild the package, you should use source build/k4clueenv.sh
to make k4run
aware of your new changes.
The --enableGun
option in the ddsim
command generates particle from the interaction vertex.
To generate particle from the suface of the CLICdet ECAL, substitute the generation command with the following
ddsim --steeringFile clic_steer.py --compactFile $LCGEO/CLIC/compact/CLIC_o3_v14/CLIC_o3_v14.xml --enableG4GPS --runType "run" --macroFile myGPS.mac --outputFile gps_gamma_10GeV_edm4hep.root
where myGPS.mac
can be found in this folder.
In the case of simulation from the surface, the config file needs to be adapted: clicRec_e4h_input_gps.py
If you want to visualise the output with the CED event display:
cd ../..
glced &
k4run k4MarlinWrapper/k4MarlinWrapper/examples/event_display.py --EventDataSvc.input=CLICPerformance/clicConfig/gamma_10GeV_edm4hep.root
The recipe is taken from the following webpage.