6#include "CLHEP/Units/SystemOfUnits.h"
8#include "GaudiKernel/MsgStream.h"
9#include "Gaudi/Property.h"
10#include "GaudiKernel/Service.h"
11#include "GaudiKernel/IToolSvc.h"
20#include "CaloEvent/CaloTower.h"
21#include "CaloEvent/CaloTowerContainer.h"
29 const std::string&
type,
30 const IInterface* parent)
34 declareInterface<ICaloTowerBuilderToolBase>(
this);
73 for (; firstC != lastC; ++firstC) {
75 unsigned int ci = firstC.
hash();
76 double weightC = firstC.
weight();
77 int cndx = cells->findIndex(ci);
80 cellPtr = (*cells)[cndx];
83 wsumE += weightC * cellPtr->
e();
101 size_t sz = towers->size();
105 for (
unsigned int t = 0; t <
sz; ++t, ++tower_it) {
107 addTower (tower_it, cellsEL, aTower);
118 size_t sz = towers->size();
119 assert(subseg->
size() ==
sz);
123 for (
unsigned int t = 0; t <
sz; ++t, ++tower_it) {
125 addTower (tower_it, cellsEL, aTower);
136 addTower (tower_it, cellsEL, aTower);
152 if( thisNC->rebuildLookup(ctx)!=StatusCode::SUCCESS )
153 throw std::runtime_error(
"LArFCalTowerBuilderTool::runTimeInit rebuildLookup table failed");
188 return StatusCode::SUCCESS;
216 return StatusCode::SUCCESS;
236 return execute (ctx, theContainer,
nullptr,
nullptr);
251 for (
unsigned int iCalos = 0; iCalos <
m_includedCalos.size(); iCalos++) {
260 return StatusCode::FAILURE;
262 return StatusCode::SUCCESS;
269 if (
rebuildLookup(Gaudi::Hive::currentContext()).isFailure()) {
282std::vector<CaloCell_ID::SUBCALO>
284 (
const std::vector<std::string>& includedCalos)
const
287 std::vector<CaloCell_ID::SUBCALO> indices;
289 for (
const std::string& s : includedCalos) {
292 }
else if (s ==
"LARHEC") {
294 }
else if (s ==
"LARFCAL") {
296 }
else if (s ==
"TILE") {
314 return StatusCode::SUCCESS;
317 return StatusCode::FAILURE;
#define ATH_CHECK
Evaluate an expression and check for errors.
Definition of CaloDetDescrManager.
CaloPhiRange class declaration.
#define ATLAS_THREAD_SAFE
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T, V, H > &t)
Container class for CaloCell.
Data object for each calorimeter readout cell.
virtual double e() const override final
get energy (data member) (synonym to method energy()
This class provides the client interface for accessing the detector description information common to...
void addUniqueCellNoKine(const CaloCellContainer *theContainer, index_type theIndex, double weight, size_t size_hint=0)
Add a cell (very fast)
Storable container class for CaloTower.
void setCalo(const CaloCell_ID::SUBCALO &nCalo)
Adds a calorimeter index to the tower.
const CaloTowerSeg & towerseg() const
Return a copy of the attached CaloTowerSeg.
size_t itower() const
The tower index to which the iterator is referring.
A rectangular window within the segmentation.
size_t size() const
The number of towers in this window.
cell_iterator lastCell() const
cell_iterator firstCell() const
CaloTowerSeg::SubSegIterator< tower_iterator > tower_subseg_iterator
Data class for calorimeter cell towers.
virtual double getBasicEnergy() const override
Basic signal getter.
size_type size() const noexcept
Returns the number of elements in the collection.
ElementLink implementation for ROOT usage.
const_pointer getDataPtr() const
Return a pointer to the currently-referenced container object.
virtual void setE(double theE)
set energy data member