43 updator, propagatorAlong,propagatorOpposite,
44 estimator, recHitBuilder, measurementTracker,filter)
167 candidates.push_back( startingTraj);
175 unsigned int nIter=1;
180 while ( !candidates.empty()) {
183 for (TempTrajectoryContainer::iterator traj=candidates.begin();
184 traj!=candidates.end(); traj++) {
185 std::vector<TM> meas;
199 std::vector<TM>::const_iterator
last;
202 if (meas.front().recHit()->isValid()) {
205 else last = meas.end();
208 for( std::vector<TM>::const_iterator itm = meas.begin();
209 itm !=
last; itm++) {
214 newCand.push_back(newTraj);
225 newCand.erase( newCand.begin()+
theMaxCand, newCand.end());
231 candidates.swap(newCand);
233 LogDebug(
"CkfPattern") <<result.size()<<
" candidates after "<<nIter++<<
" CKF iteration: \n"
235 <<
"\n "<<candidates.size()<<
" running candidates are: \n"
249 if ( hit->isValid()) {
255 traj.
push(
TM( predictedState, hit, 0, tm.
layer()));
262 std::vector<TrajectoryMeasurement> &
result)
const
265 std::pair<TSOS,std::vector<const DetLayer*> > stateAndLayers =
findStateAndLayers(traj);
266 if (stateAndLayers.second.empty())
return;
268 vector<const DetLayer*>::iterator layerBegin = stateAndLayers.second.begin();
269 vector<const DetLayer*>::iterator layerEnd = stateAndLayers.second.end();
270 LogDebug(
"CkfPattern")<<
"looping on "<< stateAndLayers.second.size()<<
" layers.";
271 for (vector<const DetLayer*>::iterator il = layerBegin;
272 il != layerEnd; il++) {
274 LogDebug(
"CkfPattern")<<
"looping on a layer in findCompatibleMeasurements.\n last layer: "<<traj.
lastLayer()<<
" current layer: "<<(*il);
276 TSOS stateToUse = stateAndLayers.first;
279 LogDebug(
"CkfPattern")<<
" self propagating in findCompatibleMeasurements.\n from: \n"<<stateToUse;
286 if (!stateToUse.
isValid())
continue;
287 LogDebug(
"CkfPattern")<<
"to: "<<stateToUse;
293 if ( result.empty()) result = tmp;
296 result.insert( result.end()-invalidHits, tmp.begin(), tmp.end());
303 if ( result.size() > 1) {
307 LogDebug(
"CkfPattern")<<
"starting from:\n"
308 <<
"x: "<<stateAndLayers.first.globalPosition()<<
"\n"
309 <<
"p: "<<stateAndLayers.first.globalMomentum()<<
"\n"
313 bool afterInvalid =
false;
314 for (vector<TM>::const_iterator
i=result.begin();
315 i!=result.end();
i++) {
316 if ( !
i->recHit().isValid()) afterInvalid =
true;
317 if (afterInvalid &&
i->recHit().isValid()) {
318 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
virtual void setEvent(const edm::Event &event) const
set Event for the internal MeasurementTracker data member
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
How EventSelector::AcceptEvent() decides whether to accept an event for output otherwise it is excluding the probing of A single or multiple positive and the trigger will pass if any such matching triggers are PASS or EXCEPTION[A criterion thatmatches no triggers at all is detected and causes a throw.] A single negative with an expectation of appropriate bit checking in the decision and the trigger will pass if any such matching triggers are FAIL or EXCEPTION A wildcarded negative criterion that matches more than one trigger in the trigger but the state exists so we define the behavior If all triggers are the negative crieriion will lead to accepting the event(this again matches the behavior of"!*"before the partial wildcard feature was incorporated).The per-event"cost"of each negative criterion with multiple relevant triggers is about the same as!*was in the past
void limitedCandidates(TempTrajectory &startingTraj, TrajectoryContainer &result) const
void updateTrajectory(TempTrajectory &traj, const TM &tm) const
const MeasurementTracker * theMeasurementTracker
tuple filter
USE THIS FOR SKIMMED TRACKS process.p = cms.Path(process.hltLevel1GTSeed*process.skimming*process.offlineBeamSpot*process.TrackRefitter2) OTHERWISE USE THIS.
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() .
std::vector< Trajectory > TrajectoryContainer
const Chi2MeasurementEstimatorBase * theEstimator
TempTrajectory createStartingTrajectory(const TrajectorySeed &seed) const
void push(const TrajectoryMeasurement &tm)
const Propagator * theForwardPropagator