CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
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
< TempTrajectory
TempTrajectoryContainer
 
typedef std::vector< TrajectoryTrajectoryContainer
 
- Public Types inherited from BaseCkfTrajectoryBuilder
typedef std::vector
< TempTrajectory
TempTrajectoryContainer
 
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, const TrajectoryFilter *) const
 
 CkfTrajectoryBuilder (const edm::ParameterSet &conf, edm::ConsumesCollector &iC)
 
 CkfTrajectoryBuilder (const edm::ParameterSet &conf, TrajectoryFilter *filter)
 
void rebuildTrajectories (TempTrajectory const &startingTraj, const TrajectorySeed &, TrajectoryContainer &result) const
 
virtual TrajectoryContainer trajectories (const TrajectorySeed &seed) const
 trajectories building starting from a seed More...
 
virtual void trajectories (const TrajectorySeed &seed, TrajectoryContainer &ret) const
 trajectories building starting from a seed More...
 
 ~CkfTrajectoryBuilder ()
 
- Public Member Functions inherited from BaseCkfTrajectoryBuilder
 BaseCkfTrajectoryBuilder (const edm::ParameterSet &conf, TrajectoryFilter *filter, TrajectoryFilter *inOutFilter=0)
 
 BaseCkfTrajectoryBuilder (const BaseCkfTrajectoryBuilder &)=delete
 
const
TransientTrackingRecHitBuilder
hitBuilder () const
 
BaseCkfTrajectoryBuilderoperator= (const BaseCkfTrajectoryBuilder &)=delete
 
virtual void setDebugger (CkfDebugger *dbg) const
 
virtual void setEvent (const edm::Event &event) const
 
void setEvent (const edm::Event &iEvent, const edm::EventSetup &iSetup, const MeasurementTrackerEvent *data)
 
void setNavigationSchool (NavigationSchool const *nv)
 
virtual void unset () const
 
virtual ~BaseCkfTrajectoryBuilder ()
 
- 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
 
void limitedCandidates (const TrajectorySeed &seed, TempTrajectory &startingTraj, TrajectoryContainer &result) const
 
void 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
 
StateAndLayers findStateAndLayers (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
Chi2MeasurementEstimatorBase
theEstimator
 
const MeasurementTrackerEventtheMeasurementTracker
 
const NavigationSchooltheNavigationSchool = 0
 
const PropagatorthePropagatorAlong
 
const PropagatorthePropagatorOpposite
 
const
TransientTrackingRecHitBuilder
theTTRHBuilder
 
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 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
static TrajectoryFilter * createTrajectoryFilter(const edm::ParameterSet &pset, edm::ConsumesCollector &iC)
CkfTrajectoryBuilder(const edm::ParameterSet &conf, edm::ConsumesCollector &iC)
CkfTrajectoryBuilder::CkfTrajectoryBuilder ( const edm::ParameterSet conf,
TrajectoryFilter filter 
)

Definition at line 35 of file CkfTrajectoryBuilder.cc.

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

35  :
36  BaseCkfTrajectoryBuilder(conf, filter)
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, TrajectoryFilter *filter, TrajectoryFilter *inOutFilter=0)
int theMaxCand
set Event for the internal MeasurementTracker data member
CkfTrajectoryBuilder::~CkfTrajectoryBuilder ( )
inline

Definition at line 44 of file CkfTrajectoryBuilder.h.

44 {}

Member Function Documentation

TempTrajectory CkfTrajectoryBuilder::buildTrajectories ( const TrajectorySeed seed,
TrajectoryContainer ret,
const TrajectoryFilter  
) const
virtual

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

Reimplemented from BaseCkfTrajectoryBuilder.

Definition at line 148 of file CkfTrajectoryBuilder.cc.

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

Referenced by trajectories().

150  {
151  if (theMeasurementTracker == 0) {
152  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";
153  }
154 
155  TempTrajectory && startingTraj = createStartingTrajectory( seed );
156 
159  limitedCandidates(seed, startingTraj, result);
160 
161  return startingTraj;
162 
163  /*
164  //and remember what you just did
165  if (theSharedSeedCheck) rememberSeedAndTrajectories(seed,result);
166  */
167 
168  // analyseResult(result);
169 }
tuple result
Definition: query.py:137
const MeasurementTrackerEvent * theMeasurementTracker
TempTrajectory createStartingTrajectory(const TrajectorySeed &seed) const
void limitedCandidates(const TrajectorySeed &seed, TempTrajectory &startingTraj, TrajectoryContainer &result) const
void CkfTrajectoryBuilder::findCompatibleMeasurements ( const TrajectorySeed seed,
const TempTrajectory traj,
std::vector< TrajectoryMeasurement > &  result 
) const
protectedvirtual

Reimplemented in MuonCkfTrajectoryBuilder.

Definition at line 322 of file CkfTrajectoryBuilder.cc.

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

Referenced by limitedCandidates().

325 {
326  int invalidHits = 0;
327  //Use findStateAndLayers which handles the hitless seed use case
328  std::pair<TSOS,std::vector<const DetLayer*> > && stateAndLayers = findStateAndLayers(seed,traj);
329  if (stateAndLayers.second.empty()) return;
330 
331  auto layerBegin = stateAndLayers.second.begin();
332  auto layerEnd = stateAndLayers.second.end();
333  LogDebug("CkfPattern")<<"looping on "<< stateAndLayers.second.size()<<" layers.";
334  const Propagator *fwdPropagator = forwardPropagator(seed);
335  for (auto il = layerBegin; il != layerEnd; il++) {
336 
337  LogDebug("CkfPattern")<<"looping on a layer in findCompatibleMeasurements.\n last layer: "<<traj.lastLayer()<<" current layer: "<<(*il);
338 
339  TSOS stateToUse = stateAndLayers.first;
340  //Added protection before asking for the lastLayer on the trajectory
341  if unlikely (!traj.empty() && (*il)==traj.lastLayer()) {
342  LogDebug("CkfPattern")<<" self propagating in findCompatibleMeasurements.\n from: \n"<<stateToUse;
343  //self navigation case
344  // go to a middle point first
346  GlobalPoint center(0,0,0);
347  stateToUse = middle.extrapolate(stateToUse, center, *fwdPropagator);
348 
349  if (!stateToUse.isValid()) continue;
350  LogDebug("CkfPattern")<<"to: "<<stateToUse;
351  }
352 
353  LayerMeasurements layerMeasurements(theMeasurementTracker->measurementTracker(), *theMeasurementTracker);
354  std::vector<TrajectoryMeasurement> && tmp = layerMeasurements.measurements((**il),stateToUse, *fwdPropagator, *theEstimator);
355 
356  if ( !tmp.empty()) {
357  if ( result.empty()) result.swap(tmp);
358  else {
359  // keep one dummy TM at the end, skip the others
360  result.insert( result.end()-invalidHits,
361  std::make_move_iterator(tmp.begin()), std::make_move_iterator(tmp.end()));
362  }
363  invalidHits++;
364  }
365  }
366 
367  // sort the final result, keep dummy measurements at the end
368  if ( result.size() > 1) {
369  std::sort( result.begin(), result.end()-invalidHits, TrajMeasLessEstim());
370  }
371 
372  LogDebug("CkfPattern")<<"starting from:\n"
373  <<"x: "<<stateAndLayers.first.globalPosition()<<"\n"
374  <<"p: "<<stateAndLayers.first.globalMomentum()<<"\n"
376 
377 #ifdef DEBUG_INVALID
378  bool afterInvalid = false;
379  for (vector<TM>::const_iterator i=result.begin();
380  i!=result.end(); i++) {
381  if ( ! i->recHit().isValid()) afterInvalid = true;
382  if (afterInvalid && i->recHit().isValid()) {
383  edm::LogError("CkfPattern") << "CkfTrajectoryBuilder error: valid hit after invalid!" ;
384  }
385  }
386 #endif
387 
388  //analyseMeasurements( result, traj);
389 
390 }
#define LogDebug(id)
int i
Definition: DBlmapReader.cc:9
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)
#define unlikely(x)
tuple result
Definition: query.py:137
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
const DetLayer * lastLayer() const
Redundant method, returns the layer of lastMeasurement() .
const Chi2MeasurementEstimatorBase * theEstimator
void CkfTrajectoryBuilder::limitedCandidates ( const TrajectorySeed seed,
TempTrajectory startingTraj,
TrajectoryContainer result 
) const
protected

Definition at line 172 of file CkfTrajectoryBuilder.cc.

References objects.IsoTrackAnalyzer::candidates.

Referenced by buildTrajectories().

174 {
176  candidates.push_back( startingTraj);
177  boost::shared_ptr<const TrajectorySeed> sharedSeed(new TrajectorySeed(seed));
178  limitedCandidates(sharedSeed, candidates,result);
179 }
std::vector< TempTrajectory > TempTrajectoryContainer
tuple result
Definition: query.py:137
void limitedCandidates(const TrajectorySeed &seed, TempTrajectory &startingTraj, TrajectoryContainer &result) const
void CkfTrajectoryBuilder::limitedCandidates ( const boost::shared_ptr< const TrajectorySeed > &  sharedSeed,
TempTrajectoryContainer candidates,
TrajectoryContainer result 
) const
protected

Definition at line 182 of file CkfTrajectoryBuilder.cc.

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

184 {
185  unsigned int nIter=1;
186  TempTrajectoryContainer newCand; // = TrajectoryContainer();
187  newCand.reserve(2*theMaxCand);
188 
189 
190  auto trajCandLess = [&](TempTrajectory const & a, TempTrajectory const & b) {
191  return (a.chiSquared() + a.lostHits()*theLostHitPenalty) <
192  (b.chiSquared() + b.lostHits()*theLostHitPenalty);
193  };
194 
195 
196  while ( !candidates.empty()) {
197 
198  newCand.clear();
199  for (auto traj=candidates.begin(); traj!=candidates.end(); traj++) {
200  std::vector<TM> meas;
201  findCompatibleMeasurements(*sharedSeed, *traj, meas);
202 
203  // --- method for debugging
204  if(!analyzeMeasurementsDebugger(*traj,meas,
206  forwardPropagator(*sharedSeed),theEstimator,
207  theTTRHBuilder)) return;
208  // ---
209 
210  if ( meas.empty()) {
211  if ( qualityFilter( *traj)) addToResult(sharedSeed, *traj, result);
212  }
213  else {
214  std::vector<TM>::const_iterator last;
215  if ( theAlwaysUseInvalidHits) last = meas.end();
216  else {
217  if (meas.front().recHit()->isValid()) {
218  last = find_if( meas.begin(), meas.end(), RecHitIsInvalid());
219  }
220  else last = meas.end();
221  }
222 
223  for(auto itm = meas.begin(); itm != last; itm++) {
224  TempTrajectory newTraj = *traj;
225  updateTrajectory( newTraj, std::move(*itm));
226 
227  if ( toBeContinued(newTraj)) {
228  newCand.push_back(std::move(newTraj)); std::push_heap(newCand.begin(),newCand.end(),trajCandLess);
229  }
230  else {
231  if ( qualityFilter(newTraj)) addToResult(sharedSeed, newTraj, result);
233  }
234  }
235  }
236 
237 
238  /*
239  auto trajVal = [&](TempTrajectory const & a) {
240  return a.chiSquared() + a.lostHits()*theLostHitPenalty;
241  };
242 
243  // safe (stable?) logig: always sort, kill exceeding only if worse than last to keep
244  // if ((int)newCand.size() > theMaxCand) std::cout << "TrajVal " << theMaxCand << ' ' << newCand.size() << ' ' << trajVal(newCand.front());
245  int toCut = int(newCand.size()) - int(theMaxCand);
246  if (toCut>0) {
247  // move largest "toCut" to the end
248  for (int i=0; i<toCut; ++i)
249  std::pop_heap(newCand.begin(),newCand.end()-i,trajCandLess);
250  auto fval = trajVal(newCand.front());
251  // remove till equal to highest to keep
252  for (int i=0; i<toCut; ++i) {
253  if (fval==trajVal(newCand.back())) break;
254  newCand.pop_back();
255  }
256  //assert((int)newCand.size() >= theMaxCand);
257  //std::cout << "; " << newCand.size() << ' ' << trajVal(newCand.front()) << " " << trajVal(newCand.back());
258 
259  // std::make_heap(newCand.begin(),newCand.end(),trajCandLess);
260  // push_heap again the one left
261  for (auto iter = newCand.begin()+theMaxCand+1; iter<=newCand.end(); ++iter )
262  std::push_heap(newCand.begin(),iter,trajCandLess);
263 
264  // std::cout << "; " << newCand.size() << ' ' << trajVal(newCand.front()) << " " << trajVal(newCand.back()) << std::endl;
265  }
266 
267  */
268 
269 
270  // intermedeate login: always sort, kill all exceeding
271  while ((int)newCand.size() > theMaxCand) {
272  std::pop_heap(newCand.begin(),newCand.end(),trajCandLess);
273  // if ((int)newCand.size() == theMaxCand+1) std::cout << " " << trajVal(newCand.front()) << " " << trajVal(newCand.back()) << std::endl;
274  newCand.pop_back();
275  }
276 
277  /*
278  // original logic: sort only if > theMaxCand, kill all exceeding
279  if ((int)newCand.size() > theMaxCand) {
280  std::sort( newCand.begin(), newCand.end(), TrajCandLess<TempTrajectory>(theLostHitPenalty));
281  // std::partial_sort( newCand.begin(), newCand.begin()+theMaxCand, newCand.end(), TrajCandLess<TempTrajectory>(theLostHitPenalty));
282  std::cout << "TrajVal " << theMaxCand << ' ' << newCand.size() << ' '
283  << trajVal(newCand.back()) << ' ' << trajVal(newCand[theMaxCand-1]) << ' ' << trajVal(newCand[theMaxCand]) << std::endl;
284  newCand.resize(theMaxCand);
285  }
286  */
287 
288  } // end loop on candidates
289 
290  std::sort_heap(newCand.begin(),newCand.end(),trajCandLess);
292 
293  candidates.swap(newCand);
294 
295  LogDebug("CkfPattern") <<result.size()<<" candidates after "<<nIter++<<" CKF iteration: \n"
297  <<"\n "<<candidates.size()<<" running candidates are: \n"
299 
300  }
301 }
#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
bool qualityFilter(const TempTrajectory &traj, bool inOut=false) const
const TransientTrackingRecHitBuilder * theTTRHBuilder
tuple result
Definition: query.py:137
def move
Definition: eostools.py:508
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
const Chi2MeasurementEstimatorBase * theEstimator
int lostHits() const
void CkfTrajectoryBuilder::rebuildTrajectories ( TempTrajectory const &  startingTraj,
const TrajectorySeed ,
TrajectoryContainer result 
) const
inlinevirtual

Reimplemented from BaseCkfTrajectoryBuilder.

Definition at line 57 of file CkfTrajectoryBuilder.h.

58  {}
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
virtual

trajectories building starting from a seed

Implements TrajectoryBuilder.

Definition at line 62 of file CkfTrajectoryBuilder.cc.

References query::result.

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

trajectories building starting from a seed

Reimplemented from TrajectoryBuilder.

Definition at line 129 of file CkfTrajectoryBuilder.cc.

References buildTrajectories().

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  buildTrajectories(seed, result,nullptr);
146 }
TempTrajectory buildTrajectories(const TrajectorySeed &, TrajectoryContainer &ret, const TrajectoryFilter *) const
tuple result
Definition: query.py:137
void CkfTrajectoryBuilder::updateTrajectory ( TempTrajectory traj,
TM &&  tm 
) const
protected

Definition at line 305 of file CkfTrajectoryBuilder.cc.

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

Referenced by limitedCandidates().

307 {
308  auto && predictedState = tm.predictedState();
309  auto && hit = tm.recHit();
310  if ( hit->isValid()) {
311  auto && upState = theUpdator->update( predictedState, *hit);
312  traj.emplace( std::move(predictedState), std::move(upState),
313  std::move(hit), tm.estimate(), tm.layer());
314  }
315  else {
316  traj.emplace( std::move(predictedState), std::move(hit), 0, tm.layer());
317  }
318 }
const TrajectoryStateUpdator * theUpdator
virtual TrajectoryStateOnSurface update(const TrajectoryStateOnSurface &, const TrackingRecHit &) const =0
def move
Definition: eostools.py:508
void emplace(Args &&...args)

Member Data Documentation

bool CkfTrajectoryBuilder::theAlwaysUseInvalidHits
protected

Definition at line 71 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 69 of file CkfTrajectoryBuilder.h.

Referenced by CkfTrajectoryBuilder(), and limitedCandidates().

float CkfTrajectoryBuilder::theLostHitPenalty
protected

Chi**2 Penalty for each lost hit.

Definition at line 68 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 66 of file CkfTrajectoryBuilder.h.

Referenced by CkfTrajectoryBuilder(), and limitedCandidates().