92 {
94 const EventContext& ctx = Gaudi::Hive::currentContext();
95
96 SG::ReadCondHandle<LArOnOffIdMapping> cablingHdl{
m_cablingKey, ctx};
97 const LArOnOffIdMapping*
cabling=*cablingHdl;
98 if(!cabling) {
99 ATH_MSG_ERROR(
"Do not have cabling object LArOnOffIdMapping" );
100 return StatusCode::FAILURE;
101 }
102
103 SG::ReadCondHandle<CaloSuperCellDetDescrManager> caloMgrHandle{
m_caloMgrKey, ctx};
104 const CaloSuperCellDetDescrManager* caloDDMgr = *caloMgrHandle;
105
106
108 const ILArPedestal* larPedestal=*pedHdl;
109
110
113
120
121 std::vector<const LArDigit*> IndexDigit;
122 int nCell =
m_calo_id->calo_cell_hash_max();
123 IndexDigit.resize(nCell,nullptr);
124
125 const LArDigitContainer* digit_container=nullptr;
127 SG::ReadHandle<LArDigitContainer> hdlDigit(
m_contKey, ctx);
128 if(!hdlDigit.isValid()) {
130 } else {
131 digit_container = hdlDigit.cptr();
132 }
133 }
134
135 if(digit_container) {
138 for (; first_digit != end_digit; ++first_digit) {
139 HWIdentifier hwid = (*first_digit)->hardwareID();
140 Identifier
id =
cabling->cnvToIdentifier(hwid);
142 if (index>=0 && index<nCell) IndexDigit[
index]=(*first_digit);
143 }
144 }
145
146
148 if(!
cells.isValid()){
150 return StatusCode::FAILURE;
151 }
152 const CaloCellContainer* cell_container=
cells.cptr();
153
154 const CaloCellContainer* recocell_container=nullptr;
156 SG::ReadHandle<CaloCellContainer> recocells{
m_SCRecoKey,ctx};
157 if(recocells.
isValid()) recocell_container=recocells.
cptr();
158 }
159
160 std::vector<int> iflag_cell;
161 iflag_cell.resize(nCell,0);
162
163 CaloCellList myList(caloDDMgr, cell_container);
164
167 cell != cell_container->
end(); ++cell) {
168 Identifier cellID = (*cell)->ID();
170 double et = (*cell)->et();
171
174
175
176 myList.select((*cell)->eta(),(*cell)->phi(),0.10);
177 for (const CaloCell* cell : myList) {
178 Identifier cellID2 =
cell->ID();
181 }
182 }
183 }
184
186 cell != cell_container->
end(); ++cell) {
187
188 Identifier cellID = (*cell)->ID();
189 IdentifierHash hcell=
m_calo_id->calo_cell_hash(cellID);
191
192 if (iflag_cell[index]==1 ){
198
199 HWIdentifier hwid=
cabling->createSignalChannelID(cellID);
202
205 float pedestal=0.;
206 if (larPedestal) {
207 pedestal = larPedestal->
pedestal(hwid,(*cell)->gain());
208 }
209
211 if (IndexDigit[index]) {
212 const std::vector<short>& vSamples=(IndexDigit[
index])->samples();
214 for (
int i=0;
i<std::min(32,nsamples);
i++) {
216 }
217 }
218 }
221 if(recocell_container) {
222 const CaloCell *rcell= recocell_container->
findCell(hcell);
223 if(rcell) {
226 }
227 }
229 }
230 }
231
233
235
236 return StatusCode::SUCCESS;
237}
#define ATH_CHECK
Evaluate an expression and check for errors.
#define ATH_MSG_WARNING(x)
float et(const xAOD::jFexSRJetRoI *j)
ServiceHandle< StoreGateSvc > & evtStore()
const CaloCell * findCell(const IdentifierHash theHash) const
fast find method given identifier hash.
float time() const
get time (data member)
double energy() const
get energy (data member)
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.
virtual float pedestal(const HWIdentifier &id, int gain) const =0
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.
const CaloCell_SuperCell_ID * m_calo_id
SG::ReadHandleKey< CaloCellContainer > m_SCKey
SG::ReadCondHandleKey< CaloSuperCellDetDescrManager > m_caloMgrKey
SG::ReadHandleKey< LArDigitContainer > m_contKey
SG::ReadCondHandleKey< LArOnOffIdMapping > m_cablingKey
SG::ReadHandleKey< CaloCellContainer > m_SCRecoKey
Gaudi::Property< double > m_etcut
SG::ReadCondHandleKey< ILArPedestal > m_pedestalKey
virtual bool isValid() override final
Can the handle be successfully dereferenced?
const_pointer_type cptr()
Dereference the pointer.
uint32_t lumiBlock() const
The current event's luminosity block number.
uint32_t bcid() const
The bunch crossing ID of the event.
@ LAr
The LAr calorimeter.
@ Error
The sub-detector issued an error.
uint32_t runNumber() const
The current event's run number.
EventFlagErrorState errorState(EventFlagSubDet subDet) const
Get the error state for a particular sub-detector.
uint64_t eventNumber() const
The current event's event number.
retrieve(aClass, aKey=None)
EventInfo_v1 EventInfo
Definition of the latest event info version.