7 #include "CLHEP/Units/GlobalSystemOfUnits.h"
17 template <
typename DDView>
18 double getDouble(
const char*
s, DDView
const&
ev) {
20 std::vector<const DDsvalues_type*>
result;
22 std::vector<const DDsvalues_type*>::iterator it =
result.begin();
24 for (; it !=
result.end(); ++it) {
30 const std::vector<std::string>&
temp =
val.strings();
31 if (
temp.size() != 1) {
34 return double(::atof(
temp[0].c_str()));
39 template <
typename DDView>
42 std::vector<const DDsvalues_type*>
result;
44 std::vector<const DDsvalues_type*>::iterator it =
result.begin();
46 for (; it !=
result.end(); ++it) {
52 const std::vector<std::string>&
temp =
val.strings();
53 if (
temp.size() != 1) {
72 _trans(fv->translation()),
80 _radLength(getDouble(
"TrackerRadLength", *fv)),
81 _xi(getDouble(
"TrackerXi", *fv)),
82 _pixROCRows(getDouble(
"PixelROCRows", *fv)),
83 _pixROCCols(getDouble(
"PixelROCCols", *fv)),
84 _pixROCx(getDouble(
"PixelROC_X", *fv)),
85 _pixROCy(getDouble(
"PixelROC_Y", *fv)),
86 _stereo(getString(
"TrackerStereoDetectors", *fv) == strue),
87 _siliconAPVNum(getDouble(
"SiliconAPVNumber", *fv)) {
94 : _trans(fv->translation()),
103 _radLength(fv->
get<double>(
"TrackerRadLength")),
104 _xi(fv->
get<double>(
"TrackerXi")),
105 _pixROCRows(fv->
get<double>(
"PixelROCRows")),
106 _pixROCCols(fv->
get<double>(
"PixelROCCols")),
107 _pixROCx(fv->
get<double>(
"PixelROC_X")),
108 _pixROCy(fv->
get<double>(
"PixelROC_Y")),
109 _stereo(fv->
get<
std::string_view>(
"TrackerStereoDetectors") == strue),
110 _siliconAPVNum(fv->
get<double>(
"SiliconAPVNumber")) {}
115 : _trans(onePGD._x, onePGD._y, onePGD._z),
129 _ddname(onePGD._name),
132 _geographicalID(onePGD._geographicalID),
133 _radLength(onePGD._radLength),
135 _pixROCRows(onePGD._pixROCRows),
136 _pixROCCols(onePGD._pixROCCols),
137 _pixROCx(onePGD._pixROCx),
138 _pixROCy(onePGD._pixROCy),
139 _stereo(onePGD._stereo),
140 _siliconAPVNum(onePGD._siliconAPVNum) {
195 cont.emplace_back(
this);
214 void operator()(
GeometricDet const* det)
const {
delete const_cast<GeometricDet*>(det); }
244 const std::vector<double>& par =
_params;