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

void 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 (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
 
float theFoundHitBonus
 
bool theIntermediateCleaning
 
float theLostHitPenalty
 
int theMaxCand
 set Event for the internal MeasurementTracker data member More...
 
int theMinHitForDoubleBonus
 
- 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, theFoundHitBonus, theIntermediateCleaning, theLostHitPenalty, theMaxCand, and theMinHitForDoubleBonus.

41  theMaxCand = conf.getParameter<int>("maxCand");
42  theLostHitPenalty = conf.getParameter<double>("lostHitPenalty");
43  theFoundHitBonus = conf.getParameter<double>("foundHitBonus");
44  theMinHitForDoubleBonus = conf.getParameter<int>("minHitForDoubleBonus");
45  theIntermediateCleaning = conf.getParameter<bool>("intermediateCleaning");
46  theAlwaysUseInvalidHits = conf.getParameter<bool>("alwaysUseInvalidHits");
47 }
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()

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

Reimplemented from BaseCkfTrajectoryBuilder.

Definition at line 78 of file CkfTrajectoryBuilder.cc.

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

Referenced by trajectories().

81  {
82  if (theMeasurementTracker == nullptr) {
83  throw cms::Exception("LogicError")
84  << "Asking to create trajectories to an un-initialized CkfTrajectoryBuilder.\nYou have to call clone(const "
85  "MeasurementTrackerEvent *data) and then call trajectories on it instead.\n";
86  }
87 
89 
90  nCandPerSeed = limitedCandidates(seed, startingTraj, result);
91 }
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 49 of file CkfTrajectoryBuilder.cc.

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

Referenced by MuonCkfTrajectoryBuilder::fillPSetDescription().

49  {
51  iDesc.add<int>("maxCand", 5);
52  iDesc.add<double>("lostHitPenalty", 30.);
53  iDesc.add<double>("foundHitBonus", 0.);
54  iDesc.add<int>("minHitForDoubleBonus", 8888);
55  iDesc.add<bool>("intermediateCleaning", true);
56  iDesc.add<bool>("alwaysUseInvalidHits", true);
57 
59  psdTF.addNode(edm::PluginDescription<TrajectoryFilterFactory>("ComponentType", true));
60  iDesc.add<edm::ParameterSetDescription>("trajectoryFilter", psdTF);
61 }
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 207 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().

209  {
210  int invalidHits = 0;
211  //Use findStateAndLayers which handles the hitless seed use case
212  std::pair<TSOS, std::vector<const DetLayer*> >&& stateAndLayers = findStateAndLayers(seed, traj);
213  if (stateAndLayers.second.empty())
214  return;
215 
216  auto layerBegin = stateAndLayers.second.begin();
217  auto layerEnd = stateAndLayers.second.end();
218  LogDebug("CkfPattern") << "looping on " << stateAndLayers.second.size() << " layers.";
219  const Propagator* fwdPropagator = forwardPropagator(seed);
220  for (auto il = layerBegin; il != layerEnd; il++) {
221  LogDebug("CkfPattern") << "looping on a layer in findCompatibleMeasurements.\n last layer: " << traj.lastLayer()
222  << " current layer: " << (*il);
223 
224  TSOS stateToUse = stateAndLayers.first;
225  //Added protection before asking for the lastLayer on the trajectory
226  if UNLIKELY (!traj.empty() && (*il) == traj.lastLayer()) {
227  LogDebug("CkfPattern") << " self propagating in findCompatibleMeasurements.\n from: \n" << stateToUse;
228  //self navigation case
229  // go to a middle point first
231  GlobalPoint center(0, 0, 0);
232  stateToUse = middle.extrapolate(stateToUse, center, *fwdPropagator);
233 
234  if (!stateToUse.isValid())
235  continue;
236  LogDebug("CkfPattern") << "to: " << stateToUse;
237  }
238 
239  LayerMeasurements layerMeasurements(theMeasurementTracker->measurementTracker(), *theMeasurementTracker);
240  std::vector<TrajectoryMeasurement>&& tmp =
241  layerMeasurements.measurements((**il), stateToUse, *fwdPropagator, *theEstimator);
242 
243  if (!tmp.empty()) {
244  if (result.empty())
245  result.swap(tmp);
246  else {
247  // keep one dummy TM at the end, skip the others
248  result.insert(
249  result.end() - invalidHits, std::make_move_iterator(tmp.begin()), std::make_move_iterator(tmp.end()));
250  }
251  invalidHits++;
252  }
253  }
254 
255  // sort the final result, keep dummy measurements at the end
256  if (result.size() > 1) {
257  std::sort(result.begin(), result.end() - invalidHits, TrajMeasLessEstim());
258  }
259 
260  LogDebug("CkfPattern") << "starting from:\n"
261  << "x: " << stateAndLayers.first.globalPosition() << "\n"
262  << "p: " << stateAndLayers.first.globalMomentum() << "\n"
264 
265 #ifdef DEBUG_INVALID
266  bool afterInvalid = false;
267  for (vector<TM>::const_iterator i = result.begin(); i != result.end(); i++) {
268  if (!i->recHit().isValid())
269  afterInvalid = true;
270  if (afterInvalid && i->recHit().isValid()) {
271  edm::LogError("CkfPattern") << "CkfTrajectoryBuilder error: valid hit after invalid!";
272  }
273  }
274 #endif
275 }
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 93 of file CkfTrajectoryBuilder.cc.

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

Referenced by buildTrajectories().

95  {
97  candidates.push_back(startingTraj);
98  std::shared_ptr<const TrajectorySeed> sharedSeed(new TrajectorySeed(seed));
99  return limitedCandidates(sharedSeed, candidates, result);
100 }
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 102 of file CkfTrajectoryBuilder.cc.

References a, BaseCkfTrajectoryBuilder::addToResult(), BaseCkfTrajectoryBuilder::analyzeMeasurementsDebugger(), cms::cuda::assert(), b, HLT_2024v14_cff::candidates, IntermediateTrajectoryCleaner::clean(), PrintoutHelper::dumpCandidates(), findCompatibleMeasurements(), BaseCkfTrajectoryBuilder::forwardPropagator(), full, createfilelist::int, dqmdumpme::last, LogDebug, eostools::move(), mps_fire::result, offlineSlimmedPrimaryVertices_cfi::score, theAlwaysUseInvalidHits, BaseCkfTrajectoryBuilder::theEstimator, theFoundHitBonus, theIntermediateCleaning, theLostHitPenalty, theMaxCand, BaseCkfTrajectoryBuilder::theMeasurementTracker, theMinHitForDoubleBonus, BaseCkfTrajectoryBuilder::theTTRHBuilder, BaseCkfTrajectoryBuilder::toBeContinued(), and updateTrajectory().

104  {
105  unsigned int nIter = 1;
106  unsigned int nCands = 0; // ignore startingTraj
107  unsigned int prevNewCandSize = 0;
108  TempTrajectoryContainer newCand; // = TrajectoryContainer();
109  newCand.reserve(theMaxCand);
110 
111  auto score = [&](TempTrajectory const& a) {
112  auto bonus = theFoundHitBonus;
113  bonus += a.foundHits() > theMinHitForDoubleBonus ? bonus : 0;
114  return a.chiSquared() + a.lostHits() * theLostHitPenalty - bonus * a.foundHits();
115  };
116 
117  auto trajCandLess = [&](TempTrajectory const& a, TempTrajectory const& b) { return score(a) < score(b); };
118 
119  while (!candidates.empty()) {
120  newCand.clear();
121  bool full = 0;
122  for (auto traj = candidates.begin(); traj != candidates.end(); traj++) {
123  std::vector<TM> meas;
124  findCompatibleMeasurements(*sharedSeed, *traj, meas);
125 
126  // --- method for debugging
129  return nCands;
130  // ---
131 
132  if (meas.empty()) {
133  addToResult(sharedSeed, *traj, result);
134  } else {
135  std::vector<TM>::const_iterator last;
137  last = meas.end();
138  else {
139  if (meas.front().recHit()->isValid()) {
140  last = find_if(meas.begin(), meas.end(), [](auto const& meas) { return !meas.recHit()->isValid(); });
141  } else
142  last = meas.end();
143  }
144 
145  for (auto itm = meas.begin(); itm != last; itm++) {
146  TempTrajectory newTraj = *traj;
147  updateTrajectory(newTraj, std::move(*itm));
148 
149  if (toBeContinued(newTraj)) {
150  if (full) {
151  bool better = trajCandLess(newTraj, newCand.front());
152  if (better) {
153  // replace worst
154  std::pop_heap(newCand.begin(), newCand.end(), trajCandLess);
155  newCand.back().swap(newTraj);
156  std::push_heap(newCand.begin(), newCand.end(), trajCandLess);
157  } // else? no need to add it just to remove it later!
158  } else {
159  newCand.push_back(std::move(newTraj));
160  full = (int)newCand.size() == theMaxCand;
161  if (full)
162  std::make_heap(newCand.begin(), newCand.end(), trajCandLess);
163  }
164  } else {
165  addToResult(sharedSeed, newTraj, result);
167  }
168  }
169  }
170 
171  // account only new candidates, i.e.
172  // - 1 candidate -> 1 candidate, don't increase count
173  // - 1 candidate -> 2 candidates, increase count by 1
174  nCands += newCand.size() - prevNewCandSize;
175  prevNewCandSize = newCand.size();
176 
177  assert((int)newCand.size() <= theMaxCand);
178  if (full)
179  assert((int)newCand.size() == theMaxCand);
180  } // end loop on candidates
181 
182  // no reason to sort (no sorting in Grouped version!)
185 
186  candidates.swap(newCand);
187 
188  LogDebug("CkfPattern") << result.size() << " candidates after " << nIter++ << " CKF iteration: \n"
189  << PrintoutHelper::dumpCandidates(result) << "\n " << candidates.size()
190  << " running candidates are: \n"
192  }
193  return nCands;
194 }
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
assert(be >=bs)
std::vector< TempTrajectory > TempTrajectoryContainer
const TransientTrackingRecHitBuilder * theTTRHBuilder
Definition: GenABIO.cc:168
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:120
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:121
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 ( const TrajectorySeed ,
TrajectoryContainer result 
) const
inlineoverridevirtual

Reimplemented from BaseCkfTrajectoryBuilder.

Definition at line 57 of file CkfTrajectoryBuilder.h.

57 {}

◆ setEvent_()

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

Implements BaseCkfTrajectoryBuilder.

Definition at line 63 of file CkfTrajectoryBuilder.cc.

Referenced by MuonCkfTrajectoryBuilder::setEvent_().

63 {}

◆ trajectories() [1/2]

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

trajectories building starting from a seed

Implements TrajectoryBuilder.

Definition at line 65 of file CkfTrajectoryBuilder.cc.

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

65  {
67  result.reserve(5);
69  return result;
70 }
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 72 of file CkfTrajectoryBuilder.cc.

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

73  {
74  unsigned int tmp;
75  buildTrajectories(seed, result, tmp, nullptr);
76 }
tmp
align.sh
Definition: createJobs.py:716
void buildTrajectories(const TrajectorySeed &, TrajectoryContainer &ret, unsigned int &nCandPerSeed, const TrajectoryFilter *) const override

◆ updateTrajectory()

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

Definition at line 196 of file CkfTrajectoryBuilder.cc.

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

Referenced by limitedCandidates().

196  {
197  auto&& predictedState = tm.predictedState();
198  auto&& hit = tm.recHit();
199  if (hit->isValid()) {
200  auto&& upState = theUpdator->update(predictedState, *hit);
201  traj.emplace(predictedState, std::move(upState), hit, tm.estimate(), tm.layer());
202  } else {
203  traj.emplace(predictedState, hit, 0, tm.layer());
204  }
205 }
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 70 of file CkfTrajectoryBuilder.h.

Referenced by CkfTrajectoryBuilder(), and limitedCandidates().

◆ theFoundHitBonus

float CkfTrajectoryBuilder::theFoundHitBonus
protected

Chi**2 Bonus for each found hit.

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

Referenced by CkfTrajectoryBuilder(), and limitedCandidates().

◆ theLostHitPenalty

float CkfTrajectoryBuilder::theLostHitPenalty
protected

Chi**2 Penalty for each lost hit.

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

Referenced by CkfTrajectoryBuilder(), and limitedCandidates().

◆ theMinHitForDoubleBonus

int CkfTrajectoryBuilder::theMinHitForDoubleBonus
protected

minimun number of hits to double the bonus above

Definition at line 67 of file CkfTrajectoryBuilder.h.

Referenced by CkfTrajectoryBuilder(), and limitedCandidates().