264 {
265
267
268
269 std::vector<uint32_t> vrodid32lar;
270 std::vector<uint32_t> vrodid32em;
271 std::vector<uint32_t> vrodid32hec;
272 std::vector<uint32_t> vrodid32hec0;
273 std::vector<uint32_t> vrodid32hec1;
274 std::vector<uint32_t> vrodid32hec2;
275 std::vector<uint32_t> vrodid32hec3;
276 std::vector<uint32_t> vrodid32fcalem;
277 std::vector<uint32_t> vrodid32fcalhad;
278
280 std::vector<uint32_t> vrodid32tile;
281 std::vector<IdentifierHash> rIdstile;
282
284
289
294
297
298
299 auto iii = std::unique_copy(vrodid32tile.begin(),vrodid32tile.end(),
m_vrodid32tile.begin());
300 auto iij = std::unique_copy(rIdstile.begin(),rIdstile.end(),
m_rIdstile.begin());
307
308 vrodid32lar.insert(vrodid32lar.end(),vrodid32em.begin(),vrodid32em.end());
309 vrodid32hec.insert(vrodid32hec.end(),vrodid32hec0.begin(),vrodid32hec0.end());
310 vrodid32lar.insert(vrodid32lar.end(),vrodid32hec.begin(),vrodid32hec.end());
311 vrodid32lar.insert(vrodid32lar.end(),vrodid32fcalhad.begin(),vrodid32fcalhad.end());
312 vrodid32lar.insert(vrodid32lar.end(),vrodid32fcalem.begin(),vrodid32fcalem.end());
314
315
316 SG::ReadCondHandle<LArMCSym> mcsym (
m_mcsymKey, context);
318 SG::ReadCondHandle<LArBadChannelCont> larBadChan{
m_bcContKey, context };
322
323 const unsigned int nFebs=70;
325 unsigned int jj=0;
329 if ( kk >= nFebs ) {
331 jj++;
332 }
335 }
336 SG::ReadCondHandle<CaloDetDescrManager> caloMgrHandle{
m_caloMgrKey, context};
337 const CaloDetDescrManager* theCaloDDM = *caloMgrHandle;
340
341
342 size_t slot = 0;
344 cache.larContainer = std::make_unique<LArCellCont>();
345 cache.larRodBlockStructure_per_slot = nullptr;
346
347 cache.larContainer->initialize(**roimap, **onoff, **mcsym, **febrod, **larBadChan, *theCaloDDM).
348 orThrow(
"Cannot initialize LAr container",
name());
349
350 std::vector<CaloCell*> local_cell_copy;
351 local_cell_copy.reserve(200000);
352 const LArCellCont* larcell = cache.larContainer.get();
354
355 cache.lastFSEvent = 0xFFFFFFFF;
357 cachefullcont->reserve(190000);
358
359 for(unsigned int lcidx=0; lcidx < larcell->size(); lcidx++){
360 LArCellCollection* lcc = larcell->at(lcidx);
361 for(
unsigned int lccidx=0; lccidx<lcc->
size(); lccidx++){
362 CaloCell*
cell = lcc->
at(lccidx);
363 if ( cell &&
cell->caloDDE() ) {
366
369
370 if ( !
bad ) local_cell_copy.push_back( cell );
371 }
372 }
373 }
374
375
376
377 auto tilecell = std::make_unique<TileCellCont>();
378 tilecell->setHashIdToROD( *tileHid2RESrcID );
379 tilecell->initialize().orThrow(
"Cannot initialize Tile container",
name());
380
381 for (
unsigned int i=0;
i<4;
i++) {
384 }
385 m_tileDecoder->loadMBTS( tilecell->MBTS_map(), tilecell->MBTS_channel() );
386
387 const std::vector<unsigned int>* mbts_rods = tilecell->MBTS_RODs();
388 for(
size_t i = 0 ;
i < mbts_rods->size();
i++) {
390 }
393
394 auto d0cellsp = std::make_unique<TileROD_Decoder::D0CellsHLT>();
395 for (unsigned int lcidx=0; lcidx < tilecell->size(); lcidx++){
396 TileCellCollection* lcc = tilecell->
at(lcidx);
397 for (
unsigned int lccidx=0; lccidx<lcc->
size(); lccidx++){
398 CaloCell*
cell = lcc->
at(lccidx);
399 if ( cell ) local_cell_copy.push_back( cell );
400 }
401
403 const int ros = (frag_id >> 8);
404 if ( ros == 1 ) {
405 const int drawer = (frag_id & 0xFF);
407 pCell+=2;
408 d0cellsp->m_cells[
drawer] = *pCell;
409 }
410 }
411 cache.tileContainer = std::move(tilecell);
412
413
414 cache.d0cells = std::move(d0cellsp);
415
416
417 for(
unsigned int i=0;
i<hashMax;
i++){
418 cachefullcont->push_back_fast(nullptr);
419 }
420
421 for(
unsigned int i=0;
i<local_cell_copy.size();
i++){
422 unsigned int j = local_cell_copy.at(i)->caloDDE()->calo_hash();
423 if ( j < hashMax ) {
424 cachefullcont->at(j) = local_cell_copy.at(i);
425 }
426 }
427 for(
unsigned int i=0;
i<hashMax;
i++)
428 if ( cachefullcont->at(i) == nullptr ){
429 Identifier
id = theCaloCCIDM->
cell_id(i);
430 if ( id!=0 ){
432 if (
el->is_tile() ) {
434 } else {
436 }
437
439 }
440 }
441
446
447
448 cachefullcont->order();
449
450 if ( hashMax != cachefullcont->size() ) {
452 }
453
454 cachefullcont->setIsOrdered(true);
455 cachefullcont->setIsOrderedAndComplete(true);
456 cache.fullcont = std::move(cachefullcont);
457
458 local_cell_copy.clear();
459 ++slot;
460 }
461}
LArBadXCont< LArBadChannel > LArBadChannelCont
void sort(typename DataModel_detail::iterator< DVL > beg, typename DataModel_detail::iterator< DVL > end)
Specialization of sort for DataVector/List.
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< unsigned int > m_mbts_add_rods
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)
DataModel_detail::iterator< DVL > unique(typename DataModel_detail::iterator< DVL > beg, typename DataModel_detail::iterator< DVL > end)
Specialization of unique for DataVector/List.
void sort(typename DataModel_detail::iterator< DVL > beg, typename DataModel_detail::iterator< DVL > end)
Specialization of sort for DataVector/List.