Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2026-09-15 08:24:01

0001 # ==========================================================================
0002 #  AIDA Detector description implementation
0003 # --------------------------------------------------------------------------
0004 # Copyright (C) Organisation europeenne pour la Recherche nucleaire (CERN)
0005 # All rights reserved.
0006 #
0007 # For the licensing terms see $DD4hepINSTALL/LICENSE.
0008 # For the list of contributors see $DD4hepINSTALL/doc/CREDITS.
0009 #
0010 # ==========================================================================
0011 
0012 
0013 def run():
0014   import math
0015   import DigiTest
0016   from dd4hep import units
0017   digi = DigiTest.Test(geometry=None)
0018 
0019   event = DigiTest.test_setup_1(digi)
0020   proc = event.adopt_action('DigiContainerSequenceAction/Smearing',
0021                             parallel=False,
0022                             input_mask=0xEEE5,
0023                             input_segment='deposits',
0024                             output_mask=0xFFF0,
0025                             output_segment='outputs')
0026   smear = digi.create_action('DigiDepositSmearEnergy/Smear')
0027   #  sigma(E)[GeV]/E[GeV] = 0.02        (systematic) + 0.005 / sqrt(E[GeV]) (intrinsic) + 1keV/E[GeV] (instrumentation)
0028   #  sigma(E)[GeV]        = 0.02*E[GeV] (systematic) + 0.005 * sqrt(E[GeV]) (intrinsic) + 1keV (instrumentation)
0029   smear.intrinsic_fluctuation = 0.005 / math.sqrt(units.GeV)
0030   smear.systematic_resolution = 0.02 / units.GeV
0031   smear.instrumentation_resolution = 1 * units.keV
0032   smear.pair_ionisation_energy = 10 * units.eV
0033   smear.ionization_fluctuation = True
0034   # proc.adopt_container_processor(smear, conts)
0035   proc.adopt_container_processor(smear, digi.containers())
0036 
0037   event.adopt_action('DigiStoreDump/HeaderDump')
0038   # ========================================================================================================
0039   digi.info('Starting digitization core')
0040   digi.run_checked(num_events=5, num_threads=7, parallel=5)
0041 
0042 
0043 if __name__ == '__main__':
0044   run()