30 LogTrace(
"MultiRecHitCollector") <<
" Calling SimpleDAFHitCollector::recHits" << std::endl;
34 const vector<TrajectoryMeasurement>& meas = traj.
measurements();
35 unsigned int hitcounter = 1;
38 return vector<TrajectoryMeasurement>();
40 LogTrace(
"MultiRecHitCollector") <<
" Original measurements are:";
45 vector<TrajectoryMeasurement>
result;
46 for (vector<TrajectoryMeasurement>::const_reverse_iterator itrajmeas = meas.rbegin(); itrajmeas < meas.rend();
47 itrajmeas++, hitcounter++) {
48 DetId id = itrajmeas->recHit()->geographicalId();
52 std::vector<const TrackingRecHit*>
hits;
53 std::vector<std::unique_ptr<const TrackingRecHit>> hitsOwner;
62 LogTrace(
"MultiRecHitCollector") <<
"Something wrong! no valid TSOS found in current group ";
68 if (hitcounter == meas.size())
69 combtsos = predtsos_fwd;
70 else if (hitcounter == 1)
71 combtsos = predtsos_bwd;
73 combtsos =
combiner(predtsos_bwd, predtsos_fwd);
77 LogTrace(
"MultiRecHitCollector") <<
" Found " << tmps.
size() <<
" compatible measurements";
79 for (std::size_t
i = 0;
i != tmps.
size(); ++
i) {
80 DetId idtemps = tmps.
hits[
i]->geographicalId();
82 if (idtemps ==
id && tmps.
hits[
i]->hit()->isValid()) {
83 LogTrace(
"MultiRecHitCollector") <<
" This is valid with position " << tmps.
hits[
i]->hit()->localPosition()
84 <<
" and error " << tmps.
hits[
i]->hit()->localPositionError();
90 hits.push_back(hitsOwner.back().get());
99 LogTrace(
"MultiRecHitCollector") <<
" -> but no valid hits found in current group.";
109 if (!itrajmeas->recHit()->isValid())
111 <<
" -> " <<
hits.size() <<
" valid hits for this sensor. (IT WAS INVALID!!!)";
113 LogTrace(
"MultiRecHitCollector") <<
" -> " <<
hits.size() <<
" valid hits for this sensor.";
119 LogTrace(
"MultiRecHitCollector") <<
" No measurements found in current group.";
130 LogTrace(
"MultiRecHitCollector") <<
" Ending SimpleDAFHitCollector::recHits >> " <<
result.size();
140 for (vector<TrajectoryMeasurement>::const_iterator iimeas =
result.begin(); iimeas !=
result.end(); ++iimeas) {
141 if (iimeas->recHit()->isValid())
148 return vector<TrajectoryMeasurement>();
152 return vector<TrajectoryMeasurement>();
void Debug(const std::vector< TrajectoryMeasurement > TM) const
virtual const GeomDet & geomDet() const
bool measurements(const TrajectoryStateOnSurface &stateOnThisDet, const MeasurementEstimator &est, TempMeasurements &result) const
const MeasurementEstimator * getEstimator() const
TrackingRecHit::ConstRecHitPointer makeShared(SiPixelRecHit const &hit, TrajectoryStateOnSurface const &tsos) const override
std::unique_ptr< TrackingRecHit > rightdimension(TrackingRecHit const &hit) const
DataContainer const & measurements() const
virtual TransientTrackingRecHit::RecHitPointer buildMultiRecHit(const std::vector< const TrackingRecHit *> &rhv, const TrajectoryStateOnSurface &tsos, MeasurementDetWithData &measDet, float annealing=1.) const
std::shared_ptr< TrackingRecHit const > ConstRecHitPointer
virtual RecHitPointer build(const TrackingRecHit *p) const =0
build a tracking rechit from an existing rechit
const TransientTrackingRecHitBuilder * getBuilder() const
std::shared_ptr< TrackingRecHit const > RecHitPointer
TkClonerImpl theHitCloner
const MeasurementDet & mdet() const
const SiTrackerMultiRecHitUpdator * theUpdator