ATLAS Offline Software
Public Member Functions | Static Public Member Functions | Public Attributes | List of all members
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
 

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 
95  CaloClusterCellLink::iterator theFirstCell = theCellLink->begin();
96  CaloClusterCellLink::iterator theLastCell = theCellLink->end();
97 
98  for (; theFirstCell != theLastCell; ++theFirstCell)
99  theCellLink->removeCell(theFirstCell);
100 
101  cluster->setE(0.0);
102  cluster->setRawE(0.0);
103  CaloClusterKineHelper::calculateKine(cluster, true, true);
104 }

◆ 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 }

◆ 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 }

◆ subtractTracksFromClusters()

void eflowSubtract::Subtractor::subtractTracksFromClusters ( eflowRecTrack efRecTrack,
std::vector< std::pair< xAOD::CaloCluster *, bool >> &  clusterSubtractionList 
) 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 */
41  efRecTrack->getCellSubtractionManager();
42 
43  bool annFlag;
45  ranking, efRecTrack->getTrack()->e(), clusterSubtractionList, orderedCells, annFlag);
46 
47  orderedCells.eraseList();
48 }

Member Data Documentation

◆ m_facilitator

eflowCellSubtractionFacilitator eflowSubtract::Subtractor::m_facilitator {}

Definition at line 56 of file eflowSubtractor.h.


The documentation for this class was generated from the following files:
eflowCellList::setNewExtrapolatedTrack
void setNewExtrapolatedTrack(const eflowTrackCaloPoints *trackCalo)
Definition: eflowCellList.cxx:35
eflowCellList::addCell
void addCell(std::pair< const CaloCell *, int > cell)
Definition: eflowCellList.cxx:53
eflowCellList
Concrete class derived class from pure virtual eflowAbstractCellList.
Definition: eflowCellList.h:42
eflowCellSubtractionFacilitator::subtractCells
double subtractCells(eflowRingSubtractionManager &ringSubtractionManager, double trackEnergy, xAOD::CaloCluster *tracksClus, eflowCellList &orderedCells, bool &annFlag) const
Definition: eflowCellSubtractionFacilitator.cxx:24
eflowRecTrack::getCellSubtractionManager
eflowRingSubtractionManager & getCellSubtractionManager()
Definition: eflowRecTrack.h:62
xAOD::CaloCluster_v1::setE
void setE(flt_t)
Definition: CaloCluster_v1.cxx:375
xAOD::CaloCluster_v1
Description of a calorimeter cluster.
Definition: CaloCluster_v1.h:59
eflowSubtract::Subtractor::annihilateCluster
static void annihilateCluster(xAOD::CaloCluster *cluster)
Definition: eflowSubtractor.cxx:90
xAOD::CaloCluster_v1::setRawE
void setRawE(flt_t)
Set Energy for signal state UNCALIBRATED.
Definition: CaloCluster_v1.cxx:284
eflowCellList::eraseList
void eraseList()
Definition: eflowCellList.h:76
eflowSubtract::Subtractor::m_facilitator
eflowCellSubtractionFacilitator m_facilitator
Definition: eflowSubtractor.h:56
xAOD::CaloCluster_v1::getCellLinks
const CaloClusterCellLink * getCellLinks() const
Get a pointer to the CaloClusterCellLink object (const version)
Definition: CaloCluster_v1.cxx:905
eflowRingSubtractionManager
This stores information, a rank and ring thickness, about cell rings in an ordered way.
Definition: eflowRingSubtractionManager.h:31
eflowRecTrack::getTrack
const xAOD::TrackParticle * getTrack() const
Definition: eflowRecTrack.h:53
xAOD::TrackParticle_v1::e
virtual double e() const override final
The total energy of the particle.
Definition: TrackParticle_v1.cxx:109
eflowRecTrack::getTrackCaloPoints
const eflowTrackCaloPoints & getTrackCaloPoints() const
Definition: eflowRecTrack.h:55
eflowSubtract::Subtractor::makeOrderedCellList
static void makeOrderedCellList(const eflowTrackCaloPoints &trackCalo, const std::vector< std::pair< xAOD::CaloCluster *, bool >> &clusters, eflowCellList &orderedCells)
Definition: eflowSubtractor.cxx:51
xAOD::CaloCluster_v1::getOwnCellLinks
CaloClusterCellLink * getOwnCellLinks()
Get a pointer to the owned CaloClusterCellLink object (non-const version)
Definition: CaloCluster_v1.h:762
RunTileMonitoring.clusters
clusters
Definition: RunTileMonitoring.py:133
CaloClusterKineHelper::calculateKine
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.
Definition: CaloClusterKineHelper.cxx:223