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 DigiTest
0016   digi = DigiTest.Test(geometry=None)
0017 
0018   input_action = digi.input_action('DigiParallelActionSequence/READER')
0019   # ========================================================================================================
0020   digi.info('Created SIGNAL input')
0021   input_action.adopt_action('DigiDDG4ROOT/SignalReader', mask=0x0, input=[digi.next_input()])
0022   # ========================================================================================================
0023   digi.info('Creating collision overlays....')
0024   # ========================================================================================================
0025   overlay = input_action.adopt_action('DigiSequentialActionSequence/Overlay-1')
0026   overlay.adopt_action('DigiDDG4ROOT/Read-1', mask=0x1, input=[digi.next_input()])
0027   digi.info('Created input.overlay-1')
0028   # ========================================================================================================
0029   overlay = input_action.adopt_action('DigiSequentialActionSequence/Overlay-2')
0030   overlay.adopt_action('DigiDDG4ROOT/Read-2', mask=0x2, input=[digi.next_input()])
0031   digi.info('Created input.overlay-2')
0032   # ========================================================================================================
0033   event = digi.event_action('DigiSequentialActionSequence/EventAction')
0034   event.adopt_action('DigiStoreDump/StoreDump')
0035   combine = event.adopt_action('DigiContainerCombine/Combine',
0036                                parallel=True,
0037                                input_masks=[0x0, 0x1, 0x2],
0038                                output_mask=0xAAA0,
0039                                output_segment='inputs')
0040   combine.erase_combined = True
0041   proc = event.adopt_action('DigiContainerSequenceAction/HitP2',
0042                             parallel=True,
0043                             input_mask=0xAAA0,
0044                             input_segment='inputs',
0045                             output_mask=0xAAA1,
0046                             output_segment='inputs')
0047   count = digi.create_action('DigiDepositWeightedPosition/DepoCombine')
0048   proc.adopt_container_processor(count, digi.containers())
0049   event.adopt_action('DigiStoreDump/DumpWeighted')
0050   # ========================================================================================================
0051   digi.info('Starting digitization core')
0052   digi.run_checked(num_events=1, num_threads=25, parallel=5)
0053 
0054 
0055 if __name__ == '__main__':
0056   run()