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 ) {
CompositeTECWedge(std::vector< const GeomDet * > &innerDets, std::vector< const GeomDet * > &outerDets) __attribute__((cold))
std::vector< const GeomDet * > theDets
int closestDetIndex() const
GlobalPoint globalPosition() const
GeometricSearchDet::DetWithState DetWithState
SubLayerCrossings computeCrossings(const TrajectoryStateOnSurface &tsos, PropagationDirection propDir) const __attribute__((hot))
LocalVector toLocal(const reco::Track::Vector &v, const Surface &s)
~CompositeTECWedge() override __attribute__((cold))
bool overlapInPhi(float phi, const GeomDet &det, float phiWindow)
const Plane & surface() const
The nominal surface of the GeomDet.
ReferenceCountingPointer< BoundDiskSector > theDiskSector
std::pair< bool, TrajectoryStateOnSurface > compatible(const TrajectoryStateOnSurface &ts, const Propagator &, const MeasurementEstimator &) const override __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)
void groupedCompatibleDetsV(const TrajectoryStateOnSurface &startingState, const Propagator &prop, const MeasurementEstimator &est, std::vector< DetGroup > &result) const override __attribute__((hot))
def window(xmin, xmax, ymin, ymax, x=0, y=0, width=100, height=100, xlogbase=None, ylogbase=None, minusInfinity=-1000, flipx=False, flipy=True)
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))
void add(std::map< std::string, TH1 * > &h, TH1 *hist)
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))
std::pair< bool, double > pathLength(const Plane &plane) override
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))
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)
const std::vector< const GeometricSearchDet * > & components() const override __attribute__((cold))
Returns basic components, if any.
PositionType position(double s) const override
ReferenceCountingPointer< BoundDiskSector > theFrontSector
double transverseCurvature() const