#include <RecoPixelVertexing/PixelTriplets/interface/ThirdHitRZPrediction.h>
Public Types | |
typedef TkTrackingRegionsMargin< float > | Margin |
typedef PixelRecoRange< float > | Range |
Public Member Functions | |
Range | detRange () const |
void | initLayer (const DetLayer *layer) |
Range | operator() (float rORz) |
Range | operator() (const DetLayer *layer=0) |
ThirdHitRZPrediction (const GlobalPoint &gp1, const GlobalPoint &gp2, float tolerance, const DetLayer *layer=0) | |
Private Attributes | |
bool | theBarrel |
Range | theDetRange |
bool | theForward |
PixelRecoLineRZ | theLine |
Margin | theTolerance |
Definition at line 19 of file ThirdHitRZPrediction.h.
typedef TkTrackingRegionsMargin<float> ThirdHitRZPrediction::Margin |
Definition at line 22 of file ThirdHitRZPrediction.h.
typedef PixelRecoRange<float> ThirdHitRZPrediction::Range |
Definition at line 21 of file ThirdHitRZPrediction.h.
ThirdHitRZPrediction::ThirdHitRZPrediction | ( | const GlobalPoint & | gp1, | |
const GlobalPoint & | gp2, | |||
float | tolerance, | |||
const DetLayer * | layer = 0 | |||
) |
Definition at line 11 of file ThirdHitRZPrediction.cc.
References initLayer(), p1, p2, PV3DBase< T, PVType, FrameType >::perp(), theLine, and PV3DBase< T, PVType, FrameType >::z().
00013 : theBarrel(false), theForward(false), theTolerance( Margin(tolerance,tolerance) ) 00014 { 00015 PixelRecoPointRZ p1(gp1.perp(), gp1.z()); 00016 PixelRecoPointRZ p2(gp2.perp(), gp2.z()); 00017 float dr = p2.r() - p1.r(); 00018 if ( dr != 0.) { 00019 theLine = PixelRecoLineRZ(p2, p1); 00020 } 00021 else { theLine = PixelRecoLineRZ(p1, 99999.); } 00022 00023 if (layer) initLayer(layer); 00024 00025 }
Range ThirdHitRZPrediction::detRange | ( | ) | const [inline] |
Definition at line 30 of file ThirdHitRZPrediction.h.
References theDetRange.
Referenced by PixelTripletHLTGenerator::hitTriplets().
00030 { return theDetRange; }
Definition at line 60 of file ThirdHitRZPrediction.cc.
References GeomDetEnumerators::barrel, BoundSurface::bounds(), GeomDetEnumerators::endcap, DetLayer::location(), GeometricSearchDet::position(), Cylinder::radius(), radius(), BarrelDetLayer::specificSurface(), BarrelDetLayer::surface(), ForwardDetLayer::surface(), theBarrel, theDetRange, theForward, Bounds::thickness(), and PV3DBase< T, PVType, FrameType >::z().
Referenced by PixelTripletHLTGenerator::hitTriplets(), operator()(), and ThirdHitRZPrediction().
00061 { 00062 if ( layer->location() == GeomDetEnumerators::barrel) { 00063 theBarrel = true; 00064 theForward = false; 00065 const BarrelDetLayer& bl = dynamic_cast<const BarrelDetLayer&>(*layer); 00066 float halfThickness = bl.surface().bounds().thickness()/2; 00067 float radius = bl.specificSurface().radius(); 00068 theDetRange = Range(radius-halfThickness, radius+halfThickness); 00069 } else if ( layer->location() == GeomDetEnumerators::endcap) { 00070 theBarrel= false; 00071 theForward = true; 00072 const ForwardDetLayer& fl = dynamic_cast<const ForwardDetLayer&>(*layer); 00073 float halfThickness = fl.surface().bounds().thickness()/2; 00074 float zLayer = fl.position().z() ; 00075 theDetRange = Range(zLayer-halfThickness, zLayer+halfThickness); 00076 } 00077 }
ThirdHitRZPrediction::Range ThirdHitRZPrediction::operator() | ( | float | rORz | ) |
Definition at line 46 of file ThirdHitRZPrediction.cc.
References TkTrackingRegionsMargin< T >::left(), PixelRecoLineRZ::rAtZ(), TkTrackingRegionsMargin< T >::right(), theBarrel, theLine, theTolerance, v, and PixelRecoLineRZ::zAtR().
00047 { 00048 float v; 00049 if (theBarrel) { 00050 v=theLine.zAtR(rORz); 00051 } else { 00052 v=theLine.rAtZ(rORz); 00053 } 00054 00055 float rl = v-theTolerance.left(); 00056 float rr = v+theTolerance.right(); 00057 return Range(rl,rr); 00058 }
ThirdHitRZPrediction::Range ThirdHitRZPrediction::operator() | ( | const DetLayer * | layer = 0 |
) |
Definition at line 27 of file ThirdHitRZPrediction.cc.
References initLayer(), TkTrackingRegionsMargin< T >::left(), PixelRecoRange< T >::max(), PixelRecoRange< T >::min(), PixelRecoLineRZ::rAtZ(), TkTrackingRegionsMargin< T >::right(), std::swap(), theBarrel, theDetRange, theForward, theLine, theTolerance, v1, v2, and PixelRecoLineRZ::zAtR().
00028 { 00029 if (layer) initLayer(layer); 00030 00031 float v1,v2; 00032 if (theBarrel) { 00033 v1 = theLine.zAtR(theDetRange.min()); 00034 v2 = theLine.zAtR(theDetRange.max()); 00035 } else if (theForward) { 00036 v1 = theLine.rAtZ(theDetRange.min()); 00037 v2 = theLine.rAtZ(theDetRange.max()); 00038 } else return Range(0.,0.); 00039 00040 if (v1 > v2) std::swap(v1,v2); 00041 float rl = v1-theTolerance.left(); 00042 float rr = v2+theTolerance.right(); 00043 return Range(rl,rr); 00044 }
bool ThirdHitRZPrediction::theBarrel [private] |
Range ThirdHitRZPrediction::theDetRange [private] |
Definition at line 37 of file ThirdHitRZPrediction.h.
Referenced by detRange(), initLayer(), and operator()().
bool ThirdHitRZPrediction::theForward [private] |
PixelRecoLineRZ ThirdHitRZPrediction::theLine [private] |
Definition at line 39 of file ThirdHitRZPrediction.h.
Referenced by operator()(), and ThirdHitRZPrediction().
Margin ThirdHitRZPrediction::theTolerance [private] |