ATLAS Offline Software
Public Member Functions | Private Attributes | List of all members
Trk::CaloCellSelectorNearestdR Class Reference

#include <CaloCellSelectorNearestdR.h>

Inheritance diagram for Trk::CaloCellSelectorNearestdR:
Collaboration diagram for Trk::CaloCellSelectorNearestdR:

Public Member Functions

 CaloCellSelectorNearestdR (double coneSize)
 
 ~CaloCellSelectorNearestdR ()
 
bool preSelectAction (const Trk::CaloExtension &caloExtension)
 Initialize selector wtih CaloExtension, returns false if the selection cannot be performed for the given input. More...
 
bool select (const CaloCell &cell) const
 Method to determine if a cell is to be selected or not. More...
 
virtual bool preSelectActionCells (const Rec::ParticleCellAssociation &cellAssociation)
 Initialize selector wtih ParticleCellAssociation, returns false if the selection cannot be performed for the given input
More...
 

Private Attributes

const Trk::CaloExtensionm_caloExtension
 
double m_coneSize2
 

Detailed Description

Definition at line 22 of file CaloCellSelectorNearestdR.h.

Constructor & Destructor Documentation

◆ CaloCellSelectorNearestdR()

Trk::CaloCellSelectorNearestdR::CaloCellSelectorNearestdR ( double  coneSize)

Definition at line 17 of file CaloCellSelectorNearestdR.cxx.

◆ ~CaloCellSelectorNearestdR()

Trk::CaloCellSelectorNearestdR::~CaloCellSelectorNearestdR ( )
default

Member Function Documentation

◆ preSelectAction()

bool Trk::CaloCellSelectorNearestdR::preSelectAction ( const Trk::CaloExtension caloExtension)
virtual

Initialize selector wtih CaloExtension, returns false if the selection cannot be performed for the given input.

Reimplemented from Trk::ICaloCellSelector.

Definition at line 21 of file CaloCellSelectorNearestdR.cxx.

21  {
22  m_caloExtension = &caloExtension;
23  return true;
24  }

◆ preSelectActionCells()

bool ICaloCellSelector::preSelectActionCells ( const Rec::ParticleCellAssociation cellAssociation)
inlinevirtualinherited

Initialize selector wtih ParticleCellAssociation, returns false if the selection cannot be performed for the given input

Definition at line 44 of file Reconstruction/RecoTools/RecoToolInterfaces/RecoToolInterfaces/ICaloCellSelector.h.

44  {
45  return preSelectAction(cellAssociation.caloExtension());
46  }

◆ select()

bool Trk::CaloCellSelectorNearestdR::select ( const CaloCell cell) const
virtual

Method to determine if a cell is to be selected or not.

Parameters
CaloCell
Returns
bool

Implements Trk::ICaloCellSelector.

Definition at line 26 of file CaloCellSelectorNearestdR.cxx.

26  {
27  if (!m_caloExtension) return false;
28 
29  const CaloDetDescrElement* dde = cell.caloDDE();
30  if (!dde) return false;
31 
32  Amg::Vector3D cellPos(dde->x(), dde->y(), dde->z());
33 
34  int nearestIdx;
35  Amg::Vector3D nearestPos, nearestMom;
36  Utils::findNearestPoint(cellPos, m_caloExtension, nearestIdx, nearestPos, nearestMom);
37 
38  return Utils::deltaR2(nearestPos.eta(), dde->eta(), nearestPos.phi(), dde->phi()) < m_coneSize2;
39  }

Member Data Documentation

◆ m_caloExtension

const Trk::CaloExtension* Trk::CaloCellSelectorNearestdR::m_caloExtension
private

Definition at line 32 of file CaloCellSelectorNearestdR.h.

◆ m_coneSize2

double Trk::CaloCellSelectorNearestdR::m_coneSize2
private

Definition at line 33 of file CaloCellSelectorNearestdR.h.


The documentation for this class was generated from the following files:
ReadCellNoiseFromCool.cell
cell
Definition: ReadCellNoiseFromCool.py:53
CaloDetDescrElement::y
float y() const
cell y
Definition: Calorimeter/CaloDetDescr/CaloDetDescr/CaloDetDescrElement.h:365
CaloDetDescrElement
This class groups all DetDescr information related to a CaloCell. Provides a generic interface for al...
Definition: Calorimeter/CaloDetDescr/CaloDetDescr/CaloDetDescrElement.h:66
Trk::CaloCellSelectorNearestdR::m_coneSize2
double m_coneSize2
Definition: CaloCellSelectorNearestdR.h:33
Rec::ParticleCaloAssociation::caloExtension
const Trk::CaloExtension & caloExtension() const
return calo extension
Definition: ParticleCaloAssociation.h:73
Trk::ICaloCellSelector::preSelectAction
virtual bool preSelectAction(const Trk::CaloExtension &caloExtension)
Initialize selector wtih CaloExtension, returns false if the selection cannot be performed for the gi...
Definition: Reconstruction/RecoTools/RecoToolInterfaces/RecoToolInterfaces/ICaloCellSelector.h:40
WriteCellNoiseToCool.cellPos
cellPos
Definition: WriteCellNoiseToCool.py:400
Amg::Vector3D
Eigen::Matrix< double, 3, 1 > Vector3D
Definition: GeoPrimitives.h:47
CaloDetDescrElement::x
float x() const
cell x
Definition: Calorimeter/CaloDetDescr/CaloDetDescr/CaloDetDescrElement.h:363
CaloDetDescrElement::z
float z() const
cell z
Definition: Calorimeter/CaloDetDescr/CaloDetDescr/CaloDetDescrElement.h:367
Trk::CaloCellSelectorNearestdR::m_caloExtension
const Trk::CaloExtension * m_caloExtension
Definition: CaloCellSelectorNearestdR.h:32
CaloDetDescrElement::eta
float eta() const
cell eta
Definition: Calorimeter/CaloDetDescr/CaloDetDescr/CaloDetDescrElement.h:344
CaloDetDescrElement::phi
float phi() const
cell phi
Definition: Calorimeter/CaloDetDescr/CaloDetDescr/CaloDetDescrElement.h:346
Utils::findNearestPoint
void findNearestPoint(const Amg::Vector3D &inputPos, const Trk::CaloExtension *caloExtension, int &nearestIdx, Amg::Vector3D &nearestPos, Amg::Vector3D &nearestMom)
Definition: CaloCellSelectorUtils.cxx:25
xAOD::Iso::coneSize
float coneSize(IsolationConeSize type)
convert Isolation Size into cone size
Definition: IsolationHelpers.h:27
Utils::deltaR2
double deltaR2(double eta1, double eta2, double phi1, double phi2)
Definition: CaloCellSelectorUtils.cxx:17