25 const vector<TrajectoryMeasurement>& meas = traj.
measurements();
33 return vector<TrajectoryMeasurement>();
36 vector<pair<const DetLayer*, vector<TrajectoryMeasurement> > > mol;
39 vector<TrajectoryMeasurement>
result;
42 if(mol.size()<2)
return vector<TrajectoryMeasurement>();
55 LogDebug(
"MultiRecHitCollector") <<
"Layer " << mol.back().first <<
" has " << mol.back().second.size() <<
" measurements";
56 LogTrace(
"MultiRecHitCollector") <<
"Original measurements are:";
57 for(
unsigned int iLay = 0; iLay < mol.size(); iLay++){
58 LogTrace(
"MultiRecHitCollector") <<
" Layer " << mol.at(iLay).first <<
" has " << mol.at(iLay).second.size() <<
" measurements:";
59 vector<TrajectoryMeasurement>::const_iterator ibeg = (mol.at(iLay)).
second.begin();
60 vector<TrajectoryMeasurement>::const_iterator iend = (mol.at(iLay)).
second.end();
61 for (vector<TrajectoryMeasurement>::const_iterator imeas = ibeg; imeas != iend; ++imeas){
62 if (imeas->recHit()->isValid()){
63 LogTrace(
"MultiRecHitCollector") <<
" Valid Hit with DetId " << imeas->recHit()->geographicalId().rawId()
64 <<
" local position " << imeas->recHit()->hit()->localPosition()
65 <<
" global position " << imeas->recHit()->hit()->globalPosition() ;
67 LogTrace(
"MultiRecHitCollector") <<
" Invalid Hit with DetId " << imeas->recHit()->geographicalId().rawId();
73 vector<TrajectoryMeasurementGroup> groupedMeas;
75 groupedMeas = theLM.groupedMeasurements(*(mol.back().first), current,
80 vector<TrajectoryMeasurementGroup> sortedgroupedMeas;
81 for (vector<TrajectoryMeasurementGroup>::reverse_iterator
iter = groupedMeas.rbegin();
84 sortedgroupedMeas.push_back(*
iter);
93 current = mol.back().second.front().updatedState();
96 for( vector<pair<
const DetLayer*, vector<TrajectoryMeasurement> > >::reverse_iterator imol =
97 mol.rbegin() + 1; imol != mol.rend(); imol++) {
100 LogDebug(
"MultiRecHitCollector") <<
"Layer " << lay <<
" has " << (*imol).second.size() <<
" measurements";
102 vector<TrajectoryMeasurementGroup> currentLayerMeas;
104 currentLayerMeas = theLM.groupedMeasurements(*lay, current, *forwardPropagator, *(
getEstimator()));
108 current = (*imol).second.front().updatedState();
112 LogTrace(
"MultiRecHitCollector") <<
" Ending GroupedDAFHitCollector::recHits >> Original Measurement size " << meas.size()
113 <<
"\n >> GroupedDAFHitCollector returned " << result.size() <<
" measurements";
121 for (vector<TrajectoryMeasurement>::const_iterator iimeas = result.begin(); iimeas != result.end(); ++iimeas)
123 if(iimeas->recHit()->isValid()) hitcounter++;
131 else return vector<TrajectoryMeasurement>();
134 else{
return vector<TrajectoryMeasurement>();}
void buildMultiRecHits(const std::vector< TrajectoryMeasurementGroup > &measgroup, std::vector< TrajectoryMeasurement > &result) const
PropagationDirection const & direction() const
U second(std::pair< T, U > const &p)
DataContainer const & measurements() const
const MeasurementTracker * getMeasurementTracker() const
const Propagator * getPropagator() const
const Propagator * getReversePropagator() const
const MeasurementEstimator * getEstimator() const