CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
FWTGeoRecoGeometryESProducer.cc
Go to the documentation of this file.
4 
26 
27 #include "TGeoManager.h"
28 #include "TGeoArb8.h"
29 #include "TGeoMatrix.h"
30 #include "TFile.h"
31 #include "TTree.h"
32 #include "TError.h"
33 
34 # define ADD_PIXEL_TOPOLOGY( rawid, detUnit ) \
35  const PixelGeomDetUnit* det = dynamic_cast<const PixelGeomDetUnit*>( detUnit ); \
36  if( det ) \
37  { \
38  const PixelTopology& topo = det->specificTopology(); \
39  m_fwGeometry->idToName[rawid].topology[0] = topo.nrows(); \
40  m_fwGeometry->idToName[rawid].topology[1] = topo.ncolumns(); \
41  } \
42 
43 # define ADD_SISTRIP_TOPOLOGY( rawid, detUnit ) \
44  const StripGeomDetUnit* det = dynamic_cast<const StripGeomDetUnit*>( detUnit ); \
45  if( det ) \
46  { \
47  const StripTopology* topo = dynamic_cast<const StripTopology*>( &det->specificTopology()); \
48  m_fwGeometry->idToName[rawid].topology[0] = topo->nstrips(); \
49  m_fwGeometry->idToName[rawid].topology[1] = topo->stripLength(); \
50  if( const RadialStripTopology* rtop = dynamic_cast<const RadialStripTopology*>( topo )) \
51  { \
52  m_fwGeometry->idToName[rawid].topology[2] = rtop->phiPitch(); \
53  } \
54  else if( dynamic_cast<const RectangularStripTopology*>( topo )) \
55  { \
56  m_fwGeometry->idToName[rawid].topology[2] = topo->pitch(); \
57  } \
58  else if( dynamic_cast<const TrapezoidalStripTopology*>( topo )) \
59  { \
60  m_fwGeometry->idToName[rawid].topology[2] = topo->pitch(); \
61  } \
62 } \
63 
65 {
66  setWhatProduced( this );
67 }
68 
70 {}
71 
72 namespace
73 {
75  TGeoCombiTrans* createPlacement( const GeomDet *det )
76  {
77  // Position of the DetUnit's center
78  float posx = det->surface().position().x();
79  float posy = det->surface().position().y();
80  float posz = det->surface().position().z();
81 
82  TGeoTranslation trans( posx, posy, posz );
83 
84  // Add the coeff of the rotation matrix
85  // with a projection on the basis vectors
86  TkRotation<float> detRot = det->surface().rotation();
87 
88  TGeoRotation rotation;
89  const Double_t matrix[9] = { detRot.xx(), detRot.yx(), detRot.zx(),
90  detRot.xy(), detRot.yy(), detRot.zy(),
91  detRot.xz(), detRot.yz(), detRot.zz()
92  };
93  rotation.SetMatrix( matrix );
94 
95  return new TGeoCombiTrans( trans, rotation );
96  }
97 }
98 
99 boost::shared_ptr<FWTGeoRecoGeometry>
101 {
102  using namespace edm;
103 
104  m_fwGeometry = boost::shared_ptr<FWTGeoRecoGeometry>( new FWTGeoRecoGeometry );
105 
107 
108  DetId detId( DetId::Tracker, 0 );
109  m_trackerGeom = (const TrackerGeometry*) m_geomRecord->slaveGeometry( detId );
110 
111  record.getRecord<CaloGeometryRecord>().get( m_caloGeom );
112 
113  TGeoManager *geom = new TGeoManager( "cmsGeo", "CMS Detector" );
114  // NOTE: The default constructor does not create an identity matrix
115  if( 0 == gGeoIdentity )
116  {
117  gGeoIdentity = new TGeoIdentity( "Identity" );
118  }
119 
120  m_fwGeometry->manager( geom );
121 
122  // Default material is Vacuum
123  TGeoMaterial *matVacuum = new TGeoMaterial( "Vacuum", 0 ,0 ,0 );
124  // so is default medium
125  TGeoMedium *vacuum = new TGeoMedium( "Vacuum", 1, matVacuum );
126  TGeoVolume *top = geom->MakeBox( "CMS", vacuum, 270., 270., 120. );
127 
128  if( 0 == top )
129  {
130  return boost::shared_ptr<FWTGeoRecoGeometry>();
131  }
132  geom->SetTopVolume( top );
133  // ROOT chokes unless colors are assigned
134  top->SetVisibility( kFALSE );
135  top->SetLineColor( kBlue );
136 
139  addTIBGeometry( top );
140  addTIDGeometry( top );
141  addTOBGeometry( top );
142  addTECGeometry( top );
143  addDTGeometry( top );
144  addCSCGeometry( top );
145  addRPCGeometry( top );
146 
147  addCaloGeometry();
148 
149  geom->CloseGeometry();
150 
151  m_nameToShape.clear();
152  m_nameToVolume.clear();
153  m_nameToMaterial.clear();
154  m_nameToMedium.clear();
155 
156  return m_fwGeometry;
157 }
158 
160 TGeoShape*
162 {
163  TGeoShape* shape = 0;
164 
165  // Trapezoidal
166  const Bounds *b = &((det->surface ()).bounds ());
167  const TrapezoidalPlaneBounds *b2 = dynamic_cast<const TrapezoidalPlaneBounds *> (b);
168  if( b2 )
169  {
170  std::array< const float, 4 > const & par = b2->parameters ();
171 
172  // These parameters are half-lengths, as in CMSIM/GEANT3
173  float hBottomEdge = par [0];
174  float hTopEdge = par [1];
175  float thickness = par [2];
176  float apothem = par [3];
177 
178  std::stringstream s;
179  s << "T_"
180  << hBottomEdge << "_"
181  << hTopEdge << "_"
182  << thickness << "_"
183  << apothem;
184  std::string name = s.str();
185 
186  // Do not create identical shape,
187  // if one already exists
188  shape = m_nameToShape[name];
189  if( 0 == shape )
190  {
191  shape = new TGeoTrap(
192  name.c_str(),
193  thickness, //dz
194  0, //theta
195  0, //phi
196  apothem, //dy1
197  hBottomEdge,//dx1
198  hTopEdge, //dx2
199  0, //alpha1
200  apothem, //dy2
201  hBottomEdge,//dx3
202  hTopEdge, //dx4
203  0); //alpha2
204 
205  m_nameToShape[name] = shape;
206  }
207  }
208  if( dynamic_cast<const RectangularPlaneBounds *> (b) != 0 )
209  {
210  // Rectangular
211  float length = det->surface().bounds().length();
212  float width = det->surface().bounds ().width();
213  float thickness = det->surface().bounds().thickness();
214 
215  std::stringstream s;
216  s << "R_"
217  << width << "_"
218  << length << "_"
219  << thickness;
220  std::string name = s.str();
221 
222  // Do not create identical shape,
223  // if one already exists
224  shape = m_nameToShape[name];
225  if( 0 == shape )
226  {
227  shape = new TGeoBBox( name.c_str(), width / 2., length / 2., thickness / 2. ); // dx, dy, dz
228 
229  m_nameToShape[name] = shape;
230  }
231  }
232 
233  return shape;
234 }
235 
237 TGeoVolume*
239 {
240  TGeoVolume* volume = m_nameToVolume[name];
241  if( 0 == volume )
242  {
243  TGeoShape* solid = createShape( det );
244  TGeoMedium* medium = m_nameToMedium[material];
245  if( 0 == medium )
246  {
247  medium = new TGeoMedium( material.c_str(), 0, createMaterial( material ));
248  m_nameToMedium[material] = medium;
249  }
250  if( solid )
251  {
252  volume = new TGeoVolume( name.c_str(),
253  solid,
254  medium );
255  m_nameToVolume[name] = volume;
256  }
257  }
258 
259  return volume;
260 }
261 
263 TGeoMaterial*
265 {
266  TGeoMaterial *material = m_nameToMaterial[name];
267 
268  if( material == 0 )
269  {
270  // FIXME: Do we need to set real parameters of the material?
271  material = new TGeoMaterial( name.c_str(),
272  0, 0, 0 );
273  m_nameToMaterial[name] = material;
274  }
275 
276  return material;
277 }
278 
279 const std::string
280 FWTGeoRecoGeometryESProducer::path( TGeoVolume* volume, const std::string& name, int copy )
281 {
282  std::stringstream outs;
283  outs << volume->GetName() << "_" << volume->GetNumber() << "/"
284  << name << "_" << copy;
285 
286  return outs.str();
287 }
288 
289 void
291 {
292  TGeoVolume *assembly = new TGeoVolumeAssembly( iName.c_str());
293  if(! m_geomRecord->slaveGeometry( CSCDetId()))
294  throw cms::Exception( "FatalError" ) << "Cannnot find CSCGeometry\n";
295 
296  auto const & cscGeom = m_geomRecord->slaveGeometry( CSCDetId())->dets();
297  for( auto it = cscGeom.begin(), itEnd = cscGeom.end(); it != itEnd; ++it )
298  {
299  if( auto chamber = dynamic_cast<const CSCChamber*>(*it))
300  {
301  unsigned int rawid = chamber->geographicalId();
302  std::stringstream s;
303  s << rawid;
304  std::string name = s.str();
305 
306  TGeoVolume* child = createVolume( name, chamber );
307  assembly->AddNode( child, copy, createPlacement( chamber ));
308  child->SetLineColor( kBlue );
309 
310  std::stringstream p;
311  p << path( top, iName, copy ) << "/" << name << "_" << copy;
312  m_fwGeometry->idToName.insert( std::pair<unsigned int, FWTGeoRecoGeometry::Info>( rawid, FWTGeoRecoGeometry::Info( p.str())));
313  }
314  else if( auto * layer = dynamic_cast<const CSCLayer*>(*it))
315  {
316  unsigned int rawid = layer->geographicalId();
317  std::stringstream s;
318  s << rawid;
319  std::string name = s.str();
320 
321  TGeoVolume* child = createVolume( name, layer );
322  assembly->AddNode( child, copy, createPlacement( layer ));
323  child->SetLineColor( kBlue );
324 
325  std::stringstream p;
326  p << path( top, iName, copy ) << "/" << name << "_" << copy;
327  m_fwGeometry->idToName.insert( std::pair<unsigned int, FWTGeoRecoGeometry::Info>( rawid, FWTGeoRecoGeometry::Info( p.str())));
328 
329  const CSCStripTopology* stripTopology = layer->geometry()->topology();
330  m_fwGeometry->idToName[rawid].topology[0] = stripTopology->yAxisOrientation();
331  m_fwGeometry->idToName[rawid].topology[1] = stripTopology->centreToIntersection();
332  m_fwGeometry->idToName[rawid].topology[2] = stripTopology->yCentreOfStripPlane();
333  m_fwGeometry->idToName[rawid].topology[3] = stripTopology->phiOfOneEdge();
334  m_fwGeometry->idToName[rawid].topology[4] = stripTopology->stripOffset();
335  m_fwGeometry->idToName[rawid].topology[5] = stripTopology->angularWidth();
336 
337  const CSCWireTopology* wireTopology = layer->geometry()->wireTopology();
338  m_fwGeometry->idToName[rawid].topology[6] = wireTopology->wireSpacing();
339  m_fwGeometry->idToName[rawid].topology[7] = wireTopology->wireAngle();
340  }
341  }
342 
343  top->AddNode( assembly, copy );
344 }
345 
346 void
348 {
349  //
350  // DT chambers geometry
351  //
352  TGeoVolume *assembly = new TGeoVolumeAssembly( iName.c_str());
353  auto const & dtChamberGeom = m_geomRecord->slaveGeometry( DTChamberId())->dets();
354  for( auto it = dtChamberGeom.begin(),
355  end = dtChamberGeom.end();
356  it != end; ++it )
357  {
358  if( auto chamber = dynamic_cast< const DTChamber *>(*it))
359  {
360  unsigned int rawid = chamber->geographicalId().rawId();
361  std::stringstream s;
362  s << rawid;
363  std::string name = s.str();
364 
365  TGeoVolume* child = createVolume( name, chamber );
366  assembly->AddNode( child, copy, createPlacement( chamber ));
367  child->SetLineColor( kRed );
368 
369  std::stringstream p;
370  p << path( top, iName, copy ) << "/" << name << "_" << copy;
371  m_fwGeometry->idToName.insert( std::pair<unsigned int, FWTGeoRecoGeometry::Info>( rawid, FWTGeoRecoGeometry::Info( p.str())));
372  }
373  }
374  top->AddNode( assembly, copy );
375 
376  // Fill in DT super layer parameters
377  auto const & dtSuperLayerGeom = m_geomRecord->slaveGeometry( DTLayerId())->dets();
378  for( auto it = dtSuperLayerGeom.begin(),
379  end = dtSuperLayerGeom.end();
380  it != end; ++it )
381  {
382  if( auto * superlayer = dynamic_cast<const DTSuperLayer*>(*it))
383  {
384  unsigned int rawid = superlayer->id().rawId();
385  std::stringstream s;
386  s << rawid;
387  std::string name = s.str();
388 
389  TGeoVolume* child = createVolume( name, superlayer );
390  assembly->AddNode( child, copy, createPlacement( superlayer ));
391  child->SetLineColor( kBlue );
392 
393  std::stringstream p;
394  p << path( top, iName, copy ) << "/" << name << "_" << copy;
395  m_fwGeometry->idToName.insert( std::pair<unsigned int, FWTGeoRecoGeometry::Info>( rawid, FWTGeoRecoGeometry::Info( p.str())));
396 
397  const BoundPlane& surf = superlayer->surface();
398  // Bounds W/H/L:
399  m_fwGeometry->idToName[rawid].topology[0] = surf.bounds().width();
400  m_fwGeometry->idToName[rawid].topology[1] = surf.bounds().thickness();
401  m_fwGeometry->idToName[rawid].topology[2] = surf.bounds().length();
402  }
403  }
404 
405  // Fill in DT layer parameters
406  auto const & dtLayerGeom = m_geomRecord->slaveGeometry( DTSuperLayerId())->dets();
407  for( auto it = dtLayerGeom.begin(),
408  end = dtLayerGeom.end();
409  it != end; ++it )
410  {
411  if(auto layer = dynamic_cast<const DTLayer*>(*it))
412  {
413  unsigned int rawid = layer->id().rawId();
414  std::stringstream s;
415  s << rawid;
416  std::string name = s.str();
417 
418  TGeoVolume* child = createVolume( name, layer );
419  assembly->AddNode( child, copy, createPlacement( layer ));
420  child->SetLineColor( kBlue );
421 
422  std::stringstream p;
423  p << path( top, iName, copy ) << "/" << name << "_" << copy;
424  m_fwGeometry->idToName.insert( std::pair<unsigned int, FWTGeoRecoGeometry::Info>( rawid, FWTGeoRecoGeometry::Info( p.str())));
425 
426  const DTTopology& topo = layer->specificTopology();
427  const BoundPlane& surf = layer->surface();
428  // Topology W/H/L:
429  m_fwGeometry->idToName[rawid].topology[0] = topo.cellWidth();
430  m_fwGeometry->idToName[rawid].topology[1] = topo.cellHeight();
431  m_fwGeometry->idToName[rawid].topology[2] = topo.cellLenght();
432  m_fwGeometry->idToName[rawid].topology[3] = topo.firstChannel();
433  m_fwGeometry->idToName[rawid].topology[4] = topo.lastChannel();
434  m_fwGeometry->idToName[rawid].topology[5] = topo.channels();
435 
436  // Bounds W/H/L:
437  m_fwGeometry->idToName[rawid].topology[6] = surf.bounds().width();
438  m_fwGeometry->idToName[rawid].topology[7] = surf.bounds().thickness();
439  m_fwGeometry->idToName[rawid].topology[8] = surf.bounds().length();
440  }
441  }
442 }
443 
444 void
446 {
447  //
448  // RPC chambers geometry
449  //
450  TGeoVolume *assembly = new TGeoVolumeAssembly( iName.c_str());
451  DetId detId( DetId::Muon, 3 );
452  const RPCGeometry* rpcGeom = (const RPCGeometry*) m_geomRecord->slaveGeometry( detId );
453  for( auto it = rpcGeom->rolls().begin(),
454  end = rpcGeom->rolls().end();
455  it != end; ++it )
456  {
457  RPCRoll const* roll = (*it);
458  if( roll )
459  {
460  unsigned int rawid = roll->geographicalId().rawId();
461  std::stringstream s;
462  s << rawid;
463  std::string name = s.str();
464 
465  TGeoVolume* child = createVolume( name, roll );
466  assembly->AddNode( child, copy, createPlacement( roll ));
467  child->SetLineColor( kYellow );
468 
469  std::stringstream p;
470  p << path( top, iName, copy ) << "/" << name << "_" << copy;
471  m_fwGeometry->idToName.insert( std::pair<unsigned int, FWTGeoRecoGeometry::Info>( rawid, FWTGeoRecoGeometry::Info( p.str())));
472 
473  const StripTopology& topo = roll->specificTopology();
474  m_fwGeometry->idToName[rawid].topology[0] = roll->nstrips();
475  m_fwGeometry->idToName[rawid].topology[1] = topo.stripLength();
476  m_fwGeometry->idToName[rawid].topology[2] = topo.pitch();
477  }
478  }
479  top->AddNode( assembly, copy );
480 }
481 
482 void
484 {
485  TGeoVolume *assembly = new TGeoVolumeAssembly( iName.c_str());
486  for( TrackerGeometry::DetContainer::const_iterator it = m_trackerGeom->detsPXB().begin(),
487  end = m_trackerGeom->detsPXB().end();
488  it != end; ++it)
489  {
490  DetId detid = ( *it )->geographicalId();
491  unsigned int rawid = detid.rawId();
492 
493  std::stringstream s;
494  s << rawid;
495  std::string name = s.str();
496 
497  TGeoVolume* child = createVolume( name, *it );
498  assembly->AddNode( child, copy, createPlacement( *it ));
499  child->SetLineColor( kGreen );
500 
501  std::stringstream p;
502  p << path( top, iName, copy ) << "/" << name << "_" << copy;
503  m_fwGeometry->idToName.insert( std::pair<unsigned int, FWTGeoRecoGeometry::Info>( rawid, FWTGeoRecoGeometry::Info( p.str())));
504 
505  ADD_PIXEL_TOPOLOGY( rawid, m_trackerGeom->idToDetUnit( detid ));
506  }
507 
508  top->AddNode( assembly, copy );
509 }
510 
511 void
513 {
514  TGeoVolume *assembly = new TGeoVolumeAssembly( iName.c_str());
515  for( TrackerGeometry::DetContainer::const_iterator it = m_trackerGeom->detsPXF().begin(),
516  end = m_trackerGeom->detsPXF().end();
517  it != end; ++it )
518  {
519  DetId detid = ( *it )->geographicalId();
520  unsigned int rawid = detid.rawId();
521 
522  std::stringstream s;
523  s << rawid;
524  std::string name = s.str();
525 
526  TGeoVolume* child = createVolume( name, *it );
527  assembly->AddNode( child, copy, createPlacement( *it ));
528  child->SetLineColor( kGreen );
529 
530  std::stringstream p;
531  p << path( top, iName, copy ) << "/" << name << "_" << copy;
532  m_fwGeometry->idToName.insert( std::pair<unsigned int, FWTGeoRecoGeometry::Info>( rawid, FWTGeoRecoGeometry::Info( p.str())));
533 
534  ADD_PIXEL_TOPOLOGY( rawid, m_trackerGeom->idToDetUnit( detid ));
535  }
536 
537  top->AddNode( assembly, copy );
538 }
539 
540 void
542 {
543  TGeoVolume *assembly = new TGeoVolumeAssembly( iName.c_str());
544  for( TrackerGeometry::DetContainer::const_iterator it = m_trackerGeom->detsTIB().begin(),
545  end = m_trackerGeom->detsTIB().end();
546  it != end; ++it )
547  {
548  DetId detid = ( *it )->geographicalId();
549  unsigned int rawid = detid.rawId();
550  std::stringstream s;
551  s << rawid;
552  std::string name = s.str();
553 
554  TGeoVolume* child = createVolume( name, *it );
555  assembly->AddNode( child, copy, createPlacement( *it ));
556  child->SetLineColor( kGreen );
557 
558  std::stringstream p;
559  p << path( top, iName, copy ) << "/" << name << "_" << copy;
560  m_fwGeometry->idToName.insert( std::pair<unsigned int, FWTGeoRecoGeometry::Info>( rawid, FWTGeoRecoGeometry::Info( p.str())));
561 
562  ADD_SISTRIP_TOPOLOGY( rawid, m_trackerGeom->idToDet( detid ));
563  }
564 
565  top->AddNode( assembly, copy );
566 }
567 
568 void
570 {
571  TGeoVolume *assembly = new TGeoVolumeAssembly( iName.c_str());
572  for( TrackerGeometry::DetContainer::const_iterator it = m_trackerGeom->detsTOB().begin(),
573  end = m_trackerGeom->detsTOB().end();
574  it != end; ++it )
575  {
576  DetId detid = ( *it )->geographicalId();
577  unsigned int rawid = detid.rawId();
578 
579  std::stringstream s;
580  s << rawid;
581  std::string name = s.str();
582 
583  TGeoVolume* child = createVolume( name, *it );
584  assembly->AddNode( child, copy, createPlacement( *it ));
585  child->SetLineColor( kGreen );
586 
587  std::stringstream p;
588  p << path( top, iName, copy ) << "/" << name << "_" << copy;
589  m_fwGeometry->idToName.insert( std::pair<unsigned int, FWTGeoRecoGeometry::Info>( rawid, FWTGeoRecoGeometry::Info( p.str())));
590 
591  ADD_SISTRIP_TOPOLOGY( rawid, m_trackerGeom->idToDet( detid ));
592  }
593 
594  top->AddNode( assembly, copy );
595 }
596 
597 void
599 {
600  TGeoVolume *assembly = new TGeoVolumeAssembly( iName.c_str());
601  for( TrackerGeometry::DetContainer::const_iterator it = m_trackerGeom->detsTID().begin(),
602  end = m_trackerGeom->detsTID().end();
603  it != end; ++it)
604  {
605  DetId detid = ( *it )->geographicalId();
606  unsigned int rawid = detid.rawId();
607 
608  std::stringstream s;
609  s << rawid;
610  std::string name = s.str();
611 
612  TGeoVolume* child = createVolume( name, *it );
613  assembly->AddNode( child, copy, createPlacement( *it ));
614  child->SetLineColor( kGreen );
615 
616  std::stringstream p;
617  p << path( top, iName, copy ) << "/" << name << "_" << copy;
618  m_fwGeometry->idToName.insert( std::pair<unsigned int, FWTGeoRecoGeometry::Info>( rawid, FWTGeoRecoGeometry::Info( p.str())));
619 
620  ADD_SISTRIP_TOPOLOGY( rawid, m_trackerGeom->idToDet( detid ));
621  }
622 
623  top->AddNode( assembly, copy );
624 }
625 
626 void
628 {
629  TGeoVolume *assembly = new TGeoVolumeAssembly( iName.c_str());
630  for( TrackerGeometry::DetContainer::const_iterator it = m_trackerGeom->detsTEC().begin(),
631  end = m_trackerGeom->detsTEC().end();
632  it != end; ++it )
633  {
634  DetId detid = ( *it )->geographicalId();
635  unsigned int rawid = detid.rawId();
636 
637  std::stringstream s;
638  s << rawid;
639  std::string name = s.str();
640 
641  TGeoVolume* child = createVolume( name, *it );
642  assembly->AddNode( child, copy, createPlacement( *it ));
643  child->SetLineColor( kGreen );
644 
645  std::stringstream p;
646  p << path( top, iName, copy ) << "/" << name << "_" << copy;
647  m_fwGeometry->idToName.insert( std::pair<unsigned int, FWTGeoRecoGeometry::Info>( rawid, FWTGeoRecoGeometry::Info( p.str())));
648 
649  ADD_SISTRIP_TOPOLOGY( rawid, m_trackerGeom->idToDet( detid ));
650  }
651 
652  top->AddNode( assembly, copy );
653 }
654 
655 void
657 {
658  std::vector<DetId> vid = m_caloGeom->getValidDetIds(); // Calo
659  for( std::vector<DetId>::const_iterator it = vid.begin(),
660  end = vid.end();
661  it != end; ++it )
662  {
663  const CaloCellGeometry::CornersVec& cor( m_caloGeom->getGeometry( *it )->getCorners());
664  m_fwGeometry->idToName[ it->rawId()].fillPoints( cor.begin(), cor.end());
665  }
666 }
T xx() const
virtual float length() const =0
virtual const std::array< const float, 4 > parameters() const
edm::ESHandle< CaloGeometry > m_caloGeom
JetCorrectorParameters::Record record
Definition: classes.h:7
edm::ESHandle< GlobalTrackingGeometry > m_geomRecord
TGeoShape * createShape(const GeomDet *det)
std::map< std::string, TGeoMedium * > m_nameToMedium
const std::vector< const RPCRoll * > & rolls() const
Return a vector of all RPC rolls.
Definition: RPCGeometry.cc:67
void addTOBGeometry(TGeoVolume *top, const std::string &name="TOB", int copy=1)
int nstrips() const
Definition: RPCRoll.cc:46
DTSuperLayerId
T y() const
Definition: PV3DBase.h:63
T yx() const
float cellWidth() const
Returns the cell width.
Definition: DTTopology.h:68
const Bounds & bounds() const
Definition: Surface.h:128
TGeoVolume * createVolume(const std::string &name, const GeomDet *det, const std::string &matname="Air")
double wireSpacing() const
const StripTopology & specificTopology() const
Definition: RPCRoll.cc:107
void addDTGeometry(TGeoVolume *top, const std::string &name="DT", int copy=1)
const Plane & surface() const
The nominal surface of the GeomDet.
Definition: GeomDet.h:35
void addTIDGeometry(TGeoVolume *top, const std::string &name="TID", int copy=1)
void setWhatProduced(T *iThis, const es::Label &iLabel=es::Label())
Definition: ESProducer.h:115
#define ADD_SISTRIP_TOPOLOGY(rawid, detUnit)
int firstChannel() const
Returns the wire number of the first wire.
Definition: DTTopology.h:78
uint32_t rawId() const
get the raw id
Definition: DetId.h:43
virtual float thickness() const =0
T zx() const
T xy() const
int lastChannel() const
Returns the wire number of the last wire.
Definition: DTTopology.h:80
T zz() const
virtual float stripLength() const =0
float wireAngle() const
const DetContainer & detsTEC() const
void addRPCGeometry(TGeoVolume *top, const std::string &name="RPC", int copy=1)
void addCSCGeometry(TGeoVolume *top, const std::string &name="CSC", int copy=1)
std::map< std::string, TGeoShape * > m_nameToShape
T z() const
Definition: PV3DBase.h:64
const DetContainer & detsPXB() const
T zy() const
DetId geographicalId() const
The label of this GeomDet.
Definition: GeomDet.h:72
#define end
Definition: vmac.h:37
float cellHeight() const
Returns the cell height.
Definition: DTTopology.h:70
T yy() const
virtual const GeomDet * idToDet(DetId) const
void addPixelBarrelGeometry(TGeoVolume *top, const std::string &name="PixelBarrel", int copy=1)
const DetContainer & detsTIB() const
void addTIBGeometry(TGeoVolume *top, const std::string &name="TIB", int copy=1)
std::map< std::string, TGeoVolume * > m_nameToVolume
Definition: DetId.h:18
virtual float stripOffset(void) const
int channels() const
Returns the number of wires in the layer.
Definition: DTTopology.h:75
#define ADD_PIXEL_TOPOLOGY(rawid, detUnit)
double b
Definition: hdecay.h:120
boost::shared_ptr< FWTGeoRecoGeometry > produce(const FWTGeoRecoGeometryRecord &)
boost::shared_ptr< FWTGeoRecoGeometry > m_fwGeometry
virtual const GeomDetUnit * idToDetUnit(DetId) const
Return the pointer to the GeomDetUnit corresponding to a given DetId.
void addPixelForwardGeometry(TGeoVolume *top, const std::string &name="PixelForward", int copy=1)
T xz() const
FWTGeoRecoGeometryESProducer(const edm::ParameterSet &)
virtual float pitch() const =0
const DetContainer & detsPXF() const
const DetContainer & detsTOB() const
const RotationType & rotation() const
Definition: Bounds.h:22
void addTECGeometry(TGeoVolume *top, const std::string &name="TEC", int copy=1)
TGeoMaterial * createMaterial(const std::string &name)
std::map< std::string, TGeoMaterial * > m_nameToMaterial
string top
Definition: rpc-layouts.py:8
float cellLenght() const
Definition: DTTopology.h:73
T x() const
Definition: PV3DBase.h:62
virtual float width() const =0
const std::string path(TGeoVolume *top, const std::string &name, int copy)
const PositionType & position() const
T yz() const
const DetContainer & detsTID() const