53 std::vector<Trajectory>::const_iterator outInTrackItr;
92 std::vector<TrajectoryMeasurement> measurements = (*outInTrackItr).measurements();
94 std::vector<const DetLayer*> allLayers =
layerList();
97 for (
unsigned int i = 0;
i < allLayers.size(); ++
i) {
102 std::vector<const DetLayer*> myLayers;
104 std::vector<TrajectoryMeasurement>::reverse_iterator measurementItr;
105 std::vector<TrajectoryMeasurement*> myItr;
110 for (measurementItr = measurements.rbegin(); measurementItr != measurements.rend(); ++measurementItr) {
111 if ((*measurementItr).recHit()->isValid()) {
114 myLayers.push_back(measurementItr->layer());
115 myItr.push_back(&(*measurementItr));
128 for (ilayer = 0; ilayer < allLayers.size(); ++ilayer) {
130 if (allLayers[ilayer] == myLayers[0]) {
148 }
else if (allLayers[ilayer] == myLayers[1]) {
166 if (ilayer == allLayers.size()) {
187 const DetLayer* previousLayer = allLayers[ilayer];
196 if (ilayer - 1 > 0) {
197 if (allLayers[ilayer] == myLayers[0]) {
209 }
else if (ilayer - 1 == 0) {
217 if (!stateAtPreviousLayer.
isValid()) {
224 startSeed(fts, stateAtPreviousLayer, -1, ilayer);
237 const DetLayer* previousLayer = allLayers[ilayer];
241 if (!stateAtPreviousLayer.
isValid()) {
248 startSeed(fts, stateAtPreviousLayer, -1, ilayer);
264 std::vector<const reco::CaloCluster*> bcVec;
272 std::vector<const reco::CaloCluster*>::iterator bcItr;
280 for (bcItr = bcVec.begin(); bcItr != bcVec.end(); ++bcItr) {
289 back1mm -=
dir.unit() * 0.1;
295 if (!helix.isValid())
303 std::vector<const reco::CaloCluster*>
result;
312 if (
std::abs(bcPhi - convPhi) < .5 &&
313 ((
charge < 0 && bcPhi - convPhi > -.5) || (
charge > 0 && bcPhi - convPhi < .5)))
321 float transverseCurvature,
322 unsigned int startingLayer) {
323 std::vector<const DetLayer*> allLayers =
layerList();
339 if (fts.momentum().mag2() == 0) {
341 <<
" initial FTS has a zero momentum, probably because of the zero field. ";
351 for (
unsigned int ilayer = startingLayer; ilayer <= startingLayer + 1 && (ilayer < allLayers.size() - 2); ++ilayer) {
352 const DetLayer* layer = allLayers[ilayer];
393 back1mm -=
dir.unit() * 0.1;
399 if (!helix.isValid())
407 helix.stateAtVertex().transverseCurvature(),
423 if (tmItr->recHit()->isValid()) {
429 GlobalPoint back1mm = tmItr->recHit()->globalPosition();
431 back1mm -=
dir.unit() * 0.1;
437 if (!helix.isValid())
449 helix.stateAtVertex().transverseCurvature(),
496 std::vector<const DetLayer*> allLayers =
layerList();
497 const DetLayer* layer = allLayers[ilayer];
514 float m1dr =
sqrt(m1.
recHit()->localPositionError().yy());
524 if (!tsos.isValid()) {
533 std::vector<TrajectoryMeasurement> measurements =
538 for (
unsigned int i = 0;
i < measurements.size(); ++
i) {
539 if (measurements[
i].
recHit()->isValid()) {
575 myHits.
push_back(meas1.recHit()->hit()->clone());
576 myHits.push_back(meas2.recHit()->hit()->clone());