83 std::auto_ptr<VertexCollection> VertexCollection_out= std::auto_ptr<VertexCollection>(
new VertexCollection);
90 std::vector<reco::VertexRef> SV;
91 if(RefPFTau->decayMode()==10){
94 std::vector<reco::TransientTrack> transTrk;
96 const std::vector<edm::Ptr<reco::PFCandidate> > cands = RefPFTau->signalPFChargedHadrCands();
98 if(
iter->get()->trackRef().isNonnull())transTrk.push_back(transTrackBuilder->build(
iter->get()->trackRef()));
99 else if(
iter->get()->gsfTrackRef().isNonnull())transTrk.push_back(transTrackBuilder->build(
iter->get()->gsfTrackRef()));
106 transVtx = kvf.vertex(transTrk);
111 if(transVtx.
refittedTracks().size()!=transTrk.size()) FitOk=
false;
113 SV.push_back(
reco::VertexRef(VertexRefProd_out, VertexCollection_out->size()));
114 VertexCollection_out->push_back(transVtx);
117 AVPFTauSV->setValue(iPFTau, SV);
120 iEvent.
put(VertexCollection_out,
"PFTauSecondaryVertices");
121 iEvent.
put(AVPFTauSV);
bool getByToken(EDGetToken token, Handle< PROD > &result) const
std::vector< Vertex > VertexCollection
collection of Vertex objects
bool hasRefittedTracks() const
edm::RefProd< PFTauCollection > PFTauRefProd
references to PFTau collection
edm::EDGetTokenT< std::vector< reco::PFTau > > PFTauToken_
OrphanHandle< PROD > put(std::auto_ptr< PROD > product)
Put a new product.
RefProd< PROD > getRefBeforePut()
std::vector< reco::TransientTrack > const & refittedTracks() const