CMS 3D CMS Logo

List of all members | Public Types | Public Member Functions | Static 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, edm::ConsumesCollector iC, 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, edm::ConsumesCollector iC, std::unique_ptr< TrajectoryFilter > filter, std::unique_ptr< TrajectoryFilter > inOutFilter=nullptr)
 
 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 ()
 

Static Public Member Functions

static void fillPSetDescription (edm::ParameterSetDescription &iDesc)
 
- Static Public Member Functions inherited from BaseCkfTrajectoryBuilder
static void fillPSetDescription (edm::ParameterSetDescription &iDesc)
 

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 std::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 (std::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 = nullptr
 
const MeasurementTrackerEventtheMeasurementTracker = nullptr
 
const NavigationSchooltheNavigationSchool = nullptr
 
const PropagatorthePropagatorAlong = nullptr
 
const PropagatorthePropagatorOpposite = nullptr
 
const TransientTrackingRecHitBuildertheTTRHBuilder = nullptr
 
const TrajectoryStateUpdatortheUpdator = nullptr
 

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 33 of file CkfTrajectoryBuilder.h.

Member Typedef Documentation

◆ TempTrajectoryContainer

Definition at line 36 of file CkfTrajectoryBuilder.h.

◆ TrajectoryContainer

Definition at line 35 of file CkfTrajectoryBuilder.h.

Constructor & Destructor Documentation

◆ CkfTrajectoryBuilder() [1/2]

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

Definition at line 31 of file CkfTrajectoryBuilder.cc.

32  : CkfTrajectoryBuilder(conf,
33  iC,
35  conf.getParameter<edm::ParameterSet>("trajectoryFilter"), iC)) {}
T getParameter(std::string const &) const
Definition: ParameterSet.h:307
CkfTrajectoryBuilder(const edm::ParameterSet &conf, edm::ConsumesCollector iC)
static std::unique_ptr< TrajectoryFilter > createTrajectoryFilter(const edm::ParameterSet &pset, edm::ConsumesCollector &iC)

◆ CkfTrajectoryBuilder() [2/2]

CkfTrajectoryBuilder::CkfTrajectoryBuilder ( const edm::ParameterSet conf,
edm::ConsumesCollector  iC,
std::unique_ptr< TrajectoryFilter filter 
)

Definition at line 37 of file CkfTrajectoryBuilder.cc.

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

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

◆ ~CkfTrajectoryBuilder()

CkfTrajectoryBuilder::~CkfTrajectoryBuilder ( )
inlineoverride

Definition at line 43 of file CkfTrajectoryBuilder.h.

43 {}

Member Function Documentation

◆ buildTrajectories()

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 160 of file CkfTrajectoryBuilder.cc.

References BaseCkfTrajectoryBuilder::createStartingTrajectory(), Exception, limitedCandidates(), mps_fire::result, fileCollector::seed, and BaseCkfTrajectoryBuilder::theMeasurementTracker.

Referenced by trajectories().

163  {
164  if (theMeasurementTracker == nullptr) {
165  throw cms::Exception("LogicError")
166  << "Asking to create trajectories to an un-initialized CkfTrajectoryBuilder.\nYou have to call clone(const "
167  "MeasurementTrackerEvent *data) and then call trajectories on it instead.\n";
168  }
169 
171 
174  nCandPerSeed = limitedCandidates(seed, startingTraj, result);
175 
176  return startingTraj;
177 
178  /*
179  //and remember what you just did
180  if (theSharedSeedCheck) rememberSeedAndTrajectories(seed,result);
181  */
182 
183  // analyseResult(result);
184 }
TempTrajectory createStartingTrajectory(const TrajectorySeed &seed) const
unsigned int limitedCandidates(const TrajectorySeed &seed, TempTrajectory &startingTraj, TrajectoryContainer &result) const
const MeasurementTrackerEvent * theMeasurementTracker

◆ fillPSetDescription()

void CkfTrajectoryBuilder::fillPSetDescription ( edm::ParameterSetDescription iDesc)
static

Definition at line 54 of file CkfTrajectoryBuilder.cc.

References edm::ParameterSetDescription::add(), edm::ParameterSetDescription::addNode(), and BaseCkfTrajectoryBuilder::fillPSetDescription().

Referenced by MuonCkfTrajectoryBuilder::fillPSetDescription().

54  {
56  iDesc.add<int>("maxCand", 5);
57  iDesc.add<double>("lostHitPenalty", 30.);
58  iDesc.add<bool>("intermediateCleaning", true);
59  iDesc.add<bool>("alwaysUseInvalidHits", true);
60 
62  psdTF.addNode(edm::PluginDescription<TrajectoryFilterFactory>("ComponentType", true));
63  iDesc.add<edm::ParameterSetDescription>("trajectoryFilter", psdTF);
64 }
ParameterDescriptionNode * addNode(ParameterDescriptionNode const &node)
ParameterDescriptionBase * add(U const &iLabel, T const &value)
static void fillPSetDescription(edm::ParameterSetDescription &iDesc)

◆ findCompatibleMeasurements()

void CkfTrajectoryBuilder::findCompatibleMeasurements ( const TrajectorySeed seed,
const TempTrajectory traj,
std::vector< TrajectoryMeasurement > &  result 
) const
protectedvirtual

Reimplemented in MuonCkfTrajectoryBuilder.

Definition at line 329 of file CkfTrajectoryBuilder.cc.

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

Referenced by limitedCandidates().

331  {
332  int invalidHits = 0;
333  //Use findStateAndLayers which handles the hitless seed use case
334  std::pair<TSOS, std::vector<const DetLayer*> >&& stateAndLayers = findStateAndLayers(seed, traj);
335  if (stateAndLayers.second.empty())
336  return;
337 
338  auto layerBegin = stateAndLayers.second.begin();
339  auto layerEnd = stateAndLayers.second.end();
340  LogDebug("CkfPattern") << "looping on " << stateAndLayers.second.size() << " layers.";
341  const Propagator* fwdPropagator = forwardPropagator(seed);
342  for (auto il = layerBegin; il != layerEnd; il++) {
343  LogDebug("CkfPattern") << "looping on a layer in findCompatibleMeasurements.\n last layer: " << traj.lastLayer()
344  << " current layer: " << (*il);
345 
346  TSOS stateToUse = stateAndLayers.first;
347  //Added protection before asking for the lastLayer on the trajectory
348  if UNLIKELY (!traj.empty() && (*il) == traj.lastLayer()) {
349  LogDebug("CkfPattern") << " self propagating in findCompatibleMeasurements.\n from: \n" << stateToUse;
350  //self navigation case
351  // go to a middle point first
353  GlobalPoint center(0, 0, 0);
354  stateToUse = middle.extrapolate(stateToUse, center, *fwdPropagator);
355 
356  if (!stateToUse.isValid())
357  continue;
358  LogDebug("CkfPattern") << "to: " << stateToUse;
359  }
360 
361  LayerMeasurements layerMeasurements(theMeasurementTracker->measurementTracker(), *theMeasurementTracker);
362  std::vector<TrajectoryMeasurement>&& tmp =
363  layerMeasurements.measurements((**il), stateToUse, *fwdPropagator, *theEstimator);
364 
365  if (!tmp.empty()) {
366  if (result.empty())
367  result.swap(tmp);
368  else {
369  // keep one dummy TM at the end, skip the others
370  result.insert(
371  result.end() - invalidHits, 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(); i != result.end(); i++) {
390  if (!i->recHit().isValid())
391  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 }
StateAndLayers findStateAndLayers(const TrajectorySeed &seed, const TempTrajectory &traj) const
TrajectoryStateOnSurface extrapolate(const FreeTrajectoryState &fts, const GlobalPoint &vtx) const
extrapolation with default (=geometrical) propagator
Log< level::Error, false > LogError
static std::string dumpMeasurements(const std::vector< TrajectoryMeasurement > &v)
const MeasurementTrackerEvent * theMeasurementTracker
const DetLayer * lastLayer() const
Redundant method, returns the layer of lastMeasurement() .
const Propagator * forwardPropagator(const TrajectorySeed &seed) const
#define UNLIKELY(x)
Definition: Likely.h:21
tmp
align.sh
Definition: createJobs.py:716
const Chi2MeasurementEstimatorBase * theEstimator
bool empty() const
True if trajectory has no measurements.
#define LogDebug(id)

◆ limitedCandidates() [1/2]

unsigned int CkfTrajectoryBuilder::limitedCandidates ( const TrajectorySeed seed,
TempTrajectory startingTraj,
TrajectoryContainer result 
) const
protected

Definition at line 186 of file CkfTrajectoryBuilder.cc.

References HLT_2022v12_cff::candidates, mps_fire::result, and fileCollector::seed.

Referenced by buildTrajectories().

188  {
190  candidates.push_back(startingTraj);
191  std::shared_ptr<const TrajectorySeed> sharedSeed(new TrajectorySeed(seed));
192  return limitedCandidates(sharedSeed, candidates, result);
193 }
unsigned int limitedCandidates(const TrajectorySeed &seed, TempTrajectory &startingTraj, TrajectoryContainer &result) const
std::vector< TempTrajectory > TempTrajectoryContainer

◆ limitedCandidates() [2/2]

unsigned int CkfTrajectoryBuilder::limitedCandidates ( const std::shared_ptr< const TrajectorySeed > &  sharedSeed,
TempTrajectoryContainer candidates,
TrajectoryContainer result 
) const
protected

Definition at line 195 of file CkfTrajectoryBuilder.cc.

References a, BaseCkfTrajectoryBuilder::addToResult(), BaseCkfTrajectoryBuilder::analyzeMeasurementsDebugger(), b, HLT_2022v12_cff::candidates, IntermediateTrajectoryCleaner::clean(), PrintoutHelper::dumpCandidates(), findCompatibleMeasurements(), BaseCkfTrajectoryBuilder::forwardPropagator(), dqmdumpme::last, LogDebug, eostools::move(), mps_fire::result, theAlwaysUseInvalidHits, BaseCkfTrajectoryBuilder::theEstimator, theIntermediateCleaning, theLostHitPenalty, theMaxCand, BaseCkfTrajectoryBuilder::theMeasurementTracker, BaseCkfTrajectoryBuilder::theTTRHBuilder, BaseCkfTrajectoryBuilder::toBeContinued(), and updateTrajectory().

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

◆ rebuildTrajectories()

void CkfTrajectoryBuilder::rebuildTrajectories ( TempTrajectory const &  startingTraj,
const TrajectorySeed ,
TrajectoryContainer result 
) const
inlineoverridevirtual

Reimplemented from BaseCkfTrajectoryBuilder.

Definition at line 58 of file CkfTrajectoryBuilder.h.

60  {}

◆ setEvent_()

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

Implements BaseCkfTrajectoryBuilder.

Definition at line 73 of file CkfTrajectoryBuilder.cc.

Referenced by MuonCkfTrajectoryBuilder::setEvent_().

73 {}

◆ trajectories() [1/2]

CkfTrajectoryBuilder::TrajectoryContainer CkfTrajectoryBuilder::trajectories ( const TrajectorySeed seed) const
overridevirtual

trajectories building starting from a seed

Implements TrajectoryBuilder.

Definition at line 75 of file CkfTrajectoryBuilder.cc.

References mps_fire::result, and fileCollector::seed.

75  {
77  result.reserve(5);
79  return result;
80 }
std::vector< Trajectory > TrajectoryContainer
TrajectoryContainer trajectories(const TrajectorySeed &seed) const override
trajectories building starting from a seed

◆ trajectories() [2/2]

void CkfTrajectoryBuilder::trajectories ( const TrajectorySeed seed,
CkfTrajectoryBuilder::TrajectoryContainer result 
) const
overridevirtual

trajectories building starting from a seed

Reimplemented from TrajectoryBuilder.

Definition at line 140 of file CkfTrajectoryBuilder.cc.

References buildTrajectories(), mps_fire::result, fileCollector::seed, and createJobs::tmp.

141  {
142  // analyseSeed( seed);
143  /*
144  if (theSharedSeedCheck){
145  TempTrajectoryContainer candidates;
146  if (seedAlreadyUsed(seed,candidates))
147  {
148  //start with those candidates already made before
149  limitedCandidates(candidates,result);
150  //and quit
151  return;
152  }
153  }
154  */
155 
156  unsigned int tmp;
157  buildTrajectories(seed, result, tmp, nullptr);
158 }
TempTrajectory buildTrajectories(const TrajectorySeed &, TrajectoryContainer &ret, unsigned int &nCandPerSeed, const TrajectoryFilter *) const override
tmp
align.sh
Definition: createJobs.py:716

◆ updateTrajectory()

void CkfTrajectoryBuilder::updateTrajectory ( TempTrajectory traj,
TM &&  tm 
) const
protected

Definition at line 318 of file CkfTrajectoryBuilder.cc.

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

Referenced by limitedCandidates().

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

Member Data Documentation

◆ theAlwaysUseInvalidHits

bool CkfTrajectoryBuilder::theAlwaysUseInvalidHits
protected

Definition at line 71 of file CkfTrajectoryBuilder.h.

Referenced by CkfTrajectoryBuilder(), and limitedCandidates().

◆ theIntermediateCleaning

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().

◆ theLostHitPenalty

float CkfTrajectoryBuilder::theLostHitPenalty
protected

Chi**2 Penalty for each lost hit.

Definition at line 68 of file CkfTrajectoryBuilder.h.

Referenced by CkfTrajectoryBuilder(), and limitedCandidates().

◆ theMaxCand

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().