15 template <
typename DDView>
16 double getDouble(
const char*
s, DDView
const&
ev) {
18 std::vector<const DDsvalues_type*>
result;
20 std::vector<const DDsvalues_type*>::iterator it =
result.begin();
22 for (; it !=
result.end(); ++it) {
28 const std::vector<std::string>&
temp =
val.strings();
29 if (
temp.size() != 1) {
32 return double(::atof(
temp[0].c_str()));
37 template <
typename DDView>
40 std::vector<const DDsvalues_type*>
result;
42 std::vector<const DDsvalues_type*>::iterator it =
result.begin();
44 for (; it !=
result.end(); ++it) {
50 const std::vector<std::string>&
temp =
val.strings();
51 if (
temp.size() != 1) {
70 : ddname_(fv->
name()),
73 trans_(fv->translation()),
79 radLength_(getDouble(
"TrackerRadLength", *fv)),
80 xi_(getDouble(
"TrackerXi", *fv)),
81 pixROCRows_(getDouble(
"PixelROCRows", *fv)),
82 pixROCCols_(getDouble(
"PixelROCCols", *fv)),
83 pixROCx_(getDouble(
"PixelROC_X", *fv)),
84 pixROCy_(getDouble(
"PixelROC_Y", *fv)),
85 stereo_(getString(
"TrackerStereoDetectors", *fv) == strue),
86 isLowerSensor_(getString(
"TrackerLowerDetectors", *fv) == strue),
87 isUpperSensor_(getString(
"TrackerUpperDetectors", *fv) == strue),
88 siliconAPVNum_(getDouble(
"SiliconAPVNumber", *fv)),
89 isFromDD4hep_(
false) {
107 params_(computeLegacyShapeParameters(shape_, fv->solid())),
108 pixROCRows_(fv->
get<double>(
"PixelROCRows")),
109 pixROCCols_(fv->
get<double>(
"PixelROCCols")),
110 pixROCx_(fv->
get<double>(
"PixelROC_X")),
111 pixROCy_(fv->
get<double>(
"PixelROC_Y")),
112 stereo_(fv->
get<
std::string_view>(
"TrackerStereoDetectors") == strue),
113 isLowerSensor_(fv->
get<
std::string_view>(
"TrackerLowerDetectors") == strue),
114 isUpperSensor_(fv->
get<
std::string_view>(
"TrackerUpperDetectors") == strue),
115 siliconAPVNum_(fv->
get<double>(
"SiliconAPVNumber")),
116 isFromDD4hep_(
true) {
126 : ddname_(onePGD._name),
129 geographicalID_(onePGD._geographicalID),
130 trans_(onePGD._x, onePGD._y, onePGD._z),
144 radLength_(onePGD._radLength),
146 pixROCRows_(onePGD._pixROCRows),
147 pixROCCols_(onePGD._pixROCCols),
148 pixROCx_(onePGD._pixROCx),
149 pixROCy_(onePGD._pixROCy),
150 stereo_(onePGD._stereo),
151 siliconAPVNum_(onePGD._siliconAPVNum)
235 cont.emplace_back(
this);
254 void operator()(
GeometricDet const* det)
const {
delete const_cast<GeometricDet*>(det); }
275 const dd4hep::Solid& mySolid)
const {
276 std::vector<double> myOldDDShapeParameters;
280 const dd4hep::Box& myBox = dd4hep::Box(mySolid);
288 const dd4hep::Trap& myTrap = dd4hep::Trap(mySolid);
304 const dd4hep::Tube& myTube = dd4hep::Tube(mySolid);
305 myOldDDShapeParameters = {
313 return myOldDDShapeParameters;