Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2026-09-14 09:30:44

0001 #!/usr/bin/env ruby
0002 # =============================================================================
0003 # @file   RunEICRecon.rb
0004 # @author Derek Anderson
0005 # @date   05.11.2023
0006 #
0007 # An easy script to interface with EICRecon
0008 # =============================================================================
0009 
0010 # i/o parameters
0011 in_ddsim   = "forPFA1.epic26041e10th33pim.edm4hep.root"
0012 out_podio  = "test.eicrecon.root"
0013 
0014 # collections to output
0015 out_collect = [
0016   "HcalBarrelHits",
0017   "HcalBarrelRawHits",
0018   "HcalBarrelRawHitLinks",
0019   "HcalBarrelRecHits",
0020   "HcalBarrelClusters",
0021 ].compact.reject(&:empty?).join(',')
0022 
0023 # plugins to run
0024 plugins = [
0025   "dump_flags",
0026 ].compact.reject(&:empty?).join(',')
0027 
0028 # additional options
0029 options = [
0030   "-Peicrecon:LogLevel=debug",
0031 ].compact.reject(&:empty?).join(' ')
0032 
0033 # set options appropriately
0034 out_opt  = out_collect.empty? ? "" : "-Ppodio:output_collections=#{out_collect}"
0035 plug_opt = plugins.empty? ? "" : "-Pplugins=#{plugins}"
0036 opt_opt  = options.empty? ? "" : "#{options}"
0037 
0038 # run EICrecon
0039 exec("eicrecon #{plug_opt} #{out_opt} #{opt_opt} -Ppodio:output_file=#{out_podio} #{in_ddsim}")
0040 
0041 # end =========================================================================