16 const std::vector<int>&
charges,
24 theSetMomentum(momFromPSet),
32 std::vector<TrajectorySeed*>
seeds;
33 if (
hits.size() == 3) {
39 for (std::vector<int>::const_iterator iCh =
theCharges.begin(); iCh !=
theCharges.end(); iCh++) {
46 }
else if (
hits.size() == 2) {
52 for (std::vector<int>::const_iterator iCh =
theCharges.begin(); iCh !=
theCharges.end(); iCh++) {
60 <<
" Wrong number of hits in Set: " <<
hits.size() <<
", should be 2 or 3 ";
70 if (
hits.size() != 3) {
72 <<
"call to SeedFromGenericPairOrTriplet::seedFromTriplet with " <<
hits.size() <<
" hits ";
75 auto innerHit =
hits[0];
76 auto middleHit =
hits[1];
77 auto outerHit =
hits[2];
82 LogDebug(
"SeedFromGenericPairOrTriplet")
83 <<
"Using the following hits: outer(r, phi, theta) " << outerHit->geographicalId().subdetId() <<
" ("
85 << middleHit->geographicalId().subdetId() <<
" middle (" << middle.
perp() <<
", " << middle.
phi() <<
","
86 << middle.
theta() <<
") " << innerHit->geographicalId().subdetId() <<
" inner (" <<
inner.perp() <<
", "
88 <<
" (x, y, z) outer (" <<
inner.x() <<
", " <<
inner.y() <<
", " <<
inner.z() <<
") middle ("
89 << middle.
x() <<
", " << middle.
y() <<
", " << middle.
z() <<
")";
100 int momentumSign = 1;
104 std::vector<const BaseTrackerRecHit*> trHits;
106 LogDebug(
"SeedFromGenericPairOrTriplet") <<
"Seed from outsideIn alongMomentum OR insideOut oppositeToMomentum";
108 secondPoint = &middle;
110 trHits.push_back(outerHit);
111 trHits.push_back(middleHit);
115 LogDebug(
"SeedFromGenericPairOrTriplet") <<
"Seed from outsideIn oppositeToMomentum OR insideOut alongMomentum";
117 secondPoint = &middle;
119 trHits.push_back(innerHit);
120 trHits.push_back(middleHit);
128 LogDebug(
"SeedFromGenericPairOrTriplet") <<
"originalStartingState " << originalStartingState;
142 if (!
qualityFilter(momentumSign * originalStartingState.momentum()))
146 buildSeed(momentumSign * originalStartingState.momentum(), originalStartingState.charge(), trHits,
dir);
154 if (
hits.size() != 2) {
156 <<
"call to SeedFromGenericPairOrTriplet::seedFromPair with " <<
hits.size() <<
" hits ";
158 auto innerHit =
hits[0];
159 auto outerHit =
hits[1];
162 LogDebug(
"SeedFromGenericPairOrTriplet")
163 <<
"Using the following hits: outer(r, phi, theta) (" <<
outer.perp() <<
", " <<
outer.phi() <<
","
164 <<
outer.theta() <<
") inner (" <<
inner.perp() <<
", " <<
inner.phi() <<
"," <<
inner.theta() <<
")";
167 int momentumSign = 1;
170 std::vector<const BaseTrackerRecHit*> trHits;
173 LogDebug(
"SeedFromGenericPairOrTriplet") <<
"Seed from outsideIn alongMomentum OR insideOut oppositeToMomentum";
175 secondPoint = &
inner;
178 trHits.push_back(outerHit);
179 trHits.push_back(innerHit);
181 LogDebug(
"SeedFromGenericPairOrTriplet") <<
"Seed from outsideIn oppositeToMomentum OR insideOut alongMomentum";
183 secondPoint = &
outer;
187 trHits.push_back(innerHit);
188 trHits.push_back(outerHit);
208 std::vector<const BaseTrackerRecHit*>& trHits,
217 LogDebug(
"SeedFromGenericPairOrTriplet")
218 <<
"Using the following hits: first(r, phi, theta) (" <<
first.perp() <<
", " <<
first.phi() <<
","
222 auto transHit = trHits[0];
223 LocalVector lmom = transHit->surface()->toLocal(momentum);
227 transHit->localPosition().x(),
228 transHit->localPosition().y(),
229 lmom.
z() > 0. ? 1. : -1.);
233 (1. + (lmom.
x() / lmom.
z()) * (lmom.
x() / lmom.
z())),
234 (1. + (lmom.
y() / lmom.
z()) * (lmom.
y() / lmom.
z())),
235 1. / momentum.
mag());
241 auto transHit2 = trHits[1];
246 LogDebug(
"SeedFromGenericPairOrTriplet") <<
"first propagation failed";
251 LogDebug(
"SeedFromGenericPairOrTriplet") <<
"first update failed";
254 LogDebug(
"SeedFromGenericPairOrTriplet") <<
"starting TSOS " << seedTSOS;
260 for (
auto ihits = trHits.begin(); ihits != trHits.end(); ihits++) {
295 if (
hits.size() == 3) {
296 std::vector<GlobalPoint> gPoints;
297 unsigned int nHits =
hits.size();
298 for (
unsigned int iHit = 0; iHit < nHits; ++iHit)
299 gPoints.push_back(
hits[iHit]->globalPosition());
300 unsigned int subid = (*
hits[0]).geographicalId().subdetId();
302 LogDebug(
"SeedFromGenericPairOrTriplet")
303 <<
"In the endcaps we cannot decide if hits are aligned with only phi and z";
306 FastCircle circle(gPoints[0], gPoints[1], gPoints[2]);
307 if (circle.
rho() < 500 && circle.
rho() != 0) {
308 LogDebug(
"SeedFromGenericPairOrTriplet") <<
"Seed qualityFilter rejected because rho = " << circle.
rho();