ATLAS Offline Software
Public Member Functions | Private Member Functions | Static Private Attributes | List of all members
PFMatch::ClusterGeometricalCenterProvider Class Reference

#include <PFMatchPositions.h>

Inheritance diagram for PFMatch::ClusterGeometricalCenterProvider:
Collaboration diagram for PFMatch::ClusterGeometricalCenterProvider:

Public Member Functions

 ClusterGeometricalCenterProvider ()
 
virtual ~ClusterGeometricalCenterProvider ()
 

Private Member Functions

EtaPhiWithVariance getPosition (ICluster *cluster) const
 

Static Private Attributes

static const double m_etaPhiLowerLimit
 

Detailed Description

Definition at line 63 of file PFMatchPositions.h.

Constructor & Destructor Documentation

◆ ClusterGeometricalCenterProvider()

PFMatch::ClusterGeometricalCenterProvider::ClusterGeometricalCenterProvider ( )
inline

Definition at line 65 of file PFMatchPositions.h.

65 { }

◆ ~ClusterGeometricalCenterProvider()

virtual PFMatch::ClusterGeometricalCenterProvider::~ClusterGeometricalCenterProvider ( )
inlinevirtual

Definition at line 66 of file PFMatchPositions.h.

66 { }

Member Function Documentation

◆ getPosition()

EtaPhiWithVariance PFMatch::ClusterGeometricalCenterProvider::getPosition ( ICluster cluster) const
privatevirtual

Implements PFMatch::PositionProvider< ICluster, EtaPhiWithVariance >.

Definition at line 43 of file PFMatchPositions.cxx.

43  {
44 
45  /* Check the status to make sure this function only execute once since it is expensive. */
46  if(cluster->calVarianceStatus()) {
47  return {eflowEtaPhiPosition(cluster->etaMean(), cluster->phiMean()), cluster->etaVariance(), cluster->phiVariance()};
48  }
49  cluster->setCalVarianceStatus();
50 
51 
52  unsigned int nCells = cluster->nCells();
53 
54  PFClusterWidthCalculator widthCalc;
55  std::pair<double,double> width = widthCalc.getPFClusterCoordinateWidth(cluster->cellEta(),cluster->cellPhi(),cluster->eta(),cluster->phi(),nCells);
56 
57  if (nCells > 1){
58  cluster->etaMean(widthCalc.getEtaMean());
59  cluster->phiMean(widthCalc.getPhiMean());
60  }
61  cluster->etaVariance(width.first);
62  cluster->phiVariance(width.second);
63 
64  return {eflowEtaPhiPosition(widthCalc.getEtaMean(),widthCalc.getPhiMean()), width.first, width.second};
65 
66 
67 
68 }

Member Data Documentation

◆ m_etaPhiLowerLimit

const double PFMatch::ClusterGeometricalCenterProvider::m_etaPhiLowerLimit
staticprivate

Definition at line 71 of file PFMatchPositions.h.


The documentation for this class was generated from the following files:
eflowEtaPhiPosition
Definition: eflowUtil.h:85
PFClusterWidthCalculator
Definition: PFClusterWidthCalculator.h:6
xAOD::nCells
setRawEt setRawPhi nCells
Definition: TrigCaloCluster_v1.cxx:33
PFClusterWidthCalculator::getEtaMean
double getEtaMean() const
Definition: PFClusterWidthCalculator.h:14
PFClusterWidthCalculator::getPhiMean
double getPhiMean() const
Definition: PFClusterWidthCalculator.h:15
Base_Fragment.width
width
Definition: Sherpa_i/share/common/Base_Fragment.py:59
PFClusterWidthCalculator::getPFClusterCoordinateWidth
std::pair< double, double > getPFClusterCoordinateWidth(const std::vector< double > &eta, const std::vector< double > &phi, const double &clusterEta, const double &clusterPhi, unsigned int nCells)
Definition: PFClusterWidthCalculator.cxx:11