24 #define _debug_SimpleDAFHitCollector_ 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);
76 if (measDet.
measurements(smoothtsos, *(getEstimator()), tmps)) {
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();
88 auto righthit = rightdimension(*preciseHit);
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>();
158 for (vector<TrajectoryMeasurement>::const_iterator itrajmeas = TM.begin(); itrajmeas < TM.end(); itrajmeas++) {
159 if (itrajmeas->recHit()->isValid()) {
160 LogTrace(
"MultiRecHitCollector") <<
" Valid Hit with DetId " << itrajmeas->recHit()->geographicalId().rawId()
162 << itrajmeas->recHit()->dimension()
164 <<
" local position " << itrajmeas->recHit()->hit()->localPosition()
165 <<
" global position " << itrajmeas->recHit()->hit()->globalPosition()
166 <<
" and r " << itrajmeas->recHit()->hit()->globalPosition().perp();
168 DetId hitId = itrajmeas->recHit()->geographicalId();
173 LogTrace(
"MultiRecHitCollector") <<
" I am TIB " << theTopology->tibLayer(hitId);
176 LogTrace(
"MultiRecHitCollector") <<
" I am TOB " << theTopology->tobLayer(hitId);
179 LogTrace(
"MultiRecHitCollector") <<
" I am TEC " << theTopology->tecWheel(hitId);
182 LogTrace(
"MultiRecHitCollector") <<
" I am TID " << theTopology->tidWheel(hitId);
185 LogTrace(
"MultiRecHitCollector") <<
" I am PixBar " << theTopology->pxbLayer(hitId);
188 LogTrace(
"MultiRecHitCollector") <<
" I am PixFwd " << theTopology->pxfDisk(hitId);
191 LogTrace(
"MultiRecHitCollector") <<
" UNKNOWN TRACKER HIT TYPE ";
202 LogTrace(
"MultiRecHitCollector") <<
" UNKNOWN MUON HIT TYPE ";
204 LogTrace(
"MultiRecHitCollector") <<
" UNKNOWN HIT TYPE ";
206 LogTrace(
"MultiRecHitCollector") <<
" TSOS predicted_fwd " << itrajmeas->predictedState().localPosition();
207 LogTrace(
"MultiRecHitCollector") <<
" TSOS predicted_bwd " 208 << itrajmeas->backwardPredictedState().localPosition();
209 LogTrace(
"MultiRecHitCollector") <<
" TSOS smoothtsos " << itrajmeas->updatedState().localPosition();
211 LogTrace(
"MultiRecHitCollector") <<
" Invalid Hit with DetId " << itrajmeas->recHit()->geographicalId().rawId();
213 LogTrace(
"MultiRecHitCollector") <<
"\n";
static constexpr auto TEC
void Debug(const std::vector< TrajectoryMeasurement > TM) const
virtual const GeomDet & geomDet() const
bool measurements(const TrajectoryStateOnSurface &stateOnThisDet, const MeasurementEstimator &est, TempMeasurements &result) const
constexpr Detector det() const
get the detector field from this detid
DataContainer const & measurements() const
std::vector< TrajectoryMeasurement > recHits(const Trajectory &, const MeasurementTrackerEvent *theMTE) const override
std::shared_ptr< TrackingRecHit const > ConstRecHitPointer
constexpr int subdetId() const
get the contents of the subdetector field (not cast into any detector's numbering enum) ...
static constexpr auto TOB
std::shared_ptr< TrackingRecHit const > RecHitPointer
static constexpr auto TIB
const MeasurementDet & mdet() const
static constexpr auto TID