1 #ifndef CandidateSeededTrackingRegionsProducer_h
2 #define CandidateSeededTrackingRegionsProducer_h
61 else edm::LogError (
"CandidateSeededTrackingRegionsProducer")<<
"Unknown mode string: "<<modeString;
82 if (regPSet.
exists(
"measurementTrackerName"))
89 if (regPSet.
exists(
"whereToUseMeasurementTracker"))
103 m_nSigmaZBeamSpot = regPSet.
getParameter<
double>(
"nSigmaZBeamSpot");
104 if (m_nSigmaZBeamSpot < 0.)
105 edm::LogError (
"CandidateSeededTrackingRegionsProducer")<<
"nSigmaZBeamSpot must be positive for BeamSpotSigma mode!";
114 std::vector<TrackingRegion* >
result;
119 size_t n_objects = objects->size();
120 if (n_objects == 0)
return result;
125 if( !bs.
isValid() )
return result;
128 GlobalPoint default_origin( bs->x0(), bs->y0(), bs->z0() );
131 std::vector< std::pair< GlobalPoint, float > > origins;
136 origins.push_back( std::make_pair(
146 for (reco::VertexCollection::const_iterator
v = vertices->begin();
v != vertices->end() && n_vert <
m_maxNVertices; ++
v)
148 if (
v->isFake() || !
v->isValid() )
continue;
150 origins.push_back( std::make_pair(
159 origins.push_back( std::make_pair(
170 measurementTracker = hmte.
product();
179 GlobalVector direction(
object.momentum().
x(),
object.momentum().
y(),
object.momentum().
z() );
200 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
edm::EDGetTokenT< reco::VertexCollection > token_vertex
std::vector< Vertex > VertexCollection
collection of Vertex objects
edm::EDGetTokenT< reco::BeamSpot > token_beamSpot
virtual std::vector< TrackingRegion * > regions(const edm::Event &e, const edm::EventSetup &es) const
U second(std::pair< T, U > const &p)
edm::EDGetTokenT< MeasurementTrackerEvent > token_measurementTracker
static UseMeasurementTracker doubleToUseMeasurementTracker(double value)
T const * product() const
bool isUninitialized() const
virtual ~CandidateSeededTrackingRegionsProducer()