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=0xCBAA, input=[digi.next_input()])
0022   # ========================================================================================================
0023   digi.info('Creating collision overlay....')
0024   # ========================================================================================================
0025   overlay = input_action.adopt_action('DigiSequentialActionSequence/Overlay-1')
0026   overlay.adopt_action('DigiDDG4ROOT/Read-1', mask=0xCBEE, input=[digi.next_input()])
0027   digi.info('Created input.overlay-1')
0028   # ========================================================================================================
0029   event = digi.event_action('DigiSequentialActionSequence/EventAction')
0030   combine = event.adopt_action('DigiContainerCombine/Combine',
0031                                parallel=False,
0032                                input_masks=[0xCBAA, 0xCBEE],
0033                                output_mask=0xAAA0,
0034                                output_segment='deposits')
0035   combine.erase_combined = False
0036   proc = event.adopt_action('DigiContainerSequenceAction/HitP2',
0037                             parallel=False,
0038                             input_mask=0xAAA0,
0039                             input_segment='deposits',
0040                             output_mask=0xEEE5,
0041                             output_segment='deposits')
0042   combine = digi.create_action('DigiDepositWeightedPosition/DepoCombine')
0043   proc.adopt_container_processor(combine, digi.containers())
0044   conts = [c for c in digi.containers()]
0045   event.adopt_action('DigiContainerDrop/Drop',
0046                      containers=conts,
0047                      input_segment='deposits',
0048                      input_masks=[0xAAA0])
0049   event.adopt_action('DigiStoreDump/HeaderDump')
0050   event.adopt_action('DigiStoreDump/HistoryDump',
0051                      dump_history=True,
0052                      containers=['SiTrackerBarrelHits', 'MCParticles'],
0053                      segments=['deposits'],
0054                      masks=[0xAAA0, 0xEEE5])
0055   # ========================================================================================================
0056   digi.info('Starting digitization core')
0057   digi.run_checked(num_events=3, num_threads=1, parallel=5)
0058 
0059 
0060 if __name__ == '__main__':
0061   run()