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  // return temp;
315 }
316 
317 void DDCoreToDDXMLOutput::rotation( DDRotation& rotation, std::ostream& xos, const std::string& rotn )
318 {
319  double tol = 1.0e-3; // Geant4 compatible
320  DD3Vector x,y,z;
321  rotation.matrix()->GetComponents(x,y,z);
322  double check = (x.Cross(y)).Dot(z); // in case of a LEFT-handed orthogonal system
323  // this must be -1
324  bool reflection((1.-check)>tol);
325  std::string rotName=rotation.toString();
326  if( rotName == ":" )
327  {
328  if( rotn != "" )
329  {
330  rotName = rotn;
331  std::cout << "about to try to make a new DDRotation... should fail!" << std::endl;
332  DDRotation rot( DDName(rotn), rotation.matrix() );
333  std:: cout << "new rotation: " << rot << std::endl;
334  }
335  else
336  {
337  std::cout << "WARNING: MAKING AN UNNAMED ROTATION" << std::endl;
338  }
339  }
340  if( !reflection )
341  {
342  xos << "<Rotation ";
343  }
344  else
345  {
346  xos << "<ReflectionRotation ";
347  }
348  // xos << std::fixed << std::setprecision(4);
349  xos << "name=\"" << rotName << "\""
350  << " phiX=\"" << x.phi()/deg << "*deg\""
351  << " thetaX=\"" << x.theta()/deg << "*deg\""
352  << " phiY=\"" << y.phi()/deg << "*deg\""
353  << " thetaY=\"" << y.theta()/deg << "*deg\""
354  << " phiZ=\"" << z.phi()/deg << "*deg\""
355  << " thetaZ=\"" << z.theta()/deg << "*deg\"/>"
356  << std::endl;
357  // xos << std::fixed << std::setprecision(6);
358 }
359 
360 void DDCoreToDDXMLOutput::logicalPart( const DDLogicalPart& lp, std::ostream& xos )
361 {
362  xos << "<LogicalPart name=\"" << lp.toString() << "\">" << std::endl;
363  xos << "<rSolid name=\"" << lp.solid().toString() << "\"/>" << std::endl;
364  xos << "<rMaterial name=\"" << lp.material().toString() << "\"/>" << std::endl;
365  xos << "</LogicalPart>" << std::endl;
366 }
367 
369  const DDLogicalPart& child,
370  DDPosData* edgeToChild,
371  // PIdealGeometry& geom
372  int& rotNameSeed,
373  std::ostream& xos )
374 {
375  std::string rotName = edgeToChild->rot_.toString();
376  DDRotationMatrix myIDENT;
377 
378  xos << "<PosPart copyNumber=\"" << edgeToChild->copyno_ << "\">" << std::endl;
379  xos << "<rParent name=\"" << parent.toString() << "\"/>" << std::endl;
380  xos << "<rChild name=\"" << child.toString() << "\"/>" << std::endl;
381  if( *(edgeToChild->rot_.matrix()) != myIDENT )
382  {
383  if( rotName == ":" )
384  {
385  rotation(edgeToChild->rot_, xos);
386  }
387  else
388  {
389  xos << "<rRotation name=\"" << rotName << "\"/>" << std::endl;
390  }
391  } // else let default Rotation matrix be created?
392  // xos << std::fixed << std::setprecision(4);
393  xos << "<Translation x=\"" << edgeToChild->translation().x() <<"*mm\""
394  << " y=\"" << edgeToChild->translation().y() <<"*mm\""
395  << " z=\"" << edgeToChild->translation().z() <<"*mm\"/>" << std::endl;
396  // xos << std::fixed << std::setprecision(6);
397  xos << "</PosPart>" << std::endl;
398 }
399 
400 void
401 DDCoreToDDXMLOutput::specpar( const DDSpecifics& sp, std::ostream& xos )
402 {
403  xos << "<SpecPar name=\"" << sp.toString() << "\" eval=\"false\">" << std::endl;
404 
405  // ========... all the selection strings out as strings by using the DDPartSelection's std::ostream function...
406  const std::vector<DDPartSelection> sels = sp.selection();
407  std::vector<DDPartSelection>::const_iterator psit = sels.begin();
408  std::vector<DDPartSelection>::const_iterator psendit = sels.end();
409  for(; psit != psendit ; ++psit)
410  {
411  xos << "<PartSelector path=\"" << *psit << "\"/>" << std::endl;
412  }
413 
414  // ========= ... and iterate over all DDValues...
415  DDsvalues_type::const_iterator vit(sp.specifics().begin()), ved(sp.specifics().end());
416  for(; vit != ved; ++vit)
417  {
418  const DDValue & v = vit->second;
419  size_t s=v.size();
420  size_t i=0;
421  // ============ ... all actual values with the same name
422  const std::vector<std::string>& strvec = v.strings();
423  if( v.isEvaluated())
424  {
425  for(; i<s; ++i)
426  {
427  xos << "<Parameter name=\"" << v.name() << "\""
428  << " value=\"" << v[i] << "\""
429  << " eval=\"true\"/>" << std::endl;
430  }
431  }
432  else
433  {
434  for(; i<s; ++i )
435  {
436  xos << "<Parameter name=\"" << v.name() << "\""
437  << " value=\"" << strvec[i] << "\""
438  << " eval=\"false\"/>" << std::endl;
439  }
440  }
441 
442  }
443  xos << "</SpecPar>" << std::endl;
444 }
445 
446 void DDCoreToDDXMLOutput::specpar( const std::pair<DDsvalues_type, std::set<DDPartSelection*> >& pssv, std::ostream& xos )
447 {
448  static std::string madeName("specparname");
449  static int numspecpars(0);
450  std::ostringstream ostr;
451  ostr << numspecpars++;
452  std::string spname = madeName + ostr.str();
453  xos << "<SpecPar name=\"" << spname << "\" eval=\"false\">" << std::endl;
454  std::set<DDPartSelection*>::const_iterator psit = pssv.second.begin();
455  std::set<DDPartSelection*>::const_iterator psendit = pssv.second.end();
456  for (; psit != psendit; ++psit) {
457  xos << "<PartSelector path=\"" << *(*psit) << "\"/>" << std::endl;
458  }
459 
460  // ========= ... and iterate over all DDValues...
461 
462  DDsvalues_type::const_iterator vit(pssv.first.begin()), ved(pssv.first.end());
463  for(; vit != ved; ++vit)
464  {
465  const DDValue & v = vit->second;
466  size_t s=v.size();
467  size_t i=0;
468  // ============ ... all actual values with the same name
469  const std::vector<std::string>& strvec = v.strings();
470  if( v.isEvaluated() )
471  {
472  for(; i<s; ++i)
473  {
474  xos << "<Parameter name=\"" << v.name() << "\""
475  << " value=\"" << v[i] << "\""
476  << " eval=\"true\"/>" << std::endl;
477  }
478  }
479  else
480  {
481  for(; i<s; ++i )
482  {
483  xos << "<Parameter name=\"" << v.name() << "\""
484  << " value=\"" << strvec[i] << "\""
485  << " eval=\"false\"/>" << std::endl;
486  }
487  }
488  }
489 
490  xos << "</SpecPar>" << std::endl;
491 }
double zhalf(void) const
Definition: DDSolid.cc:458
const std::string & name(void) const
the name of the DDValue
Definition: DDValue.h:64
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:16
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:18
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
double double double z
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:198
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 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
bool check(const DataFrame &df, bool capcheck, bool dvercheck)
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:52
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:71
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:86
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:59
const DDTranslation & translation() const
Definition: DDPosData.h:37
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:78
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
x
Definition: VDTMath.h:216
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:49
mathSSE::Vec4< T > v
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:40
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:53