ATLAS Offline Software
Loading...
Searching...
No Matches
eflowSubtract::Subtractor Class Reference

Used in eflowCellLevelSubtractionTool and eflowRecoverSplitShowersTool to perform the removal of calorimeter cells from clusters. More...

#include <eflowSubtractor.h>

Collaboration diagram for eflowSubtract::Subtractor:

Public Member Functions

 Subtractor ()=default
 ~Subtractor ()
void subtractTracksFromClusters (eflowRecTrack *efRecTrack, std::vector< std::pair< xAOD::CaloCluster *, bool > > &clusterSubtractionList, const bool &addCPData) const

Static Public Member Functions

static void annihilateClusters (std::vector< std::pair< xAOD::CaloCluster *, bool > > &clusters)
static void annihilateCluster (xAOD::CaloCluster *cluster)
static void makeOrderedCellList (const eflowTrackCaloPoints &trackCalo, const std::vector< std::pair< xAOD::CaloCluster *, bool > > &clusters, eflowCellList &orderedCells)

Public Attributes

eflowCellSubtractionFacilitator m_facilitator {}

Detailed Description

Used in eflowCellLevelSubtractionTool and eflowRecoverSplitShowersTool to perform the removal of calorimeter cells from clusters.

Makes use of eflowCellList, eflowRingSubtractionManager and eflowCellSubtractionFacilitator.

Definition at line 34 of file eflowSubtractor.h.

Constructor & Destructor Documentation

◆ Subtractor()

eflowSubtract::Subtractor::Subtractor ( )
default

◆ ~Subtractor()

eflowSubtract::Subtractor::~Subtractor ( )
inline

Definition at line 40 of file eflowSubtractor.h.

40{}

Member Function Documentation

◆ annihilateCluster()

void eflowSubtract::Subtractor::annihilateCluster ( xAOD::CaloCluster * cluster)
static

Definition at line 90 of file eflowSubtractor.cxx.

91{
92
93 CaloClusterCellLink* theCellLink = cluster->getOwnCellLinks();
94 theCellLink->clear();
95
96 cluster->setE(0.0);
97 cluster->setRawE(0.0);
98 CaloClusterKineHelper::calculateKine(cluster, true, true);
99}
static void calculateKine(xAOD::CaloCluster *clu, const bool useweight=true, const bool updateLayers=true, const bool useGPUCriteria=false)
Helper class to calculate cluster kinematics based on cells.
void setRawE(flt_t)
Set Energy for signal state UNCALIBRATED.
CaloClusterCellLink * getOwnCellLinks()
Get a pointer to the owned CaloClusterCellLink object (non-const version)

◆ annihilateClusters()

void eflowSubtract::Subtractor::annihilateClusters ( std::vector< std::pair< xAOD::CaloCluster *, bool > > & clusters)
static

Definition at line 78 of file eflowSubtractor.cxx.

80{
81
82 for (auto& thisPair : clusters) {
83 annihilateCluster(thisPair.first);
84 // mark subtraction status as true
85 thisPair.second = true;
86 }
87}
static void annihilateCluster(xAOD::CaloCluster *cluster)

◆ makeOrderedCellList()

void eflowSubtract::Subtractor::makeOrderedCellList ( const eflowTrackCaloPoints & trackCalo,
const std::vector< std::pair< xAOD::CaloCluster *, bool > > & clusters,
eflowCellList & orderedCells )
static

Definition at line 51 of file eflowSubtractor.cxx.

55{
56 orderedCells.setNewExtrapolatedTrack(trackCalo);
57
58 unsigned int countMatchedClusters = 0;
59 for (auto thisPair : clusters) {
60
61 xAOD::CaloCluster* thisCluster = thisPair.first;
62
63 const CaloClusterCellLink* theCellLink = thisCluster->getCellLinks();
64 CaloClusterCellLink::const_iterator firstCell = theCellLink->begin();
65 CaloClusterCellLink::const_iterator lastCell = theCellLink->end();
66
67 /* Loop over cells in cluster */
68 for (; firstCell != lastCell; ++firstCell) {
69 std::pair<const CaloCell*, int> myPair((*firstCell),
70 countMatchedClusters);
71 orderedCells.addCell(myPair);
72 }
73 countMatchedClusters++;
74 }
75}
void addCell(std::pair< const CaloCell *, int > cell)
void setNewExtrapolatedTrack(const eflowTrackCaloPoints *trackCalo)
const CaloClusterCellLink * getCellLinks() const
Get a pointer to the CaloClusterCellLink object (const version)
CaloCluster_v1 CaloCluster
Define the latest version of the calorimeter cluster class.

◆ subtractTracksFromClusters()

void eflowSubtract::Subtractor::subtractTracksFromClusters ( eflowRecTrack * efRecTrack,
std::vector< std::pair< xAOD::CaloCluster *, bool > > & clusterSubtractionList,
const bool & addCPData ) const

Definition at line 27 of file eflowSubtractor.cxx.

30{
31
32 /* Make ordered cell list */
33 /* (Invokes newCluster() on orderedCells, than adds all the cells in
34 * tracksClus) */
35 eflowCellList orderedCells;
37 efRecTrack->getTrackCaloPoints(), clusterSubtractionList, orderedCells);
38
39 /* Get the cellSubtractionManager from the eflowCaloObject */
40 eflowRingSubtractionManager& ranking =
41 efRecTrack->getCellSubtractionManager();
42
43 bool annFlag;
44 m_facilitator.subtractCells(
45 ranking, *efRecTrack, clusterSubtractionList, orderedCells, annFlag, addCPData);
46
47 orderedCells.eraseList();
48}
const eflowTrackCaloPoints & getTrackCaloPoints() const
eflowRingSubtractionManager & getCellSubtractionManager()
static void makeOrderedCellList(const eflowTrackCaloPoints &trackCalo, const std::vector< std::pair< xAOD::CaloCluster *, bool > > &clusters, eflowCellList &orderedCells)
eflowCellSubtractionFacilitator m_facilitator

Member Data Documentation

◆ m_facilitator

eflowCellSubtractionFacilitator eflowSubtract::Subtractor::m_facilitator {}

Definition at line 56 of file eflowSubtractor.h.

56{};

The documentation for this class was generated from the following files: