#include <RecoTracker/TkDetLayers/interface/PixelForwardLayer.h>
Public Member Functions | |
virtual const std::vector < const GeomDet * > & | basicComponents () const |
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 |
PixelForwardLayer (std::vector< const PixelBlade * > &blades) | |
virtual SubDetector | subDetector () const |
The type of detector (PixelBarrel, PixelEndcap, TIB, TOB, TID, TEC, CSC, DT, RPCBarrel, RPCEndcap). | |
~PixelForwardLayer () | |
Private Types | |
typedef PeriodicBinFinderInPhi < double > | BinFinderType |
Private Member Functions | |
SubTurbineCrossings | computeCrossings (const TrajectoryStateOnSurface &startingState, PropagationDirection propDir) const |
int | computeHelicity (const GeometricSearchDet *firstBlade, const GeometricSearchDet *secondBlade) const |
float | computeWindowSize (const GeomDet *det, const TrajectoryStateOnSurface &tsos, const MeasurementEstimator &est) const |
void | searchNeighbors (const TrajectoryStateOnSurface &tsos, const Propagator &prop, const MeasurementEstimator &est, const SubTurbineCrossings &crossings, float window, std::vector< DetGroup > &result) const |
Private Attributes | |
std::vector< const GeomDet * > | theBasicComps |
BinFinderType | theBinFinder |
std::vector< const GeometricSearchDet * > | theComps |
Classes | |
struct | SubTurbineCrossings |
Definition at line 14 of file PixelForwardLayer.h.
typedef PeriodicBinFinderInPhi<double> PixelForwardLayer::BinFinderType [private] |
Definition at line 65 of file PixelForwardLayer.h.
PixelForwardLayer::PixelForwardLayer | ( | std::vector< const PixelBlade * > & | blades | ) |
PixelForwardLayer::~PixelForwardLayer | ( | ) |
virtual const std::vector<const GeomDet*>& PixelForwardLayer::basicComponents | ( | ) | const [inline, virtual] |
Implements GeometricSearchDet.
Definition at line 21 of file PixelForwardLayer.h.
References theBasicComps.
00021 {return theBasicComps;}
virtual const std::vector<const GeometricSearchDet*>& PixelForwardLayer::components | ( | ) | const [inline, virtual] |
Returns basic components, if any.
Returns direct components, if any
Implements GeometricSearchDet.
Definition at line 23 of file PixelForwardLayer.h.
References theComps.
00023 {return theComps;}
PixelForwardLayer::SubTurbineCrossings PixelForwardLayer::computeCrossings | ( | const TrajectoryStateOnSurface & | startingState, | |
PropagationDirection | propDir | |||
) | const [private] |
Definition at line 182 of file PixelForwardLayer.cc.
References PeriodicBinFinderInPhi< T >::binIndex(), TrajectoryStateOnSurface::globalMomentum(), TrajectoryStateOnSurface::globalPosition(), HelixArbitraryPlaneCrossing2Order::pathLength(), PV3DBase< T, PVType, FrameType >::phi(), HelixArbitraryPlaneCrossing2Order::position(), GloballyPositioned< T >::position(), rho, ForwardDetLayer::specificSurface(), ForwardDetLayer::surface(), theBinFinder, theComps, GloballyPositioned< T >::toLocal(), TrajectoryStateOnSurface::transverseCurvature(), and PV3DBase< T, PVType, FrameType >::x().
Referenced by groupedCompatibleDetsV().
00184 { 00185 typedef MeasurementEstimator::Local2DVector Local2DVector; 00186 00187 HelixPlaneCrossing::PositionType startPos( startingState.globalPosition()); 00188 HelixPlaneCrossing::DirectionType startDir( startingState.globalMomentum()); 00189 float rho( startingState.transverseCurvature()); 00190 00191 HelixArbitraryPlaneCrossing turbineCrossing( startPos, startDir, rho, 00192 propDir); 00193 00194 pair<bool,double> thePath = turbineCrossing.pathLength( specificSurface() ); 00195 00196 if (!thePath.first) { 00197 //edm::LogInfo("TkDetLayers") << "ERROR in PixelForwardLayer: disk not crossed by track" ; 00198 return SubTurbineCrossings(); 00199 } 00200 00201 HelixPlaneCrossing::PositionType turbinePoint( turbineCrossing.position(thePath.second)); 00202 HelixPlaneCrossing::DirectionType turbineDir( turbineCrossing.direction(thePath.second)); 00203 int closestIndex = theBinFinder.binIndex(turbinePoint.phi()); 00204 00205 const BoundPlane& closestPlane( static_cast<const BoundPlane&>( 00206 theComps[closestIndex]->surface())); 00207 00208 00209 HelixArbitraryPlaneCrossing2Order theBladeCrossing(turbinePoint, turbineDir, rho); 00210 00211 pair<bool,double> theClosestBladePath = theBladeCrossing.pathLength( closestPlane ); 00212 LocalPoint closestPos = closestPlane.toLocal(GlobalPoint(theBladeCrossing.position(theClosestBladePath.second)) ); 00213 00214 float closestDist = closestPos.x(); // use fact that local X perp to global Y 00215 00216 //int next = turbinePoint.phi() - closestPlane.position().phi() > 0 ? closest+1 : closest-1; 00217 int nextIndex = PhiLess()( closestPlane.position().phi(), turbinePoint.phi()) ? 00218 closestIndex+1 : closestIndex-1; 00219 00220 const BoundPlane& nextPlane( static_cast<const BoundPlane&>( 00221 theComps[ theBinFinder.binIndex(nextIndex)]->surface())); 00222 00223 pair<bool,double> theNextBladePath = theBladeCrossing.pathLength( nextPlane ); 00224 LocalPoint nextPos = nextPlane.toLocal(GlobalPoint(theBladeCrossing.position(theNextBladePath.second)) ); 00225 00226 float nextDist = nextPos.x(); 00227 00228 if (fabs(closestDist) < fabs(nextDist)) { 00229 return SubTurbineCrossings( closestIndex, nextIndex, nextDist); 00230 } 00231 else { 00232 return SubTurbineCrossings( nextIndex, closestIndex, closestDist); 00233 } 00234 }
int PixelForwardLayer::computeHelicity | ( | const GeometricSearchDet * | firstBlade, | |
const GeometricSearchDet * | secondBlade | |||
) | const [private] |
Definition at line 175 of file PixelForwardLayer.cc.
References GeometricSearchDet::position(), and PV3DBase< T, PVType, FrameType >::z().
Referenced by groupedCompatibleDetsV().
00176 { 00177 if( fabs(firstBlade->position().z()) < fabs(secondBlade->position().z()) ) return 0; 00178 return 1; 00179 }
float PixelForwardLayer::computeWindowSize | ( | const GeomDet * | det, | |
const TrajectoryStateOnSurface & | tsos, | |||
const MeasurementEstimator & | est | |||
) | const [private] |
Definition at line 237 of file PixelForwardLayer.cc.
References MeasurementEstimator::maximalLocalDisplacement(), GeomDet::surface(), and x.
Referenced by groupedCompatibleDetsV().
00240 { 00241 return est.maximalLocalDisplacement(tsos, det->surface()).x(); 00242 }
void PixelForwardLayer::groupedCompatibleDetsV | ( | const TrajectoryStateOnSurface & | tsos, | |
const Propagator & | prop, | |||
const MeasurementEstimator & | est, | |||
std::vector< DetGroup > & | result | |||
) | const [virtual] |
Reimplemented from GeometricSearchDet.
Definition at line 72 of file PixelForwardLayer.cc.
References reco::fitHelper::add(), PeriodicBinFinderInPhi< T >::binIndex(), PixelForwardLayer::SubTurbineCrossings::closestIndex, computeCrossings(), computeHelicity(), computeWindowSize(), PixelForwardLayer::SubTurbineCrossings::isValid, PixelForwardLayer::SubTurbineCrossings::nextIndex, DetGroupMerger::orderAndMergeTwoLevels(), Propagator::propagationDirection(), searchNeighbors(), theBinFinder, and theComps.
00075 { 00076 vector<DetGroup> closestResult; 00077 SubTurbineCrossings crossings; 00078 00079 crossings = computeCrossings( tsos, prop.propagationDirection()); 00080 if (!crossings.isValid){ 00081 //edm::LogInfo("TkDetLayers") << "computeCrossings returns invalid in PixelForwardLayer::groupedCompatibleDets:"; 00082 return; 00083 } 00084 00085 typedef CompatibleDetToGroupAdder Adder; 00086 Adder::add( *theComps[theBinFinder.binIndex(crossings.closestIndex)], 00087 tsos, prop, est, closestResult); 00088 00089 if(closestResult.empty()){ 00090 Adder::add( *theComps[theBinFinder.binIndex(crossings.nextIndex)], 00091 tsos, prop, est, result); 00092 return; 00093 } 00094 00095 DetGroupElement closestGel( closestResult.front().front()); 00096 float window = computeWindowSize( closestGel.det(), closestGel.trajectoryState(), est); 00097 00098 //float detWidth = closestGel.det()->surface().bounds().width(); 00099 //if (crossings.nextDistance < detWidth + window) { 00100 vector<DetGroup> nextResult; 00101 if (Adder::add( *theComps[theBinFinder.binIndex(crossings.nextIndex)], 00102 tsos, prop, est, nextResult)) { 00103 int crossingSide = LayerCrossingSide().endcapSide( tsos, prop); 00104 int theHelicity = computeHelicity(theComps[theBinFinder.binIndex(crossings.closestIndex)], 00105 theComps[theBinFinder.binIndex(crossings.nextIndex)] ); 00106 DetGroupMerger::orderAndMergeTwoLevels( closestResult, nextResult, result, 00107 theHelicity, crossingSide); 00108 } 00109 else { 00110 result.swap(closestResult); 00111 } 00112 00113 /* 00114 } 00115 else { 00116 result.swap(closestResult); 00117 } 00118 */ 00119 00120 // --- THIS lines may speed up the reconstruction. But it reduces slightly the efficiency. 00121 // only loop over neighbors (other than closest and next) if window is BIG 00122 //if (window > 0.5*detWidth) { 00123 searchNeighbors( tsos, prop, est, crossings, window, result); 00124 //} 00125 }
void PixelForwardLayer::searchNeighbors | ( | const TrajectoryStateOnSurface & | tsos, | |
const Propagator & | prop, | |||
const MeasurementEstimator & | est, | |||
const SubTurbineCrossings & | crossings, | |||
float | window, | |||
std::vector< DetGroup > & | result | |||
) | const [private] |
Referenced by groupedCompatibleDetsV().
virtual SubDetector PixelForwardLayer::subDetector | ( | ) | const [inline, virtual] |
The type of detector (PixelBarrel, PixelEndcap, TIB, TOB, TID, TEC, CSC, DT, RPCBarrel, RPCEndcap).
Implements DetLayer.
Definition at line 31 of file PixelForwardLayer.h.
References GeomDetEnumerators::PixelEndcap.
00031 {return GeomDetEnumerators::PixelEndcap;}
std::vector<const GeomDet*> PixelForwardLayer::theBasicComps [private] |
BinFinderType PixelForwardLayer::theBinFinder [private] |
Definition at line 66 of file PixelForwardLayer.h.
Referenced by computeCrossings(), and groupedCompatibleDetsV().
std::vector<const GeometricSearchDet*> PixelForwardLayer::theComps [private] |
Definition at line 68 of file PixelForwardLayer.h.
Referenced by components(), computeCrossings(), groupedCompatibleDetsV(), and ~PixelForwardLayer().