10 else throw cms::Exception(
"Configuration") <<
"Unknown operation mode string: "<<operationModeString;
25 m_nSigmaZBeamSpot = regPSet.
getParameter<
double>(
"nSigmaZBeamSpot");
26 if (m_nSigmaZBeamSpot < 0.)
27 throw cms::Exception(
"Configuration") <<
"nSigmaZBeamSpot must be positive for BeamSpotSigma mode!";
32 const std::string& defaultVertex,
int defaultMaxVertices) {
36 desc.
add<
int>(
"maxNVertices", defaultMaxVertices);
38 desc.
add<
double>(
"nSigmaZBeamSpot", 4.);
39 desc.
add<
double>(
"zErrorBeamSpot", 24.2);
40 desc.
add<
double>(
"nSigmaZVertex", 3.);
41 desc.
add<
double>(
"zErrorVertex", 0.2);
57 ret.emplace_back(default_origin,
63 for(
const auto&
v: *vertices) {
64 if(
v.isFake() || !
v.isValid())
continue;
75 ret.emplace_back( default_origin,
Origins origins(const edm::Event &iEvent) const
EDGetTokenT< ProductType > consumes(edm::InputTag const &tag)
T getParameter(std::string const &) const
double z0() const
z coordinate
VertexBeamspotOrigins(const edm::ParameterSet ®PSet, edm::ConsumesCollector &&iC)
bool getByToken(EDGetToken token, Handle< PROD > &result) const
edm::EDGetTokenT< reco::BeamSpot > token_beamSpot
std::vector< std::pair< GlobalPoint, float > > Origins
Global3DPoint GlobalPoint
static void fillDescriptions(edm::ParameterSetDescription &desc, const std::string &defaultBeamSpot="offlineBeamSpot", const std::string &defaultVertex="firstStepPrimaryVertices", int defaultMaxVertices=-1)
std::vector< Vertex > VertexCollection
collection of Vertex objects
ParameterDescriptionBase * add(U const &iLabel, T const &value)
double z0Error() const
error on z
edm::EDGetTokenT< reco::VertexCollection > token_vertex
OperationMode m_operationMode
double sigmaZ() const
sigma z
double y0() const
y coordinate
double x0() const
x coordinate