8 #include <DD4hep/DD4hepUnits.h>
18 template <
typename DDView>
19 double getDouble(
const char*
s, DDView
const&
ev) {
21 std::vector<const DDsvalues_type*>
result;
23 std::vector<const DDsvalues_type*>::iterator it =
result.begin();
25 for (; it !=
result.end(); ++it) {
31 const std::vector<std::string>&
temp =
val.strings();
32 if (
temp.size() != 1) {
35 return double(::atof(
temp[0].c_str()));
40 template <
typename DDView>
43 std::vector<const DDsvalues_type*>
result;
45 std::vector<const DDsvalues_type*>::iterator it =
result.begin();
47 for (; it !=
result.end(); ++it) {
53 const std::vector<std::string>&
temp =
val.strings();
54 if (
temp.size() != 1) {
73 trans_(fv->translation()),
81 radLength_(getDouble(
"TrackerRadLength", *fv)),
82 xi_(getDouble(
"TrackerXi", *fv)),
83 pixROCRows_(getDouble(
"PixelROCRows", *fv)),
84 pixROCCols_(getDouble(
"PixelROCCols", *fv)),
85 pixROCx_(getDouble(
"PixelROC_X", *fv)),
86 pixROCy_(getDouble(
"PixelROC_Y", *fv)),
87 stereo_(getString(
"TrackerStereoDetectors", *fv) == strue),
88 siliconAPVNum_(getDouble(
"SiliconAPVNumber", *fv)) {
94 : trans_(fv->translation() /
dd4hep::mm),
100 radLength_(fv->
get<double>(
"TrackerRadLength")),
101 xi_(fv->
get<double>(
"TrackerXi")),
102 pixROCRows_(fv->
get<double>(
"PixelROCRows")),
103 pixROCCols_(fv->
get<double>(
"PixelROCCols")),
104 pixROCx_(fv->
get<double>(
"PixelROC_X")),
105 pixROCy_(fv->
get<double>(
"PixelROC_Y")),
106 stereo_(fv->
get<
std::string_view>(
"TrackerStereoDetectors") == strue),
107 siliconAPVNum_(fv->
get<double>(
"SiliconAPVNumber")) {
110 for (
size_t pit = 0; pit <
params_.size(); pit++) {
122 : trans_(onePGD.x_, onePGD.y_, onePGD.z_),
136 ddname_(onePGD.name_),
139 geographicalID_(onePGD.geographicalID_),
140 radLength_(onePGD.radLength_),
142 pixROCRows_(onePGD.pixROCRows_),
143 pixROCCols_(onePGD.pixROCCols_),
144 pixROCx_(onePGD.pixROCx_),
145 pixROCy_(onePGD.pixROCy_),
146 stereo_(onePGD.stereo_),
147 siliconAPVNum_(onePGD.siliconAPVNum_) {
202 cont.emplace_back(
this);
222 void operator()(
GeometricTimingDet const* det)
const {
delete const_cast<GeometricTimingDet*>(det); }
254 const std::vector<double>& par =
params_;