1 #ifndef CandidateSeededTrackingRegionsProducer_h
2 #define CandidateSeededTrackingRegionsProducer_h
61 else edm::LogError (
"CandidateSeededTrackingRegionsProducer")<<
"Unknown mode string: "<<modeString;
94 m_nSigmaZBeamSpot = regPSet.
getParameter<
double>(
"nSigmaZBeamSpot");
95 if (m_nSigmaZBeamSpot < 0.)
96 edm::LogError (
"CandidateSeededTrackingRegionsProducer")<<
"nSigmaZBeamSpot must be positive for BeamSpotSigma mode!";
105 std::vector<std::unique_ptr<TrackingRegion> >
result;
110 size_t n_objects = objects->size();
111 if (n_objects == 0)
return result;
116 if( !bs.
isValid() )
return result;
119 GlobalPoint default_origin( bs->x0(), bs->y0(), bs->z0() );
122 std::vector< std::pair< GlobalPoint, float > > origins;
127 origins.push_back( std::make_pair(
137 for (reco::VertexCollection::const_iterator
v = vertices->begin();
v != vertices->end() && n_vert <
m_maxNVertices; ++
v)
139 if (
v->isFake() || !
v->isValid() )
continue;
141 origins.push_back( std::make_pair(
150 origins.push_back( std::make_pair(
161 measurementTracker = hmte.
product();
170 GlobalVector direction(
object.momentum().
x(),
object.momentum().
y(),
object.momentum().
z() );
174 result.push_back(std::make_unique<RectangularEtaPhiTrackingRegion>(
191 edm::LogInfo (
"CandidateSeededTrackingRegionsProducer") <<
"produced "<<n_regions<<
" regions";
edm::EDGetTokenT< reco::CandidateView > token_input
T getParameter(std::string const &) const
RectangularEtaPhiTrackingRegion::UseMeasurementTracker m_whereToUseMeasurementTracker
bool getByToken(EDGetToken token, Handle< PROD > &result) const
CandidateSeededTrackingRegionsProducer(const edm::ParameterSet &conf, edm::ConsumesCollector &&iC)
Global3DPoint GlobalPoint
bool exists(std::string const ¶meterName) const
checks if a parameter exists
virtual std::vector< std::unique_ptr< TrackingRegion > > regions(const edm::Event &e, const edm::EventSetup &es) const override
edm::EDGetTokenT< reco::VertexCollection > token_vertex
std::vector< Vertex > VertexCollection
collection of Vertex objects
edm::EDGetTokenT< reco::BeamSpot > token_beamSpot
static UseMeasurementTracker stringToUseMeasurementTracker(const std::string &name)
U second(std::pair< T, U > const &p)
edm::EDGetTokenT< MeasurementTrackerEvent > token_measurementTracker
T const * product() const
bool isUninitialized() const
virtual ~CandidateSeededTrackingRegionsProducer()