19 #include <boost/function.hpp>
26 vector<const GeomDet*>& outerDets):
27 theFrontDets(innerDets.
begin(),innerDets.
end()),
28 theBackDets(outerDets.
begin(),outerDets.
end())
30 theDets.assign(theFrontDets.begin(),theFrontDets.end());
31 theDets.insert(theDets.end(),theBackDets.begin(),theBackDets.end());
43 theFrontBinFinder = BinFinderType( theFrontDets.front()->surface().position().phi(),
45 theBackBinFinder = BinFinderType( theBackDets.front()->surface().position().phi(),
50 LogDebug(
"TkDetLayers") <<
"DEBUG INFO for TIDRing" ;
51 for(vector<const GeomDet*>::const_iterator it=theFrontDets.begin();
52 it!=theFrontDets.end(); it++){
53 LogDebug(
"TkDetLayers") <<
"frontDet phi,z,r: "
54 << (*it)->surface().position().phi() <<
" , "
55 << (*it)->surface().position().z() <<
" , "
56 << (*it)->surface().position().perp() ;
59 for(vector<const GeomDet*>::const_iterator it=theBackDets.begin();
60 it!=theBackDets.end(); it++){
61 LogDebug(
"TkDetLayers") <<
"backDet phi,z,r: "
62 << (*it)->surface().position().phi() <<
" , "
63 << (*it)->surface().position().z() <<
" , "
64 << (*it)->surface().position().perp() ;
74 const vector<const GeometricSearchDet*>&
81 pair<bool, TrajectoryStateOnSurface>
84 edm::LogError(
"TkDetLayers") <<
"temporary dummy implementation of TIDRing::compatible()!!" ;
85 return pair<bool,TrajectoryStateOnSurface>();
94 std::vector<DetGroup>&
result)
const
98 if(! crossings.
isValid())
return;
100 std::vector<DetGroup> closestResult;
101 addClosest( tsos, prop, est, crossings.
closest(), closestResult);
102 if (closestResult.empty())
return;
106 searchNeighbors( tsos, prop, est, crossings.
closest(), phiWindow,
107 closestResult,
false);
109 vector<DetGroup> nextResult;
110 searchNeighbors( tsos, prop, est, crossings.
other(), phiWindow,
127 HelixForwardPlaneCrossing crossing(startPos,startDir,
rho,propDir);
129 pair<bool,double> frontPath = crossing.pathLength( *theFrontDisk);
132 GlobalPoint gFrontPoint(crossing.position(frontPath.second));
134 int frontIndex = theFrontBinFinder.binIndex(gFrontPoint.phi());
139 pair<bool,double> backPath = crossing.pathLength( *theBackDisk);
142 GlobalPoint gBackPoint( crossing.position(backPath.second));
143 int backIndex = theBackBinFinder.binIndex(gBackPoint.phi());
149 double(theFrontDets[frontIndex]->surface().phi())));
151 double(theBackDets[backIndex]->surface().phi())));
154 if (frontDist < backDist) {
166 vector<DetGroup>& result)
const
168 const vector<const GeomDet*>& sub( subLayer( crossing.
subLayerIndex()));
180 vector<DetGroup>& result,
181 bool checkClosest)
const
185 const vector<const GeomDet*>& sLayer( subLayer( crossing.
subLayerIndex()));
188 int negStartIndex = closestIndex-1;
189 int posStartIndex = closestIndex+1;
193 posStartIndex = closestIndex;
196 negStartIndex = closestIndex;
200 const BinFinderType& binFinder = (crossing.
subLayerIndex()==0 ? theFrontBinFinder : theBackBinFinder);
203 int half = sLayer.size()/2;
204 for (
int idet=negStartIndex; idet >= negStartIndex - half; idet--) {
205 const GeomDet & neighborDet = *sLayer[binFinder.binIndex(idet)];
207 if (!
Adder::add( neighborDet, tsos, prop, est, result))
break;
210 for (
int idet=posStartIndex; idet < posStartIndex + half; idet++) {
211 const GeomDet & neighborDet = *sLayer[binFinder.binIndex(idet)];
213 if (!
Adder::add( neighborDet, tsos, prop, est, result))
break;
int closestDetIndex() const
double deltaPhi(float phi1, float phi2)
GlobalPoint globalPosition() const
void add(const std::vector< const T * > &source, std::vector< const T * > &dest)
virtual PropagationDirection propagationDirection() const GCC11_FINAL
const GlobalPoint & position() const
float computeWindowSize(const GeomDet *det, const TrajectoryStateOnSurface &tsos, const MeasurementEstimator &est)
int endcapSide(const TrajectoryStateOnSurface &startingState, const Propagator &prop) const
int subLayerIndex() const
bool overlapInPhi(const GlobalPoint &crossPoint, const GeomDet &det, float phiWindow)
Abs< T >::type abs(const T &t)
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)
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