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;
22 ev.specificsV(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) {
33 throw cms::Exception(
"Configuration") <<
"I need 1 " << s <<
" tags";
35 return double(::atof(temp[0].c_str()));
40 template <
typename DDView>
41 std::string getString(
const char* s, DDView
const& ev) {
43 std::vector<const DDsvalues_type*>
result;
44 ev.specificsV(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) {
55 throw cms::Exception(
"Configuration") <<
"I need 1 " << s <<
" tags";
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);
240 rot_.GetComponents(x, y, z);
254 const std::vector<double>& par =
params_;
tuple cont
load Luminosity info ##
std::vector< int > nav_type
nav_type navPos() const
return the stack of sibling numbers
bool DDfetch(const DDsvalues_type *, DDValue &)
helper for retrieving DDValues from DDsvalues_type *.
void addComponents(GeometricTimingDetContainer const &cont)
Position positionBounds() const
std::vector< double > params_
std::unique_ptr< Bounds > bounds() const
ConstGeometricTimingDetContainer deepComponents() const
void addComponent(GeometricTimingDet *)
GeometricTimingDet(DDFilteredView *fv, GeometricTimingEnumType dd)
const std::array< const cms::dd::ValuePair< LegacySolidShape, cms::DDSolidShape >, 21 > LegacySolidShapeMap
const std::vector< int > copyNos() const
The list of the volume copy numbers.
constexpr NumType convertMmToCm(NumType millimeters)
Bounds * buildBounds(const cms::DDSolidShape &, const std::vector< double > &) const
enum GTDEnumType{unknown=100, MTD=0, BTL=1, BTLLayer=2, BTLTray=3, BTLModule=4, BTLSensor=5, BTLCrystal=6, ETL=7, ETLDisc=8, ETLRing=9, ETLModule=10, ETLSensor=11} GeometricTimingEnumType
DDExpandedView::nav_type nav_type
std::vector< GeometricTimingDet const * > ConstGeometricTimingDetContainer
Mapping::value_type::name_type name_from_value(Mapping a, V value)
std::vector< GeometricTimingDet * > GeometricTimingDetContainer
RotationMatrix const & rotation() const
ROOT::Math::DisplacementVector3D< ROOT::Math::Cartesian3D< double > > Translation
ConstGeometricTimingDetContainer container_
Rotation rotationBounds() const