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.9 2010/12/13 15:20:34 yana Exp $
12 //
13 
15 
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*
221 TGeoMgrFromDdd::createShape(const std::string& iName,
222  const DDSolid& iSolid)
223 {
224  TGeoShape* rSolid= nameToShape_[iName];
225  if (rSolid == 0)
226  {
227  const std::vector<double>& params = iSolid.parameters();
228  // std::cout <<" shape "<<iSolid<<std::endl;
229  switch(iSolid.shape())
230  {
231  case ddbox:
232  rSolid = new TGeoBBox(
233  iName.c_str(),
234  params[0]/cm,
235  params[1]/cm,
236  params[2]/cm);
237  break;
238  case ddcons:
239  rSolid = new TGeoConeSeg(
240  iName.c_str(),
241  params[0]/cm,
242  params[1]/cm,
243  params[2]/cm,
244  params[3]/cm,
245  params[4]/cm,
246  params[5]/deg,
247  params[6]/deg+params[5]/deg
248  );
249  break;
250  case ddtubs:
251  //Order in params is zhalf,rIn,rOut,startPhi,deltaPhi
252  rSolid= new TGeoTubeSeg(
253  iName.c_str(),
254  params[1]/cm,
255  params[2]/cm,
256  params[0]/cm,
257  params[3]/deg,
258  params[3]/deg + params[4]/deg);
259  break;
260  case ddtrap:
261  rSolid =new TGeoTrap(
262  iName.c_str(),
263  params[0]/cm, //dz
264  params[1]/deg, //theta
265  params[2]/deg, //phi
266  params[3]/cm, //dy1
267  params[4]/cm, //dx1
268  params[5]/cm, //dx2
269  params[6]/deg, //alpha1
270  params[7]/cm, //dy2
271  params[8]/cm, //dx3
272  params[9]/cm, //dx4
273  params[10]/deg);//alpha2
274  break;
275  case ddpolycone_rrz:
276  rSolid = new TGeoPcon(
277  iName.c_str(),
278  params[0]/deg,
279  params[1]/deg,
280  (params.size()-2)/3) ;
281  {
282  std::vector<double> temp(params.size()+1);
283  temp.reserve(params.size()+1);
284  temp[0]=params[0]/deg;
285  temp[1]=params[1]/deg;
286  temp[2]=(params.size()-2)/3;
287  std::copy(params.begin()+2,params.end(),temp.begin()+3);
288  for(std::vector<double>::iterator it=temp.begin()+3;
289  it != temp.end();
290  ++it) {
291  *it /=cm;
292  }
293  rSolid->SetDimensions(&(*(temp.begin())));
294  }
295  break;
296  case ddpolyhedra_rrz:
297  rSolid = new TGeoPgon(
298  iName.c_str(),
299  params[1]/deg,
300  params[2]/deg,
301  static_cast<int>(params[0]),
302  (params.size()-3)/3);
303  {
304  std::vector<double> temp(params.size()+1);
305  temp[0]=params[1]/deg;
306  temp[1]=params[2]/deg;
307  temp[2]=params[0];
308  temp[3]=(params.size()-3)/3;
309  std::copy(params.begin()+3,params.end(),temp.begin()+4);
310  for(std::vector<double>::iterator it=temp.begin()+4;
311  it != temp.end();
312  ++it) {
313  *it /=cm;
314  }
315  rSolid->SetDimensions(&(*(temp.begin())));
316  }
317  break;
318  case ddpseudotrap:
319  {
320  //implementation taken from SimG4Core/Geometry/src/DDG4SolidConverter.cc
321  static DDRotationMatrix s_rot( ROOT::Math::RotationX( 90.*deg ));
322  DDPseudoTrap pt( iSolid );
323 
324  double r = pt.radius();
325  bool atMinusZ = pt.atMinusZ();
326  double x = 0;
327  double h = 0;
328  bool intersec = false; // union or intersection solid
329 
330  if( atMinusZ )
331  {
332  x = pt.x1(); // tubs radius
333  }
334  else
335  {
336  x = pt.x2(); // tubs radius
337  }
338  double openingAngle = 2. * asin( x / abs( r ))/deg;
339  double displacement = 0;
340  double startPhi = 0;
341  /* calculate the displacement of the tubs w.r.t. to the trap,
342  determine the opening angle of the tubs */
343  double delta = sqrt( r * r - x * x );
344 
345  if( r < 0 && abs( r ) >= x )
346  {
347  intersec = true; // intersection solid
348  h = pt.y1() < pt.y2() ? pt.y2() : pt.y1(); // tubs half height
349  h += h/20.; // enlarge a bit - for subtraction solid
350  if( atMinusZ )
351  {
352  displacement = - pt.halfZ() - delta;
353  startPhi = 270. - openingAngle/2.;
354  }
355  else
356  {
357  displacement = pt.halfZ() + delta;
358  startPhi = 90. - openingAngle/2.;
359  }
360  }
361  else if( r > 0 && abs( r ) >= x )
362  {
363  if( atMinusZ )
364  {
365  displacement = - pt.halfZ() + delta;
366  startPhi = 270. - openingAngle/2.;
367  h = pt.y1();
368  }
369  else
370  {
371  displacement = pt.halfZ() - delta;
372  startPhi = 90. - openingAngle/2.;
373  h = pt.y2();
374  }
375  }
376  else
377  {
378  throw DDException( "Check parameters of the PseudoTrap! name=" + pt.name().name());
379  }
380 
381  std::auto_ptr<TGeoShape> trap( new TGeoTrd2( pt.name().name().c_str(),
382  pt.x1()/cm,
383  pt.x2()/cm,
384  pt.y1()/cm,
385  pt.y2()/cm,
386  pt.halfZ()/cm ));
387 
388  std::auto_ptr<TGeoShape> tubs( new TGeoTubeSeg( pt.name().name().c_str(),
389  0.,
390  r/cm,
391  h/cm,
392  startPhi,
393  startPhi + openingAngle ));
394  if( intersec )
395  {
396  TGeoSubtraction* sub = new TGeoSubtraction( trap.release(),
397  tubs.release(),
398  0,
399  createPlacement( s_rot,
400  DDTranslation( 0.,
401  0.,
402  displacement )));
403  rSolid = new TGeoCompositeShape( iName.c_str(),
404  sub );
405  }
406  else
407  {
408  std::auto_ptr<TGeoShape> box( new TGeoBBox( 1.1*x/cm, 1.1*h/cm, sqrt(r*r-x*x)/cm ));
409 
410  TGeoSubtraction* sub = new TGeoSubtraction( tubs.release(),
411  box.release(),
412  0,
413  createPlacement( s_rot,
414  DDTranslation( 0.,
415  0.,
416  0. )));
417 
418  std::auto_ptr<TGeoShape> tubicCap( new TGeoCompositeShape( iName.c_str(), sub ));
419 
420  TGeoUnion* boolS = new TGeoUnion( trap.release(),
421  tubicCap.release(),
422  0,
423  createPlacement( s_rot,
424  DDTranslation( 0.,
425  0.,
426  displacement )));
427 
428  rSolid = new TGeoCompositeShape( iName.c_str(),
429  boolS );
430  }
431 
432  break;
433  }
434  case ddtorus:
435  {
436  DDTorus solid( iSolid );
437  rSolid = new TGeoTorus( iName.c_str(),
438  solid.rTorus()/cm,
439  solid.rMin()/cm,
440  solid.rMax()/cm,
441  solid.startPhi()/deg,
442  solid.deltaPhi()/deg);
443  break;
444  }
445  case ddsubtraction:
446  {
447  DDBooleanSolid boolSolid(iSolid);
448  if(!boolSolid) {
449  throw cms::Exception("GeomConvert") <<"conversion to DDBooleanSolid failed";
450  }
451 
452  std::auto_ptr<TGeoShape> left( createShape(boolSolid.solidA().name().fullname(),
453  boolSolid.solidA()) );
454  std::auto_ptr<TGeoShape> right( createShape(boolSolid.solidB().name().fullname(),
455  boolSolid.solidB()));
456  if( 0 != left.get() &&
457  0 != right.get() ) {
458  TGeoSubtraction* sub = new TGeoSubtraction(left.release(),right.release(),
459  0,
460  createPlacement(
461  *(boolSolid.rotation().matrix()),
462  boolSolid.translation()));
463  rSolid = new TGeoCompositeShape(iName.c_str(),
464  sub);
465  }
466  break;
467  }
468  case ddtrunctubs:
469  {
470  DDTruncTubs tt( iSolid );
471  if( !tt )
472  {
473  throw cms::Exception( "GeomConvert" ) << "conversion to DDTruncTubs failed";
474  }
475  double rIn( tt.rIn());
476  double rOut( tt.rOut());
477  double zHalf( tt.zHalf());
478  double startPhi( tt.startPhi());
479  double deltaPhi( tt.deltaPhi());
480  double cutAtStart( tt.cutAtStart());
481  double cutAtDelta( tt.cutAtDelta());
482  bool cutInside( bool( tt.cutInside()));
483  std::string name = tt.name().name();
484 
485  // check the parameters
486  if( rIn <= 0 || rOut <=0 || cutAtStart <=0 || cutAtDelta <= 0 )
487  {
488  std::string s = "TruncTubs " + std::string( tt.name().fullname()) + ": 0 <= rIn,cutAtStart,rOut,cutAtDelta,rOut violated!";
489  throw DDException( s );
490  }
491  if( rIn >= rOut )
492  {
493  std::string s = "TruncTubs " + std::string( tt.name().fullname()) + ": rIn<rOut violated!";
494  throw DDException(s);
495  }
496  if( startPhi != 0. )
497  {
498  std::string s= "TruncTubs " + std::string( tt.name().fullname()) + ": startPhi != 0 not supported!";
499  throw DDException( s );
500  }
501 
502  startPhi = 0.;
503  double r( cutAtStart );
504  double R( cutAtDelta );
505 
506  // Note: startPhi is always 0.0
507  std::auto_ptr<TGeoShape> tubs( new TGeoTubeSeg( name.c_str(), rIn/cm, rOut/cm, zHalf/cm, startPhi, deltaPhi/deg ));
508 
509  double boxX( rOut ), boxY( rOut ); // exaggerate dimensions - does not matter, it's subtracted!
510 
511  // width of the box > width of the tubs
512  double boxZ( 1.1 * zHalf );
513 
514  // angle of the box w.r.t. tubs
515  double cath = r - R * cos( deltaPhi );
516  double hypo = sqrt( r * r + R * R - 2. * r * R * cos( deltaPhi ));
517  double cos_alpha = cath / hypo;
518  double alpha = -acos( cos_alpha );
519 
520  // rotationmatrix of box w.r.t. tubs
521  TGeoRotation rot;
522  rot.RotateX( 90 );
523  rot.RotateZ( alpha/deg );
524 
525  // center point of the box
526  double xBox;
527  if( !cutInside )
528  {
529  xBox = r + boxX / sin( fabs( alpha ));
530  }
531  else
532  {
533  xBox = - ( boxX / sin( fabs( alpha )) - r );
534  }
535  std::auto_ptr<TGeoShape> box( new TGeoBBox( name.c_str(), boxX/cm, boxZ/cm, boxY/cm ));
536 
537  TGeoTranslation trans( xBox/cm, 0., 0.);
538 
539  TGeoSubtraction* sub = new TGeoSubtraction( tubs.release(),
540  box.release(),
541  0, new TGeoCombiTrans( trans, rot ));
542 
543  rSolid = new TGeoCompositeShape( iName.c_str(),
544  sub );
545  break;
546  }
547  case ddunion:
548  {
549  DDBooleanSolid boolSolid(iSolid);
550  if(!boolSolid) {
551  throw cms::Exception("GeomConvert") <<"conversion to DDBooleanSolid failed";
552  }
553 
554  std::auto_ptr<TGeoShape> left( createShape(boolSolid.solidA().name().fullname(),
555  boolSolid.solidA()) );
556  std::auto_ptr<TGeoShape> right( createShape(boolSolid.solidB().name().fullname(),
557  boolSolid.solidB()));
558  //DEBUGGING
559  //break;
560  if( 0 != left.get() &&
561  0 != right.get() ) {
562  TGeoUnion* boolS = new TGeoUnion(left.release(),right.release(),
563  0,
564  createPlacement(
565  *(boolSolid.rotation().matrix()),
566  boolSolid.translation()));
567  rSolid = new TGeoCompositeShape(iName.c_str(),
568  boolS);
569  }
570  break;
571  }
572  case ddintersection:
573  {
574  DDBooleanSolid boolSolid(iSolid);
575  if(!boolSolid) {
576  throw cms::Exception("GeomConvert") <<"conversion to DDBooleanSolid failed";
577  }
578 
579  std::auto_ptr<TGeoShape> left( createShape(boolSolid.solidA().name().fullname(),
580  boolSolid.solidA()) );
581  std::auto_ptr<TGeoShape> right( createShape(boolSolid.solidB().name().fullname(),
582  boolSolid.solidB()));
583  if( 0 != left.get() &&
584  0 != right.get() ) {
585  TGeoIntersection* boolS = new TGeoIntersection(left.release(),
586  right.release(),
587  0,
588  createPlacement(
589  *(boolSolid.rotation().matrix()),
590  boolSolid.translation()));
591  rSolid = new TGeoCompositeShape(iName.c_str(),
592  boolS);
593  }
594  break;
595  }
596  default:
597  break;
598  }
599  nameToShape_[iName]=rSolid;
600  }
601  if (rSolid == 0)
602  {
603  std::cerr <<"COULD NOT MAKE "<<iName<<" of a shape "<<iSolid<<std::endl;
604  }
605  return rSolid;
606 }
607 
608 TGeoVolume*
609 TGeoMgrFromDdd::createVolume(const std::string& iName,
610  const DDSolid& iSolid,
611  const DDMaterial& iMaterial)
612 {
613  TGeoVolume* v=nameToVolume_[iName];
614  if (v == 0)
615  {
616  TGeoShape* solid = createShape(iSolid.name().fullname(),
617  iSolid);
618  std::string mat_name = iMaterial.name().fullname();
619  TGeoMedium *geo_med = nameToMedium_[mat_name];
620  if (geo_med == 0)
621  {
622  TGeoMaterial *geo_mat = createMaterial(iMaterial);
623  geo_med = new TGeoMedium(mat_name.c_str(), 0, geo_mat);
624  nameToMedium_[mat_name] = geo_med;
625  }
626  if (solid)
627  {
628  v = new TGeoVolume(iName.c_str(),
629  solid,
630  geo_med);
631  }
632  nameToVolume_[iName] = v;
633  }
634  return v;
635 }
636 
637 TGeoMaterial*
639 {
640  std::string mat_name = iMaterial.name().fullname();
641  TGeoMaterial *mat = nameToMaterial_[mat_name];
642 
643  if (mat == 0)
644  {
645  if (iMaterial.noOfConstituents() > 0)
646  {
647  TGeoMixture *mix = new TGeoMixture(mat_name.c_str(),
648  iMaterial.noOfConstituents(),
649  iMaterial.density()*cm3/g);
650  for (int i = 0; i < iMaterial.noOfConstituents(); ++i)
651  {
652  mix->AddElement(createMaterial(iMaterial.constituent(i).first),
653  iMaterial.constituent(i).second);
654  }
655  mat = mix;
656  }
657  else
658  {
659  mat = new TGeoMaterial(mat_name.c_str(),
660  iMaterial.a()*mole/g, iMaterial.z(),
661  iMaterial.density()*cm3/g);
662  }
663  nameToMaterial_[mat_name] = mat;
664  }
665 
666  return mat;
667 }
668 
669 //
670 // const member functions
671 //
672 
673 //
674 // static member functions
675 //
dbl * delta
Definition: mlp_gen.cc:36
const std::vector< double > & parameters() const
Don&#39;t use (only meant to be used by DDbox(), DDtub(), ...)
Definition: DDSolid.cc:153
double a() const
returns the atomic mass
Definition: DDMaterial.cc:103
int i
Definition: DBlmapReader.cc:9
float alpha
Definition: AMPTWrapper.h:95
TGeoMaterial * createMaterial(const DDMaterial &iMaterial)
A truncated tube section.
Definition: DDSolid.h:164
double x2() const
half length along x on +z
Definition: DDSolid.cc:235
const N & name() const
Definition: DDBase.h:88
double deltaPhi() const
angular span of the tube-section
Definition: DDSolid.cc:212
double rTorus() const
Definition: DDSolid.cc:490
double rIn() const
inner radius
Definition: DDSolid.cc:206
DDSolidShape shape() const
The type of the solid.
Definition: DDSolid.cc:147
DDMaterial is used to define and access material information.
Definition: DDMaterial.h:45
double deltaPhi(float phi1, float phi2)
Definition: VectorUtil.h:30
double startPhi() const
angular start of the tube-section
Definition: DDSolid.cc:210
double rMin() const
Definition: DDSolid.cc:486
Sin< T >::type sin(const T &t)
Definition: Sin.h:22
An exception for DDD errors.
Definition: DDException.h:23
double zHalf() const
half of the z-Axis
Definition: DDSolid.cc:204
#define abs(x)
Definition: mlp_lapack.h:159
list elements
Definition: asciidump.py:414
DDSolid solidB() const
Definition: DDSolid.cc:553
double rMax() const
Definition: DDSolid.cc:488
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:42
double cutAtStart() const
truncation at begin of the tube-section
Definition: DDSolid.cc:214
ROOT::Math::DisplacementVector3D< ROOT::Math::Cartesian3D< double > > DDTranslation
Definition: DDTranslation.h:7
double y1() const
half length along y on -z
Definition: DDSolid.cc:237
double radius() const
radius of the cut-out (neg.) or rounding (pos.)
Definition: DDSolid.cc:241
double z() const
retruns the atomic number
Definition: DDMaterial.cc:109
DDSolid solidA() const
Definition: DDSolid.cc:548
graph< DDLogicalPart, DDPosData * >::value_type value_type
Definition: graphwalker.h:38
static const char * name(DDSolidShape s)
Definition: DDSolidShapes.h:20
TGeoVolume * createVolume(const std::string &iName, const DDSolid &iSolid, const DDMaterial &iMaterial)
double halfZ() const
half of the z-Axis
Definition: DDSolid.cc:231
T sqrt(T t)
Definition: SSEVec.h:28
double cutAtDelta() const
truncation at end of the tube-section
Definition: DDSolid.cc:216
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:95
tuple pset
Definition: CrabTask.py:85
ReturnType produce(const DisplayGeomRecord &)
TGeoShape * createShape(const std::string &iName, const DDSolid &iSolid)
TGeoMgrFromDdd(const edm::ParameterSet &)
double x1() const
half length along x on -z
Definition: DDSolid.cc:233
double deltaPhi() const
Definition: DDSolid.cc:494
double startPhi() const
Definition: DDSolid.cc:492
std::map< std::string, TGeoMaterial * > nameToMaterial_
double density() const
returns the density
Definition: DDMaterial.cc:115
bool cutInside() const
true, if truncation is on the inner side of the tube-section
Definition: DDSolid.cc:218
std::map< std::string, TGeoVolume * > nameToVolume_
int noOfConstituents() const
returns the number of compound materials or 0 for elementary materials
Definition: DDMaterial.cc:89
boost::shared_ptr< TGeoManager > ReturnType
std::map< std::string, TGeoMedium * > nameToMedium_
double rOut() const
outer radius
Definition: DDSolid.cc:208
double y2() const
half length along y on +z
Definition: DDSolid.cc:239
DDRotation rotation() const
Definition: DDSolid.cc:538
tuple cout
Definition: gather_cfg.py:41
string s
Definition: asciidump.py:422
virtual ~TGeoMgrFromDdd()
DDRotationMatrix * matrix()
Definition: DDTransform.h:94
The Signals That Services Can Subscribe To This is based on ActivityRegistry h
Helper function to determine trigger accepts.
Definition: Activities.doc:4
DDTranslation translation() const
Definition: DDSolid.cc:543
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
mathSSE::Vec4< T > v
bool atMinusZ() const
true, if cut-out or rounding is on the -z side
Definition: DDSolid.cc:243