19 template <
class T>
T sqr(
T t) {
return t*
t;}
31 hits_(es, *layer, tmp);
32 result.reserve(tmp.size());
33 for (
auto h : tmp) result.emplace_back(*
h);
41 hits_(es, layer, result);
55 const DetLayer * detLayer = layer.detLayer();
56 LogDebug(
"CosmicTrackingRegion") <<
"Looking at hits on subdet/layer " << layer.name();
67 LogDebug(
"CosmicTrackingRegion") <<
"The initial region characteristics are:" <<
"\n" 68 <<
" Origin = " << origin() <<
"\n" 69 <<
" Direction = " << direction() <<
"\n" 70 <<
" Eta = " << origin().eta() <<
"\n" 71 <<
" Phi = " << origin().phi();
74 float phi = dir.
phi();
83 <<
"The state used to find measurement with the measurement tracker is:\n" << tsos;
97 LogDebug(
"CosmicTrackingRegion") <<
"The initial state propagates to the layer surface: \n" << stateOnLayer
104 LogDebug(
"CosmicTrackingRegion") <<
"The initial state does not propagate to the layer surface.";
109 vector<DetWithState> compatDets = detLayer->
compatibleDets(tsos, prop, est);
110 LogDebug(
"CosmicTrackingRegion") <<
"Compatible dets = " << compatDets.size();
117 LayerMeasurements lm(theMeasurementTracker_->measurementTracker(), *theMeasurementTracker_);
118 vector<TrajectoryMeasurement> meas = lm.
measurements(*detLayer, tsos, prop, est);
119 LogDebug(
"CosmicTrackingRegion") <<
"Number of Trajectory measurements = " << meas.size()
120 <<
" but the last one is always an invalid hit, by construction.";
127 for (
auto const & im : meas) {
128 if(!im.recHit()->isValid())
continue;
131 cache.emplace_back(ptrHit);
132 result.emplace_back(ptrHit);
virtual TrackingRegion::ctfHits hits(const edm::EventSetup &es, const ctfseeding::SeedingLayer *layer) const
std::vector< TrajectoryMeasurement > measurements(const DetLayer &layer, const TrajectoryStateOnSurface &startingState, const Propagator &prop, const MeasurementEstimator &est) const
Sin< T >::type sin(const T &t)
Geom::Phi< T > phi() const
ctfseeding::SeedingLayer::Hits ctfHits
GlobalPoint globalPosition() const
void hits_(const edm::EventSetup &es, const T &layer, TrackingRegion::Hits &result) const
virtual std::vector< DetWithState > compatibleDets(const TrajectoryStateOnSurface &startingState, const Propagator &prop, const MeasurementEstimator &est) const
static PlanePointer build(Args &&...args)
FreeTrajectoryState const * freeState(bool withErrors=true) const
Cos< T >::type cos(const T &t)
virtual const BoundSurface & surface() const =0
The surface of the GeometricSearchDet.
std::pair< const GeomDet *, TrajectoryStateOnSurface > DetWithState
SeedingLayerSetsHits::Hits Hits
std::vector< std::vector< double > > tmp
Square< F >::type sqr(const F &f)
std::pair< const GeomDet *, TrajectoryStateOnSurface > DetWithState
bool isUndef(TrackingRecHit const &hit)
T const * product() const