1 #ifndef CandidateSeededTrackingRegionsProducer_h
2 #define CandidateSeededTrackingRegionsProducer_h
61 else edm::LogError (
"CandidateSeededTrackingRegionsProducer")<<
"Unknown mode string: "<<modeString;
83 if (regPSet.
exists(
"measurementTrackerName"))
86 if (regPSet.
exists(
"whereToUseMeasurementTracker"))
98 m_nSigmaZBeamSpot = regPSet.
getParameter<
double>(
"nSigmaZBeamSpot");
99 if (m_nSigmaZBeamSpot < 0.)
100 edm::LogError (
"CandidateSeededTrackingRegionsProducer")<<
"nSigmaZBeamSpot must be positive for BeamSpotSigma mode!";
109 std::vector<TrackingRegion* >
result;
114 size_t n_objects = objects->size();
115 if (n_objects == 0)
return result;
120 if( !bs.
isValid() )
return result;
123 GlobalPoint default_origin( bs->x0(), bs->y0(), bs->z0() );
126 std::vector< std::pair< GlobalPoint, float > > origins;
131 origins.push_back( std::make_pair(
141 for (reco::VertexCollection::const_iterator
v = vertices->begin();
v != vertices->end() && n_vert <
m_maxNVertices; ++
v)
143 if (
v->isFake() || !
v->isValid() )
continue;
145 origins.push_back( std::make_pair(
154 origins.push_back( std::make_pair(
167 GlobalVector direction(
object.momentum().
x(),
object.momentum().
y(),
object.momentum().
z() );
188 edm::LogInfo (
"CandidateSeededTrackingRegionsProducer") <<
"produced "<<n_regions<<
" regions";
edm::EDGetTokenT< reco::CandidateView > token_input
T getParameter(std::string const &) const
float m_whereToUseMeasurementTracker
bool getByToken(EDGetToken token, Handle< PROD > &result) const
CandidateSeededTrackingRegionsProducer(const edm::ParameterSet &conf, edm::ConsumesCollector &&iC)
std::string m_measurementTrackerName
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)
virtual ~CandidateSeededTrackingRegionsProducer()