ATLAS Offline Software
Public Member Functions | Private Attributes | List of all members
PFMomentCalculatorTool Class Reference

This tool uses a CaloClusterCollectionProcessor to calculate new moments for the modified calorimeter clusters (modified when we do the charged shower subtraction), and makes use of IPFClusterCollectionTool to generate a VIEW container of xAOD::CaloCluster to be used in the CaloClusterCollectionProcessor tool. More...

#include <PFMomentCalculatorTool.h>

Inheritance diagram for PFMomentCalculatorTool:
Collaboration diagram for PFMomentCalculatorTool:

Public Member Functions

 PFMomentCalculatorTool (const std::string &type, const std::string &name, const IInterface *parent)
 
 ~PFMomentCalculatorTool ()
 
virtual StatusCode initialize () override
 
virtual StatusCode execute (eflowCaloObjectContainer &theEflowCaloObjectContainer) override
 
virtual StatusCode finalize () override
 

Private Attributes

ToolHandle< IPFClusterCollectionToolm_clusterCollectionTool {this,"PFClusterCollectionTool","eflowRecClusterCollectionTool","Tool to put all clusters into a temporary container - then we use this to calculate moments, some of which depend on configuration of nearby clusters"}
 Tool to put all clusters into a temporary container - then we use this to calculate moments, some of which depend on configuration of nearby clusters. More...
 
ToolHandle< CaloClusterCollectionProcessorm_clusterMomentsMaker {this,"CaloClusterMomentsMaker","CaloClusterMomentsMaker","Tool to calculate cluster moments"}
 Tool to calculate cluster moments. More...
 
ToolHandle< CaloClusterCollectionProcessorm_clusterCalibHitMomentsMaker2 {this,"CaloCalibClusterMomentsMaker2","CaloCalibClusterMomentsMaker2","Tool to calculate calibration hit cluster moments"}
 Tool to calculate calibration hit truth cluster moments. More...
 
Gaudi::Property< bool > m_LCMode {this,"LCMode",false,"Toggle whether we are in LC mode - false by default"}
 Toggle whether we are in LC mode - false by default. More...
 
Gaudi::Property< bool > m_useCalibHitTruth {this,"UseCalibHitTruth",false,"Toggle usage of calibration hit truth - false by default"}
 Toggle usage of calibration hit truth - false by default. More...
 

Detailed Description

This tool uses a CaloClusterCollectionProcessor to calculate new moments for the modified calorimeter clusters (modified when we do the charged shower subtraction), and makes use of IPFClusterCollectionTool to generate a VIEW container of xAOD::CaloCluster to be used in the CaloClusterCollectionProcessor tool.

Inherits from IPFBaseAlgTool.

Definition at line 20 of file PFMomentCalculatorTool.h.

Constructor & Destructor Documentation

◆ PFMomentCalculatorTool()

PFMomentCalculatorTool::PFMomentCalculatorTool ( const std::string &  type,
const std::string &  name,
const IInterface *  parent 
)

Definition at line 11 of file PFMomentCalculatorTool.cxx.

11  :
12  base_class( type, name, parent)
13 {
14 }

◆ ~PFMomentCalculatorTool()

PFMomentCalculatorTool::~PFMomentCalculatorTool ( )
inline

Definition at line 26 of file PFMomentCalculatorTool.h.

26 {}

Member Function Documentation

◆ execute()

StatusCode PFMomentCalculatorTool::execute ( eflowCaloObjectContainer theEflowCaloObjectContainer)
overridevirtual

Definition at line 31 of file PFMomentCalculatorTool.cxx.

31  {
32 
33  /* Collect all the clusters in a temporary container (with VIEW_ELEMENTS!) */
34  bool useNonModifiedClusters = true;
35  if (true == m_LCMode) useNonModifiedClusters = false;
36  std::unique_ptr<xAOD::CaloClusterContainer> tempClusterContainer = m_clusterCollectionTool->execute(theEflowCaloObjectContainer, useNonModifiedClusters);
37 
38  /* Set the layer energies */
39  /* This must be set before the cluster moment calculations, which use the layer energies */
40  for (auto cluster : *tempClusterContainer) CaloClusterKineHelper::calculateKine(cluster, true, true);
41 
42  /* Remake the cluster moments */
43  ATH_CHECK(m_clusterMomentsMaker->execute(tempClusterContainer.get()));
44 
45  if (m_useCalibHitTruth){
46  ATH_CHECK(m_clusterCalibHitMomentsMaker2->execute(tempClusterContainer.get()));
47  }
48 
49  return StatusCode::SUCCESS;
50 }

◆ finalize()

StatusCode PFMomentCalculatorTool::finalize ( )
overridevirtual

Definition at line 52 of file PFMomentCalculatorTool.cxx.

52 { return StatusCode::SUCCESS; }

◆ initialize()

StatusCode PFMomentCalculatorTool::initialize ( )
overridevirtual

Definition at line 16 of file PFMomentCalculatorTool.cxx.

16  {
17 
18  /* Retrieve the cluster collection tool */
20 
21  /* Retrieve the cluster moments maker */
22  ATH_CHECK(m_clusterMomentsMaker.retrieve());
23 
24  /* Retrieve the cluster calib hit moments maker */
26  else m_clusterCalibHitMomentsMaker2.disable();
27 
28  return StatusCode::SUCCESS;
29 }

Member Data Documentation

◆ m_clusterCalibHitMomentsMaker2

ToolHandle<CaloClusterCollectionProcessor> PFMomentCalculatorTool::m_clusterCalibHitMomentsMaker2 {this,"CaloCalibClusterMomentsMaker2","CaloCalibClusterMomentsMaker2","Tool to calculate calibration hit cluster moments"}
private

Tool to calculate calibration hit truth cluster moments.

Definition at line 41 of file PFMomentCalculatorTool.h.

◆ m_clusterCollectionTool

ToolHandle<IPFClusterCollectionTool> PFMomentCalculatorTool::m_clusterCollectionTool {this,"PFClusterCollectionTool","eflowRecClusterCollectionTool","Tool to put all clusters into a temporary container - then we use this to calculate moments, some of which depend on configuration of nearby clusters"}
private

Tool to put all clusters into a temporary container - then we use this to calculate moments, some of which depend on configuration of nearby clusters.

Definition at line 35 of file PFMomentCalculatorTool.h.

◆ m_clusterMomentsMaker

ToolHandle<CaloClusterCollectionProcessor> PFMomentCalculatorTool::m_clusterMomentsMaker {this,"CaloClusterMomentsMaker","CaloClusterMomentsMaker","Tool to calculate cluster moments"}
private

Tool to calculate cluster moments.

Definition at line 38 of file PFMomentCalculatorTool.h.

◆ m_LCMode

Gaudi::Property<bool> PFMomentCalculatorTool::m_LCMode {this,"LCMode",false,"Toggle whether we are in LC mode - false by default"}
private

Toggle whether we are in LC mode - false by default.

Definition at line 44 of file PFMomentCalculatorTool.h.

◆ m_useCalibHitTruth

Gaudi::Property<bool> PFMomentCalculatorTool::m_useCalibHitTruth {this,"UseCalibHitTruth",false,"Toggle usage of calibration hit truth - false by default"}
private

Toggle usage of calibration hit truth - false by default.

Definition at line 47 of file PFMomentCalculatorTool.h.


The documentation for this class was generated from the following files:
PFMomentCalculatorTool::m_clusterCollectionTool
ToolHandle< IPFClusterCollectionTool > m_clusterCollectionTool
Tool to put all clusters into a temporary container - then we use this to calculate moments,...
Definition: PFMomentCalculatorTool.h:35
PFMomentCalculatorTool::m_clusterCalibHitMomentsMaker2
ToolHandle< CaloClusterCollectionProcessor > m_clusterCalibHitMomentsMaker2
Tool to calculate calibration hit truth cluster moments.
Definition: PFMomentCalculatorTool.h:41
test_pyathena.parent
parent
Definition: test_pyathena.py:15
ATH_CHECK
#define ATH_CHECK
Definition: AthCheckMacros.h:40
PFMomentCalculatorTool::m_LCMode
Gaudi::Property< bool > m_LCMode
Toggle whether we are in LC mode - false by default.
Definition: PFMomentCalculatorTool.h:44
PFMomentCalculatorTool::m_clusterMomentsMaker
ToolHandle< CaloClusterCollectionProcessor > m_clusterMomentsMaker
Tool to calculate cluster moments.
Definition: PFMomentCalculatorTool.h:38
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:195
python.CaloScaleNoiseConfig.type
type
Definition: CaloScaleNoiseConfig.py:78
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
PFMomentCalculatorTool::m_useCalibHitTruth
Gaudi::Property< bool > m_useCalibHitTruth
Toggle usage of calibration hit truth - false by default.
Definition: PFMomentCalculatorTool.h:47