6 if (operationModeString ==
"BeamSpotFixed")
8 else if (operationModeString ==
"BeamSpotSigma")
10 else if (operationModeString ==
"VerticesFixed")
12 else if (operationModeString ==
"VerticesSigma")
15 throw cms::Exception(
"Configuration") <<
"Unknown operation mode string: " << operationModeString;
32 m_nSigmaZBeamSpot = regPSet.
getParameter<
double>(
"nSigmaZBeamSpot");
33 if (m_nSigmaZBeamSpot < 0.)
34 throw cms::Exception(
"Configuration") <<
"nSigmaZBeamSpot must be positive for BeamSpotSigma mode!";
41 int defaultMaxVertices) {
45 desc.
add<
int>(
"maxNVertices", defaultMaxVertices);
47 desc.
add<
double>(
"nSigmaZBeamSpot", 4.);
48 desc.
add<
double>(
"zErrorBeamSpot", 24.2);
49 desc.
add<
double>(
"nSigmaZVertex", 3.);
50 desc.
add<
double>(
"zErrorVertex", 0.2);
63 GlobalPoint default_origin(bs->x0(), bs->y0(), bs->z0());
74 for (
const auto&
v : *vertices) {
75 if (
v.isFake() || !
v.isValid())
Origins origins(const edm::Event &iEvent) const
EDGetTokenT< ProductType > consumes(edm::InputTag const &tag)
tuple ret
prodAgent to be discontinued
VertexBeamspotOrigins(const edm::ParameterSet ®PSet, edm::ConsumesCollector &&iC)
bool getByToken(EDGetToken token, Handle< PROD > &result) const
edm::EDGetTokenT< reco::BeamSpot > token_beamSpot
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
std::vector< std::pair< GlobalPoint, float > > Origins
ParameterDescriptionBase * add(U const &iLabel, T const &value)
edm::EDGetTokenT< reco::VertexCollection > token_vertex
OperationMode m_operationMode
T getParameter(std::string const &) const