ATLAS Offline Software
HIEventShapeFillerTool.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2023 CERN for the benefit of the ATLAS collaboration
3 */
4 
5 #ifndef HIGLOBAL_HIEVENTSHAPEFILLERTOOL_H
6 #define HIGLOBAL_HIEVENTSHAPEFILLERTOOL_H
7 
8 #include "AsgTools/AsgTool.h"
9 #include "GaudiKernel/ToolHandle.h"
17 
20 
21 class CaloCellContainer;
22 
24 {
26 
27 public:
28  HIEventShapeFillerTool(const std::string& myname);
29 
30  virtual StatusCode initializeIndex() override;
31  virtual StatusCode initializeEventShapeContainer(std::unique_ptr<xAOD::HIEventShapeContainer>& evtShape) const override;
32  virtual StatusCode fillCollectionFromTowers(std::unique_ptr<xAOD::HIEventShapeContainer>& evtShape, const SG::ReadHandleKey<xAOD::CaloClusterContainer>& tower_container_key, const SG::ReadHandleKey<INavigable4MomentumCollection>& navi_container_key, const EventContext& ctx) const override;
33  virtual StatusCode fillCollectionFromCells(std::unique_ptr<xAOD::HIEventShapeContainer>& evtShape, const SG::ReadHandleKey<CaloCellContainer>& cell_container_key, const EventContext& ctx) const override;
34 
35  virtual StatusCode fillCollectionFromTowerContainer(std::unique_ptr<xAOD::HIEventShapeContainer>& evtShape, const INavigable4MomentumCollection* navInColl) const;
36  virtual StatusCode fillCollectionFromCellContainer(std::unique_ptr<xAOD::HIEventShapeContainer>& evtShape, const CaloCellContainer* CellContainer) const;
37  virtual StatusCode fillCollectionFromClusterContainer(std::unique_ptr<xAOD::HIEventShapeContainer>& evtShape, const xAOD::CaloClusterContainer* theClusters, const EventContext& ctx) const;
38 
39 private:
41 
42  void updateShape(std::unique_ptr<xAOD::HIEventShapeContainer>& shape, const HIEventShapeIndex* index, const CaloCell* theCell, float geoWeight, float eta0, float phi0, bool isNeg = false) const;
43 
44  ToolHandle<IHITowerWeightTool> m_towerWeightTool{ this, "TowerWeightTool", "", "Handle to Tower Weight Tool" };
45  ToolHandle<IHIEventShapeMapTool> m_eventShapeMapTool{ this, "EventShapeMapTool", "HIEventShapeMapTool", "Handle to Event Shape Map Tool" };
46  Gaudi::Property< bool > m_useClusters{ this, "UseClusters", false, "use Clusters boolean switch" };
47  Gaudi::Property< int > m_numOrders{ this, "OrderOfFlowHarmonics", 7, "The number of Orders of harmonic flow to store in the EventShape" };
48 };
49 
50 #endif
ReadHandleKey.h
Property holding a SG store/key/clid from which a ReadHandle is made.
HIEventShapeMapTool.h
asg::AsgTool
Base class for the dual-use tool implementation classes.
Definition: AsgTool.h:47
HIEventShapeIndex.h
HIEventShapeFillerTool::fillCollectionFromClusterContainer
virtual StatusCode fillCollectionFromClusterContainer(std::unique_ptr< xAOD::HIEventShapeContainer > &evtShape, const xAOD::CaloClusterContainer *theClusters, const EventContext &ctx) const
Definition: HIEventShapeFillerTool.cxx:76
HIEventShapeFillerTool::fillCollectionFromCells
virtual StatusCode fillCollectionFromCells(std::unique_ptr< xAOD::HIEventShapeContainer > &evtShape, const SG::ReadHandleKey< CaloCellContainer > &cell_container_key, const EventContext &ctx) const override
Definition: HIEventShapeFillerTool.cxx:178
index
Definition: index.py:1
InDetAccessor::phi0
@ phi0
Definition: InDetAccessor.h:33
HIEventShapeFillerTool::m_numOrders
Gaudi::Property< int > m_numOrders
Definition: HIEventShapeFillerTool.h:47
SG::ReadHandleKey< xAOD::CaloClusterContainer >
HIEventShapeFillerTool::m_eventShapeMapTool
ToolHandle< IHIEventShapeMapTool > m_eventShapeMapTool
Definition: HIEventShapeFillerTool.h:45
HIEventShapeFillerTool::HIEventShapeFillerTool
HIEventShapeFillerTool(const std::string &myname)
Definition: HIEventShapeFillerTool.cxx:16
HIEventShapeFillerTool::fillCollectionFromTowerContainer
virtual StatusCode fillCollectionFromTowerContainer(std::unique_ptr< xAOD::HIEventShapeContainer > &evtShape, const INavigable4MomentumCollection *navInColl) const
Definition: HIEventShapeFillerTool.cxx:52
HITowerWeightTool.h
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
INavigable4MomentumCollection.h
IHIEventShapeFiller.h
HIEventShapeContainer.h
HIEventShapeFillerTool::m_index
const HIEventShapeIndex * m_index
Definition: HIEventShapeFillerTool.h:40
DataVector
Derived DataVector<T>.
Definition: DataVector.h:581
IHIEventShapeFiller
Definition: IHIEventShapeFiller.h:25
HIEventShapeFillerTool::m_useClusters
Gaudi::Property< bool > m_useClusters
Definition: HIEventShapeFillerTool.h:46
WriteHandleKey.h
Property holding a SG store/key/clid from which a WriteHandle is made.
HIEventShapeFillerTool::fillCollectionFromCellContainer
virtual StatusCode fillCollectionFromCellContainer(std::unique_ptr< xAOD::HIEventShapeContainer > &evtShape, const CaloCellContainer *CellContainer) const
Definition: HIEventShapeFillerTool.cxx:187
HIEventShapeIndex
Definition: HIEventShapeIndex.h:17
HIEventShapeFillerTool::updateShape
void updateShape(std::unique_ptr< xAOD::HIEventShapeContainer > &shape, const HIEventShapeIndex *index, const CaloCell *theCell, float geoWeight, float eta0, float phi0, bool isNeg=false) const
Definition: HIEventShapeFillerTool.cxx:195
CaloCellContainer
Container class for CaloCell.
Definition: CaloCellContainer.h:55
CaloCell
Data object for each calorimeter readout cell.
Definition: CaloCell.h:57
ASG_TOOL_CLASS
#define ASG_TOOL_CLASS(CLASSNAME, INT1)
Definition: AsgToolMacros.h:68
CaloClusterContainer.h
HIEventShapeFillerTool::fillCollectionFromTowers
virtual StatusCode fillCollectionFromTowers(std::unique_ptr< xAOD::HIEventShapeContainer > &evtShape, const SG::ReadHandleKey< xAOD::CaloClusterContainer > &tower_container_key, const SG::ReadHandleKey< INavigable4MomentumCollection > &navi_container_key, const EventContext &ctx) const override
Definition: HIEventShapeFillerTool.cxx:37
AsgTool.h
HIEventShapeFillerTool::m_towerWeightTool
ToolHandle< IHITowerWeightTool > m_towerWeightTool
Definition: HIEventShapeFillerTool.h:44
HIEventShapeFillerTool::initializeEventShapeContainer
virtual StatusCode initializeEventShapeContainer(std::unique_ptr< xAOD::HIEventShapeContainer > &evtShape) const override
Definition: HIEventShapeFillerTool.cxx:29
HIEventShapeFillerTool::initializeIndex
virtual StatusCode initializeIndex() override
Definition: HIEventShapeFillerTool.cxx:22
HIEventShapeFillerTool
Definition: HIEventShapeFillerTool.h:24