43 updator, propagatorAlong,propagatorOpposite,
44 estimator, recHitBuilder, measurementTracker,filter)
169 candidates.push_back( startingTraj);
177 unsigned int nIter=1;
182 while ( !candidates.empty()) {
185 for (TempTrajectoryContainer::iterator traj=candidates.begin();
186 traj!=candidates.end(); traj++) {
187 std::vector<TM> meas;
201 std::vector<TM>::const_iterator
last;
204 if (meas.front().recHit()->isValid()) {
207 else last = meas.end();
210 for( std::vector<TM>::const_iterator itm = meas.begin();
211 itm !=
last; itm++) {
216 newCand.push_back(newTraj);
227 newCand.erase( newCand.begin()+
theMaxCand, newCand.end());
233 candidates.swap(newCand);
235 LogDebug(
"CkfPattern") <<result.size()<<
" candidates after "<<nIter++<<
" CKF iteration: \n"
237 <<
"\n "<<candidates.size()<<
" running candidates are: \n"
251 if ( hit->isValid()) {
257 traj.
push(
TM( predictedState, hit, 0, tm.
layer()));
264 std::vector<TrajectoryMeasurement> &
result)
const
267 std::pair<TSOS,std::vector<const DetLayer*> > stateAndLayers =
findStateAndLayers(traj);
268 if (stateAndLayers.second.empty())
return;
270 vector<const DetLayer*>::iterator layerBegin = stateAndLayers.second.begin();
271 vector<const DetLayer*>::iterator layerEnd = stateAndLayers.second.end();
272 LogDebug(
"CkfPattern")<<
"looping on "<< stateAndLayers.second.size()<<
" layers.";
273 for (vector<const DetLayer*>::iterator il = layerBegin;
274 il != layerEnd; il++) {
276 LogDebug(
"CkfPattern")<<
"looping on a layer in findCompatibleMeasurements.\n last layer: "<<traj.
lastLayer()<<
" current layer: "<<(*il);
278 TSOS stateToUse = stateAndLayers.first;
281 LogDebug(
"CkfPattern")<<
" self propagating in findCompatibleMeasurements.\n from: \n"<<stateToUse;
288 if (!stateToUse.
isValid())
continue;
289 LogDebug(
"CkfPattern")<<
"to: "<<stateToUse;
295 if ( result.empty()) result = tmp;
298 result.insert( result.end()-invalidHits, tmp.begin(), tmp.end());
305 if ( result.size() > 1) {
309 LogDebug(
"CkfPattern")<<
"starting from:\n"
310 <<
"x: "<<stateAndLayers.first.globalPosition()<<
"\n"
311 <<
"p: "<<stateAndLayers.first.globalMomentum()<<
"\n"
315 bool afterInvalid =
false;
316 for (vector<TM>::const_iterator
i=result.begin();
317 i!=result.end();
i++) {
318 if ( !
i->recHit().isValid()) afterInvalid =
true;
319 if (afterInvalid &&
i->recHit().isValid()) {
320 edm::LogError(
"CkfPattern") <<
"CkfTrajectoryBuilder error: valid hit after invalid!" ;
T getParameter(std::string const &) const
std::vector< TrajectoryMeasurement > measurements(const DetLayer &layer, const TrajectoryStateOnSurface &startingState, const Propagator &prop, const MeasurementEstimator &est) const
static std::string dumpCandidates(collection &candidates)
std::vector< Trajectory > TrajectoryContainer
bool theAlwaysUseInvalidHits
virtual TrajectoryStateOnSurface update(const TrajectoryStateOnSurface &, const TransientTrackingRecHit &) const =0
void addToResult(TempTrajectory &traj, TrajectoryContainer &result, bool inOut=false) const
const TrajectoryStateUpdator * theUpdator
ConstRecHitPointer recHit() const
static std::string dumpMeasurements(const std::vector< TrajectoryMeasurement > &v)
bool qualityFilter(const TempTrajectory &traj, bool inOut=false) const
const LayerMeasurements * theLayerMeasurements
bool theIntermediateCleaning
const TransientTrackingRecHitBuilder * theTTRHBuilder
virtual void findCompatibleMeasurements(const TempTrajectory &traj, std::vector< TrajectoryMeasurement > &result) const
CkfTrajectoryBuilder(const edm::ParameterSet &conf, const TrajectoryStateUpdator *updator, const Propagator *propagatorAlong, const Propagator *propagatorOpposite, const Chi2MeasurementEstimatorBase *estimator, const TransientTrackingRecHitBuilder *recHitBuilder, const MeasurementTracker *measurementTracker, const TrajectoryFilter *filter)
const DetLayer * layer() const
TrajectoryStateOnSurface predictedState() const
void limitedCandidates(TempTrajectory &startingTraj, TrajectoryContainer &result) const
void updateTrajectory(TempTrajectory &traj, const TM &tm) const
const MeasurementTracker * theMeasurementTracker
virtual TrajectoryContainer trajectories(const TrajectorySeed &seed) const
trajectories building starting from a seed
std::vector< TempTrajectory > TempTrajectoryContainer
std::vector< std::vector< double > > tmp
bool toBeContinued(TempTrajectory &traj, bool inOut=false) const
StateAndLayers findStateAndLayers(const TempTrajectory &traj) const
virtual bool analyzeMeasurementsDebugger(Trajectory &traj, std::vector< TrajectoryMeasurement > meas, const MeasurementTracker *theMeasurementTracker, const Propagator *theForwardPropagator, const Chi2MeasurementEstimatorBase *theEstimator, const TransientTrackingRecHitBuilder *theTTRHBuilder) const
const DetLayer * lastLayer() const
Redundant method, returns the layer of lastMeasurement() .
int theMaxCand
set Event for the internal MeasurementTracker data member
std::vector< Trajectory > TrajectoryContainer
const Chi2MeasurementEstimatorBase * theEstimator
TempTrajectory createStartingTrajectory(const TrajectorySeed &seed) const
void push(const TrajectoryMeasurement &tm)
const Propagator * theForwardPropagator