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

#include <CaloCellSelectorLayerdR.h>

Inheritance diagram for Trk::CaloCellSelectorLayerdR:
Collaboration diagram for Trk::CaloCellSelectorLayerdR:

Public Member Functions

 CaloCellSelectorLayerdR (double coneSize)
 
 ~CaloCellSelectorLayerdR ()
 
void setConeSize (double coneSize)
 
bool preSelectAction (const Trk::CaloExtension &caloExtension)
 Initialize selector wtih CaloExtension, returns false if the selection cannot be performed for the given input. More...
 
bool preSelectAction (const xAOD::CaloCluster &caloCluster)
 
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

CaloExtensionHelpers::EtaPhiHashLookupVector m_midPoints
 
double m_coneSize2
 

Detailed Description

Definition at line 26 of file CaloCellSelectorLayerdR.h.

Constructor & Destructor Documentation

◆ CaloCellSelectorLayerdR()

Trk::CaloCellSelectorLayerdR::CaloCellSelectorLayerdR ( double  coneSize)

Definition at line 16 of file CaloCellSelectorLayerdR.cxx.

◆ ~CaloCellSelectorLayerdR()

Trk::CaloCellSelectorLayerdR::~CaloCellSelectorLayerdR ( )
default

Member Function Documentation

◆ preSelectAction() [1/2]

bool Trk::CaloCellSelectorLayerdR::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 20 of file CaloCellSelectorLayerdR.cxx.

20  {
21  if (caloExtension.caloLayerIntersections().empty()) return false;
23  return true;
24  }

◆ preSelectAction() [2/2]

bool Trk::CaloCellSelectorLayerdR::preSelectAction ( const xAOD::CaloCluster caloCluster)

Definition at line 26 of file CaloCellSelectorLayerdR.cxx.

26  {
27  m_midPoints.clear();
29  for (unsigned int i = 0; i < CaloSampling::Unknown; i++) {
30  auto s = static_cast<CaloSampling::CaloSample>(i);
31  if (!caloCluster.hasSampling(s))
32  m_midPoints.emplace_back(false, 0., 0.);
33  else
34  m_midPoints.emplace_back(true, caloCluster.etaSample(s), caloCluster.phiSample(s));
35  }
36  return true;
37  }

◆ 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::CaloCellSelectorLayerdR::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 39 of file CaloCellSelectorLayerdR.cxx.

39  {
40  // select cell within dR from the midPoint of the same calo layer
41  const CaloDetDescrElement* dde = cell.caloDDE();
42  if (!dde) return false;
43 
44  int samplingID = dde->getSampling();
45  if (!std::get<0>(m_midPoints[samplingID])) return false;
46  double dr = Utils::deltaR2(std::get<1>(m_midPoints[samplingID]), dde->eta(), std::get<2>(m_midPoints[samplingID]), dde->phi());
47  return dr < m_coneSize2;
48  }

◆ setConeSize()

void Trk::CaloCellSelectorLayerdR::setConeSize ( double  coneSize)
inline

Definition at line 31 of file CaloCellSelectorLayerdR.h.

Member Data Documentation

◆ m_coneSize2

double Trk::CaloCellSelectorLayerdR::m_coneSize2
private

Definition at line 39 of file CaloCellSelectorLayerdR.h.

◆ m_midPoints

CaloExtensionHelpers::EtaPhiHashLookupVector Trk::CaloCellSelectorLayerdR::m_midPoints
private

Definition at line 38 of file CaloCellSelectorLayerdR.h.


The documentation for this class was generated from the following files:
GetLCDefs::Unknown
@ Unknown
Definition: GetLCDefs.h:21
python.SystemOfUnits.s
int s
Definition: SystemOfUnits.py:131
ReadCellNoiseFromCool.cell
cell
Definition: ReadCellNoiseFromCool.py:53
CaloExtensionHelpers::midPointEtaPhiHashLookupVector
void midPointEtaPhiHashLookupVector(const Trk::CaloExtension &extension, EtaPhiHashLookupVector &result)
Definition: CaloExtensionHelpers.h:256
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::CaloCellSelectorLayerdR::m_coneSize2
double m_coneSize2
Definition: CaloCellSelectorLayerdR.h:39
python.TurnDataReader.dr
dr
Definition: TurnDataReader.py:112
xAOD::CaloCluster_v1::etaSample
float etaSample(const CaloSample sampling) const
Retrieve barycenter in a given sample.
Definition: CaloCluster_v1.cxx:532
Trk::CaloCellSelectorLayerdR::m_midPoints
CaloExtensionHelpers::EtaPhiHashLookupVector m_midPoints
Definition: CaloCellSelectorLayerdR.h:38
lumiFormat.i
int i
Definition: lumiFormat.py:85
CaloSampling::CaloSample
CaloSample
Definition: Calorimeter/CaloGeoHelpers/CaloGeoHelpers/CaloSampling.h:22
Rec::ParticleCaloAssociation::caloExtension
const Trk::CaloExtension & caloExtension() const
return calo extension
Definition: ParticleCaloAssociation.h:73
xAOD::CaloCluster_v1::phiSample
float phiSample(const CaloSample sampling) const
Retrieve barycenter in a given sample.
Definition: CaloCluster_v1.cxx:547
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
CaloSampling::getNumberOfSamplings
static constexpr unsigned int getNumberOfSamplings()
Get number of available samplings.
Definition: Calorimeter/CaloGeoHelpers/CaloGeoHelpers/CaloSampling.h:30
CaloDetDescrElement::getSampling
CaloCell_ID::CaloSample getSampling() const
cell sampling
Definition: Calorimeter/CaloDetDescr/CaloDetDescr/CaloDetDescrElement.h:395
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
Trk::CaloExtension::caloLayerIntersections
const std::vector< CurvilinearParameters > & caloLayerIntersections() const
access to the intersections with the calorimeter layers.
Definition: CaloExtension.h:76
xAOD::CaloCluster_v1::hasSampling
bool hasSampling(const CaloSample s) const
Checks if certain smapling contributes to cluster.
Definition: CaloCluster_v1.h:890
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