#include <RecoTracker/TkDetLayers/interface/PixelBarrelLayer.h>
Public Types | |
typedef PeriodicBinFinderInPhi < double > | BinFinderType |
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 |
PixelBarrelLayer (std::vector< const PixelRod * > &innerRods, std::vector< const PixelRod * > &outerRods) | |
virtual SubDetector | subDetector () const |
The type of detector (PixelBarrel, PixelEndcap, TIB, TOB, TID, TEC, CSC, DT, RPCBarrel, RPCEndcap). | |
~PixelBarrelLayer () | |
Private Member Functions | |
bool | addClosest (const TrajectoryStateOnSurface &tsos, const Propagator &prop, const MeasurementEstimator &est, const SubLayerCrossing &crossing, std::vector< DetGroup > &result) const |
double | calculatePhiWindow (double Xmax, const GeomDet &det, const TrajectoryStateOnSurface &state) const |
SubLayerCrossings | computeCrossings (const TrajectoryStateOnSurface &tsos, PropagationDirection propDir) const |
float | computeWindowSize (const GeomDet *det, const TrajectoryStateOnSurface &tsos, const MeasurementEstimator &est) const |
BoundCylinder * | cylinder (const std::vector< const GeometricSearchDet * > &rods) const |
bool | overlap (const GlobalPoint &gpos, const GeometricSearchDet &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 GeometricSearchDet * > & | subLayer (int ind) const |
Private Attributes | |
std::vector< const GeomDet * > | theBasicComps |
std::vector< const GeometricSearchDet * > | theComps |
BinFinderType | theInnerBinFinder |
std::vector< const GeometricSearchDet * > | theInnerComps |
ReferenceCountingPointer < BoundCylinder > | theInnerCylinder |
BinFinderType | theOuterBinFinder |
std::vector< const GeometricSearchDet * > | theOuterComps |
ReferenceCountingPointer < BoundCylinder > | theOuterCylinder |
Definition at line 16 of file PixelBarrelLayer.h.
typedef PeriodicBinFinderInPhi<double> PixelBarrelLayer::BinFinderType |
Definition at line 18 of file PixelBarrelLayer.h.
PixelBarrelLayer::PixelBarrelLayer | ( | std::vector< const PixelRod * > & | innerRods, | |
std::vector< const PixelRod * > & | outerRods | |||
) |
PixelBarrelLayer::~PixelBarrelLayer | ( | ) |
bool PixelBarrelLayer::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*>& PixelBarrelLayer::basicComponents | ( | ) | const [inline, virtual] |
Implements GeometricSearchDet.
Definition at line 28 of file PixelBarrelLayer.h.
References theBasicComps.
00028 {return theBasicComps;}
double PixelBarrelLayer::calculatePhiWindow | ( | double | Xmax, | |
const GeomDet & | det, | |||
const TrajectoryStateOnSurface & | state | |||
) | const [private] |
Definition at line 190 of file PixelBarrelLayer.cc.
References TrajectoryStateOnSurface::globalPosition(), TrajectoryStateOnSurface::localPosition(), min, PV3DBase< T, PVType, FrameType >::phi(), GeomDet::surface(), and Surface::toGlobal().
Referenced by computeWindowSize().
00192 { 00193 00194 LocalPoint startPoint = state.localPosition(); 00195 LocalVector shift( Xmax , 0. , 0.); 00196 LocalPoint shift1 = startPoint + shift; 00197 LocalPoint shift2 = startPoint + (-shift); 00198 //LocalPoint shift2( startPoint); //original code; 00199 //shift2 -= shift; 00200 00201 double phi1 = det.surface().toGlobal(shift1).phi(); 00202 double phi2 = det.surface().toGlobal(shift2).phi(); 00203 double phiStart = state.globalPosition().phi(); 00204 double phiWin = min(fabs(phiStart-phi1),fabs(phiStart-phi2)); 00205 00206 return phiWin; 00207 }
virtual const std::vector<const GeometricSearchDet*>& PixelBarrelLayer::components | ( | ) | const [inline, virtual] |
Returns basic components, if any.
Returns direct components, if any
Implements GeometricSearchDet.
Definition at line 30 of file PixelBarrelLayer.h.
References theComps.
00030 {return theComps;}
SubLayerCrossings PixelBarrelLayer::computeCrossings | ( | const TrajectoryStateOnSurface & | tsos, | |
PropagationDirection | propDir | |||
) | const [private] |
Definition at line 121 of file PixelBarrelLayer.cc.
References PeriodicBinFinderInPhi< T >::binIndex(), PeriodicBinFinderInPhi< T >::binPosition(), TrajectoryStateOnSurface::globalMomentum(), TrajectoryStateOnSurface::globalPosition(), HelixBarrelCylinderCrossing::hasSolution(), Geom::pi(), HelixBarrelCylinderCrossing::position(), rho, theInnerBinFinder, theInnerCylinder, theOuterBinFinder, theOuterCylinder, and TrajectoryStateOnSurface::transverseCurvature().
Referenced by groupedCompatibleDetsV().
00123 { 00124 GlobalPoint startPos( startingState.globalPosition()); 00125 GlobalVector startDir( startingState.globalMomentum()); 00126 double rho( startingState.transverseCurvature()); 00127 00128 HelixBarrelCylinderCrossing innerCrossing( startPos, startDir, rho, 00129 propDir,*theInnerCylinder); 00130 00131 if (!innerCrossing.hasSolution()) return SubLayerCrossings(); 00132 //{ 00133 //edm::LogInfo(TkDetLayers) << "ERROR in PixelBarrelLayer: inner cylinder not crossed by track" ; 00134 //throw DetLayerException("TkRodBarrelLayer: inner subRod not crossed by track"); 00135 //} 00136 00137 GlobalPoint gInnerPoint( innerCrossing.position()); 00138 int innerIndex = theInnerBinFinder.binIndex(gInnerPoint.phi()); 00139 float innerDist = theInnerBinFinder.binPosition(innerIndex) - gInnerPoint.phi(); 00140 SubLayerCrossing innerSLC( 0, innerIndex, gInnerPoint); 00141 00142 HelixBarrelCylinderCrossing outerCrossing( startPos, startDir, rho, 00143 propDir,*theOuterCylinder); 00144 00145 if (!outerCrossing.hasSolution()) return SubLayerCrossings(); 00146 //if (!outerCrossing.hasSolution()) { 00147 // throw DetLayerException("PixelBarrelLayer: inner cylinder not crossed by track"); 00148 //} 00149 00150 GlobalPoint gOuterPoint( outerCrossing.position()); 00151 int outerIndex = theOuterBinFinder.binIndex(gOuterPoint.phi()); 00152 float outerDist = theOuterBinFinder.binPosition(outerIndex) - gOuterPoint.phi() ; 00153 SubLayerCrossing outerSLC( 1, outerIndex, gOuterPoint); 00154 00155 innerDist *= PhiLess()( theInnerBinFinder.binPosition(innerIndex),gInnerPoint.phi()) ? -1. : 1.; 00156 outerDist *= PhiLess()( theOuterBinFinder.binPosition(outerIndex),gOuterPoint.phi()) ? -1. : 1.; 00157 if (innerDist < 0.) { innerDist += 2.*Geom::pi();} 00158 if (outerDist < 0.) { outerDist += 2.*Geom::pi();} 00159 00160 00161 if (innerDist < outerDist) { 00162 return SubLayerCrossings( innerSLC, outerSLC, 0); 00163 } 00164 else { 00165 return SubLayerCrossings( outerSLC, innerSLC, 1); 00166 } 00167 }
float PixelBarrelLayer::computeWindowSize | ( | const GeomDet * | det, | |
const TrajectoryStateOnSurface & | tsos, | |||
const MeasurementEstimator & | est | |||
) | const [private] |
Definition at line 180 of file PixelBarrelLayer.cc.
References calculatePhiWindow(), MeasurementEstimator::maximalLocalDisplacement(), GeomDet::surface(), and x.
Referenced by groupedCompatibleDetsV().
00183 { 00184 double xmax = 00185 est.maximalLocalDisplacement(tsos, det->surface()).x(); 00186 return calculatePhiWindow( xmax, *det, tsos); 00187 }
BoundCylinder* PixelBarrelLayer::cylinder | ( | const std::vector< const GeometricSearchDet * > & | rods | ) | const [private] |
void PixelBarrelLayer::groupedCompatibleDetsV | ( | const TrajectoryStateOnSurface & | tsos, | |
const Propagator & | prop, | |||
const MeasurementEstimator & | est, | |||
std::vector< DetGroup > & | result | |||
) | const [virtual] |
Reimplemented from GeometricSearchDet.
Definition at line 88 of file PixelBarrelLayer.cc.
References addClosest(), SubLayerCrossings::closest(), SubLayerCrossings::closestIndex(), computeCrossings(), computeWindowSize(), SubLayerCrossings::isValid(), DetGroupMerger::orderAndMergeTwoLevels(), SubLayerCrossings::other(), Propagator::propagationDirection(), and searchNeighbors().
00091 { 00092 vector<DetGroup> closestResult; 00093 SubLayerCrossings crossings; 00094 crossings = computeCrossings( tsos, prop.propagationDirection()); 00095 if(! crossings.isValid()) return; 00096 00097 addClosest( tsos, prop, est, crossings.closest(), closestResult); 00098 if (closestResult.empty()) { 00099 addClosest( tsos, prop, est, crossings.other(), result); 00100 return; 00101 } 00102 00103 DetGroupElement closestGel( closestResult.front().front()); 00104 float window = computeWindowSize( closestGel.det(), closestGel.trajectoryState(), est); 00105 00106 searchNeighbors( tsos, prop, est, crossings.closest(), window, 00107 closestResult, false); 00108 00109 vector<DetGroup> nextResult; 00110 searchNeighbors( tsos, prop, est, crossings.other(), window, 00111 nextResult, true); 00112 00113 int crossingSide = LayerCrossingSide().barrelSide( closestGel.trajectoryState(), prop); 00114 DetGroupMerger::orderAndMergeTwoLevels( closestResult, nextResult, result, 00115 crossings.closestIndex(), crossingSide); 00116 }
bool PixelBarrelLayer::overlap | ( | const GlobalPoint & | gpos, | |
const GeometricSearchDet & | rod, | |||
float | phiWin | |||
) | const [private] |
Definition at line 253 of file PixelBarrelLayer.cc.
References PV3DBase< T, PVType, FrameType >::phi(), BoundSurface::phiSpan(), rangesIntersect(), and GeometricSearchDet::surface().
00254 { 00255 GlobalPoint crossPoint(gpos); 00256 00257 // introduce offset (extrapolated point and true propagated point differ by 0.0003 - 0.00033, 00258 // due to thickness of Rod of 1 cm) 00259 const float phiOffset = 0.00034; //...TOBE CHECKED LATER... 00260 phiWin += phiOffset; 00261 00262 // detector phi range 00263 00264 pair<float,float> phiRange(crossPoint.phi()-phiWin, crossPoint.phi()+phiWin); 00265 00266 return rangesIntersect(phiRange, gsdet.surface().phiSpan(), PhiLess()); 00267 00268 }
void PixelBarrelLayer::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 PixelBarrelLayer::subDetector | ( | ) | const [inline, virtual] |
The type of detector (PixelBarrel, PixelEndcap, TIB, TOB, TID, TEC, CSC, DT, RPCBarrel, RPCEndcap).
Implements DetLayer.
Definition at line 39 of file PixelBarrelLayer.h.
References GeomDetEnumerators::PixelBarrel.
00039 { return GeomDetEnumerators::PixelBarrel;}
const std::vector<const GeometricSearchDet*>& PixelBarrelLayer::subLayer | ( | int | ind | ) | const [inline, private] |
Definition at line 74 of file PixelBarrelLayer.h.
References theInnerComps, and theOuterComps.
00074 { 00075 return (ind==0 ? theInnerComps : theOuterComps);}
std::vector<const GeomDet*> PixelBarrelLayer::theBasicComps [private] |
std::vector<const GeometricSearchDet*> PixelBarrelLayer::theComps [private] |
Definition at line 81 of file PixelBarrelLayer.h.
Referenced by components(), and ~PixelBarrelLayer().
std::vector<const GeometricSearchDet*> PixelBarrelLayer::theInnerComps [private] |
std::vector<const GeometricSearchDet*> PixelBarrelLayer::theOuterComps [private] |