Skip to content
Snippets Groups Projects
Commit 038e1a61 authored by lintao@ihep.ac.cn's avatar lintao@ihep.ac.cn
Browse files

Merge branch 'lintao/detsim/fix-matrix' into 'master'

Fix the issue when there is no tracker_region_rmax and tracker_region_zmax

See merge request !120
parents db0c01c1 78a8d9ee
No related branches found
No related tags found
1 merge request!120Fix the issue when there is no tracker_region_rmax and tracker_region_zmax
Pipeline #12993 passed with stage
in 18 minutes and 55 seconds
......@@ -30,9 +30,13 @@ Edm4hepWriterAnaElemTool::BeginOfRunAction(const G4Run*) {
m_geosvc = service<IGeomSvc>("GeomSvc");
if (m_geosvc) {
dd4hep::Detector* dd4hep_geo = m_geosvc->lcdd();
// try to get the constants
R = dd4hep_geo->constant<double>("tracker_region_rmax")/dd4hep::mm*CLHEP::mm;
Z = dd4hep_geo->constant<double>("tracker_region_zmax")/dd4hep::mm*CLHEP::mm;
try {
// try to get the constants
R = dd4hep_geo->constant<double>("tracker_region_rmax")/dd4hep::mm*CLHEP::mm;
Z = dd4hep_geo->constant<double>("tracker_region_zmax")/dd4hep::mm*CLHEP::mm;
} catch (std::runtime_error&e) {
warning() << "constant tracker_region_rmax and tracker_region_zmax is not defined. " << endmsg;
}
info() << "Tracker Region "
<< " R: " << R
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment