13 if (prov == 0)
throw cms::Exception(
"CorruptData") <<
"Vertex handle doesn't have provenance.";
21 if (
edm::moduleName(*prov) !=
"RecoChargedRefCandidatePrimaryVertexSorter" )
23 throw cms::Exception(
"Configuration") <<
"Vertices to re-produce don't come from a PrimaryVertexProducer, but from a "
30 bool foundTracks =
false;
31 bool foundBeamSpot =
false;
32 for (std::vector<edm::BranchID>::const_iterator it = parents.begin(), ed = parents.end(); it != ed; ++it) {
42 if (!foundTracks || !foundBeamSpot) {
44 "Can't find parentage info for vertex collection inputs: " <<
45 (foundTracks ?
"" :
"tracks ") << (foundBeamSpot ?
"" :
"beamSpot") <<
"\n";
58 std::vector<TransientVertex>
66 std::vector<reco::TransientTrack> t_tks; t_tks.reserve(tracks.size());
67 for (reco::TrackCollection::const_iterator it = tracks.begin(), ed = tracks.end(); it != ed; ++it) {
68 t_tks.push_back((*theB).build(*it));
69 t_tks.back().setBeamSpot(bs);
72 return algo_->vertices(t_tks, bs,
"KalmanVertexFitter");
T getParameter(std::string const &) const
std::auto_ptr< PrimaryVertexProducerAlgorithm > algo_
std::vector< Track > TrackCollection
collection of Tracks
std::string const & processName() const
OniaVtxReProducer(const edm::Handle< reco::VertexCollection > &configFromOriginalVertexCollection, const edm::Event &iEvent)
This is the real constructor to be used.
std::string moduleName(Provenance const &provenance)
std::vector< TransientVertex > makeVertices(const reco::TrackCollection &tracks, const reco::BeamSpot &bs, const edm::EventSetup &iSetup) const
Make the vertices.
void configure(const edm::ParameterSet &iConfig)
std::string const & friendlyClassName() const
std::vector< BranchID > const & parents() const
std::string const & moduleLabel() const
edm::ParameterSet config_
edm::InputTag beamSpotTag_
std::string const & productInstanceName() const
Provenance getProvenance(BranchID const &theID) const
ParameterSet const & parameterSet(Provenance const &provenance)
Provenance const * provenance() const