#include <TrackingTools/DetLayers/interface/BarrelDetLayer.h>
Public Member Functions | |
BarrelDetLayer () | |
virtual std::pair< bool, TrajectoryStateOnSurface > | compatible (const TrajectoryStateOnSurface &ts, const Propagator &, const MeasurementEstimator &) const |
tests the geometrical compatibility of the Det with the predicted state. | |
bool | contains (const Local3DPoint &p) const |
virtual Location | location () const |
DetLayer interface. | |
virtual const BoundCylinder & | specificSurface () const |
Extension of the interface. | |
virtual const BoundSurface & | surface () const |
GeometricSearchDet interface. | |
virtual | ~BarrelDetLayer () |
Protected Member Functions | |
virtual BoundCylinder * | computeSurface () |
virtual void | initialize () |
void | setSurface (BoundCylinder *cp) |
Private Attributes | |
ReferenceCountingPointer < BoundCylinder > | theCylinder |
Barrel layers are cylinders with their axes parallel to the global Z axis. The methods that have a common implementation for all BarrelDetLayers are implemented in this class, but some methods are left abstract.
Definition at line 25 of file BarrelDetLayer.h.
BarrelDetLayer::BarrelDetLayer | ( | ) | [inline] |
BarrelDetLayer::~BarrelDetLayer | ( | ) | [virtual] |
pair< bool, TrajectoryStateOnSurface > BarrelDetLayer::compatible | ( | const TrajectoryStateOnSurface & | ts, | |
const Propagator & | , | |||
const MeasurementEstimator & | ||||
) | const [virtual] |
tests the geometrical compatibility of the Det with the predicted state.
The FreeTrajectoryState argument is propagated to the Det surface using the Propagator argument. The resulting TrajectoryStateOnSurface is tested for compatibility with the surface bounds. If compatible, a std::pair< true, propagatedState> is returned. If the propagation fails, or if the state is not compatible, a std::pair< false, propagatedState> is returned.
Implements GeometricSearchDet.
Definition at line 74 of file BarrelDetLayer.cc.
References BoundSurface::bounds(), TrajectoryStateOnSurface::cartesianError(), GlobalErrorBase< T, ErrorWeightType >::czz(), TrajectoryStateOnSurface::globalDirection(), TrajectoryStateOnSurface::globalPosition(), TrajectoryStateOnSurface::hasError(), TrajectoryStateOnSurface::isValid(), Bounds::length(), HLT_VtxMuL3::nSigma, CartesianTrajectoryError::position(), GloballyPositioned< T >::position(), Propagator::propagate(), specificSurface(), funct::sqrt(), surface(), funct::tan(), theCylinder, PV3DBase< T, PVType, FrameType >::theta(), Bounds::thickness(), and PV3DBase< T, PVType, FrameType >::z().
Referenced by MuRodBarrelLayer::compatibleDets().
00077 { 00078 if(theCylinder == 0) edm::LogError("DetLayers") 00079 << "ERROR: BarrelDetLayer::compatible() is used before the layer surface is initialized" ; 00080 // throw an exception? which one? 00081 00082 TrajectoryStateOnSurface myState = prop.propagate( ts, specificSurface()); 00083 if ( !myState.isValid()) return make_pair( false, myState); 00084 00085 // take into account the thickness of the layer 00086 float deltaZ = surface().bounds().thickness()/2. / 00087 fabs( tan( myState.globalDirection().theta())); 00088 00089 // take into account the error on the predicted state 00090 const float nSigma = 3.; 00091 if (myState.hasError()) { 00092 deltaZ += nSigma * sqrt( myState.cartesianError().position().czz()); 00093 } 00094 // 00095 // check z assuming symmetric bounds around position().z() 00096 // 00097 deltaZ += surface().bounds().length()/2; 00098 return make_pair(fabs(myState.globalPosition().z()-surface().position().z())<deltaZ, 00099 myState); 00100 }
BoundCylinder * BarrelDetLayer::computeSurface | ( | ) | [protected, virtual] |
Definition at line 31 of file BarrelDetLayer.cc.
References GeometricSearchDet::basicComponents(), max, min, r, rot, and z.
Referenced by initialize().
00031 { 00032 vector< const GeomDet*> comps = basicComponents(); 00033 00034 // Find extension in Z 00035 float theRmin = comps.front()->position().perp(); 00036 float theRmax = theRmin; 00037 float theZmin = comps.front()->position().z(); 00038 float theZmax = theZmin; 00039 for ( vector< const GeomDet*>::const_iterator deti = comps.begin(); 00040 deti != comps.end(); deti++) { 00041 vector<GlobalPoint> corners = 00042 BoundingBox().corners( dynamic_cast<const BoundPlane&>((*deti)->surface())); 00043 for (vector<GlobalPoint>::const_iterator ic = corners.begin(); 00044 ic != corners.end(); ic++) { 00045 float r = ic->perp(); 00046 float z = ic->z(); 00047 theRmin = min( theRmin, r); 00048 theRmax = max( theRmax, r); 00049 theZmin = min( theZmin, z); 00050 theZmax = max( theZmax, z); 00051 } 00052 // in addition to the corners we have to check the middle of the 00053 // det +/- thickness/2 00054 // , since the min radius for some barrel dets is reached there 00055 float rdet = (**deti).position().perp(); 00056 float thick = (**deti).surface().bounds().thickness(); 00057 theRmin = min( theRmin, rdet-thick/2.F); 00058 theRmax = max( theRmax, rdet+thick/2.F); 00059 } 00060 00061 // By default the barrel layers are positioned at the center of the 00062 // global frame, and the axes of their local frame coincide with 00063 // those of the global grame (z along the cylinder axis) 00064 PositionType pos(0.,0.,0.); 00065 RotationType rot; 00066 00067 return new BoundCylinder( pos, rot, 00068 SimpleCylinderBounds( theRmin, theRmax, 00069 theZmin, theZmax)); 00070 }
bool BarrelDetLayer::contains | ( | const Local3DPoint & | p | ) | const |
Definition at line 19 of file BarrelDetLayer.cc.
References BoundSurface::bounds(), Bounds::inside(), and surface().
Definition at line 23 of file BarrelDetLayer.cc.
References computeSurface(), and setSurface().
00024 { 00025 setSurface( computeSurface()); 00026 }
virtual Location BarrelDetLayer::location | ( | ) | const [inline, virtual] |
DetLayer interface.
Implements DetLayer.
Definition at line 41 of file BarrelDetLayer.h.
References GeomDetEnumerators::barrel.
00041 {return GeomDetEnumerators::barrel;}
void BarrelDetLayer::setSurface | ( | BoundCylinder * | cp | ) | [protected] |
Definition at line 15 of file BarrelDetLayer.cc.
References theCylinder.
Referenced by initialize().
00015 { 00016 theCylinder = cp; 00017 }
virtual const BoundCylinder& BarrelDetLayer::specificSurface | ( | ) | const [inline, virtual] |
Extension of the interface.
Definition at line 45 of file BarrelDetLayer.h.
References theCylinder.
Referenced by MuonNavigationSchool::addBarrelLayer(), MuonTkNavigationSchool::addBarrelLayer(), GroupedCkfTrajectoryBuilder::advanceOneLayer(), CkfDebugger::analyseRecHitNotFound(), DirectTrackerNavigation::checkCompatible(), DirectMuonNavigation::checkCompatible(), compatible(), MuRodBarrelLayer::compatibleDets(), PixelHitMatcher::compatibleHits(), MultipleScatteringGeometry::detLayers(), RectangularEtaPhiTrackingRegion::estimator(), InOutConversionSeedFinder::fillClusterSeeds(), HitPairGeneratorFromLayerPair::hitPairs(), InnerDeltaPhi::initBarrelLayer(), ThirdHitRZPrediction::initLayer(), ThirdHitPrediction::initLayer(), TkLayerLess::insideOutLess(), TkLayerLess::insideOutLessSigned(), SimpleNavigationSchool::linkNextForwardLayer(), HICSimpleNavigationSchool::linkNextForwardLayer(), OutInConversionSeedFinder::makeEstimator(), MSLayer::MSLayer(), ExtractBarrelDetLayerR::operator()(), MuonDetLayerComp::operator()(), ConversionSeedFinder::printLayer(), and SimpleNavigableLayer::wellInside().
00045 { return *theCylinder;}
virtual const BoundSurface& BarrelDetLayer::surface | ( | ) | const [inline, virtual] |
GeometricSearchDet interface.
Implements GeometricSearchDet.
Definition at line 34 of file BarrelDetLayer.h.
References theCylinder.
Referenced by TkLayerLess::barrelForwardLess(), compatible(), contains(), RectangularEtaPhiTrackingRegion::estimator(), HitPairGeneratorFromLayerPair::hitPairs(), ThirdHitRZPrediction::initLayer(), ThirdHitPrediction::initLayer(), SimpleNavigationSchool::linkNextForwardLayer(), HICSimpleNavigationSchool::linkNextForwardLayer(), and MSLayer::MSLayer().
00034 { return *theCylinder;}
Definition at line 61 of file BarrelDetLayer.h.
Referenced by compatible(), setSurface(), specificSurface(), and surface().