259 {
260
262
263
264 std::vector<uint32_t> vrodid32lar;
265 std::vector<uint32_t> vrodid32em;
266 std::vector<uint32_t> vrodid32hec;
267 std::vector<uint32_t> vrodid32hec0;
268 std::vector<uint32_t> vrodid32hec1;
269 std::vector<uint32_t> vrodid32hec2;
270 std::vector<uint32_t> vrodid32hec3;
271 std::vector<uint32_t> vrodid32fcalem;
272 std::vector<uint32_t> vrodid32fcalhad;
273
275 std::vector<uint32_t> vrodid32tile;
276 std::vector<IdentifierHash> rIdstile;
277
279
284
289
292
293
294 auto iii = std::unique_copy(vrodid32tile.begin(),vrodid32tile.end(),
m_vrodid32tile.begin());
295 auto iij = std::unique_copy(rIdstile.begin(),rIdstile.end(),
m_rIdstile.begin());
302
303 vrodid32lar.insert(vrodid32lar.end(),vrodid32em.begin(),vrodid32em.end());
304 vrodid32hec.insert(vrodid32hec.end(),vrodid32hec0.begin(),vrodid32hec0.end());
305 vrodid32lar.insert(vrodid32lar.end(),vrodid32hec.begin(),vrodid32hec.end());
306 vrodid32lar.insert(vrodid32lar.end(),vrodid32fcalhad.begin(),vrodid32fcalhad.end());
307 vrodid32lar.insert(vrodid32lar.end(),vrodid32fcalem.begin(),vrodid32fcalem.end());
309
310
311 SG::ReadCondHandle<LArMCSym> mcsym (
m_mcsymKey, context);
317
318 const unsigned int nFebs=70;
320 unsigned int jj=0;
324 if ( kk >= nFebs ) {
326 jj++;
327 }
330 }
332 const CaloDetDescrManager* theCaloDDM = *caloMgrHandle;
335
336
337 size_t slot = 0;
339 cache.larContainer = std::make_unique<LArCellCont>();
340 cache.larRodBlockStructure_per_slot =
nullptr;
341
342 cache.larContainer->initialize(**roimap, **onoff, **mcsym, **febrod, **larBadChan, *theCaloDDM).
343 orThrow(
"Cannot initialize LAr container",
name());
344
345 std::vector<CaloCell*> local_cell_copy;
346 local_cell_copy.reserve(200000);
347 const LArCellCont* larcell =
cache.larContainer.get();
349
350 cache.lastFSEvent = 0xFFFFFFFF;
352 cachefullcont->reserve(190000);
353
354 for(unsigned int lcidx=0; lcidx < larcell->size(); lcidx++){
355 LArCellCollection* lcc = larcell->at(lcidx);
356 for(
unsigned int lccidx=0; lccidx<lcc->
size(); lccidx++){
357 CaloCell*
cell = lcc->
at(lccidx);
358 if ( cell &&
cell->caloDDE() ) {
361
364
365 if ( !
bad ) local_cell_copy.push_back( cell );
366 }
367 }
368 }
369
370
371
372 auto tilecell = std::make_unique<TileCellCont>();
373 tilecell->setHashIdToROD( *tileHid2RESrcID );
374 tilecell->initialize().orThrow(
"Cannot initialize Tile container",
name());
375
376 for (
unsigned int i=0;
i<4;
i++) {
379 }
380 m_tileDecoder->loadMBTS( tilecell->MBTS_map(), tilecell->MBTS_channel() );
381
382 auto d0cellsp = std::make_unique<TileROD_Decoder::D0CellsHLT>();
383 for (unsigned int lcidx=0; lcidx < tilecell->size(); lcidx++){
384 TileCellCollection* lcc = tilecell->
at(lcidx);
385 for (
unsigned int lccidx=0; lccidx<lcc->
size(); lccidx++){
386 CaloCell*
cell = lcc->
at(lccidx);
387 if ( cell ) local_cell_copy.push_back( cell );
388 }
389
391 const int ros = (frag_id >> 8);
392 if ( ros == 1 ) {
393 const int drawer = (frag_id & 0xFF);
395 pCell+=2;
396 d0cellsp->m_cells[
drawer] = *pCell;
397 }
398 }
399 cache.tileContainer = std::move(tilecell);
400
401
402 cache.d0cells = std::move(d0cellsp);
403
404
405 for(
unsigned int i=0;
i<hashMax;
i++){
406 cachefullcont->push_back_fast(nullptr);
407 }
408
409 for(
unsigned int i=0;
i<local_cell_copy.size();
i++){
410 unsigned int j = local_cell_copy.at(i)->caloDDE()->calo_hash();
411 if ( j < hashMax ) {
412 cachefullcont->at(j) = local_cell_copy.at(i);
413 }
414 }
415 for(
unsigned int i=0;
i<hashMax;
i++)
416 if ( cachefullcont->at(i) == nullptr ){
417 Identifier
id = theCaloCCIDM->
cell_id(i);
418 if ( id!=0 ){
420 if (
el->is_tile() ) {
422 } else {
424 }
425
427 }
428 }
429
434
435
436 cachefullcont->order();
437
438 if ( hashMax != cachefullcont->size() ) {
440 }
441
442 cachefullcont->setIsOrdered(true);
443 cachefullcont->setIsOrderedAndComplete(true);
444 cache.fullcont = std::move(cachefullcont);
445
446 local_cell_copy.clear();
447 ++slot;
448 }
449}
LArBadXCont< LArBadChannel > LArBadChannelCont
Athena::TPCnvVers::Current TrigRoiDescriptor
size_type calo_cell_hash_max() const
cell 'global' hash table max size
Identifier cell_id(const int subCalo, const int barec_or_posneg, const int sampling_or_fcalmodule, const int region_or_dummy, const int eta, const int phi) const
Make a cell (== channel) ID from constituting fields and subCalo index; for (Mini)FCAL,...
const CaloDetDescrElement * get_element(const Identifier &cellId) const
get element by its identifier
const CaloCell_ID * getCaloCell_ID() const
get calo cell ID helper
const T * at(size_type n) const
Access an element, as an rvalue.
DataModel_detail::iterator< DataVector > iterator
Standard iterator.
const_iterator begin() const noexcept
Return a const_iterator pointing at the beginning of the collection.
size_type size() const noexcept
Returns the number of elements in the collection.
bool problematicForUnknownReason() const
bool good() const
Returns true if no problems at all (all bits at zero).
LArBC_t offlineStatus(const Identifier id) const
Query the status of a particular channel by offline ID This is the main client access method.
std::vector< uint32_t > m_vrodid32tile
std::vector< IdentifierHash > m_rIdstile
@ VIEW_ELEMENTS
this data object is a view, it does not own its elmts
float j(const xAOD::IParticle &, const xAOD::TrackMeasurementValidation &hit, const Eigen::Matrix3d &jab_inv)
void sort(typename DataModel_detail::iterator< DVL > beg, typename DataModel_detail::iterator< DVL > end)
Specialization of sort for DataVector/List.