CMS 3D CMS Logo

List of all members | Public Member Functions | Private Attributes
HGCalAndBREMLinker Class Reference
Inheritance diagram for HGCalAndBREMLinker:
BlockElementLinkerBase

Public Member Functions

 HGCalAndBREMLinker (const edm::ParameterSet &conf)
 
double testLink (const reco::PFBlockElement *, const reco::PFBlockElement *) const override
 
- Public Member Functions inherited from BlockElementLinkerBase
 BlockElementLinkerBase (const BlockElementLinkerBase &)=delete
 
 BlockElementLinkerBase (const edm::ParameterSet &conf)
 
virtual bool linkPrefilter (const reco::PFBlockElement *, const reco::PFBlockElement *) const
 
const std::string & name () const
 
BlockElementLinkerBaseoperator= (const BlockElementLinkerBase &)=delete
 
virtual ~BlockElementLinkerBase ()=default
 

Private Attributes

bool debug_
 
bool useKDTree_
 

Detailed Description

Definition at line 7 of file HGCalandBREMLinker.cc.

Constructor & Destructor Documentation

◆ HGCalAndBREMLinker()

HGCalAndBREMLinker::HGCalAndBREMLinker ( const edm::ParameterSet conf)
inline

Definition at line 9 of file HGCalandBREMLinker.cc.

10  : BlockElementLinkerBase(conf),
11  useKDTree_(conf.getParameter<bool>("useKDTree")),
12  debug_(conf.getUntrackedParameter<bool>("debug", false)) {}

Member Function Documentation

◆ testLink()

double HGCalAndBREMLinker::testLink ( const reco::PFBlockElement elem1,
const reco::PFBlockElement elem2 
) const
overridevirtual

Implements BlockElementLinkerBase.

Definition at line 22 of file HGCalandBREMLinker.cc.

22  {
24  const reco::PFBlockElementCluster* ecalelem(nullptr);
25  const reco::PFBlockElementBrem* bremelem(nullptr);
26  double dist(-1.0);
27  if (elem1->type() > elem2->type()) {
28  ecalelem = static_cast<const reco::PFBlockElementCluster*>(elem1);
29  bremelem = static_cast<const reco::PFBlockElementBrem*>(elem2);
30  } else {
31  ecalelem = static_cast<const reco::PFBlockElementCluster*>(elem2);
32  bremelem = static_cast<const reco::PFBlockElementBrem*>(elem1);
33  }
34  const reco::PFClusterRef& clusterref = ecalelem->clusterRef();
35  const reco::PFRecTrack& track = bremelem->trackPF();
36  const reco::PFTrajectoryPoint& tkAtECAL = track.extrapolatedPoint(ECALShowerMax);
37  if (tkAtECAL.isValid()) {
38  dist = LinkByRecHit::computeDist(tkAtECAL.positionREP().eta(),
39  tkAtECAL.positionREP().phi(),
40  clusterref->positionREP().Eta(),
41  clusterref->positionREP().Phi());
42  if (dist > 0.3)
43  dist = -1.0;
44  }
45  return dist;
46 }

References reco::PFBlockElementCluster::clusterRef(), LinkByRecHit::computeDist(), reco::PFTrajectoryPoint::ECALShowerMax, reco::PFTrajectoryPoint::isValid(), reco::PFTrajectoryPoint::positionREP(), HLT_FULL_cff::track, reco::PFBlockElementBrem::trackPF(), and reco::PFBlockElement::type().

Member Data Documentation

◆ debug_

bool HGCalAndBREMLinker::debug_
private

Definition at line 17 of file HGCalandBREMLinker.cc.

◆ useKDTree_

bool HGCalAndBREMLinker::useKDTree_
private

Definition at line 17 of file HGCalandBREMLinker.cc.

HLT_FULL_cff.track
track
Definition: HLT_FULL_cff.py:11713
HGCalAndBREMLinker::useKDTree_
bool useKDTree_
Definition: HGCalandBREMLinker.cc:17
edm::ParameterSet::getUntrackedParameter
T getUntrackedParameter(std::string const &, T const &) const
edm::Ref< PFClusterCollection >
reco::PFTrajectoryPoint::positionREP
const REPPoint & positionREP() const
trajectory position in (rho, eta, phi) base
Definition: PFTrajectoryPoint.h:103
reco::PFTrajectoryPoint::ECALShowerMax
Definition: PFTrajectoryPoint.h:46
reco::PFBlockElementBrem
Track Element.
Definition: PFBlockElementBrem.h:17
BlockElementLinkerBase::BlockElementLinkerBase
BlockElementLinkerBase(const edm::ParameterSet &conf)
Definition: BlockElementLinkerBase.h:12
reco::PFTrajectoryPoint::LayerType
LayerType
Define the different layers where the track can be propagated.
Definition: PFTrajectoryPoint.h:34
reco::PFTrajectoryPoint::isValid
bool isValid() const
is this point valid ?
Definition: PFTrajectoryPoint.h:84
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
HGCalAndBREMLinker::debug_
bool debug_
Definition: HGCalandBREMLinker.cc:17
edm::ParameterSet::getParameter
T getParameter(std::string const &) const
Definition: ParameterSet.h:303
reco::PFBlockElement::type
Type type() const
Definition: PFBlockElement.h:69
LinkByRecHit::computeDist
static double computeDist(double eta1, double phi1, double eta2, double phi2, bool etaPhi=true)
computes a chisquare
Definition: LinkByRecHit.cc:519