17 #include <boost/function.hpp>
18 #include <boost/bind.hpp>
32 return 0.5 * (
b->position().perp() +
a->position().perp());
34 float operator()(
float a,
float b)
const {
return 0.5 * (
b +
a); }
37 void fillBoundaries(std::vector<const TECWedge*>
const& dets, std::vector<float>& boundaries) {
38 boundaries.resize(dets.size());
43 std::adjacent_difference(boundaries.begin(), boundaries.end(), boundaries.begin(),
Mean());
46 inline int findBin(std::vector<float>
const& boundaries,
float r) {
47 return std::lower_bound(boundaries.begin() + 1, boundaries.end(),
r) - boundaries.begin() - 1;
50 void fillPars(std::vector<const TECWedge*>
const& dets, std::vector<CompositeTECPetal::WedgePar>& pars) {
51 for (
auto gsdet : dets) {
52 const BoundDiskSector& wedgeSector = static_cast<const BoundDiskSector&>(gsdet->surface());
55 float thetaWedgeMin = wedgeSector.
innerRadius() / wedgeMaxZ;
56 float thetaWedgeMax = wedgeSector.
outerRadius() / wedgeMinZ;
67 auto tsRadius = gpos.
perp();
70 auto rmax = (tsRadius +
ymax);
91 for (vector<const GeometricSearchDet*>::const_iterator it =
theComps.begin(); it !=
theComps.end(); it++) {
99 vector<const TECWedge*> allWedges;
100 allWedges.assign(innerWedges.begin(), innerWedges.end());
101 allWedges.insert(allWedges.end(), outerWedges.begin(), outerWedges.end());
108 LogDebug(
"TkDetLayers") <<
"DEBUG INFO for CompositeTECPetal";
111 LogDebug(
"TkDetLayers") <<
"frontWedge phi,z,r: " << (*it)->surface().position().phi() <<
" , "
112 << (*it)->surface().position().z() <<
" , " << (*it)->surface().position().perp();
116 LogDebug(
"TkDetLayers") <<
"backWedge phi,z,r: " << (*it)->surface().position().phi() <<
" , "
117 << (*it)->surface().position().z() <<
" , " << (*it)->surface().position().perp();
123 vector<const GeometricSearchDet*>::const_iterator
i;
132 edm::LogError(
"TkDetLayers") <<
"temporary dummy implementation of CompositeTECPetal::compatible()!!";
133 return pair<bool, TrajectoryStateOnSurface>();
139 std::vector<DetGroup>&
result)
const {
140 vector<DetGroup> closestResult;
147 LogDebug(
"TkDetLayers") <<
"in TECPetal, closestResult.size(): " << closestResult.size();
149 if (closestResult.empty()) {
150 vector<DetGroup> nextResult;
152 LogDebug(
"TkDetLayers") <<
"in TECPetal, nextResult.size(): " << nextResult.size();
153 if (nextResult.empty())
166 vector<DetGroup> nextResult;
185 if (!frontPath.first)
195 LogDebug(
"TkDetLayers") <<
"in TECPetal,front crossing : r,z,phi: (" << gFrontPoint.perp() <<
"," << gFrontPoint.z()
196 <<
"," << gFrontPoint.phi() <<
")";
198 LogDebug(
"TkDetLayers") <<
"in TECPetal,back crossing r,z,phi: (" << gBackPoint.perp() <<
"," << gBackPoint.z() <<
","
199 << gBackPoint.phi() <<
")";
201 int frontIndex =
findBin(gFrontPoint.perp(), 0);
204 int backIndex =
findBin(gBackPoint.perp(), 1);
211 if (frontDist < backDist) {
222 vector<DetGroup>&
result)
const {
225 LogDebug(
"TkDetLayers") <<
"in TECPetal, adding Wedge at r,z,phi: (" << det->position().perp() <<
","
226 << det->position().z() <<
"," << det->position().phi() <<
")";
227 LogDebug(
"TkDetLayers") <<
"wedge comps size: " << det->basicComponents().size();
238 bool checkClosest)
const {
242 int negStartIndex = closestIndex - 1;
243 int posStartIndex = closestIndex + 1;
248 if (gCrossingPos.
perp2() < detR * detR) {
249 posStartIndex = closestIndex;
251 negStartIndex = closestIndex;
261 for (
int idet = negStartIndex; idet >= 0; idet--) {
271 for (
int idet = posStartIndex; idet < theSize; idet++) {