Back to home page

EIC code displayed by LXR

 
 

    


Warning, /geant4/examples/extended/parameterisations/Par04/examplePar04_torch_vae.mac is written in an unsupported language. File is not indexed.

0001 #  examplePar04_torch_vae.mac
0002 #
0003 
0004 /control/execute common_settings_highgran.mac
0005 # Initialize
0006 /run/initialize
0007 
0008 /control/execute common_settings_postInit.mac
0009 
0010 # Inference Setup
0011 ## dimension of the latent vector (encoded vector in a Variational Autoencoder model)
0012 /Par04/inference/setSizeLatentVector 10
0013 ## size of the condition vector (energy, angle and geometry)
0014 /Par04/inference/setSizeConditionVector 4
0015 ## path to the model which is set to download by cmake
0016 /Par04/inference/setModelPathName MLModels/Generator.pt
0017 ## Set ML model to use (VAE, CaloDiT-2)
0018 /Par04/inference/setModelType VAE
0019 /Par04/inference/setInferenceLibrary TORCH
0020 ## set mesh size for inference == mesh size of a full sim that
0021 ## was used for training; it coincides with readout mesh size
0022 /Par04/inference/setSizeOfRhoCells 2.325 mm
0023 /Par04/inference/setSizeOfZCells 3.4 mm
0024 /Par04/inference/setNbOfRhoCells 18
0025 /Par04/inference/setNbOfPhiCells 50
0026 /Par04/inference/setNbOfZCells 45
0027 
0028 # Fast Simulation
0029 /analysis/setFileName 10GeV_100events_vae_torch.root
0030 ## dynamically set readout mesh from particle direction
0031 ## needs to be the first fast sim model!
0032 /param/ActivateModel defineMesh
0033 ## ML fast sim, configured with the inference setup /Par04/inference
0034 /param/ActivateModel inferenceModel
0035 /run/beamOn 100