CMS 3D CMS Logo

HCALAndBREMLinker.cc
Go to the documentation of this file.
6 
8 public:
10  : BlockElementLinkerBase(conf),
11  useKDTree_(conf.getParameter<bool>("useKDTree")),
12  debug_(conf.getUntrackedParameter<bool>("debug", false)) {}
13 
14  double testLink(const reco::PFBlockElement*, const reco::PFBlockElement*) const override;
15 
16 private:
18 };
19 
21 
22 double HCALAndBREMLinker::testLink(const reco::PFBlockElement* elem1, const reco::PFBlockElement* elem2) const {
24  const reco::PFBlockElementCluster* hcalelem(nullptr);
25  const reco::PFBlockElementBrem* bremelem(nullptr);
26  double dist(-1.0);
27  if (elem1->type() < elem2->type()) {
28  hcalelem = static_cast<const reco::PFBlockElementCluster*>(elem1);
29  bremelem = static_cast<const reco::PFBlockElementBrem*>(elem2);
30  } else {
31  hcalelem = static_cast<const reco::PFBlockElementCluster*>(elem2);
32  bremelem = static_cast<const reco::PFBlockElementBrem*>(elem1);
33  }
34  const reco::PFClusterRef& clusterref = hcalelem->clusterRef();
35  const reco::PFRecTrack& track = bremelem->trackPF();
36  const reco::PFTrajectoryPoint& tkAtHCAL = track.extrapolatedPoint(HCALEnt);
37  if (tkAtHCAL.isValid()) {
38  dist = LinkByRecHit::testTrackAndClusterByRecHit(track, *clusterref, true, debug_);
39  }
40  return dist;
41 }
electrons_cff.bool
bool
Definition: electrons_cff.py:366
HLT_FULL_cff.track
track
Definition: HLT_FULL_cff.py:11713
funct::false
false
Definition: Factorize.h:29
PFBlockElementCluster.h
LinkByRecHit::testTrackAndClusterByRecHit
static double testTrackAndClusterByRecHit(const reco::PFRecTrack &track, const reco::PFCluster &cluster, bool isBrem=false, bool debug=false)
Definition: LinkByRecHit.cc:18
HCALAndBREMLinker::debug_
bool debug_
Definition: HCALAndBREMLinker.cc:17
PFBlockElementBrem.h
BlockElementLinkerBase
Definition: BlockElementLinkerBase.h:10
edm::Ref< PFClusterCollection >
HCALAndBREMLinker::HCALAndBREMLinker
HCALAndBREMLinker(const edm::ParameterSet &conf)
Definition: HCALAndBREMLinker.cc:9
PFCluster.h
reco::PFBlockElementBrem
Track Element.
Definition: PFBlockElementBrem.h:17
reco::PFBlockElementBrem::trackPF
const PFRecTrack & trackPF() const
Definition: PFBlockElementBrem.h:34
DEFINE_EDM_PLUGIN
#define DEFINE_EDM_PLUGIN(factory, type, name)
Definition: PluginFactory.h:124
edm::ParameterSet
Definition: ParameterSet.h:47
edmplugin::PluginFactory
Definition: PluginFactory.h:34
HCALAndBREMLinker
Definition: HCALAndBREMLinker.cc:7
LinkByRecHit.h
reco::PFTrajectoryPoint::HCALEntrance
HCAL front face.
Definition: PFTrajectoryPoint.h:48
reco::PFTrajectoryPoint::LayerType
LayerType
Define the different layers where the track can be propagated.
Definition: PFTrajectoryPoint.h:34
HCALAndBREMLinker::useKDTree_
bool useKDTree_
Definition: HCALAndBREMLinker.cc:17
reco::PFTrajectoryPoint::isValid
bool isValid() const
is this point valid ?
Definition: PFTrajectoryPoint.h:84
reco::PFBlockElement
Abstract base class for a PFBlock element (track, cluster...)
Definition: PFBlockElement.h:26
reco::PFRecTrack
reconstructed track used as an input to particle flow
Definition: PFRecTrack.h:20
reco::PFTrajectoryPoint
A PFTrack holds several trajectory points, which basically contain the position and momentum of a tra...
Definition: PFTrajectoryPoint.h:26
reco::PFBlockElementCluster
Cluster Element.
Definition: PFBlockElementCluster.h:16
BlockElementLinkerBase.h
reco::PFBlockElementCluster::clusterRef
const PFClusterRef & clusterRef() const override
Definition: PFBlockElementCluster.h:29
reco::PFBlockElement::type
Type type() const
Definition: PFBlockElement.h:69
HCALAndBREMLinker::testLink
double testLink(const reco::PFBlockElement *, const reco::PFBlockElement *) const override
Definition: HCALAndBREMLinker.cc:22