Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-18 09:14:54

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 from __future__ import absolute_import
0012 
0013 
0014 def run():
0015   import math
0016   import DigiTest
0017   from dd4hep import units
0018   digi = DigiTest.Test(geometry=None)
0019 
0020   event = DigiTest.test_setup_1(digi)
0021   proc = event.adopt_action('DigiContainerSequenceAction/Smearing',
0022                             parallel=False,
0023                             input_mask=0xEEE5,
0024                             input_segment='deposits',
0025                             output_mask=0xFFF0,
0026                             output_segment='outputs')
0027   smear = digi.create_action('DigiDepositSmearEnergy/Smear')
0028   #  sigma(E)[GeV]/E[GeV] = 0.02        (systematic) + 0.005 / sqrt(E[GeV]) (intrinsic) + 1keV/E[GeV] (instrumentation)
0029   #  sigma(E)[GeV]        = 0.02*E[GeV] (systematic) + 0.005 * sqrt(E[GeV]) (intrinsic) + 1keV (instrumentation)
0030   smear.intrinsic_fluctuation = 0.005 / math.sqrt(units.GeV)
0031   smear.systematic_resolution = 0.02 / units.GeV
0032   smear.instrumentation_resolution = 1 * units.keV
0033   smear.pair_ionisation_energy = 10 * units.eV
0034   smear.ionization_fluctuation = True
0035   # proc.adopt_container_processor(smear, conts)
0036   proc.adopt_container_processor(smear, digi.containers())
0037 
0038   event.adopt_action('DigiStoreDump/HeaderDump')
0039   # ========================================================================================================
0040   digi.info('Starting digitization core')
0041   digi.run_checked(num_events=5, num_threads=7, parallel=5)
0042 
0043 
0044 if __name__ == '__main__':
0045   run()