13 PixelRod::PixelRod(vector<const GeomDet*>& theInputDets):
16 theBinFinder = BinFinderType(theDets.begin(),theDets.end());
19 LogDebug(
"TkDetLayers") <<
"==== DEBUG PixelRod =====";
20 for (vector<const GeomDet*>::const_iterator
i=theDets.begin();
21 i != theDets.end();
i++){
22 LogDebug(
"TkDetLayers") <<
"PixelRod's Det pos z,perp,eta,phi: "
23 << (**i).position().z() <<
" , "
24 << (**i).position().perp() <<
" , "
25 << (**i).position().eta() <<
" , "
26 << (**i).position().phi() ;
28 LogDebug(
"TkDetLayers") <<
"==== end DEBUG PixelRod =====";
34 PixelRod::~PixelRod(){
38 const vector<const GeometricSearchDet*>&
44 pair<bool, TrajectoryStateOnSurface>
47 edm::LogError(
"TkDetLayers") <<
"temporary dummy implementation of PixelRod::compatible()!!" ;
48 return pair<bool,TrajectoryStateOnSurface>();
55 std::vector<DetWithState> &
result )
const
63 int closest = theBinFinder.binIndex(startPos.
z());
64 pair<bool,TrajectoryStateOnSurface> closestCompat =
65 theCompatibilityChecker.isCompatible(theDets[closest],startingState, prop, est);
67 if ( closestCompat.first) {
68 result.push_back(
DetWithState( theDets[closest], closestCompat.second));
70 if(!closestCompat.second.isValid())
return;
73 const Plane& closestPlane( theDets[closest]->specificSurface() );
75 Local2DVector maxDistance =
78 float detHalfLen = theDets[closest]->surface().bounds().length()/2.;
81 for (
size_t idet=closest+1; idet < theDets.size(); idet++) {
82 LocalPoint nextPos( theDets[idet]->surface().
toLocal( closestCompat.second.globalPosition()));
83 if (fabs(nextPos.y()) < detHalfLen + maxDistance.
y()) {
84 if ( !
add(idet, result, startingState, prop, est))
break;
90 for (
int idet=closest-1; idet >= 0; idet--) {
91 LocalPoint nextPos( theDets[idet]->surface().
toLocal( closestCompat.second.globalPosition()));
92 if (fabs(nextPos.y()) < detHalfLen + maxDistance.
y()) {
93 if ( !
add(idet, result, startingState, prop, est))
break;
105 std::vector<DetGroup> &)
const
107 LogDebug(
"TkDetLayers") <<
"dummy implementation of PixelRod::groupedCompatibleDets()" ;
GlobalPoint globalPosition() const
void add(const std::vector< const T * > &source, std::vector< const T * > &dest)
Vector2DBase< float, LocalTag > Local2DVector
LocalVector toLocal(const reco::Track::Vector &v, const Surface &s)
std::pair< const GeomDet *, TrajectoryStateOnSurface > DetWithState
virtual Local2DVector maximalLocalDisplacement(const TrajectoryStateOnSurface &ts, const Plane &plane) const
TrajectoryStateOnSurface propagate(STA const &state, SUR const &surface) const
std::pair< const GeomDet *, TrajectoryStateOnSurface > DetWithState