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
 

Private Attributes

bool _debug
 
bool _useKDTree
 

Detailed Description

Definition at line 7 of file HCALAndBREMLinker.cc.

Constructor & Destructor Documentation

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

Definition at line 9 of file HCALAndBREMLinker.cc.

References testLink().

9  :
11  _useKDTree(conf.getParameter<bool>("useKDTree")),
12  _debug(conf.getUntrackedParameter<bool>("debug",false)) {}
T getParameter(std::string const &) const
T getUntrackedParameter(std::string const &, T const &) const
BlockElementLinkerBase(const edm::ParameterSet &conf)

Member Function Documentation

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

Implements BlockElementLinkerBase.

Definition at line 27 of file HCALAndBREMLinker.cc.

References _debug, reco::PFBlockElementCluster::clusterRef(), constexpr, reco::PFTrack::extrapolatedPoint(), reco::PFTrajectoryPoint::HCALEntrance, reco::PFTrajectoryPoint::isValid(), NULL, LinkByRecHit::testTrackAndClusterByRecHit(), HiIsolationCommonParameters_cff::track, reco::PFBlockElementBrem::trackPF(), and reco::PFBlockElement::type().

Referenced by HCALAndBREMLinker().

28  {
31  const reco::PFBlockElementCluster *hcalelem(NULL);
32  const reco::PFBlockElementBrem *bremelem(NULL);
33  double dist(-1.0);
34  if( elem1->type() < elem2->type() ) {
35  hcalelem = static_cast<const reco::PFBlockElementCluster*>(elem1);
36  bremelem = static_cast<const reco::PFBlockElementBrem*>(elem2);
37  } else {
38  hcalelem = static_cast<const reco::PFBlockElementCluster*>(elem2);
39  bremelem = static_cast<const reco::PFBlockElementBrem*>(elem1);
40  }
41  const reco::PFClusterRef& clusterref = hcalelem->clusterRef();
42  const reco::PFRecTrack& track = bremelem->trackPF();
43  const reco::PFTrajectoryPoint& tkAtHCAL =
44  track.extrapolatedPoint( HCALEnt );
45  if( tkAtHCAL.isValid() ) {
46  dist = LinkByRecHit::testTrackAndClusterByRecHit( track, *clusterref,
47  true, _debug );
48  }
49  return dist;
50 }
reconstructed track used as an input to particle flow
Definition: PFRecTrack.h:22
Type type() const
#define NULL
Definition: scimark2.h:8
#define constexpr
const reco::PFTrajectoryPoint & extrapolatedPoint(unsigned layerid) const
Definition: PFTrack.cc:76
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

bool HCALAndBREMLinker::_debug
private
bool HCALAndBREMLinker::_useKDTree
private

Definition at line 19 of file HCALAndBREMLinker.cc.