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