CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
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 ( const edm::ParameterSet conf)
inline

Definition at line 21 of file KDTreeLinkerBase.h.

21 {}
virtual KDTreeLinkerBase::~KDTreeLinkerBase ( )
inlinevirtual

Definition at line 22 of file KDTreeLinkerBase.h.

22 {}

Member Function Documentation

virtual void KDTreeLinkerBase::buildTree ( )
pure virtual
virtual void KDTreeLinkerBase::clear ( )
pure virtual
const reco::PFBlockElement::Type& KDTreeLinkerBase::fieldType ( ) const
inline

Definition at line 30 of file KDTreeLinkerBase.h.

References _fieldType.

30 { return _fieldType; }
reco::PFBlockElement::Type _fieldType
virtual void KDTreeLinkerBase::insertFieldClusterElt ( reco::PFBlockElement cluster)
pure virtual
virtual void KDTreeLinkerBase::insertTargetElt ( reco::PFBlockElement target)
pure virtual
void KDTreeLinkerBase::process ( )
inline

Definition at line 66 of file KDTreeLinkerBase.h.

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

66  {
67  buildTree();
68  searchLinks();
70  clear();
71  }
virtual void updatePFBlockEltWithLinks()=0
virtual void buildTree()=0
virtual void clear()=0
virtual void searchLinks()=0
virtual void KDTreeLinkerBase::searchLinks ( )
pure virtual
void KDTreeLinkerBase::setDebug ( bool  isDebug)
void KDTreeLinkerBase::setFieldType ( const reco::PFBlockElement::Type fld)
inline

Definition at line 26 of file KDTreeLinkerBase.h.

References _fieldType.

26 { _fieldType = fld; }
reco::PFBlockElement::Type _fieldType
void KDTreeLinkerBase::setTargetType ( const reco::PFBlockElement::Type tgt)
inline

Definition at line 24 of file KDTreeLinkerBase.h.

References _targetType.

24 { _targetType = tgt; }
reco::PFBlockElement::Type _targetType
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.

References mps_fire::i, and findQualityFiles::v.

Referenced by KDTreeLinkerTrackHcal::updatePFBlockEltWithLinks().

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  }
const reco::PFBlockElement::Type& KDTreeLinkerBase::targetType ( ) const
inline

Definition at line 28 of file KDTreeLinkerBase.h.

References _targetType.

28 { return _targetType; }
reco::PFBlockElement::Type _targetType
virtual void KDTreeLinkerBase::updatePFBlockEltWithLinks ( )
pure virtual

Member Data Documentation

reco::PFBlockElement::Type KDTreeLinkerBase::_fieldType
protected
reco::PFBlockElement::Type KDTreeLinkerBase::_targetType
protected
float KDTreeLinkerBase::cristalPhiEtaMaxSize_ = 0.04
protected
float KDTreeLinkerBase::cristalXYMaxSize_ = 3.
protected

Definition at line 78 of file KDTreeLinkerBase.h.

Referenced by KDTreeLinkerPSEcal::searchLinks().

const float KDTreeLinkerBase::cutOffFrac = 1E-4
protected
bool KDTreeLinkerBase::debug_ = false
protected

Definition at line 90 of file KDTreeLinkerBase.h.

float KDTreeLinkerBase::phiOffset_ = 0.25
protected