20 template <
class T>
T sqr(
T t) {
return t*
t;}
24 using namespace ctfseeding;
31 return hits_(ev, es, *layer);
38 return hits_(ev, es, layer);
54 const DetLayer * detLayer = layer.detLayer();
55 LogDebug(
"CosmicTrackingRegion") <<
"Looking at hits on subdet/layer " << layer.name();
66 LogDebug(
"CosmicTrackingRegion") <<
"The initial region characteristics are:" <<
"\n"
67 <<
" Origin = " << origin() <<
"\n"
68 <<
" Direction = " << direction() <<
"\n"
69 <<
" Eta = " << origin().eta() <<
"\n"
70 <<
" Phi = " << origin().phi();
82 <<
"The state used to find measurement with the measurement tracker is:\n" << tsos;
96 LogDebug(
"CosmicTrackingRegion") <<
"The initial state propagates to the layer surface: \n" << stateOnLayer
103 LogDebug(
"CosmicTrackingRegion") <<
"The initial state does not propagate to the layer surface.";
108 vector<DetWithState> compatDets = detLayer->
compatibleDets(tsos, prop, est);
109 LogDebug(
"CosmicTrackingRegion") <<
"Compatible dets = " << compatDets.size();
122 vector<TrajectoryMeasurement> meas = lm.
measurements(*detLayer, tsos, prop, est);
123 LogDebug(
"CosmicTrackingRegion") <<
"Number of Trajectory measurements = " << meas.size()
124 <<
" but the last one is always an invalid hit, by construction.";
127 typedef vector<TrajectoryMeasurement>::const_iterator IM;
129 for (IM im = meas.begin(); im != meas.end(); im++) {
132 if (ptrHit->isValid()) {
133 LogDebug(
"CosmicTrackingRegion") <<
"Hit found in the region at position: "<<ptrHit->globalPosition();
134 result.push_back( ptrHit );
137 else LogDebug(
"CosmicTrackingRegion") <<
"No valid hit";
TrackingRegion::Hits hits_(const edm::Event &ev, const edm::EventSetup &es, const T &layer) const
std::vector< TrajectoryMeasurement > measurements(const DetLayer &layer, const TrajectoryStateOnSurface &startingState, const Propagator &prop, const MeasurementEstimator &est) const
virtual const BoundSurface & surface() const =0
The surface of the GeometricSearchDet.
virtual TrackingRegion::Hits hits(const edm::Event &ev, const edm::EventSetup &es, const ctfseeding::SeedingLayer *layer) const
get hits from layer compatible with region constraints
Sin< T >::type sin(const T &t)
Geom::Phi< T > phi() const
GlobalPoint globalPosition() 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)
std::pair< const GeomDet *, TrajectoryStateOnSurface > DetWithState
bool getByLabel(InputTag const &tag, Handle< PROD > &result) const
T const * product() const
Square< F >::type sqr(const F &f)
std::pair< const GeomDet *, TrajectoryStateOnSurface > DetWithState
tuple AnalyticalPropagator