CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
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 BoundSurface & surface() const final
GeometricSearchDet interface.
const BoundSurface & surface() const final
The surface of the GeometricSearchDet.
virtual Location location() const =0
Which part of the detector (barrel, endcap)
const double tolerance
const Bounds & bounds() const
Definition: Surface.h:87
PixelRecoRange< float > Range
constexpr std::array< uint8_t, layerIndexSize > layer
virtual float thickness() const =0
T z() const
Definition: PV3DBase.h:61
float outerRadius() const
virtual const Surface::PositionType & position() const
Returns position of the surface.
virtual const BoundCylinder & specificSurface() const final
Extension of the interface.
float innerRadius() const
Extension of the Bounds interface.