Concrete tool for CaloTower building in Tile.
More...
#include <TileTowerBuilderTool.h>
Concrete tool for CaloTower building in Tile.
TileTowerBuilderTool fills CaloCells into CaloTowers for the Tile Calorimeters.
Definition at line 21 of file TileTowerBuilderTool.h.
◆ StoreGateSvc_t
◆ TileTowerBuilderTool()
| TileTowerBuilderTool::TileTowerBuilderTool |
( |
const std::string & | name, |
|
|
const std::string & | type, |
|
|
const IInterface * | parent ) |
◆ ~TileTowerBuilderTool()
| TileTowerBuilderTool::~TileTowerBuilderTool |
( |
| ) |
|
|
virtual |
◆ addTower()
|
|
inlinestaticprivateinherited |
Definition at line 64 of file CaloTowerBuilderTool.cxx.
67{
68 CaloTowerStore::cell_iterator firstC = tower_it.
firstCell();
69 CaloTowerStore::cell_iterator lastC = tower_it.
lastCell();
73 for (; firstC != lastC; ++firstC) {
74
75 unsigned int ci = firstC.
hash();
76 double weightC = firstC.
weight();
77 int cndx =
cells->findIndex(ci);
78 const CaloCell* cellPtr = nullptr;
79 if (cndx >= 0)
80 cellPtr = (*cells)[cndx];
81
82 if (cellPtr) {
83 wsumE += weightC * cellPtr->
e();
85 }
86
87
88
89
90
91 }
93}
virtual double e() const override final
get energy (data member) (synonym to method energy()
void addUniqueCellNoKine(const CaloCellContainer *theContainer, index_type theIndex, double weight, size_t size_hint=0)
Add a cell (very fast)
cell_iterator lastCell() const
cell_iterator firstCell() const
virtual double getBasicEnergy() const override
Basic signal getter.
const_pointer getDataPtr() const
Return a pointer to the currently-referenced container object.
virtual void setE(double theE)
set energy data member
◆ ATLAS_NOT_THREAD_SAFE()
| virtual StatusCode initialize CaloTowerBuilderToolBase::ATLAS_NOT_THREAD_SAFE |
( |
| ) |
|
|
overridevirtualinherited |
◆ checkSetup()
| StatusCode CaloTowerBuilderTool::checkSetup |
( |
MsgStream & | log | ) |
|
|
privatevirtualinherited |
Definition at line 245 of file CaloTowerBuilderTool.cxx.
245 {
246
250
251 for (
unsigned int iCalos = 0; iCalos <
m_includedCalos.size(); iCalos++) {
252 if (iCalos == 0) {
256 } else {
258 }
259 }
260 return StatusCode::FAILURE;
261 }
262 return StatusCode::SUCCESS;
263}
◆ declareGaudiProperty()
specialization for handling Gaudi::Property<SG::VarHandleKey>
Definition at line 156 of file AthCommonDataStore.h.
158 {
161 hndl.documentation());
162
163 }
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T, V, H > &t)
◆ declareProperty()
Definition at line 145 of file AthCommonDataStore.h.
145 {
148 }
Gaudi::Details::PropertyBase & declareGaudiProperty(Gaudi::Property< T, V, H > &hndl, const SG::VarHandleKeyType &)
specialization for handling Gaudi::Property<SG::VarHandleKey>
◆ detStore()
◆ evtStore()
◆ execute() [1/2]
| StatusCode CaloTowerBuilderTool::execute |
( |
const EventContext & | ctx, |
|
|
CaloTowerContainer * | theContainer ) |
|
overridevirtualinherited |
Run tower building and add results to the tower container.
- Parameters
-
| ctx | The current event context. |
| theContainer | The tower container to fill. |
If the segmentation hasn't been set, take it from the tower container. This is for use by converters.
Implements CaloTowerBuilderToolBase.
Definition at line 228 of file CaloTowerBuilderTool.cxx.
230{
234 }
235
236 return execute (ctx, theContainer,
nullptr,
nullptr);
237}
#define ATH_CHECK
Evaluate an expression and check for errors.
const CaloTowerSeg & towerseg() const
Return a copy of the attached CaloTowerSeg.
◆ execute() [2/2]
Run tower building and add results to the tower container.
If a cell container is provided, use that; otherwise, fetch from SG (the key is given by a job property). If subseg is provided, then we do the building only within the rectangular region that it describes. The segmentation of the tower container must match the region over which we're running the tower building.
- Parameters
-
| ctx | The current event context. |
| theContainer | The tower container to fill. |
| theCell | The cell container to read. If null, we fetch from SG. |
| subseg | If provided, run tower building only within this window. The tower container segmentation must match. |
Implements CaloTowerBuilderToolBase.
Definition at line 173 of file CaloTowerBuilderTool.cxx.
177{
178
179
180
181
183
184
185 if (!theCells) {
187 if (!theCells) {
188 return StatusCode::SUCCESS;
189 }
190 }
191
192 const ElementLink<CaloCellContainer> cellsEL (*theCells, 0, ctx);
193 if (subseg)
195 else
197
200 }
201
203
204
205
206
207
208
209
210
211
212
213
214
215
216 return StatusCode::SUCCESS;
217}
void setCalo(const CaloCell_ID::SUBCALO &nCalo)
Adds a calorimeter index to the tower.
size_type size() const noexcept
Returns the number of elements in the collection.
◆ extraDeps_update_handler()
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
◆ getCells()
Retrieve cells from StoreGate.
Definition at line 59 of file CaloTowerBuilderToolBase.cxx.
60{
61 const CaloCellContainer*
cells =
nullptr;
64 if (!cells) {
67
68 }
69 }
71}
#define ATH_MSG_WARNING(x)
const T * get(const ReadCondHandleKey< T > &key, const EventContext &ctx)
Convenience function to retrieve an object given a ReadCondHandleKey.
◆ initializeTool()
| StatusCode CaloTowerBuilderTool::initializeTool |
( |
| ) |
|
|
overridevirtualinherited |
◆ inputHandles()
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 & ICaloTowerBuilderToolBase::interfaceID |
( |
| ) |
|
|
inlinestaticinherited |
Definition at line 70 of file ICaloTowerBuilderToolBase.h.
70 {
71 static const InterfaceID IID("ICaloTowerBuilderToolBase", 1 , 0);
72 return IID;
73 }
◆ iterateFull()
Definition at line 98 of file CaloTowerBuilderTool.cxx.
100{
104
105 for (
unsigned int t = 0;
t <
sz; ++
t, ++tower_it) {
107 addTower (tower_it, cellsEL, aTower);
108 }
109}
friend class tower_iterator
◆ iterateSubSeg()
Definition at line 114 of file CaloTowerBuilderTool.cxx.
117{
119 assert(subseg->
size() ==
sz);
121
122#if 0
123 for (
unsigned int t = 0;
t <
sz; ++
t, ++tower_it) {
125 addTower (tower_it, cellsEL, aTower);
126 }
127#endif
128
129
130
131
132
134 while (true) {
136 addTower (tower_it, cellsEL, aTower);
139 ++tower_it;
140 }
141}
size_t itower() const
The tower index to which the iterator is referring.
size_t size() const
The number of towers in this window.
CaloTowerSeg::SubSegIterator< tower_iterator > tower_subseg_iterator
◆ msg()
◆ msgLvl()
| bool AthCommonMsg< AlgTool >::msgLvl |
( |
const MSG::Level | lvl | ) |
const |
|
inlineinherited |
◆ outputHandles()
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.
◆ parseCalos()
| std::vector< CaloCell_ID::SUBCALO > TileTowerBuilderTool::parseCalos |
( |
const std::vector< std::string > & | includedCalos | ) |
const |
|
overrideprotectedvirtual |
Convert calorimeter strings to enums.
- Parameters
-
| includedCalos | Property with calorimeter strings. |
Reimplemented from CaloTowerBuilderTool.
Definition at line 32 of file TileTowerBuilderTool.cxx.
34{
35
36 std::vector<CaloCell_ID::SUBCALO>
indices;
37
38 for (const std::string& s : includedCalos) {
39 if (s == "TILE") {
41 }
42 }
43
45}
std::pair< long int, long int > indices
◆ rebuildLookup()
| StatusCode CaloTowerBuilderTool::rebuildLookup |
( |
const EventContext & | ctx | ) |
|
|
privateinherited |
Rebuild the cell lookup table.
Definition at line 308 of file CaloTowerBuilderTool.cxx.
308 {
311 SG::ReadCondHandle<CaloDetDescrManager> caloMgrHandle(
m_caloMgrKey,ctx);
312 const CaloDetDescrManager* caloDDM=*caloMgrHandle;
314 return StatusCode::SUCCESS;
315 }
316 }
317 return StatusCode::FAILURE;
318}
◆ renounce()
Definition at line 380 of file AthCommonDataStore.h.
381 {
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()
◆ runTimeInit()
| void CaloTowerBuilderTool::runTimeInit |
( |
const EventContext & | ctx | ) |
const |
|
protectedinherited |
Definition at line 149 of file CaloTowerBuilderTool.cxx.
149 {
150
152 if( thisNC->rebuildLookup(ctx)!=StatusCode::SUCCESS )
153 throw std::runtime_error("LArFCalTowerBuilderTool::runTimeInit rebuildLookup table failed");
154 }
#define ATLAS_THREAD_SAFE
◆ setCalos()
◆ setTowerSeg()
| void CaloTowerBuilderToolBase::setTowerSeg |
( |
const CaloTowerSeg & | theTowerSeg | ) |
|
|
overridevirtualinherited |
Implements ICaloTowerBuilderToolBase.
Definition at line 37 of file CaloTowerBuilderToolBase.cxx.
37 {
38
42 <<
" " << theTowerSeg.
nphi() <<
" " << theTowerSeg.
etamin()
43 <<
" " << theTowerSeg.
etamax());
44}
index_t nphi() const
Retrieve number of bins.
index_t neta() const
Retrieve number of bins.
double etamin() const
Retrieve lower boundary value range.
double etamax() const
Retrieve upper boundary value range.
◆ sysInitialize()
◆ sysStart()
Handle START transition.
We override this in order to make sure that conditions handle keys can cache a pointer to the conditions container.
◆ towerSeg()
| const CaloTowerSeg & CaloTowerBuilderToolBase::towerSeg |
( |
| ) |
const |
|
protectedinherited |
◆ updateVHKA()
Definition at line 308 of file AthCommonDataStore.h.
308 {
309
310
313 for (
auto k :
keys) {
315 }
316 }
317 }
std::vector< SG::VarHandleKeyArray * > m_vhka
◆ m_caloIndices
◆ m_caloMgrKey
◆ m_cellContainerName
◆ m_cellStore
◆ m_detStore
◆ m_evtStore
◆ m_includedCalos
| std::vector<std::string> CaloTowerBuilderTool::m_includedCalos |
|
privateinherited |
◆ m_onceFlag
| std::once_flag CaloTowerBuilderTool::m_onceFlag |
|
mutableprivateinherited |
◆ m_theTowerSeg
◆ m_varHandleArraysDeclared
◆ m_vhka
The documentation for this class was generated from the following files: