41 : theLayerCache(*layerCache), theOuterLayer(
outer), theInnerLayer(
inner), theMaxElement(
max) {}
49 auto oldSize =
result.size();
64 ss <<
"In " << innerLayerObj.
name() <<
" Out " << outerLayerObj.
name() << std::endl;
74 if (innerHitsMap.
empty())
78 if (outerHitsMap.
empty())
87 vector<RecHitsSortedInPhi::Hit> innerHits, outerHits;
88 float outerPhimin, outerPhimax;
89 float innerPhimin, innerPhimax;
94 outerHitsMap.
hits(outerPhimin, outerPhimax, outerHits);
97 ss <<
"\tophimin, ophimax " << outerPhimin <<
" " << outerPhimax << std::endl;
101 for (vector<RecHitsSortedInPhi::Hit>::const_iterator oh = outerHits.begin(); oh != outerHits.end(); ++oh) {
106 ss <<
"\toPos " << oPos <<
" r " << oPos.
perp() <<
" phi " << oPos.
phi() <<
" cotTheta " << oPos.
z() / oPos.
perp()
122 std::unique_ptr<const HitRZCompatibility> checkRZ =
region.checkRZ(innerLayerObj.
detLayer(), ohit, es);
125 ss <<
"*******\nNo valid checkRZ\n*******" << std::endl;
134 innerHitsMap.
hits(innerPhimin, innerPhimax, innerHits);
137 ss <<
"\tiphimin, iphimax " << innerPhimin <<
" " << innerPhimax << std::endl;
141 for (vector<RecHitsSortedInPhi::Hit>::const_iterator ih = innerHits.begin(), ieh = innerHits.end(); ih < ieh;
146 ss <<
"\tinnPos " << innPos <<
" r " << innPos.
perp() <<
" phi " << innPos.
phi() <<
" cotTheta "
147 << innPos.
z() / innPos.
perp() << std::endl;
158 allowed = checkRZ->range(r_reduced);
159 float zErr =
nSigmaRZ * (*ih)->errorGlobalZ();
160 hitRZ =
Range(innPos.
z() - zErr, innPos.
z() + zErr);
162 allowed = checkRZ->range(innPos.
z());
163 float rErr =
nSigmaRZ * (*ih)->errorGlobalR();
164 hitRZ =
Range(r_reduced - rErr, r_reduced + rErr);
169 ss <<
"\n\t\t allowed Range " << allowed.min() <<
" \t, " << allowed.max() <<
"\n\t\t hitRz Range "
170 << hitRZ.min() <<
" \t, " << hitRZ.max() <<
"\n\t\t Cross Range " << crossRange.min() <<
" \t, "
171 << crossRange.max() <<
"\n\t\t the seed track has origin " << convRegion.
convPoint() <<
" \t cotTheta "
172 << convRegion.
cotTheta() << std::endl;
175 if (!crossRange.empty()) {
177 ss <<
"\n\t\t !!!!ACCEPTED!!! \n\n";
182 edm::LogError(
"TooManySeeds") <<
"number of pairs exceed maximum, no pairs produced";
203 float theThickness =
layer.surface().bounds().thickness();
204 return rLayer + 0.5f * theThickness;
213 float layerZ =
layer.position().z();
214 float theThickness =
layer.surface().bounds().thickness();
215 float layerZmax = layerZ > 0 ? layerZ + 0.5f * theThickness : layerZ - 0.5f * theThickness;
227 float minZEndCap = 130;
228 if (fabs(convRegion.
convPoint().
z()) > minZEndCap) {
230 ss <<
"\tthe conversion seems to be in the endcap. Zconv " << convRegion.
convPoint().
z() << std::endl;
240 ss <<
"\tthis layer is before the conversion : R layer " <<
R <<
" [ Rconv " << convRegion.
convPoint().
perp()
241 <<
" Zconv " << convRegion.
convPoint().
z() << std::endl;
249 ss <<
"\tthis layer is far from the conversion more than cut " << maxSearchR <<
" cm. R layer " <<
R
261 ss <<
"\tthis layer is before the conversion : Z layer " <<
Z <<
" [ Rconv " << convRegion.
convPoint().
perp()
262 <<
" Zconv " << convRegion.
convPoint().
z() << std::endl;
268 if (fabs(
Z - convRegion.
convPoint().
z()) > maxSearchZ) {
270 ss <<
"\tthis layer is far from the conversion more than cut " << maxSearchZ <<
" cm. Z layer " <<
Z
311 if (theRCurvatureMin < DeltaL)
312 dphi = atan(DeltaL / layerR);
314 dphi = atan(theRCurvatureMin / layerR * (1 -
sqrt(1 -
sqr(DeltaL / theRCurvatureMin))));
316 if (convRegion.
charge() > 0) {
332 double sigmaCotTheta = convRegion.
errTheta() *
355 ss <<
"\n\t\t cotTheta allowed Range " << allowedCotTheta.min() <<
" \t, " << allowedCotTheta.max()
356 <<
"\n\t\t hitCotTheta Range " << hitCotTheta.min() <<
" \t, " << hitCotTheta.max() <<
"\n\t\t Cross Range "
357 << crossRange.min() <<
" \t, " << crossRange.max() <<
"\n\t\t the seed track has origin " << convRegion.
convPoint()
358 <<
" \t cotTheta " << convRegion.
cotTheta() << std::endl;
361 return crossRange.empty();