CMS 3D CMS Logo

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

Public Member Functions

 HCALAndBREMLinker (const edm::ParameterSet &conf)
 
double testLink (const reco::PFBlockElement *, const reco::PFBlockElement *) const override
 
- Public Member Functions inherited from BlockElementLinkerBase
 BlockElementLinkerBase (const edm::ParameterSet &conf)
 
 BlockElementLinkerBase (const BlockElementLinkerBase &)=delete
 
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 HCALAndBREMLinker.cc.

Constructor & Destructor Documentation

◆ HCALAndBREMLinker()

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

Definition at line 9 of file HCALAndBREMLinker.cc.

10  : BlockElementLinkerBase(conf),
11  useKDTree_(conf.getParameter<bool>("useKDTree")),
12  debug_(conf.getUntrackedParameter<bool>("debug", false)) {}
T getParameter(std::string const &) const
Definition: ParameterSet.h:307
T getUntrackedParameter(std::string const &, T const &) const
BlockElementLinkerBase(const edm::ParameterSet &conf)

Member Function Documentation

◆ testLink()

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

Implements BlockElementLinkerBase.

Definition at line 22 of file HCALAndBREMLinker.cc.

References reco::PFBlockElementCluster::clusterRef(), ALPAKA_ACCELERATOR_NAMESPACE::brokenline::constexpr(), debug_, reco::PFTrajectoryPoint::HCALEntrance, reco::PFTrajectoryPoint::isValid(), LinkByRecHit::testTrackAndClusterByRecHit(), HLT_2024v10_cff::track, reco::PFBlockElementBrem::trackPF(), and reco::PFBlockElement::type().

22  {
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 }
reconstructed track used as an input to particle flow
Definition: PFRecTrack.h:20
bool isValid() const
is this point valid ?
A PFTrack holds several trajectory points, which basically contain the position and momentum of a tra...
LayerType
Define the different layers where the track can be propagated.
static double testTrackAndClusterByRecHit(const reco::PFRecTrack &track, const reco::PFCluster &cluster, bool isBrem=false, bool debug=false)
Definition: LinkByRecHit.cc:18

Member Data Documentation

◆ debug_

bool HCALAndBREMLinker::debug_
private

Definition at line 17 of file HCALAndBREMLinker.cc.

Referenced by testLink().

◆ useKDTree_

bool HCALAndBREMLinker::useKDTree_
private

Definition at line 17 of file HCALAndBREMLinker.cc.