ATLAS Offline Software
Loading...
Searching...
No Matches
CaloClusterROIPhiRZContainerMaker.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 INDET_CALOCLUSTERROIPHIRZCOLLECTIONMAKER_H
6#define INDET_CALOCLUSTERROIPHIRZCOLLECTIONMAKER_H
7
9
12
15
18
20
22
23
24#include <atomic>
25
26namespace InDet {
27
33{
34 public:
35
36 CaloClusterROIPhiRZContainerMaker(const std::string& name, ISvcLocator* pSvcLocator);
37
39
40 StatusCode initialize() override;
41 StatusCode finalize() override;
42 StatusCode execute(const EventContext& ctx) const override;
43
44 private:
45
47 const CaloDetDescrManager &caloDDMgr) const
48 {
49 // Determine if we want to extrapolate to the barrel or endcap. If in the
50 // crack choose the detector with largest amount of energy in the second
51 // sampling layer
52 if (xAOD::EgammaHelpers::isBarrel(&cluster)) {
53 return m_calosurf->CreateUserSurface(CaloCell_ID::EMB2, 0., cluster.eta(), &caloDDMgr);
54 } else {
55 return m_calosurf->CreateUserSurface(CaloCell_ID::EME2, 0., cluster.eta(), &caloDDMgr);
56 }
57 }
58
60 const Trk::Surface &surf) ;
61
62 void addROI( const xAOD::CaloCluster &cluster,
63 const CaloDetDescrManager &caloDDMgr,
64 ROIPhiRZContainer &output_rois,
65 std::vector<uint_fast8_t> &max_output,
66 std::vector<unsigned int> &n_rois) const;
67
70 {this, "InputClusterContainerName", "egammaTopoCluster", "Input cluster for egamma objects"};
71
74 {this, "OutputROIContainerName", {}, "Output collection of eta ordered ROIs"};
75
80 { this,"CaloDetDescrManager", "CaloDetDescrManager", "SG Key for CaloDetDescrManager in the Condition Store" };
81
83 ToolHandle<ICaloSurfaceBuilder> m_calosurf
84 { this, "CaloSurfaceBuilder", "CaloSurfaceBuilder", "Tool to build calorimeter layer surfaces"};
85
87 ToolHandle<IegammaCaloClusterSelector> m_egammaCaloClusterSelector
88 {this, "egammaCaloClusterSelector", "egammaCaloClusterSelector","Tool that makes the cluster selection"};
89
90 Gaudi::Property< bool > m_EMEnergyOnly
91 {this, "EMEnergyOnly", false, "Only use EM energy as the ROI energy" };
92
93 Gaudi::Property< std::vector<float> > m_phiWidth
94 {this, "phiWidth", {} };
95
96 Gaudi::Property< std::vector<float> > m_minPtEm
97 {this, "minPt", {}, "Minimum pt of cluster ROIs (EMFraction corrected if EMEnerygOnly is set)."};
98
99 std::vector<unsigned int> m_outputIndex;
100 std::vector<unsigned int> m_outputSorted;
101 std::vector<unsigned int> m_outputUnsorted;
102 std::vector<float> m_sortedMinPtEm;
103 float m_maxPhiWidth = 0.0F;
104
105 mutable std::atomic_uint m_allClusters{0};
106 mutable std::atomic_uint m_selectedClusters{0};
107 mutable std::atomic_uint m_duplicateROI{0};
108 mutable std::atomic_uint m_maxNROIs{0};
109};
110
111} //End namespace
112#endif
Definition of CaloDetDescrManager.
An algorithm that can be simultaneously executed in multiple threads.
This class provides the client interface for accessing the detector description information common to...
static Trk::LocalParameters getClusterLocalParameters(const xAOD::CaloCluster &cluster, const Trk::Surface &surf)
StatusCode execute(const EventContext &ctx) const override
SG::WriteHandleKeyArray< ROIPhiRZContainer > m_outputClusterContainerName
Name of the ROI output collection.
const Trk::Surface * getCaloSurface(const xAOD::CaloCluster &cluster, const CaloDetDescrManager &caloDDMgr) const
Gaudi::Property< std::vector< float > > m_minPtEm
CaloClusterROIPhiRZContainerMaker(const std::string &name, ISvcLocator *pSvcLocator)
ToolHandle< ICaloSurfaceBuilder > m_calosurf
Tool to build calorimeter layer surfaces.
SG::ReadHandleKey< xAOD::CaloClusterContainer > m_inputClusterContainerName
Name of the cluster intput collection.
Gaudi::Property< std::vector< float > > m_phiWidth
SG::ReadCondHandleKey< CaloDetDescrManager > m_caloMgrKey
Name of the CaloDetDescrManager condition object.
void addROI(const xAOD::CaloCluster &cluster, const CaloDetDescrManager &caloDDMgr, ROIPhiRZContainer &output_rois, std::vector< uint_fast8_t > &max_output, std::vector< unsigned int > &n_rois) const
ToolHandle< IegammaCaloClusterSelector > m_egammaCaloClusterSelector
Tool to filter the calo clusters.
container for phi sorted ROIs defined by phi, r and z.
Property holding a SG store/key/clid from which a ReadHandle is made.
Abstract Base Class for tracking surfaces.
virtual double eta() const
The pseudorapidity ( ) of the particle.
Primary Vertex Finder.
HandleKeyArray< WriteHandle< T >, WriteHandleKey< T >, Gaudi::DataHandle::Writer > WriteHandleKeyArray
bool isBarrel(const xAOD::Egamma *eg)
return true if the cluster is in the barrel
CaloCluster_v1 CaloCluster
Define the latest version of the calorimeter cluster class.