31 return 0.5 * (
b->position().perp() +
a->position().perp());
33 float operator()(
float a,
float b)
const {
return 0.5 * (
b +
a); }
36 void fillBoundaries(std::vector<const TECWedge*>
const& dets, std::vector<float>& boundaries) {
37 boundaries.resize(dets.size());
42 std::adjacent_difference(boundaries.begin(), boundaries.end(), boundaries.begin(),
Mean());
45 inline int findBin(std::vector<float>
const& boundaries,
float r) {
46 return std::lower_bound(boundaries.begin() + 1, boundaries.end(), r) - boundaries.begin() - 1;
49 void fillPars(std::vector<const TECWedge*>
const& dets, std::vector<CompositeTECPetal::WedgePar>& pars) {
50 for (
auto gsdet : dets) {
54 float thetaWedgeMin = wedgeSector.
innerRadius() / wedgeMaxZ;
55 float thetaWedgeMax = wedgeSector.
outerRadius() / wedgeMinZ;
66 auto tsRadius = gpos.
perp();
69 auto rmax = (tsRadius +
ymax);
90 for (vector<const GeometricSearchDet*>::const_iterator
it =
theComps.begin();
it !=
theComps.end();
it++) {
98 vector<const TECWedge*> allWedges;
99 allWedges.assign(innerWedges.begin(), innerWedges.end());
100 allWedges.insert(allWedges.end(), outerWedges.begin(), outerWedges.end());
107 LogDebug(
"TkDetLayers") <<
"DEBUG INFO for CompositeTECPetal";
110 LogDebug(
"TkDetLayers") <<
"frontWedge phi,z,r: " << (*it)->surface().position().phi() <<
" , " 111 << (*it)->surface().position().z() <<
" , " << (*it)->surface().position().perp();
115 LogDebug(
"TkDetLayers") <<
"backWedge phi,z,r: " << (*it)->surface().position().phi() <<
" , " 116 << (*it)->surface().position().z() <<
" , " << (*it)->surface().position().perp();
122 vector<const GeometricSearchDet*>::const_iterator
i;
131 edm::LogError(
"TkDetLayers") <<
"temporary dummy implementation of CompositeTECPetal::compatible()!!";
132 return pair<bool, TrajectoryStateOnSurface>();
138 std::vector<DetGroup>&
result)
const {
139 vector<DetGroup> closestResult;
146 LogDebug(
"TkDetLayers") <<
"in TECPetal, closestResult.size(): " << closestResult.size();
148 if (closestResult.empty()) {
149 vector<DetGroup> nextResult;
151 LogDebug(
"TkDetLayers") <<
"in TECPetal, nextResult.size(): " << nextResult.size();
152 if (nextResult.empty())
165 vector<DetGroup> nextResult;
184 if (!frontPath.first)
194 LogDebug(
"TkDetLayers") <<
"in TECPetal,front crossing : r,z,phi: (" << gFrontPoint.perp() <<
"," << gFrontPoint.z()
195 <<
"," << gFrontPoint.phi() <<
")";
197 LogDebug(
"TkDetLayers") <<
"in TECPetal,back crossing r,z,phi: (" << gBackPoint.perp() <<
"," << gBackPoint.z() <<
"," 198 << gBackPoint.phi() <<
")";
200 int frontIndex =
findBin(gFrontPoint.perp(), 0);
203 int backIndex =
findBin(gBackPoint.perp(), 1);
210 if (frontDist < backDist) {
221 vector<DetGroup>&
result)
const {
224 LogDebug(
"TkDetLayers") <<
"in TECPetal, adding Wedge at r,z,phi: (" << det->position().perp() <<
"," 225 << det->position().z() <<
"," << det->position().phi() <<
")";
226 LogDebug(
"TkDetLayers") <<
"wedge comps size: " << det->basicComponents().size();
237 bool checkClosest)
const {
241 int negStartIndex = closestIndex - 1;
242 int posStartIndex = closestIndex + 1;
247 if (gCrossingPos.
perp2() < detR * detR) {
248 posStartIndex = closestIndex;
250 negStartIndex = closestIndex;
260 for (
int idet = negStartIndex; idet >= 0; idet--) {
270 for (
int idet = posStartIndex; idet < theSize; idet++) {
std::vector< float > theFrontBoundaries
CompositeTECPetal(std::vector< const TECWedge *> &innerWedges, std::vector< const TECWedge *> &outerWedges) __attribute__((cold))
virtual const Surface::PositionType & position() const
Returns position of the surface.
bool addClosest(const TrajectoryStateOnSurface &tsos, const Propagator &prop, const MeasurementEstimator &est, const SubLayerCrossing &crossing, std::vector< DetGroup > &result) const __attribute__((hot))
virtual Local2DVector maximalLocalDisplacement(const TrajectoryStateOnSurface &ts, const Plane &plane) const =0
DiskSectorBounds const & bounds() const
void groupedCompatibleDetsV(const TrajectoryStateOnSurface &startingState, const Propagator &prop, const MeasurementEstimator &est, std::vector< DetGroup > &result) const override __attribute__((hot))
std::vector< const GeometricSearchDet * > theComps
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))
virtual PropagationDirection propagationDirection() const final
~CompositeTECPetal() override __attribute__((cold))
Log< level::Error, false > LogError
const std::vector< const TECWedge * > & subLayer(int ind) const
std::pair< bool, double > pathLength(const Plane &plane) override
float innerRadius() const
GlobalPoint globalPosition() const
GeometricSearchDet::DetWithState DetWithState
const GlobalPoint & position() const
int closestDetIndex() const
int findBin(float R, int layer) const
SubLayerCrossings computeCrossings(const TrajectoryStateOnSurface &tsos, PropagationDirection propDir) const __attribute__((hot))
Abs< T >::type abs(const T &t)
ReferenceCountingPointer< BoundDiskSector > theDiskSector
static int endcapSide(const TrajectoryStateOnSurface &startingState, const Propagator &prop)
float thickness() const override
def window(xmin, xmax, ymin, ymax, x=0, y=0, width=100, height=100, xlogbase=None, ylogbase=None, minusInfinity=-1000, flipx=False, flipy=True)
float outerRadius() const
const SubLayerCrossing & closest() const
int subLayerIndex() const
static float computeWindowSize(const GeomDet *det, const TrajectoryStateOnSurface &tsos, const MeasurementEstimator &est) __attribute__((hot))
static bool add(const GeometricSearchDet &det, const TrajectoryStateOnSurface &tsos, const Propagator &prop, const MeasurementEstimator &est, std::vector< DetGroup > &result) __attribute__((hot))
const SubLayerCrossing & other() const
ReferenceCountingPointer< BoundDiskSector > theFrontSector
const Plane & surface() const
The nominal surface of the GeomDet.
const PositionType & position() const
std::vector< const TECWedge * > theFrontComps
double transverseCurvature() const
GlobalVector globalMomentum() const
ReferenceCountingPointer< BoundDiskSector > theBackSector
std::pair< bool, TrajectoryStateOnSurface > compatible(const TrajectoryStateOnSurface &ts, const Propagator &, const MeasurementEstimator &) const override __attribute__((cold))
std::vector< WedgePar > theBackPars
void add(std::map< std::string, TH1 *> &h, TH1 *hist)
std::vector< const GeomDet * > theBasicComps
static void orderAndMergeTwoLevels(std::vector< DetGroup > &&one, std::vector< DetGroup > &&two, std::vector< DetGroup > &result, int firstIndex, int firstCrossed)
WedgePar const & findPar(int index, int diskSectorType) const
PositionType position(double s) const override
std::pair< const GeomDet *, TrajectoryStateOnSurface > DetWithState
std::vector< float > theBackBoundaries
std::vector< const TECWedge * > theBackComps
std::vector< WedgePar > theFrontPars