97 bool p2vassmap =
false;
98 bool v2passmap =
false;
106 if ( ( asstype ==
"PFCandsToVertex" ) || ( asstype ==
"Both" ) ) {
112 if ( ( asstype ==
"VertexToPFCands" ) || ( asstype ==
"Both" ) ) {
118 if ( !p2vassmap && !v2passmap ) {
119 cout <<
"No input collection could be found" << endl;
123 int negativeQuality = 0;
125 negativeQuality = -1;
128 negativeQuality = -2;
130 negativeQuality = -3;
139 for (
unsigned int pfccoll_ite = 0; pfccoll_ite < pfccoll.size(); pfccoll_ite++){
142 int quality = pfccoll[pfccoll_ite].second;
144 if ( (quality>=
input_MinQuality_) || ( (quality<0) && (quality>=negativeQuality) ) ) {
145 p2v_firstvertex->push_back(*pfcand);
151 iEvent.
put( p2v_firstvertex,
"P2V" );
161 VertexRef firstVertexRef(input_vtxcollH,0);
165 for(v2p_ite=v2pAM->begin(); v2p_ite!=v2pAM->end(); v2p_ite++){
169 for(
unsigned v_ite = 0; v_ite<(v2p_ite->
val).
size(); v_ite++){
172 int quality = (v2p_ite->
val)[v_ite].
second;
174 if ( (vtxref==firstVertexRef) && ( (quality>=
input_MinQuality_) || ( (quality<0) && (quality>=negativeQuality) ) ) ) {
175 v2p_firstvertex->push_back(*pfcand);
182 iEvent.
put( v2p_firstvertex,
"V2P" );
U second(std::pair< T, U > const &p)
OrphanHandle< PROD > put(std::auto_ptr< PROD > product)
Put a new product.
std::vector< PFCandQualityPair > PFCandQualityPairVector
bool getByLabel(InputTag const &tag, Handle< PROD > &result) const
std::vector< reco::PFCandidate > PFCandidateCollection
collection of PFCandidates
edm::InputTag input_VertexPFCandAssociationMap_
edm::InputTag input_VertexCollection_
edm::InputTag input_AssociationType_
tuple size
Write out results.