CMS 3D CMS Logo

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