diff --git a/DDDetectors/compact/SiD_Limits.xml b/DDDetectors/compact/SiD_Limits.xml new file mode 100644 index 0000000000000000000000000000000000000000..454cca0b8a93b2f120cf52535e3f4900c005b1cd --- /dev/null +++ b/DDDetectors/compact/SiD_Limits.xml @@ -0,0 +1,10 @@ +<limits> + <limitset name="cal_limits"> + <limit name="step_length_max" particles="*" value="5.0" unit="mm" /> + </limitset> + <limitset name="SiTrackerBarrelRegionLimitSet"> + <limit name="step_length_max" particles="*" value="5.0" unit="mm" /> + <limit name="ekin_min" particles="*" value="0.01" unit="MeV" /> + <limit name="range_min" particles="*" value="5.0" unit="mm" /> + </limitset> +</limits> diff --git a/examples/CLICSiD/scripts/CLIC_ECAL_Parallel_Readout.py b/examples/CLICSiD/scripts/CLIC_ECAL_Parallel_Readout.py new file mode 100644 index 0000000000000000000000000000000000000000..3a3e9d2ada8994347e13df0800cc9f197dbeec12 --- /dev/null +++ b/examples/CLICSiD/scripts/CLIC_ECAL_Parallel_Readout.py @@ -0,0 +1,93 @@ +# ========================================================================== +# AIDA Detector description implementation +# -------------------------------------------------------------------------- +# Copyright (C) Organisation europeenne pour la Recherche nucleaire (CERN) +# All rights reserved. +# +# For the licensing terms see $DD4hepINSTALL/LICENSE. +# For the list of contributors see $DD4hepINSTALL/doc/CREDITS. +# +# ========================================================================== +# +""" + + Subtest using CLICSid showing the usage of the G4Particle gun using + the Geant4GeneratorWrapper object. + + @author M.Frank + @version 1.0 + +""" +from __future__ import absolute_import, unicode_literals + +import DDG4 +import CLICSid +from DDG4 import OutputLevel as Output + +import logging +logging.basicConfig(format='%(levelname)s: %(message)s', level=logging.INFO) +logger = logging.getLogger(__name__) + + +def run(): + import os + import time + import g4units + install_dir = os.environ['DD4hepExamplesINSTALL'] + file = str("file:" + install_dir + "/examples/CLICSiD/compact/SiD_ECAL_Parallel_Readout.xml"); + sid = CLICSid.CLICSid() + sid.kernel.loadGeometry(file) + sid.kernel.UI = "UI" + sid.geant4.setupCshUI() + sid.setupField(quiet=False) + DDG4.importConstants(sid.kernel.detectorDescription(), debug=False) + # + sid.geant4.printDetectors() + sid.geant4.setupROOTOutput('RootOutput','CLICSiD_'+time.strftime('%Y-%m-%d_%H-%M')) + # + gun = sid.geant4.setupGun("Gun", + Standalone=True, + particle='e+', + energy=20 * g4units.GeV, + position=(0, 0, 0), + multiplicity=1, + isotrop=True) + # ============================================================================= + # + # Setup the parallel readout for the detector EcalBarrel + # + # ============================================================================= + # First use the default definition for the basic setup (and the first sensitive action) + det = str('EcalBarrel') + typ = sid.geant4.sensitive_types['calorimeter'] + print(sid.geant4.sensitive_types['calorimeter']) + seq = DDG4.SensitiveSequence(sid.kernel, str('Geant4SensDetActionSequence/')+det) + seq.enableUI() + act = DDG4.SensitiveAction(sid.kernel, str(typ+'/EcalBarrelHandler'), det) + act.enableUI() + seq.add(act) + # Add extra parallel readout action with readout EcalBarrelHits_0 + act = DDG4.SensitiveAction(sid.kernel, str(typ+'/EcalBarrelHandler_0'), det) + act.ReadoutName = 'EcalBarrelHits_0' + act.enableUI() + seq.add(act) + # Add extra parallel readout action with readout EcalBarrelHits_1 + act = DDG4.SensitiveAction(sid.kernel, str(typ+'/EcalBarrelHandler_1'), det) + act.ReadoutName = 'EcalBarrelHits_1' + act.enableUI() + seq.add(act) + # Add extra parallel readout action with readout EcalBarrelHits_2 + act = DDG4.SensitiveAction(sid.kernel, str(typ+'/EcalBarrelHandler_2'), det) + act.ReadoutName = 'EcalBarrelHits_2' + act.enableUI() + seq.add(act) + # ============================================================================= + + sid.setupPhysics('QGSP_BERT') + sid.test_config() + sid.kernel.run() + sid.kernel.terminate() + + +if __name__ == "__main__": + run()