Back to home page

EIC code displayed by LXR

 
 

    


Warning, /DD4hep/examples/AlignDet/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 #==========================================================================
0022 
0023 set(AlignDet_INSTALL ${CMAKE_INSTALL_PREFIX}/examples/AlignDet)
0024 dd4hep_add_plugin(AlignDetExample SOURCES src/*.cpp
0025   USES DD4hep::DDCore DD4hep::DDCond DD4hep::DDAlign
0026        ROOT::Core ROOT::Geom ROOT::GenVector ROOT::MathCore
0027   )
0028 dd4hep_install_dir(compact DESTINATION ${AlignDet_INSTALL})
0029 dd4hep_configure_scripts(AlignDet DEFAULT_SETUP WITH_TESTS)
0030 install(TARGETS AlignDetExample LIBRARY DESTINATION lib)
0031 
0032 #
0033 #---Testing: Load Telescope geometry and read conditions ------------------
0034 dd4hep_add_test_reg( AlignDet_Telescope_dump_geometry
0035   COMMAND    "${CMAKE_INSTALL_PREFIX}/bin/run_test_AlignDet.sh"
0036   EXEC_ARGS  geoPluginRun -volmgr -destroy 
0037   -compact file:${AlignDet_INSTALL}/compact/Telescope.xml 
0038   -plugin DD4hep_DetectorDump
0039   REGEX_PASS "/world/Telescope/module_9 NumDau\\:1 VolID\\:00000903 Place"
0040   REGEX_FAIL " ERROR ;EXCEPTION;Exception"
0041   )
0042 #
0043 #---Testing: Load Telescope geometry and read and print alignments --------
0044 dd4hep_add_test_reg( AlignDet_Telescope_populate
0045   COMMAND    "${CMAKE_INSTALL_PREFIX}/bin/run_test_AlignDet.sh"
0046   EXEC_ARGS  geoPluginRun -volmgr -destroy -plugin DD4hep_AlignmentExample_populate 
0047      -input file:${AlignDet_INSTALL}/compact/Telescope.xml -iovs 10
0048   REGEX_PASS "Summary          INFO  Processed a total 190 conditions \\(S:190,L:0,C:0,M:0\\) and \\(C:190,M:0\\) alignments. Created:200"
0049   REGEX_FAIL " ERROR ;EXCEPTION;Exception"
0050   )
0051 #
0052 #---Testing: Load Telescope geometry and read and print alignments --------
0053 dd4hep_add_test_reg( AlignDet_Telescope_read_xml
0054   COMMAND    "${CMAKE_INSTALL_PREFIX}/bin/run_test_AlignDet.sh"
0055   EXEC_ARGS  geoPluginRun -volmgr -destroy -plugin DD4hep_AlignmentExample_read_xml 
0056      -input  file:${AlignDet_INSTALL}/compact/Telescope.xml 
0057      -deltas file:${CMAKE_INSTALL_PREFIX}/examples/Conditions/data/repository.xml 
0058   REGEX_PASS "39 conditions in slice. \\(T:20,S:20,L:0,C:0,M:0\\) Alignments accessed: 20 \\(A:19,M:0\\) for IOV:run\\(1\\)"
0059   REGEX_FAIL " ERROR ;EXCEPTION;Exception"
0060   )
0061 #
0062 #---Testing: Write out alignment file from the alignment data using a detelement scan
0063 dd4hep_add_test_reg( AlignDet_Telescope_dump_xml
0064   COMMAND    "${CMAKE_INSTALL_PREFIX}/bin/run_test_AlignDet.sh"
0065   EXEC_ARGS  geoPluginRun -volmgr -destroy -plugin DD4hep_AlignmentExample_read_xml 
0066   -input file:${AlignDet_INSTALL}/compact/Telescope.xml 
0067   -delta file:${CMAKE_INSTALL_PREFIX}/examples/Conditions/data/repository.xml 
0068   -plugin DD4hep_ConditionsXMLRepositoryWriter -iov_type run -iov_value 1500
0069   REGEX_PASS "Summary: Converted 33 conditions. 0 conditions without recipe"
0070   REGEX_FAIL " ERROR ;EXCEPTION;Exception"
0071   )
0072 #
0073 #---Testing: Write out alignment file from the alignment data using a detelement scan
0074 dd4hep_add_test_reg( AlignDet_Telescope_write_xml
0075   COMMAND    "${CMAKE_INSTALL_PREFIX}/bin/run_test_AlignDet.sh"
0076   EXEC_ARGS  geoPluginRun -volmgr -destroy
0077   -plugin DD4hep_AlignmentExample_read_xml 
0078   -input file:${AlignDet_INSTALL}/compact/Telescope.xml 
0079   -delta file:${CMAKE_INSTALL_PREFIX}/examples/Conditions/data/repository.xml 
0080   -plugin DD4hep_ConditionsXMLRepositoryWriter -iov_type run -iov_value 1500 -manager -output new_cond.xml
0081   REGEX_PASS "Successfully wrote 33 conditions \\(0 unconverted\\) to file: new_cond.xml"
0082   REGEX_FAIL " ERROR ;EXCEPTION;Exception"
0083   )
0084 #
0085 #---Testing: Simple stress: Load Telescope geometry and have multiple runs on IOVs
0086 dd4hep_add_test_reg( AlignDet_Telescope_stress
0087   COMMAND    "${CMAKE_INSTALL_PREFIX}/bin/run_test_AlignDet.sh"
0088   EXEC_ARGS  geoPluginRun  -volmgr -destroy -plugin DD4hep_AlignmentExample_stress 
0089       -input file:${AlignDet_INSTALL}/compact/Telescope.xml -iovs 20 -runs 111
0090   REGEX_PASS "Summary: Total 4598 conditions used \\(S:4598,L:0,C:0,M:0\\) \\(A:380,M:0\\)"
0091   REGEX_FAIL " ERROR ;EXCEPTION;Exception"
0092   )
0093 #
0094 #---Testing: Load Telescope geometry and read and print alignments --------
0095 dd4hep_add_test_reg( AlignDet_Telescope_align_new
0096   COMMAND    "${CMAKE_INSTALL_PREFIX}/bin/run_test_AlignDet.sh"
0097   EXEC_ARGS  geoPluginRun -volmgr -destroy -plugin DD4hep_AlignmentExample_align_telescope 
0098      -input  file:${AlignDet_INSTALL}/compact/Telescope.xml 
0099      -setup  file:${CMAKE_INSTALL_PREFIX}/examples/Conditions/data/manager.xml 
0100   REGEX_PASS "World transformation of: /world/Telescope/module_3/sensor  Tr:\\( 3.9e\\+02,       0,     4.9 \\[cm\\]\\)"
0101   REGEX_FAIL " ERROR ;EXCEPTION;Exception"
0102   )
0103 #
0104 #---Testing: Load Telescope geometry and read and print alignments --------
0105 dd4hep_add_test_reg( AlignDet_Telescope_align_nominal
0106   COMMAND    "${CMAKE_INSTALL_PREFIX}/bin/run_test_AlignDet.sh"
0107   EXEC_ARGS  geoPluginRun -volmgr -destroy -plugin DD4hep_AlignmentExample_nominal
0108      -input  file:${AlignDet_INSTALL}/compact/Telescope.xml 
0109   REGEX_PASS "Printed 20, scanned 20 and computed a total of 20 alignments \\(C:20,M:0\\)"
0110   REGEX_FAIL " ERROR ;EXCEPTION;Exception"
0111   )
0112 #
0113 #---Testing: Load Telescope geometry and read and print alignments --------
0114 IF(DD4HEP_BUILD_DEBUG STREQUAL "ON")
0115   SET(EXPECTED_CONDITIONS 52)
0116   SET(EXPECTED_TS 33)
0117 ELSE()
0118   SET(EXPECTED_CONDITIONS 40)
0119   SET(EXPECTED_TS 21)
0120 ENDIF()
0121 dd4hep_add_test_reg( AlignDet_Telescope_readback_xml
0122   COMMAND    "${CMAKE_INSTALL_PREFIX}/bin/run_test_AlignDet.sh"
0123   EXEC_ARGS  geoPluginRun -volmgr -destroy -plugin DD4hep_AlignmentExample_read_xml
0124   -input  file:${AlignDet_INSTALL}/compact/Telescope.xml
0125   -deltas file:./new_cond.xml
0126   REGEX_PASS "${EXPECTED_CONDITIONS} conditions in slice. \\(T:${EXPECTED_TS},S:${EXPECTED_TS},L:0,C:0,M:0\\) Alignments accessed: 20 \\(A:19,M:0\\) for IOV:run\\(1\\)"
0127   REGEX_FAIL " ERROR ;EXCEPTION;Exception"
0128   )
0129 set_property(TEST t_AlignDet_Telescope_readback_xml APPEND PROPERTY DEPENDS t_AlignDet_Telescope_write_xml)
0130 #
0131 #---Testing: Extended stress: Load CLICSiD geometry and have multiple runs on IOVs
0132 dd4hep_add_test_reg( AlignDet_CLICSiD_stress_LONGTEST
0133   COMMAND    "${CMAKE_INSTALL_PREFIX}/bin/run_test_AlignDet.sh"
0134   EXEC_ARGS  geoPluginRun  -volmgr -destroy -plugin DD4hep_AlignmentExample_stress 
0135       -input file:${DD4hep_ROOT}/DDDetectors/compact/SiD.xml -iovs 10 -runs 100
0136   REGEX_PASS "Summary: Total 7372260 conditions used \\(S:7372260,L:0,C:0,M:0\\) \\(A:351060,M:0\\)"
0137   REGEX_FAIL " ERROR ;EXCEPTION;Exception"
0138   )
0139 #
0140 #---Testing: Load Telescope geometry and read and print alignments --------
0141 dd4hep_add_test_reg( AlignDet_CLICSiD_align_nominal_LONGTEST
0142   COMMAND    "${CMAKE_INSTALL_PREFIX}/bin/run_test_AlignDet.sh"
0143   EXEC_ARGS  geoPluginRun -print WARNING -volmgr -destroy -plugin DD4hep_AlignmentExample_nominal
0144      -input  file:${DD4hep_ROOT}/DDDetectors/compact/SiD.xml
0145   REGEX_PASS "Printed 35107, scanned 35107 and computed a total of 35107 alignments \\(C:35107,M:0\\)"
0146   REGEX_FAIL " ERROR ;EXCEPTION;Exception"
0147   )
0148 #
0149 #---Testing: Load ALEPH TPC geometry --------------------------------------
0150 dd4hep_add_test_reg( AlignDet_AlephTPC_load
0151   COMMAND    "${CMAKE_INSTALL_PREFIX}/bin/run_test_AlignDet.sh"
0152   EXEC_ARGS  geoPluginRun
0153              -input file:${AlignDet_INSTALL}/compact/AlephTPC.xml
0154              -destroy -no-interpreter -plugin DD4hep_GlobalAlignmentInstall
0155   REGEX_PASS "190 nodes/ 25 volume UID's in Detector Geometry"
0156   REGEX_FAIL " ERROR ;EXCEPTION;Exception"
0157   )
0158 #
0159 #---Testing: Load and misalign ALEPH TPC geometry -------------------------
0160 dd4hep_add_test_reg( AlignDet_AlephTPC_global_align
0161   COMMAND    "${CMAKE_INSTALL_PREFIX}/bin/run_test_AlignDet.sh"
0162   EXEC_ARGS  geoPluginRun
0163              -input file:${AlignDet_INSTALL}/compact/AlephTPC.xml
0164              -destroy -no-interpreter
0165              -plugin DD4hep_GlobalAlignmentInstall
0166              -plugin DD4hep_XMLLoader file:${AlignDet_INSTALL}/compact/AlephTPC_alignment.xml BUILD_DEFAULT
0167   REGEX_PASS "Successfully parsed XML: AlephTPC_alignment.xml"
0168   REGEX_FAIL " ERROR ;EXCEPTION;Exception"
0169   )
0170 #
0171 #---Testing: Load and misalign ALEPH TPC geometry -------------------------
0172 dd4hep_add_test_reg( AlignDet_AlephTPC_global_reset
0173   COMMAND    "${CMAKE_INSTALL_PREFIX}/bin/run_test_AlignDet.sh"
0174   EXEC_ARGS  geoPluginRun
0175              -input file:${AlignDet_INSTALL}/compact/AlephTPC.xml
0176              -destroy -no-interpreter
0177              -plugin DD4hep_GlobalAlignmentInstall
0178              -plugin DD4hep_XMLLoader file:${AlignDet_INSTALL}/compact/AlephTPC_alignment.xml
0179              -plugin DD4hep_XMLLoader file:${AlignDet_INSTALL}/compact/AlephTPC_reset.xml
0180   REGEX_PASS "Successfully parsed XML: AlephTPC_reset.xml"
0181   REGEX_FAIL " ERROR ;EXCEPTION;Exception"
0182   )