CMS 3D CMS Logo

ThirdHitRZPredictionBase.cc
Go to the documentation of this file.
8 
9 ThirdHitRZPredictionBase::ThirdHitRZPredictionBase() : theBarrel(false), theForward(false), theTolerance(0., 0.) {}
10 
12  : theBarrel(false), theForward(false), theTolerance(tolerance, tolerance) {
13  if (layer)
14  initLayer(layer);
15 }
16 
18  if (layer->location() == GeomDetEnumerators::barrel) {
19  theBarrel = true;
20  theForward = false;
21  const BarrelDetLayer& bl = reinterpret_cast<const BarrelDetLayer&>(*layer);
22  float halfThickness = bl.surface().bounds().thickness() / 2;
23  float radius = bl.specificSurface().radius();
24  theDetRange = Range(radius - halfThickness, radius + halfThickness);
25  float maxZ = bl.surface().bounds().length() / 2;
26  theDetSize = Range(-maxZ, maxZ);
27  } else if (layer->location() == GeomDetEnumerators::endcap) {
28  theBarrel = false;
29  theForward = true;
30  const ForwardDetLayer& fl = reinterpret_cast<const ForwardDetLayer&>(*layer);
31  float halfThickness = fl.surface().bounds().thickness() / 2;
32  float zLayer = fl.position().z();
33  theDetRange = Range(zLayer - halfThickness, zLayer + halfThickness);
34  const SimpleDiskBounds& diskRadialBounds = static_cast<const SimpleDiskBounds&>(fl.surface().bounds());
35  theDetSize = Range(diskRadialBounds.innerRadius(), diskRadialBounds.outerRadius());
36  } else {
37  theBarrel = theForward = false;
38  }
39 }
virtual float length() const =0
void initLayer(const DetLayer *layer)
const double tolerance
virtual Location location() const =0
Which part of the detector (barrel, endcap)
const Bounds & bounds() const
Definition: Surface.h:89
virtual const BoundCylinder & specificSurface() const final
Extension of the interface.
PixelRecoRange< float > Range
T z() const
Definition: PV3DBase.h:61
float outerRadius() const
virtual float thickness() const =0
virtual const Surface::PositionType & position() const
Returns position of the surface.
const BoundSurface & surface() const final
The surface of the GeometricSearchDet.
float innerRadius() const
Extension of the Bounds interface.
const BoundSurface & surface() const final
GeometricSearchDet interface.