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"
20 #include "eflowRec/eflowRecTrack.h"
23 
24 #include <vector>
25 
37 {
38 
39 public:
41 
42  double subtractCells(eflowRingSubtractionManager& ringSubtractionManager,
43  eflowRecTrack& theTrack,
44  xAOD::CaloCluster* tracksClus,
45  eflowCellList& orderedCells,
46  bool& annFlag, const bool& addCPData) const;
47  double subtractCells(
48  eflowRingSubtractionManager& ringSubtractionManager,
49  eflowRecTrack& theTrack,
50  std::vector<std::pair<xAOD::CaloCluster*, bool>>& tracksClus,
51  eflowCellList& orderedCells,
52  bool& annFlag, const bool& addCPData) const;
53 
54 private:
56  xAOD::CaloCluster* thisCluster,
57  const CaloCell* thisCell);
58 
59  static void updateClusterKinematics(
60  std::vector<std::pair<xAOD::CaloCluster*, bool>>& tracksClusters);
62 
63  static double getTotalEnergy(
64  const std::vector<std::pair<xAOD::CaloCluster*, bool>>& tracksClusters);
65 
66  static double getRingsEnergy(
67  std::vector<std::pair<xAOD::CaloCluster*, bool>>& tracksClusters,
68  CellIt beginRing,
69  CellIt endRing);
70 
72  std::vector<std::pair<xAOD::CaloCluster*, bool>>& tracksClusters,
73  CellIt beginRing,
74  CellIt endRing,
75  double targetRingEnergy,
76  double eRing, eflowRecTrack& theTrack,
77  const bool& addCPData) const;
78 
79  void subtractFullRings(
80  std::vector<std::pair<xAOD::CaloCluster*, bool>>& tracksClusters,
81  CellIt beginRing,
82  CellIt endRing, eflowRecTrack& theTrack,
83  const bool& addCPData) const;
84 
85  bool subtractRings(
86  eflowRingSubtractionManager& ringSubtractionManager,
87  const std::pair<eflowCaloENUM, short>& ring,
88  double& eSubtracted,
89  const double eExpect,
90  eflowCellList& orderedCells,
91  std::vector<std::pair<xAOD::CaloCluster*, bool>>& tracksClusters,
92  bool& annFlag, eflowRecTrack& theTrack,
93  const bool& addCPData) const;
94 
95  static bool subtractCaloCell(double& eSubtracted,
96  const double eExpect,
97  xAOD::CaloCluster* cluster,
98  const CaloCell* cell,
99  eflowRecTrack& theTrack,
100  const bool& addCPData);
101 
102  static void annihilateClusters(
103  std::vector<std::pair<xAOD::CaloCluster*, bool>>& tracksClusters, bool& annFlag,
104  eflowRecTrack& theTrack, const bool& addCPData) ;
105 
106  static bool subtractReorderedCells(
107  std::vector<std::pair<xAOD::CaloCluster*, bool>>& tracksClusters,
108  double eSubtracted,
109  const double eExpect,
110  eflowCellList& orderedCells,
111  eflowRecTrack& theTrack,
112  const bool& addCPData);
113 };
114 #endif
eflowCellSubtractionFacilitator::getTotalEnergy
static double getTotalEnergy(const std::vector< std::pair< xAOD::CaloCluster *, bool >> &tracksClusters)
Definition: eflowCellSubtractionFacilitator.cxx:60
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, eflowRecTrack &theTrack, const bool &addCPData) const
Definition: eflowCellSubtractionFacilitator.cxx:178
eflowCellSubtractionFacilitator::subtractReorderedCells
static bool subtractReorderedCells(std::vector< std::pair< xAOD::CaloCluster *, bool >> &tracksClusters, double eSubtracted, const double eExpect, eflowCellList &orderedCells, eflowRecTrack &theTrack, const bool &addCPData)
Definition: eflowCellSubtractionFacilitator.cxx:293
eflowCellSubtractionFacilitator::subtractCaloCell
static bool subtractCaloCell(double &eSubtracted, const double eExpect, xAOD::CaloCluster *cluster, const CaloCell *cell, eflowRecTrack &theTrack, const bool &addCPData)
Definition: eflowCellSubtractionFacilitator.cxx:251
ReadCellNoiseFromCool.cell
cell
Definition: ReadCellNoiseFromCool.py:53
PFRunESDtoAOD_TruthCheating_mc20e.addCPData
addCPData
Definition: PFRunESDtoAOD_TruthCheating_mc20e.py:15
eflowCellSubtractionFacilitator::subtractPartialRings
void subtractPartialRings(std::vector< std::pair< xAOD::CaloCluster *, bool >> &tracksClusters, CellIt beginRing, CellIt endRing, double targetRingEnergy, double eRing, eflowRecTrack &theTrack, const bool &addCPData) const
Definition: eflowCellSubtractionFacilitator.cxx:118
eflowCellList
Concrete class derived class from pure virtual eflowAbstractCellList.
Definition: eflowCellList.h:42
eflowCellSubtractionFacilitator::annihilateClusters
static void annihilateClusters(std::vector< std::pair< xAOD::CaloCluster *, bool >> &tracksClusters, bool &annFlag, eflowRecTrack &theTrack, const bool &addCPData)
Definition: eflowCellSubtractionFacilitator.cxx:96
eflowRecTrack
This class extends the information about a xAOD::Track.
Definition: eflowRecTrack.h:46
AsgMessaging.h
eflowCellSubtractionFacilitator::eflowCellSubtractionFacilitator
eflowCellSubtractionFacilitator()
Definition: eflowCellSubtractionFacilitator.cxx:19
eflowRecTrack.h
xAOD::CaloCluster_v1
Description of a calorimeter cluster.
Definition: CaloCluster_v1.h:59
CaloCluster.h
eflowCellSubtractionFacilitator
This class deals with the removal of calorimeter cells from calorimeter clusters.
Definition: eflowCellSubtractionFacilitator.h:37
eflowCellSubtractionFacilitator::getRingsEnergy
static double getRingsEnergy(std::vector< std::pair< xAOD::CaloCluster *, bool >> &tracksClusters, CellIt beginRing, CellIt endRing)
Definition: eflowCellSubtractionFacilitator.cxx:71
eflowCellSubtractionFacilitator::subtractCells
double subtractCells(eflowRingSubtractionManager &ringSubtractionManager, eflowRecTrack &theTrack, xAOD::CaloCluster *tracksClus, eflowCellList &orderedCells, bool &annFlag, const bool &addCPData) const
Definition: eflowCellSubtractionFacilitator.cxx:24
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
eflowCellSubtractionFacilitator::subtractFullRings
void subtractFullRings(std::vector< std::pair< xAOD::CaloCluster *, bool >> &tracksClusters, CellIt beginRing, CellIt endRing, eflowRecTrack &theTrack, const bool &addCPData) const
Definition: eflowCellSubtractionFacilitator.cxx:151
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::getCellIterator
static CaloClusterCellLink::iterator getCellIterator(xAOD::CaloCluster *thisCluster, const CaloCell *thisCell)
Definition: eflowCellSubtractionFacilitator.cxx:394