19 #include <boost/function.hpp>
26 std::vector<const GeomDet*>& outerDets):
28 theFrontDets(innerDets.
begin(),innerDets.
end()),
29 theBackDets(outerDets.
begin(),outerDets.
end())
31 theDets.assign(theFrontDets.begin(),theFrontDets.end());
32 theDets.insert(theDets.end(),theBackDets.begin(),theBackDets.end());
44 theFrontBinFinder = BinFinderType( theFrontDets.front()->surface().position().phi(),
46 theBackBinFinder = BinFinderType( theBackDets.front()->surface().position().phi(),
51 LogDebug(
"TkDetLayers") <<
"DEBUG INFO for TIDRing" ;
52 for(vector<const GeomDet*>::const_iterator it=theFrontDets.begin();
53 it!=theFrontDets.end(); it++){
54 LogDebug(
"TkDetLayers") <<
"frontDet phi,z,r: "
55 << (*it)->surface().position().phi() <<
" , "
56 << (*it)->surface().position().z() <<
" , "
57 << (*it)->surface().position().perp() ;
60 for(vector<const GeomDet*>::const_iterator it=theBackDets.begin();
61 it!=theBackDets.end(); it++){
62 LogDebug(
"TkDetLayers") <<
"backDet phi,z,r: "
63 << (*it)->surface().position().phi() <<
" , "
64 << (*it)->surface().position().z() <<
" , "
65 << (*it)->surface().position().perp() ;
75 const vector<const GeometricSearchDet*>&
82 pair<bool, TrajectoryStateOnSurface>
85 edm::LogError(
"TkDetLayers") <<
"temporary dummy implementation of TIDRing::compatible()!!" ;
86 return pair<bool,TrajectoryStateOnSurface>();
95 std::vector<DetGroup>&
result)
const
99 if(! crossings.
isValid())
return;
101 std::vector<DetGroup> closestResult;
102 addClosest( tsos, prop, est, crossings.
closest(), closestResult);
103 if (closestResult.empty())
return;
107 searchNeighbors( tsos, prop, est, crossings.
closest(), phiWindow,
108 closestResult,
false);
110 vector<DetGroup> nextResult;
111 searchNeighbors( tsos, prop, est, crossings.
other(), phiWindow,
130 HelixForwardPlaneCrossing crossing(startPos,startDir,rho,propDir);
132 pair<bool,double> frontPath = crossing.pathLength( *theFrontDisk);
135 pair<bool,double> backPath = crossing.pathLength( *theBackDisk);
138 GlobalPoint gFrontPoint(crossing.position(frontPath.second));
139 GlobalPoint gBackPoint( crossing.position(backPath.second));
141 int frontIndex = theFrontBinFinder.binIndex(gFrontPoint.barePhi());
144 int backIndex = theBackBinFinder.binIndex(gBackPoint.barePhi());
150 theFrontDets[frontIndex]->surface().phi()));
152 theBackDets[backIndex]->surface().phi()));
155 if (frontDist < backDist) {
167 vector<DetGroup>& result)
const
169 const vector<const GeomDet*>& sub( subLayer( crossing.
subLayerIndex()));
181 vector<DetGroup>& result,
182 bool checkClosest)
const
186 const vector<const GeomDet*>& sLayer( subLayer( crossing.
subLayerIndex()));
189 int negStartIndex = closestIndex-1;
190 int posStartIndex = closestIndex+1;
194 posStartIndex = closestIndex;
197 negStartIndex = closestIndex;
201 const BinFinderType& binFinder = (crossing.
subLayerIndex()==0 ? theFrontBinFinder : theBackBinFinder);
204 int half = sLayer.size()/2;
205 for (
int idet=negStartIndex; idet >= negStartIndex - half; idet--) {
206 const GeomDet & neighborDet = *sLayer[binFinder.binIndex(idet)];
208 if (!
Adder::add( neighborDet, tsos, prop, est, result))
break;
211 for (
int idet=posStartIndex; idet < posStartIndex + half; idet++) {
212 const GeomDet & neighborDet = *sLayer[binFinder.binIndex(idet)];
214 if (!
Adder::add( neighborDet, tsos, prop, est, result))
break;
int closestDetIndex() const
GlobalPoint globalPosition() const
void add(const std::vector< const T * > &source, std::vector< const T * > &dest)
bool overlapInPhi(float phi, const GeomDet &det, float phiWindow)
virtual PropagationDirection propagationDirection() const GCC11_FINAL
const GlobalPoint & position() const
float computeWindowSize(const GeomDet *det, const TrajectoryStateOnSurface &tsos, const MeasurementEstimator &est)
int subLayerIndex() const
Abs< T >::type abs(const T &t)
static int endcapSide(const TrajectoryStateOnSurface &startingState, const Propagator &prop)
std::pair< const GeomDet *, TrajectoryStateOnSurface > DetWithState
bool phiLess(float phi1, float phi2)
const SubLayerCrossing & other() const
static bool add(const GeometricSearchDet &det, const TrajectoryStateOnSurface &tsos, const Propagator &prop, const MeasurementEstimator &est, std::vector< DetGroup > &result) __attribute__((hot))
const SubLayerCrossing & closest() const
GlobalVector globalMomentum() const
std::pair< const GeomDet *, TrajectoryStateOnSurface > DetWithState
static void orderAndMergeTwoLevels(std::vector< DetGroup > &&one, std::vector< DetGroup > &&two, std::vector< DetGroup > &result, int firstIndex, int firstCrossed)
double transverseCurvature() const