CMS 3D CMS Logo

List of all members | Public Types | Public Member Functions | Protected Member Functions | Protected Attributes
CkfTrajectoryBuilder Class Reference

#include <CkfTrajectoryBuilder.h>

Inheritance diagram for CkfTrajectoryBuilder:
BaseCkfTrajectoryBuilder TrajectoryBuilder CkfDebugTrajectoryBuilder MuonCkfTrajectoryBuilder

Public Types

typedef std::vector< TempTrajectoryTempTrajectoryContainer
 
typedef std::vector< TrajectoryTrajectoryContainer
 
- Public Types inherited from BaseCkfTrajectoryBuilder
typedef std::vector< TempTrajectoryTempTrajectoryContainer
 
typedef std::vector< TrajectoryTrajectoryContainer
 
typedef TrajectoryContainer::iterator TrajectoryIterator
 
- Public Types inherited from TrajectoryBuilder
typedef std::vector< TrajectoryTrajectoryContainer
 
typedef TrajectoryContainer::iterator TrajectoryIterator
 

Public Member Functions

TempTrajectory buildTrajectories (const TrajectorySeed &, TrajectoryContainer &ret, unsigned int &nCandPerSeed, const TrajectoryFilter *) const override
 
 CkfTrajectoryBuilder (const edm::ParameterSet &conf, edm::ConsumesCollector &iC)
 
 CkfTrajectoryBuilder (const edm::ParameterSet &conf, std::unique_ptr< TrajectoryFilter > filter)
 
void rebuildTrajectories (TempTrajectory const &startingTraj, const TrajectorySeed &, TrajectoryContainer &result) const override
 
TrajectoryContainer trajectories (const TrajectorySeed &seed) const override
 trajectories building starting from a seed More...
 
void trajectories (const TrajectorySeed &seed, TrajectoryContainer &ret) const override
 trajectories building starting from a seed More...
 
 ~CkfTrajectoryBuilder () override
 
- Public Member Functions inherited from BaseCkfTrajectoryBuilder
 BaseCkfTrajectoryBuilder (const edm::ParameterSet &conf, std::unique_ptr< TrajectoryFilter > filter, std::unique_ptr< TrajectoryFilter > inOutFilter=0)
 
 BaseCkfTrajectoryBuilder (const BaseCkfTrajectoryBuilder &)=delete
 
const TransientTrackingRecHitBuilderhitBuilder () const
 
BaseCkfTrajectoryBuilderoperator= (const BaseCkfTrajectoryBuilder &)=delete
 
virtual void setDebugger (CkfDebugger *dbg) const
 
void setEvent (const edm::Event &event) const override
 
void setEvent (const edm::Event &iEvent, const edm::EventSetup &iSetup, const MeasurementTrackerEvent *data)
 
void setNavigationSchool (NavigationSchool const *nv)
 
void unset () const override
 
 ~BaseCkfTrajectoryBuilder () override
 
- Public Member Functions inherited from TrajectoryBuilder
virtual void rebuildSeedingRegion (const TrajectorySeed &, TrajectoryContainer &result) const
 
virtual ~TrajectoryBuilder ()
 

Protected Member Functions

virtual void findCompatibleMeasurements (const TrajectorySeed &seed, const TempTrajectory &traj, std::vector< TrajectoryMeasurement > &result) const
 
unsigned int limitedCandidates (const TrajectorySeed &seed, TempTrajectory &startingTraj, TrajectoryContainer &result) const
 
unsigned int limitedCandidates (const boost::shared_ptr< const TrajectorySeed > &sharedSeed, TempTrajectoryContainer &candidates, TrajectoryContainer &result) const
 
void setEvent_ (const edm::Event &iEvent, const edm::EventSetup &iSetup) override
 
void updateTrajectory (TempTrajectory &traj, TM &&tm) const
 
- Protected Member Functions inherited from BaseCkfTrajectoryBuilder
void addToResult (boost::shared_ptr< const TrajectorySeed > const &seed, TempTrajectory &traj, TrajectoryContainer &result, bool inOut=false) const
 
void addToResult (TempTrajectory const &traj, TempTrajectoryContainer &result, bool inOut=false) const
 
virtual bool analyzeMeasurementsDebugger (Trajectory &traj, const std::vector< TrajectoryMeasurement > &meas, const MeasurementTrackerEvent *theMeasurementTracker, const Propagator *theForwardPropagator, const Chi2MeasurementEstimatorBase *theEstimator, const TransientTrackingRecHitBuilder *theTTRHBuilder) const
 
virtual bool analyzeMeasurementsDebugger (TempTrajectory &traj, const std::vector< TrajectoryMeasurement > &meas, const MeasurementTrackerEvent *theMeasurementTracker, const Propagator *theForwardPropagator, const Chi2MeasurementEstimatorBase *theEstimator, const TransientTrackingRecHitBuilder *theTTRHBuilder) const
 
const PropagatorbackwardPropagator (const TrajectorySeed &seed) const
 
TempTrajectory createStartingTrajectory (const TrajectorySeed &seed) const
 
virtual void fillSeedHistoDebugger (std::vector< TrajectoryMeasurement >::iterator begin, std::vector< TrajectoryMeasurement >::iterator end) const
 
StateAndLayers findStateAndLayers (const TrajectorySeed &seed, const TempTrajectory &traj) const
 
const PropagatorforwardPropagator (const TrajectorySeed &seed) const
 
void moveToResult (TempTrajectory &&traj, TempTrajectoryContainer &result, bool inOut=false) const
 
bool qualityFilter (const TempTrajectory &traj, bool inOut=false) const
 
void setData (const MeasurementTrackerEvent *data)
 
bool toBeContinued (TempTrajectory &traj, bool inOut=false) const
 

Protected Attributes

bool theAlwaysUseInvalidHits
 
bool theIntermediateCleaning
 
float theLostHitPenalty
 
int theMaxCand
 set Event for the internal MeasurementTracker data member More...
 
- Protected Attributes inherited from BaseCkfTrajectoryBuilder
const Chi2MeasurementEstimatorBasetheEstimator
 
const MeasurementTrackerEventtheMeasurementTracker
 
const NavigationSchooltheNavigationSchool = 0
 
const PropagatorthePropagatorAlong
 
const PropagatorthePropagatorOpposite
 
const TransientTrackingRecHitBuildertheTTRHBuilder
 
const TrajectoryStateUpdatortheUpdator
 

Additional Inherited Members

- Protected Types inherited from BaseCkfTrajectoryBuilder
typedef TrackingComponentsRecord Chi2MeasurementEstimatorRecord
 
typedef FreeTrajectoryState FTS
 
typedef std::pair< TSOS, std::vector< const DetLayer * > > StateAndLayers
 
typedef TrajectoryMeasurement TM
 
typedef TrajectoryStateOnSurface TSOS
 
- Static Protected Member Functions inherited from BaseCkfTrajectoryBuilder
static std::unique_ptr< TrajectoryFiltercreateTrajectoryFilter (const edm::ParameterSet &pset, edm::ConsumesCollector &iC)
 

Detailed Description

Definition at line 34 of file CkfTrajectoryBuilder.h.

Member Typedef Documentation

Definition at line 39 of file CkfTrajectoryBuilder.h.

Definition at line 38 of file CkfTrajectoryBuilder.h.

Constructor & Destructor Documentation

CkfTrajectoryBuilder::CkfTrajectoryBuilder ( const edm::ParameterSet conf,
edm::ConsumesCollector iC 
)

Definition at line 30 of file CkfTrajectoryBuilder.cc.

30  :
33 {}
T getParameter(std::string const &) const
CkfTrajectoryBuilder(const edm::ParameterSet &conf, edm::ConsumesCollector &iC)
static std::unique_ptr< TrajectoryFilter > createTrajectoryFilter(const edm::ParameterSet &pset, edm::ConsumesCollector &iC)
CkfTrajectoryBuilder::CkfTrajectoryBuilder ( const edm::ParameterSet conf,
std::unique_ptr< TrajectoryFilter filter 
)

Definition at line 35 of file CkfTrajectoryBuilder.cc.

References edm::ParameterSet::getParameter(), theAlwaysUseInvalidHits, theIntermediateCleaning, theLostHitPenalty, and theMaxCand.

35  :
37 {
38  theMaxCand = conf.getParameter<int>("maxCand");
39  theLostHitPenalty = conf.getParameter<double>("lostHitPenalty");
40  theIntermediateCleaning = conf.getParameter<bool>("intermediateCleaning");
41  theAlwaysUseInvalidHits = conf.getParameter<bool>("alwaysUseInvalidHits");
42  /*
43  theSharedSeedCheck = conf.getParameter<bool>("SharedSeedCheck");
44  std::stringstream ss;
45  ss<<"CkfTrajectoryBuilder_"<<conf.getParameter<std::string>("ComponentName")<<"_"<<this;
46  theUniqueName = ss.str();
47  LogDebug("CkfPattern")<<"my unique name is: "<<theUniqueName;
48  */
49 }
T getParameter(std::string const &) const
BaseCkfTrajectoryBuilder(const edm::ParameterSet &conf, std::unique_ptr< TrajectoryFilter > filter, std::unique_ptr< TrajectoryFilter > inOutFilter=0)
int theMaxCand
set Event for the internal MeasurementTracker data member
def move(src, dest)
Definition: eostools.py:511
CkfTrajectoryBuilder::~CkfTrajectoryBuilder ( )
inlineoverride

Definition at line 44 of file CkfTrajectoryBuilder.h.

References buildTrajectories(), SurveyInfoScenario_cff::seed, and trajectories().

44 {}

Member Function Documentation

TempTrajectory CkfTrajectoryBuilder::buildTrajectories ( const TrajectorySeed seed,
TrajectoryContainer ret,
unsigned int &  nCandPerSeed,
const TrajectoryFilter  
) const
overridevirtual

limitedCandidates( startingTraj, regionalCondition, result); FIXME: restore regionalCondition

Reimplemented from BaseCkfTrajectoryBuilder.

Definition at line 149 of file CkfTrajectoryBuilder.cc.

References BaseCkfTrajectoryBuilder::createStartingTrajectory(), Exception, limitedCandidates(), and BaseCkfTrajectoryBuilder::theMeasurementTracker.

Referenced by trajectories(), and ~CkfTrajectoryBuilder().

152  {
153  if (theMeasurementTracker == nullptr) {
154  throw cms::Exception("LogicError") << "Asking to create trajectories to an un-initialized CkfTrajectoryBuilder.\nYou have to call clone(const MeasurementTrackerEvent *data) and then call trajectories on it instead.\n";
155  }
156 
157  TempTrajectory startingTraj = createStartingTrajectory( seed );
158 
161  nCandPerSeed = limitedCandidates(seed, startingTraj, result);
162 
163  return startingTraj;
164 
165  /*
166  //and remember what you just did
167  if (theSharedSeedCheck) rememberSeedAndTrajectories(seed,result);
168  */
169 
170  // analyseResult(result);
171 }
const MeasurementTrackerEvent * theMeasurementTracker
unsigned int limitedCandidates(const TrajectorySeed &seed, TempTrajectory &startingTraj, TrajectoryContainer &result) const
TempTrajectory createStartingTrajectory(const TrajectorySeed &seed) const
void CkfTrajectoryBuilder::findCompatibleMeasurements ( const TrajectorySeed seed,
const TempTrajectory traj,
std::vector< TrajectoryMeasurement > &  result 
) const
protectedvirtual

Reimplemented in MuonCkfTrajectoryBuilder.

Definition at line 332 of file CkfTrajectoryBuilder.cc.

References PrintoutHelper::dumpMeasurements(), TempTrajectory::empty(), TransverseImpactPointExtrapolator::extrapolate(), BaseCkfTrajectoryBuilder::findStateAndLayers(), BaseCkfTrajectoryBuilder::forwardPropagator(), mps_fire::i, TrajectoryStateOnSurface::isValid(), TempTrajectory::lastLayer(), LogDebug, jetUpdater_cfi::sort, BaseCkfTrajectoryBuilder::theEstimator, BaseCkfTrajectoryBuilder::theMeasurementTracker, tmp, and UNLIKELY.

Referenced by limitedCandidates().

335 {
336  int invalidHits = 0;
337  //Use findStateAndLayers which handles the hitless seed use case
338  std::pair<TSOS,std::vector<const DetLayer*> > && stateAndLayers = findStateAndLayers(seed,traj);
339  if (stateAndLayers.second.empty()) return;
340 
341  auto layerBegin = stateAndLayers.second.begin();
342  auto layerEnd = stateAndLayers.second.end();
343  LogDebug("CkfPattern")<<"looping on "<< stateAndLayers.second.size()<<" layers.";
344  const Propagator *fwdPropagator = forwardPropagator(seed);
345  for (auto il = layerBegin; il != layerEnd; il++) {
346 
347  LogDebug("CkfPattern")<<"looping on a layer in findCompatibleMeasurements.\n last layer: "<<traj.lastLayer()<<" current layer: "<<(*il);
348 
349  TSOS stateToUse = stateAndLayers.first;
350  //Added protection before asking for the lastLayer on the trajectory
351  if UNLIKELY (!traj.empty() && (*il)==traj.lastLayer()) {
352  LogDebug("CkfPattern")<<" self propagating in findCompatibleMeasurements.\n from: \n"<<stateToUse;
353  //self navigation case
354  // go to a middle point first
356  GlobalPoint center(0,0,0);
357  stateToUse = middle.extrapolate(stateToUse, center, *fwdPropagator);
358 
359  if (!stateToUse.isValid()) continue;
360  LogDebug("CkfPattern")<<"to: "<<stateToUse;
361  }
362 
363  LayerMeasurements layerMeasurements(theMeasurementTracker->measurementTracker(), *theMeasurementTracker);
364  std::vector<TrajectoryMeasurement> && tmp = layerMeasurements.measurements((**il),stateToUse, *fwdPropagator, *theEstimator);
365 
366  if ( !tmp.empty()) {
367  if ( result.empty()) result.swap(tmp);
368  else {
369  // keep one dummy TM at the end, skip the others
370  result.insert( result.end()-invalidHits,
371  std::make_move_iterator(tmp.begin()), std::make_move_iterator(tmp.end()));
372  }
373  invalidHits++;
374  }
375  }
376 
377  // sort the final result, keep dummy measurements at the end
378  if ( result.size() > 1) {
379  std::sort( result.begin(), result.end()-invalidHits, TrajMeasLessEstim());
380  }
381 
382  LogDebug("CkfPattern")<<"starting from:\n"
383  <<"x: "<<stateAndLayers.first.globalPosition()<<"\n"
384  <<"p: "<<stateAndLayers.first.globalMomentum()<<"\n"
386 
387 #ifdef DEBUG_INVALID
388  bool afterInvalid = false;
389  for (vector<TM>::const_iterator i=result.begin();
390  i!=result.end(); i++) {
391  if ( ! i->recHit().isValid()) afterInvalid = true;
392  if (afterInvalid && i->recHit().isValid()) {
393  edm::LogError("CkfPattern") << "CkfTrajectoryBuilder error: valid hit after invalid!" ;
394  }
395  }
396 #endif
397 
398  //analyseMeasurements( result, traj);
399 
400 }
#define LogDebug(id)
bool empty() const
True if trajectory has no measurements.
const Propagator * forwardPropagator(const TrajectorySeed &seed) const
static std::string dumpMeasurements(const std::vector< TrajectoryMeasurement > &v)
StateAndLayers findStateAndLayers(const TrajectorySeed &seed, const TempTrajectory &traj) const
const MeasurementTrackerEvent * theMeasurementTracker
TrajectoryStateOnSurface extrapolate(const FreeTrajectoryState &fts, const GlobalPoint &vtx) const
extrapolation with default (=geometrical) propagator
std::vector< std::vector< double > > tmp
Definition: MVATrainer.cc:100
#define UNLIKELY(x)
Definition: Likely.h:21
const DetLayer * lastLayer() const
Redundant method, returns the layer of lastMeasurement() .
const Chi2MeasurementEstimatorBase * theEstimator
unsigned int CkfTrajectoryBuilder::limitedCandidates ( const TrajectorySeed seed,
TempTrajectory startingTraj,
TrajectoryContainer result 
) const
protected

Definition at line 174 of file CkfTrajectoryBuilder.cc.

References objects.IsoTrackAnalyzer::candidates.

Referenced by buildTrajectories().

176 {
178  candidates.push_back( startingTraj);
179  boost::shared_ptr<const TrajectorySeed> sharedSeed(new TrajectorySeed(seed));
180  return limitedCandidates(sharedSeed, candidates,result);
181 }
std::vector< TempTrajectory > TempTrajectoryContainer
unsigned int limitedCandidates(const TrajectorySeed &seed, TempTrajectory &startingTraj, TrajectoryContainer &result) const
unsigned int CkfTrajectoryBuilder::limitedCandidates ( const boost::shared_ptr< const TrajectorySeed > &  sharedSeed,
TempTrajectoryContainer candidates,
TrajectoryContainer result 
) const
protected

Definition at line 184 of file CkfTrajectoryBuilder.cc.

References a, BaseCkfTrajectoryBuilder::addToResult(), BaseCkfTrajectoryBuilder::analyzeMeasurementsDebugger(), b, TempTrajectory::chiSquared(), IntermediateTrajectoryCleaner::clean(), PrintoutHelper::dumpCandidates(), findCompatibleMeasurements(), BaseCkfTrajectoryBuilder::forwardPropagator(), plotBeamSpotDB::last, LogDebug, TempTrajectory::lostHits(), eostools::move(), theAlwaysUseInvalidHits, BaseCkfTrajectoryBuilder::theEstimator, theIntermediateCleaning, theLostHitPenalty, theMaxCand, BaseCkfTrajectoryBuilder::theMeasurementTracker, BaseCkfTrajectoryBuilder::theTTRHBuilder, BaseCkfTrajectoryBuilder::toBeContinued(), and updateTrajectory().

186 {
187  unsigned int nIter=1;
188  unsigned int nCands=0; // ignore startingTraj
189  unsigned int prevNewCandSize=0;
190  TempTrajectoryContainer newCand; // = TrajectoryContainer();
191  newCand.reserve(2*theMaxCand);
192 
193 
194  auto trajCandLess = [&](TempTrajectory const & a, TempTrajectory const & b) {
195  return (a.chiSquared() + a.lostHits()*theLostHitPenalty) <
196  (b.chiSquared() + b.lostHits()*theLostHitPenalty);
197  };
198 
199 
200  while ( !candidates.empty()) {
201 
202  newCand.clear();
203  for (auto traj=candidates.begin(); traj!=candidates.end(); traj++) {
204  std::vector<TM> meas;
205  findCompatibleMeasurements(*sharedSeed, *traj, meas);
206 
207  // --- method for debugging
208  if(!analyzeMeasurementsDebugger(*traj,meas,
210  forwardPropagator(*sharedSeed),theEstimator,
211  theTTRHBuilder)) return nCands;
212  // ---
213 
214  if ( meas.empty()) {
215  addToResult(sharedSeed, *traj, result);
216  }
217  else {
218  std::vector<TM>::const_iterator last;
219  if ( theAlwaysUseInvalidHits) last = meas.end();
220  else {
221  if (meas.front().recHit()->isValid()) {
222  last = find_if( meas.begin(), meas.end(), [](auto const& meas){ return !meas.recHit()->isValid(); });
223  }
224  else last = meas.end();
225  }
226 
227  for(auto itm = meas.begin(); itm != last; itm++) {
228  TempTrajectory newTraj = *traj;
229  updateTrajectory( newTraj, std::move(*itm));
230 
231  if ( toBeContinued(newTraj)) {
232  newCand.push_back(std::move(newTraj)); std::push_heap(newCand.begin(),newCand.end(),trajCandLess);
233  }
234  else {
235  addToResult(sharedSeed, newTraj, result);
237  }
238  }
239  }
240 
241  // account only new candidates, i.e.
242  // - 1 candidate -> 1 candidate, don't increase count
243  // - 1 candidate -> 2 candidates, increase count by 1
244  nCands += newCand.size() - prevNewCandSize;
245  prevNewCandSize = newCand.size();
246 
247  /*
248  auto trajVal = [&](TempTrajectory const & a) {
249  return a.chiSquared() + a.lostHits()*theLostHitPenalty;
250  };
251 
252  // safe (stable?) logig: always sort, kill exceeding only if worse than last to keep
253  // if ((int)newCand.size() > theMaxCand) std::cout << "TrajVal " << theMaxCand << ' ' << newCand.size() << ' ' << trajVal(newCand.front());
254  int toCut = int(newCand.size()) - int(theMaxCand);
255  if (toCut>0) {
256  // move largest "toCut" to the end
257  for (int i=0; i<toCut; ++i)
258  std::pop_heap(newCand.begin(),newCand.end()-i,trajCandLess);
259  auto fval = trajVal(newCand.front());
260  // remove till equal to highest to keep
261  for (int i=0; i<toCut; ++i) {
262  if (fval==trajVal(newCand.back())) break;
263  newCand.pop_back();
264  }
265  //assert((int)newCand.size() >= theMaxCand);
266  //std::cout << "; " << newCand.size() << ' ' << trajVal(newCand.front()) << " " << trajVal(newCand.back());
267 
268  // std::make_heap(newCand.begin(),newCand.end(),trajCandLess);
269  // push_heap again the one left
270  for (auto iter = newCand.begin()+theMaxCand+1; iter<=newCand.end(); ++iter )
271  std::push_heap(newCand.begin(),iter,trajCandLess);
272 
273  // std::cout << "; " << newCand.size() << ' ' << trajVal(newCand.front()) << " " << trajVal(newCand.back()) << std::endl;
274  }
275 
276  */
277 
278 
279  // intermedeate login: always sort, kill all exceeding
280  while ((int)newCand.size() > theMaxCand) {
281  std::pop_heap(newCand.begin(),newCand.end(),trajCandLess);
282  // if ((int)newCand.size() == theMaxCand+1) std::cout << " " << trajVal(newCand.front()) << " " << trajVal(newCand.back()) << std::endl;
283  newCand.pop_back();
284  }
285 
286  /*
287  // original logic: sort only if > theMaxCand, kill all exceeding
288  if ((int)newCand.size() > theMaxCand) {
289  std::sort( newCand.begin(), newCand.end(), TrajCandLess<TempTrajectory>(theLostHitPenalty));
290  // std::partial_sort( newCand.begin(), newCand.begin()+theMaxCand, newCand.end(), TrajCandLess<TempTrajectory>(theLostHitPenalty));
291  std::cout << "TrajVal " << theMaxCand << ' ' << newCand.size() << ' '
292  << trajVal(newCand.back()) << ' ' << trajVal(newCand[theMaxCand-1]) << ' ' << trajVal(newCand[theMaxCand]) << std::endl;
293  newCand.resize(theMaxCand);
294  }
295  */
296 
297  } // end loop on candidates
298 
299  std::sort_heap(newCand.begin(),newCand.end(),trajCandLess);
301 
302  candidates.swap(newCand);
303 
304  LogDebug("CkfPattern") <<result.size()<<" candidates after "<<nIter++<<" CKF iteration: \n"
306  <<"\n "<<candidates.size()<<" running candidates are: \n"
308 
309  }
310  return nCands;
311 }
#define LogDebug(id)
static std::string dumpCandidates(collection &candidates)
static void clean(TempTrajectoryContainer &tracks)
const Propagator * forwardPropagator(const TrajectorySeed &seed) const
virtual bool analyzeMeasurementsDebugger(Trajectory &traj, const std::vector< TrajectoryMeasurement > &meas, const MeasurementTrackerEvent *theMeasurementTracker, const Propagator *theForwardPropagator, const Chi2MeasurementEstimatorBase *theEstimator, const TransientTrackingRecHitBuilder *theTTRHBuilder) const
std::vector< TempTrajectory > TempTrajectoryContainer
const TransientTrackingRecHitBuilder * theTTRHBuilder
void addToResult(boost::shared_ptr< const TrajectorySeed > const &seed, TempTrajectory &traj, TrajectoryContainer &result, bool inOut=false) const
const MeasurementTrackerEvent * theMeasurementTracker
float chiSquared() const
Value of the raw Chi2 of the trajectory, not normalised to the N.D.F.
double b
Definition: hdecay.h:120
bool toBeContinued(TempTrajectory &traj, bool inOut=false) const
double a
Definition: hdecay.h:121
virtual void findCompatibleMeasurements(const TrajectorySeed &seed, const TempTrajectory &traj, std::vector< TrajectoryMeasurement > &result) const
void updateTrajectory(TempTrajectory &traj, TM &&tm) const
int theMaxCand
set Event for the internal MeasurementTracker data member
def move(src, dest)
Definition: eostools.py:511
const Chi2MeasurementEstimatorBase * theEstimator
int lostHits() const
void CkfTrajectoryBuilder::rebuildTrajectories ( TempTrajectory const &  startingTraj,
const TrajectorySeed ,
TrajectoryContainer result 
) const
inlineoverridevirtual

Reimplemented from BaseCkfTrajectoryBuilder.

Definition at line 58 of file CkfTrajectoryBuilder.h.

59  {}
void CkfTrajectoryBuilder::setEvent_ ( const edm::Event iEvent,
const edm::EventSetup iSetup 
)
overrideprotectedvirtual

Implements BaseCkfTrajectoryBuilder.

Definition at line 58 of file CkfTrajectoryBuilder.cc.

Referenced by MuonCkfTrajectoryBuilder::setEvent_().

58  {
59 }
CkfTrajectoryBuilder::TrajectoryContainer CkfTrajectoryBuilder::trajectories ( const TrajectorySeed seed) const
overridevirtual

trajectories building starting from a seed

Implements TrajectoryBuilder.

Definition at line 62 of file CkfTrajectoryBuilder.cc.

References mps_fire::result.

Referenced by ~CkfTrajectoryBuilder().

63 {
65  result.reserve(5);
66  trajectories(seed, result);
67  return result;
68 }
std::vector< Trajectory > TrajectoryContainer
TrajectoryContainer trajectories(const TrajectorySeed &seed) const override
trajectories building starting from a seed
void CkfTrajectoryBuilder::trajectories ( const TrajectorySeed seed,
CkfTrajectoryBuilder::TrajectoryContainer result 
) const
overridevirtual

trajectories building starting from a seed

Reimplemented from TrajectoryBuilder.

Definition at line 129 of file CkfTrajectoryBuilder.cc.

References buildTrajectories(), and tmp.

130 {
131  // analyseSeed( seed);
132  /*
133  if (theSharedSeedCheck){
134  TempTrajectoryContainer candidates;
135  if (seedAlreadyUsed(seed,candidates))
136  {
137  //start with those candidates already made before
138  limitedCandidates(candidates,result);
139  //and quit
140  return;
141  }
142  }
143  */
144 
145  unsigned int tmp;
146  buildTrajectories(seed, result, tmp, nullptr);
147 }
std::vector< std::vector< double > > tmp
Definition: MVATrainer.cc:100
TempTrajectory buildTrajectories(const TrajectorySeed &, TrajectoryContainer &ret, unsigned int &nCandPerSeed, const TrajectoryFilter *) const override
void CkfTrajectoryBuilder::updateTrajectory ( TempTrajectory traj,
TM &&  tm 
) const
protected

Definition at line 315 of file CkfTrajectoryBuilder.cc.

References TempTrajectory::emplace(), eostools::move(), BaseCkfTrajectoryBuilder::theUpdator, and TrajectoryStateUpdator::update().

Referenced by limitedCandidates().

317 {
318  auto && predictedState = tm.predictedState();
319  auto && hit = tm.recHit();
320  if ( hit->isValid()) {
321  auto && upState = theUpdator->update( predictedState, *hit);
322  traj.emplace( std::move(predictedState), std::move(upState),
323  std::move(hit), tm.estimate(), tm.layer());
324  }
325  else {
326  traj.emplace( std::move(predictedState), std::move(hit), 0, tm.layer());
327  }
328 }
const TrajectoryStateUpdator * theUpdator
virtual TrajectoryStateOnSurface update(const TrajectoryStateOnSurface &, const TrackingRecHit &) const =0
void emplace(Args &&...args)
def move(src, dest)
Definition: eostools.py:511

Member Data Documentation

bool CkfTrajectoryBuilder::theAlwaysUseInvalidHits
protected

Definition at line 72 of file CkfTrajectoryBuilder.h.

Referenced by CkfTrajectoryBuilder(), and limitedCandidates().

bool CkfTrajectoryBuilder::theIntermediateCleaning
protected

Tells whether an intermediary cleaning stage should take place during TB.

Definition at line 70 of file CkfTrajectoryBuilder.h.

Referenced by CkfTrajectoryBuilder(), and limitedCandidates().

float CkfTrajectoryBuilder::theLostHitPenalty
protected

Chi**2 Penalty for each lost hit.

Definition at line 69 of file CkfTrajectoryBuilder.h.

Referenced by CkfTrajectoryBuilder(), and limitedCandidates().

int CkfTrajectoryBuilder::theMaxCand
protected

set Event for the internal MeasurementTracker data member

Maximum number of trajectory candidates to propagate to the next layer.

Definition at line 67 of file CkfTrajectoryBuilder.h.

Referenced by CkfTrajectoryBuilder(), and limitedCandidates().