1 #ifndef PointSeededTrackingRegionsProducer_h
2 #define PointSeededTrackingRegionsProducer_h
20 #include <TLorentzVector.h>
63 else edm::LogError (
"PointSeededTrackingRegionsProducer")<<
"Unknown mode string: "<<modeString;
98 m_nSigmaZBeamSpot = regPSet.
getParameter<
double>(
"nSigmaZBeamSpot");
99 if (m_nSigmaZBeamSpot < 0.)
100 edm::LogError (
"PointSeededTrackingRegionsProducer")<<
"nSigmaZBeamSpot must be positive for BeamSpotSigma mode!";
109 std::vector<std::unique_ptr<TrackingRegion> >
result;
114 if( !bs.
isValid() )
return result;
117 GlobalPoint default_origin( bs->x0(), bs->y0(), bs->z0() );
120 std::vector< std::pair< GlobalPoint, float > > origins;
124 origins.push_back( std::make_pair( default_origin,
131 for (reco::VertexCollection::const_iterator iv = vertices->begin(),
ev = vertices->end();
133 if ( iv->isFake() || !iv->isValid() )
continue;
135 origins.push_back( std::make_pair(
GlobalPoint( iv->x(), iv->y(), iv->z() ),
141 if ( origins.empty() ) {
142 origins.push_back( std::make_pair( default_origin,
152 measurementTracker = hmte.
product();
164 double z = (x*x+y*
y)/TMath::Tan(theta);
170 result.push_back( std::make_unique<RectangularEtaPhiTrackingRegion>(
187 edm::LogInfo (
"PointSeededTrackingRegionsProducer") <<
"produced "<<n_regions<<
" regions";
T getParameter(std::string const &) const
edm::EDGetTokenT< reco::BeamSpot > token_beamSpot
bool getByToken(EDGetToken token, Handle< PROD > &result) const
PointSeededTrackingRegionsProducer(const edm::ParameterSet &conf, edm::ConsumesCollector &&iC)
Global3DPoint GlobalPoint
Geom::Theta< T > theta() const
bool exists(std::string const ¶meterName) const
checks if a parameter exists
std::vector< Vertex > VertexCollection
collection of Vertex objects
virtual std::vector< std::unique_ptr< TrackingRegion > > regions(const edm::Event &e, const edm::EventSetup &es) const override
static UseMeasurementTracker stringToUseMeasurementTracker(const std::string &name)
edm::EDGetTokenT< MeasurementTrackerEvent > token_measurementTracker
RectangularEtaPhiTrackingRegion::UseMeasurementTracker m_whereToUseMeasurementTracker
U second(std::pair< T, U > const &p)
edm::EDGetTokenT< reco::VertexCollection > token_vertex
T const * product() const
virtual ~PointSeededTrackingRegionsProducer()
bool isUninitialized() const