|
|
#include <TrajectorySegmentBuilder.h>
|
std::vector< TempTrajectory > | addGroup (TempTrajectory const &traj, std::vector< TrajectoryMeasurementGroup >::const_iterator begin, std::vector< TrajectoryMeasurementGroup >::const_iterator end) |
|
void | cleanCandidates (std::vector< TempTrajectory > &candidates) const |
| clean a set of candidates More...
|
|
void | lockMeasurement (const TM &measurement) |
| mark a hit as used More...
|
|
std::vector< TrajectoryMeasurement > | redoMeasurements (const TempTrajectory &traj, const DetGroup &detGroup) const |
| retrieve compatible hits from a DetGroup More...
|
|
std::vector< TrajectoryMeasurement > | unlockedMeasurements (const std::vector< TM > &measurements) const |
| get list of unused hits More...
|
|
void | updateCandidates (TempTrajectory const &traj, const std::vector< TM > &measurements, TempTrajectoryContainer &candidates) |
| creation of new candidates from a segment and a collection of hits More...
|
|
void | updateCandidatesWithBestHit (TempTrajectory const &traj, TM measurements, TempTrajectoryContainer &candidates) |
| creation of a new candidate from a segment and the best hit out of a collection More...
|
|
void | updateTrajectory (TempTrajectory &traj, TM tm) const |
| update of a trajectory with a hit More...
|
|
void | updateWithInvalidHit (TempTrajectory &traj, const std::vector< TMG > &groups, TempTrajectoryContainer &candidates) const |
|
Definition at line 31 of file TrajectorySegmentBuilder.h.
◆ ConstRecHitContainer
◆ ConstRecHitPointer
◆ FTS
◆ TempTrajectoryContainer
◆ TM
◆ TMG
◆ TrajectoryContainer
◆ TSOS
◆ TrajectorySegmentBuilder()
◆ ~TrajectorySegmentBuilder()
TrajectorySegmentBuilder::~TrajectorySegmentBuilder |
( |
| ) |
|
|
inline |
◆ addGroup()
Definition at line 216 of file TrajectorySegmentBuilder.cc.
219 vector<TempTrajectory>
ret;
231 cout <<
"TSB::addGroup : traj.size() = " << traj.measurements().size() <<
" first group at "
237 updatedTrajectories.reserve(2);
238 if (traj.measurements().empty()) {
241 if (!firstMeasurements.empty())
248 cout <<
"TSB::addGroup : updating with first group - " << updatedTrajectories.size() <<
" trajectories" << endl;
259 cout <<
"TSB::addGroup : updating" << updatedTrajectories.size() <<
" trajectories-1" << endl;
264 updatedTrajectories.push_back(traj);
268 for (
auto const& ut : updatedTrajectories) {
271 cout <<
"TSB::addGroup : trying to extend candidate at " << &ut <<
" size " << ut.measurements().size() << endl;
275 cout <<
"TSB::addGroup : " << finalTrajectories.size() <<
" finalised candidates before cleaning" << endl;
283 for (
auto const&
t : finalTrajectories)
286 cout <<
"TSB::addGroup : got " << ntf <<
" finalised candidates" << endl;
289 for (
auto&
t : finalTrajectories)
297 ret.reserve(updatedTrajectories.size());
298 for (
auto&
t : updatedTrajectories)
References begin, gather_cfg::cout, cmsutils::bqueue< T >::empty(), TempTrajectory::empty(), end, TempTrajectory::measurements(), eostools::move(), runTheMatrix::ret, cmsutils::bqueue< T >::size(), OrderedSet::t, and UNLIKELY.
◆ cleanCandidates()
void TrajectorySegmentBuilder::cleanCandidates |
( |
std::vector< TempTrajectory > & |
candidates | ) |
const |
|
private |
◆ lockMeasurement()
void TrajectorySegmentBuilder::lockMeasurement |
( |
const TM & |
measurement | ) |
|
|
private |
◆ redoMeasurements()
retrieve compatible hits from a DetGroup
Definition at line 339 of file TrajectorySegmentBuilder.cc.
350 for (
auto const& det : detGroup) {
References tracking::TempMeasurements::clear(), gather_cfg::cout, tracking::TempMeasurements::distances, tracking::TempMeasurements::hits, mps_fire::i, GeomDetCompatibilityChecker::isCompatible(), TempTrajectory::lastMeasurement(), MeasurementDetWithData::measurements(), eostools::move(), mps_fire::result, tracking::TempMeasurements::size(), UNLIKELY, and TrajectoryMeasurement::updatedState().
◆ segments()
new segments within layer
Definition at line 65 of file TrajectorySegmentBuilder.cc.
78 cout <<
"TSB: number of measurement groups = " << measGroups.size() << endl;
91 constexpr
long long MAXCOMB = 100000000;
95 for (
auto const& gr : measGroups) {
98 for (
auto const&
m : gr.measurements())
100 LIKELY(
m.recHitR().isValid()) nhit++;
107 <<
" found " << measGroups.size() <<
" groups and more than " << static_cast<unsigned int>(MAXCOMB)
108 <<
" combinations - limiting to " << (ngrp - 1) <<
" groups";
111 statCount.truncated();
118 UNLIKELY(truncate && ngrp > 0) measGroups.resize(ngrp - 1);
125 for (vector<TMG>::const_iterator ig = measGroups.begin(); ig != measGroups.end(); ++ig) {
127 const vector<TM>& measurements = ig->measurements();
128 for (vector<TM>::const_iterator im = measurements.begin(); im != measurements.end(); ++im) {
129 if (im->recHit()->isValid())
137 cout <<
"TrajectorySegmentBuilder::partialTrajectories:: det ids & hit types / group" << endl;
138 for (vector<TMG>::const_iterator ig = measGroups.begin(); ig != measGroups.end(); ++ig) {
139 const vector<TM>& measurements = ig->measurements();
140 for (vector<TM>::const_iterator im = measurements.begin(); im != measurements.end(); ++im) {
141 if (im != measurements.begin())
143 if (im->recHit()->det())
144 cout << im->recHit()->det()->geographicalId().rawId() <<
" " << im->recHit()->getType();
References HLT_2018_cff::candidates, gather_cfg::cout, LIKELY, TrajectoryStateOnSurface::localError(), visualization-live-secondInstance_cfg::m, LocalTrajectoryError::matrix(), Skims_PA_cff::name, and UNLIKELY.
◆ unlockedMeasurements()
vector< TrajectoryMeasurement > TrajectorySegmentBuilder::unlockedMeasurements |
( |
const std::vector< TM > & |
measurements | ) |
const |
|
private |
◆ updateCandidates()
creation of new candidates from a segment and a collection of hits
Definition at line 311 of file TrajectorySegmentBuilder.cc.
317 for (
auto im = measurements.begin(); im != measurements.end(); ++im) {
318 if (im->recHit()->isValid()) {
References HLT_2018_cff::candidates.
◆ updateCandidatesWithBestHit()
◆ updateTrajectory()
void TrajectorySegmentBuilder::updateTrajectory |
( |
TempTrajectory & |
traj, |
|
|
TM |
tm |
|
) |
| const |
|
private |
◆ updateWithInvalidHit()
Definition at line 379 of file TrajectorySegmentBuilder.cc.
388 for (
auto const& gr : groups) {
389 auto const& measurements = gr.measurements();
390 for (
auto im = measurements.rbegin(); im != measurements.rend(); ++im) {
391 auto const&
hit = im->recHitR();
399 auto const& predState = im->predictedState();
401 (predState.isValid() &&
hit.det()->surface().bounds().inside(predState.localPosition()))) {
407 cout <<
"TrajectorySegmentBuilder::updateWithInvalidHit "
408 <<
"added inactive hit" << endl;
422 for (
auto const& gr : groups) {
423 auto const& measurements = gr.measurements();
424 for (
auto im = measurements.rbegin(); im != measurements.rend(); ++im) {
426 auto const&
hit = im->recHitR();
431 auto const& predState = im->predictedState();
432 if (
iteration > 0 || (predState.isValid() &&
hit.surface()->bounds().inside(predState.localPosition()))) {
References HLT_2018_cff::candidates, gather_cfg::cout, align_cfg::iteration, LIKELY, TrackingRecHit::missing, UNLIKELY, and TrackingRecHit::valid.
◆ theBestHitOnly
bool TrajectorySegmentBuilder::theBestHitOnly |
|
private |
◆ theDbgFlg
bool TrajectorySegmentBuilder::theDbgFlg |
|
private |
◆ theEstimator
◆ theFullPropagator
const Propagator& TrajectorySegmentBuilder::theFullPropagator |
|
private |
◆ theGeomPropagator
const Propagator& TrajectorySegmentBuilder::theGeomPropagator |
|
private |
◆ theLayer
const DetLayer& TrajectorySegmentBuilder::theLayer |
|
private |
◆ theLayerMeasurements
◆ theLockedHits
◆ theLockHits
bool TrajectorySegmentBuilder::theLockHits |
|
private |
◆ theMaxCand
int TrajectorySegmentBuilder::theMaxCand |
|
private |
◆ theUpdator
ret
prodAgent to be discontinued
ConstRecHitContainer theLockedHits
std::vector< TrajectoryMeasurement > unlockedMeasurements(const std::vector< TM > &measurements) const
get list of unused hits
U second(std::pair< T, U > const &p)
void lockMeasurement(const TM &measurement)
mark a hit as used
const Propagator & theFullPropagator
TrajectoryStateOnSurface const & updatedState() const
const AlgebraicSymMatrix55 & matrix() const
void find(edm::Handle< EcalRecHitCollection > &hits, DetId thisDet, std::vector< EcalRecHitCollection::const_iterator > &hit, bool debug=false)
const DetLayer & theLayer
const TrajectoryMeasurement & lastMeasurement() const
virtual PropagationDirection propagationDirection() const final
const_iterator rbegin() const
static std::pair< bool, TrajectoryStateOnSurface > isCompatible(const GeomDet *theDet, const TrajectoryStateOnSurface &ts, const Propagator &prop, const MeasurementEstimator &est)
const TrajectoryStateUpdator & theUpdator
virtual TrajectoryStateOnSurface update(const TrajectoryStateOnSurface &, const TrackingRecHit &) const =0
void clear(HadCaloObj &c)
std::vector< TrajectoryMeasurement > redoMeasurements(const TempTrajectory &traj, const DetGroup &detGroup) const
retrieve compatible hits from a DetGroup
bool lessByFoundHits(const Trajectory &a, const Trajectory &b)
for(int i=first, nt=offsets[nh];i< nt;i+=gridDim.x *blockDim.x)
void updateCandidatesWithBestHit(TempTrajectory const &traj, TM measurements, TempTrajectoryContainer &candidates)
creation of a new candidate from a segment and the best hit out of a collection
std::vector< TempTrajectory > TempTrajectoryContainer
void updateCandidates(TempTrajectory const &traj, const std::vector< TM > &measurements, TempTrajectoryContainer &candidates)
creation of new candidates from a segment and a collection of hits
std::vector< TempTrajectory > addGroup(TempTrajectory const &traj, std::vector< TrajectoryMeasurementGroup >::const_iterator begin, std::vector< TrajectoryMeasurementGroup >::const_iterator end)
void cleanCandidates(std::vector< TempTrajectory > &candidates) const
clean a set of candidates
std::vector< TrajectoryMeasurementGroup > groupedMeasurements(const DetLayer &layer, const TrajectoryStateOnSurface &startingState, const Propagator &prop, const MeasurementEstimator &est) const
void updateWithInvalidHit(TempTrajectory &traj, const std::vector< TMG > &groups, TempTrajectoryContainer &candidates) const
const_iterator rend() const
const MeasurementEstimator & theEstimator
const LayerMeasurements * theLayerMeasurements
void emplace(Args &&... args)
const LocalTrajectoryError & localError() const
const Propagator & theGeomPropagator
void updateTrajectory(TempTrajectory &traj, TM tm) const
update of a trajectory with a hit