CMS 3D CMS Logo

TIBRing Class Reference

A concrete implementation for TIB rings. More...

#include <RecoTracker/TkDetLayers/interface/TIBRing.h>

Inheritance diagram for TIBRing:

GeometricSearchDetWithGroups GeometricSearchDet

List of all members.

Public Member Functions

virtual const std::vector
< const GeomDet * > & 
basicComponents () const
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.
virtual const std::vector
< const GeometricSearchDet * > & 
components () const
 Returns basic components, if any.
virtual void groupedCompatibleDetsV (const TrajectoryStateOnSurface &startingState, const Propagator &prop, const MeasurementEstimator &est, std::vector< DetGroup > &result) const
virtual const BoundCylinderspecificSurface () const
 Return the ring surface as a.
virtual const BoundSurfacesurface () const
 The surface of the GeometricSearchDet.
 TIBRing (std::vector< const GeomDet * > &theGeomDets)
 ~TIBRing ()

Private Types

typedef PeriodicBinFinderInPhi
< double > 
BinFinderType

Private Member Functions

void checkPeriodicity (std::vector< const GeomDet * >::const_iterator first, std::vector< const GeomDet * >::const_iterator last)
void checkRadius (std::vector< const GeomDet * >::const_iterator first, std::vector< const GeomDet * >::const_iterator last)
SubRingCrossings computeCrossings (const TrajectoryStateOnSurface &startingState, PropagationDirection propDir) const
void computeHelicity ()
float computeWindowSize (const GeomDet *det, const TrajectoryStateOnSurface &tsos, const MeasurementEstimator &est) const
void searchNeighbors (const TrajectoryStateOnSurface &tsos, const Propagator &prop, const MeasurementEstimator &est, const SubRingCrossings &crossings, float window, std::vector< DetGroup > &result) const

Private Attributes

BinFinderType theBinFinder
ReferenceCountingPointer
< BoundCylinder
theCylinder
std::vector< const GeomDet * > theDets
int theHelicity

Classes

struct  SubRingCrossings


Detailed Description

A concrete implementation for TIB rings.

Definition at line 12 of file TIBRing.h.


Member Typedef Documentation

typedef PeriodicBinFinderInPhi<double> TIBRing::BinFinderType [private]

Definition at line 85 of file TIBRing.h.


Constructor & Destructor Documentation

TIBRing::TIBRing ( std::vector< const GeomDet * > &  theGeomDets  ) 

TIBRing::~TIBRing (  ) 

Definition at line 118 of file TIBRing.cc.

00118                  {
00119 
00120 } 


Member Function Documentation

virtual const std::vector<const GeomDet*>& TIBRing::basicComponents (  )  const [inline, virtual]

Implements GeometricSearchDet.

Definition at line 20 of file TIBRing.h.

References theDets.

00020 {return theDets;}

void TIBRing::checkPeriodicity ( std::vector< const GeomDet * >::const_iterator  first,
std::vector< const GeomDet * >::const_iterator  last 
) [private]

void TIBRing::checkRadius ( std::vector< const GeomDet * >::const_iterator  first,
std::vector< const GeomDet * >::const_iterator  last 
) [private]

pair< bool, TrajectoryStateOnSurface > TIBRing::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 124 of file TIBRing.cc.

00125                                                     {
00126   edm::LogError("TkDetLayers") << "temporary dummy implementation of TIBRing::compatible()!!" ;
00127   return pair<bool,TrajectoryStateOnSurface>();
00128 }

const vector< const GeometricSearchDet * > & TIBRing::components (  )  const [virtual]

Returns basic components, if any.

Returns direct components, if any

Implements GeometricSearchDet.

Definition at line 57 of file TIBRing.cc.

00058 {
00059   throw DetLayerException("TIBRing doesn't have GeometricSearchDet components");
00060 }

TIBRing::SubRingCrossings TIBRing::computeCrossings ( const TrajectoryStateOnSurface startingState,
PropagationDirection  propDir 
) const [private]

Definition at line 225 of file TIBRing.cc.

References PeriodicBinFinderInPhi< T >::binIndex(), TrajectoryStateOnSurface::globalMomentum(), TrajectoryStateOnSurface::globalPosition(), PV3DBase< T, PVType, FrameType >::phi(), GloballyPositioned< T >::position(), rho, specificSurface(), surface(), theBinFinder, theDets, TrajectoryStateOnSurface::transverseCurvature(), and PV3DBase< T, PVType, FrameType >::x().

00227 {
00228   typedef HelixBarrelPlaneCrossing2OrderLocal    Crossing;
00229   typedef MeasurementEstimator::Local2DVector Local2DVector;
00230 
00231   GlobalPoint startPos( startingState.globalPosition());
00232   GlobalVector startDir( startingState.globalMomentum());
00233   double rho( startingState.transverseCurvature());
00234 
00235   HelixBarrelCylinderCrossing cylCrossing( startPos, startDir, rho,
00236                                            propDir,specificSurface());
00237 
00238   if (!cylCrossing.hasSolution()) return SubRingCrossings();
00239 
00240   GlobalPoint  cylPoint( cylCrossing.position());
00241   GlobalVector cylDir( cylCrossing.direction());
00242   int closestIndex = theBinFinder.binIndex(cylPoint.phi());
00243 
00244   const BoundPlane& closestPlane( theDets[closestIndex]->surface());
00245 
00246   LocalPoint closestPos = Crossing( cylPoint, cylDir, rho, closestPlane).position();
00247   float closestDist = closestPos.x(); // use fact that local X perp to global Z 
00248 
00249   //int next = cylPoint.phi() - closestPlane.position().phi() > 0 ? closest+1 : closest-1;
00250   int nextIndex = PhiLess()( closestPlane.position().phi(), cylPoint.phi()) ? 
00251     closestIndex+1 : closestIndex-1;
00252 
00253   const BoundPlane& nextPlane( theDets[ theBinFinder.binIndex(nextIndex)]->surface());
00254   LocalPoint nextPos = Crossing( cylPoint, cylDir, rho, nextPlane).position();
00255   float nextDist = nextPos.x();
00256 
00257   if (fabs(closestDist) < fabs(nextDist)) {
00258     return SubRingCrossings( closestIndex, nextIndex, nextDist);
00259   }
00260   else {
00261     return SubRingCrossings( nextIndex, closestIndex, closestDist);
00262   }
00263 }

void TIBRing::computeHelicity (  )  [private]

Definition at line 101 of file TIBRing.cc.

References Vector3DBase< T, FrameTag >::dot(), PV3DBase< T, PVType, FrameType >::phi(), GloballyPositioned< T >::position(), GeomDet::surface(), theDets, theHelicity, and Surface::toGlobal().

00101                               {
00102 
00103   const GeomDet& det = *theDets.front();
00104   GlobalVector radial = det.surface().position() - GlobalPoint(0,0,0);
00105   GlobalVector normal = det.surface().toGlobal( LocalVector(0,0,1));
00106   if(normal.dot(radial)<=0)normal*=-1;
00107 //   edm::LogInfo(TkDetLayers) << "BarrelDetRing::computeHelicity: phi(normal) " << normal.phi()
00108 //        << " phi(radial) " << radial.phi() ;
00109   if (PhiLess()( normal.phi(), radial.phi())) {
00110     theHelicity = 1;  // smaller phi angles mean "inner" group
00111   }
00112   else {
00113     theHelicity = 0;  // smaller phi angles mean "outer" group
00114   }
00115 }

float TIBRing::computeWindowSize ( const GeomDet det,
const TrajectoryStateOnSurface tsos,
const MeasurementEstimator est 
) const [private]

Definition at line 265 of file TIBRing.cc.

References MeasurementEstimator::maximalLocalDisplacement(), GeomDet::surface(), and x.

00268 {
00269   return est.maximalLocalDisplacement(tsos, det->surface()).x();
00270 }

virtual void TIBRing::groupedCompatibleDetsV ( const TrajectoryStateOnSurface startingState,
const Propagator prop,
const MeasurementEstimator est,
std::vector< DetGroup > &  result 
) const [virtual]

Reimplemented from GeometricSearchDet.

void TIBRing::searchNeighbors ( const TrajectoryStateOnSurface tsos,
const Propagator prop,
const MeasurementEstimator est,
const SubRingCrossings crossings,
float  window,
std::vector< DetGroup > &  result 
) const [private]

virtual const BoundCylinder& TIBRing::specificSurface (  )  const [inline, virtual]

Return the ring surface as a.

Definition at line 40 of file TIBRing.h.

References theCylinder.

Referenced by computeCrossings().

00040 {return *theCylinder;}

virtual const BoundSurface& TIBRing::surface (  )  const [inline, virtual]

The surface of the GeometricSearchDet.

Implements GeometricSearchDet.

Definition at line 18 of file TIBRing.h.

References theCylinder.

Referenced by computeCrossings().

00018 {return *theCylinder;}  


Member Data Documentation

BinFinderType TIBRing::theBinFinder [private]

Definition at line 86 of file TIBRing.h.

Referenced by computeCrossings().

ReferenceCountingPointer<BoundCylinder> TIBRing::theCylinder [private]

Definition at line 89 of file TIBRing.h.

Referenced by specificSurface(), and surface().

std::vector<const GeomDet*> TIBRing::theDets [private]

Definition at line 88 of file TIBRing.h.

Referenced by basicComponents(), computeCrossings(), and computeHelicity().

int TIBRing::theHelicity [private]

Definition at line 90 of file TIBRing.h.

Referenced by computeHelicity().


The documentation for this class was generated from the following files:
Generated on Tue Jun 9 18:33:27 2009 for CMSSW by  doxygen 1.5.4