CMS 3D CMS Logo

List of all members | Public Member Functions | Static Protected Member Functions | Protected Attributes
KDTreeLinkerBase Class Referenceabstract

#include <KDTreeLinkerBase.h>

Inheritance diagram for KDTreeLinkerBase:
KDTreeLinkerPSEcal KDTreeLinkerTrackEcal KDTreeLinkerTrackHcal

Public Member Functions

virtual void buildTree ()=0
 
virtual void clear ()=0
 
const reco::PFBlockElement::TypefieldType () const
 
virtual void insertFieldClusterElt (reco::PFBlockElement *cluster)=0
 
virtual void insertTargetElt (reco::PFBlockElement *target)=0
 
 KDTreeLinkerBase (const edm::ParameterSet &conf)
 
void process ()
 
virtual void searchLinks ()=0
 
void setDebug (bool isDebug)
 
void setFieldType (const reco::PFBlockElement::Type &fld)
 
void setTargetType (const reco::PFBlockElement::Type &tgt)
 
const reco::PFBlockElement::TypetargetType () const
 
virtual void updatePFBlockEltWithLinks ()=0
 
virtual ~KDTreeLinkerBase ()
 

Static Protected Member Functions

template<typename T >
static std::vector< size_t > sort_indexes (const std::vector< T > &v)
 

Protected Attributes

reco::PFBlockElement::Type _fieldType
 
reco::PFBlockElement::Type _targetType
 
float cristalPhiEtaMaxSize_ = 0.04
 
float cristalXYMaxSize_ = 3.
 
const float cutOffFrac = 1E-4
 
bool debug_ = false
 
float phiOffset_ = 0.25
 

Detailed Description

Definition at line 19 of file KDTreeLinkerBase.h.

Constructor & Destructor Documentation

◆ KDTreeLinkerBase()

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

Definition at line 21 of file KDTreeLinkerBase.h.

21 {}

◆ ~KDTreeLinkerBase()

virtual KDTreeLinkerBase::~KDTreeLinkerBase ( )
inlinevirtual

Definition at line 22 of file KDTreeLinkerBase.h.

22 {}

Member Function Documentation

◆ buildTree()

virtual void KDTreeLinkerBase::buildTree ( )
pure virtual

◆ clear()

virtual void KDTreeLinkerBase::clear ( )
pure virtual

◆ fieldType()

const reco::PFBlockElement::Type& KDTreeLinkerBase::fieldType ( ) const
inline

Definition at line 30 of file KDTreeLinkerBase.h.

30 { return _fieldType; }

References _fieldType.

◆ insertFieldClusterElt()

virtual void KDTreeLinkerBase::insertFieldClusterElt ( reco::PFBlockElement cluster)
pure virtual

◆ insertTargetElt()

virtual void KDTreeLinkerBase::insertTargetElt ( reco::PFBlockElement target)
pure virtual

◆ process()

void KDTreeLinkerBase::process ( )
inline

Definition at line 66 of file KDTreeLinkerBase.h.

66  {
67  buildTree();
68  searchLinks();
70  clear();
71  }

References buildTree(), clear(), searchLinks(), and updatePFBlockEltWithLinks().

◆ searchLinks()

virtual void KDTreeLinkerBase::searchLinks ( )
pure virtual

◆ setDebug()

void KDTreeLinkerBase::setDebug ( bool  isDebug)

◆ setFieldType()

void KDTreeLinkerBase::setFieldType ( const reco::PFBlockElement::Type fld)
inline

Definition at line 26 of file KDTreeLinkerBase.h.

26 { _fieldType = fld; }

References _fieldType.

◆ setTargetType()

void KDTreeLinkerBase::setTargetType ( const reco::PFBlockElement::Type tgt)
inline

Definition at line 24 of file KDTreeLinkerBase.h.

24 { _targetType = tgt; }

References _targetType.

◆ sort_indexes()

template<typename T >
static std::vector<size_t> KDTreeLinkerBase::sort_indexes ( const std::vector< T > &  v)
inlinestaticprotected

Definition at line 94 of file KDTreeLinkerBase.h.

94  {
95  std::vector<size_t> idx(v.size());
96  for (size_t i = 0; i != idx.size(); ++i)
97  idx[i] = i;
98  std::sort(idx.begin(), idx.end(), [&v](size_t i1, size_t i2) { return v[i1] < v[i2]; });
99  return idx;
100  }

References mps_fire::i, testProducerWithPsetDescEmpty_cfi::i1, testProducerWithPsetDescEmpty_cfi::i2, heavyIonCSV_trainingSettings::idx, and findQualityFiles::v.

Referenced by KDTreeLinkerTrackHcal::updatePFBlockEltWithLinks().

◆ targetType()

const reco::PFBlockElement::Type& KDTreeLinkerBase::targetType ( ) const
inline

Definition at line 28 of file KDTreeLinkerBase.h.

28 { return _targetType; }

References _targetType.

◆ updatePFBlockEltWithLinks()

virtual void KDTreeLinkerBase::updatePFBlockEltWithLinks ( )
pure virtual

Member Data Documentation

◆ _fieldType

reco::PFBlockElement::Type KDTreeLinkerBase::_fieldType
protected

◆ _targetType

reco::PFBlockElement::Type KDTreeLinkerBase::_targetType
protected

◆ cristalPhiEtaMaxSize_

float KDTreeLinkerBase::cristalPhiEtaMaxSize_ = 0.04
protected

◆ cristalXYMaxSize_

float KDTreeLinkerBase::cristalXYMaxSize_ = 3.
protected

Definition at line 78 of file KDTreeLinkerBase.h.

Referenced by KDTreeLinkerPSEcal::searchLinks().

◆ cutOffFrac

const float KDTreeLinkerBase::cutOffFrac = 1E-4
protected

◆ debug_

bool KDTreeLinkerBase::debug_ = false
protected

Definition at line 90 of file KDTreeLinkerBase.h.

◆ phiOffset_

float KDTreeLinkerBase::phiOffset_ = 0.25
protected
testProducerWithPsetDescEmpty_cfi.i2
i2
Definition: testProducerWithPsetDescEmpty_cfi.py:46
mps_fire.i
i
Definition: mps_fire.py:428
KDTreeLinkerBase::searchLinks
virtual void searchLinks()=0
testProducerWithPsetDescEmpty_cfi.i1
i1
Definition: testProducerWithPsetDescEmpty_cfi.py:45
KDTreeLinkerBase::clear
virtual void clear()=0
findQualityFiles.v
v
Definition: findQualityFiles.py:179
heavyIonCSV_trainingSettings.idx
idx
Definition: heavyIonCSV_trainingSettings.py:5
KDTreeLinkerBase::_targetType
reco::PFBlockElement::Type _targetType
Definition: KDTreeLinkerBase.h:75
KDTreeLinkerBase::updatePFBlockEltWithLinks
virtual void updatePFBlockEltWithLinks()=0
KDTreeLinkerBase::buildTree
virtual void buildTree()=0
KDTreeLinkerBase::_fieldType
reco::PFBlockElement::Type _fieldType
Definition: KDTreeLinkerBase.h:75