|
ATLAS Offline Software
|
Go to the documentation of this file.
15 #include "CaloEvent/CaloTowerContainer.h"
19 #include "CLHEP/Units/SystemOfUnits.h"
20 #include "GaudiKernel/ThreadLocalContext.h"
34 double den = std::abs(
x1) + std::abs(
x2);
35 if (den == 0)
return true;
36 double num = std::abs (
x1 -
x2);
48 (
const std::string&
name,
49 ISvcLocator* pSvcLocator)
51 m_builder (
"LArFCalTowerBuilderTool"),
69 return StatusCode::SUCCESS;
78 if(!caloMgrHandle.isValid()) std::abort();
90 cells->updateCaloIterators();
104 for (
size_t i = 0;
i < tow->
size();
i++) {
114 if (!
comp (
t0->energy(),
t1->energy()) ||
118 std::cout <<
"Energy mismatch " <<
i <<
" "
119 << ieta1 <<
" " << iphi1 <<
" "
120 <<
t0->eta() <<
" " <<
t0->phi() <<
" "
121 <<
t1->eta() <<
" " <<
t1->phi() <<
" "
122 <<
t0->energy() <<
" " <<
t1->energy() <<
"\n";
125 std::vector<unsigned int>
h0;
127 cit !=
t0->cell_end();
130 h0.push_back ((*cit)->caloDDE()->calo_hash());
133 std::vector<unsigned int>
h1;
135 cit !=
t1->cell_end();
138 h1.push_back ((*cit)->caloDDE()->calo_hash());
142 std::cout <<
"Cell list mismatch.\n";
143 for (
size_t i = 0;
i <
h0.size();
i++)
144 std::cout <<
" " <<
h0[
i];
146 for (
size_t i = 0;
i <
h1.size();
i++)
147 std::cout <<
" " <<
h1[
i];
154 return StatusCode::SUCCESS;
160 std::cout <<
"test1\n";
161 const EventContext& ctx = Gaudi::Hive::currentContext();
168 std::cout <<
"cells\n";
169 for (
size_t i = 0;
i <
cells->size();
i++) {
171 std::cout <<
i <<
" "
172 << (
int)(
c->caloDDE()->calo_hash()) <<
" "
173 <<
c->eta() <<
" " <<
c->phi() <<
" " <<
c->energy() <<
"\n";
177 std::cout <<
"towers\n";
178 for (
size_t i = 0;
i < tow1->
size();
i++) {
180 std::cout <<
i <<
" "
183 <<
t->energy() <<
" ";
185 cit !=
t->cell_end();
188 std::cout << (*cit)->caloDDE()->calo_hash() <<
" ";
198 return StatusCode::SUCCESS;
208 return StatusCode::SUCCESS;
calo_element_range element_range() const
Range over element vector.
CaloTower * getTower(index_t eta, index_t phi)
Returns a pointer to a tower with given indices.
index_t phimin() const
Lower phi index.
This class groups all DetDescr information related to a CaloCell. Provides a generic interface for al...
std::vector< ALFA_RawData_p1 > t0
std::vector< ALFA_RawDataCollection_p1 > t1
index_t etamin() const
Lower eta index.
index_t nphi() const
Retrieve number of bins.
Athena::TPCnvVers::Old Athena::TPCnvVers::Old Athena::TPCnvVers::Current Athena::TPCnvVers::Current CaloTowerContainer
A rectangular window within the segmentation.
Very simple random numbers for regression testing.
Storable container class for CaloTower.
CaloEnergyCluster::cell_iterator cell_iterator
Iterator on CaloCell s.
::StatusCode StatusCode
StatusCode definition for legacy code.
SUBCALO
enumeration of sub calorimeters
index_t getTowerEtaIndex(const CaloTower *aTower) const
Returns the index for a given tower.
#define CHECK(...)
Evaluate an expression and check for errors.
int32_t index_t
The index type of the node in the vector.
Data class for calorimeter cell towers.
Helpers for checking error return status codes and reporting errors.
StatusCode initialize(bool used=true)
Container class for CaloCell.
CaloTowerSeg segmentation() const
Return a new segmentation object corresponding to this window.
size_t index_t
Tower map index type.
This class provides the client interface for accessing the detector description information common to...
Data object for each calorimeter readout cell.
Data object stores CaloTower segmentation.
index_t getTowerPhiIndex(const CaloTower *aTower) const
Returns the index for a given tower.
size_type size() const noexcept
Returns the number of elements in the collection.
float randf_seed(uint32_t &seed, float rmax, float rmin=0)
Generate a floating-point random number between rmin and rmax.
SubSeg subseg(double eta, double deta, double phi, double dphi) const
Return a window within the current segmentation.