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   signal = input_action.adopt_action('DigiDDG4ROOT/SignalReader', mask=0x0, input=[digi.next_input()])
0022   digi.check_creation([signal])
0023   # ========================================================================================================
0024   digi.info('Creating collision overlays....')
0025   # ========================================================================================================
0026   overlay = input_action.adopt_action('DigiSequentialActionSequence/Overlay-1')
0027   evtreader = overlay.adopt_action('DigiDDG4ROOT/Reader-1', mask=0x1, input=[digi.next_input()])
0028   hist_drop = overlay.adopt_action('DigiHitHistoryDrop/Drop-1', masks=[evtreader.mask])
0029   digi.check_creation([overlay, evtreader, hist_drop])
0030   digi.info('Created input.overlay25')
0031   # ========================================================================================================
0032   overlay = input_action.adopt_action('DigiSequentialActionSequence/Overlay-2')
0033   evtreader = overlay.adopt_action('DigiDDG4ROOT/Reader-2', mask=0x2, input=[digi.next_input()])
0034   hist_drop = overlay.adopt_action('DigiHitHistoryDrop/Drop-2', masks=[evtreader.mask])
0035   digi.check_creation([overlay, evtreader, hist_drop])
0036   digi.info('Created input.overlay50')
0037   # ========================================================================================================
0038   overlay = input_action.adopt_action('DigiSequentialActionSequence/Overlay-3')
0039   evtreader = overlay.adopt_action('DigiDDG4ROOT/Reader-3', mask=0x3, input=[digi.next_input()])
0040   hist_drop = overlay.adopt_action('DigiHitHistoryDrop/Drop-3', masks=[evtreader.mask])
0041   digi.check_creation([overlay, evtreader, hist_drop])
0042   digi.info('Created input.overlay75')
0043   # ========================================================================================================
0044   event = digi.event_action('DigiSequentialActionSequence/EventAction')
0045   combine = event.adopt_action('DigiContainerCombine/Combine',
0046                                parallel=True,
0047                                input_masks=[0x0, 0x1, 0x2, 0x3],
0048                                output_mask=0xFEED,
0049                                output_segment='deposits',
0050                                erase_combined=False)
0051   combine.erase_combined = True  # Not thread-safe! only do in SequentialActionSequence
0052   dump = event.adopt_action('DigiStoreDump/StoreDump')
0053   digi.check_creation([combine, dump])
0054   digi.info('Created event.dump')
0055 
0056   # ========================================================================================================
0057   digi.run_checked(num_events=5, num_threads=10, parallel=3)
0058 
0059 
0060 if __name__ == '__main__':
0061   run()