CMS 3D CMS Logo

/data/refman/pasoursint/CMSSW_4_4_5_patch3/src/RecoPixelVertexing/PixelTriplets/src/ThirdHitRZPredictionBase.cc

Go to the documentation of this file.
00001 #include "RecoPixelVertexing/PixelTriplets/interface/ThirdHitRZPredictionBase.h"
00002 #include "DataFormats/GeometryVector/interface/GlobalPoint.h"
00003 #include "TrackingTools/DetLayers/interface/BarrelDetLayer.h"
00004 #include "TrackingTools/DetLayers/interface/ForwardDetLayer.h"
00005 #include "TrackingTools/DetLayers/interface/DetLayer.h"
00006 #include "DataFormats/GeometrySurface/interface/SimpleDiskBounds.h"
00007 #include "RecoTracker/TkMSParametrization/interface/MultipleScatteringParametrisation.h"
00008 
00009 ThirdHitRZPredictionBase::ThirdHitRZPredictionBase() : 
00010   theBarrel(false), theForward(false), theTolerance(0.,0.)
00011 {}
00012 
00013 ThirdHitRZPredictionBase::ThirdHitRZPredictionBase(
00014   float tolerance, const DetLayer* layer)
00015   : theBarrel(false), theForward(false), theTolerance(tolerance, tolerance)
00016 {
00017     if (layer) initLayer(layer);
00018 }
00019 
00020 void ThirdHitRZPredictionBase::initLayer(const DetLayer *layer)
00021 {
00022   if (layer->location() == GeomDetEnumerators::barrel) {
00023     theBarrel = true;
00024     theForward = false;
00025     const BarrelDetLayer& bl = dynamic_cast<const BarrelDetLayer&>(*layer);
00026     float halfThickness  = bl.surface().bounds().thickness()/2;
00027     float radius = bl.specificSurface().radius();
00028     theDetRange = Range(radius-halfThickness, radius+halfThickness);
00029     float maxZ = bl.surface().bounds().length()/2;
00030     theDetSize = Range(-maxZ, maxZ);
00031   } else if (layer->location() == GeomDetEnumerators::endcap) {
00032     theBarrel= false;
00033     theForward = true;
00034     const ForwardDetLayer& fl = dynamic_cast<const ForwardDetLayer&>(*layer);
00035     float halfThickness  = fl.surface().bounds().thickness()/2;
00036     float zLayer = fl.position().z() ;
00037     theDetRange = Range(zLayer-halfThickness, zLayer+halfThickness);
00038     const SimpleDiskBounds& diskRadialBounds =
00039                  static_cast<const SimpleDiskBounds &>(fl.surface().bounds());
00040     theDetSize = Range(diskRadialBounds.innerRadius(), diskRadialBounds.outerRadius());
00041   }
00042 }