CMS 3D CMS Logo

/data/refman/pasoursint/CMSSW_6_1_2_SLHC2/src/TrackingTools/GeomPropagators/src/TrackerBounds.cc

Go to the documentation of this file.
00001 #include "TrackingTools/GeomPropagators/interface/TrackerBounds.h"
00002 
00003 #include "DataFormats/GeometrySurface/interface/BoundCylinder.h"
00004 #include "DataFormats/GeometrySurface/interface/BoundDisk.h"
00005 #include "DataFormats/GeometrySurface/interface/SimpleCylinderBounds.h"
00006 #include "DataFormats/GeometrySurface/interface/SimpleDiskBounds.h"
00007 
00008 //Ported from ORCA
00009 //  $Date: 2007/03/07 16:28:42 $
00010 //  $Revision: 1.3 $
00011 
00012 void TrackerBounds::initialize() 
00013 {
00014   const float epsilon = 0.001; // should not matter at all
00015 
00016   Surface::RotationType rot; // unit rotation matrix
00017 
00018   theCylinder = new BoundCylinder( Surface::PositionType(0,0,0), rot, 
00019                                    SimpleCylinderBounds( radius()-epsilon, 
00020                                                          radius()+epsilon, 
00021                                                          -halfLength(), 
00022                                                          halfLength()));
00023   theNegativeDisk = 
00024     new BoundDisk( Surface::PositionType( 0, 0, -halfLength()), rot, 
00025                    SimpleDiskBounds( 0, radius(), -epsilon, epsilon));
00026 
00027   thePositiveDisk = 
00028     new BoundDisk( Surface::PositionType( 0, 0, halfLength()), rot, 
00029                    SimpleDiskBounds( 0, radius(), -epsilon, epsilon));
00030 
00031 
00032   theInit = true;
00033 }
00034 
00035 bool TrackerBounds::isInside(const GlobalPoint &point){
00036   return (point.perp() <= radius() &&
00037           fabs(point.z()) <= halfLength());
00038 }
00039 
00040 
00041 // static initializers
00042 
00043 ReferenceCountingPointer<BoundCylinder>  TrackerBounds::theCylinder = 0;
00044 ReferenceCountingPointer<BoundDisk>      TrackerBounds::theNegativeDisk = 0;
00045 ReferenceCountingPointer<BoundDisk>      TrackerBounds::thePositiveDisk = 0;
00046 
00047 bool TrackerBounds::theInit = false;
00048 
00049