![]() |
![]() |
#include <RecoTracker/TkDetLayers/interface/TOBRod.h>
Public Types | |
typedef PeriodicBinFinderInZ < float > | BinFinderType |
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. | |
void | groupedCompatibleDetsV (const TrajectoryStateOnSurface &tsos, const Propagator &prop, const MeasurementEstimator &est, std::vector< DetGroup > &result) const |
TOBRod (std::vector< const GeomDet * > &innerDets, std::vector< const GeomDet * > &outerDets) | |
~TOBRod () | |
Private Member Functions | |
bool | addClosest (const TrajectoryStateOnSurface &tsos, const Propagator &prop, const MeasurementEstimator &est, const SubLayerCrossing &crossing, std::vector< DetGroup > &result) const |
SubLayerCrossings | computeCrossings (const TrajectoryStateOnSurface &tsos, PropagationDirection propDir) const |
float | computeWindowSize (const GeomDet *det, const TrajectoryStateOnSurface &tsos, const MeasurementEstimator &est) const |
bool | overlap (const GlobalPoint &gpos, const GeomDet &rod, float phiWin) const |
void | searchNeighbors (const TrajectoryStateOnSurface &tsos, const Propagator &prop, const MeasurementEstimator &est, const SubLayerCrossing &crossing, float window, std::vector< DetGroup > &result, bool checkClosest) const |
const std::vector< const GeomDet * > & | subRod (int ind) const |
Private Attributes | |
std::vector< const GeomDet * > | theDets |
BinFinderType | theInnerBinFinder |
std::vector< const GeomDet * > | theInnerDets |
ReferenceCountingPointer < BoundPlane > | theInnerPlane |
BinFinderType | theOuterBinFinder |
std::vector< const GeomDet * > | theOuterDets |
ReferenceCountingPointer < BoundPlane > | theOuterPlane |
Definition at line 15 of file TOBRod.h.
typedef PeriodicBinFinderInZ<float> TOBRod::BinFinderType |
TOBRod::TOBRod | ( | std::vector< const GeomDet * > & | innerDets, | |
std::vector< const GeomDet * > & | outerDets | |||
) |
bool TOBRod::addClosest | ( | const TrajectoryStateOnSurface & | tsos, | |
const Propagator & | prop, | |||
const MeasurementEstimator & | est, | |||
const SubLayerCrossing & | crossing, | |||
std::vector< DetGroup > & | result | |||
) | const [private] |
Referenced by groupedCompatibleDetsV().
virtual const std::vector<const GeomDet*>& TOBRod::basicComponents | ( | ) | const [inline, virtual] |
Implements GeometricSearchDet.
Definition at line 25 of file TOBRod.h.
References theDets.
00025 {return theDets;}
pair< bool, TrajectoryStateOnSurface > TOBRod::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 85 of file TOBRod.cc.
00086 { 00087 edm::LogError("TkDetLayers") << "temporary dummy implementation of TOBRod::compatible()!!" ; 00088 return pair<bool,TrajectoryStateOnSurface>(); 00089 }
const vector< const GeometricSearchDet * > & TOBRod::components | ( | ) | const [virtual] |
Returns basic components, if any.
Returns direct components, if any
Implements GeometricSearchDet.
Definition at line 80 of file TOBRod.cc.
00080 { 00081 throw DetLayerException("TOBRod doesn't have GeometricSearchDet components"); 00082 }
SubLayerCrossings TOBRod::computeCrossings | ( | const TrajectoryStateOnSurface & | tsos, | |
PropagationDirection | propDir | |||
) | const [private] |
Definition at line 136 of file TOBRod.cc.
References TrajectoryStateOnSurface::globalMomentum(), TrajectoryStateOnSurface::globalPosition(), rho, theInnerPlane, theOuterPlane, and TrajectoryStateOnSurface::transverseCurvature().
Referenced by groupedCompatibleDetsV().
00138 { 00139 GlobalPoint startPos( startingState.globalPosition()); 00140 GlobalVector startDir( startingState.globalMomentum()); 00141 double rho( startingState.transverseCurvature()); 00142 00143 HelixBarrelPlaneCrossingByCircle crossing( startPos, startDir, rho, propDir); 00144 00145 pair<bool,double> innerPath = crossing.pathLength( *theInnerPlane); 00146 if (!innerPath.first) return SubLayerCrossings(); 00147 00148 GlobalPoint gInnerPoint( crossing.position(innerPath.second)); 00149 int innerIndex = theInnerBinFinder.binIndex(gInnerPoint.z()); 00150 float innerDist = fabs( theInnerBinFinder.binPosition(innerIndex) - gInnerPoint.z()); 00151 SubLayerCrossing innerSLC( 0, innerIndex, gInnerPoint); 00152 00153 pair<bool,double> outerPath = crossing.pathLength( *theOuterPlane); 00154 if (!outerPath.first) return SubLayerCrossings(); 00155 00156 GlobalPoint gOuterPoint( crossing.position(outerPath.second)); 00157 int outerIndex = theOuterBinFinder.binIndex(gOuterPoint.z()); 00158 float outerDist = fabs( theOuterBinFinder.binPosition(outerIndex) - gOuterPoint.z()); 00159 SubLayerCrossing outerSLC( 1, outerIndex, gOuterPoint); 00160 00161 if (innerDist < outerDist) { 00162 return SubLayerCrossings( innerSLC, outerSLC, 0); 00163 } 00164 else { 00165 return SubLayerCrossings( outerSLC, innerSLC, 1); 00166 } 00167 }
float TOBRod::computeWindowSize | ( | const GeomDet * | det, | |
const TrajectoryStateOnSurface & | tsos, | |||
const MeasurementEstimator & | est | |||
) | const [private] |
Definition at line 186 of file TOBRod.cc.
References MeasurementEstimator::maximalLocalDisplacement(), GeomDet::surface(), and y.
Referenced by groupedCompatibleDetsV().
00189 { 00190 return 00191 est.maximalLocalDisplacement(tsos, det->surface()).y(); 00192 }
void TOBRod::groupedCompatibleDetsV | ( | const TrajectoryStateOnSurface & | tsos, | |
const Propagator & | prop, | |||
const MeasurementEstimator & | est, | |||
std::vector< DetGroup > & | result | |||
) | const [virtual] |
Reimplemented from GeometricSearchDet.
Definition at line 96 of file TOBRod.cc.
References addClosest(), SubLayerCrossings::closest(), SubLayerCrossings::closestIndex(), computeCrossings(), computeWindowSize(), SubLayerCrossings::isValid(), DetGroupMerger::orderAndMergeTwoLevels(), SubLayerCrossings::other(), Propagator::propagationDirection(), and searchNeighbors().
00099 { 00100 00101 SubLayerCrossings crossings; 00102 crossings = computeCrossings( tsos, prop.propagationDirection()); 00103 if(! crossings.isValid()) return; 00104 00105 vector<DetGroup> closestResult; 00106 addClosest( tsos, prop, est, crossings.closest(), closestResult); 00107 if (closestResult.empty()){ 00108 vector<DetGroup> nextResult; 00109 addClosest( tsos, prop, est, crossings.other(), nextResult); 00110 if(nextResult.empty()) return; 00111 00112 DetGroupElement nextGel( nextResult.front().front()); 00113 int crossingSide = LayerCrossingSide().barrelSide( nextGel.trajectoryState(), prop); 00114 DetGroupMerger::orderAndMergeTwoLevels( closestResult, nextResult, result, 00115 crossings.closestIndex(), crossingSide); 00116 } else { 00117 00118 DetGroupElement closestGel( closestResult.front().front()); 00119 float window = computeWindowSize( closestGel.det(), closestGel.trajectoryState(), est); 00120 00121 searchNeighbors( tsos, prop, est, crossings.closest(), window, 00122 closestResult, false); 00123 00124 vector<DetGroup> nextResult; 00125 searchNeighbors( tsos, prop, est, crossings.other(), window, 00126 nextResult, true); 00127 00128 int crossingSide = LayerCrossingSide().barrelSide( closestGel.trajectoryState(), prop); 00129 DetGroupMerger::orderAndMergeTwoLevels( closestResult, nextResult, result, 00130 crossings.closestIndex(), crossingSide); 00131 } 00132 }
bool TOBRod::overlap | ( | const GlobalPoint & | gpos, | |
const GeomDet & | rod, | |||
float | phiWin | |||
) | const [private] |
Definition at line 235 of file TOBRod.cc.
References BoundSurface::bounds(), Bounds::length(), GeomDet::surface(), and GloballyPositioned< T >::toLocal().
00236 { 00237 // check if the z window around TSOS overlaps with the detector theDet (with a 1% margin added) 00238 00239 // const float tolerance = 0.1; 00240 const float relativeMargin = 1.01; 00241 00242 LocalPoint localCrossPoint( det.surface().toLocal(crossPoint)); 00243 // if (fabs(localCrossPoint.z()) > tolerance) { 00244 // edm::LogInfo(TkDetLayers) << "TOBRod::overlap calculation assumes point on surface, but it is off by " 00245 // << localCrossPoint.z() ; 00246 // } 00247 00248 float localY = localCrossPoint.y(); 00249 float detHalfLength = det.surface().bounds().length()/2.; 00250 00251 // edm::LogInfo(TkDetLayers) << "TOBRod::overlap: Det at " << det.position() << " hit at " << localY 00252 // << " Window " << window << " halflength " << detHalfLength ; 00253 00254 if ( ( fabs(localY)-window) < relativeMargin*detHalfLength ) { // FIXME: margin hard-wired! 00255 return true; 00256 } else { 00257 return false; 00258 } 00259 }
void TOBRod::searchNeighbors | ( | const TrajectoryStateOnSurface & | tsos, | |
const Propagator & | prop, | |||
const MeasurementEstimator & | est, | |||
const SubLayerCrossing & | crossing, | |||
float | window, | |||
std::vector< DetGroup > & | result, | |||
bool | checkClosest | |||
) | const [private] |
Referenced by groupedCompatibleDetsV().
Definition at line 67 of file TOBRod.h.
References theInnerDets, and theOuterDets.
00067 { 00068 return (ind==0 ? theInnerDets : theOuterDets); 00069 }
std::vector<const GeomDet*> TOBRod::theDets [private] |
BinFinderType TOBRod::theInnerBinFinder [private] |
std::vector<const GeomDet*> TOBRod::theInnerDets [private] |
BinFinderType TOBRod::theOuterBinFinder [private] |
std::vector<const GeomDet*> TOBRod::theOuterDets [private] |