ATLAS Offline Software
Loading...
Searching...
No Matches
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.
bool preSelectAction (const xAOD::CaloCluster &caloCluster)
bool select (const CaloCell &cell) const
 Method to determine if a cell is to be selected or not.
virtual bool preSelectActionCells (const Rec::ParticleCellAssociation &cellAssociation)
 Initialize selector wtih ParticleCellAssociation, returns false if the selection cannot be performed for the given input.

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.

16: m_coneSize2(coneSize * coneSize) {}

◆ ~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 }
CaloExtensionHelpers::EtaPhiHashLookupVector m_midPoints
const std::vector< CurvilinearParameters > & caloLayerIntersections() const
access to the intersections with the calorimeter layers.
void midPointEtaPhiHashLookupVector(const Trk::CaloExtension &extension, EtaPhiHashLookupVector &result)

◆ 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 }
static constexpr unsigned int getNumberOfSamplings()
Get number of available samplings.
float phiSample(const CaloSample sampling) const
Retrieve barycenter in a given sample.
float etaSample(const CaloSample sampling) const
Retrieve barycenter in a given sample.
bool hasSampling(const CaloSample s) const
Checks if certain smapling contributes to cluster.

◆ 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 }
const Trk::CaloExtension & caloExtension() const
return calo extension
virtual bool preSelectAction(const Trk::CaloExtension &caloExtension)
Initialize selector wtih CaloExtension, returns false if the selection cannot be performed for the gi...

◆ 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 }
CaloCell_ID::CaloSample getSampling() const
cell sampling
double deltaR2(double eta1, double eta2, double phi1, double phi2)

◆ setConeSize()

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

Definition at line 31 of file CaloCellSelectorLayerdR.h.

float coneSize(IsolationConeSize type)
convert Isolation Size into cone size

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: