14#include "CaloDetDescr/CaloDetDescrElement.h"
26 ,
const std::string& name
27 ,
const IInterface* parent)
30 declareInterface<ILArShapeDumperTool>(
this);
64 return StatusCode::SUCCESS;
70 return StatusCode::SUCCESS;
78 short iEta = -1, iPhi = -1, layer = -1;
79 if (
m_emId->is_lar_em(
id)) {
83 layer =
m_emId->sampling(
id);
87 else if (
m_hecId->is_lar_hec(
id)) {
93 else if (
m_fcalId->is_lar_fcal(
id)) {
100 msg(MSG::WARNING) <<
"LArDigit Id "<< MSG::hex <<
id.get_identifier32().get_compact() << MSG::dec
101 <<
" (FT: " <<
m_onlineHelper->feedthrough(channelID) <<
" FEBSlot: "
103 <<
") appears to be neither EM nor HEC nor FCAL." <<
endmsg;
117 TVector3 position(0,0,1);
119 if (caloDetElement) position = TVector3(caloDetElement->
x(), caloDetElement->
y(), caloDetElement->
z());
121 return new CellInfo(calo, layer, iEta, iPhi,
124 shapeL, shapeM, shapeH, position, onlid);
137 msg(MSG::INFO) <<
"Shape object is not of type LArShapeComplete!" <<
endmsg;
144 const size_t nPhases=shapeObj->
nTimeBins(channelID,gain);
146 msg(MSG::WARNING) <<
"Shape object for channel " << channelID <<
" and gain " << gain
147 <<
" has 0 phases !" <<
endmsg;
151 for (
unsigned int iPhase = 0; iPhase < nPhases; iPhase++) {
154 if (!(shape_i.
valid() && shape_i.size()>0)) {
155 msg(MSG::WARNING) <<
"Shape object for channel " << channelID <<
" and gain " << gain
156 <<
" has no data in phase " << iPhase <<
" !" <<
endmsg;
160 for (
unsigned int iSample = 0; iSample < shape_i.size(); iSample++) {
161 if (iSample == 0 && iPhase == 0)
162 shape =
new ShapeInfo(shape_i.size(), 3, nPhases, 0);
163 shape->
set(iSample, iPhase, shape_i[iSample]);
#define ATH_CHECK
Evaluate an expression and check for errors.
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T, V, H > &t)
const ServiceHandle< StoreGateSvc > & detStore() const
Helper base class for offline cell identifiers.
const LArFCAL_Base_ID * fcal_idHelper() const
access to FCAL idHelper
const LArHEC_Base_ID * hec_idHelper() const
access to HEC idHelper
const LArEM_Base_ID * em_idHelper() const
access to EM idHelper
This class groups all DetDescr information related to a CaloCell.
LArVectorProxy ShapeRef_t
This class defines the interface for accessing Shape (Nsample variable, Dt = 25 ns fixed) @stereotype...
value_type get_compact() const
Get the compact id.
Identifier32 get_identifier32() const
Get the 32-bit version Identifier, will be invalid if >32 bits needed.
void set(unsigned char iSample, unsigned char iPhase, float value)
This class implements the ILArShape interface.
virtual unsigned nTimeBins(const HWIdentifier &CellID, int gain) const
virtual ShapeRef_t Shape(const HWIdentifier &CellID, int gain, int tbin=0, int mode=0) const override
bool valid() const
Test to see if the proxy has been initialized.