ATLAS Offline Software
eflowCellSubtractionFacilitator.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration
3 */
4 
5 #ifndef EFLOWCELLSUBTRACTIONFACILITATOR_H
6 #define EFLOWCELLSUBTRACTIONFACILITATOR_H
7 
8 /********************************************************************
9 
10 NAME: eflowCellSubtractionFacilitator.h
11 PACKAGE: offline/Reconstruction/eflowRec
12 
13 AUTHORS: M.Hodgkinson
14 CREATED: 3rd February 2009
15 
16 ********************************************************************/
17 
19 #include "eflowRec/eflowCellList.h"
22 
23 #include <vector>
24 
36 {
37 
38 public:
40 
41  double subtractCells(eflowRingSubtractionManager& ringSubtractionManager,
42  double trackEnergy,
43  xAOD::CaloCluster* tracksClus,
44  eflowCellList& orderedCells,
45  bool& annFlag) const;
46  double subtractCells(
47  eflowRingSubtractionManager& ringSubtractionManager,
48  double trackEnergy,
49  std::vector<std::pair<xAOD::CaloCluster*, bool>>& tracksClus,
50  eflowCellList& orderedCells,
51  bool& annFlag) const;
52 
53 private:
55  xAOD::CaloCluster* thisCluster,
56  const CaloCell* thisCell);
57 
58  static void updateClusterKinematics(
59  std::vector<std::pair<xAOD::CaloCluster*, bool>>& tracksClusters);
61 
62  static double getTotalEnergy(
63  const std::vector<std::pair<xAOD::CaloCluster*, bool>>& tracksClusters);
64 
65  static double getRingsEnergy(
66  std::vector<std::pair<xAOD::CaloCluster*, bool>>& tracksClusters,
67  CellIt beginRing,
68  CellIt endRing);
69 
71  std::vector<std::pair<xAOD::CaloCluster*, bool>>& tracksClusters,
72  CellIt beginRing,
73  CellIt endRing,
74  double targetRingEnergy,
75  double eRing) const;
76 
77  void subtractFullRings(
78  std::vector<std::pair<xAOD::CaloCluster*, bool>>& tracksClusters,
79  CellIt beginRing,
80  CellIt endRing) const;
81 
82  bool subtractRings(
83  eflowRingSubtractionManager& ringSubtractionManager,
84  const std::pair<eflowCaloENUM, short>& ring,
85  double& eSubtracted,
86  const double eExpect,
87  eflowCellList& orderedCells,
88  std::vector<std::pair<xAOD::CaloCluster*, bool>>& tracksClusters,
89  bool& annFlag) const;
90 
91  static bool subtractCaloCell(double& eSubtracted,
92  const double eExpect,
93  xAOD::CaloCluster* cluster,
94  const CaloCell* cell);
95 
96  static void annihilateClusters(
97  std::vector<std::pair<xAOD::CaloCluster*, bool>>& tracksClusters, bool& annFlag) ;
98 
99  static bool subtractReorderedCells(
100  std::vector<std::pair<xAOD::CaloCluster*, bool>>& tracksClusters,
101  double eSubtracted,
102  const double eExpect,
103  eflowCellList& orderedCells);
104 };
105 #endif
eflowCellSubtractionFacilitator::getTotalEnergy
static double getTotalEnergy(const std::vector< std::pair< xAOD::CaloCluster *, bool >> &tracksClusters)
Definition: eflowCellSubtractionFacilitator.cxx:60
ReadCellNoiseFromCool.cell
cell
Definition: ReadCellNoiseFromCool.py:53
eflowCellSubtractionFacilitator::subtractPartialRings
void subtractPartialRings(std::vector< std::pair< xAOD::CaloCluster *, bool >> &tracksClusters, CellIt beginRing, CellIt endRing, double targetRingEnergy, double eRing) const
Definition: eflowCellSubtractionFacilitator.cxx:115
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
AsgMessaging.h
eflowCellSubtractionFacilitator::eflowCellSubtractionFacilitator
eflowCellSubtractionFacilitator()
Definition: eflowCellSubtractionFacilitator.cxx:19
eflowCellSubtractionFacilitator::subtractRings
bool subtractRings(eflowRingSubtractionManager &ringSubtractionManager, const std::pair< eflowCaloENUM, short > &ring, double &eSubtracted, const double eExpect, eflowCellList &orderedCells, std::vector< std::pair< xAOD::CaloCluster *, bool >> &tracksClusters, bool &annFlag) const
Definition: eflowCellSubtractionFacilitator.cxx:169
xAOD::CaloCluster_v1
Description of a calorimeter cluster.
Definition: CaloCluster_v1.h:59
eflowCellSubtractionFacilitator::subtractReorderedCells
static bool subtractReorderedCells(std::vector< std::pair< xAOD::CaloCluster *, bool >> &tracksClusters, double eSubtracted, const double eExpect, eflowCellList &orderedCells)
Definition: eflowCellSubtractionFacilitator.cxx:278
CaloCluster.h
eflowCellSubtractionFacilitator
This class deals with the removal of calorimeter cells from calorimeter clusters.
Definition: eflowCellSubtractionFacilitator.h:36
eflowCellSubtractionFacilitator::getRingsEnergy
static double getRingsEnergy(std::vector< std::pair< xAOD::CaloCluster *, bool >> &tracksClusters, CellIt beginRing, CellIt endRing)
Definition: eflowCellSubtractionFacilitator.cxx:71
eflowCellSubtractionFacilitator::annihilateClusters
static void annihilateClusters(std::vector< std::pair< xAOD::CaloCluster *, bool >> &tracksClusters, bool &annFlag)
Definition: eflowCellSubtractionFacilitator.cxx:96
eflowCellSubtractionFacilitator::subtractFullRings
void subtractFullRings(std::vector< std::pair< xAOD::CaloCluster *, bool >> &tracksClusters, CellIt beginRing, CellIt endRing) const
Definition: eflowCellSubtractionFacilitator.cxx:145
eflowRingSubtractionManager.h
eflowCellList.h
eflowRingSubtractionManager
This stores information, a rank and ring thickness, about cell rings in an ordered way.
Definition: eflowRingSubtractionManager.h:31
eflowCellSubtractionFacilitator::updateClusterKinematics
static void updateClusterKinematics(std::vector< std::pair< xAOD::CaloCluster *, bool >> &tracksClusters)
Definition: eflowCellSubtractionFacilitator.cxx:38
asg::AsgMessaging
Class mimicking the AthMessaging class from the offline software.
Definition: AsgMessaging.h:40
CellIt
std::map< eflowCellPosition, std::vector< std::pair< const CaloCell *, int > > >::iterator CellIt
Definition: eflowAbstractCellList.h:25
CaloCell
Data object for each calorimeter readout cell.
Definition: CaloCell.h:57
eflowCellSubtractionFacilitator::subtractCaloCell
static bool subtractCaloCell(double &eSubtracted, const double eExpect, xAOD::CaloCluster *cluster, const CaloCell *cell)
Definition: eflowCellSubtractionFacilitator.cxx:241
eflowCellSubtractionFacilitator::getCellIterator
static CaloClusterCellLink::iterator getCellIterator(xAOD::CaloCluster *thisCluster, const CaloCell *thisCell)
Definition: eflowCellSubtractionFacilitator.cxx:374