CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
GSFAndBREMLinker.cc
Go to the documentation of this file.
6 
8 public:
11  _useKDTree(conf.getParameter<bool>("useKDTree")),
12  _debug(conf.getUntrackedParameter<bool>("debug",false)) {}
13 
14  double testLink
15  ( const reco::PFBlockElement*,
16  const reco::PFBlockElement* ) const override;
17 
18 private:
20 };
21 
24  "GSFAndBREMLinker");
25 
27  ( const reco::PFBlockElement* elem1,
28  const reco::PFBlockElement* elem2) const {
29  double dist = -1.0;
30  const reco::PFBlockElementGsfTrack * gsfelem(NULL);
31  const reco::PFBlockElementBrem * bremelem(NULL);
32  if( elem1->type() < elem2->type() ) {
33  gsfelem = static_cast<const reco::PFBlockElementGsfTrack *>(elem1);
34  bremelem = static_cast<const reco::PFBlockElementBrem *>(elem2);
35  } else {
36  gsfelem = static_cast<const reco::PFBlockElementGsfTrack *>(elem2);
37  bremelem = static_cast<const reco::PFBlockElementBrem *>(elem1);
38  }
39  const reco::GsfPFRecTrackRef& gsfref = gsfelem->GsftrackRefPF();
40  const reco::GsfPFRecTrackRef& bremref = bremelem->GsftrackRefPF();
41  if( gsfref.isNonnull() && bremref.isNonnull() && gsfref == bremref ) {
42  dist = 0.001;
43  }
44  return dist;
45 }
Abstract base class for a PFBlock element (track, cluster...)
bool isNonnull() const
Checks for non-null.
Definition: Ref.h:252
Type type() const
#define NULL
Definition: scimark2.h:8
const GsfPFRecTrackRef & GsftrackRefPF() const
tuple conf
Definition: dbtoconf.py:185
const GsfPFRecTrackRef & GsftrackRefPF() const
GSFAndBREMLinker(const edm::ParameterSet &conf)
#define DEFINE_EDM_PLUGIN(factory, type, name)
volatile std::atomic< bool > shutdown_flag false
double testLink(const reco::PFBlockElement *, const reco::PFBlockElement *) const override