96 {
97
99 const EventContext& ctx = Gaudi::Hive::currentContext();
100
102
108 DataVect feedThrough; feedThrough.reserve(cellContainer->
size());
110
111 DataVect cellTimeVec; cellTimeVec.reserve(cellContainer->
size());
113 DataVect cellPedestal; cellPedestal.reserve(cellContainer->
size());
114 DataVect adc2Mev; adc2Mev.reserve(cellContainer->
size());
115 DataVect BadCell; BadCell.reserve(cellContainer->
size());
116
117 char rndStr[30];
118
121
122
123 const ILArPedestal* larPedestal = nullptr;
126 ATH_MSG_ERROR(
"in getLArData(), Could not retrieve LAr Pedestal" );
127 }
128 }
129
130 const LArOnlineID* onlineId = nullptr;
132 ATH_MSG_ERROR(
"in getLArData(),Could not get LArOnlineID!" );
133 }
134
135 const LArADC2MeV* adc2mev = nullptr;
137 SG::ReadCondHandle<LArADC2MeV> adc2mevH (
m_adc2mevKey, ctx);
138 adc2mev = *adc2mevH;
139 }
140
141 double energyGeV,cellTime;
142 double energyAllLArBarrel = 0.;
143
145
146 SG::ReadCondHandle<LArOnOffIdMapping> cablingHdl{
m_cablingKey, ctx};
147 const LArOnOffIdMapping*
cabling{*cablingHdl};
148 if(!cabling) {
151 }
152
153
154 for(;it1!=it2;++it1){
156
157 if((*it1)->badcell()){ BadCell.push_back(1); }
158 else{ BadCell.push_back(-1); }
159
161 Identifier cellid = (*it1)->ID();
162
163 HWIdentifier LArhwid =
cabling->createSignalChannelIDFromHash((*it1)->caloDDE()->calo_hash());
164
165
167 bool maskChannel = false;
170 maskChannel = true;
171 break;
172 }
173 }
174 if (maskChannel) continue;
175 }
176 energyGeV = (*it1)->energy()*(1./
GeV);
177 if (energyGeV == 0) energyGeV = 0.001;
179 energyAllLArBarrel += energyGeV;
180
181 idVec.emplace_back((Identifier::value_type)(*it1)->ID().get_compact() );
182 phi.emplace_back((*it1)->phi());
183 eta.emplace_back((*it1)->eta());
185 feedThrough.emplace_back(onlineId->
feedthrough(LArhwid));
186 slot.emplace_back(onlineId->
slot(LArhwid));
187
189 cellTime = (*it1)->time();
190 cellTimeVec.emplace_back( gcvt( cellTime,
m_cellTimePrec, rndStr) );
191 cellGain.emplace_back( (*it1)->gain() );
192
193 int largain = (*it1)->gain();
194 float pedestal=larPedestal->
pedestal(LArhwid,largain);
195 float pedvalue=0;
197 else pedvalue = 0;
198 cellPedestal.emplace_back(pedvalue);
199 LArVectorProxy polynom_adc2mev = adc2mev->
ADC2MEV(cellid,largain);
200 if (polynom_adc2mev.size()==0){ adc2Mev.emplace_back(-1); }
201 else{ adc2Mev.emplace_back(polynom_adc2mev[1]); }
202 }
203 }
204
205 ATH_MSG_DEBUG(
" Total energy in LAr barrel in GeV : " << energyAllLArBarrel );
206
207
211 dataMap[
"energy"] = std::move(energy);
212 dataMap[
"id"] = std::move(idVec);
213 dataMap[
"channel"] = std::move(channel);
214 dataMap[
"feedThrough"] = std::move(feedThrough);
215 dataMap[
"slot"] = std::move(slot);
216
217
219 dataMap[
"BadCell"] = std::move(BadCell);
220 }
221
222
224 dataMap[
"cellTime"] = std::move(cellTimeVec);
225 dataMap[
"cellGain"] = std::move(cellGain);
226 dataMap[
"cellPedestal"] = std::move(cellPedestal);
227 dataMap[
"adc2Mev"] = std::move(adc2Mev);
228 }
229
231 << " retrieved with " << nEntries << " entries" );
232
233
235
236 }
Scalar eta() const
pseudorapidity method
Scalar phi() const
phi method
const ServiceHandle< StoreGateSvc > & detStore() const
CaloCellContainer::const_iterator beginConstCalo(CaloCell_ID::SUBCALO caloNum) const
get const iterators on cell of just one calo
CaloCellContainer::const_iterator endConstCalo(CaloCell_ID::SUBCALO caloNum) const
DataModel_detail::const_iterator< DataVector > const_iterator
size_type size() const noexcept
Returns the number of elements in the collection.
virtual float pedestal(const HWIdentifier &id, int gain) const =0
virtual std::string dataTypeName() const
Return the name of the data type.
SG::ReadCondHandleKey< LArOnOffIdMapping > m_cablingKey
SG::ReadCondHandleKey< LArADC2MeV > m_adc2mevKey
virtual StatusCode retrieve(ToolHandle< IFormatTool > &FormatTool)
Retrieve all the data.
const LArVectorProxy ADC2MEV(const HWIdentifier &id, int gain) const
int feedthrough(const HWIdentifier id) const
Return the feedthrough of a hardware cell identifier : feedthrough = [0,31] Barrel - A/C side or H/...
int slot(const HWIdentifier id) const
Return the slot number of a hardware cell identifier: slot = [1,15] Slot-ID in top part of the crat...
int channel(const HWIdentifier id) const
Return the channel number of a hardware cell identifier channel = [0,127] in all FEB.
std::map< std::string, DataVect > DataMap
std::vector< DataType > DataVect
Defines a map with a key and a vector of DataType objects e.g.