Back to home page

EIC code displayed by LXR

 
 

    


Warning, /DD4hep/examples/RICH/CMakeLists.txt is written in an unsupported language. File is not indexed.

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 cmake_minimum_required(VERSION 3.14 FATAL_ERROR)
0012 
0013 IF(NOT TARGET DD4hep::DDCore)
0014   find_package ( DD4hep REQUIRED )
0015   include ( ${DD4hep_DIR}/cmake/DD4hep.cmake )
0016   include ( ${DD4hep_DIR}/cmake/DD4hepBuild.cmake )
0017   dd4hep_configure_output()
0018 ENDIF()
0019 
0020 dd4hep_set_compiler_flags()
0021 dd4hep_use_python_executable()
0022 
0023 #==========================================================================
0024 dd4hep_print("|++> RICH: ROOT version: ${ROOT_VERSION}")
0025 
0026 if(NOT ${ROOT_VERSION} VERSION_GREATER_EQUAL 6.18.00)
0027   dd4hep_print("|++> Not building RICH test")
0028   return()
0029 endif()
0030 dd4hep_print("|++> Building RICH test")
0031 
0032 #--------------------------------------------------------------------------
0033 dd4hep_configure_output()
0034 
0035 set(RICH_INSTALL ${CMAKE_INSTALL_PREFIX}/examples/RICH)
0036 dd4hep_add_plugin(RICHExample SOURCES src/*.cpp
0037   USES DD4hep::DDCore DD4hep::DDRec DD4hep::DDCond ROOT::Core ROOT::Geom ROOT::GenVector ROOT::MathCore)
0038 install(TARGETS RICHExample LIBRARY DESTINATION lib)
0039 install(DIRECTORY compact scripts DESTINATION ${RICH_INSTALL} )
0040 dd4hep_configure_scripts( RICH DEFAULT_SETUP WITH_TESTS)
0041 
0042 if(NOT TARGET DD4hep::DDG4)
0043   return()
0044 endif()
0045 
0046 # ---Test: run simulation
0047 dd4hep_add_test_reg( RICH_sim_simulation
0048   COMMAND    "${CMAKE_INSTALL_PREFIX}/bin/run_test_RICH.sh"
0049   EXEC_ARGS  ${Python_EXECUTABLE} ${RICH_INSTALL}/scripts/richsim.py
0050              --outputFile "${RICH_INSTALL}/sim.root"
0051   REGEX_PASS "TEST: passed"
0052   REGEX_FAIL " Exception; EXCEPTION;ERROR;Error;FATAL"
0053 )
0054 
0055 # ---Test: Number of raw photon hits
0056 dd4hep_add_test_reg( RICH_sim_number_of_hits
0057   COMMAND    "${CMAKE_INSTALL_PREFIX}/bin/run_test_RICH.sh"
0058   EXEC_ARGS  root.exe -b -x -n -q -l
0059              "${RICH_INSTALL}/scripts/test_number_of_hits.C(\"${RICH_INSTALL}/sim.root\")"
0060   REGEX_PASS "TEST: passed"
0061   REGEX_FAIL "TEST: failed"
0062   DEPENDS RICH_sim_simulation
0063 )
0064 
0065 # ---Test: Energy deposition
0066 dd4hep_add_test_reg( RICH_sim_energy_deposition
0067   COMMAND    "${CMAKE_INSTALL_PREFIX}/bin/run_test_RICH.sh"
0068   EXEC_ARGS  root.exe -b -x -n -q -l
0069              "${RICH_INSTALL}/scripts/test_energy_deposition.C(\"${RICH_INSTALL}/sim.root\")"
0070   REGEX_PASS "TEST: passed"
0071   REGEX_FAIL "TEST: failed"
0072   DEPENDS RICH_sim_simulation
0073 )