Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2026-09-09 08:23:51

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 g4units import ns
0012 
0013 
0014 def run():
0015   import DigiTest
0016   digi = DigiTest.Test(geometry=None)
0017   attenuation = digi.attenuation
0018 
0019   in_seq = digi.input_action('DigiParallelActionSequence/READER')
0020   # ========================================================================================================
0021   spillover = in_seq.adopt_action('DigiSequentialActionSequence/Spillover-25')
0022   evtreader = spillover.adopt_action('DigiDDG4ROOT/Reader-25ns', mask=0x1, input=[digi.next_input()], keep_raw=False)
0023   attenuate = spillover.adopt_action('DigiAttenuatorSequence/Att-25ns',
0024                                      t0=-25 * ns,
0025                                      signal_decay='exponential',
0026                                      processor_type='DigiAttenuator',
0027                                      input_mask=evtreader.mask,
0028                                      input_segment='inputs',
0029                                      containers=attenuation)
0030   hist_drop = spillover.adopt_action('DigiHitHistoryDrop/Drop-25ns', masks=[evtreader.mask])
0031   digi.check_creation([spillover, evtreader, attenuate, hist_drop])
0032   digi.info('Created input.spillover-25')
0033   # ========================================================================================================
0034   event = digi.event_action('DigiSequentialActionSequence/EventAction')
0035   combine = event.adopt_action('DigiContainerCombine/Combine',
0036                                input_masks=[0x0, 0x1, 0x2, 0x3, 0x4, 0x5, 0x6],
0037                                input_segment='inputs',
0038                                output_mask=0xFEED,
0039                                output_segment='deposits')
0040   evtdump = event.adopt_action('DigiStoreDump/StoreDump')
0041   digi.check_creation([evtdump, combine])
0042   digi.info('Created event.dump')
0043   # ========================================================================================================
0044   digi.run_checked(num_events=5, num_threads=5, parallel=3)
0045 
0046 
0047 if __name__ == '__main__':
0048   run()