CMS 3D CMS Logo

NuclearInteractionTrackImporter.cc
Go to the documentation of this file.
3 
4 namespace {
5  class NuclAdaptor {
6  public:
7  static bool check_importable(const reco::PFDisplacedTrackerVertexCollection::value_type& t) {
8  const auto& vtx = t.displacedVertexRef();
9  return (vtx->isNucl() && vtx->position().rho() > 2.7);
10  }
11  static const reco::PFRecTrackRefVector& get_track_refs(
13  return t.pfRecTracks();
14  }
15  static void set_element_info(reco::PFBlockElement* elem,
17  const reco::PFBlockElementTrack* tkelem = static_cast<const reco::PFBlockElementTrack*>(elem);
18  const reco::PFRecTrackRef& reftrack = tkelem->trackRefPF();
20  if (parref->isIncomingTrack(reftrack))
22  else if (parref->isOutgoingTrack(reftrack))
24  elem->setDisplacedVertexRef(parref, tkType);
25  }
26  };
27 } // namespace
28 
31 
Abstract base class for a PFBlock element (track, cluster...)
virtual void setDisplacedVertexRef(const PFDisplacedTrackerVertexRef &niref, TrackType trType)
pflow::importers::TrackFromParentImporter< reco::PFDisplacedTrackerVertexCollection, NuclAdaptor > NuclearInteractionTrackImporter
#define DEFINE_EDM_PLUGIN(factory, type, name)
const PFRecTrackRef & trackRefPF() const override