98 bool p2vassmap =
false;
99 bool v2passmap =
false;
107 if ( ( asstype ==
"PFCandsToVertex" ) || ( asstype ==
"Both" ) ) {
113 if ( ( asstype ==
"VertexToPFCands" ) || ( asstype ==
"Both" ) ) {
119 if ( !p2vassmap && !v2passmap ) {
120 cout <<
"No input collection could be found" << endl;
124 int negativeQuality = 0;
126 negativeQuality = -1;
129 negativeQuality = -2;
131 negativeQuality = -3;
140 for (
unsigned int pfccoll_ite = 0; pfccoll_ite < pfccoll.size(); pfccoll_ite++){
143 int quality = pfccoll[pfccoll_ite].second;
145 if ( (quality>=
input_MinQuality_) || ( (quality<0) && (quality>=negativeQuality) ) ) {
146 p2v_firstvertex->push_back(*pfcand);
152 iEvent.
put( p2v_firstvertex,
"P2V" );
162 VertexRef firstVertexRef(input_vtxcollH,0);
166 for(v2p_ite=v2pAM->begin(); v2p_ite!=v2pAM->end(); v2p_ite++){
170 for(
unsigned v_ite = 0; v_ite<(v2p_ite->
val).
size(); v_ite++){
173 int quality = (v2p_ite->
val)[v_ite].
second;
175 if ( (vtxref==firstVertexRef) && ( (quality>=
input_MinQuality_) || ( (quality<0) && (quality>=negativeQuality) ) ) ) {
176 v2p_firstvertex->push_back(*pfcand);
183 iEvent.
put( v2p_firstvertex,
"V2P" );
edm::EDGetTokenT< reco::VertexCollection > token_VertexCollection_
bool getByToken(EDGetToken token, Handle< PROD > &result) const
edm::EDGetTokenT< VertexToPFCandAssMap > token_VertexToPFCandAssMap_
edm::EDGetTokenT< PFCandToVertexAssMap > token_PFCandToVertexAssMap_
U second(std::pair< T, U > const &p)
OrphanHandle< PROD > put(std::auto_ptr< PROD > product)
Put a new product.
std::vector< PFCandQualityPair > PFCandQualityPairVector
std::vector< reco::PFCandidate > PFCandidateCollection
collection of PFCandidates
edm::InputTag input_AssociationType_
tuple size
Write out results.