File indexing completed on 2024-04-06 12:27:28
0001 #include "TrackFromParentImporter.h"
0002 #include "DataFormats/ParticleFlowReco/interface/PFV0.h"
0003
0004 namespace {
0005 class V0Adaptor {
0006 public:
0007 static bool check_importable(const reco::PFV0Collection::value_type& t) { return true; }
0008 static const std::vector<reco::PFRecTrackRef>& get_track_refs(const reco::PFV0Collection::value_type& t) {
0009 return t.pfTracks();
0010 }
0011 static void set_element_info(reco::PFBlockElement* elem, const edm::Ref<reco::PFV0Collection>& parref) {
0012 elem->setV0Ref(parref->originalV0(), reco::PFBlockElement::T_FROM_V0);
0013 }
0014 };
0015 }
0016
0017 typedef pflow::importers::TrackFromParentImporter<reco::PFV0Collection, V0Adaptor> V0TrackImporter;
0018
0019 DEFINE_EDM_PLUGIN(BlockElementImporterFactory, V0TrackImporter, "V0TrackImporter");