17 if ( pfCandidate->charge() != 0 ) {
20 pfCandToVertexAssociation != pfCandToVertexAssociations.
end(); ++pfCandToVertexAssociation ) {
25 for ( noPuUtils::CandQualityPairVector::const_iterator pfCandidate_vertex = pfCandidates_vertex.begin();
26 pfCandidate_vertex != pfCandidates_vertex.end(); ++pfCandidate_vertex ) {
31 if(pfCandidate != pfcVtx )
continue;
34 double z = pfCandToVertexAssociation->key->position().z();
35 int quality = pfCandidate_vertex->second;
41 return vtxAssociationType;
50 pfCandToVertexAssociation != pfCandToVertexAssociations.
end(); ++pfCandToVertexAssociation ) {
54 for ( noPuUtils::CandQualityPairVector::const_iterator pfCandidate_vertex = pfCandidates_vertex.begin();
55 pfCandidate_vertex != pfCandidates_vertex.end(); ++pfCandidate_vertex ) {
56 revPfCandToVtxAssoc.
insert(pfCandidate_vertex->first, std::make_pair(vertex, pfCandidate_vertex->second));
60 return revPfCandToVtxAssoc;
67 int& numWarnings,
int maxWarnings) {
70 if ( pfCandidate->charge() != 0 ) {
75 if ( itPfcToVtxAss != pfCandToVertexAssociations.
end() ) {
76 pfCandAssocVtxs = &itPfcToVtxAss->
val;
79 pfcToVtxAssoc != pfCandToVertexAssociations.
end(); ++pfcToVtxAssoc ) {
81 pfCandAssocVtxs = &pfcToVtxAssoc->val;
86 if ( pfCandAssocVtxs!=
nullptr ) {
87 for ( noPuUtils::VertexQualityPairVector::const_iterator pfcAssVtx = pfCandAssocVtxs->begin();
88 pfcAssVtx != pfCandAssocVtxs->end(); ++pfcAssVtx ) {
89 double z = pfcAssVtx->first->position().z();
90 int quality = pfcAssVtx->second;
96 return vtxAssociationType;
100 double dZ,
int& vtxAssociationType,
bool checkdR2) {
103 for ( reco::VertexCollection::const_iterator vertex = vertices.begin();
104 vertex != vertices.end(); ++vertex ) {
106 if (
std::abs( z - vertex->position().z()) < dZ ) {
Ptr< typename C::value_type > refToPtr(Ref< C, typename C::value_type, refhelper::FindUsingAdvance< C, typename C::value_type > > const &ref)
const_iterator end() const
last iterator over the map (read only)
const_iterator find(const key_type &k) const
find element with specified reference key
std::vector< Vertex > VertexCollection
collection of Vertex objects
noPuUtils::reversedPFCandToVertexAssMap reversePFCandToVertexAssociation(const PFCandToVertexAssMap &)
key_type key() const
Accessor for product key.
Abs< T >::type abs(const T &t)
double deltaR2(const T1 &t1, const T2 &t2)
std::vector< std::pair< reco::PFCandidateRef, int > > CandQualityPairVector
int isVertexAssociated(const reco::PFCandidatePtr &, const PFCandToVertexAssMap &, const reco::VertexCollection &, double)
void promoteAssocToHSAssoc(int quality, double z, const reco::VertexCollection &vertices, double dZ, int &vtxAssociationType, bool checkdR2)
void insert(const key_type &k, const data_type &v)
insert an association
std::vector< std::pair< reco::VertexRef, int > > VertexQualityPairVector
int isVertexAssociated_fast(const reco::PFCandidateRef &, const noPuUtils::reversedPFCandToVertexAssMap &, const reco::VertexCollection &, double, int &, int)
const_iterator begin() const
first iterator over the map (read only)