CMS 3D CMS Logo

DDCoreToDDXMLOutput.cc
Go to the documentation of this file.
16 #include "Math/GenVector/Cartesian3D.h"
17 #include "Math/GenVector/DisplacementVector3D.h"
18 #include "Math/GenVector/Rotation3D.h"
19 
20 #include <cstddef>
21 #include <iomanip>
22 #include <vector>
23 
24 using namespace geant_units::operators;
25 
26 void
27 DDCoreToDDXMLOutput::solid( const DDSolid& solid, std::ostream& xos )
28 {
29  switch( solid.shape())
30  {
34  {
35  DDBooleanSolid rs( solid );
36  if( solid.shape() == DDSolidShape::ddunion )
37  {
38  xos << "<UnionSolid ";
39  }
40  else if( solid.shape() == DDSolidShape::ddsubtraction )
41  {
42  xos << "<SubtractionSolid ";
43  }
44  else if( solid.shape() == DDSolidShape::ddintersection )
45  {
46  xos << "<IntersectionSolid ";
47  }
48  xos << "name=\"" << rs.toString() << "\">" << std::endl;
49  // if translation is == identity there are no parameters.
50  // if there is no rotation the name will be ":"
51  xos << "<rSolid name=\"" << rs.solidA().toString() << "\"/>" << std::endl;
52  xos << "<rSolid name=\"" << rs.solidB().toString() << "\"/>" << std::endl;
53  xos << "<Translation x=\"" << rs.translation().X() << "*mm\"";
54  xos << " y=\"" << rs.translation().Y() << "*mm\"";
55  xos << " z=\"" << rs.translation().Z() << "*mm\"";
56  xos << "/>" << std::endl;
57  std::string rotName = rs.rotation().toString();
58  if( rotName == ":" )
59  {
60  rotName = "gen:ID";
61  }
62  xos << "<rRotation name=\"" << rs.rotation().toString() << "\"/>" << std::endl;
63  if( solid.shape() == DDSolidShape::ddunion )
64  {
65  xos << "</UnionSolid>" << std::endl;
66  }
67  else if( solid.shape() == DDSolidShape::ddsubtraction )
68  {
69  xos << "</SubtractionSolid>" << std::endl;
70  }
71  else if( solid.shape() == DDSolidShape::ddintersection )
72  {
73  xos << "</IntersectionSolid>" << std::endl;
74  }
75  break;
76  }
77  case DDSolidShape::ddbox:
78  {
79  // <Box name="box1" dx="10*cm" dy="10*cm" dz="10*cm"/>
80  DDBox rs(solid);
81  xos << "<Box name=\"" << rs.toString() << "\"" //<< rs.toString() << "\"" //
82  << " dx=\"" << rs.halfX() << "*mm\""
83  << " dy=\"" << rs.halfY() << "*mm\""
84  << " dz=\"" << rs.halfZ() << "*mm\"/>"
85  << std::endl;
86  break;
87  }
89  {
90  // <Tubs name="TrackerSupportTubeNomex" rMin="[SupportTubeR1]+[Tol]"
91  // rMax="[SupportTubeR2]-[Tol]" dz="[SupportTubeL]"
92  // startPhi="0*deg" deltaPhi="360*deg"/>
93  DDTubs rs(solid);
94  xos << "<Tubs name=\"" << rs.toString() << "\""
95  << " rMin=\"" << rs.rIn() << "*mm\""
96  << " rMax=\"" << rs.rOut() << "*mm\""
97  << " dz=\"" << rs.zhalf() << "*mm\""
98  << " startPhi=\"" << convertRadToDeg( rs.startPhi() ) << "*deg\""
99  << " deltaPhi=\"" << convertRadToDeg( rs.deltaPhi() ) << "*deg\"/>"
100  << std::endl;
101  break;
102  }
103  case DDSolidShape::ddtrap:
104  {
105  // <Trapezoid name="UpL_CSC_for_TotemT1_Plane_2_5_7" dz="[PCB_Epoxy_Thick_3P]/2."
106  // alp1="-[Up_Signal_Side_alpL_3P]" alp2="-[Up_Signal_Side_alpL_3P]"
107  // bl1="[Max_Base_Signal_SideL_3P]/2." tl1="[Up_Min_Base_Signal_SideL_3P]/2." h1="[Up_Height_Signal_SideL_3P]/2."
108  // h2="[Up_Height_Signal_SideL_3P]/2." bl2="[Max_Base_Signal_SideL_3P]/2." tl2="[Up_Min_Base_Signal_SideL_3P]/2."/>
109  DDTrap rs(solid);
110  xos << "<Trapezoid name=\"" << rs.toString() << "\""
111  << " dz=\"" << rs.halfZ() << "*mm\""
112  << " theta=\"" << convertRadToDeg( rs.theta() ) << "*deg\""
113  << " phi=\"" << convertRadToDeg( rs.phi() ) << "*deg\""
114  << " h1=\"" << rs.y1() << "*mm\""
115  << " bl1=\"" << rs.x1() << "*mm\""
116  << " tl1=\"" << rs.x2() << "*mm\""
117  << " alp1=\"" << convertRadToDeg( rs.alpha1() ) << "*deg\""
118  << " h2=\"" << rs.y2() << "*mm\""
119  << " bl2=\"" << rs.x3() << "*mm\""
120  << " tl2=\"" << rs.x4() << "*mm\""
121  << " alp2=\"" << convertRadToDeg( rs.alpha2() ) << "*deg\"/>"
122  << std::endl;
123  break;
124  }
125  case DDSolidShape::ddcons:
126  {
127  DDCons rs(solid);
128  xos << "<Cone name=\"" << rs.toString() << "\""
129  << " dz=\"" << rs.zhalf() << "*mm\""
130  << " rMin1=\"" << rs.rInMinusZ() << "*mm\""
131  << " rMax1=\"" << rs.rOutMinusZ() << "*mm\""
132  << " rMin2=\"" << rs.rInPlusZ() << "*mm\""
133  << " rMax2=\"" << rs.rOutPlusZ() << "*mm\""
134  << " startPhi=\"" << convertRadToDeg( rs.phiFrom() ) << "*deg\""
135  << " deltaPhi=\"" << convertRadToDeg( rs.deltaPhi() ) << "*deg\"/>"
136  << std::endl;
137  break;
138  }
140  {
141  DDPolycone rs(solid);
142  xos << "<Polycone name=\"" << rs.toString() << "\""
143  << " startPhi=\"" << convertRadToDeg( rs.startPhi() ) << "*deg\""
144  << " deltaPhi=\"" << convertRadToDeg( rs.deltaPhi() ) << "*deg\">"
145  << std::endl;
146  const std::vector<double> & zV(rs.zVec());
147  const std::vector<double> & rV(rs.rVec());
148  for ( size_t i = 0; i < zV.size(); ++i ) {
149  xos << "<RZPoint r=\"" << rV[i] << "*mm\""
150  << " z=\"" << zV[i] << "*mm\"/>"
151  << std::endl;
152  }
153  xos << "</Polycone>" << std::endl;
154  break;
155  }
157  {
158  DDPolyhedra rs(solid);
159  xos << "<Polyhedra name=\"" << rs.toString() << "\""
160  << " numSide=\"" << rs.sides() << "\""
161  << " startPhi=\"" << convertRadToDeg( rs.startPhi() ) << "*deg\""
162  << " deltaPhi=\"" << convertRadToDeg( rs.deltaPhi() ) << "*deg\">"
163  << std::endl;
164  const std::vector<double> & zV(rs.zVec());
165  const std::vector<double> & rV(rs.rVec());
166  for ( size_t i = 0; i < zV.size(); ++i ) {
167  xos << "<RZPoint r=\"" << rV[i] << "*mm\""
168  << " z=\"" << zV[i] << "*mm\"/>"
169  << std::endl;
170  }
171  xos << "</Polyhedra>" << std::endl;
172  break;
173  }
175  {
176  // <Polycone name="OCMS" startPhi="0*deg" deltaPhi="360*deg" >
177  // <ZSection z="-[CMSZ1]" rMin="[Rmin]" rMax="[CMSR2]" />
178  // <ZSection z="-[HallZ]" rMin="[Rmin]" rMax="[CMSR2]" />
179  // <ZSection z="-[HallZ]" rMin="[Rmin]" rMax="[HallR]" />
180  // <ZSection z="[HallZ]" rMin="[Rmin]" rMax="[HallR]" />
181  // <ZSection z="[HallZ]" rMin="[Rmin]" rMax="[CMSR2]" />
182  // <ZSection z="[CMSZ1]" rMin="[Rmin]" rMax="[CMSR2]" />
183  DDPolycone rs(solid);
184  xos << "<Polycone name=\"" << rs.toString() << "\""
185  << " startPhi=\"" << convertRadToDeg( rs.startPhi() ) << "*deg\""
186  << " deltaPhi=\"" << convertRadToDeg( rs.deltaPhi() ) << "*deg\">"
187  << std::endl;
188  const std::vector<double> & zV(rs.zVec());
189  const std::vector<double> & rMinV(rs.rMinVec());
190  const std::vector<double> & rMaxV(rs.rMaxVec());
191  for ( size_t i = 0; i < zV.size(); ++i ) {
192  xos << "<ZSection z=\"" << zV[i] << "*mm\""
193  << " rMin=\"" << rMinV[i] << "*mm\""
194  << " rMax=\"" << rMaxV[i] << "*mm\"/>"
195  << std::endl;
196  }
197  xos << "</Polycone>" << std::endl;
198  break;
199  }
201  {
202  DDPolyhedra rs(solid);
203  xos << "<Polyhedra name=\"" << rs.toString() << "\""
204  << " numSide=\"" << rs.sides() << "\""
205  << " startPhi=\"" << convertRadToDeg( rs.startPhi() ) << "*deg\""
206  << " deltaPhi=\"" << convertRadToDeg( rs.deltaPhi() ) << "*deg\">"
207  << std::endl;
208  const std::vector<double> & zV(rs.zVec());
209  const std::vector<double> & rMinV(rs.rMinVec());
210  const std::vector<double> & rMaxV(rs.rMaxVec());
211  for ( size_t i = 0; i < zV.size(); ++i ) {
212  xos << "<ZSection z=\"" << zV[i] << "*mm\""
213  << " rMin=\"" << rMinV[i] << "*mm\""
214  << " rMax=\"" << rMaxV[i] << "*mm\"/>"
215  << std::endl;
216  }
217  xos << "</Polyhedra>" << std::endl;
218  break;
219  }
221  {
222  // <PseudoTrap name="YE3_b" dx1="0.395967*m" dx2="1.86356*m" dy1="0.130*m" dy2="0.130*m" dz="2.73857*m" radius="-1.5300*m" atMinusZ="true"/>
223  DDPseudoTrap rs(solid);
224  xos << "<PseudoTrap name=\"" << rs.toString() << "\""
225  << " dx1=\"" << rs.x1() << "*mm\""
226  << " dx2=\"" << rs.x2() << "*mm\""
227  << " dy1=\"" << rs.y1() << "*mm\""
228  << " dy2=\"" << rs.y2() << "*mm\""
229  << " dz=\"" << rs.halfZ() << "*mm\""
230  << " radius=\"" << rs.radius() << "*mm\""
231  << " atMinusZ=\"" << ( rs.atMinusZ() ? "true" : "false" ) << "\"/>"
232  << std::endl;
233  break;
234  }
236  {
237  // <TruncTubs name="trunctubs1" zHalf="50*cm" rMin="20*cm" rMax="40*cm"
238  // startPhi="0*deg" deltaPhi="90*deg"
239  // cutAtStart="25*cm" cutAtDelta="35*cm"/>
240  DDTruncTubs rs(solid);
241  xos << "<TruncTubs name=\"" << rs.toString() << "\""
242  << " zHalf=\"" << rs.zHalf() << "*mm\""
243  << " rMin=\"" << rs.rIn() << "*mm\""
244  << " rMax=\"" << rs.rOut() << "*mm\""
245  << " startPhi=\"" << convertRadToDeg( rs.startPhi() ) << "*deg\""
246  << " deltaPhi=\"" << convertRadToDeg( rs.deltaPhi() ) << "*deg\""
247  << " cutAtStart=\"" << rs.cutAtStart() << "*mm\""
248  << " cutAtDelta=\"" << rs.cutAtDelta() << "*mm\""
249  << " cutInside=\"" << ( rs.cutInside() ? "true" : "false" ) << "\"/>"
250  << std::endl;
251  break;
252  }
254  {
255  DDShapelessSolid rs(solid);
256  xos << "<ShapelessSolid name=\"" << rs.toString() << "\"/>"
257  << std::endl;
258  break;
259  }
261  {
262  // <Torus name="torus" innerRadius="7.5*cm" outerRadius="10*cm"
263  // torusRadius="30*cm" startPhi="0*deg" deltaPhi="360*deg"/>
264  DDTorus rs(solid);
265  xos << "<Torus name=\"" << rs.toString() << "\""
266  << " innerRadius=\"" << rs.rMin() << "*mm\""
267  << " outerRadius=\"" << rs.rMax() << "*mm\""
268  << " torusRadius=\"" << rs.rTorus() << "*mm\""
269  << " startPhi=\"" << convertRadToDeg( rs.startPhi() ) << "*deg\""
270  << " deltaPhi=\"" << convertRadToDeg( rs.deltaPhi() ) << "*deg\"/>"
271  << std::endl;
272  break;
273  }
275  {
276  // <EllipticalTube name="CMSWall" xSemiAxis="[cavernData:CMSWallEDX]"
277  // ySemiAxis="[cavernData:CMSWallEDY]"
278  // zHeight="[cms:HallZ]"/>
279  DDEllipticalTube rs(solid);
280  xos << "<EllipticalTube name=\"" << rs.toString() << "\""
281  << " xSemiAxis=\"" << rs.xSemiAxis() << "*mm\""
282  << " ySemiAxis=\"" << rs.ySemiAxis() << "*mm\""
283  << " zHeight=\"" << rs.zHeight() << "*mm\"/>"
284  << std::endl;
285  break;
286  }
288  {
289  // <Tubs name="TrackerSupportTubeNomex" rMin="[SupportTubeR1]+[Tol]"
290  // rMax="[SupportTubeR2]-[Tol]" dz="[SupportTubeL]"
291  // startPhi="0*deg" deltaPhi="360*deg"/>
292  DDCutTubs rs(solid);
293  const std::array<double, 3> &pLowNorm(rs.lowNorm());
294  const std::array<double, 3> &pHighNorm(rs.highNorm());
295 
296  xos << "<CutTubs name=\"" << rs.toString() << "\""
297  << " dz=\"" << rs.zhalf() << "*mm\""
298  << " rMin=\"" << rs.rIn() << "*mm\""
299  << " rMax=\"" << rs.rOut() << "*mm\""
300  << " startPhi=\"" << convertRadToDeg( rs.startPhi() ) << "*deg\""
301  << " deltaPhi=\"" << convertRadToDeg( rs.deltaPhi() ) << "*deg\""
302  << " lx=\"" << pLowNorm[0] << "\""
303  << " ly=\"" << pLowNorm[1] << "\""
304  << " lz=\"" << pLowNorm[2] << "\""
305  << " tx=\"" << pHighNorm[0] << "\""
306  << " ty=\"" << pHighNorm[1] << "\""
307  << " tz=\"" << pHighNorm[2] << "\"/>"
308  << std::endl;
309  break;
310  }
312  {
313  DDExtrudedPolygon rs(solid);
314  std::vector<double> x = rs.xVec();
315  std::vector<double> y = rs.yVec();
316  std::vector<double> z = rs.zVec();
317  std::vector<double> zx = rs.zxVec();
318  std::vector<double> zy = rs.zyVec();
319  std::vector<double> zs = rs.zscaleVec();
320 
321  xos << "<ExtrudedPolygon name=\"" << rs.toString() << "\"";
322  for( unsigned int i : x )
323  xos << " <XYPoint x=\"" << x[i] << "*mm\" y=\"" << y[i] << "*mm\"/>\n";
324  for( unsigned int k : z )
325  xos << " <ZXYSection z=\"" << z[k] << "*mm\" x=\"" << zx[k] << "*mm\" y=\"" << zy[k] << "*mm scale=" << zs[k] << "*mm\"/>\n";
326  xos << "</ExtrudedPolygon>\n";
327  break;
328  }
329  // return new PSolid( pstrs(solid.toString()), solid.parameters()
330  // , solid.shape(), pstrs(""), pstrs(""), pstrs("") );
332  default:
333  throw cms::Exception("DDException") << "DDCoreToDDXMLOutput::solid(...) " << solid.name() << " either not inited or no such solid.";
334  break;
335  }
336 }
337 
338 void DDCoreToDDXMLOutput::material( const DDMaterial& material, std::ostream& xos )
339 {
340  int noc = material.noOfConstituents();
341  if( noc == 0 )
342  {
343  xos << "<ElementaryMaterial name=\"" << material.toString() << "\""
344  << " density=\""
345  << std::scientific << std::setprecision(5)
346  << convertUnitsTo(1._mg_per_cm3, material.density()) << "*mg/cm3\""
347  << " atomicWeight=\""
348  << std::fixed
349  << convertUnitsTo(1._g_per_mole, material.a()) << "*g/mole\""
350  << std::setprecision(0) << std::fixed << " atomicNumber=\"" << material.z() << "\"/>"
351  << std::endl;
352  }
353  else
354  {
355  xos << "<CompositeMaterial name=\"" << material.toString() << "\""
356  << " density=\""
357  << std::scientific << std::setprecision(5)
358  << convertUnitsTo(1._mg_per_cm3, material.density()) << "*mg/cm3\""
359  << " method=\"mixture by weight\">" << std::endl;
360 
361  int j=0;
362  for (; j<noc; ++j)
363  {
364  xos << "<MaterialFraction fraction=\""
365  << std::fixed << std::setprecision(9)
366  << material.constituent(j).second << "\">" << std::endl;
367  xos << "<rMaterial name=\"" << material.constituent(j).first.name() << "\"/>" << std::endl;
368  xos << "</MaterialFraction>" << std::endl;
369  }
370  xos << "</CompositeMaterial>" << std::endl;
371  }
372 }
373 
374 void
376  const std::string& rotn )
377 {
378  double tol = 1.0e-3; // Geant4 compatible
379  DD3Vector x,y,z;
380  rotation.rotation().GetComponents(x,y,z);
381  double check = (x.Cross(y)).Dot(z); // in case of a LEFT-handed orthogonal system
382  // this must be -1
383  bool reflection((1.-check)>tol);
384  std::string rotName=rotation.toString();
385  if( rotName == ":" )
386  {
387  if( !rotn.empty() )
388  {
389  rotName = rotn;
390  std::cout << "about to try to make a new DDRotation... should fail!" << std::endl;
391  DDRotation rot( DDName(rotn), std::make_unique<DDRotationMatrix>( rotation.rotation()));
392  std:: cout << "new rotation: " << rot << std::endl;
393  }
394  else
395  {
396  std::cout << "WARNING: MAKING AN UNNAMED ROTATION" << std::endl;
397  }
398  }
399  if( !reflection )
400  {
401  xos << "<Rotation ";
402  }
403  else
404  {
405  xos << "<ReflectionRotation ";
406  }
407  xos << "name=\"" << rotName << "\""
408  << " phiX=\"" << convertRadToDeg( x.phi() ) << "*deg\""
409  << " thetaX=\"" << convertRadToDeg( x.theta() ) << "*deg\""
410  << " phiY=\"" << convertRadToDeg( y.phi() ) << "*deg\""
411  << " thetaY=\"" << convertRadToDeg( y.theta() ) << "*deg\""
412  << " phiZ=\"" << convertRadToDeg( z.phi() ) << "*deg\""
413  << " thetaZ=\"" << convertRadToDeg( z.theta() ) << "*deg\"/>"
414  << std::endl;
415 }
416 
417 void DDCoreToDDXMLOutput::logicalPart( const DDLogicalPart& lp, std::ostream& xos )
418 {
419  xos << "<LogicalPart name=\"" << lp.toString() << "\">" << std::endl;
420  xos << "<rSolid name=\"" << lp.solid().toString() << "\"/>" << std::endl;
421  xos << "<rMaterial name=\"" << lp.material().toString() << "\"/>" << std::endl;
422  xos << "</LogicalPart>" << std::endl;
423 }
424 
426  const DDLogicalPart& child,
427  DDPosData* edgeToChild,
428  int& rotNameSeed,
429  std::ostream& xos )
430 {
431  std::string rotName = edgeToChild->ddrot().toString();
432  DDRotationMatrix myIDENT;
433 
434  xos << "<PosPart copyNumber=\"" << edgeToChild->copyno() << "\">" << std::endl;
435  xos << "<rParent name=\"" << parent.toString() << "\"/>" << std::endl;
436  xos << "<rChild name=\"" << child.toString() << "\"/>" << std::endl;
437  if(( edgeToChild->ddrot().rotation()) != myIDENT )
438  {
439  if( rotName == ":" )
440  {
441  rotation(edgeToChild->ddrot(), xos);
442  }
443  else
444  {
445  xos << "<rRotation name=\"" << rotName << "\"/>" << std::endl;
446  }
447  } // else let default Rotation matrix be created?
448  xos << "<Translation x=\"" << edgeToChild->translation().x() <<"*mm\""
449  << " y=\"" << edgeToChild->translation().y() <<"*mm\""
450  << " z=\"" << edgeToChild->translation().z() <<"*mm\"/>" << std::endl;
451  xos << "</PosPart>" << std::endl;
452 }
453 
454 void
455 DDCoreToDDXMLOutput::specpar( const DDSpecifics& sp, std::ostream& xos )
456 {
457  xos << "<SpecPar name=\"" << sp.toString() << "\" eval=\"false\">" << std::endl;
458 
459  // ========... all the selection strings out as strings by using the DDPartSelection's std::ostream function...
460  for( const auto& psit : sp.selection())
461  {
462  xos << "<PartSelector path=\"" << psit << "\"/>" << std::endl;
463  }
464 
465  // ========= ... and iterate over all DDValues...
466  for( const auto& vit : sp.specifics())
467  {
468  const DDValue & v = vit.second;
469  size_t s=v.size();
470  size_t i=0;
471  // ============ ... all actual values with the same name
472  const std::vector<std::string>& strvec = v.strings();
473  if( v.isEvaluated())
474  {
475  for(; i<s; ++i)
476  {
477  xos << "<Parameter name=\"" << v.name() << "\""
478  << " value=\"" << v[i] << "\""
479  << " eval=\"true\"/>" << std::endl;
480  }
481  }
482  else
483  {
484  for(; i<s; ++i )
485  {
486  xos << "<Parameter name=\"" << v.name() << "\""
487  << " value=\"" << strvec[i] << "\""
488  << " eval=\"false\"/>" << std::endl;
489  }
490  }
491 
492  }
493  xos << "</SpecPar>" << std::endl;
494 }
495 
496 void DDCoreToDDXMLOutput::specpar( const std::pair<DDsvalues_type, std::set<const DDPartSelection*> >& pssv, std::ostream& xos )
497 {
498  static const std::string madeName("specparname");
499  static int numspecpars(0);
500  std::ostringstream ostr;
501  ostr << numspecpars++;
502  std::string spname = madeName + ostr.str();
503  xos << "<SpecPar name=\"" << spname << "\" eval=\"false\">" << std::endl;
504  for( const auto& psit : pssv.second ) {
505  xos << "<PartSelector path=\"" << *psit << "\"/>" << std::endl;
506  }
507 
508  // ========= ... and iterate over all DDValues...
509  for( const auto& vit : pssv.first )
510  {
511  const DDValue & v = vit.second;
512  size_t s=v.size();
513  size_t i=0;
514  // ============ ... all actual values with the same name
515  const std::vector<std::string>& strvec = v.strings();
516  if( v.isEvaluated() )
517  {
518  for(; i<s; ++i)
519  {
520  xos << "<Parameter name=\"" << v.name() << "\""
521  << " value=\"" << v[i] << "\""
522  << " eval=\"true\"/>" << std::endl;
523  }
524  }
525  else
526  {
527  for(; i<s; ++i )
528  {
529  xos << "<Parameter name=\"" << v.name() << "\""
530  << " value=\"" << strvec[i] << "\""
531  << " eval=\"false\"/>" << std::endl;
532  }
533  }
534  }
535 
536  xos << "</SpecPar>" << std::endl;
537 }
double zhalf(void) const
Definition: DDSolid.cc:524
const std::string & name(void) const
the name of the DDValue
Definition: DDValue.h:54
double a() const
returns the atomic mass
Definition: DDMaterial.cc:93
double startPhi(void) const
Definition: DDSolid.cc:400
double zhalf(void) const
Definition: DDSolid.cc:676
double cutAtStart(void) const
truncation at begin of the tube-section
Definition: DDSolid.cc:217
double halfZ(void) const
half of the z-Axis
Definition: DDSolid.cc:159
Relative position of a child-volume inside a parent-volume.
Definition: DDPosData.h:13
bool cutInside(void) const
true, if truncation is on the inner side of the tube-section
Definition: DDSolid.cc:223
double halfZ(void) const
Definition: DDSolid.cc:274
std::vector< double > rVec(void) const
Definition: DDSolid.cc:355
A truncated tube section.
Definition: DDSolid.h:133
double x1(void) const
Half-length along x of the side at y=-pDy1 of the face at -pDz.
Definition: DDSolid.cc:171
const N & name() const
Definition: DDBase.h:74
double zHalf(void) const
half of the z-Axis
Definition: DDSolid.cc:202
double y2(void) const
half length along y on +z
Definition: DDSolid.cc:247
double halfY(void) const
Definition: DDSolid.cc:270
constexpr NumType convertUnitsTo(long double desiredUnits, NumType val)
Definition: GeantUnits.h:128
std::vector< double > rMaxVec(void) const
Definition: DDSolid.cc:430
double deltaPhi(void) const
angular span of the tube-section
Definition: DDSolid.cc:214
DDMaterial is used to define and access material information.
Definition: DDMaterial.h:43
std::vector< double > rMaxVec(void) const
Definition: DDSolid.cc:379
double phi(void) const
Azimuthal angle of the line joining the centres of the faces at -/+pDz.
Definition: DDSolid.cc:165
This is simply a handle on the solid.
Definition: DDSolid.h:176
std::array< double, 3 > highNorm(void) const
Definition: DDSolid.cc:696
double rTorus(void) const
Definition: DDSolid.cc:560
ROOT::Math::Rotation3D DDRotationMatrix
A DDRotationMatrix is currently implemented with a ROOT Rotation3D.
std::vector< double > rVec(void) const
Definition: DDSolid.cc:406
double cutAtDelta(void) const
truncation at end of the tube-section
Definition: DDSolid.cc:220
std::vector< double > yVec(void) const
Definition: DDSolid.cc:480
double phiFrom(void) const
Definition: DDSolid.cc:539
DDName is used to identify DDD entities uniquely.
Definition: DDName.h:15
constexpr NumType convertRadToDeg(NumType radians)
Definition: GeantUnits.h:98
double rIn(void) const
inner radius
Definition: DDSolid.cc:205
void specpar(const DDSpecifics &sp, std::ostream &xos)
double rOutMinusZ(void) const
Definition: DDSolid.cc:530
double rOutPlusZ(void) const
Definition: DDSolid.cc:536
std::vector< double > zyVec(void) const
Definition: DDSolid.cc:501
DDTranslation translation(void) const
Definition: DDSolid.cc:604
const DDSolid & solid(void) const
Returns a reference object of the solid being the shape of this LogicalPart.
A DDSolid represents the shape of a part.
Definition: DDSolid.h:39
double y1(void) const
half length along y on -z
Definition: DDSolid.cc:244
DDSolid solidB(void) const
Definition: DDSolid.cc:616
double rMax(void) const
Definition: DDSolid.cc:557
Represents a uniquely identifyable rotation matrix.
Definition: DDTransform.h:68
bool isEvaluated(void) const
true, if values are numerical evaluated; else false.
Definition: DDValue.cc:204
std::vector< double > xVec(void) const
Definition: DDSolid.cc:473
std::array< double, 3 > lowNorm(void) const
Definition: DDSolid.cc:691
double z() const
retruns the atomic number
Definition: DDMaterial.cc:99
double x4(void) const
Half-length along x of the side at y=+pDy2 of the face at +pDz.
Definition: DDSolid.cc:186
DDRotation rotation(void) const
Definition: DDSolid.cc:598
ROOT::Math::DisplacementVector3D< ROOT::Math::Cartesian3D< double > > DD3Vector
A DD Translation is currently implemented with Root Vector3D.
Definition: DDTranslation.h:6
bool atMinusZ(void) const
true, if cut-out or rounding is on the -z side
Definition: DDSolid.cc:253
double halfZ(void) const
half of the z-Axis
Definition: DDSolid.cc:235
std::vector< double > rMinVec(void) const
Definition: DDSolid.cc:371
double startPhi(void) const
Definition: DDSolid.cc:587
double startPhi(void) const
Definition: DDSolid.cc:350
void position(const DDLogicalPart &parent, const DDLogicalPart &child, DDPosData *edgeToChild, int &rotNameSeed, std::ostream &xos)
double xSemiAxis(void) const
Definition: DDSolid.cc:658
double deltaPhi(void) const
Definition: DDSolid.cc:353
FractionV::value_type constituent(int i) const
returns the i-th compound material and its fraction-mass
Definition: DDMaterial.cc:87
Interface to a Trapezoid.
Definition: DDSolid.h:78
double y1(void) const
Half-length along y of the face at -pDz.
Definition: DDSolid.cc:168
const DDRotation & ddrot() const
Definition: DDPosData.h:34
double rInMinusZ(void) const
Definition: DDSolid.cc:527
A DDLogicalPart aggregates information concerning material, solid and sensitveness ...
Definition: DDLogicalPart.h:93
DDSolidShape shape(void) const
The type of the solid.
Definition: DDSolid.cc:138
double rOut(void) const
Definition: DDSolid.cc:682
double ySemiAxis(void) const
Definition: DDSolid.cc:661
void logicalPart(const DDLogicalPart &lp, std::ostream &xos)
double rMin(void) const
Definition: DDSolid.cc:554
std::vector< double > rMinVec(void) const
Definition: DDSolid.cc:422
double rOut(void) const
Definition: DDSolid.cc:584
double deltaPhi(void) const
Definition: DDSolid.cc:688
const std::vector< std::string > & strings() const
a reference to the std::string-valued values stored in the given instance of DDValue ...
Definition: DDValue.h:61
int k[5][pyjets_maxn]
int sides(void) const
Definition: DDSolid.cc:397
DDSolid solidA(void) const
Definition: DDSolid.cc:610
double deltaPhi(void) const
Definition: DDSolid.cc:542
double deltaPhi(void) const
Definition: DDSolid.cc:590
double startPhi(void) const
Definition: DDSolid.cc:563
std::string toString() const
Definition: DDBase.h:78
std::vector< double > zVec(void) const
Definition: DDSolid.cc:487
double halfX(void) const
Definition: DDSolid.cc:266
std::vector< double > zxVec(void) const
Definition: DDSolid.cc:494
double density() const
returns the density
Definition: DDMaterial.cc:104
int copyno() const
Definition: DDPosData.h:35
std::vector< double > zVec(void) const
Definition: DDSolid.cc:414
double deltaPhi(void) const
Definition: DDSolid.cc:566
Interface to a Box.
Definition: DDSolid.h:163
int noOfConstituents() const
returns the number of compound materials or 0 for elementary materials
Definition: DDMaterial.cc:82
double alpha1(void) const
Angle with respect to the y axis from the centre of the side at y=-pDy1 to the centre at y=+pDy1 of t...
Definition: DDSolid.cc:177
double alpha2(void) const
Angle with respect to the y axis from the centre of the side at y=-pDy2 to the centre at y=+pDy2 of t...
Definition: DDSolid.cc:189
double startPhi(void) const
angular start of the tube-section
Definition: DDSolid.cc:211
double x2(void) const
Half-length along x of the side at y=+pDy1 of the face at -pDz.
Definition: DDSolid.cc:174
double zhalf(void) const
Definition: DDSolid.cc:578
const DDsvalues_type & specifics() const
Reference to the user-data attached to all nodes selected by the selections-strings given through sel...
Definition: DDSpecifics.cc:50
const DDTranslation & translation() const
Definition: DDPosData.h:29
double zHeight(void) const
Definition: DDSolid.cc:664
std::vector< std::pair< unsigned int, DDValue > > DDsvalues_type
Definition: DDsvalues.h:12
double deltaPhi(void) const
Definition: DDSolid.cc:403
double y2(void) const
Half-length along y of the face at +pDz.
Definition: DDSolid.cc:180
void material(const DDMaterial &material, std::ostream &xos)
const DDRotationMatrix & rotation() const
Returns the read-only rotation-matrix.
Definition: DDTransform.h:93
double rInPlusZ(void) const
Definition: DDSolid.cc:533
unsigned int size() const
the size of the stored value-pairs (std::string,double)
Definition: DDValue.h:68
double x2(void) const
half length along x on +z
Definition: DDSolid.cc:241
void rotation(const DDRotation &rotation, std::ostream &xos, const std::string &rotn="")
double rIn(void) const
Definition: DDSolid.cc:679
double rIn(void) const
Definition: DDSolid.cc:581
void solid(const DDSolid &solid, std::ostream &xos)
double rOut(void) const
outer radius
Definition: DDSolid.cc:208
def check(config)
Definition: trackerTree.py:14
double theta(void) const
Polar angle of the line joining the centres of the faces at -/+pDz.
Definition: DDSolid.cc:162
std::vector< double > zscaleVec(void) const
Definition: DDSolid.cc:508
const DDMaterial & material(void) const
Returns a reference object of the material this LogicalPart is made of.
double x3(void) const
Half-length along x of the side at y=-pDy2 of the face at +pDz.
Definition: DDSolid.cc:183
std::vector< double > zVec(void) const
Definition: DDSolid.cc:363
Interface to attach user specific data to nodes in the expanded-view.
Definition: DDSpecifics.h:41
double x1(void) const
half length along x on -z
Definition: DDSolid.cc:238
double startPhi(void) const
Definition: DDSolid.cc:685
double radius(void) const
radius of the cut-out (neg.) or rounding (pos.)
Definition: DDSolid.cc:250
const std::vector< DDPartSelection > & selection() const
Gives a reference to the collection of part-selections.
Definition: DDSpecifics.cc:44