13 if (!iConfig.
empty()) {
17 "VertexingHelper: you must configure either 'vertices' (to produce associations) or 'vertexAssociations' (to read them from disk), " <<
18 "you can't specify both, nor you can specify none!\n";
32 assoSelector_ = reco::modules::make<pat::VertexAssociationSelector>(iConfig);
56 if (
playback_)
throw cms::Exception(
"Configuration") <<
"VertexingHelper: if this module was configured to read associations from the event," <<
57 " you must use 'operator()' passing a candidate ref, and not 'associate()' directly!\n";
59 reco::VertexCollection::const_iterator
vtx,
end;
64 if (!
ttBuilder_.
isValid())
throw cms::Exception(
"Configuration") <<
"VertexingHelper: If you use 'useTracks', you must call newEvent(iEvent,iSetup)!\n";
78 association.
setDistances(trackPos, vtx->position(), trackErr + vtx->error());
void setDistances(const AlgebraicVector3 &dist, const AlgebraicSymMatrix33 &err)
Set dz and dr given the distance and the 3x3 total covariance matrix of the distance.
T getParameter(std::string const &) const
bool existsAs(std::string const ¶meterName, bool trackiness=true) const
checks if a parameter exists as a given type
edm::Handle< edm::ValueMap< pat::VertexAssociation > > vertexAssoMap_
reco::TrackBaseRef getTrack_(const reco::Candidate &c) const
Get out the track from the Candidate / RecoCandidate / PFCandidate.
bool getByToken(EDGetToken token, Handle< PROD > &result) const
reco::TransientTrack build(const reco::Track *p) const
std::vector< Vertex > VertexCollection
collection of Vertex objects
edm::ESHandle< TransientTrackBuilder > ttBuilder_
reco::TrackRef trackRef() const
bool useTracks_
use tracks inside candidates
ROOT::Math::SMatrix< double, 3, 3, ROOT::Math::MatRepSym< double, 3 > > AlgebraicSymMatrix33
edm::RefToBase< reco::Track > TrackBaseRef
persistent reference to a Track, using views
virtual TrackBaseRef bestTrackRef() const
best track RefToBase
pat::VertexAssociation associate(const reco::Candidate &) const
edm::EDGetTokenT< reco::VertexCollection > verticesToken_
edm::EDGetTokenT< edm::ValueMap< pat::VertexAssociation > > vertexAssociationsToken_
bool playback_
true if it's just reading the associations from the event
edm::Handle< reco::VertexCollection > vertexHandle_
void newEvent(const edm::Event &event)
To be called for each new event, reads in the vertex collection.
TrajectoryStateClosestToPoint trajectoryStateClosestToPoint(const GlobalPoint &point) const
bool isNull() const
Checks for null.
bool enabled_
true if it has non null configuration
Particle reconstructed by the particle flow algorithm.
Analysis-level structure for vertex-related information.
virtual const Point & vertex() const =0
vertex position
pat::VertexAssociationSelector assoSelector_
selector of associations