CMS 3D CMS Logo

TrackerShapeToBounds Class Reference

Converts DDSolid volumes to Bounds. More...

#include <Geometry/TrackerNumberingBuilder/interface/TrackerShapeToBounds.h>

List of all members.

Public Member Functions

BoundsbuildBounds (const DDSolidShape &, const std::vector< double > &) const
 buildBounds() return the Bounds.

Private Member Functions

BoundsbuildBox (const std::vector< double > &) const
BoundsbuildOpen (const std::vector< double > &) const
BoundsbuildTrap (const std::vector< double > &) const


Detailed Description

Converts DDSolid volumes to Bounds.

Definition at line 11 of file TrackerShapeToBounds.h.


Member Function Documentation

Bounds * TrackerShapeToBounds::buildBounds ( const DDSolidShape _shape,
const std::vector< double > &  _par 
) const

buildBounds() return the Bounds.

Definition at line 32 of file TrackerShapeToBounds.cc.

References buildBox(), buildOpen(), buildTrap(), GenMuonPlsPt100GeV_cfg::cout, ddbox, ddpolycone_rrz, ddsubtraction, ddtrap, ddtubs, and lat::endl().

Referenced by GeometricDet::bounds().

00032                                                                                                           {
00033   switch(_shape){
00034   case ddbox: return buildBox(_par);
00035     break;
00036   case ddtrap: return buildTrap(_par);
00037     break;
00038   case ddtubs: return buildOpen(_par);
00039     break;
00040   case ddpolycone_rrz: return buildOpen(_par);
00041     break;
00042   case ddsubtraction: return buildOpen(_par);
00043     break;
00044   default:
00045     std::cout<<"Wrong DDshape to build...."<<_shape<<std::endl; 
00046     Bounds* bounds = 0;
00047     return bounds;
00048   }
00049 }      

Bounds * TrackerShapeToBounds::buildBox ( const std::vector< double > &  paras  )  const [private]

Definition at line 51 of file TrackerShapeToBounds.cc.

Referenced by buildBounds().

00051                                                                             {
00052   int indexX = 0;
00053   int indexY = 1; 
00054   int indexZ = 2;
00055   Bounds* bounds = 0;
00056   
00057   if(paras[1]<paras[0]&&paras[0]<paras[2]){
00058     indexX=0;
00059     indexY=2;
00060     indexZ=1;
00061   }
00062   
00063   bounds = new RectangularPlaneBounds(paras[indexX]/cm, // width - shorter side 
00064                                       paras[indexY]/cm, // length - longer side
00065                                       paras[indexZ]/cm);// thickness
00066   return bounds;
00067 } 

Bounds * TrackerShapeToBounds::buildOpen ( const std::vector< double > &  paras  )  const [private]

Definition at line 114 of file TrackerShapeToBounds.cc.

Referenced by buildBounds().

00114                                                                              {  
00115   OpenBounds*  bounds = new OpenBounds();
00116   return bounds;
00117 } 

Bounds * TrackerShapeToBounds::buildTrap ( const std::vector< double > &  paras  )  const [private]

Definition at line 69 of file TrackerShapeToBounds.cc.

Referenced by buildBounds().

00069                                                                              {
00070 
00071 
00072   Bounds* bounds = 0;
00073   /*
00074     TrapezoidalPlaneBounds (float be, float te, float a, float t)
00075     constructed from:
00076     half bottom edge (smaller side width)
00077     half top edge (larger side width)
00078     half apothem (distance from top to bottom sides, measured perpendicularly to them)
00079     half thickness.
00080     
00081     if  we have indexX=0, indexY=1 and indeZ=2
00082     4 = be (ORCA x)
00083     9 = te (ORCA x)
00084     0 = a (ORCA y)
00085     3 = t (ORCA z)
00086 
00087     if  we have indexX=0, indexY=2 and indeZ=1
00088     4 = be (ORCA x)
00089     9 = te (ORCA x)
00090     3 = a (ORCA y)
00091     0 = t (ORCA z)
00092 
00093     so, so we have the indexes:
00094     if indexX==0, indexY==1, indexZ==2, then everything is ok and
00095     the following orcaCorrection-rotation will be a unit-matrix.
00096   */
00097   
00098 
00099   if(paras[0]<5){
00100     bounds = new TrapezoidalPlaneBounds(paras[4]/cm,
00101                                         paras[9]/cm,
00102                                         paras[3]/cm,
00103                                         paras[0]/cm);
00104   }else if(paras[0]>paras[3]){
00105     bounds = new TrapezoidalPlaneBounds(paras[4]/cm,
00106                                         paras[9]/cm,
00107                                         paras[0]/cm,
00108                                         paras[3]/cm);
00109   }  
00110   return bounds;
00111 } 


The documentation for this class was generated from the following files:
Generated on Tue Jun 9 18:34:10 2009 for CMSSW by  doxygen 1.5.4