Back to home page

EIC code displayed by LXR

 
 

    


Warning, file /DD4hep/examples/DDDigi/scripts/TestResegmentation.py was not indexed or was modified since last indexation (in which case cross-reference links may be missing, inaccurate or erroneous).

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 
0012 
0013 def run():
0014   import DigiTest
0015   digi = DigiTest.Test(geometry=None)
0016   digi.load_geo()
0017   input_action = digi.input_action('DigiParallelActionSequence/READER')
0018   # ========================================================================
0019   digi.info('Created SIGNAL input')
0020   signal = input_action.adopt_action('DigiDDG4ROOT/SignalReader',
0021                                      mask=0x0,
0022                                      input=[digi.next_input()])
0023   digi.check_creation([signal])
0024   # ========================================================================
0025   event = digi.event_action('DigiSequentialActionSequence/EventAction')
0026   seq = event.adopt_action('DigiContainerSequenceAction/ResegmentSeq',
0027                            parallel=True,
0028                            input_mask=0x0, input_segment='inputs',
0029                            output_mask=0xFEED, output_segment='outputs')
0030   resegment = digi.create_action('DigiResegment/Resegment')
0031   resegment.detector = 'Minitel1'
0032   resegment.readout = 'NewMinitel1Hits'
0033   resegment.descriptor = """
0034   <readout name="NewMinitel1Hits">
0035     <segmentation type="CartesianGridXY" grid_size_x="20*mm" grid_size_y="20*mm"/>
0036     <id>system:6,side:2,module:8,x:28:-12,y:52:-12</id>
0037   </readout>
0038   """
0039   resegment.debug = False
0040   seq.adopt_container_processor(resegment, 'Minitel1Hits')
0041   event.adopt_action('DigiStoreDump/StoreDump')
0042 
0043   digi.info('Created event.dump')
0044   # ========================================================================
0045   digi.run_checked(num_events=5, num_threads=15, parallel=3)
0046 
0047 
0048 if __name__ == '__main__':
0049   run()