7 #include "CLHEP/Units/GlobalSystemOfUnits.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)) {
96 : trans_(fv->translation()),
102 radLength_(fv->
get<double>(
"TrackerRadLength")),
103 xi_(fv->
get<double>(
"TrackerXi")),
104 pixROCRows_(fv->
get<double>(
"PixelROCRows")),
105 pixROCCols_(fv->
get<double>(
"PixelROCCols")),
106 pixROCx_(fv->
get<double>(
"PixelROC_X")),
107 pixROCy_(fv->
get<double>(
"PixelROC_Y")),
108 stereo_(fv->
get<
std::string_view>(
"TrackerStereoDetectors") == strue),
109 siliconAPVNum_(fv->
get<double>(
"SiliconAPVNumber")) {
116 for (
size_t pit = 0; pit <
params_.size(); pit++) {
128 : trans_(onePGD.x_, onePGD.y_, onePGD.z_),
142 ddname_(onePGD.name_),
145 geographicalID_(onePGD.geographicalID_),
146 radLength_(onePGD.radLength_),
148 pixROCRows_(onePGD.pixROCRows_),
149 pixROCCols_(onePGD.pixROCCols_),
150 pixROCx_(onePGD.pixROCx_),
151 pixROCy_(onePGD.pixROCy_),
152 stereo_(onePGD.stereo_),
153 siliconAPVNum_(onePGD.siliconAPVNum_) {
208 cont.emplace_back(
this);
228 void operator()(
GeometricTimingDet const* det)
const {
delete const_cast<GeometricTimingDet*>(det); }
258 const std::vector<double>& par =
params_;