23 BoundDisk* computeDisk(vector<const T*>& petals) {
27 const BoundDiskSector& diskSector = static_cast<const BoundDiskSector&>(petals.front()->surface());
32 float theZmax(petals.front()->position().z());
33 float theZmin(theZmax);
34 for (
auto i = petals.begin();
i != petals.end();
i++) {
35 float zmin = (**i).position().z() - (**i).surface().bounds().thickness() / 2.;
36 float zmax = (**i).position().z() + (**i).surface().bounds().thickness() / 2.;
41 float zPos = (theZmax + theZmin) / 2.;
52 theFrontComps(innerPetals.begin(), innerPetals.
end()),
53 theBackComps(outerPetals.begin(), outerPetals.
end()) {
57 for (vector<const GeometricSearchDet*>::const_iterator it =
theComps.begin(); it !=
theComps.end(); it++) {
75 LogDebug(
"TkDetLayers") <<
"DEBUG INFO for TECLayer"
77 <<
"TECLayer z,perp, innerRadius, outerR: " << this->
position().
z() <<
" , "
82 LogDebug(
"TkDetLayers") <<
"frontPetal phi,z,r: " << (*it)->surface().position().phi() <<
" , "
83 << (*it)->surface().position().z() <<
" , " << (*it)->surface().position().perp();
87 LogDebug(
"TkDetLayers") <<
"backPetal phi,z,r: " << (*it)->surface().position().phi() <<
" , "
88 << (*it)->surface().position().z() <<
" , " << (*it)->surface().position().perp();
102 std::vector<DetGroup>&
result)
const {
108 vector<DetGroup> closestResult;
110 LogDebug(
"TkDetLayers") <<
"in TECLayer, closestResult.size(): " << closestResult.size();
113 if (closestResult.empty()) {
114 vector<DetGroup> nextResult;
116 LogDebug(
"TkDetLayers") <<
"in TECLayer, nextResult.size(): " << nextResult.size();
117 if (nextResult.empty())
128 vector<DetGroup> nextResult;
145 pair<bool, double> frontPath = crossing.pathLength(*
theFrontDisk);
146 if (!frontPath.first)
149 GlobalPoint gFrontPoint(crossing.position(frontPath.second));
151 LogDebug(
"TkDetLayers") <<
"in TECLayer,front crossing point: r,z,phi: (" << gFrontPoint.perp() <<
","
152 << gFrontPoint.z() <<
"," << gFrontPoint.phi() <<
")" << endl;
157 pair<bool, double> backPath = crossing.pathLength(*
theBackDisk);
161 GlobalPoint gBackPoint(crossing.position(backPath.second));
162 LogDebug(
"TkDetLayers") <<
"in TECLayer,back crossing point: r,z,phi: (" << gBackPoint.perp() <<
","
163 << gFrontPoint.z() <<
"," << gBackPoint.phi() <<
")" << endl;
172 if (frontDist < backDist) {
183 vector<DetGroup>&
result)
const {
187 LogDebug(
"TkDetLayers") <<
"in TECLayer, adding petal at r,z,phi: (" << det->position().perp() <<
","
188 << det->position().z() <<
"," << det->position().phi() <<
")" << endl;
196 pair<float, float> phiRange(
phi - phiWin,
phi + phiWin);
211 bool checkClosest)
const {
213 auto gphi = gCrossingPos.
barePhi();
218 int negStartIndex = closestIndex - 1;
219 int posStartIndex = closestIndex + 1;
223 posStartIndex = closestIndex;
225 negStartIndex = closestIndex;
232 int half = sLayer.size() / 2;
233 for (
int idet = negStartIndex; idet >= negStartIndex - half; idet--) {
234 const auto& neighborPetal = *sLayer[binFinder.
binIndex(idet)];
241 for (
int idet = posStartIndex; idet < posStartIndex + half; idet++) {
242 const auto& neighborPetal = *sLayer[binFinder.
binIndex(idet)];