ATLAS Offline Software
Loading...
Searching...
No Matches
PFUnifiedMomentCalculatorTool 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 <PFUnifiedMomentCalculatorTool.h>

Inheritance diagram for PFUnifiedMomentCalculatorTool:
Collaboration diagram for PFUnifiedMomentCalculatorTool:

Public Member Functions

 PFUnifiedMomentCalculatorTool (const std::string &type, const std::string &name, const IInterface *parent)
 ~PFUnifiedMomentCalculatorTool ()
virtual StatusCode initialize () override
virtual StatusCode processPFlowData (const EventContext &ctx, PFData &thePFData) const 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.
ToolHandle< CaloClusterCollectionProcessorm_clusterMomentsMaker {this,"CaloClusterMomentsMaker","CaloClusterMomentsMaker","Tool to calculate cluster moments"}
 Tool to calculate cluster moments.
ToolHandle< CaloClusterCollectionProcessorm_clusterCalibHitMomentsMaker2 {this,"CaloCalibClusterMomentsMaker2","CaloCalibClusterMomentsMaker2","Tool to calculate calibration hit cluster moments"}
 Tool to calculate calibration hit truth cluster moments.
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.
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.

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 19 of file PFUnifiedMomentCalculatorTool.h.

Constructor & Destructor Documentation

◆ PFUnifiedMomentCalculatorTool()

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

Definition at line 12 of file PFUnifiedMomentCalculatorTool.cxx.

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

◆ ~PFUnifiedMomentCalculatorTool()

PFUnifiedMomentCalculatorTool::~PFUnifiedMomentCalculatorTool ( )
inline

Definition at line 25 of file PFUnifiedMomentCalculatorTool.h.

25{}

Member Function Documentation

◆ initialize()

StatusCode PFUnifiedMomentCalculatorTool::initialize ( )
overridevirtual

Definition at line 17 of file PFUnifiedMomentCalculatorTool.cxx.

17 {
18
19 /* Retrieve the cluster collection tool */
21
22 /* Retrieve the cluster moments maker */
24
25 /* Retrieve the cluster calib hit moments maker */
27 else m_clusterCalibHitMomentsMaker2.disable();
28
29 return StatusCode::SUCCESS;
30}
#define ATH_CHECK
Evaluate an expression and check for errors.
Gaudi::Property< bool > m_useCalibHitTruth
Toggle usage of calibration hit truth - false by default.
ToolHandle< CaloClusterCollectionProcessor > m_clusterMomentsMaker
Tool to calculate cluster moments.
ToolHandle< IPFClusterCollectionTool > m_clusterCollectionTool
Tool to put all clusters into a temporary container - then we use this to calculate moments,...
ToolHandle< CaloClusterCollectionProcessor > m_clusterCalibHitMomentsMaker2
Tool to calculate calibration hit truth cluster moments.

◆ processPFlowData()

StatusCode PFUnifiedMomentCalculatorTool::processPFlowData ( const EventContext & ctx,
PFData & thePFData ) const
overridevirtual

Definition at line 32 of file PFUnifiedMomentCalculatorTool.cxx.

32 {
33
34 if (!thePFData.caloObjects) {
35 ATH_MSG_ERROR("PFData::caloObjects is null; caller must set it before invoking the moment calculator tool");
36 return StatusCode::FAILURE;
37 }
38
39 eflowCaloObjectContainer *theEflowCaloObjectContainer = thePFData.caloObjects;
40
41 /* Collect all the clusters in a temporary container (with VIEW_ELEMENTS!) */
42 bool useNonModifiedClusters = true;
43 if (true == m_LCMode) useNonModifiedClusters = false;
44 std::unique_ptr<xAOD::CaloClusterContainer> tempClusterContainer = m_clusterCollectionTool->execute(*theEflowCaloObjectContainer, useNonModifiedClusters);
45
46 /* Set the layer energies */
47 /* This must be set before the cluster moment calculations, which use the layer energies */
48 for (auto cluster : *tempClusterContainer) CaloClusterKineHelper::calculateKine(cluster, true, true);
49
50 /* Remake the cluster moments */
51 ATH_CHECK(m_clusterMomentsMaker->execute(ctx, tempClusterContainer.get()));
52
54 ATH_CHECK(m_clusterCalibHitMomentsMaker2->execute(ctx, tempClusterContainer.get()));
55 }
56
57 return StatusCode::SUCCESS;
58}
#define ATH_MSG_ERROR(x)
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.
Gaudi::Property< bool > m_LCMode
Toggle whether we are in LC mode - false by default.
eflowCaloObjectContainer * caloObjects
Definition PFData.h:17

Member Data Documentation

◆ m_clusterCalibHitMomentsMaker2

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

Tool to calculate calibration hit truth cluster moments.

Definition at line 39 of file PFUnifiedMomentCalculatorTool.h.

39{this,"CaloCalibClusterMomentsMaker2","CaloCalibClusterMomentsMaker2","Tool to calculate calibration hit cluster moments"};

◆ m_clusterCollectionTool

ToolHandle<IPFClusterCollectionTool> PFUnifiedMomentCalculatorTool::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 33 of file PFUnifiedMomentCalculatorTool.h.

33{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"};

◆ m_clusterMomentsMaker

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

Tool to calculate cluster moments.

Definition at line 36 of file PFUnifiedMomentCalculatorTool.h.

36{this,"CaloClusterMomentsMaker","CaloClusterMomentsMaker","Tool to calculate cluster moments"};

◆ m_LCMode

Gaudi::Property<bool> PFUnifiedMomentCalculatorTool::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 42 of file PFUnifiedMomentCalculatorTool.h.

42{this,"LCMode",false,"Toggle whether we are in LC mode - false by default"};

◆ m_useCalibHitTruth

Gaudi::Property<bool> PFUnifiedMomentCalculatorTool::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 45 of file PFUnifiedMomentCalculatorTool.h.

45{this,"UseCalibHitTruth",false,"Toggle usage of calibration hit truth - false by default"};\

The documentation for this class was generated from the following files: