ATLAS Offline Software
Loading...
Searching...
No Matches
InDet::CaloClusterROIPhiRZContainerMaker Class Reference

Algorithm to create a eta ordered ROIs in the eta phi plane. More...

#include <CaloClusterROIPhiRZContainerMaker.h>

Inheritance diagram for InDet::CaloClusterROIPhiRZContainerMaker:
Collaboration diagram for InDet::CaloClusterROIPhiRZContainerMaker:

Public Member Functions

 CaloClusterROIPhiRZContainerMaker (const std::string &name, ISvcLocator *pSvcLocator)
 ~CaloClusterROIPhiRZContainerMaker ()
StatusCode initialize () override
StatusCode finalize () override
StatusCode execute (const EventContext &ctx) const override
virtual StatusCode sysInitialize () override
 Override sysInitialize.
virtual bool isClonable () const override
 Specify if the algorithm is clonable.
virtual unsigned int cardinality () const override
 Cardinality (Maximum number of clones that can exist) special value 0 means that algorithm is reentrant.
virtual StatusCode sysExecute (const EventContext &ctx) override
 Execute an algorithm.
virtual const DataObjIDColl & extraOutputDeps () const override
 Return the list of extra output dependencies.
virtual bool filterPassed (const EventContext &ctx) const
virtual void setFilterPassed (bool state, const EventContext &ctx) const
ServiceHandle< StoreGateSvc > & evtStore ()
 The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc.
const ServiceHandle< StoreGateSvc > & detStore () const
 The standard StoreGateSvc/DetectorStore Returns (kind of) a pointer to the StoreGateSvc.
virtual StatusCode sysStart () override
 Handle START transition.
virtual std::vector< Gaudi::DataHandle * > inputHandles () const override
 Return this algorithm's input handles.
virtual std::vector< Gaudi::DataHandle * > outputHandles () const override
 Return this algorithm's output handles.
Gaudi::Details::PropertyBase & declareProperty (Gaudi::Property< T, V, H > &t)
void updateVHKA (Gaudi::Details::PropertyBase &)
MsgStream & msg () const
bool msgLvl (const MSG::Level lvl) const

Protected Member Functions

void renounceArray (SG::VarHandleKeyArray &handlesArray)
 remove all handles from I/O resolution
std::enable_if_t< std::is_void_v< std::result_of_t< decltype(&T::renounce)(T)> > &&!std::is_base_of_v< SG::VarHandleKeyArray, T > &&std::is_base_of_v< Gaudi::DataHandle, T >, void > renounce (T &h)
void extraDeps_update_handler (Gaudi::Details::PropertyBase &ExtraDeps)
 Add StoreName to extra input/output deps as needed.

Private Types

typedef ServiceHandle< StoreGateSvcStoreGateSvc_t

Private Member Functions

const Trk::SurfacegetCaloSurface (const xAOD::CaloCluster &cluster, const CaloDetDescrManager &caloDDMgr) const
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
Gaudi::Details::PropertyBase & declareGaudiProperty (Gaudi::Property< T, V, H > &hndl, const SG::VarHandleKeyType &)
 specialization for handling Gaudi::Property<SG::VarHandleKey>

Static Private Member Functions

static Trk::LocalParameters getClusterLocalParameters (const xAOD::CaloCluster &cluster, const Trk::Surface &surf)

Private Attributes

SG::ReadHandleKey< xAOD::CaloClusterContainerm_inputClusterContainerName {this, "InputClusterContainerName", "egammaTopoCluster", "Input cluster for egamma objects"}
 Name of the cluster intput collection.
SG::WriteHandleKeyArray< ROIPhiRZContainerm_outputClusterContainerName {this, "OutputROIContainerName", {}, "Output collection of eta ordered ROIs"}
 Name of the ROI output collection.
SG::ReadCondHandleKey< CaloDetDescrManagerm_caloMgrKey { this,"CaloDetDescrManager", "CaloDetDescrManager", "SG Key for CaloDetDescrManager in the Condition Store" }
 Name of the CaloDetDescrManager condition object.
ToolHandle< ICaloSurfaceBuilderm_calosurf { this, "CaloSurfaceBuilder", "CaloSurfaceBuilder", "Tool to build calorimeter layer surfaces"}
 Tool to build calorimeter layer surfaces.
ToolHandle< IegammaCaloClusterSelectorm_egammaCaloClusterSelector {this, "egammaCaloClusterSelector", "egammaCaloClusterSelector","Tool that makes the cluster selection"}
 Tool to filter the calo clusters.
Gaudi::Property< bool > m_EMEnergyOnly {this, "EMEnergyOnly", false, "Only use EM energy as the ROI energy" }
Gaudi::Property< std::vector< float > > m_phiWidth {this, "phiWidth", {} }
Gaudi::Property< std::vector< float > > m_minPtEm {this, "minPt", {}, "Minimum pt of cluster ROIs (EMFraction corrected if EMEnerygOnly is set)."}
std::vector< unsigned int > m_outputIndex
std::vector< unsigned int > m_outputSorted
std::vector< unsigned int > m_outputUnsorted
std::vector< float > m_sortedMinPtEm
float m_maxPhiWidth = 0.0F
std::atomic_uint m_allClusters {0}
std::atomic_uint m_selectedClusters {0}
std::atomic_uint m_duplicateROI {0}
std::atomic_uint m_maxNROIs {0}
DataObjIDColl m_extendedExtraObjects
 Extra output dependency collection, extended by AthAlgorithmDHUpdate to add symlinks.
StoreGateSvc_t m_evtStore
 Pointer to StoreGate (event store by default)
StoreGateSvc_t m_detStore
 Pointer to StoreGate (detector store by default)
std::vector< SG::VarHandleKeyArray * > m_vhka
bool m_varHandleArraysDeclared

Detailed Description

Algorithm to create a eta ordered ROIs in the eta phi plane.

The algorithm creates ROIs ordered by eta in the eta phi plane from selected calorimer clusters.

Definition at line 32 of file CaloClusterROIPhiRZContainerMaker.h.

Member Typedef Documentation

◆ StoreGateSvc_t

typedef ServiceHandle<StoreGateSvc> AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::StoreGateSvc_t
privateinherited

Definition at line 388 of file AthCommonDataStore.h.

Constructor & Destructor Documentation

◆ CaloClusterROIPhiRZContainerMaker()

InDet::CaloClusterROIPhiRZContainerMaker::CaloClusterROIPhiRZContainerMaker ( const std::string & name,
ISvcLocator * pSvcLocator )

Definition at line 24 of file CaloClusterROIPhiRZContainerMaker.cxx.

25 :
26 AthReentrantAlgorithm(name, pSvcLocator)
27{
28}

◆ ~CaloClusterROIPhiRZContainerMaker()

InDet::CaloClusterROIPhiRZContainerMaker::~CaloClusterROIPhiRZContainerMaker ( )
default

Member Function Documentation

◆ addROI()

void InDet::CaloClusterROIPhiRZContainerMaker::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
private

Definition at line 225 of file CaloClusterROIPhiRZContainerMaker.cxx.

229 {
230
231 double energy = cluster.e();
232
233 // do we want to make energy be EM energy only?
234 if (m_EMEnergyOnly) {
235 static const SG::AuxElement::ConstAccessor<float> acc("EMFraction");
236 double emFrac(0.);
237 if (acc.isAvailable(cluster)) {
238 emFrac = acc(cluster);
240 emFrac)) {
241 ATH_MSG_ERROR("EM energy requested, but No EM fraction momement stored");
242 return;
243 }
244 energy *= emFrac;
245 }
246
247 std::unique_ptr<const Trk::Surface> surface( getCaloSurface(cluster, caloDDMgr) );
248 if (!surface) {
249 ATH_MSG_ERROR( "Failed to create surface for cluster");
250 return;
251 }
252
253 const Trk::LocalParameters localParams( getClusterLocalParameters(cluster, *surface) );
254
255 Amg::Vector3D global_position( surface->localToGlobal( localParams) );
256 double et = energy * std::sin(global_position.theta());
257 if ( et >= m_sortedMinPtEm[0]){
258 unsigned int roi_idx=output_rois.size();
259 output_rois.addROI(global_position, m_maxPhiWidth);
260
261 unsigned int n_duplicates = output_rois.size()-roi_idx-1;
262 if (n_duplicates>0) {
263 m_duplicateROI += n_duplicates;
264 }
265
266 unsigned int output_idx=0;
267 for ( ; output_idx<m_outputIndex.size(); ++output_idx) {
268 if (et < m_sortedMinPtEm[output_idx]) break;
269 n_rois[output_idx] += n_duplicates+1;
270 }
271 // addROI may duplicate the ROI at phi - 2 pi
272 // So, have to set the last output_idx for all newly added ROIs
273 if (max_output.size() < output_rois.size()) {
274 max_output.resize (output_rois.size());
275 }
276 for (; roi_idx < output_rois.size(); ++roi_idx) {
277 max_output[roi_idx]=output_idx;
278 }
279
280 }
281 else {
282 ATH_MSG_DEBUG("Skip selected cluster " << energy << " * " << std::sin(global_position.theta()) << " = " << energy * std::sin(global_position.theta())<< " >= " << m_sortedMinPtEm[0] );
283 }
284}
#define ATH_MSG_ERROR(x)
#define ATH_MSG_DEBUG(x)
float et(const xAOD::jFexSRJetRoI *j)
static Trk::LocalParameters getClusterLocalParameters(const xAOD::CaloCluster &cluster, const Trk::Surface &surf)
const Trk::Surface * getCaloSurface(const xAOD::CaloCluster &cluster, const CaloDetDescrManager &caloDDMgr) const
void addROI(const Amg::Vector3D &global_position, float roi_phi_width)
bool retrieveMoment(MomentType type, double &value) const
Retrieve individual moment.
virtual double e() const
The total energy of the particle.
@ ENG_FRAC_EM
Energy fraction in EM calorimeters.
Eigen::Matrix< double, 3, 1 > Vector3D

◆ cardinality()

unsigned int AthCommonReentrantAlgorithm< Gaudi::Algorithm >::cardinality ( ) const
overridevirtualinherited

Cardinality (Maximum number of clones that can exist) special value 0 means that algorithm is reentrant.

Override this to return 0 for reentrant algorithms.

Definition at line 75 of file AthCommonReentrantAlgorithm.cxx.

64{
65 return 0;
66}

◆ declareGaudiProperty()

Gaudi::Details::PropertyBase & AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::declareGaudiProperty ( Gaudi::Property< T, V, H > & hndl,
const SG::VarHandleKeyType &  )
inlineprivateinherited

specialization for handling Gaudi::Property<SG::VarHandleKey>

Definition at line 156 of file AthCommonDataStore.h.

158 {
160 hndl.value(),
161 hndl.documentation());
162
163 }
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T, V, H > &t)

◆ declareProperty()

Gaudi::Details::PropertyBase & AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::declareProperty ( Gaudi::Property< T, V, H > & t)
inlineinherited

Definition at line 145 of file AthCommonDataStore.h.

145 {
146 typedef typename SG::HandleClassifier<T>::type htype;
148 }
Gaudi::Details::PropertyBase & declareGaudiProperty(Gaudi::Property< T, V, H > &hndl, const SG::VarHandleKeyType &)
specialization for handling Gaudi::Property<SG::VarHandleKey>

◆ detStore()

const ServiceHandle< StoreGateSvc > & AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::detStore ( ) const
inlineinherited

The standard StoreGateSvc/DetectorStore Returns (kind of) a pointer to the StoreGateSvc.

Definition at line 95 of file AthCommonDataStore.h.

◆ evtStore()

ServiceHandle< StoreGateSvc > & AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::evtStore ( )
inlineinherited

The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc.

Definition at line 85 of file AthCommonDataStore.h.

◆ execute()

StatusCode InDet::CaloClusterROIPhiRZContainerMaker::execute ( const EventContext & ctx) const
override

Definition at line 99 of file CaloClusterROIPhiRZContainerMaker.cxx.

100{
101
102 if (m_inputClusterContainerName.key().empty()) {
103 return StatusCode::SUCCESS;
104 }
105
106 // retrieve cluster containers, return `failure' if not existing
107 SG::ReadHandle<xAOD::CaloClusterContainer> inputClusterContainer(m_inputClusterContainerName,ctx);
108 ATH_CHECK(inputClusterContainer.isValid());
109
110 SG::ReadCondHandle<CaloDetDescrManager> caloMgrHandle{m_caloMgrKey,ctx};
111 ATH_CHECK(caloMgrHandle.isValid());
112 const CaloDetDescrManager *caloMgr = caloMgrHandle.cptr();
113
114 unsigned int all_clusters{};
115 unsigned int selected_clusters{};
116 ROIPhiRZContainer rois; // temporary ROI container
117 std::vector<unsigned int > n_rois; // number of ROIs per output container
118 n_rois.resize(m_outputIndex.size(),0);
119
120 std::vector<uint8_t > max_output;// the outputs are ordered by the pt-cut, this is the index of the last output which passed the pt-cut per ROI
121 rois.reserve( inputClusterContainer->size());
122 max_output.resize(inputClusterContainer->size());
123
124 // create ROIs.
125 // first they are only stored in the temporary container
126 for(const xAOD::CaloCluster* cluster : *inputClusterContainer )
127 {
128 all_clusters++;
129 if (m_egammaCaloClusterSelector->passSelection(cluster,*caloMgr))
130 {
131 selected_clusters++;
132 addROI(*cluster, *caloMgr, rois, max_output, n_rois);
133 }
134 }
135 // This may happen if a ROI close to +-pi gets duplicated...
136 // so don't warn. See ATLASRECTS-7160.
137 //if (rois.size() > inputClusterContainer->size() ) {
138 // ATH_MSG_INFO( "Did not reserve enough storage for " << m_outputClusterContainerName[m_outputIndex[0]].key() );
139 //}
140
141
142 // create ROI output container
143 std::vector< SG::WriteHandle<ROIPhiRZContainer> > output_rois;
144 output_rois.reserve(m_outputIndex.size());
145 for (unsigned int output_idx : m_outputIndex) {
146 unsigned int the_size = n_rois[output_rois.size()];
147 output_rois.emplace_back( m_outputClusterContainerName[output_idx], ctx);
148 ATH_CHECK( output_rois.back().record( std::make_unique<ROIPhiRZContainer>() ) );
149 output_rois.back()->reserve( the_size);
150 }
151
152 if (!m_outputSorted.empty()) {
153 // sort ROIs by phi
154 std::vector<unsigned int> roi_order;
155 roi_order.reserve( rois.size() );
156 for (unsigned int idx=0; idx< rois.size(); ++idx) { roi_order.push_back( idx ); }
157 std::sort(roi_order.begin(),roi_order.end(),[&rois](unsigned int a, unsigned int b) { return rois[a][0] < rois[b][0]; });
158 // copy ROIs in sort order to output container which are to be sorted
159 for (unsigned int roi_i : roi_order) {
160 for (unsigned int output_i : m_outputSorted) {
161 if (output_i>=max_output[roi_i]) break;
162 output_rois[output_i]->push_back( rois[ roi_i ] );
163 }
164 }
165 }
166
167 // copy ROIs in original order to output container which should have the original order
168 // also remove duplicates
169 if (!m_outputUnsorted.empty()) {
170 for (unsigned int roi_unordered_i=0; roi_unordered_i < rois.size(); ++roi_unordered_i) {
171 for (unsigned int output_i : m_outputUnsorted) {
172 if (output_i>=max_output[roi_unordered_i]) break;
173 if (std::abs(rois[ roi_unordered_i ][0])<PI_F or (rois[ roi_unordered_i ][0] == PI_F)) {
174 output_rois[output_i]->push_back( rois[ roi_unordered_i ] );
175 }
176 }
177 }
178 }
179
180 // gather statistics
181 {
182 unsigned int max_size;
183 do {
184 max_size = m_maxNROIs;
185 } while (rois.size()>max_size && ! m_maxNROIs.compare_exchange_weak(max_size, rois.size()));
186 }
187 m_allClusters += all_clusters;
188 m_selectedClusters += selected_clusters;
189 return StatusCode::SUCCESS;
190}
#define ATH_CHECK
Evaluate an expression and check for errors.
static Double_t a
SG::WriteHandleKeyArray< ROIPhiRZContainer > m_outputClusterContainerName
Name of the ROI output collection.
SG::ReadHandleKey< xAOD::CaloClusterContainer > m_inputClusterContainerName
Name of the cluster intput collection.
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.
const_pointer_type cptr()
void sort(typename DataModel_detail::iterator< DVL > beg, typename DataModel_detail::iterator< DVL > end)
Specialization of sort for DataVector/List.
CaloCluster_v1 CaloCluster
Define the latest version of the calorimeter cluster class.

◆ extraDeps_update_handler()

void AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::extraDeps_update_handler ( Gaudi::Details::PropertyBase & ExtraDeps)
protectedinherited

Add StoreName to extra input/output deps as needed.

use the logic of the VarHandleKey to parse the DataObjID keys supplied via the ExtraInputs and ExtraOuputs Properties to add the StoreName if it's not explicitly given

◆ extraOutputDeps()

const DataObjIDColl & AthCommonReentrantAlgorithm< Gaudi::Algorithm >::extraOutputDeps ( ) const
overridevirtualinherited

Return the list of extra output dependencies.

This list is extended to include symlinks implied by inheritance relations.

Definition at line 94 of file AthCommonReentrantAlgorithm.cxx.

90{
91 // If we didn't find any symlinks to add, just return the collection
92 // from the base class. Otherwise, return the extended collection.
93 if (!m_extendedExtraObjects.empty()) {
95 }
97}
An algorithm that can be simultaneously executed in multiple threads.

◆ filterPassed()

virtual bool AthCommonReentrantAlgorithm< Gaudi::Algorithm >::filterPassed ( const EventContext & ctx) const
inlinevirtualinherited

Definition at line 96 of file AthCommonReentrantAlgorithm.h.

96 {
97 return execState( ctx ).filterPassed();
98 }
virtual bool filterPassed(const EventContext &ctx) const

◆ finalize()

StatusCode InDet::CaloClusterROIPhiRZContainerMaker::finalize ( )
override

Definition at line 88 of file CaloClusterROIPhiRZContainerMaker.cxx.

89{
90 //
91 // finalize method
92 //
93 ATH_MSG_DEBUG ("AllClusters " << m_allClusters << " selected " << m_selectedClusters << " max ROIs per event " << m_maxNROIs);
94
95 return StatusCode::SUCCESS;
96}

◆ getCaloSurface()

const Trk::Surface * InDet::CaloClusterROIPhiRZContainerMaker::getCaloSurface ( const xAOD::CaloCluster & cluster,
const CaloDetDescrManager & caloDDMgr ) const
inlineprivate

Definition at line 46 of file CaloClusterROIPhiRZContainerMaker.h.

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 }
ToolHandle< ICaloSurfaceBuilder > m_calosurf
Tool to build calorimeter layer surfaces.
virtual double eta() const
The pseudorapidity ( ) of the particle.
bool isBarrel(const xAOD::Egamma *eg)
return true if the cluster is in the barrel

◆ getClusterLocalParameters()

Trk::LocalParameters InDet::CaloClusterROIPhiRZContainerMaker::getClusterLocalParameters ( const xAOD::CaloCluster & cluster,
const Trk::Surface & surf )
staticprivate

Definition at line 192 of file CaloClusterROIPhiRZContainerMaker.cxx.

194{
195
196 Amg::Vector3D surfRefPoint = surf.globalReferencePoint();
197
198 double eta = cluster.eta();
199 double theta = 2 * atan(exp(-eta)); // -log(tan(theta/2));
200 double tantheta = tan(theta);
201 double phi = cluster.phi();
202
203 if (xAOD::EgammaHelpers::isBarrel(&cluster)) {
204 // Two corindate in a cyclinder are
205 // Trk::locRPhi = 0 (ie phi)
206 // Trk::locZ = 1(ie z)
207 double r = surfRefPoint.perp();
208 double z = tantheta == 0 ? 0. : r / tantheta;
211 return Trk::LocalParameters(locRPhi, locZ);
212 } else {
213 // Local paramters of a disk are
214 // Trk::locR = 0
215 // Trk::locPhi = 1
216 double z = surfRefPoint.z();
217 double r = z * tantheta;
220 return Trk::LocalParameters(locR, locPhi);
221 }
222}
Scalar eta() const
pseudorapidity method
Scalar phi() const
phi method
Scalar theta() const
theta method
#define z
virtual const Amg::Vector3D & globalReferencePoint() const
Returns a global reference point on the surface, for PlaneSurface, StraightLineSurface,...
virtual double phi() const
The azimuthal angle ( ) of the particle.
int r
Definition globals.cxx:22
@ locR
Definition ParamDefs.h:44
@ locRPhi
Definition ParamDefs.h:40
@ locZ
local cylindrical
Definition ParamDefs.h:42
@ locPhi
local polar
Definition ParamDefs.h:45
std::pair< double, ParamDefs > DefinedParameter
Typedef to of a std::pair<double, ParamDefs> to identify a passed-through double as a specific type o...

◆ initialize()

StatusCode InDet::CaloClusterROIPhiRZContainerMaker::initialize ( )
override

Definition at line 35 of file CaloClusterROIPhiRZContainerMaker.cxx.

36{
38 ATH_CHECK( m_calosurf.retrieve() );
39 ATH_CHECK( m_caloMgrKey.initialize() );
40
41 if (m_outputClusterContainerName.empty()) {
42 ATH_MSG_FATAL( "No OutputROIContainerName given.");
43 return StatusCode::FAILURE;
44 }
45 if (m_outputClusterContainerName.size() > std::numeric_limits<uint8_t>::max()) {
46 ATH_MSG_FATAL( "Too many OutputROIContainerNames given.");
47 return StatusCode::FAILURE;
48 }
49 if (m_minPtEm.size() != m_phiWidth.size() || m_minPtEm.size() != m_outputClusterContainerName.size() ) {
50 ATH_MSG_FATAL( "Number of entries in minPt, phiWidth must match number of entries in OutputROIContainerName.");
51 return StatusCode::FAILURE;
52 }
53 m_outputIndex.reserve(m_minPtEm.size());
55 for (unsigned int idx=0; idx<m_minPtEm.size(); ++idx) {
56 m_outputIndex.push_back(idx);
58 }
59 std::sort(m_outputIndex.begin(),m_outputIndex.end(), [this](unsigned int idx_a, unsigned int idx_b) { return this->m_minPtEm[idx_a] < this->m_minPtEm[idx_b];});
60 m_sortedMinPtEm.reserve( m_outputIndex.size());
61 for (unsigned int idx : m_outputIndex) {
62 m_sortedMinPtEm.push_back( m_minPtEm[idx] );
63 }
64
67
70 m_outputSorted.reserve( m_outputIndex.size() );
71 m_outputUnsorted.reserve( m_outputIndex.size() );
72 for (unsigned int output_i=0; output_i<m_outputIndex.size(); ++output_i) {
73 if (m_phiWidth[m_outputIndex[output_i]]>0.) {
74 m_outputSorted.push_back(output_i);
75 }
76 else {
77 m_outputUnsorted.push_back(output_i);
78 }
79 ATH_MSG_DEBUG( "ROIPhiRZ container " << m_outputClusterContainerName[ m_outputIndex[output_i] ]
80 << " : " << m_minPtEm[m_outputIndex[output_i] ] << " MeV " << ( m_phiWidth[m_outputIndex[output_i]]>0. ? " order by phi " : " unordered" ) );
81 }
82 return StatusCode::SUCCESS;
83}
#define ATH_MSG_FATAL(x)
Gaudi::Property< std::vector< float > > m_minPtEm
Gaudi::Property< std::vector< float > > m_phiWidth

◆ inputHandles()

virtual std::vector< Gaudi::DataHandle * > AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::inputHandles ( ) const
overridevirtualinherited

Return this algorithm's input handles.

We override this to include handle instances from key arrays if they have not yet been declared. See comments on updateVHKA.

◆ isClonable()

◆ msg()

MsgStream & AthCommonMsg< Gaudi::Algorithm >::msg ( ) const
inlineinherited

Definition at line 24 of file AthCommonMsg.h.

24 {
25 return this->msgStream();
26 }

◆ msgLvl()

bool AthCommonMsg< Gaudi::Algorithm >::msgLvl ( const MSG::Level lvl) const
inlineinherited

Definition at line 30 of file AthCommonMsg.h.

30 {
31 return this->msgLevel(lvl);
32 }

◆ outputHandles()

virtual std::vector< Gaudi::DataHandle * > AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::outputHandles ( ) const
overridevirtualinherited

Return this algorithm's output handles.

We override this to include handle instances from key arrays if they have not yet been declared. See comments on updateVHKA.

◆ renounce()

std::enable_if_t< std::is_void_v< std::result_of_t< decltype(&T::renounce)(T)> > &&!std::is_base_of_v< SG::VarHandleKeyArray, T > &&std::is_base_of_v< Gaudi::DataHandle, T >, void > AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::renounce ( T & h)
inlineprotectedinherited

Definition at line 380 of file AthCommonDataStore.h.

381 {
382 h.renounce();
384 }
std::enable_if_t< std::is_void_v< std::result_of_t< decltype(&T::renounce)(T)> > &&!std::is_base_of_v< SG::VarHandleKeyArray, T > &&std::is_base_of_v< Gaudi::DataHandle, T >, void > renounce(T &h)

◆ renounceArray()

void AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::renounceArray ( SG::VarHandleKeyArray & handlesArray)
inlineprotectedinherited

remove all handles from I/O resolution

Definition at line 364 of file AthCommonDataStore.h.

364 {
366 }

◆ setFilterPassed()

virtual void AthCommonReentrantAlgorithm< Gaudi::Algorithm >::setFilterPassed ( bool state,
const EventContext & ctx ) const
inlinevirtualinherited

Definition at line 100 of file AthCommonReentrantAlgorithm.h.

100 {
102 }
virtual void setFilterPassed(bool state, const EventContext &ctx) const

◆ sysExecute()

StatusCode AthCommonReentrantAlgorithm< Gaudi::Algorithm >::sysExecute ( const EventContext & ctx)
overridevirtualinherited

Execute an algorithm.

We override this in order to work around an issue with the Algorithm base class storing the event context in a member variable that can cause crashes in MT jobs.

Definition at line 85 of file AthCommonReentrantAlgorithm.cxx.

77{
78 return BaseAlg::sysExecute (ctx);
79}

◆ sysInitialize()

StatusCode AthCommonReentrantAlgorithm< Gaudi::Algorithm >::sysInitialize ( )
overridevirtualinherited

Override sysInitialize.

Override sysInitialize from the base class.

Loop through all output handles, and if they're WriteCondHandles, automatically register them and this Algorithm with the CondSvc

Scan through all outputHandles, and if they're WriteCondHandles, register them with the CondSvc

Reimplemented from AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >.

Reimplemented in HypoBase, and InputMakerBase.

Definition at line 61 of file AthCommonReentrantAlgorithm.cxx.

107 {
109
110 if (sc.isFailure()) {
111 return sc;
112 }
113
114 ServiceHandle<ICondSvc> cs("CondSvc",name());
115 for (auto h : outputHandles()) {
116 if (h->isCondition() && h->mode() == Gaudi::DataHandle::Writer) {
117 // do this inside the loop so we don't create the CondSvc until needed
118 if ( cs.retrieve().isFailure() ) {
119 ATH_MSG_WARNING("no CondSvc found: won't autoreg WriteCondHandles");
120 return StatusCode::SUCCESS;
121 }
122 if (cs->regHandle(this,*h).isFailure()) {
124 ATH_MSG_ERROR("unable to register WriteCondHandle " << h->fullKey()
125 << " with CondSvc");
126 }
127 }
128 }
129 return sc;
130}
#define ATH_MSG_WARNING(x)
virtual std::vector< Gaudi::DataHandle * > outputHandles() const override

◆ sysStart()

virtual StatusCode AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::sysStart ( )
overridevirtualinherited

Handle START transition.

We override this in order to make sure that conditions handle keys can cache a pointer to the conditions container.

◆ updateVHKA()

void AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::updateVHKA ( Gaudi::Details::PropertyBase & )
inlineinherited

Definition at line 308 of file AthCommonDataStore.h.

308 {
309 // debug() << "updateVHKA for property " << p.name() << " " << p.toString()
310 // << " size: " << m_vhka.size() << endmsg;
311 for (auto &a : m_vhka) {
313 for (auto k : keys) {
314 k->setOwner(this);
315 }
316 }
317 }

Member Data Documentation

◆ m_allClusters

std::atomic_uint InDet::CaloClusterROIPhiRZContainerMaker::m_allClusters {0}
mutableprivate

Definition at line 105 of file CaloClusterROIPhiRZContainerMaker.h.

105{0};

◆ m_caloMgrKey

SG::ReadCondHandleKey<CaloDetDescrManager> InDet::CaloClusterROIPhiRZContainerMaker::m_caloMgrKey { this,"CaloDetDescrManager", "CaloDetDescrManager", "SG Key for CaloDetDescrManager in the Condition Store" }
private

Name of the CaloDetDescrManager condition object.

Definition at line 79 of file CaloClusterROIPhiRZContainerMaker.h.

80{ this,"CaloDetDescrManager", "CaloDetDescrManager", "SG Key for CaloDetDescrManager in the Condition Store" };

◆ m_calosurf

ToolHandle<ICaloSurfaceBuilder> InDet::CaloClusterROIPhiRZContainerMaker::m_calosurf { this, "CaloSurfaceBuilder", "CaloSurfaceBuilder", "Tool to build calorimeter layer surfaces"}
private

Tool to build calorimeter layer surfaces.

Definition at line 83 of file CaloClusterROIPhiRZContainerMaker.h.

84{ this, "CaloSurfaceBuilder", "CaloSurfaceBuilder", "Tool to build calorimeter layer surfaces"};

◆ m_detStore

StoreGateSvc_t AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::m_detStore
privateinherited

Pointer to StoreGate (detector store by default)

Definition at line 393 of file AthCommonDataStore.h.

◆ m_duplicateROI

std::atomic_uint InDet::CaloClusterROIPhiRZContainerMaker::m_duplicateROI {0}
mutableprivate

Definition at line 107 of file CaloClusterROIPhiRZContainerMaker.h.

107{0};

◆ m_egammaCaloClusterSelector

ToolHandle<IegammaCaloClusterSelector> InDet::CaloClusterROIPhiRZContainerMaker::m_egammaCaloClusterSelector {this, "egammaCaloClusterSelector", "egammaCaloClusterSelector","Tool that makes the cluster selection"}
private

Tool to filter the calo clusters.

Definition at line 87 of file CaloClusterROIPhiRZContainerMaker.h.

88{this, "egammaCaloClusterSelector", "egammaCaloClusterSelector","Tool that makes the cluster selection"};

◆ m_EMEnergyOnly

Gaudi::Property< bool > InDet::CaloClusterROIPhiRZContainerMaker::m_EMEnergyOnly {this, "EMEnergyOnly", false, "Only use EM energy as the ROI energy" }
private

Definition at line 90 of file CaloClusterROIPhiRZContainerMaker.h.

91{this, "EMEnergyOnly", false, "Only use EM energy as the ROI energy" };

◆ m_evtStore

StoreGateSvc_t AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::m_evtStore
privateinherited

Pointer to StoreGate (event store by default)

Definition at line 390 of file AthCommonDataStore.h.

◆ m_extendedExtraObjects

DataObjIDColl AthCommonReentrantAlgorithm< Gaudi::Algorithm >::m_extendedExtraObjects
privateinherited

Extra output dependency collection, extended by AthAlgorithmDHUpdate to add symlinks.

Empty if no symlinks were found.

Definition at line 114 of file AthCommonReentrantAlgorithm.h.

◆ m_inputClusterContainerName

SG::ReadHandleKey<xAOD::CaloClusterContainer> InDet::CaloClusterROIPhiRZContainerMaker::m_inputClusterContainerName {this, "InputClusterContainerName", "egammaTopoCluster", "Input cluster for egamma objects"}
private

Name of the cluster intput collection.

Definition at line 69 of file CaloClusterROIPhiRZContainerMaker.h.

70{this, "InputClusterContainerName", "egammaTopoCluster", "Input cluster for egamma objects"};

◆ m_maxNROIs

std::atomic_uint InDet::CaloClusterROIPhiRZContainerMaker::m_maxNROIs {0}
mutableprivate

Definition at line 108 of file CaloClusterROIPhiRZContainerMaker.h.

108{0};

◆ m_maxPhiWidth

float InDet::CaloClusterROIPhiRZContainerMaker::m_maxPhiWidth = 0.0F
private

Definition at line 103 of file CaloClusterROIPhiRZContainerMaker.h.

◆ m_minPtEm

Gaudi::Property< std::vector<float> > InDet::CaloClusterROIPhiRZContainerMaker::m_minPtEm {this, "minPt", {}, "Minimum pt of cluster ROIs (EMFraction corrected if EMEnerygOnly is set)."}
private

Definition at line 96 of file CaloClusterROIPhiRZContainerMaker.h.

97{this, "minPt", {}, "Minimum pt of cluster ROIs (EMFraction corrected if EMEnerygOnly is set)."};

◆ m_outputClusterContainerName

SG::WriteHandleKeyArray<ROIPhiRZContainer> InDet::CaloClusterROIPhiRZContainerMaker::m_outputClusterContainerName {this, "OutputROIContainerName", {}, "Output collection of eta ordered ROIs"}
private

Name of the ROI output collection.

Definition at line 73 of file CaloClusterROIPhiRZContainerMaker.h.

74{this, "OutputROIContainerName", {}, "Output collection of eta ordered ROIs"};

◆ m_outputIndex

std::vector<unsigned int> InDet::CaloClusterROIPhiRZContainerMaker::m_outputIndex
private

Definition at line 99 of file CaloClusterROIPhiRZContainerMaker.h.

◆ m_outputSorted

std::vector<unsigned int> InDet::CaloClusterROIPhiRZContainerMaker::m_outputSorted
private

Definition at line 100 of file CaloClusterROIPhiRZContainerMaker.h.

◆ m_outputUnsorted

std::vector<unsigned int> InDet::CaloClusterROIPhiRZContainerMaker::m_outputUnsorted
private

Definition at line 101 of file CaloClusterROIPhiRZContainerMaker.h.

◆ m_phiWidth

Gaudi::Property< std::vector<float> > InDet::CaloClusterROIPhiRZContainerMaker::m_phiWidth {this, "phiWidth", {} }
private

Definition at line 93 of file CaloClusterROIPhiRZContainerMaker.h.

94{this, "phiWidth", {} };

◆ m_selectedClusters

std::atomic_uint InDet::CaloClusterROIPhiRZContainerMaker::m_selectedClusters {0}
mutableprivate

Definition at line 106 of file CaloClusterROIPhiRZContainerMaker.h.

106{0};

◆ m_sortedMinPtEm

std::vector<float> InDet::CaloClusterROIPhiRZContainerMaker::m_sortedMinPtEm
private

Definition at line 102 of file CaloClusterROIPhiRZContainerMaker.h.

◆ m_varHandleArraysDeclared

bool AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::m_varHandleArraysDeclared
privateinherited

Definition at line 399 of file AthCommonDataStore.h.

◆ m_vhka

std::vector<SG::VarHandleKeyArray*> AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::m_vhka
privateinherited

Definition at line 398 of file AthCommonDataStore.h.


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