16 produces<reco::PFV0Collection>();
17 produces<reco::PFRecTrackCollection>();
19 std::vector<edm::InputTag>
tags = iConfig.
getParameter<vector<InputTag> >(
"V0List");
21 for (
unsigned int i = 0;
i <
tags.size(); ++
i)
22 V0list_.push_back(consumes<reco::VertexCompositeCandidateCollection>(
tags[
i]));
28 LogDebug(
"PFV0Producer") <<
"START event: " <<
iEvent.id().event() <<
" in run " <<
iEvent.id().run();
30 auto pfV0Coll = std::make_unique<PFV0Collection>();
32 auto pfV0RecTrackColl = std::make_unique<reco::PFRecTrackCollection>();
37 for (
unsigned int il = 0; il <
V0list_.size(); il++) {
40 LogDebug(
"PFV0Producer") <<
"V0list_[" << il <<
"] contains " << V0coll->size() <<
" V0 candidates ";
41 for (
unsigned int iv = 0; iv < V0coll->size(); iv++) {
44 vector<PFRecTrackRef> PFTracks;
45 for (
unsigned int ndx = 0; ndx < V0->numberOfDaughters(); ndx++) {
46 Tracks.push_back((dynamic_cast<const RecoChargedCandidate*>(V0->daughter(ndx)))->track());
47 TrackRef trackRef = (dynamic_cast<const RecoChargedCandidate*>(V0->daughter(ndx)))->track();
55 pfV0RecTrackColl->push_back(pfRecTrack);
58 if ((PFTracks.size() == 2) && (
Tracks.size() == 2)) {
59 pfV0Coll->push_back(
PFV0(V0, PFTracks,
Tracks));