test
CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
TGeoMgrFromDdd.cc
Go to the documentation of this file.
1 // -*- C++ -*-
2 //
3 // Package: Geometry
4 // Class : TGeoMgrFromDdd
5 //
6 // Implementation:
7 // [Notes on implementation]
8 //
9 // Original Author:
10 // Created: Fri Jul 2 16:11:42 CEST 2010
11 //
12 
14 
20 
24 
26 
28 
29 #include "TGeoManager.h"
30 #include "TGeoMatrix.h"
31 #include "TGeoCompositeShape.h"
32 #include "TGeoPcon.h"
33 #include "TGeoPgon.h"
34 #include "TGeoCone.h"
35 #include "TGeoBoolNode.h"
36 #include "TGeoTube.h"
37 #include "TGeoArb8.h"
38 #include "TGeoTrd2.h"
39 #include "TGeoTorus.h"
40 #include "TGeoEltu.h"
41 
42 #include "Math/GenVector/RotationX.h"
43 #include "Math/GenVector/RotationZ.h"
44 
45 #include "CLHEP/Units/GlobalSystemOfUnits.h"
46 #include <math.h>
47 
49  : m_level( pset.getUntrackedParameter<int> ( "level", 10 )),
50  m_verbose( pset.getUntrackedParameter<bool>( "verbose", false ))
51 {
52  // The following line is needed to tell the framework what data is
53  // being produced.
54  setWhatProduced( this );
55 }
56 
58 {}
59 
60 //==============================================================================
61 // Local helpers
62 //==============================================================================
63 
64 namespace
65 {
66  TGeoCombiTrans* createPlacement(const DDRotationMatrix& iRot,
67  const DDTranslation& iTrans)
68  {
69  // std::cout << "in createPlacement" << std::endl;
70  double elements[9];
71  iRot.GetComponents(elements);
72  TGeoRotation r;
73  r.SetMatrix(elements);
74 
75  TGeoTranslation t(iTrans.x()/cm,
76  iTrans.y()/cm,
77  iTrans.z()/cm);
78 
79  return new TGeoCombiTrans(t,r);
80  }
81 }
82 
83 
84 //==============================================================================
85 // public member functions
86 //==============================================================================
87 
90 {
91  using namespace edm;
92 
94  iRecord.getRecord<IdealGeometryRecord>().get(viewH);
95 
96  if ( ! viewH.isValid()) {
97  return std::shared_ptr<TGeoManager>();
98  }
99 
100  TGeoManager *geo_mgr = new TGeoManager("cmsGeo","CMS Detector");
101  // NOTE: the default constructor does not create the identity matrix
102  if (gGeoIdentity == 0)
103  {
104  gGeoIdentity = new TGeoIdentity("Identity");
105  }
106 
107  std::cout << "about to initialize the DDCompactView walker" << std::endl;
108  DDCompactView::walker_type walker(viewH->graph());
109  DDCompactView::walker_type::value_type info = walker.current();
110 
111  // The top most item is actually the volume holding both the
112  // geometry AND the magnetic field volumes!
113  walker.firstChild();
114  if( ! walker.firstChild()) {
115  return std::shared_ptr<TGeoManager>();
116  }
117 
118  TGeoVolume *top = createVolume(info.first.name().fullname(),
119  info.first.solid(),
120  info.first.material());
121  if (top == 0) {
122  return std::shared_ptr<TGeoManager>();
123  }
124 
125  geo_mgr->SetTopVolume(top);
126  // ROOT chokes unless colors are assigned
127  top->SetVisibility(kFALSE);
128  top->SetLineColor(kBlue);
129 
130  std::vector<TGeoVolume*> parentStack;
131  parentStack.push_back(top);
132 
133  do
134  {
135  DDCompactView::walker_type::value_type info = walker.current();
136 
137  if (m_verbose)
138  {
139  for(unsigned int i=0; i<parentStack.size();++i) {
140  std::cout <<" ";
141  }
142  std::cout << info.first.name()<<" "<<info.second->copyno_<<" "
143  << DDSolidShapesName::name(info.first.solid().shape())<<std::endl;
144  }
145 
146  bool childAlreadyExists = (0 != nameToVolume_[info.first.name().fullname()]);
147  TGeoVolume *child = createVolume(info.first.name().fullname(),
148  info.first.solid(),
149  info.first.material());
150  if (0!=child && info.second != 0)
151  {
152  parentStack.back()->AddNode(child,
153  info.second->copyno_,
154  createPlacement(info.second->rotation(),
155  info.second->translation()));
156  child->SetLineColor(kBlue);
157  }
158  else
159  {
160  if ( info.second == 0 ) {
161  break;
162  }
163  }
164  if (0 == child || childAlreadyExists || m_level == int(parentStack.size()))
165  {
166  if (0!=child)
167  {
168  child->SetLineColor(kRed);
169  }
170  //stop descending
171  if ( ! walker.nextSibling())
172  {
173  while (walker.parent())
174  {
175  parentStack.pop_back();
176  if (walker.nextSibling()) {
177  break;
178  }
179  }
180  }
181  }
182  else
183  {
184  if (walker.firstChild())
185  {
186  parentStack.push_back(child);
187  }
188  else
189  {
190  if ( ! walker.nextSibling())
191  {
192  while (walker.parent())
193  {
194  parentStack.pop_back();
195  if (walker.nextSibling()) {
196  break;
197  }
198  }
199  }
200  }
201  }
202  } while ( ! parentStack.empty());
203 
204  geo_mgr->CloseGeometry();
205 
206  geo_mgr->DefaultColors();
207 
208  nameToShape_.clear();
209  nameToVolume_.clear();
210  nameToMaterial_.clear();
211  nameToMedium_.clear();
212 
213  return std::shared_ptr<TGeoManager>(geo_mgr);
214 }
215 
216 
217 //==============================================================================
218 // private member functions
219 //==============================================================================
220 
221 TGeoShape*
223  const DDSolid& iSolid)
224 {
225  LogDebug("TGeoMgrFromDdd::createShape") << "with name: " << iName << " and solid: " << iSolid;
226 
227  DDBase<DDName, DDI::Solid*>::def_type defined( iSolid.isDefined());
228  if( !defined.first ) throw cms::Exception("TGeoMgrFromDdd::createShape * solid " + iName + " is not declared * " );
229  if( !defined.second ) throw cms::Exception("TGeoMgrFromDdd::createShape * solid " + defined.first->name() + " is not defined *" );
230 
231  TGeoShape* rSolid= nameToShape_[iName];
232  if (rSolid == 0)
233  {
234  const std::vector<double>& params = iSolid.parameters();
235  switch(iSolid.shape())
236  {
237  case ddbox:
238  rSolid = new TGeoBBox(
239  iName.c_str(),
240  params[0]/cm,
241  params[1]/cm,
242  params[2]/cm);
243  break;
244  case ddcons:
245  rSolid = new TGeoConeSeg(
246  iName.c_str(),
247  params[0]/cm,
248  params[1]/cm,
249  params[2]/cm,
250  params[3]/cm,
251  params[4]/cm,
252  params[5]/deg,
253  params[6]/deg+params[5]/deg
254  );
255  break;
256  case ddtubs:
257  //Order in params is zhalf,rIn,rOut,startPhi,deltaPhi
258  rSolid= new TGeoTubeSeg(
259  iName.c_str(),
260  params[1]/cm,
261  params[2]/cm,
262  params[0]/cm,
263  params[3]/deg,
264  params[3]/deg + params[4]/deg);
265  break;
266  case ddcuttubs:
267  //Order in params is zhalf,rIn,rOut,startPhi,deltaPhi,lx,ly,lz,tx,ty,tz
268  rSolid= new TGeoCtub(
269  iName.c_str(),
270  params[1]/cm,
271  params[2]/cm,
272  params[0]/cm,
273  params[3]/deg,
274  params[3]/deg + params[4]/deg,
275  params[5],params[6],params[7],
276  params[8],params[9],params[10]);
277  break;
278  case ddtrap:
279  rSolid =new TGeoTrap(
280  iName.c_str(),
281  params[0]/cm, //dz
282  params[1]/deg, //theta
283  params[2]/deg, //phi
284  params[3]/cm, //dy1
285  params[4]/cm, //dx1
286  params[5]/cm, //dx2
287  params[6]/deg, //alpha1
288  params[7]/cm, //dy2
289  params[8]/cm, //dx3
290  params[9]/cm, //dx4
291  params[10]/deg);//alpha2
292  break;
293  case ddpolycone_rrz:
294  rSolid = new TGeoPcon(
295  iName.c_str(),
296  params[0]/deg,
297  params[1]/deg,
298  (params.size()-2)/3) ;
299  {
300  std::vector<double> temp(params.size()+1);
301  temp.reserve(params.size()+1);
302  temp[0]=params[0]/deg;
303  temp[1]=params[1]/deg;
304  temp[2]=(params.size()-2)/3;
305  std::copy(params.begin()+2,params.end(),temp.begin()+3);
306  for(std::vector<double>::iterator it=temp.begin()+3;
307  it != temp.end();
308  ++it) {
309  *it /=cm;
310  }
311  rSolid->SetDimensions(&(*(temp.begin())));
312  }
313  break;
314  case ddpolyhedra_rrz:
315  rSolid = new TGeoPgon(
316  iName.c_str(),
317  params[1]/deg,
318  params[2]/deg,
319  static_cast<int>(params[0]),
320  (params.size()-3)/3);
321  {
322  std::vector<double> temp(params.size()+1);
323  temp[0]=params[1]/deg;
324  temp[1]=params[2]/deg;
325  temp[2]=params[0];
326  temp[3]=(params.size()-3)/3;
327  std::copy(params.begin()+3,params.end(),temp.begin()+4);
328  for(std::vector<double>::iterator it=temp.begin()+4;
329  it != temp.end();
330  ++it) {
331  *it /=cm;
332  }
333  rSolid->SetDimensions(&(*(temp.begin())));
334  }
335  break;
336  case ddpseudotrap:
337  {
338  //implementation taken from SimG4Core/Geometry/src/DDG4SolidConverter.cc
339  const static DDRotationMatrix s_rot( ROOT::Math::RotationX( 90.*deg ));
340  DDPseudoTrap pt( iSolid );
341 
342  double r = pt.radius();
343  bool atMinusZ = pt.atMinusZ();
344  double x = 0;
345  double h = 0;
346  bool intersec = false; // union or intersection solid
347 
348  if( atMinusZ )
349  {
350  x = pt.x1(); // tubs radius
351  }
352  else
353  {
354  x = pt.x2(); // tubs radius
355  }
356  double halfOpeningAngle = asin( x / std::abs( r ))/deg;
357  double displacement = 0;
358  double startPhi = 0;
359  /* calculate the displacement of the tubs w.r.t. to the trap,
360  determine the opening angle of the tubs */
361  double delta = sqrt( r * r - x * x );
362 
363  if( r < 0 && std::abs( r ) >= x )
364  {
365  intersec = true; // intersection solid
366  h = pt.y1() < pt.y2() ? pt.y2() : pt.y1(); // tubs half height
367  h += h/20.; // enlarge a bit - for subtraction solid
368  if( atMinusZ )
369  {
370  displacement = - pt.halfZ() - delta;
371  startPhi = 90. - halfOpeningAngle;
372  }
373  else
374  {
375  displacement = pt.halfZ() + delta;
376  startPhi = -90.- halfOpeningAngle;
377  }
378  }
379  else if( r > 0 && std::abs( r ) >= x )
380  {
381  if( atMinusZ )
382  {
383  displacement = - pt.halfZ() + delta;
384  startPhi = 270.- halfOpeningAngle;
385  h = pt.y1();
386  }
387  else
388  {
389  displacement = pt.halfZ() - delta;
390  startPhi = 90. - halfOpeningAngle;
391  h = pt.y2();
392  }
393  }
394  else
395  {
396  throw cms::Exception( "Check parameters of the PseudoTrap! name=" + pt.name().name());
397  }
398 
399  std::auto_ptr<TGeoShape> trap( new TGeoTrd2( pt.name().name().c_str(),
400  pt.x1()/cm,
401  pt.x2()/cm,
402  pt.y1()/cm,
403  pt.y2()/cm,
404  pt.halfZ()/cm ));
405 
406  std::auto_ptr<TGeoShape> tubs( new TGeoTubeSeg( pt.name().name().c_str(),
407  0.,
408  std::abs(r)/cm, // radius cannot be negative!!!
409  h/cm,
410  startPhi,
411  startPhi + halfOpeningAngle * 2. ));
412  if( intersec )
413  {
414  TGeoSubtraction* sub = new TGeoSubtraction( trap.release(),
415  tubs.release(),
416  0,
417  createPlacement( s_rot,
418  DDTranslation( 0.,
419  0.,
420  displacement )));
421  rSolid = new TGeoCompositeShape( iName.c_str(),
422  sub );
423  }
424  else
425  {
426  std::auto_ptr<TGeoShape> box( new TGeoBBox( 1.1*x/cm, 1.1*h/cm, sqrt(r*r-x*x)/cm ));
427 
428  TGeoSubtraction* sub = new TGeoSubtraction( tubs.release(),
429  box.release(),
430  0,
431  createPlacement( s_rot,
432  DDTranslation( 0.,
433  0.,
434  0. )));
435 
436  std::auto_ptr<TGeoShape> tubicCap( new TGeoCompositeShape( iName.c_str(), sub ));
437 
438  TGeoUnion* boolS = new TGeoUnion( trap.release(),
439  tubicCap.release(),
440  0,
441  createPlacement( s_rot,
442  DDTranslation( 0.,
443  0.,
444  displacement )));
445 
446  rSolid = new TGeoCompositeShape( iName.c_str(),
447  boolS );
448  }
449 
450  break;
451  }
452  case ddtorus:
453  {
454  DDTorus solid( iSolid );
455  rSolid = new TGeoTorus( iName.c_str(),
456  solid.rTorus()/cm,
457  solid.rMin()/cm,
458  solid.rMax()/cm,
459  solid.startPhi()/deg,
460  solid.deltaPhi()/deg);
461  break;
462  }
463  case ddsubtraction:
464  {
465  DDBooleanSolid boolSolid(iSolid);
466  if(!boolSolid) {
467  throw cms::Exception("GeomConvert") <<"conversion to DDBooleanSolid failed";
468  }
469 
470  std::auto_ptr<TGeoShape> left( createShape(boolSolid.solidA().name().fullname(),
471  boolSolid.solidA()) );
472  std::auto_ptr<TGeoShape> right( createShape(boolSolid.solidB().name().fullname(),
473  boolSolid.solidB()));
474  if( 0 != left.get() &&
475  0 != right.get() ) {
476  TGeoSubtraction* sub = new TGeoSubtraction(left.release(),right.release(),
477  0,
478  createPlacement(
479  *(boolSolid.rotation().matrix()),
480  boolSolid.translation()));
481  rSolid = new TGeoCompositeShape(iName.c_str(),
482  sub);
483  }
484  break;
485  }
486  case ddtrunctubs:
487  {
488  DDTruncTubs tt( iSolid );
489  if( !tt )
490  {
491  throw cms::Exception( "GeomConvert" ) << "conversion to DDTruncTubs failed";
492  }
493  double rIn( tt.rIn());
494  double rOut( tt.rOut());
495  double zHalf( tt.zHalf());
496  double startPhi( tt.startPhi());
497  double deltaPhi( tt.deltaPhi());
498  double cutAtStart( tt.cutAtStart());
499  double cutAtDelta( tt.cutAtDelta());
500  bool cutInside( bool( tt.cutInside()));
501  std::string name = tt.name().name();
502 
503  // check the parameters
504  if( rIn <= 0 || rOut <=0 || cutAtStart <=0 || cutAtDelta <= 0 )
505  {
506  std::string s = "TruncTubs " + std::string( tt.name().fullname()) + ": 0 <= rIn,cutAtStart,rOut,cutAtDelta,rOut violated!";
507  throw cms::Exception( s );
508  }
509  if( rIn >= rOut )
510  {
511  std::string s = "TruncTubs " + std::string( tt.name().fullname()) + ": rIn<rOut violated!";
512  throw cms::Exception(s);
513  }
514  if( startPhi != 0. )
515  {
516  std::string s= "TruncTubs " + std::string( tt.name().fullname()) + ": startPhi != 0 not supported!";
517  throw cms::Exception( s );
518  }
519 
520  startPhi = 0.;
521  double r( cutAtStart );
522  double R( cutAtDelta );
523 
524  // Note: startPhi is always 0.0
525  std::auto_ptr<TGeoShape> tubs( new TGeoTubeSeg( name.c_str(), rIn/cm, rOut/cm, zHalf/cm, startPhi, deltaPhi/deg ));
526 
527  double boxX( rOut ), boxY( rOut ); // exaggerate dimensions - does not matter, it's subtracted!
528 
529  // width of the box > width of the tubs
530  double boxZ( 1.1 * zHalf );
531 
532  // angle of the box w.r.t. tubs
533  double cath = r - R * cos( deltaPhi );
534  double hypo = sqrt( r * r + R * R - 2. * r * R * cos( deltaPhi ));
535  double cos_alpha = cath / hypo;
536  double alpha = -acos( cos_alpha );
537 
538  // rotationmatrix of box w.r.t. tubs
539  TGeoRotation rot;
540  rot.RotateX( 90 );
541  rot.RotateZ( alpha/deg );
542 
543  // center point of the box
544  double xBox;
545  if( !cutInside )
546  {
547  xBox = r + boxX / sin( fabs( alpha ));
548  }
549  else
550  {
551  xBox = - ( boxX / sin( fabs( alpha )) - r );
552  }
553  std::auto_ptr<TGeoShape> box( new TGeoBBox( name.c_str(), boxX/cm, boxZ/cm, boxY/cm ));
554 
555  TGeoTranslation trans( xBox/cm, 0., 0.);
556 
557  TGeoSubtraction* sub = new TGeoSubtraction( tubs.release(),
558  box.release(),
559  0, new TGeoCombiTrans( trans, rot ));
560 
561  rSolid = new TGeoCompositeShape( iName.c_str(),
562  sub );
563  break;
564  }
565  case ddunion:
566  {
567  DDBooleanSolid boolSolid(iSolid);
568  if(!boolSolid) {
569  throw cms::Exception("GeomConvert") <<"conversion to DDBooleanSolid failed";
570  }
571 
572  std::auto_ptr<TGeoShape> left( createShape(boolSolid.solidA().name().fullname(),
573  boolSolid.solidA()) );
574  std::auto_ptr<TGeoShape> right( createShape(boolSolid.solidB().name().fullname(),
575  boolSolid.solidB()));
576  //DEBUGGING
577  //break;
578  if( 0 != left.get() &&
579  0 != right.get() ) {
580  TGeoUnion* boolS = new TGeoUnion(left.release(),right.release(),
581  0,
582  createPlacement(
583  *(boolSolid.rotation().matrix()),
584  boolSolid.translation()));
585  rSolid = new TGeoCompositeShape(iName.c_str(),
586  boolS);
587  }
588  break;
589  }
590  case ddintersection:
591  {
592  DDBooleanSolid boolSolid(iSolid);
593  if(!boolSolid) {
594  throw cms::Exception("GeomConvert") <<"conversion to DDBooleanSolid failed";
595  }
596 
597  std::auto_ptr<TGeoShape> left( createShape(boolSolid.solidA().name().fullname(),
598  boolSolid.solidA()) );
599  std::auto_ptr<TGeoShape> right( createShape(boolSolid.solidB().name().fullname(),
600  boolSolid.solidB()));
601  if( 0 != left.get() &&
602  0 != right.get() ) {
603  TGeoIntersection* boolS = new TGeoIntersection(left.release(),
604  right.release(),
605  0,
606  createPlacement(
607  *(boolSolid.rotation().matrix()),
608  boolSolid.translation()));
609  rSolid = new TGeoCompositeShape(iName.c_str(),
610  boolS);
611  }
612  break;
613  }
614  case ddellipticaltube:
615  {
616  DDEllipticalTube eSolid(iSolid);
617  if(!eSolid) {
618  throw cms::Exception("GeomConvert") <<"conversion to DDEllipticalTube failed";
619  }
620  rSolid = new TGeoEltu(iName.c_str(),
621  params[0]/cm,
622  params[1]/cm,
623  params[2]/cm);
624  break;
625  }
626  default:
627  break;
628  }
629  nameToShape_[iName]=rSolid;
630  }
631  if (rSolid == 0)
632  {
633  std::cerr <<"COULD NOT MAKE "<<iName<<" of a shape "<<iSolid<<std::endl;
634  }
635 
636  LogDebug("TGeoMgrFromDdd::createShape") << "solid " << iName << " has been created.";
637 
638  return rSolid;
639 }
640 
641 TGeoVolume*
643  const DDSolid& iSolid,
644  const DDMaterial& iMaterial)
645 {
646  TGeoVolume* v=nameToVolume_[iName];
647  if (v == 0)
648  {
649  TGeoShape* solid = createShape(iSolid.name().fullname(),
650  iSolid);
651  std::string mat_name = iMaterial.name().fullname();
652  TGeoMedium *geo_med = nameToMedium_[mat_name];
653  if (geo_med == 0)
654  {
655  TGeoMaterial *geo_mat = createMaterial(iMaterial);
656  geo_med = new TGeoMedium(mat_name.c_str(), 0, geo_mat);
657  nameToMedium_[mat_name] = geo_med;
658  }
659  if (solid)
660  {
661  v = new TGeoVolume(iName.c_str(),
662  solid,
663  geo_med);
664  }
665  nameToVolume_[iName] = v;
666  }
667  return v;
668 }
669 
670 TGeoMaterial*
672 {
673  std::string mat_name = iMaterial.name().fullname();
674  TGeoMaterial *mat = nameToMaterial_[mat_name];
675 
676  if (mat == 0)
677  {
678  if (iMaterial.noOfConstituents() > 0)
679  {
680  TGeoMixture *mix = new TGeoMixture(mat_name.c_str(),
681  iMaterial.noOfConstituents(),
682  iMaterial.density()*cm3/g);
683  for (int i = 0; i < iMaterial.noOfConstituents(); ++i)
684  {
685  mix->AddElement(createMaterial(iMaterial.constituent(i).first),
686  iMaterial.constituent(i).second);
687  }
688  mat = mix;
689  }
690  else
691  {
692  mat = new TGeoMaterial(mat_name.c_str(),
693  iMaterial.a()*mole/g, iMaterial.z(),
694  iMaterial.density()*cm3/g);
695  }
696  nameToMaterial_[mat_name] = mat;
697  }
698 
699  return mat;
700 }
701 
702 //
703 // const member functions
704 //
705 
706 //
707 // static member functions
708 //
#define LogDebug(id)
dbl * delta
Definition: mlp_gen.cc:36
Definition: DDBase.h:10
double a() const
returns the atomic mass
Definition: DDMaterial.cc:97
double cutAtStart(void) const
truncation at begin of the tube-section
Definition: DDSolid.cc:218
int i
Definition: DBlmapReader.cc:9
float alpha
Definition: AMPTWrapper.h:95
TGeoMaterial * createMaterial(const DDMaterial &iMaterial)
static const TGPicture * info(bool iBackgroundIsBlack)
bool cutInside(void) const
true, if truncation is on the inner side of the tube-section
Definition: DDSolid.cc:222
A truncated tube section.
Definition: DDSolid.h:134
const N & name() const
Definition: DDBase.h:78
double zHalf(void) const
half of the z-Axis
Definition: DDSolid.cc:208
double y2(void) const
half length along y on +z
Definition: DDSolid.cc:243
FWCore Framework interface EventSetupRecordImplementation h
Helper function to determine trigger accepts.
double deltaPhi(void) const
angular span of the tube-section
Definition: DDSolid.cc:216
DDMaterial is used to define and access material information.
Definition: DDMaterial.h:41
Sin< T >::type sin(const T &t)
Definition: Sin.h:22
double rTorus(void) const
Definition: DDSolid.cc:494
double cutAtDelta(void) const
truncation at end of the tube-section
Definition: DDSolid.cc:220
double rIn(void) const
inner radius
Definition: DDSolid.cc:210
DDTranslation translation(void) const
Definition: DDSolid.cc:547
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
void setWhatProduced(T *iThis, const es::Label &iLabel=es::Label())
Definition: ESProducer.h:115
A DDSolid represents the shape of a part.
Definition: DDSolid.h:37
double y1(void) const
half length along y on -z
Definition: DDSolid.cc:241
DDSolid solidB(void) const
Definition: DDSolid.cc:557
ROOT::Math::DisplacementVector3D< ROOT::Math::Cartesian3D< double > > DDTranslation
Definition: DDTranslation.h:7
double rMax(void) const
Definition: DDSolid.cc:492
dictionary elements
double z() const
retruns the atomic number
Definition: DDMaterial.cc:103
static const char *const name(DDSolidShape s)
Definition: DDSolidShapes.h:21
DDRotation rotation(void) const
Definition: DDSolid.cc:542
graph< DDLogicalPart, DDPosData * >::value_type value_type
Definition: graphwalker.h:38
TGeoVolume * createVolume(const std::string &iName, const DDSolid &iSolid, const DDMaterial &iMaterial)
bool atMinusZ(void) const
true, if cut-out or rounding is on the -z side
Definition: DDSolid.cc:247
double halfZ(void) const
half of the z-Axis
Definition: DDSolid.cc:235
T sqrt(T t)
Definition: SSEVec.h:18
Cos< T >::type cos(const T &t)
Definition: Cos.h:22
std::map< std::string, TGeoShape * > nameToShape_
const std::string fullname() const
Definition: DDName.h:53
FractionV::value_type constituent(int i) const
returns the i-th compound material and its fraction-mass
Definition: DDMaterial.cc:91
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
ReturnType produce(const DisplayGeomRecord &)
double rMin(void) const
Definition: DDSolid.cc:490
TGeoShape * createShape(const std::string &iName, const DDSolid &iSolid)
DDSolid solidA(void) const
Definition: DDSolid.cc:552
TGeoMgrFromDdd(const edm::ParameterSet &)
double startPhi(void) const
Definition: DDSolid.cc:496
std::map< std::string, TGeoMaterial * > nameToMaterial_
double density() const
returns the density
Definition: DDMaterial.cc:109
double deltaPhi(void) const
Definition: DDSolid.cc:498
std::map< std::string, TGeoVolume * > nameToVolume_
int noOfConstituents() const
returns the number of compound materials or 0 for elementary materials
Definition: DDMaterial.cc:85
double startPhi(void) const
angular start of the tube-section
Definition: DDSolid.cc:214
std::map< std::string, TGeoMedium * > nameToMedium_
tuple cout
Definition: gather_cfg.py:145
virtual ~TGeoMgrFromDdd()
volatile std::atomic< bool > shutdown_flag false
DDRotationMatrix * matrix()
Definition: DDTransform.h:94
double x2(void) const
half length along x on +z
Definition: DDSolid.cc:239
double rOut(void) const
outer radius
Definition: DDSolid.cc:212
ROOT::Math::Rotation3D DDRotationMatrix
A DDRotationMatrix is currently implemented with a ROOT Rotation3D.
const std::string & name() const
Returns the name.
Definition: DDName.cc:90
double x1(void) const
half length along x on -z
Definition: DDSolid.cc:237
std::shared_ptr< TGeoManager > ReturnType
double radius(void) const
radius of the cut-out (neg.) or rounding (pos.)
Definition: DDSolid.cc:245