18 LogTrace(
"MultiRecHitCollector") <<
" Calling SimpleDAFHitCollector::recHits" << std::endl;
22 const vector<TrajectoryMeasurement>& meas = traj.
measurements();
24 if (meas.empty())
return vector<TrajectoryMeasurement>();
27 LogTrace(
"MultiRecHitCollector") <<
"Original measurements are:";
28 for(vector<TrajectoryMeasurement>::const_iterator itrajmeas = meas.begin(); itrajmeas < meas.end();
30 if (itrajmeas->recHit()->isValid()){
31 LogTrace(
"MultiRecHitCollector") <<
" Valid Hit with DetId " << itrajmeas->recHit()->geographicalId().rawId()
32 <<
" local position " << itrajmeas->recHit()->hit()->localPosition()
33 <<
" global position " << itrajmeas->recHit()->hit()->globalPosition() ;
35 LogTrace(
"MultiRecHitCollector") <<
" Invalid Hit with DetId " << itrajmeas->recHit()->geographicalId().rawId();
41 vector<TrajectoryMeasurement>
result;
42 for(vector<TrajectoryMeasurement>::const_reverse_iterator itrajmeas = meas.rbegin(); itrajmeas < meas.rend();
45 DetId id = itrajmeas->recHit()->geographicalId();
48 std::vector<const TrackingRecHit*> hits;
56 LogTrace(
"MultiRecHitCollector") <<
"Something wrong! no valid TSOS found in current group ";
61 LogTrace(
"MultiRecHitCollector") <<
" Found " << tmps.
size() <<
" compatible measurements";
62 for (std::size_t
i=0;
i!=tmps.
size(); ++
i){
63 DetId idtemps = tmps.
hits[
i]->geographicalId();
65 if( idtemps ==
id && tmps.
hits[
i]->hit()->isValid() ) {
66 hits.push_back(tmps.
hits[
i]->hit());
72 LogTrace(
"MultiRecHitCollector") <<
" -> but no valid hits found in current group.";
74 if( result.empty() )
continue;
82 LogTrace(
"MultiRecHitCollector") <<
" -> " << hits.size() <<
" valid hits for this sensor.";
88 LogTrace(
"MultiRecHitCollector") <<
" No measurements found in current group.";
90 if( result.empty() )
continue;
98 LogTrace(
"MultiRecHitCollector") <<
" Ending SimpleDAFHitCollector::recHits >> " << result.size();
106 for (vector<TrajectoryMeasurement>::const_iterator iimeas = result.begin(); iimeas != result.end(); ++iimeas) {
107 if(iimeas->recHit()->isValid()) hitcounter++;
112 else return vector<TrajectoryMeasurement>();
115 else{
return vector<TrajectoryMeasurement>();}
void rescaleError(double factor)
const MeasurementEstimator * getEstimator() const
virtual const GeomDet & geomDet() const
DataContainer const & measurements() const
virtual TransientTrackingRecHit::RecHitPointer buildMultiRecHit(const std::vector< const TrackingRecHit * > &rhv, const TrajectoryStateOnSurface &tsos, float annealing=1.) const
const MeasurementDet & mdet() const
bool measurements(const TrajectoryStateOnSurface &stateOnThisDet, const MeasurementEstimator &est, TempMeasurements &result) const
const SiTrackerMultiRecHitUpdator * theUpdator