|
|
Go to the documentation of this file.
12 if (!iConfig.
empty()) {
15 throw cms::Exception(
"Configuration") <<
"VertexingHelper: you must configure either 'vertices' (to produce "
16 "associations) or 'vertexAssociations' (to read them from disk), "
17 <<
"you can't specify both, nor you can specify none!\n";
32 assoSelector_ = reco::modules::make<pat::VertexAssociationSelector>(iConfig);
40 iEvent.getByToken(vertexAssociationsToken_, vertexAssoMap_);
42 iEvent.getByToken(verticesToken_, vertexHandle_);
55 <<
"VertexingHelper: if this module was configured to read associations from the event,"
56 <<
" you must use 'operator()' passing a candidate ref, and not 'associate()' directly!\n";
58 reco::VertexCollection::const_iterator
vtx,
end;
63 if (!ttBuilder_.isValid())
65 <<
"VertexingHelper: If you use 'useTracks', you must call newEvent(iEvent,iSetup)!\n";
69 tt = ttBuilder_->build(*tk);
71 for (
vtx = vertexHandle_->begin(),
end = vertexHandle_->end(), ivtx = 0;
vtx !=
end; ++
vtx, ++ivtx) {
73 if (useTracks_ ==
false) {
reco::TrackRef trackRef() const
bool isNull() const
Checks for null.
ROOT::Math::SMatrix< double, 3, 3, ROOT::Math::MatRepSym< double, 3 > > AlgebraicSymMatrix33
edm::EDGetTokenT< edm::ValueMap< pat::VertexAssociation > > vertexAssociationsToken_
std::vector< Vertex > VertexCollection
collection of Vertex objects
edm::EDGetTokenT< reco::VertexCollection > verticesToken_
edm::RefToBase< reco::Track > TrackBaseRef
persistent reference to a Track, using views
bool existsAs(std::string const ¶meterName, bool trackiness=true) const
checks if a parameter exists as a given type
bool useTracks_
use tracks inside candidates
reco::TrackBaseRef getTrack_(const reco::Candidate &c) const
Get out the track from the Candidate / RecoCandidate / PFCandidate.
bool playback_
true if it's just reading the associations from the event
pat::VertexAssociationSelector assoSelector_
selector of associations
void newEvent(const edm::Event &event)
To be called for each new event, reads in the vertex collection.
Analysis-level structure for vertex-related information.
T getParameter(std::string const &) const
pat::VertexAssociation associate(const reco::Candidate &) const
bool enabled_
true if it has non null configuration
Particle reconstructed by the particle flow algorithm.
virtual TrackBaseRef bestTrackRef() const
best track RefToBase