ATLAS Offline Software
PFSubtractionTool.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 PFSUBTRACTIONTOOL_H
6 #define PFSUBTRACTIONTOOL_H
7 
9 #include "GaudiKernel/ToolHandle.h"
10 
12 #include "eflowRec/EtaPhiLUT.h"
14 #include "eflowRec/PFData.h"
24 
25 
26 
32 
33 class PFSubtractionTool : public extends<AthAlgTool, IPFSubtractionTool>
34 {
35 
36 public:
37  PFSubtractionTool(const std::string &type, const std::string &name, const IInterface *parent);
39 
41  void execute(eflowCaloObjectContainer *theEflowCaloObjectContainer, eflowRecTrackContainer *recTrackContainer, eflowRecClusterContainer *recClusterContainer) const;
43 
44 private:
45 
47  unsigned int matchAndCreateEflowCaloObj(PFData &data) const;
48 
49  void performSubtraction(const unsigned int& startingPoint,PFData &data) const;
50  void performSubtraction(eflowCaloObject& thisEflowCaloObject) const;
51 
52  bool isEOverPFail(double expectedEnergy, double sigma, double clusterEnergy) const;
53 
54  bool canAnnihilate(double expectedEnergy, double sigma, double clusterEnergy) const;
55 
56  static std::string printTrack(const xAOD::TrackParticle* track);
57  static std::string printCluster(const xAOD::CaloCluster* cluster);
58  void printAllClusters(const eflowRecClusterContainer& recClusterContainer) const;
59 
61  ToolHandle<IEFlowCellEOverPTool> m_theEOverPTool{this, "eflowCellEOverPTool", "eflowCellEOverPTool", "Energy Flow E/P Values and Shower Parameters Tool"};
62 
63  std::unique_ptr<eflowEEtaBinnedParameters> m_binnedParameters;
64 
66  std::unique_ptr<PFMatch::TrackEtaPhiInFixedLayersProvider> m_trkpos;
67 
69  ToolHandle<PFTrackClusterMatchingTool> m_theMatchingTool{this, "PFTrackClusterMatchingTool", "PFTrackClusterMatchingTool/CalObjBldMatchingTool", "The track-cluster matching tool"};
70 
71  /* Track-cluster matching tools for calculating the pull */
72  ToolHandle<PFTrackClusterMatchingTool> m_theMatchingToolForPull_015{this, "PFTrackClusterMatchingTool_015", "PFTrackClusterMatchingTool/PFPullMatchingTool_015", "The 0.15 track-cluster matching tool to calculate the pull"};
73  ToolHandle<PFTrackClusterMatchingTool> m_theMatchingToolForPull_02{this, "PFTrackClusterMatchingTool_02", "PFTrackClusterMatchingTool/PFPullMatchingTool_02", "The 0.2 track-cluster matching tool to calculate the pull"};
74 
76  Gaudi::Property<bool> m_recoverSplitShowers{this,"RecoverSplitShowers",false,"Toggle whether we are recovering split showers or not"};
77 
79  Gaudi::Property<int> m_nClusterMatchesToUse{this, "nClusterMatchesToUse", 1, "Number of clusters to match to each track"};
80 
82  Gaudi::Property<bool> m_isHLLHC{this, "isHLLHC", false, "Toggle whether we have the HLLHC setup"};
83 
85  Gaudi::Property<bool> m_calcEOverP{this, "CalcEOverP", false, "Toggle EOverP algorithm mode, whereby no charged shower subtraction is performed"};
86 
88  Gaudi::Property<double> m_consistencySigmaCut{this, "ConsistencySigmaCut", 1.0, "Parameter that controls whether a track, in a track-cluster system, will be processed by the split shower recovery algorithm"};
89 
91  Gaudi::Property<double> m_subtractionSigmaCut{this, "SubtractionSigmaCut", 1.5, "Parameter that controls whether to use retain remaining calorimeter energy in track-cluster system, after charged shower subtraction"};
92 
94  Gaudi::Property<bool> m_addCPData{this,"addCPData",false,"Toggle whether to decorate FlowElements with addutional data for Combined Performance studies "};
95 
96  //Helpers
101 
103  ToolHandle<PFEnergyPredictorTool> m_NNEnergyPredictorTool{this, "NNEnergyPredictorTool", "","Tool for getting predictiing the energy using an ONNX model "};
104 
106  Gaudi::Property<bool> m_useNNEnergy{this, "useNNEnergy", false, "Toggle whether we use the neural net energy"};
107 
113  Gaudi::Property<bool> m_useLegacyEBinIndex{this, "useLegacyEBinIndex", true, "Toggle whether we use the legacy energy bin index"};
114 
115 };
116 
117 #endif
data
char data[hepevt_bytes_allocation_ATLAS]
Definition: HepEvt.cxx:11
eflowEEtaBinnedParameters
Inherits from eflowEEtaBinBase.
Definition: eflowEEtaBinnedParameters.h:56
pdg_comparison.sigma
sigma
Definition: pdg_comparison.py:324
IPFSubtractionTool.h
PFSubtractionTool::m_isHLLHC
Gaudi::Property< bool > m_isHLLHC
Toggle whether we have the HLLHC setup.
Definition: PFSubtractionTool.h:82
PFSubtractionTool::m_subtractor
eflowSubtract::Subtractor m_subtractor
Definition: PFSubtractionTool.h:100
PFData.h
PFSubtractionTool::m_NNEnergyPredictorTool
ToolHandle< PFEnergyPredictorTool > m_NNEnergyPredictorTool
Tool for getting predictiing the energy using an ONNX model.
Definition: PFSubtractionTool.h:103
IEFlowCellEOverPTool
Pure virtual base class, from which concrete classes inherit and define reference e/p mean and widths...
Definition: IEFlowCellEOverPTool.h:30
eflowRecClusterContainer
Definition: eflowRecCluster.h:275
eflowSubtractor.h
PFCalcRadialEnergyProfiles
Definition: PFCalcRadialEnergyProfiles.h:13
PFSubtractionTool::m_consistencySigmaCut
Gaudi::Property< double > m_consistencySigmaCut
Parameter that controls whether a track, in a track-cluster system, will be processed by the split sh...
Definition: PFSubtractionTool.h:88
PFSubtractionTool::m_trkpos
std::unique_ptr< PFMatch::TrackEtaPhiInFixedLayersProvider > m_trkpos
Track position provider to be used to preselect clusters.
Definition: PFSubtractionTool.h:66
PFSubtractionTool::matchAndCreateEflowCaloObj
unsigned int matchAndCreateEflowCaloObj(PFData &data) const
This matches ID tracks and CaloClusters, and then creates eflowCaloObjects.
Definition: PFSubtractionTool.cxx:83
eflowCaloObject
An internal EDM object which stores information about systems of associated tracks and calorimeter cl...
Definition: eflowCaloObject.h:33
PFCalcRadialEnergyProfiles.h
PFSubtractionStatusSetter
This class contains a few functions to set the amount of energy removed from a xAOD::CaloCluster by a...
Definition: PFSubtractionStatusSetter.h:20
PFSubtractionTool::m_pfSubtractionStatusSetter
PFSubtractionStatusSetter m_pfSubtractionStatusSetter
Definition: PFSubtractionTool.h:98
PFSubtractionTool::m_theEOverPTool
ToolHandle< IEFlowCellEOverPTool > m_theEOverPTool
Tool for getting e/p values and hadronic shower cell ordering principle parameters.
Definition: PFSubtractionTool.h:61
PFSubtractionTool::m_useNNEnergy
Gaudi::Property< bool > m_useNNEnergy
Toggle whether we use the neural net energy.
Definition: PFSubtractionTool.h:106
xAOD::CaloCluster_v1
Description of a calorimeter cluster.
Definition: CaloCluster_v1.h:59
PFSubtractionTool::execute
void execute(eflowCaloObjectContainer *theEflowCaloObjectContainer, eflowRecTrackContainer *recTrackContainer, eflowRecClusterContainer *recClusterContainer) const
Definition: PFSubtractionTool.cxx:52
PFSubtractionTool::m_nClusterMatchesToUse
Gaudi::Property< int > m_nClusterMatchesToUse
Number of clusters to match to each track if not doing recover split shower subtraction.
Definition: PFSubtractionTool.h:79
PFSubtractionTool::printAllClusters
void printAllClusters(const eflowRecClusterContainer &recClusterContainer) const
Definition: PFSubtractionTool.cxx:442
PFSubtractionTool::isEOverPFail
bool isEOverPFail(double expectedEnergy, double sigma, double clusterEnergy) const
Definition: PFSubtractionTool.cxx:419
PFSubtractionTool::m_pfCalc
PFCalcRadialEnergyProfiles m_pfCalc
Definition: PFSubtractionTool.h:97
CaloCluster.h
PFSubtractionTool::performSubtraction
void performSubtraction(const unsigned int &startingPoint, PFData &data) const
Definition: PFSubtractionTool.cxx:217
PFSubtractionStatusSetter.h
eflowSubtract::Subtractor
Used in eflowCellLevelSubtractionTool and eflowRecoverSplitShowersTool to perform the removal of calo...
Definition: eflowSubtractor.h:35
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
PFSubtractionTool::initialize
StatusCode initialize()
Definition: PFSubtractionTool.cxx:23
PFSubtractionTool::PFSubtractionTool
PFSubtractionTool(const std::string &type, const std::string &name, const IInterface *parent)
Definition: PFSubtractionTool.cxx:15
PFSubtractionTool::m_theMatchingToolForPull_02
ToolHandle< PFTrackClusterMatchingTool > m_theMatchingToolForPull_02
Definition: PFSubtractionTool.h:73
PFTrackClusterMatchingTool.h
AthAlgTool.h
PFSubtractionTool::m_calcEOverP
Gaudi::Property< bool > m_calcEOverP
Toggle EOverP algorithm mode, whereby no charged shower subtraction is performed.
Definition: PFSubtractionTool.h:85
test_pyathena.parent
parent
Definition: test_pyathena.py:15
PFSubtractionTool::~PFSubtractionTool
~PFSubtractionTool()
PFEnergyPredictorTool.h
PFData
Definition: PFData.h:11
PFSubtractionTool
Definition: PFSubtractionTool.h:34
PFSubtractionTool::m_pfSubtractionEnergyRatioCalculator
PFSubtractionEnergyRatioCalculator m_pfSubtractionEnergyRatioCalculator
Definition: PFSubtractionTool.h:99
PFSubtractionTool::m_recoverSplitShowers
Gaudi::Property< bool > m_recoverSplitShowers
Toggle whether we are recovering split showers or not.
Definition: PFSubtractionTool.h:76
PFSubtractionTool::m_useLegacyEBinIndex
Gaudi::Property< bool > m_useLegacyEBinIndex
Further discussion about why this flag exists can be found in https://its.cern.ch/jira/browse/ATLJETM...
Definition: PFSubtractionTool.h:113
PFSubtractionTool::printTrack
static std::string printTrack(const xAOD::TrackParticle *track)
Definition: PFSubtractionTool.cxx:430
EtaPhiLUT.h
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:195
eflowCaloObject.h
PFSubtractionTool::m_subtractionSigmaCut
Gaudi::Property< double > m_subtractionSigmaCut
Parameter that controls whether to use retain remaining calorimeter energy in track-cluster system,...
Definition: PFSubtractionTool.h:91
PFSubtractionTool::canAnnihilate
bool canAnnihilate(double expectedEnergy, double sigma, double clusterEnergy) const
Definition: PFSubtractionTool.cxx:425
eflowRecTrackContainer
Definition: eflowRecTrack.h:194
TrackParticle.h
PFSubtractionTool::m_theMatchingTool
ToolHandle< PFTrackClusterMatchingTool > m_theMatchingTool
Default track-cluster matching tool.
Definition: PFSubtractionTool.h:69
PFSubtractionTool::printCluster
static std::string printCluster(const xAOD::CaloCluster *cluster)
Definition: PFSubtractionTool.cxx:436
PFSubtractionEnergyRatioCalculator
Class to calculate the ratio of new to old energies of CaloClusters after the particle flow charged s...
Definition: PFSubtractionEnergyRatioCalculator.h:20
python.CaloScaleNoiseConfig.type
type
Definition: CaloScaleNoiseConfig.py:78
PFMatchPositions.h
PFSubtractionEnergyRatioCalculator.h
PFSubtractionTool::m_binnedParameters
std::unique_ptr< eflowEEtaBinnedParameters > m_binnedParameters
Definition: PFSubtractionTool.h:63
PFSubtractionTool::m_theMatchingToolForPull_015
ToolHandle< PFTrackClusterMatchingTool > m_theMatchingToolForPull_015
Definition: PFSubtractionTool.h:72
PFSubtractionTool::finalize
StatusCode finalize()
Definition: PFSubtractionTool.cxx:458
xAOD::track
@ track
Definition: TrackingPrimitives.h:512
xAOD::TrackParticle_v1
Class describing a TrackParticle.
Definition: TrackParticle_v1.h:43
eflowCaloObjectContainer
Definition: eflowCaloObject.h:100
PFSubtractionTool::m_addCPData
Gaudi::Property< bool > m_addCPData
Toggle whether to decorate eflowRecTrack with addutional data for Combined Performance studies.
Definition: PFSubtractionTool.h:94