1 #ifndef CandidateSeededTrackingRegionsProducer_h
2 #define CandidateSeededTrackingRegionsProducer_h
55 std::string modeString = regPSet.
getParameter<std::string>(
"mode");
60 else edm::LogError (
"CandidateSeededTrackingRegionsProducer")<<
"Unknown mode string: "<<modeString;
83 if (regPSet.
exists(
"measurementTrackerName"))
85 m_measurementTrackerName = regPSet.
getParameter<std::string>(
"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";
CandidateSeededTrackingRegionsProducer(const edm::ParameterSet &conf)
T getParameter(std::string const &) const
edm::InputTag m_vertexCollection
float m_whereToUseMeasurementTracker
std::string m_measurementTrackerName
Global3DPoint GlobalPoint
bool exists(std::string const ¶meterName) const
checks if a parameter exists
virtual std::vector< TrackingRegion * > regions(const edm::Event &e, const edm::EventSetup &es) const
U second(std::pair< T, U > const &p)
bool getByLabel(InputTag const &tag, Handle< PROD > &result) const
virtual ~CandidateSeededTrackingRegionsProducer()