#include <RecoTracker/TkDetLayers/interface/TECLayer.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 |
virtual SubDetector | subDetector () const |
The type of detector (PixelBarrel, PixelEndcap, TIB, TOB, TID, TEC, CSC, DT, RPCBarrel, RPCEndcap). | |
TECLayer (std::vector< const TECPetal * > &innerPetals, std::vector< const TECPetal * > &outerPetals) | |
~TECLayer () | |
Protected Types | |
typedef PeriodicBinFinderInPhi < double > | BinFinderPhi |
Protected Member Functions | |
virtual BoundDisk * | computeDisk (std::vector< const GeometricSearchDet * > &petals) const |
Protected Attributes | |
BinFinderPhi | theBackBinFinder |
std::vector< const GeometricSearchDet * > | theBackComps |
ReferenceCountingPointer < BoundDisk > | theBackDisk |
std::vector< const GeomDet * > | theBasicComps |
std::vector< const GeometricSearchDet * > | theComps |
BinFinderPhi | theFrontBinFinder |
std::vector< const GeometricSearchDet * > | theFrontComps |
ReferenceCountingPointer < BoundDisk > | theFrontDisk |
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 &startingState, PropagationDirection propDir) const |
bool | overlap (const GlobalPoint &gpos, const GeometricSearchDet &petal, float window) 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 GeometricSearchDet * > & | subLayer (int ind) const |
Definition at line 15 of file TECLayer.h.
typedef PeriodicBinFinderInPhi<double> TECLayer::BinFinderPhi [protected] |
Definition at line 76 of file TECLayer.h.
TECLayer::TECLayer | ( | std::vector< const TECPetal * > & | innerPetals, | |
std::vector< const TECPetal * > & | outerPetals | |||
) |
TECLayer::~TECLayer | ( | ) |
bool TECLayer::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*>& TECLayer::basicComponents | ( | ) | const [inline, virtual] |
Implements GeometricSearchDet.
Definition at line 23 of file TECLayer.h.
References theBasicComps.
00023 {return theBasicComps;}
virtual const std::vector<const GeometricSearchDet*>& TECLayer::components | ( | ) | const [inline, virtual] |
Returns basic components, if any.
Returns direct components, if any
Implements GeometricSearchDet.
Definition at line 25 of file TECLayer.h.
References theComps.
00025 {return theComps;}
SubLayerCrossings TECLayer::computeCrossings | ( | const TrajectoryStateOnSurface & | startingState, | |
PropagationDirection | propDir | |||
) | const [private] |
Definition at line 132 of file TECLayer.cc.
References funct::abs(), PeriodicBinFinderInPhi< T >::binIndex(), Geom::deltaPhi(), lat::endl(), TrajectoryStateOnSurface::globalMomentum(), TrajectoryStateOnSurface::globalPosition(), LogDebug, GloballyPositioned< T >::phi(), rho, ForwardDetLayer::surface(), theBackBinFinder, theBackComps, theBackDisk, theFrontBinFinder, theFrontComps, theFrontDisk, and TrajectoryStateOnSurface::transverseCurvature().
Referenced by groupedCompatibleDetsV().
00134 { 00135 double rho( startingState.transverseCurvature()); 00136 00137 HelixPlaneCrossing::PositionType startPos( startingState.globalPosition() ); 00138 HelixPlaneCrossing::DirectionType startDir( startingState.globalMomentum() ); 00139 HelixForwardPlaneCrossing crossing(startPos,startDir,rho,propDir); 00140 00141 pair<bool,double> frontPath = crossing.pathLength( *theFrontDisk); 00142 if (!frontPath.first) SubLayerCrossings(); 00143 00144 00145 GlobalPoint gFrontPoint(crossing.position(frontPath.second)); 00146 LogDebug("TkDetLayers") 00147 << "in TECLayer,front crossing point: r,z,phi: (" 00148 << gFrontPoint.perp() << "," 00149 << gFrontPoint.z() << "," 00150 << gFrontPoint.phi() << ")" << endl; 00151 00152 00153 int frontIndex = theFrontBinFinder.binIndex(gFrontPoint.barePhi()); 00154 SubLayerCrossing frontSLC( 0, frontIndex, gFrontPoint); 00155 00156 00157 00158 pair<bool,double> backPath = crossing.pathLength( *theBackDisk); 00159 if (!backPath.first) SubLayerCrossings(); 00160 00161 00162 GlobalPoint gBackPoint( crossing.position(backPath.second)); 00163 LogDebug("TkDetLayers") 00164 << "in TECLayer,back crossing point: r,z,phi: (" 00165 << gBackPoint.perp() << "," 00166 << gFrontPoint.z() << "," 00167 << gBackPoint.phi() << ")" << endl; 00168 00169 00170 int backIndex = theBackBinFinder.binIndex(gBackPoint.barePhi()); 00171 SubLayerCrossing backSLC( 1, backIndex, gBackPoint); 00172 00173 00174 // 0ss: frontDisk has index=0, backDisk has index=1 00175 float frontDist = std::abs(Geom::deltaPhi( double(gFrontPoint.barePhi()), 00176 double(theFrontComps[frontIndex]->surface().phi()))); 00177 float backDist = std::abs(Geom::deltaPhi( double(gBackPoint.barePhi()), 00178 double(theBackComps[backIndex]->surface().phi()))); 00179 00180 00181 if (frontDist < backDist) { 00182 return SubLayerCrossings( frontSLC, backSLC, 0); 00183 } 00184 else { 00185 return SubLayerCrossings( backSLC, frontSLC, 1); 00186 } 00187 }
virtual BoundDisk* TECLayer::computeDisk | ( | std::vector< const GeometricSearchDet * > & | petals | ) | const [protected, virtual] |
void TECLayer::groupedCompatibleDetsV | ( | const TrajectoryStateOnSurface & | tsos, | |
const Propagator & | prop, | |||
const MeasurementEstimator & | est, | |||
std::vector< DetGroup > & | result | |||
) | const [virtual] |
Reimplemented from GeometricSearchDet.
Definition at line 92 of file TECLayer.cc.
References addClosest(), SubLayerCrossings::closest(), SubLayerCrossings::closestIndex(), computeCrossings(), tkDetUtil::computeWindowSize(), SubLayerCrossings::isValid(), LogDebug, DetGroupMerger::orderAndMergeTwoLevels(), SubLayerCrossings::other(), Propagator::propagationDirection(), and searchNeighbors().
00095 { 00096 SubLayerCrossings crossings; 00097 crossings = computeCrossings( tsos, prop.propagationDirection()); 00098 if(! crossings.isValid()) return; 00099 00100 vector<DetGroup> closestResult; 00101 addClosest( tsos, prop, est, crossings.closest(), closestResult); 00102 LogDebug("TkDetLayers") << "in TECLayer, closestResult.size(): " << closestResult.size(); 00103 00104 // this differs from other groupedCompatibleDets logic, which DON'T check next in such cases!!! 00105 if(closestResult.empty()){ 00106 vector<DetGroup> nextResult; 00107 addClosest( tsos, prop, est, crossings.other(), nextResult); 00108 LogDebug("TkDetLayers") << "in TECLayer, nextResult.size(): " << nextResult.size(); 00109 if(nextResult.empty()) return; 00110 00111 00112 DetGroupElement nextGel( nextResult.front().front()); 00113 int crossingSide = LayerCrossingSide().endcapSide( nextGel.trajectoryState(), prop); 00114 DetGroupMerger::orderAndMergeTwoLevels( closestResult, nextResult, result, 00115 crossings.closestIndex(), crossingSide); 00116 } 00117 else { 00118 DetGroupElement closestGel( closestResult.front().front()); 00119 float phiWindow = tkDetUtil::computeWindowSize( closestGel.det(), closestGel.trajectoryState(), est); 00120 searchNeighbors( tsos, prop, est, crossings.closest(), phiWindow, 00121 closestResult, false); 00122 vector<DetGroup> nextResult; 00123 searchNeighbors( tsos, prop, est, crossings.other(), phiWindow, 00124 nextResult, true); 00125 00126 int crossingSide = LayerCrossingSide().endcapSide( closestGel.trajectoryState(), prop); 00127 DetGroupMerger::orderAndMergeTwoLevels( closestResult, nextResult, result, 00128 crossings.closestIndex(), crossingSide); 00129 } 00130 }
bool TECLayer::overlap | ( | const GlobalPoint & | gpos, | |
const GeometricSearchDet & | petal, | |||
float | window | |||
) | const [private] |
Definition at line 250 of file TECLayer.cc.
References PV3DBase< T, PVType, FrameType >::barePhi(), phi, GloballyPositioned< T >::phi(), BoundDiskSector::phiExtension(), rangesIntersect(), and GeometricSearchDet::surface().
00251 { 00252 float phi = gpos.barePhi(); 00253 const BoundDiskSector& diskSector = static_cast<const BoundDiskSector&>(gsdet.surface()); 00254 pair<float,float> phiRange(phi-phiWin,phi+phiWin); 00255 pair<float,float> petalPhiRange(diskSector.phi() - 0.5*diskSector.phiExtension(), 00256 diskSector.phi() + 0.5*diskSector.phiExtension()); 00257 00258 00259 return rangesIntersect(phiRange, petalPhiRange, PhiLess()); 00260 }
void TECLayer::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().
virtual SubDetector TECLayer::subDetector | ( | ) | const [inline, virtual] |
The type of detector (PixelBarrel, PixelEndcap, TIB, TOB, TID, TEC, CSC, DT, RPCBarrel, RPCEndcap).
Implements DetLayer.
Definition at line 33 of file TECLayer.h.
References GeomDetEnumerators::TEC.
00033 {return GeomDetEnumerators::TEC;}
const std::vector<const GeometricSearchDet*>& TECLayer::subLayer | ( | int | ind | ) | const [inline, private] |
Definition at line 59 of file TECLayer.h.
References theBackComps, and theFrontComps.
00059 { 00060 return (ind==0 ? theFrontComps : theBackComps); 00061 }
BinFinderPhi TECLayer::theBackBinFinder [protected] |
std::vector<const GeometricSearchDet*> TECLayer::theBackComps [protected] |
ReferenceCountingPointer<BoundDisk> TECLayer::theBackDisk [protected] |
std::vector<const GeomDet*> TECLayer::theBasicComps [protected] |
std::vector<const GeometricSearchDet*> TECLayer::theComps [protected] |
BinFinderPhi TECLayer::theFrontBinFinder [protected] |
std::vector<const GeometricSearchDet*> TECLayer::theFrontComps [protected] |
ReferenceCountingPointer<BoundDisk> TECLayer::theFrontDisk [protected] |