15 produces<reco::PFV0Collection>();
16 produces<reco::PFRecTrackCollection>();
18 std::vector<edm::InputTag>
tags = iConfig.
getParameter<vector<InputTag> >(
"V0List");
20 for (
unsigned int i = 0;
i <
tags.size(); ++
i)
21 V0list_.push_back(consumes<reco::VertexCompositeCandidateCollection>(
tags[
i]));
27 LogDebug(
"PFV0Producer") <<
"START event: " <<
iEvent.id().event() <<
" in run " <<
iEvent.id().run();
29 auto pfV0Coll = std::make_unique<PFV0Collection>();
31 auto pfV0RecTrackColl = std::make_unique<reco::PFRecTrackCollection>();
36 for (
unsigned int il = 0; il <
V0list_.size(); il++) {
39 LogDebug(
"PFV0Producer") <<
"V0list_[" << il <<
"] contains " << V0coll->size() <<
" V0 candidates ";
40 for (
unsigned int iv = 0;
iv < V0coll->size();
iv++) {
43 vector<PFRecTrackRef> PFTracks;
44 for (
unsigned int ndx = 0; ndx < V0->numberOfDaughters(); ndx++) {
45 Tracks.push_back((dynamic_cast<const RecoChargedCandidate*>(V0->daughter(ndx)))->track());
46 TrackRef trackRef = (dynamic_cast<const RecoChargedCandidate*>(V0->daughter(ndx)))->track();
54 pfV0RecTrackColl->push_back(pfRecTrack);
57 if ((PFTracks.size() == 2) && (
Tracks.size() == 2)) {
58 pfV0Coll->push_back(
PFV0(V0, PFTracks,
Tracks));