test
CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
GSFAndGSFLinker.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  "GSFAndGSFLinker");
25 
27  ( const reco::PFBlockElement* elem1,
28  const reco::PFBlockElement* elem2) const {
31  double dist = -1.0;
32  const reco::PFBlockElementGsfTrack * gsfelem1 =
33  static_cast<const reco::PFBlockElementGsfTrack *>(elem1);
34  const reco::PFBlockElementGsfTrack * gsfelem2 =
35  static_cast<const reco::PFBlockElementGsfTrack *>(elem2);
36  const reco::GsfPFRecTrackRef& gsfref1 = gsfelem1->GsftrackRefPF();
37  const reco::GsfPFRecTrackRef& gsfref2 = gsfelem2->GsftrackRefPF();
38  if( gsfref1.isNonnull() && gsfref2.isNonnull() ) {
39  if( gsfelem1->trackType(T_FROM_GAMMACONV) != // we want **one** primary GSF
40  gsfelem2->trackType(T_FROM_GAMMACONV) &&
41  gsfref1->trackId() == gsfref2->trackId() ) {
42  dist = 0.001;
43  }
44  }
45  return dist;
46 }
Abstract base class for a PFBlock element (track, cluster...)
bool isNonnull() const
Checks for non-null.
Definition: Ref.h:252
const GsfPFRecTrackRef & GsftrackRefPF() const
double testLink(const reco::PFBlockElement *, const reco::PFBlockElement *) const override
#define constexpr
virtual bool trackType(TrackType trType) const
#define DEFINE_EDM_PLUGIN(factory, type, name)
volatile std::atomic< bool > shutdown_flag false
GSFAndGSFLinker(const edm::ParameterSet &conf)