CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
DDCoreToDDXMLOutput.cc
Go to the documentation of this file.
2 
5 
9 
10 #include "CLHEP/Units/GlobalSystemOfUnits.h"
11 
12 #include <sstream>
13 
14 void
15 DDCoreToDDXMLOutput::solid( const DDSolid& solid, std::ostream& xos )
16 {
17  switch( solid.shape())
18  {
19  case ddunion:
20  case ddsubtraction:
21  case ddintersection:
22  {
23  DDBooleanSolid rs( solid );
24  if( solid.shape() == ddunion )
25  {
26  xos << "<UnionSolid ";
27  }
28  else if( solid.shape() == ddsubtraction )
29  {
30  xos << "<SubtractionSolid ";
31  }
32  else if( solid.shape() == ddintersection )
33  {
34  xos << "<IntersectionSolid ";
35  }
36  xos << "name=\"" << rs.toString() << "\">" << std::endl;
37  // if translation is == identity there are no parameters.
38  // if there is no rotation the name will be ":"
39  xos << "<rSolid name=\"" << rs.solidA().toString() << "\"/>" << std::endl;
40  xos << "<rSolid name=\"" << rs.solidB().toString() << "\"/>" << std::endl;
41  xos << "<Translation x=\"" << rs.translation().X() << "*mm\"";
42  xos << " y=\"" << rs.translation().Y() << "*mm\"";
43  xos << " z=\"" << rs.translation().Z() << "*mm\"";
44  xos << "/>" << std::endl;
45  std::string rotName = rs.rotation().toString();
46  if( rotName == ":" )
47  {
48  rotName = "gen:ID";
49  }
50  xos << "<rRotation name=\"" << rs.rotation().toString() << "\"/>" << std::endl;
51  if( solid.shape() == ddunion )
52  {
53  xos << "</UnionSolid>" << std::endl;
54  }
55  else if( solid.shape() == ddsubtraction )
56  {
57  xos << "</SubtractionSolid>" << std::endl;
58  }
59  else if( solid.shape() == ddintersection )
60  {
61  xos << "</IntersectionSolid>" << std::endl;
62  }
63  break;
64  }
65  case ddreflected:
66  {
67  /*
68  <ReflectionSolid name="trd2mirror">
69  <rSolid name="trd2"/>
70  </ReflectionSolid>
71  */
72  DDReflectionSolid rs(solid);
73  xos << "<ReflectionSolid name=\"" << rs.toString() << "\">" << std::endl;
74  xos << "<rSolid name=\"" << rs.unreflected().toString() << "\">" << std::endl;
75  xos << "</ReflectionSolid>" << std::endl;
76  break;
77  }
78  case ddbox:
79  {
80  // <Box name="box1" dx="10*cm" dy="10*cm" dz="10*cm"/>
81  DDBox rs(solid);
82  xos << "<Box name=\"" << rs.toString() << "\"" //<< rs.toString() << "\"" //
83  << " dx=\"" << rs.halfX() << "*mm\""
84  << " dy=\"" << rs.halfY() << "*mm\""
85  << " dz=\"" << rs.halfZ() << "*mm\"/>"
86  << std::endl;
87  break;
88  }
89  case ddtubs:
90  {
91  // <Tubs name="TrackerSupportTubeNomex" rMin="[SupportTubeR1]+[Tol]"
92  // rMax="[SupportTubeR2]-[Tol]" dz="[SupportTubeL]"
93  // startPhi="0*deg" deltaPhi="360*deg"/>
94  DDTubs rs(solid);
95  xos << "<Tubs name=\"" << rs.toString() << "\""
96  << " rMin=\"" << rs.rIn() << "*mm\""
97  << " rMax=\"" << rs.rOut() << "*mm\""
98  << " dz=\"" << rs.zhalf() << "*mm\""
99  << " startPhi=\"" << rs.startPhi()/deg << "*deg\""
100  << " deltaPhi=\"" << rs.deltaPhi()/deg << "*deg\"/>"
101  << std::endl;
102  break;
103  }
104  case ddtrap:
105  {
106  // <Trapezoid name="UpL_CSC_for_TotemT1_Plane_2_5_7" dz="[PCB_Epoxy_Thick_3P]/2." 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() << "\"" //rs.toString() << "\"" //
111  << " dz=\"" << rs.halfZ() << "*mm\""
112  << " theta=\"" << rs.theta()/deg << "*deg\""
113  << " phi=\"" << rs.phi()/deg << "*deg\""
114  << " h1=\"" << rs.y1() << "*mm\""
115  << " bl1=\"" << rs.x1() << "*mm\""
116  << " tl1=\"" << rs.x2() << "*mm\""
117  << " alp1=\"" << rs.alpha1()/deg << "*deg\""
118  << " h2=\"" << rs.y2() << "*mm\""
119  << " bl2=\"" << rs.x3() << "*mm\""
120  << " tl2=\"" << rs.x4() << "*mm\""
121  << " alp2=\"" << rs.alpha2()/deg << "*deg\"/>"
122  << std::endl;
123  break;
124  }
125  case 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=\"" << rs.phiFrom()/deg << "*deg\""
135  << " deltaPhi=\"" << rs.deltaPhi()/deg << "*deg\"/>"
136  << std::endl;
137  break;
138  }
139  case ddpolycone_rz:
140  {
141  DDPolycone rs(solid);
142  xos << "<Polycone name=\"" << rs.toString() << "\""
143  << " startPhi=\"" << rs.startPhi()/deg << "*deg\""
144  << " deltaPhi=\"" << rs.deltaPhi()/deg << "*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  }
156  case ddpolyhedra_rz:
157  {
158  DDPolyhedra rs(solid);
159  xos << "<Polyhedra name=\"" << rs.toString() << "\""
160  << " numSide=\"" << rs.sides() << "\""
161  << " startPhi=\"" << rs.startPhi()/deg << "*deg\""
162  << " deltaPhi=\"" << rs.deltaPhi()/deg << "*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  }
174  case ddpolycone_rrz:
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=\"" << rs.startPhi()/deg << "*deg\""
186  << " deltaPhi=\"" << rs.deltaPhi()/deg << "*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  }
200  case ddpolyhedra_rrz:
201  {
202  DDPolyhedra rs(solid);
203  xos << "<Polyhedra name=\"" << rs.toString() << "\""
204  << " numSide=\"" << rs.sides() << "\""
205  << " startPhi=\"" << rs.startPhi()/deg << "*deg\""
206  << " deltaPhi=\"" << rs.deltaPhi()/deg << "*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  }
220  case ddpseudotrap:
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  }
235  case ddtrunctubs:
236  {
237  // <TruncTubs name="trunctubs1" zHalf="50*cm" rMin="20*cm" rMax="40*cm" startPhi="0*deg" deltaPhi="90*deg" cutAtStart="25*cm" cutAtDelta="35*cm"/>
238  DDTruncTubs rs(solid);
239  xos << "<TruncTubs name=\"" << rs.toString() << "\""
240  << " zHalf=\"" << rs.zHalf() << "*mm\""
241  << " rMin=\"" << rs.rIn() << "*mm\""
242  << " rMax=\"" << rs.rOut() << "*mm\""
243  << " startPhi=\"" << rs.startPhi()/deg << "*deg\""
244  << " deltaPhi=\"" << rs.deltaPhi()/deg << "*deg\""
245  << " cutAtStart=\"" << rs.cutAtStart() << "*mm\""
246  << " cutAtDelta=\"" << rs.cutAtDelta() << "*mm\""
247  << " cutInside=\"" << ( rs.cutInside() ? "true" : "false" ) << "\"/>"
248  << std::endl;
249  break;
250  }
251  case ddshapeless:
252  {
253  DDShapelessSolid rs(solid);
254  xos << "<ShapelessSolid name=\"" << rs.toString() << "\"/>"
255  << std::endl;
256  break;
257  }
258  case ddtorus:
259  {
260  // <Torus name="torus" innerRadius="7.5*cm" outerRadius="10*cm" torusRadius="30*cm" startPhi="0*deg" deltaPhi="360*deg"/>
261  DDTorus rs(solid);
262  xos << "<Torus name=\"" << rs.toString() << "\""
263  << " innerRadius=\"" << rs.rMin() << "*mm\""
264  << " outerRadius=\"" << rs.rMax() << "*mm\""
265  << " torusRadius=\"" << rs.rTorus() << "*mm\""
266  << " startPhi=\"" << rs.startPhi()/deg << "*deg\""
267  << " deltaPhi=\"" << rs.deltaPhi()/deg << "*deg\"/>"
268  << std::endl;
269  break;
270  }
271  // return new PSolid( pstrs(solid.toString()), solid.parameters()
272  // , solid.shape(), pstrs(""), pstrs(""), pstrs("") );
273  case dd_not_init:
274  default:
275  throw cms::Exception("DDException") << "DDCoreToDDXMLOutput::solid(...) either not inited or no such solid.";
276  break;
277  }
278 }
279 
280 void DDCoreToDDXMLOutput::material( const DDMaterial& material, std::ostream& xos )
281 {
282  int noc = material.noOfConstituents();
283  if( noc == 0 )
284  {
285  xos << "<ElementaryMaterial name=\"" << material.toString() << "\""
286  << " density=\""
287  << std::scientific << std::setprecision(5)
288  << material.density() / mg * cm3 << "*mg/cm3\""
289  << " atomicWeight=\""
290  << std::fixed
291  << material.a() / g * mole << "*g/mole\""
292  << std::setprecision(0) << std::fixed << " atomicNumber=\"" << material.z() << "\"/>"
293  << std::endl;
294  }
295  else
296  {
297  xos << "<CompositeMaterial name=\"" << material.toString() << "\""
298  << " density=\""
299  << std::scientific << std::setprecision(5)
300  << material.density() / mg * cm3 << "*mg/cm3\""
301  << " method=\"mixture by weight\">" << std::endl;
302 
303  int j=0;
304  for (; j<noc; ++j)
305  {
306  xos << "<MaterialFraction fraction=\""
307  << std::fixed << std::setprecision(9)
308  << material.constituent(j).second << "\">" << std::endl;
309  xos << "<rMaterial name=\"" << material.constituent(j).first.name() << "\"/>" << std::endl;
310  xos << "</MaterialFraction>" << std::endl;
311  }
312  xos << "</CompositeMaterial>" << std::endl;
313  }
314 }
315 
316 void DDCoreToDDXMLOutput::rotation( DDRotation& rotation, std::ostream& xos, const std::string& rotn )
317 {
318  double tol = 1.0e-3; // Geant4 compatible
319  DD3Vector x,y,z;
320  rotation.matrix()->GetComponents(x,y,z);
321  double check = (x.Cross(y)).Dot(z); // in case of a LEFT-handed orthogonal system
322  // this must be -1
323  bool reflection((1.-check)>tol);
324  std::string rotName=rotation.toString();
325  if( rotName == ":" )
326  {
327  if( rotn != "" )
328  {
329  rotName = rotn;
330  std::cout << "about to try to make a new DDRotation... should fail!" << std::endl;
331  DDRotation rot( DDName(rotn), rotation.matrix() );
332  std:: cout << "new rotation: " << rot << std::endl;
333  }
334  else
335  {
336  std::cout << "WARNING: MAKING AN UNNAMED ROTATION" << std::endl;
337  }
338  }
339  if( !reflection )
340  {
341  xos << "<Rotation ";
342  }
343  else
344  {
345  xos << "<ReflectionRotation ";
346  }
347  xos << "name=\"" << rotName << "\""
348  << " phiX=\"" << x.phi()/deg << "*deg\""
349  << " thetaX=\"" << x.theta()/deg << "*deg\""
350  << " phiY=\"" << y.phi()/deg << "*deg\""
351  << " thetaY=\"" << y.theta()/deg << "*deg\""
352  << " phiZ=\"" << z.phi()/deg << "*deg\""
353  << " thetaZ=\"" << z.theta()/deg << "*deg\"/>"
354  << std::endl;
355 }
356 
357 void DDCoreToDDXMLOutput::logicalPart( const DDLogicalPart& lp, std::ostream& xos )
358 {
359  xos << "<LogicalPart name=\"" << lp.toString() << "\">" << std::endl;
360  xos << "<rSolid name=\"" << lp.solid().toString() << "\"/>" << std::endl;
361  xos << "<rMaterial name=\"" << lp.material().toString() << "\"/>" << std::endl;
362  xos << "</LogicalPart>" << std::endl;
363 }
364 
366  const DDLogicalPart& child,
367  DDPosData* edgeToChild,
368  int& rotNameSeed,
369  std::ostream& xos )
370 {
371  std::string rotName = edgeToChild->rot_.toString();
372  DDRotationMatrix myIDENT;
373 
374  xos << "<PosPart copyNumber=\"" << edgeToChild->copyno_ << "\">" << std::endl;
375  xos << "<rParent name=\"" << parent.toString() << "\"/>" << std::endl;
376  xos << "<rChild name=\"" << child.toString() << "\"/>" << std::endl;
377  if( *(edgeToChild->rot_.matrix()) != myIDENT )
378  {
379  if( rotName == ":" )
380  {
381  rotation(edgeToChild->rot_, xos);
382  }
383  else
384  {
385  xos << "<rRotation name=\"" << rotName << "\"/>" << std::endl;
386  }
387  } // else let default Rotation matrix be created?
388  xos << "<Translation x=\"" << edgeToChild->translation().x() <<"*mm\""
389  << " y=\"" << edgeToChild->translation().y() <<"*mm\""
390  << " z=\"" << edgeToChild->translation().z() <<"*mm\"/>" << std::endl;
391  xos << "</PosPart>" << std::endl;
392 }
393 
394 void
395 DDCoreToDDXMLOutput::specpar( const DDSpecifics& sp, std::ostream& xos )
396 {
397  xos << "<SpecPar name=\"" << sp.toString() << "\" eval=\"false\">" << std::endl;
398 
399  // ========... all the selection strings out as strings by using the DDPartSelection's std::ostream function...
400  for( const auto& psit : sp.selection())
401  {
402  xos << "<PartSelector path=\"" << psit << "\"/>" << std::endl;
403  }
404 
405  // ========= ... and iterate over all DDValues...
406  for( const auto& vit : sp.specifics())
407  {
408  const DDValue & v = vit.second;
409  size_t s=v.size();
410  size_t i=0;
411  // ============ ... all actual values with the same name
412  const std::vector<std::string>& strvec = v.strings();
413  if( v.isEvaluated())
414  {
415  for(; i<s; ++i)
416  {
417  xos << "<Parameter name=\"" << v.name() << "\""
418  << " value=\"" << v[i] << "\""
419  << " eval=\"true\"/>" << std::endl;
420  }
421  }
422  else
423  {
424  for(; i<s; ++i )
425  {
426  xos << "<Parameter name=\"" << v.name() << "\""
427  << " value=\"" << strvec[i] << "\""
428  << " eval=\"false\"/>" << std::endl;
429  }
430  }
431 
432  }
433  xos << "</SpecPar>" << std::endl;
434 }
435 
436 void DDCoreToDDXMLOutput::specpar( const std::pair<DDsvalues_type, std::set<const DDPartSelection*> >& pssv, std::ostream& xos )
437 {
438  static const std::string madeName("specparname");
439  static int numspecpars(0);
440  std::ostringstream ostr;
441  ostr << numspecpars++;
442  std::string spname = madeName + ostr.str();
443  xos << "<SpecPar name=\"" << spname << "\" eval=\"false\">" << std::endl;
444  for( const auto& psit : pssv.second ) {
445  xos << "<PartSelector path=\"" << *psit << "\"/>" << std::endl;
446  }
447 
448  // ========= ... and iterate over all DDValues...
449  for( const auto& vit : pssv.first )
450  {
451  const DDValue & v = vit.second;
452  size_t s=v.size();
453  size_t i=0;
454  // ============ ... all actual values with the same name
455  const std::vector<std::string>& strvec = v.strings();
456  if( v.isEvaluated() )
457  {
458  for(; i<s; ++i)
459  {
460  xos << "<Parameter name=\"" << v.name() << "\""
461  << " value=\"" << v[i] << "\""
462  << " eval=\"true\"/>" << std::endl;
463  }
464  }
465  else
466  {
467  for(; i<s; ++i )
468  {
469  xos << "<Parameter name=\"" << v.name() << "\""
470  << " value=\"" << strvec[i] << "\""
471  << " eval=\"false\"/>" << std::endl;
472  }
473  }
474  }
475 
476  xos << "</SpecPar>" << std::endl;
477 }
double zhalf(void) const
Definition: DDSolid.cc:458
const std::string & name(void) const
the name of the DDValue
Definition: DDValue.h:55
double a() const
returns the atomic mass
Definition: DDMaterial.cc:97
double startPhi(void) const
Definition: DDSolid.cc:415
double cutAtStart(void) const
truncation at begin of the tube-section
Definition: DDSolid.cc:211
int i
Definition: DBlmapReader.cc:9
double halfZ(void) const
half of the z-Axis
Definition: DDSolid.cc:167
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:215
double halfZ(void) const
Definition: DDSolid.cc:258
std::vector< double > rVec(void) const
Definition: DDSolid.cc:372
A truncated tube section.
Definition: DDSolid.h:132
double x1(void) const
Half-length along x of the side at y=-pDy1 of the face at -pDz.
Definition: DDSolid.cc:175
double zHalf(void) const
half of the z-Axis
Definition: DDSolid.cc:201
void rotation(DDRotation &rotation, std::ostream &xos, const std::string &rotn="")
double y2(void) const
half length along y on +z
Definition: DDSolid.cc:236
list parent
Definition: dbtoconf.py:74
double halfY(void) const
Definition: DDSolid.cc:256
std::vector< double > rMaxVec(void) const
Definition: DDSolid.cc:440
double deltaPhi(void) const
angular span of the tube-section
Definition: DDSolid.cc:209
DDMaterial is used to define and access material information.
Definition: DDMaterial.h:41
std::vector< double > rMaxVec(void) const
Definition: DDSolid.cc:393
double phi(void) const
Azimuthal angle of the line joining the centres of the faces at -/+pDz.
Definition: DDSolid.cc:171
This is simply a handle on the solid.
Definition: DDSolid.h:175
double rTorus(void) const
Definition: DDSolid.cc:487
std::vector< double > rVec(void) const
Definition: DDSolid.cc:419
double cutAtDelta(void) const
truncation at end of the tube-section
Definition: DDSolid.cc:213
double phiFrom(void) const
Definition: DDSolid.cc:468
DDName is used to identify DDD entities uniquely.
Definition: DDName.h:14
double rIn(void) const
inner radius
Definition: DDSolid.cc:203
void specpar(const DDSpecifics &sp, std::ostream &xos)
double rOutMinusZ(void) const
Definition: DDSolid.cc:462
double rOutPlusZ(void) const
Definition: DDSolid.cc:466
DDTranslation translation(void) const
Definition: DDSolid.cc:540
const DDSolid & solid(void) const
Returns a reference object of the solid being the shape of this LogicalPart.
The Signals That Services Can Subscribe To This is based on ActivityRegistry and is current per Services can connect to the signals distributed by the ActivityRegistry in order to monitor the activity of the application Each possible callback has some defined which we here list in angle e g
Definition: Activities.doc:4
A DDSolid represents the shape of a part.
Definition: DDSolid.h:35
double y1(void) const
half length along y on -z
Definition: DDSolid.cc:234
DDSolid solidB(void) const
Definition: DDSolid.cc:550
double rMax(void) const
Definition: DDSolid.cc:485
Represents a uniquely identifyable rotation matrix.
Definition: DDTransform.h:66
bool isEvaluated(void) const
true, if values are numerical evaluated; else false.
Definition: DDValue.cc:203
double z() const
retruns the atomic number
Definition: DDMaterial.cc:103
DDSolid unreflected(void) const
Definition: DDSolid.cc:272
double x4(void) const
Half-length along x of the side at y=+pDy2 of the face at +pDz.
Definition: DDSolid.cc:185
DDRotation rotation(void) const
Definition: DDSolid.cc:535
ROOT::Math::DisplacementVector3D< ROOT::Math::Cartesian3D< double > > DD3Vector
A DD Translation is currently implemented with Root Vector3D.
Definition: DDTranslation.h:6
bool check(const std::string &)
bool atMinusZ(void) const
true, if cut-out or rounding is on the -z side
Definition: DDSolid.cc:240
double halfZ(void) const
half of the z-Axis
Definition: DDSolid.cc:228
std::vector< double > rMinVec(void) const
Definition: DDSolid.cc:386
double startPhi(void) const
Definition: DDSolid.cc:511
double startPhi(void) const
Definition: DDSolid.cc:368
void position(const DDLogicalPart &parent, const DDLogicalPart &child, DDPosData *edgeToChild, int &rotNameSeed, std::ostream &xos)
std::vector< std::pair< unsigned int, DDValue > > DDsvalues_type
std::maps an index to a DDValue. The index corresponds to the index assigned to the name of the std::...
Definition: DDsvalues.h:19
double deltaPhi(void) const
Definition: DDSolid.cc:370
FractionV::value_type constituent(int i) const
returns the i-th compound material and its fraction-mass
Definition: DDMaterial.cc:89
Interface to a Trapezoid.
Definition: DDSolid.h:77
int copyno_
Definition: DDPosData.h:38
double y1(void) const
Half-length along y of the face at -pDz.
Definition: DDSolid.cc:173
double rInMinusZ(void) const
Definition: DDSolid.cc:460
int j
Definition: DBlmapReader.cc:9
A DDLogicalPart aggregates information concerning material, solid and sensitveness ...
Definition: DDLogicalPart.h:88
DDSolidShape shape(void) const
The type of the solid.
Definition: DDSolid.cc:144
void logicalPart(const DDLogicalPart &lp, std::ostream &xos)
double rMin(void) const
Definition: DDSolid.cc:483
std::vector< double > rMinVec(void) const
Definition: DDSolid.cc:433
double rOut(void) const
Definition: DDSolid.cc:509
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:62
int sides(void) const
Definition: DDSolid.cc:413
DDSolid solidA(void) const
Definition: DDSolid.cc:545
double deltaPhi(void) const
Definition: DDSolid.cc:470
double deltaPhi(void) const
Definition: DDSolid.cc:513
double startPhi(void) const
Definition: DDSolid.cc:489
std::string toString() const
Definition: DDBase.h:82
double halfX(void) const
Definition: DDSolid.cc:254
double density() const
returns the density
Definition: DDMaterial.cc:109
std::vector< double > zVec(void) const
Definition: DDSolid.cc:426
double deltaPhi(void) const
Definition: DDSolid.cc:491
Interface to a Box.
Definition: DDSolid.h:162
int noOfConstituents() const
returns the number of compound materials or 0 for elementary materials
Definition: DDMaterial.cc:83
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:179
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:187
double startPhi(void) const
angular start of the tube-section
Definition: DDSolid.cc:207
double x2(void) const
Half-length along x of the side at y=+pDy1 of the face at -pDz.
Definition: DDSolid.cc:177
double zhalf(void) const
Definition: DDSolid.cc:505
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:43
const DDTranslation & translation() const
Definition: DDPosData.h:27
double deltaPhi(void) const
Definition: DDSolid.cc:417
double y2(void) const
Half-length along y of the face at +pDz.
Definition: DDSolid.cc:181
void material(const DDMaterial &material, std::ostream &xos)
double rInPlusZ(void) const
Definition: DDSolid.cc:464
unsigned int size() const
the size of the stored value-pairs (std::string,double)
Definition: DDValue.h:69
tuple cout
Definition: gather_cfg.py:121
DDRotationMatrix * matrix()
Definition: DDTransform.h:94
double x2(void) const
half length along x on +z
Definition: DDSolid.cc:232
double rIn(void) const
Definition: DDSolid.cc:507
void solid(const DDSolid &solid, std::ostream &xos)
double rOut(void) const
outer radius
Definition: DDSolid.cc:205
double theta(void) const
Polar angle of the line joining the centres of the faces at -/+pDz.
Definition: DDSolid.cc:169
ROOT::Math::Rotation3D DDRotationMatrix
A DDRotationMatrix is currently implemented with a ROOT Rotation3D.
DDRotation rot_
Definition: DDPosData.h:37
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:379
Interface to attach user specific data to nodes in the expanded-view.
Definition: DDSpecifics.h:37
double x1(void) const
half length along x on -z
Definition: DDSolid.cc:230
double radius(void) const
radius of the cut-out (neg.) or rounding (pos.)
Definition: DDSolid.cc:238
const std::vector< DDPartSelection > & selection() const
Gives a reference to the collection of part-selections.
Definition: DDSpecifics.cc:38