|
|
#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 215 of file TrajectorySegmentBuilder.cc.
218 vector<TempTrajectory>
ret;
222 cout <<
"TSB::addGroup : no groups left" << endl;
229 cout <<
"TSB::addGroup : traj.size() = " << traj.measurements().size() <<
" first group at "
235 updatedTrajectories.reserve(2);
236 if (traj.measurements().empty()) {
239 if (!firstMeasurements.empty())
245 cout <<
"TSB::addGroup : updating with first group - " << updatedTrajectories.size() <<
" trajectories" << endl;
255 cout <<
"TSB::addGroup : updating" << updatedTrajectories.size() <<
" trajectories-1" << endl;
260 updatedTrajectories.push_back(traj);
262 if (begin + 1 !=
end) {
264 for (
auto const& ut : updatedTrajectories) {
266 cout <<
"TSB::addGroup : trying to extend candidate at " << &ut <<
" size " << ut.measurements().size() << endl;
267 vector<TempTrajectory>&& finalTrajectories =
addGroup(ut, begin + 1,
end);
269 cout <<
"TSB::addGroup : " << finalTrajectories.size() <<
" finalised candidates before cleaning" << endl;
276 for (
auto const&
t : finalTrajectories)
279 cout <<
"TSB::addGroup : got " << ntf <<
" finalised candidates" << endl;
282 for (
auto&
t : finalTrajectories)
290 ret.reserve(updatedTrajectories.size());
291 for (
auto&
t : updatedTrajectories)
References gather_cfg::cout, cmsutils::bqueue< T >::empty(), TempTrajectory::empty(), mps_fire::end, TempTrajectory::measurements(), eostools::move(), runTheMatrix::ret, cmsutils::bqueue< T >::size(), submitPVValidationJobs::t, and UNLIKELY.
◆ cleanCandidates()
void TrajectorySegmentBuilder::cleanCandidates |
( |
std::vector< TempTrajectory > & |
candidates | ) |
const |
|
private |
clean a set of candidates
Definition at line 472 of file TrajectorySegmentBuilder.cc.
483 for (
int i = 0;
i != NC; ++
i)
References TrackingRecHit::all, HLT_FULL_cff::candidates, newFWLiteAna::found, mps_fire::i, testProducerWithPsetDescEmpty_cfi::i1, testProducerWithPsetDescEmpty_cfi::i2, dqmiolumiharvest::j, lessByFoundHits(), cmsutils::bqueue< T >::rbegin(), cmsutils::bqueue< T >::rend(), and jetUpdater_cfi::sort.
◆ lockMeasurement()
void TrajectorySegmentBuilder::lockMeasurement |
( |
const TM & |
measurement | ) |
|
|
private |
◆ redoMeasurements()
retrieve compatible hits from a DetGroup
Definition at line 332 of file TrajectorySegmentBuilder.cc.
339 cout <<
"TSB::redoMeasurements : nr. of measurements / group =";
343 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(), jetUpdater_cfi::sort, 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())
99 if LIKELY (
m.recHitR().isValid())
106 <<
" found " << measGroups.size() <<
" groups and more than " << static_cast<unsigned int>(MAXCOMB)
107 <<
" combinations - limiting to " << (ngrp - 1) <<
" groups";
110 statCount.truncated();
117 measGroups.resize(ngrp - 1);
124 for (vector<TMG>::const_iterator ig = measGroups.begin(); ig != measGroups.end(); ++ig) {
126 const vector<TM>& measurements = ig->measurements();
127 for (vector<TM>::const_iterator im = measurements.begin(); im != measurements.end(); ++im) {
128 if (im->recHit()->isValid())
136 cout <<
"TrajectorySegmentBuilder::partialTrajectories:: det ids & hit types / group" << endl;
137 for (vector<TMG>::const_iterator ig = measGroups.begin(); ig != measGroups.end(); ++ig) {
138 const vector<TM>& measurements = ig->measurements();
139 for (vector<TM>::const_iterator im = measurements.begin(); im != measurements.end(); ++im) {
140 if (im != measurements.begin())
142 if (im->recHit()->det())
143 cout << im->recHit()->det()->geographicalId().rawId() <<
" " << im->recHit()->getType();
172 cout <<
"TSB: back with " <<
candidates.size() <<
" candidates" << endl;
181 cout <<
"TSB: " <<
candidates.size() <<
" candidates after invalid hit" << endl;
References HLT_FULL_cff::candidates, gather_cfg::cout, LIKELY, TrajectoryStateOnSurface::localError(), visualization-live-secondInstance_cfg::m, LocalTrajectoryError::matrix(), Skims_PA_cff::name, gpuPixelDoublets::ntot, 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 304 of file TrajectorySegmentBuilder.cc.
310 for (
auto im = measurements.begin(); im != measurements.end(); ++im) {
311 if (im->recHit()->isValid()) {
References HLT_FULL_cff::candidates.
◆ updateCandidatesWithBestHit()
◆ updateTrajectory()
void TrajectorySegmentBuilder::updateTrajectory |
( |
TempTrajectory & |
traj, |
|
|
TM |
tm |
|
) |
| const |
|
private |
◆ updateWithInvalidHit()
Definition at line 372 of file TrajectorySegmentBuilder.cc.
381 for (
auto const& gr : groups) {
382 auto const& measurements = gr.measurements();
383 for (
auto im = measurements.rbegin(); im != measurements.rend(); ++im) {
384 auto const&
hit = im->recHitR();
392 auto const& predState = im->predictedState();
394 (predState.isValid() &&
hit.det()->surface().bounds().inside(predState.localPosition()))) {
399 cout <<
"TrajectorySegmentBuilder::updateWithInvalidHit "
400 <<
"added inactive hit" << endl;
414 for (
auto const& gr : groups) {
415 auto const& measurements = gr.measurements();
416 for (
auto im = measurements.rbegin(); im != measurements.rend(); ++im) {
418 auto const&
hit = im->recHitR();
423 auto const& predState = im->predictedState();
424 if (
iteration > 0 || (predState.isValid() &&
hit.surface()->bounds().inside(predState.localPosition()))) {
References HLT_FULL_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
Log< level::Info, false > LogInfo
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 bool isValid(const Frame &aFrame, const FrameQuality &aQuality, const uint16_t aExpectedPos)
const_iterator rbegin() const
constexpr std::array< uint8_t, layerIndexSize > layer
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