14 throw cms::Exception(
"CorruptData") <<
"Vertex handle doesn't have provenance.";
17 bool is_primary_available =
false;
21 for (std::vector<edm::BranchID>::const_iterator it = parents.begin(), ed = parents.end(); it != ed; ++it) {
24 parent_prov = &parprov;
26 is_primary_available =
true;
31 is_primary_available =
true;
32 if (is_primary_available)
35 throw cms::Exception(
"Configuration") <<
"Vertices to re-produce don't come from a PrimaryVertexProducer \n";
41 bool foundTracks =
false;
42 bool foundBeamSpot =
false;
43 for (std::vector<edm::BranchID>::const_iterator it = parents.begin(), ed = parents.end(); it != ed; ++it) {
54 foundBeamSpot =
false;
57 if (!foundTracks || !foundBeamSpot) {
60 <<
"Can't find correct parentage info for vertex collection inputs: " << (foundTracks ?
"" :
"generalTracks ")
61 << (foundBeamSpot ?
"" :
"offlineBeamSpot") <<
"\n";
78 std::vector<reco::TransientTrack> t_tks;
79 t_tks.reserve(tracks.size());
80 for (reco::TrackCollection::const_iterator it = tracks.begin(), ed = tracks.end(); it != ed; ++it) {
81 t_tks.push_back((*theB).build(*it));
82 t_tks.back().setBeamSpot(bs);
85 return algo_->vertices(t_tks, bs,
"AdaptiveVertexFitter");
T getParameter(std::string const &) const
std::vector< Track > TrackCollection
collection of Tracks
ProductProvenance const * productProvenance() const
std::unique_ptr< PrimaryVertexProducerAlgorithm > algo_
std::string const & processName() const
std::vector< BranchID > const & parents() 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::string const & moduleLabel() const
edm::ParameterSet config_
Parentage const & parentage() const
edm::InputTag beamSpotTag_
std::string const & productInstanceName() const
Provenance getProvenance(BranchID const &theID) const
ParameterSet const & parameterSet(Provenance const &provenance)
Provenance const * provenance() const