9 #include "CLHEP/Units/GlobalSystemOfUnits.h" 11 #include <boost/bind.hpp> 21 template<
typename DDView>
22 double getDouble(
const char *
s, DDView
const &
ev) {
24 std::vector<const DDsvalues_type *>
result;
25 ev.specificsV(result);
26 std::vector<const DDsvalues_type *>::iterator it = result.begin();
28 for (; it != result.end(); ++it)
35 const std::vector<std::string> &
temp =
val.strings();
38 throw cms::Exception(
"Configuration") <<
"I need 1 "<< s <<
" tags";
40 return double(::atof(temp[0].c_str()));
45 template<
typename DDView>
46 std::string getString(
const char * s, DDView
const & ev) {
48 std::vector<const DDsvalues_type *>
result;
49 ev.specificsV(result);
50 std::vector<const DDsvalues_type *>::iterator it = result.begin();
52 for (; it != result.end(); ++it)
60 const std::vector<std::string> & temp =
val.strings();
63 throw cms::Exception(
"Configuration") <<
"I need 1 "<< s <<
" tags";
79 #ifdef GEOMETRICDETDEBUG 82 ddd_(navtype.begin(),navtype.end()),
type_(type){
100 density_ = ((ev.
logicalPart()).material()).density();
102 weight_ = density_ * ( volume_ / 1000.);
105 radLength_ = getDouble(
"TrackerRadLength",ev);
106 xi_ = getDouble(
"TrackerXi",ev);
109 pixROCx_ = getDouble(
"PixelROC_X",ev);
110 pixROCy_ = getDouble(
"PixelROC_Y",ev);
111 stereo_ = getString(
"TrackerStereoDetectors",ev)==strue;
132 density_ = ((fv->
logicalPart()).material()).density();
134 weight_ = density_ * ( volume_ / 1000.);
137 radLength_ = getDouble(
"TrackerRadLength",*fv);
138 xi_ = getDouble(
"TrackerXi",*fv);
141 pixROCx_ = getDouble(
"PixelROC_X",*fv);
142 pixROCy_ = getDouble(
"PixelROC_Y",*fv);
143 stereo_ = getString(
"TrackerStereoDetectors",*fv)==
"true";
162 #ifdef GEOMTRICDETDEBUG
163 parents_(fv->geoHistory().
begin(),fv->geoHistory().
end()),
164 volume_(((fv->logicalPart()).solid()).volume()),
165 density_(((fv->logicalPart()).material()).density()),
167 weight_(density_ * ( volume_ / 1000.)),
169 material_(((fv->logicalPart()).material()).
name().fullname()),
171 radLength_(getDouble(
"TrackerRadLength",*fv)),
172 xi_(getDouble(
"TrackerXi",*fv)),
175 pixROCx_(getDouble(
"PixelROC_X",*fv)),
176 pixROCy_(getDouble(
"PixelROC_Y",*fv)),
177 stereo_(getString(
"TrackerStereoDetectors",*fv)==strue),
179 #ifdef GEOMTRICDETDEBUG
191 trans_(onePGD.x_, onePGD.y_, onePGD.z_),
194 rot_(onePGD.a11_, onePGD.a12_, onePGD.a13_,
195 onePGD.a21_, onePGD.a22_, onePGD.a23_,
196 onePGD.a31_, onePGD.a32_, onePGD.a33_),
199 ddname_(onePGD.name_, onePGD.ns_),
203 #ifdef GEOMTRICDETDEBUG
205 volume_(onePGD.volume_),
206 density_(onePGD.density_),
207 weight_(onePGD.weight_),
209 material_(onePGD.material_),
219 #ifdef GEOMTRICDETDEBUG
246 if ( onePGD.
numnt_ > 4 ) {
248 if ( onePGD.
numnt_ > 5 ) {
250 if ( onePGD.
numnt_ > 6 ) {
252 if ( onePGD.
numnt_ > 7 ) {
254 if ( onePGD.
numnt_ > 8 ) {
256 if ( onePGD.
numnt_ > 9 ) {
258 if ( onePGD.
numnt_ > 10 ) {
276 cont.emplace_back(
this);
281 iDet->deepComponents(cont);
321 rot_.GetComponents(x, y, z);
323 float(y.X()),
float(y.Y()),
float(y.Z()),
324 float(z.X()),
float(z.Y()),
float(z.Z()));
329 const std::vector<double>& par =
params_;
std::vector< GeometricTimingDet * > GeometricTimingDetContainer
const DDRotationMatrix & rotation() const
The absolute rotation of the current node.
GeometricTimingEnumType type_
std::vector< DDExpandedNode > GeoHistory
nav_type navPos() const
return the stack of sibling numbers
Compact representation of the geometrical detector hierarchy.
bool DDfetch(const DDsvalues_type *, DDValue &)
helper for retrieving DDValues from DDsvalues_type *.
void addComponents(GeometricTimingDetContainer const &cont)
Position positionBounds() const
nav_type navPos() const
return the stack of sibling numbers which indicates the current position in the DDExpandedView ...
const DDGeoHistory & geoHistory() const
The list of ancestors up to the root-node of the current node.
std::vector< double > params_
Bounds * buildBounds(const DDSolidShape &, const std::vector< double > &) const
std::unique_ptr< Bounds > bounds() const
ROOT::Math::DisplacementVector3D< ROOT::Math::Cartesian3D< double > > DD3Vector
A DD Translation is currently implemented with Root Vector3D.
DDTranslation const & translation() const
ConstGeometricTimingDetContainer deepComponents() const
void addComponent(GeometricTimingDet *)
const std::string fullname() const
GeometricTimingDet(DDFilteredView *fv, GeometricTimingEnumType dd)
DDExpandedView::nav_type nav_type
const DDTranslation & translation() const
The absolute translation of the current node.
DDExpandedView::nav_type DDnav_type
enum GeometricTimingDet::GTDEnumType GeometricTimingEnumType
int copyno() const
Copy number associated with the current node.
DDName const & name() const
DDExpandedView::nav_type nav_type
DDRotationMatrix const & rotation() const
bool goTo(const nav_type &)
transversed the DDExpandedView according to the given stack of sibling numbers
const DDLogicalPart & logicalPart() const
The logical-part of the current node in the expanded-view.
DDSolidShape const & shape() const
Provides an exploded view of the detector (tree-view)
ConstGeometricTimingDetContainer container_
Rotation rotationBounds() const
std::vector< GeometricTimingDet const * > ConstGeometricTimingDetContainer