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) {
51 const BoundDiskSector& wedgeSector = static_cast<const BoundDiskSector&>(gsdet->surface());
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++) {