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 // $Id: TGeoMgrFromDdd.cc,v 1.13 2012/05/30 14:02:07 yana Exp $
12 //
13 
15 
21 
25 
27 
29 
30 #include "TGeoManager.h"
31 #include "TGeoMatrix.h"
32 #include "TGeoCompositeShape.h"
33 #include "TGeoPcon.h"
34 #include "TGeoPgon.h"
35 #include "TGeoCone.h"
36 #include "TGeoBoolNode.h"
37 #include "TGeoTube.h"
38 #include "TGeoArb8.h"
39 #include "TGeoTrd2.h"
40 #include "TGeoTorus.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 boost::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 boost::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 boost::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 boost::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 ddtrap:
267  rSolid =new TGeoTrap(
268  iName.c_str(),
269  params[0]/cm, //dz
270  params[1]/deg, //theta
271  params[2]/deg, //phi
272  params[3]/cm, //dy1
273  params[4]/cm, //dx1
274  params[5]/cm, //dx2
275  params[6]/deg, //alpha1
276  params[7]/cm, //dy2
277  params[8]/cm, //dx3
278  params[9]/cm, //dx4
279  params[10]/deg);//alpha2
280  break;
281  case ddpolycone_rrz:
282  rSolid = new TGeoPcon(
283  iName.c_str(),
284  params[0]/deg,
285  params[1]/deg,
286  (params.size()-2)/3) ;
287  {
288  std::vector<double> temp(params.size()+1);
289  temp.reserve(params.size()+1);
290  temp[0]=params[0]/deg;
291  temp[1]=params[1]/deg;
292  temp[2]=(params.size()-2)/3;
293  std::copy(params.begin()+2,params.end(),temp.begin()+3);
294  for(std::vector<double>::iterator it=temp.begin()+3;
295  it != temp.end();
296  ++it) {
297  *it /=cm;
298  }
299  rSolid->SetDimensions(&(*(temp.begin())));
300  }
301  break;
302  case ddpolyhedra_rrz:
303  rSolid = new TGeoPgon(
304  iName.c_str(),
305  params[1]/deg,
306  params[2]/deg,
307  static_cast<int>(params[0]),
308  (params.size()-3)/3);
309  {
310  std::vector<double> temp(params.size()+1);
311  temp[0]=params[1]/deg;
312  temp[1]=params[2]/deg;
313  temp[2]=params[0];
314  temp[3]=(params.size()-3)/3;
315  std::copy(params.begin()+3,params.end(),temp.begin()+4);
316  for(std::vector<double>::iterator it=temp.begin()+4;
317  it != temp.end();
318  ++it) {
319  *it /=cm;
320  }
321  rSolid->SetDimensions(&(*(temp.begin())));
322  }
323  break;
324  case ddpseudotrap:
325  {
326  //implementation taken from SimG4Core/Geometry/src/DDG4SolidConverter.cc
327  static DDRotationMatrix s_rot( ROOT::Math::RotationX( 90.*deg ));
328  DDPseudoTrap pt( iSolid );
329 
330  double r = pt.radius();
331  bool atMinusZ = pt.atMinusZ();
332  double x = 0;
333  double h = 0;
334  bool intersec = false; // union or intersection solid
335 
336  if( atMinusZ )
337  {
338  x = pt.x1(); // tubs radius
339  }
340  else
341  {
342  x = pt.x2(); // tubs radius
343  }
344  double halfOpeningAngle = asin( x / abs( r ))/deg;
345  double displacement = 0;
346  double startPhi = 0;
347  /* calculate the displacement of the tubs w.r.t. to the trap,
348  determine the opening angle of the tubs */
349  double delta = sqrt( r * r - x * x );
350 
351  if( r < 0 && abs( r ) >= x )
352  {
353  intersec = true; // intersection solid
354  h = pt.y1() < pt.y2() ? pt.y2() : pt.y1(); // tubs half height
355  h += h/20.; // enlarge a bit - for subtraction solid
356  if( atMinusZ )
357  {
358  displacement = - pt.halfZ() - delta;
359  startPhi = 90. - halfOpeningAngle;
360  }
361  else
362  {
363  displacement = pt.halfZ() + delta;
364  startPhi = -90.- halfOpeningAngle;
365  }
366  }
367  else if( r > 0 && abs( r ) >= x )
368  {
369  if( atMinusZ )
370  {
371  displacement = - pt.halfZ() + delta;
372  startPhi = 270.- halfOpeningAngle;
373  h = pt.y1();
374  }
375  else
376  {
377  displacement = pt.halfZ() - delta;
378  startPhi = 90. - halfOpeningAngle;
379  h = pt.y2();
380  }
381  }
382  else
383  {
384  throw cms::Exception( "Check parameters of the PseudoTrap! name=" + pt.name().name());
385  }
386 
387  std::auto_ptr<TGeoShape> trap( new TGeoTrd2( pt.name().name().c_str(),
388  pt.x1()/cm,
389  pt.x2()/cm,
390  pt.y1()/cm,
391  pt.y2()/cm,
392  pt.halfZ()/cm ));
393 
394  std::auto_ptr<TGeoShape> tubs( new TGeoTubeSeg( pt.name().name().c_str(),
395  0.,
396  abs(r)/cm, // radius cannot be negative!!!
397  h/cm,
398  startPhi,
399  startPhi + halfOpeningAngle * 2. ));
400  if( intersec )
401  {
402  TGeoSubtraction* sub = new TGeoSubtraction( trap.release(),
403  tubs.release(),
404  0,
405  createPlacement( s_rot,
406  DDTranslation( 0.,
407  0.,
408  displacement )));
409  rSolid = new TGeoCompositeShape( iName.c_str(),
410  sub );
411  }
412  else
413  {
414  std::auto_ptr<TGeoShape> box( new TGeoBBox( 1.1*x/cm, 1.1*h/cm, sqrt(r*r-x*x)/cm ));
415 
416  TGeoSubtraction* sub = new TGeoSubtraction( tubs.release(),
417  box.release(),
418  0,
419  createPlacement( s_rot,
420  DDTranslation( 0.,
421  0.,
422  0. )));
423 
424  std::auto_ptr<TGeoShape> tubicCap( new TGeoCompositeShape( iName.c_str(), sub ));
425 
426  TGeoUnion* boolS = new TGeoUnion( trap.release(),
427  tubicCap.release(),
428  0,
429  createPlacement( s_rot,
430  DDTranslation( 0.,
431  0.,
432  displacement )));
433 
434  rSolid = new TGeoCompositeShape( iName.c_str(),
435  boolS );
436  }
437 
438  break;
439  }
440  case ddtorus:
441  {
442  DDTorus solid( iSolid );
443  rSolid = new TGeoTorus( iName.c_str(),
444  solid.rTorus()/cm,
445  solid.rMin()/cm,
446  solid.rMax()/cm,
447  solid.startPhi()/deg,
448  solid.deltaPhi()/deg);
449  break;
450  }
451  case ddsubtraction:
452  {
453  DDBooleanSolid boolSolid(iSolid);
454  if(!boolSolid) {
455  throw cms::Exception("GeomConvert") <<"conversion to DDBooleanSolid failed";
456  }
457 
458  std::auto_ptr<TGeoShape> left( createShape(boolSolid.solidA().name().fullname(),
459  boolSolid.solidA()) );
460  std::auto_ptr<TGeoShape> right( createShape(boolSolid.solidB().name().fullname(),
461  boolSolid.solidB()));
462  if( 0 != left.get() &&
463  0 != right.get() ) {
464  TGeoSubtraction* sub = new TGeoSubtraction(left.release(),right.release(),
465  0,
466  createPlacement(
467  *(boolSolid.rotation().matrix()),
468  boolSolid.translation()));
469  rSolid = new TGeoCompositeShape(iName.c_str(),
470  sub);
471  }
472  break;
473  }
474  case ddtrunctubs:
475  {
476  DDTruncTubs tt( iSolid );
477  if( !tt )
478  {
479  throw cms::Exception( "GeomConvert" ) << "conversion to DDTruncTubs failed";
480  }
481  double rIn( tt.rIn());
482  double rOut( tt.rOut());
483  double zHalf( tt.zHalf());
484  double startPhi( tt.startPhi());
485  double deltaPhi( tt.deltaPhi());
486  double cutAtStart( tt.cutAtStart());
487  double cutAtDelta( tt.cutAtDelta());
488  bool cutInside( bool( tt.cutInside()));
489  std::string name = tt.name().name();
490 
491  // check the parameters
492  if( rIn <= 0 || rOut <=0 || cutAtStart <=0 || cutAtDelta <= 0 )
493  {
494  std::string s = "TruncTubs " + std::string( tt.name().fullname()) + ": 0 <= rIn,cutAtStart,rOut,cutAtDelta,rOut violated!";
495  throw cms::Exception( s );
496  }
497  if( rIn >= rOut )
498  {
499  std::string s = "TruncTubs " + std::string( tt.name().fullname()) + ": rIn<rOut violated!";
500  throw cms::Exception(s);
501  }
502  if( startPhi != 0. )
503  {
504  std::string s= "TruncTubs " + std::string( tt.name().fullname()) + ": startPhi != 0 not supported!";
505  throw cms::Exception( s );
506  }
507 
508  startPhi = 0.;
509  double r( cutAtStart );
510  double R( cutAtDelta );
511 
512  // Note: startPhi is always 0.0
513  std::auto_ptr<TGeoShape> tubs( new TGeoTubeSeg( name.c_str(), rIn/cm, rOut/cm, zHalf/cm, startPhi, deltaPhi/deg ));
514 
515  double boxX( rOut ), boxY( rOut ); // exaggerate dimensions - does not matter, it's subtracted!
516 
517  // width of the box > width of the tubs
518  double boxZ( 1.1 * zHalf );
519 
520  // angle of the box w.r.t. tubs
521  double cath = r - R * cos( deltaPhi );
522  double hypo = sqrt( r * r + R * R - 2. * r * R * cos( deltaPhi ));
523  double cos_alpha = cath / hypo;
524  double alpha = -acos( cos_alpha );
525 
526  // rotationmatrix of box w.r.t. tubs
527  TGeoRotation rot;
528  rot.RotateX( 90 );
529  rot.RotateZ( alpha/deg );
530 
531  // center point of the box
532  double xBox;
533  if( !cutInside )
534  {
535  xBox = r + boxX / sin( fabs( alpha ));
536  }
537  else
538  {
539  xBox = - ( boxX / sin( fabs( alpha )) - r );
540  }
541  std::auto_ptr<TGeoShape> box( new TGeoBBox( name.c_str(), boxX/cm, boxZ/cm, boxY/cm ));
542 
543  TGeoTranslation trans( xBox/cm, 0., 0.);
544 
545  TGeoSubtraction* sub = new TGeoSubtraction( tubs.release(),
546  box.release(),
547  0, new TGeoCombiTrans( trans, rot ));
548 
549  rSolid = new TGeoCompositeShape( iName.c_str(),
550  sub );
551  break;
552  }
553  case ddunion:
554  {
555  DDBooleanSolid boolSolid(iSolid);
556  if(!boolSolid) {
557  throw cms::Exception("GeomConvert") <<"conversion to DDBooleanSolid failed";
558  }
559 
560  std::auto_ptr<TGeoShape> left( createShape(boolSolid.solidA().name().fullname(),
561  boolSolid.solidA()) );
562  std::auto_ptr<TGeoShape> right( createShape(boolSolid.solidB().name().fullname(),
563  boolSolid.solidB()));
564  //DEBUGGING
565  //break;
566  if( 0 != left.get() &&
567  0 != right.get() ) {
568  TGeoUnion* boolS = new TGeoUnion(left.release(),right.release(),
569  0,
570  createPlacement(
571  *(boolSolid.rotation().matrix()),
572  boolSolid.translation()));
573  rSolid = new TGeoCompositeShape(iName.c_str(),
574  boolS);
575  }
576  break;
577  }
578  case ddintersection:
579  {
580  DDBooleanSolid boolSolid(iSolid);
581  if(!boolSolid) {
582  throw cms::Exception("GeomConvert") <<"conversion to DDBooleanSolid failed";
583  }
584 
585  std::auto_ptr<TGeoShape> left( createShape(boolSolid.solidA().name().fullname(),
586  boolSolid.solidA()) );
587  std::auto_ptr<TGeoShape> right( createShape(boolSolid.solidB().name().fullname(),
588  boolSolid.solidB()));
589  if( 0 != left.get() &&
590  0 != right.get() ) {
591  TGeoIntersection* boolS = new TGeoIntersection(left.release(),
592  right.release(),
593  0,
594  createPlacement(
595  *(boolSolid.rotation().matrix()),
596  boolSolid.translation()));
597  rSolid = new TGeoCompositeShape(iName.c_str(),
598  boolS);
599  }
600  break;
601  }
602  default:
603  break;
604  }
605  nameToShape_[iName]=rSolid;
606  }
607  if (rSolid == 0)
608  {
609  std::cerr <<"COULD NOT MAKE "<<iName<<" of a shape "<<iSolid<<std::endl;
610  }
611 
612  LogDebug("TGeoMgrFromDdd::createShape") << "solid " << iName << " has been created.";
613 
614  return rSolid;
615 }
616 
617 TGeoVolume*
619  const DDSolid& iSolid,
620  const DDMaterial& iMaterial)
621 {
622  TGeoVolume* v=nameToVolume_[iName];
623  if (v == 0)
624  {
625  TGeoShape* solid = createShape(iSolid.name().fullname(),
626  iSolid);
627  std::string mat_name = iMaterial.name().fullname();
628  TGeoMedium *geo_med = nameToMedium_[mat_name];
629  if (geo_med == 0)
630  {
631  TGeoMaterial *geo_mat = createMaterial(iMaterial);
632  geo_med = new TGeoMedium(mat_name.c_str(), 0, geo_mat);
633  nameToMedium_[mat_name] = geo_med;
634  }
635  if (solid)
636  {
637  v = new TGeoVolume(iName.c_str(),
638  solid,
639  geo_med);
640  }
641  nameToVolume_[iName] = v;
642  }
643  return v;
644 }
645 
646 TGeoMaterial*
648 {
649  std::string mat_name = iMaterial.name().fullname();
650  TGeoMaterial *mat = nameToMaterial_[mat_name];
651 
652  if (mat == 0)
653  {
654  if (iMaterial.noOfConstituents() > 0)
655  {
656  TGeoMixture *mix = new TGeoMixture(mat_name.c_str(),
657  iMaterial.noOfConstituents(),
658  iMaterial.density()*cm3/g);
659  for (int i = 0; i < iMaterial.noOfConstituents(); ++i)
660  {
661  mix->AddElement(createMaterial(iMaterial.constituent(i).first),
662  iMaterial.constituent(i).second);
663  }
664  mat = mix;
665  }
666  else
667  {
668  mat = new TGeoMaterial(mat_name.c_str(),
669  iMaterial.a()*mole/g, iMaterial.z(),
670  iMaterial.density()*cm3/g);
671  }
672  nameToMaterial_[mat_name] = mat;
673  }
674 
675  return mat;
676 }
677 
678 //
679 // const member functions
680 //
681 
682 //
683 // static member functions
684 //
#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)
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
#define abs(x)
Definition: mlp_lapack.h:159
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
DDRotation rotation(void) const
Definition: DDSolid.cc:535
graph< DDLogicalPart, DDPosData * >::value_type value_type
Definition: graphwalker.h:38
static const char * name(DDSolidShape s)
Definition: DDSolidShapes.h:21
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
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()
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