14#include "CaloDetDescr/CaloDetDescrElement.h"
32 return StatusCode::SUCCESS;
39 return StatusCode::SUCCESS;
47 return StatusCode::SUCCESS;
72 towerItr != navInColl->
end(); ++towerItr)
78 (*towerItr)->fillToken(cellToken,
double(1.));
81 float eta0 = (*towerItr)->eta();
82 float phi0 = (*towerItr)->phi();
84 if (cellToken.
size() == 0)
continue;
86 cellItr != cellToken.
end(); ++cellItr)
90 std::unique_ptr<const CaloCell> mirroredCell{};
97 cell=mirroredCell.get();
99 ATH_MSG_WARNING(
"Failed to obtain mirrored cell for deadFEB cell with id" << std::hex << cell->ID().get_compact());
107 return StatusCode::SUCCESS;
118 evtShape->push_back(e);
124 e->setArea(area_slice);
140 for (
auto cl : *theClusters) {
142 double mcell_sumE = 0;
144 if(acc_mcell_sumE(*cl) > 1) {
145 mcell_sumE = acc_mcell_sumE(*cl);
146 ATH_MSG_DEBUG(
"Energy corrected from mirror cell to cluster: " << mcell_sumE);
150 double ET = (cl->e()+mcell_sumE) / std::cosh(cl->eta0());
151 double phi = cl->phi0();
152 double eta = cl->eta0();
159 if (recip != 0.) weight = 1. / recip;
161 decorator(*cl) = weight;
167 for (
unsigned int sample = 0; sample < 24; sample++)
170 if (!cl->hasSampling(s))
continue;
171 float esamp = std::abs(cl->eSample(s));
179 if (etot2 != 0)
cm = er2 / etot2;
181 cm_decorator(*cl) =
cm;
184 slice->setEt(slice->et() + weight * ET);
185 slice->setRho(slice->rho() + weight * ET / area_cluster);
187 for (
unsigned int i = 0; i < static_cast<unsigned int>(
m_numOrders); i++)
190 float tmp_cos = slice->etCos().at(i);
191 slice->etCos()[i] = tmp_cos + weight * ET * std::cos(nn *
phi);
192 float tmp_sin = slice->etSin().at(i);
193 slice->etSin()[i] = tmp_sin + weight * ET * std::sin(nn *
phi);
197 for (
auto es : *evtShape)
200 << std::setw(10) << es->etaMax()
201 << std::setw(15) << es->et() * 1e-3);
203 for (
unsigned int i = 0; i < static_cast<unsigned int>(
m_numOrders); i++)
206 << std::setw(15) << es->etCos().at(i)
207 << std::setw(15) << es->etSin().at(i));
211 return StatusCode::SUCCESS;
227 for (
const auto cellItr : *CellContainer) {
229 std::unique_ptr<const CaloCell> mirroredCell{};
234 cell=mirroredCell.get();
236 ATH_MSG_WARNING(
"Failed to obtain mirrored cell for deadFEB cell with id" << std::hex << cell->ID().get_compact());
244 return StatusCode::SUCCESS;
250 float sgn = (isNeg) ? -1 : 1;
253 float cell_et = theCell->
et();
257 slice->setNCells(slice->nCells() + sgn);
258 slice->setEt(slice->et() + sgn * cell_et * geoWeight);
261 float area = std::abs(deta * dphi);
263 if (
area != 0.) rho = cell_et /
area;
264 slice->setArea(slice->area() + sgn *
area * geoWeight);
265 slice->setRho(slice->rho() + sgn * rho);
267 for (
unsigned int ih = 0; ih < slice->etCos().size(); ih++)
270 float tmp_cos = slice->etCos().at(ih);
271 slice->etCos()[ih] = tmp_cos + cell_et * cos(ih_f * phi0) * geoWeight;
273 float tmp_sin = slice->etSin().at(ih);
274 slice->etSin()[ih] = tmp_sin + cell_et * sin(ih_f * phi0) * geoWeight;
281 const int subCalo =
m_calo_id->sub_calo(
id);
282 const int pos_neg =
m_calo_id->pos_neg(
id);
283 const int sampling =
m_calo_id->sampling(
id);
284 const int region =
m_calo_id->region(
id);
288 ATH_MSG_VERBOSE(
"DeadFEB cell parameter: (" << subCalo <<
"," << pos_neg <<
"," << sampling <<
"," << region <<
"," <<
eta <<
"," <<
phi <<
")");
292 sampling, region,
eta,
phi);
307 mirroredCell->
gain());
Scalar eta() const
pseudorapidity method
Scalar phi() const
phi method
#define ATH_CHECK
Evaluate an expression and check for errors.
#define ATH_MSG_VERBOSE(x)
#define ATH_MSG_WARNING(x)
This class provides an interface to generate or decode an identifier for the upper levels of the dete...
DataVector< INavigable4Momentum > INavigable4MomentumCollection
const ServiceHandle< StoreGateSvc > & detStore() const
Container class for CaloCell.
const CaloCell * findCell(const IdentifierHash theHash) const
fast find method given identifier hash.
Data object for each calorimeter readout cell.
float time() const
get time (data member)
double energy() const
get energy (data member)
const CaloDetDescrElement * caloDDE() const
get pointer to CaloDetDescrElement (data member)
uint16_t provenance() const
get provenance (data member)
uint16_t quality() const
get quality (data member)
CaloGain::CaloGain gain() const
get gain (data member )
virtual double et() const override final
get et
Identifier ID() const
get ID (from cached data member) non-virtual and inline for fast access
float dphi() const
cell dphi
CaloCell_ID::CaloSample getSampling() const
cell sampling
float eta() const
cell eta
float phi() const
cell phi
float deta() const
cell deta
DataModel_detail::const_iterator< DataVector > const_iterator
const_iterator end() const noexcept
Return a const_iterator pointing past the end of the collection.
const_iterator begin() const noexcept
Return a const_iterator pointing at the beginning of the collection.
bool empty() const noexcept
Returns true if the collection is empty.
const_iterator begin() const
CHILDPAR getParameter(const_child_ptr data) const
NavigationTokenIterator const_iterator
const_iterator end() const
SG::Decorator< T, ALLOC > Decorator
SG::Accessor< T, ALLOC > Accessor
bool isAvailable(const ELT &e) const
Test to see if this variable exists in the store.
Property holding a SG store/key/clid from which a ReadHandle is made.
virtual bool isValid() override final
Can the handle be successfully dereferenced?
const_pointer_type cptr()
Dereference the pointer.
const_pointer_type get() const
Dereference the pointer, but don't cache anything.
float getBinUpEdgeEta(unsigned int eb)
float getBinLowEdgeEta(unsigned int eb)
constexpr float getBinArea()
constexpr unsigned int numPhiBins()
unsigned int findBinEta(float eta)
constexpr unsigned int numEtaBins()
bool test(const uint16_t prov, const LArProvenance check)
CaloClusterContainer_v1 CaloClusterContainer
Define the latest version of the calorimeter cluster container.
HIEventShape_v2 HIEventShape
Definition of the latest event info version.