Skip to content

Commit

Permalink
Merge pull request #6623 from BenjaminRS/CkfTrajectoryBuilder-Modific…
Browse files Browse the repository at this point in the history
…ation

Update CkfTrajectoryBuilder to handle hitless seeds
  • Loading branch information
cmsbuild committed Jan 20, 2015
2 parents 9c13001 + 5cb6e62 commit 59ba338
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions RecoTracker/CkfPattern/src/CkfTrajectoryBuilder.cc
Expand Up @@ -324,7 +324,8 @@ CkfTrajectoryBuilder::findCompatibleMeasurements(const TrajectorySeed&seed,
std::vector<TrajectoryMeasurement> & result) const
{
int invalidHits = 0;
std::pair<TSOS,std::vector<const DetLayer*> > && stateAndLayers = findStateAndLayers(traj);
//Use findStateAndLayers which handles the hitless seed use case
std::pair<TSOS,std::vector<const DetLayer*> > && stateAndLayers = findStateAndLayers(seed,traj);
if (stateAndLayers.second.empty()) return;

auto layerBegin = stateAndLayers.second.begin();
Expand All @@ -336,7 +337,8 @@ CkfTrajectoryBuilder::findCompatibleMeasurements(const TrajectorySeed&seed,
LogDebug("CkfPattern")<<"looping on a layer in findCompatibleMeasurements.\n last layer: "<<traj.lastLayer()<<" current layer: "<<(*il);

TSOS stateToUse = stateAndLayers.first;
if unlikely ((*il)==traj.lastLayer()) {
//Added protection before asking for the lastLayer on the trajectory
if unlikely (!traj.empty() && (*il)==traj.lastLayer()) {
LogDebug("CkfPattern")<<" self propagating in findCompatibleMeasurements.\n from: \n"<<stateToUse;
//self navigation case
// go to a middle point first
Expand Down

0 comments on commit 59ba338

Please sign in to comment.