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;
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);
168 for (
size_t j=0; j<origins.size() && n_regions <
m_maxNRegions; ++j) {
170 result.push_back( std::make_unique<RectangularEtaPhiTrackingRegion>(
187 edm::LogInfo (
"PointSeededTrackingRegionsProducer") <<
"produced "<<n_regions<<
" regions";
T getParameter(std::string const &) const
double z0() const
z coordinate
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
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
double z0Error() const
error on z
virtual std::vector< std::unique_ptr< TrackingRegion > > regions(const edm::Event &e, const edm::EventSetup &es) const override
T const * product() const
double sigmaZ() const
sigma z
virtual ~PointSeededTrackingRegionsProducer()
double y0() const
y coordinate
bool isUninitialized() const
double x0() const
x coordinate