ATLAS Offline Software
Loading...
Searching...
No Matches
Ringer::CaloRingsBuilder Class Reference

#include <CaloRingsBuilder.h>

Inheritance diagram for Ringer::CaloRingsBuilder:

Public Member Functions

std::size_t nRingSets () const override
const SG::WriteHandleKey< xAOD::CaloRingsContainer > & crContName () const override
const SG::WriteHandleKey< xAOD::RingSetContainer > & rsContName () const override
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 sysInitialize () override
 Perform system initialization for an algorithm.
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
CaloRingsBuilder ctors and dtors:
 CaloRingsBuilder (const std::string &type, const std::string &name, const IInterface *parent)
 Default constructor.
 ~CaloRingsBuilder ()
 Destructor.
virtual StatusCode initialize () override
 Tool main methods:
virtual StatusCode preExecute (xAOD::CaloRingsContainer *crCont, xAOD::RingSetContainer *rsCont, const std::size_t nReserve=0) override
 method for working on containers
virtual StatusCode execute (const xAOD::IParticle &particle, ElementLink< xAOD::CaloRingsContainer > &clRingsLink) override
 build CaloRings for IParticle
virtual StatusCode execute (const xAOD::CaloCluster &cluster, ElementLink< xAOD::CaloRingsContainer > &clRingsLink) override
 build CaloRings for CaloCluster
virtual StatusCode finalize () override
 finalize method
const xAOD::RingSetConf::RawConfCollectionrawConf () override
 Extra methods:
bool useShowerShapeBarycenter () override
 Retrieve whether it was set used shower shape barycenter.

Static Public Member Functions

static const InterfaceID & interfaceID ()
 AlgTool interface methods.

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.

Protected Attributes

SG::WriteHandleKey< xAOD::CaloRingsContainerm_crContName
 Fill RingSet seed for IParticle.
SG::WriteHandleKey< xAOD::RingSetContainerm_rsContName
 Name of RingSetContainer on Event StoreGate.
SG::ReadHandleKey< CaloCellContainerm_cellsContName
 Name of CaloCellContainer.
Gaudi::Property< std::vector< float > > m_etaWidth
 Width of the ring in eta.
Gaudi::Property< std::vector< float > > m_phiWidth
 Width of the ring in phi.
Gaudi::Property< float > m_cellMaxDEtaDist
 Maximum cell distance in eta to seed.
Gaudi::Property< float > m_cellMaxDPhiDist
 Maximum cell distance in phi to seed.
Gaudi::Property< std::vector< unsigned int > > m_nRings
 Number of rings in a ringset.
Gaudi::Property< float > m_minEnergy
 Minimum particle energy to build rings (GeV)
Gaudi::Property< std::vector< int > > m_layers
 Calorimeter layers in each ringset.
Gaudi::Property< std::vector< unsigned int > > m_nLayers
 Number of calorimeter layers in each ringset.
Gaudi::Property< bool > m_useShowShapeBarycenter
 Switch to use shower barycenter seed for each RingSets.
Gaudi::Property< bool > m_doTransverseEnergy
 Switch to use raw cell energy instead ET.
SG::ReadCondHandleKey< CaloDetDescrManagerm_caloMgrKey {this,"CaloDetDescrManager", "CaloDetDescrManager"}

Private Types

typedef ServiceHandle< StoreGateSvcStoreGateSvc_t

Private Member Functions

Gaudi::Details::PropertyBase & declareGaudiProperty (Gaudi::Property< T, V, H > &hndl, const SG::VarHandleKeyType &)
 specialization for handling Gaudi::Property<SG::VarHandleKey>

Private Attributes

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
xAOD::RingSetContainerm_rsCont
 Tool props (non configurables):
xAOD::CaloRingsContainerm_crCont
 Create and hold CaloRingsContainer for each event.
xAOD::RingSetConf::RawConfCollection m_rsRawConfCol
 holds each RingSet configuration (filled at initialize)
AtlasGeoPoint m_lastValidSeed
 last valid RingSet seed
size_t m_nRingSets
 hold the number of RingSets we are building for each CaloRings
static const CaloPhiRange m_phiHelper
 used for phi wrap-around
template<typename T>
StatusCode executeTemp (const T &input, ElementLink< xAOD::CaloRingsContainer > &crEL)
 Tool protected methods:
virtual StatusCode buildRingSet (const xAOD::RingSetConf::RawConf &rawConf, const AtlasGeoPoint &seed, xAOD::RingSet *rs)
 main method where the RingSets are built.
StatusCode getRingSetSeed (const xAOD::RingSetConf::RawConf &conf, const xAOD::CaloCluster &cluster, AtlasGeoPoint &seed)
 Fill RingSet seed for CaloCluster.
static StatusCode getRingSetSeed (const xAOD::RingSetConf::RawConf &, const xAOD::IParticle &part, AtlasGeoPoint &seed)
 Fill RingSet seed for IParticle.

Detailed Description

Definition at line 41 of file CaloRingsBuilder.h.

Member Typedef Documentation

◆ StoreGateSvc_t

typedef ServiceHandle<StoreGateSvc> AthCommonDataStore< AthCommonMsg< AlgTool > >::StoreGateSvc_t
privateinherited

Definition at line 388 of file AthCommonDataStore.h.

Constructor & Destructor Documentation

◆ CaloRingsBuilder()

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

Default constructor.

Definition at line 39 of file CaloRingsBuilder.cxx.

42 : ::AthAlgTool(type, name, parent),
43 m_rsCont(nullptr),
44 m_crCont(nullptr),
46{
47 declareInterface<ICaloRingsBuilder>(this);
48}
AthAlgTool()
Default constructor:
size_t m_nRingSets
hold the number of RingSets we are building for each CaloRings
xAOD::RingSetContainer * m_rsCont
Tool props (non configurables):
xAOD::CaloRingsContainer * m_crCont
Create and hold CaloRingsContainer for each event.

◆ ~CaloRingsBuilder()

Ringer::CaloRingsBuilder::~CaloRingsBuilder ( )
default

Destructor.

Member Function Documentation

◆ buildRingSet()

StatusCode Ringer::CaloRingsBuilder::buildRingSet ( const xAOD::RingSetConf::RawConf & rawConf,
const AtlasGeoPoint & seed,
xAOD::RingSet * rs )
protectedvirtual

main method where the RingSets are built.

Reimplemented in Ringer::CaloAsymRingsBuilder, and Ringer::CaloStripsRingsBuilder.

Definition at line 317 of file CaloRingsBuilder.cxx.

321{
322 // Get this RingSet size:
323 const auto nRings = rawConf.nRings;
324
325 // Retrieve CaloCells
326 SG::ReadHandle<CaloCellContainer> cellsCont(m_cellsContName);
327 // check is only used for serial running; remove when MT scheduler used
328 if(!cellsCont.isValid()) {
329 ATH_MSG_FATAL("Failed to retrieve "<< m_cellsContName.key());
330 return StatusCode::FAILURE;
331 }
332
333 SG::ReadCondHandle<CaloDetDescrManager> caloMgrHandle{m_caloMgrKey};
334 const CaloDetDescrManager* caloMgr=*caloMgrHandle;
335
336 CaloCellList cells(caloMgr,cellsCont.ptr() );
337
338 // loop over cells
339 for ( const int layer : rawConf.layers) { // We use int here because the
340 // cells.select() method needs int as param
341 cells.select(seed.eta(), seed.phi(), m_cellMaxDEtaDist, m_cellMaxDPhiDist, layer );
342 for ( const CaloCell *cell : cells ) {
343
344 unsigned int ringNumber(0);
345
346 // calculate the normalised difference in eta
347 const float deltaEta = fabs(
348 (cell->eta() - seed.eta())
349 ) / rawConf.etaWidth;
350 // calculate the normalised difference in phi
351 const float deltaPhi = fabs(
352 CaloPhiRange::diff(cell->phi(), seed.phi())
353 ) / rawConf.phiWidth;
354 // The biggest difference indicates the ring number (we are using
355 // squared-shape rings)
356 const float deltaGreater = std::max(deltaEta, deltaPhi);
357
358 // Round to nearest integer:
359 ringNumber = static_cast<unsigned int>(std::floor(deltaGreater + .5));
360 if ( ringNumber < nRings ){
362 rs->at(ringNumber) += cell->energy()/cosh(cell->eta());
363 }else{
364 rs->at(ringNumber) += cell->energy();
365 }
366 }
367 }
368 }
369
370 return StatusCode::SUCCESS;
371}
Scalar deltaPhi(const MatrixBase< Derived > &vec) const
#define ATH_MSG_FATAL(x)
static Double_t rs
static double diff(double phi1, double phi2)
simple phi1 - phi2 calculation, but result is fixed to respect range.
const xAOD::RingSetConf::RawConfCollection & rawConf() override
Extra methods:
Gaudi::Property< bool > m_doTransverseEnergy
Switch to use raw cell energy instead ET.
Gaudi::Property< float > m_cellMaxDEtaDist
Maximum cell distance in eta to seed.
SG::ReadCondHandleKey< CaloDetDescrManager > m_caloMgrKey
SG::ReadHandleKey< CaloCellContainer > m_cellsContName
Name of CaloCellContainer.
Gaudi::Property< float > m_cellMaxDPhiDist
Maximum cell distance in phi to seed.
double deltaEta(const I4Momentum &p1, const I4Momentum &p2)
Computes efficiently .
Definition P4Helpers.h:66

◆ crContName()

const SG::WriteHandleKey< xAOD::CaloRingsContainer > & Ringer::CaloRingsBuilder::crContName ( ) const
inlineoverridevirtual

Implements Ringer::ICaloRingsBuilder.

Definition at line 109 of file CaloRingsBuilder.h.

109{ return m_crContName; }
SG::WriteHandleKey< xAOD::CaloRingsContainer > m_crContName
Fill RingSet seed for IParticle.

◆ declareGaudiProperty()

Gaudi::Details::PropertyBase & AthCommonDataStore< AthCommonMsg< AlgTool > >::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< AlgTool > >::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< AlgTool > >::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< AlgTool > >::evtStore ( )
inlineinherited

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

Definition at line 85 of file AthCommonDataStore.h.

◆ execute() [1/2]

StatusCode Ringer::CaloRingsBuilder::execute ( const xAOD::CaloCluster & cluster,
ElementLink< xAOD::CaloRingsContainer > & clRingsLink )
overridevirtual

build CaloRings for CaloCluster

Implements Ringer::ICaloRingsBuilder.

Definition at line 155 of file CaloRingsBuilder.cxx.

157{
158 double et(0.);
159 const double eta2 = std::fabs(cluster.etaBE(2));
160 const double energy = cluster.e();
161 if ( eta2 < 999.) {
162 const double cosheta = std::cosh(eta2);
163 et = (cosheta != 0.) ? energy /cosheta : 0.;
164 }
165 if ( et > m_minEnergy )
166 {
167 return executeTemp(cluster, clRings);
168 } else {
169 ATH_MSG_DEBUG( "Skipping cluster with low energy (" << et << " MeV) .");
170 return StatusCode::SUCCESS;
171 }
172}
#define ATH_MSG_DEBUG(x)
float et(const xAOD::jFexSRJetRoI *j)
Gaudi::Property< float > m_minEnergy
Minimum particle energy to build rings (GeV)
StatusCode executeTemp(const T &input, ElementLink< xAOD::CaloRingsContainer > &crEL)
Tool protected methods:
virtual double e() const
The total energy of the particle.
float etaBE(const unsigned layer) const
Get the eta in one layer of the EM Calo.

◆ execute() [2/2]

StatusCode Ringer::CaloRingsBuilder::execute ( const xAOD::IParticle & particle,
ElementLink< xAOD::CaloRingsContainer > & clRingsLink )
overridevirtual

build CaloRings for IParticle

Implements Ringer::ICaloRingsBuilder.

Definition at line 175 of file CaloRingsBuilder.cxx.

178{
179 double et = particle.pt();
180 if ( et > m_minEnergy )
181 {
182 return executeTemp(particle, clRings);
183 } else {
184 ATH_MSG_DEBUG( "Skipping particle with low energy (" << et << " MeV) .");
185 return StatusCode::SUCCESS;
186 }
187}
constexpr ParticleHypothesis particle[PARTICLEHYPOTHESES]
the array of masses

◆ executeTemp()

template<typename T>
StatusCode Ringer::CaloRingsBuilder::executeTemp ( const T & input,
ElementLink< xAOD::CaloRingsContainer > & crEL )
protected

Tool protected methods:

unique execute method for integrating interface code.

Definition at line 193 of file CaloRingsBuilder.cxx.

196{
197
198 ATH_MSG_DEBUG("Entering "<< name() << " execute.");
199
200 // Create structure to hold rings:
201 xAOD::CaloRings *clRings = new xAOD::CaloRings();
202
203 // Add the CaloRings to the container:
204 m_crCont->push_back(clRings);
205
206 // Set elementLink reference to created CaloRings:
207 clRingsLink.toContainedElement(*m_crCont, clRings);
208
209 // If not using shower barycenter, we need to reset last valid seed to avoid
210 // any possible issue:
212 m_lastValidSeed = AtlasGeoPoint(input.eta(),input.phi());
213 }
214
215 // Build this CaloRings RingSets:
216 for ( const auto &rawConf : m_rsRawConfCol ) {
217
218 // Create new RingSet and add it to the container:
219 xAOD::RingSet* rs = new xAOD::RingSet( rawConf.nRings );
220 m_rsCont->push_back(rs);
221
222 // Get RingSet seed:
223 AtlasGeoPoint seed;
224 CHECK( getRingSetSeed( rawConf, input, seed ) );
225
226 // Build it:
227 CHECK( buildRingSet( rawConf, seed, rs ) );
228
229 // Get the ElementLink and add it to our RingSet holder:
230 ElementLink< xAOD::RingSetContainer > rsEL( rs, *m_rsCont );
231 clRings->addRingSetEL( rsEL );
232 }
233
234 // Print CaloRings with DEBUG level:
235 if (msgLevel() <= MSG::DEBUG){
236 std::ostringstream str;
237 clRings->print(str);
238 ATH_MSG_DEBUG(str.str());
239 }
240
241 return StatusCode::SUCCESS;
242}
#define CHECK(...)
Evaluate an expression and check for errors.
virtual StatusCode buildRingSet(const xAOD::RingSetConf::RawConf &rawConf, const AtlasGeoPoint &seed, xAOD::RingSet *rs)
main method where the RingSets are built.
xAOD::RingSetConf::RawConfCollection m_rsRawConfCol
holds each RingSet configuration (filled at initialize)
StatusCode getRingSetSeed(const xAOD::RingSetConf::RawConf &conf, const xAOD::CaloCluster &cluster, AtlasGeoPoint &seed)
Fill RingSet seed for CaloCluster.
AtlasGeoPoint m_lastValidSeed
last valid RingSet seed
Gaudi::Property< bool > m_useShowShapeBarycenter
Switch to use shower barycenter seed for each RingSets.
void print(std::ostream &stream) const
Print-out methods:
void addRingSetEL(const ElementLink< RingSetContainer_v1 > &rsEL)
Add ElementLink to holden vector.
RingSet_v1 RingSet
Definition of the current "RingSet version".
Definition RingSet.h:15
CaloRings_v1 CaloRings
Definition of the current "CaloRings version".

◆ extraDeps_update_handler()

void AthCommonDataStore< AthCommonMsg< AlgTool > >::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

◆ finalize()

StatusCode Ringer::CaloRingsBuilder::finalize ( )
overridevirtual

finalize method

Implements Ringer::ICaloRingsBuilder.

Reimplemented in Ringer::CaloAsymRingsBuilder, and Ringer::CaloStripsRingsBuilder.

Definition at line 125 of file CaloRingsBuilder.cxx.

126{
127 return StatusCode::SUCCESS;
128}

◆ getRingSetSeed() [1/2]

StatusCode Ringer::CaloRingsBuilder::getRingSetSeed ( const xAOD::RingSetConf::RawConf & ,
const xAOD::IParticle & part,
AtlasGeoPoint & seed )
staticprotected

Fill RingSet seed for IParticle.

Definition at line 291 of file CaloRingsBuilder.cxx.

295{
296
297 seed.setEta( part.eta() );
298 seed.setPhi( part.phi() );
299
300 return StatusCode::SUCCESS;
301}

◆ getRingSetSeed() [2/2]

StatusCode Ringer::CaloRingsBuilder::getRingSetSeed ( const xAOD::RingSetConf::RawConf & conf,
const xAOD::CaloCluster & cluster,
AtlasGeoPoint & seed )
protected

Fill RingSet seed for CaloCluster.

Definition at line 245 of file CaloRingsBuilder.cxx.

249{
251
252 seed.setEta( cluster.eta() );
253 seed.setPhi( cluster.phi() );
254
255 return StatusCode::SUCCESS;
256
257 } else {
258
259 bool foundValid = false, foundMultipleValid = false;
260
261 for ( const auto layer : rawConf.layers ) {
262
263 AtlasGeoPoint seedCandidate(
264 cluster.etaSample( layer ),
265 cluster.phiSample( layer )
266 );
267
268 ATH_MSG_DEBUG( "This layer (" << CaloSampling::getSamplingName(layer) <<
269 ") seedCandidate is: (" <<
270 seedCandidate.eta() << "," <<
271 seedCandidate.phi() << ")" );
272
273 if ( seedCandidate.isValid() ){
274 m_lastValidSeed = seedCandidate;
275 if ( foundValid )
276 foundMultipleValid = true;
277 foundValid = true;
278 }
279 }
280
281 // If we get here, set it to the last valid seed:
283 if ( foundMultipleValid ){
284 ATH_MSG_WARNING( "Found multiple valid seeds. Set to last valid candidate.");
285 }
286 return StatusCode::SUCCESS;
287 }
288}
#define ATH_MSG_WARNING(x)
static std::string getSamplingName(CaloSample theSample)
Returns a string (name) for each CaloSampling.
float phiSample(const CaloSample sampling) const
Retrieve barycenter in a given sample.
virtual double eta() const
The pseudorapidity ( ) of the particle.
virtual double phi() const
The azimuthal angle ( ) of the particle.
float etaSample(const CaloSample sampling) const
Retrieve barycenter in a given sample.

◆ initialize()

StatusCode Ringer::CaloRingsBuilder::initialize ( )
overridevirtual

Tool main methods:

initialize method

Implements Ringer::ICaloRingsBuilder.

Reimplemented in Ringer::CaloAsymRingsBuilder, and Ringer::CaloStripsRingsBuilder.

Definition at line 54 of file CaloRingsBuilder.cxx.

55{
56 ATH_MSG_DEBUG("Initializing " << name() );
57
58 m_nRingSets = m_nRings.size();
59
60 auto itr = m_layers.begin();
61
62 // Build RingSets configuration:
63 for (size_t rsConfIdx = 0; rsConfIdx < m_nRingSets; ++rsConfIdx) {
64
65 const auto rsNLayers = m_nLayers[rsConfIdx];
66
67 auto end_itr = itr + rsNLayers;
68
69 const auto& caloSampleItr = reinterpret_cast<
70 std::vector<CaloSampling::CaloSample>::iterator&
71 >(itr);
72 const auto& caloSampleEndItr = reinterpret_cast<
73 std::vector<CaloSampling::CaloSample>::iterator&
74 >(end_itr);
75
76 std::vector<CaloSampling::CaloSample> rsLayers( caloSampleItr ,
77 caloSampleEndItr);
78
79 itr += rsNLayers;
80
81 const auto rawConf = xAOD::RingSetConf::RawConf(
82 m_nRings[rsConfIdx],
83 rsLayers,
84 m_etaWidth[rsConfIdx], m_phiWidth[rsConfIdx],
88 );
89
90 // Build our raw configuration structure:
91 m_rsRawConfCol.push_back(std::move(rawConf));
92 }
93
94 // We have finished filling the main raw configuration properties, now we add
95 // it bounderies:
96 try {
98 } catch ( const std::runtime_error &e) {
99 ATH_MSG_ERROR("Could not add collection bounderies due to: " << e.what() );
100 ATH_MSG_ERROR("RawConfCollection is: ");
101 std::ostringstream str;
103 ATH_MSG_ERROR(str.str());
104 return StatusCode::FAILURE;
105 }
106
107 // Print our collection
108 if (msgLevel() <= MSG::DEBUG){
109 std::ostringstream str;
111 ATH_MSG_DEBUG(str.str());
112 }
113
114 // This will check that the properties were initialized properly
115 // by job configuration.
116 ATH_CHECK( m_crContName.initialize() );
117 ATH_CHECK( m_rsContName.initialize() );
118 ATH_CHECK( m_cellsContName.initialize() );
119 ATH_CHECK( m_caloMgrKey.initialize() );
120
121 return StatusCode::SUCCESS;
122}
#define ATH_CHECK
Evaluate an expression and check for errors.
#define ATH_MSG_ERROR(x)
SG::WriteHandleKey< xAOD::RingSetContainer > m_rsContName
Name of RingSetContainer on Event StoreGate.
Gaudi::Property< std::vector< float > > m_etaWidth
Width of the ring in eta.
Gaudi::Property< std::vector< unsigned int > > m_nLayers
Number of calorimeter layers in each ringset.
Gaudi::Property< std::vector< float > > m_phiWidth
Width of the ring in phi.
Gaudi::Property< std::vector< int > > m_layers
Calorimeter layers in each ringset.
Gaudi::Property< std::vector< unsigned int > > m_nRings
Number of rings in a ringset.
static Ringer::CalJointLayer whichLayer(const std::vector< CaloSampling::CaloSample > &layers)
static void print(const RawConf &raw, std::ostream &stream)
Prints rawConf.
static Ringer::CalJointSection whichSection(const std::vector< CaloSampling::CaloSample > &layers)
static void addRawConfColBounderies(RawConfCollection &clRingsConf)
Add to RawConfCollection its JointLayer/JointSection bounderies.

◆ inputHandles()

virtual std::vector< Gaudi::DataHandle * > AthCommonDataStore< AthCommonMsg< AlgTool > >::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.

◆ interfaceID()

const InterfaceID & ICaloRingsBuilder::interfaceID ( )
inlinestaticinherited

AlgTool interface methods.

Definition at line 83 of file ICaloRingsBuilder.h.

84{
86}
static const InterfaceID IID_ICaloRingsBuilder("ICaloRingsBuilder", 1, 0)

◆ msg()

MsgStream & AthCommonMsg< AlgTool >::msg ( ) const
inlineinherited

Definition at line 24 of file AthCommonMsg.h.

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

◆ msgLvl()

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

Definition at line 30 of file AthCommonMsg.h.

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

◆ nRingSets()

std::size_t Ringer::CaloRingsBuilder::nRingSets ( ) const
inlineoverridevirtual

Implements Ringer::ICaloRingsBuilder.

Definition at line 107 of file CaloRingsBuilder.h.

107{ return m_nRingSets; }

◆ outputHandles()

virtual std::vector< Gaudi::DataHandle * > AthCommonDataStore< AthCommonMsg< AlgTool > >::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.

◆ preExecute()

StatusCode Ringer::CaloRingsBuilder::preExecute ( xAOD::CaloRingsContainer * crCont,
xAOD::RingSetContainer * rsCont,
const std::size_t nReserve = 0 )
overridevirtual

method for working on containers

Implements Ringer::ICaloRingsBuilder.

Definition at line 131 of file CaloRingsBuilder.cxx.

134{
135 if ( crCont && rsCont ){
136 m_crCont = crCont;
137 m_rsCont = rsCont;
138 } else {
139 ATH_MSG_ERROR( "Attempted to set CaloRingsContainer and/or RingSetContainer to invalid pointers");
140 return StatusCode::FAILURE;
141 }
142 // Reserve container space if required:
143 if (nReserve) {
144 // Reserve one CaloRings per particle
145 m_crCont->reserve( nReserve );
146 // We need to reserve more space for the RingSet container, there will be
147 // the number of RawConfig available in our raw configuration collection.
148 m_rsCont->reserve( nReserve * m_nRingSets );
149 }
150
151 return StatusCode::SUCCESS;
152}

◆ rawConf()

const xAOD::RingSetConf::RawConfCollection & Ringer::CaloRingsBuilder::rawConf ( )
inlineoverridevirtual

Extra methods:

Retrieve RawConfiguration Collection

Implements Ringer::ICaloRingsBuilder.

Definition at line 96 of file CaloRingsBuilder.h.

96 {
97 return m_rsRawConfCol;
98 };

◆ 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< AlgTool > >::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< AlgTool > >::renounceArray ( SG::VarHandleKeyArray & handlesArray)
inlineprotectedinherited

remove all handles from I/O resolution

Definition at line 364 of file AthCommonDataStore.h.

364 {
366 }

◆ rsContName()

const SG::WriteHandleKey< xAOD::RingSetContainer > & Ringer::CaloRingsBuilder::rsContName ( ) const
inlineoverridevirtual

Implements Ringer::ICaloRingsBuilder.

Definition at line 110 of file CaloRingsBuilder.h.

110{ return m_rsContName; }

◆ sysInitialize()

virtual StatusCode AthCommonDataStore< AthCommonMsg< AlgTool > >::sysInitialize ( )
overridevirtualinherited

Perform system initialization for an algorithm.

We override this to declare all the elements of handle key arrays at the end of initialization. See comments on updateVHKA.

Reimplemented in asg::AsgMetadataTool, AthCheckedComponent< AthAlgTool >, AthCheckedComponent<::AthAlgTool >, and DerivationFramework::CfAthAlgTool.

◆ sysStart()

virtual StatusCode AthCommonDataStore< AthCommonMsg< AlgTool > >::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< AlgTool > >::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 }
std::vector< SG::VarHandleKeyArray * > m_vhka

◆ useShowerShapeBarycenter()

bool Ringer::CaloRingsBuilder::useShowerShapeBarycenter ( )
inlineoverridevirtual

Retrieve whether it was set used shower shape barycenter.

Implements Ringer::ICaloRingsBuilder.

Definition at line 102 of file CaloRingsBuilder.h.

102 {
104 };

Member Data Documentation

◆ m_caloMgrKey

SG::ReadCondHandleKey<CaloDetDescrManager> Ringer::CaloRingsBuilder::m_caloMgrKey {this,"CaloDetDescrManager", "CaloDetDescrManager"}
protected

Definition at line 253 of file CaloRingsBuilder.h.

253{this,"CaloDetDescrManager", "CaloDetDescrManager"};

◆ m_cellMaxDEtaDist

Gaudi::Property<float> Ringer::CaloRingsBuilder::m_cellMaxDEtaDist
protected
Initial value:
{this,
"CellMaxDEtaDist", 0,
"Maximum cell distance to the seed in eta."}

Maximum cell distance in eta to seed.

Definition at line 193 of file CaloRingsBuilder.h.

193 {this,
194 "CellMaxDEtaDist", 0,
195 "Maximum cell distance to the seed in eta."};

◆ m_cellMaxDPhiDist

Gaudi::Property<float> Ringer::CaloRingsBuilder::m_cellMaxDPhiDist
protected
Initial value:
{this,
"CellMaxDPhiDist", 0,
"Maximum cell distance to the seed in phi."}

Maximum cell distance in phi to seed.

Definition at line 199 of file CaloRingsBuilder.h.

199 {this,
200 "CellMaxDPhiDist", 0,
201 "Maximum cell distance to the seed in phi."};

◆ m_cellsContName

SG::ReadHandleKey<CaloCellContainer> Ringer::CaloRingsBuilder::m_cellsContName
protected
Initial value:
{this,
"CellsContainerName",
"AllCalo",
"Key to obtain the cell container"}

Name of CaloCellContainer.

Definition at line 175 of file CaloRingsBuilder.h.

175 {this,
176 "CellsContainerName",
177 "AllCalo",
178 "Key to obtain the cell container"};

◆ m_crCont

xAOD::CaloRingsContainer* Ringer::CaloRingsBuilder::m_crCont
protected

Create and hold CaloRingsContainer for each event.

Definition at line 266 of file CaloRingsBuilder.h.

◆ m_crContName

SG::WriteHandleKey<xAOD::CaloRingsContainer> Ringer::CaloRingsBuilder::m_crContName
protected
Initial value:
{this,
"CaloRingsContainerName",
"CaloRings",
"Name of the CaloRings container"}

Fill RingSet seed for IParticle.

Tool props (python configurables):

Name of CaloRingsContainer on Event StoreGate

electron collection input name

Definition at line 159 of file CaloRingsBuilder.h.

159 {this,
160 "CaloRingsContainerName",
161 "CaloRings",
162 "Name of the CaloRings container"};

◆ m_detStore

StoreGateSvc_t AthCommonDataStore< AthCommonMsg< AlgTool > >::m_detStore
privateinherited

Pointer to StoreGate (detector store by default)

Definition at line 393 of file AthCommonDataStore.h.

◆ m_doTransverseEnergy

Gaudi::Property<bool> Ringer::CaloRingsBuilder::m_doTransverseEnergy
protected
Initial value:
{this,
"doTransverseEnergy", false,
"Switch to use raw cell energy, "
"instead of cells ET."}

Switch to use raw cell energy instead ET.

Definition at line 248 of file CaloRingsBuilder.h.

248 {this,
249 "doTransverseEnergy", false,
250 "Switch to use raw cell energy, "
251 "instead of cells ET."};

◆ m_etaWidth

Gaudi::Property<std::vector<float> > Ringer::CaloRingsBuilder::m_etaWidth
protected
Initial value:
{this,
"EtaWidth", {}, "Each RingSet ring eta width."}

Width of the ring in eta.

Definition at line 183 of file CaloRingsBuilder.h.

183 {this,
184 "EtaWidth", {}, "Each RingSet ring eta width."};

◆ m_evtStore

StoreGateSvc_t AthCommonDataStore< AthCommonMsg< AlgTool > >::m_evtStore
privateinherited

Pointer to StoreGate (event store by default)

Definition at line 390 of file AthCommonDataStore.h.

◆ m_lastValidSeed

AtlasGeoPoint Ringer::CaloRingsBuilder::m_lastValidSeed
protected

last valid RingSet seed

Propagate other layer centroids in case a layer centroid is not valid.

Definition at line 276 of file CaloRingsBuilder.h.

◆ m_layers

Gaudi::Property<std::vector<int> > Ringer::CaloRingsBuilder::m_layers
protected
Initial value:
{this,
"Layers", {},
"Concatenated list of layers which will be used "
"to build the RingSets"}

Calorimeter layers in each ringset.

This property should be read as: std::vector<CaloSampling::CaloSample> m_layersRings;

Definition at line 223 of file CaloRingsBuilder.h.

223 {this,
224 "Layers", {},
225 "Concatenated list of layers which will be used "
226 "to build the RingSets"};

◆ m_minEnergy

Gaudi::Property<float> Ringer::CaloRingsBuilder::m_minEnergy
protected
Initial value:
{this,
"MinPartEnergy", std::numeric_limits<float>::lowest(),
"Minimum particle/cluster energy to build rings (GeV)."}

Minimum particle energy to build rings (GeV)

Definition at line 211 of file CaloRingsBuilder.h.

211 {this,
212 "MinPartEnergy", std::numeric_limits<float>::lowest(),
213 "Minimum particle/cluster energy to build rings (GeV)."};

◆ m_nLayers

Gaudi::Property<std::vector<unsigned int> > Ringer::CaloRingsBuilder::m_nLayers
protected
Initial value:
{this,
"RingSetNLayers", {},
"Each RingSet number of layers from the Layers "
"configurable property to use."}

Number of calorimeter layers in each ringset.

Definition at line 230 of file CaloRingsBuilder.h.

230 {this,
231 "RingSetNLayers", {},
232 "Each RingSet number of layers from the Layers "
233 "configurable property to use."};

◆ m_nRings

Gaudi::Property<std::vector<unsigned int> > Ringer::CaloRingsBuilder::m_nRings
protected
Initial value:
{this,
"NRings", {},
"Each RingSet number of rings."}

Number of rings in a ringset.

Definition at line 205 of file CaloRingsBuilder.h.

205 {this,
206 "NRings", {},
207 "Each RingSet number of rings."};

◆ m_nRingSets

size_t Ringer::CaloRingsBuilder::m_nRingSets
protected

hold the number of RingSets we are building for each CaloRings

Definition at line 284 of file CaloRingsBuilder.h.

◆ m_phiHelper

const CaloPhiRange Ringer::CaloRingsBuilder::m_phiHelper
staticprotected

used for phi wrap-around

Definition at line 280 of file CaloRingsBuilder.h.

◆ m_phiWidth

Gaudi::Property<std::vector<float> > Ringer::CaloRingsBuilder::m_phiWidth
protected
Initial value:
{this,
"PhiWidth", {}, "Each RingSet ring phi width."}

Width of the ring in phi.

Definition at line 188 of file CaloRingsBuilder.h.

188 {this,
189 "PhiWidth", {}, "Each RingSet ring phi width."};

◆ m_rsCont

xAOD::RingSetContainer* Ringer::CaloRingsBuilder::m_rsCont
protected

Tool props (non configurables):

Create and hold RingSetContainer for each event

Definition at line 262 of file CaloRingsBuilder.h.

◆ m_rsContName

SG::WriteHandleKey<xAOD::RingSetContainer> Ringer::CaloRingsBuilder::m_rsContName
protected
Initial value:
{this,
"RingSetContainerName",
"RingSets",
"Name of the RingSets container"}

Name of RingSetContainer on Event StoreGate.

Definition at line 167 of file CaloRingsBuilder.h.

167 {this,
168 "RingSetContainerName",
169 "RingSets",
170 "Name of the RingSets container"};

◆ m_rsRawConfCol

xAOD::RingSetConf::RawConfCollection Ringer::CaloRingsBuilder::m_rsRawConfCol
protected

holds each RingSet configuration (filled at initialize)

Definition at line 270 of file CaloRingsBuilder.h.

◆ m_useShowShapeBarycenter

Gaudi::Property<bool> Ringer::CaloRingsBuilder::m_useShowShapeBarycenter
protected
Initial value:
{this,
"useShowerShapeBarycenter", false,
"Switch to use shower barycenter for each layer, "
"instead of the cluster center."}

Switch to use shower barycenter seed for each RingSets.

This can be set to false if using cluster information to use the cluster center instead of its layer energy baricenter.

Definition at line 240 of file CaloRingsBuilder.h.

240 {this,
241 "useShowerShapeBarycenter", false,
242 "Switch to use shower barycenter for each layer, "
243 "instead of the cluster center."};

◆ m_varHandleArraysDeclared

bool AthCommonDataStore< AthCommonMsg< AlgTool > >::m_varHandleArraysDeclared
privateinherited

Definition at line 399 of file AthCommonDataStore.h.

◆ m_vhka

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

Definition at line 398 of file AthCommonDataStore.h.


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