18 #include <boost/function.hpp> 37 vector<const GeomDet*>& outerDets):
38 theFrontDets(innerDets.
begin(),innerDets.
end()), theBackDets(outerDets.
begin(),outerDets.
end())
53 LogDebug(
"TkDetLayers") <<
"DEBUG INFO for CompositeTECWedge" <<
"\n" 54 <<
"TECWedge z, perp,innerRadius,outerR: " 61 for(vector<const GeomDet*>::const_iterator it=
theFrontDets.begin();
63 LogDebug(
"TkDetLayers") <<
"frontDet phi,z,r: " 64 << (*it)->surface().position().phi() <<
" , " 65 << (*it)->surface().position().z() <<
" , " 66 << (*it)->surface().position().perp();
69 for(vector<const GeomDet*>::const_iterator it=
theBackDets.begin();
71 LogDebug(
"TkDetLayers") <<
"backDet phi,z,r: " 72 << (*it)->surface().phi() <<
" , " 73 << (*it)->surface().position().z() <<
" , " 74 << (*it)->surface().position().perp() ;
86 const vector<const GeometricSearchDet*>&
88 throw DetLayerException(
"CompositeTECWedge doesn't have GeometricSearchDet components");
92 pair<bool, TrajectoryStateOnSurface>
95 edm::LogError(
"TkDetLayers") <<
"temporary dummy implementation of CompositeTECWedge::compatible()!!" ;
96 return pair<bool,TrajectoryStateOnSurface>();
104 std::vector<DetGroup> &
result)
const{
107 if(! crossings.
isValid())
return;
109 std::vector<DetGroup> closestResult;
113 <<
"in CompositeTECWedge::groupedCompatibleDets,closestResult.size(): " 114 << closestResult.size() ;
116 if (closestResult.empty())
return;
122 closestResult,
false);
124 std::vector<DetGroup> nextResult;
161 <<
"in TECWedge,front crossing r,z,phi: (" 162 << gFrontPoint.perp() <<
"," 163 << gFrontPoint.z() <<
"," 164 << gFrontPoint.phi() <<
")" ;
167 <<
"in TECWedge,back crossing r,z,phi: (" 168 << gBackPoint.perp() <<
"," 169 << gBackPoint.z() <<
"," 170 << gBackPoint.phi() <<
")" << endl;
195 if (frontDist < backDist) {
208 vector<DetGroup>&
result)
const 213 <<
"in CompositeTECWedge,adding GeomDet at r,z,phi: (" 229 bool checkClosest)
const 236 int negStartIndex = closestIndex-1;
237 int posStartIndex = closestIndex+1;
241 posStartIndex = closestIndex;
244 negStartIndex = closestIndex;
249 for (
int idet=negStartIndex; idet >= 0; idet--) {
252 if (!
Adder::add( *sWedge[idet], tsos, prop, est, result))
break;
254 for (
int idet=posStartIndex; idet < static_cast<int>(sWedge.size()); idet++) {
257 if (!
Adder::add( *sWedge[idet], tsos, prop, est, result))
break;
269 auto closeDist =
std::abs( (myDets.front()->toLocal(startPos)).
x());
270 for (
unsigned int i = 1;
i < myDets.size();
i++ ) {
272 if ( dist < closeDist ) {
virtual const std::vector< const GeometricSearchDet * > & components() const __attribute__((cold))
Returns basic components, if any.
CompositeTECWedge(std::vector< const GeomDet * > &innerDets, std::vector< const GeomDet * > &outerDets) __attribute__((cold))
virtual PositionType position(double s) const
std::vector< const GeomDet * > theDets
int closestDetIndex() const
GlobalPoint globalPosition() const
void add(const std::vector< const T * > &source, std::vector< const T * > &dest)
GeometricSearchDet::DetWithState DetWithState
SubLayerCrossings computeCrossings(const TrajectoryStateOnSurface &tsos, PropagationDirection propDir) const __attribute__((hot))
LocalVector toLocal(const reco::Track::Vector &v, const Surface &s)
bool overlapInPhi(float phi, const GeomDet &det, float phiWindow)
const Plane & surface() const
The nominal surface of the GeomDet.
ReferenceCountingPointer< BoundDiskSector > theDiskSector
virtual std::pair< bool, TrajectoryStateOnSurface > compatible(const TrajectoryStateOnSurface &ts, const Propagator &, const MeasurementEstimator &) const __attribute__((cold))
const GlobalPoint & position() const
std::vector< const GeomDet * > theFrontDets
float computeWindowSize(const GeomDet *det, const TrajectoryStateOnSurface &tsos, const MeasurementEstimator &est)
int findClosestDet(const GlobalPoint &startPos, int sectorId) const
const std::vector< const GeomDet * > & subWedge(int ind) const
virtual PropagationDirection propagationDirection() const final
std::vector< const GeomDet * > theBackDets
int subLayerIndex() const
Abs< T >::type abs(const T &t)
static int endcapSide(const TrajectoryStateOnSurface &startingState, const Propagator &prop)
def window(xmin, xmax, ymin, ymax, x=0, y=0, width=100, height=100, xlogbase=None, ylogbase=None, minusInfinity=-1000, flipx=False, flipy=True)
~CompositeTECWedge() __attribute__((cold))
ReferenceCountingPointer< BoundDiskSector > theBackSector
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))
virtual void groupedCompatibleDetsV(const TrajectoryStateOnSurface &startingState, const Propagator &prop, const MeasurementEstimator &est, std::vector< DetGroup > &result) const __attribute__((hot))
virtual const Surface::PositionType & position() const
Returns position of the surface.
void searchNeighbors(const TrajectoryStateOnSurface &tsos, const Propagator &prop, const MeasurementEstimator &est, const SubLayerCrossing &crossing, float window, std::vector< DetGroup > &result, bool checkClosest) const __attribute__((hot))
const SubLayerCrossing & closest() const
GlobalVector globalMomentum() const
bool addClosest(const TrajectoryStateOnSurface &tsos, const Propagator &prop, const MeasurementEstimator &est, const SubLayerCrossing &crossing, std::vector< DetGroup > &result) const __attribute__((hot))
virtual std::pair< bool, double > pathLength(const Plane &plane)
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)
ReferenceCountingPointer< BoundDiskSector > theFrontSector
double transverseCurvature() const