1 #ifndef PointSeededTrackingRegionsProducer_h
2 #define PointSeededTrackingRegionsProducer_h
20 #include <TLorentzVector.h>
63 else edm::LogError (
"PointSeededTrackingRegionsProducer")<<
"Unknown mode string: "<<modeString;
86 if (regPSet.
exists(
"measurementTrackerName"))
93 if (regPSet.
exists(
"whereToUseMeasurementTracker"))
107 m_nSigmaZBeamSpot = regPSet.
getParameter<
double>(
"nSigmaZBeamSpot");
108 if (m_nSigmaZBeamSpot < 0.)
109 edm::LogError (
"PointSeededTrackingRegionsProducer")<<
"nSigmaZBeamSpot must be positive for BeamSpotSigma mode!";
118 std::vector<TrackingRegion* >
result;
123 if( !bs.
isValid() )
return result;
126 GlobalPoint default_origin( bs->x0(), bs->y0(), bs->z0() );
129 std::vector< std::pair< GlobalPoint, float > > origins;
133 origins.push_back( std::make_pair( default_origin,
140 for (reco::VertexCollection::const_iterator iv = vertices->begin(),
ev = vertices->end();
142 if ( iv->isFake() || !iv->isValid() )
continue;
144 origins.push_back( std::make_pair(
GlobalPoint( iv->x(), iv->y(), iv->z() ),
150 if ( origins.empty() ) {
151 origins.push_back( std::make_pair( default_origin,
161 measurementTracker = hmte.
product();
173 double z = (x*x+y*
y)/TMath::Tan(theta);
196 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
edm::EDGetTokenT< MeasurementTrackerEvent > token_measurementTracker
RectangularEtaPhiTrackingRegion::UseMeasurementTracker m_whereToUseMeasurementTracker
U second(std::pair< T, U > const &p)
edm::EDGetTokenT< reco::VertexCollection > token_vertex
static UseMeasurementTracker doubleToUseMeasurementTracker(double value)
T const * product() const
virtual ~PointSeededTrackingRegionsProducer()
virtual std::vector< TrackingRegion * > regions(const edm::Event &e, const edm::EventSetup &es) const
bool isUninitialized() const