23 const std::string&
name,
48 return StatusCode::FAILURE;
59 return StatusCode::SUCCESS;
67 return StatusCode::FAILURE;
72 CLHEP::HepRandomEngine* rndmEngine = rngWrapper->
getEngine(ctx);
86 return StatusCode::SUCCESS;
94 ATH_MSG_DEBUG(
"HGTD_DigitizationTool::processBunchXing " << bunch_xing);
101 TimedHitCollList_t timed_hit_coll_list;
104 sub_event_itr, sub_event_itr_end).isSuccess())) and
105 timed_hit_coll_list.size() == 0) {
107 return StatusCode::FAILURE;
109 ATH_MSG_VERBOSE(timed_hit_coll_list.size() <<
" SiHitCollections with key " <<
115 std::unique_ptr<SiHitCollection> hitCollPtr{std::make_unique<SiHitCollection>(*iColl->second)};
117 ATH_MSG_DEBUG(
"SiHitCollection found with " << hitCollPtr->size() <<
120 <<
" index: " << timeIndex.index()
121 <<
" type: " << timeIndex.type());
126 return StatusCode::SUCCESS;
135 CLHEP::HepRandomEngine* rndmEngine = rngWrapper->
getEngine(ctx);
147 return StatusCode::SUCCESS;
169 return StatusCode::SUCCESS;
173 ATH_MSG_DEBUG(
"HGTD_DigitizationTool::retrieveHitCollection()");
181 if (!hitCollection.
isValid()) {
182 ATH_MSG_ERROR(
"Could not get HGTD SiHitCollection container " << hitCollection.
name() <<
" from store " << hitCollection.
store());
183 return StatusCode::FAILURE;
189 ATH_MSG_DEBUG(
"SiHitCollection found with " << hitCollection->
size() <<
" hits");
191 return StatusCode::SUCCESS;
194 TimedHitCollList_t timed_hit_coll_list;
195 unsigned int n_si_hits(0);
201 timed_hit_coll_list.size() == 0) {
203 return StatusCode::FAILURE;
215 while (coll_itr != coll_itr_end) {
228 return StatusCode::SUCCESS;
232 ATH_MSG_DEBUG(
"HGTD_DigitizationTool::digitizeHitsPerDetectorElement");
237 if (elements==
nullptr) {
239 return StatusCode::FAILURE;
256 fist_hit->getBarrelEndcap(), fist_hit->getLayerDisk(),
257 fist_hit->getPhiModule(), fist_hit->getEtaModule());
265 std::unique_ptr<SiChargedDiodeCollection> charged_diode_coll =
266 std::make_unique<SiChargedDiodeCollection>(det_elem);
271 for (; coll_itr != coll_itr_end; ++coll_itr) {
282 current_hit, charged_diode_coll.get(), det_elem, rndmEngine, ctx);
289 std::unique_ptr<HGTD_RDO_Collection> rdo_collection =
299 return StatusCode::SUCCESS;
304 CLHEP::HepRandomEngine* rndmEngine)
const {
306 int processorNumber = 0;
317 proc->process(*charged_diodes, rndmEngine);
326 std::unique_ptr<HGTD_RDO_Collection> coll) {
331 ATH_MSG_FATAL(
"HGTD RDO collection could not be added to container!");
332 return StatusCode::FAILURE;
334 return StatusCode::SUCCESS;
342 std::unique_ptr<HGTD_RDO_Collection> rdo_collection =
343 std::make_unique<HGTD_RDO_Collection>(idHash_de);
352 for (; i_chargedDiode != i_chargedDiode_end; ++i_chargedDiode) {
361 <<
" does not pass threshold of "
367 (*i_chargedDiode).second.getReadoutCell();
369 int phi_index = readout_cell.
phiIndex();
372 <<
" phi:" << phi_index);
384 float toa =
charge.time();
386 unsigned int dummy_tot = 256;
387 unsigned short dummy_bcid = 0;
388 unsigned short dummy_l1a = 0;
389 unsigned short dummy_l1id = 0;
391 std::unique_ptr<HGTD_RDO> p_rdo = std::make_unique<HGTD_RDO>(
392 id_readout, toa, dummy_tot, dummy_bcid, dummy_l1a, dummy_l1id);
394 rdo_collection->
push_back(p_rdo.release());
396 return rdo_collection;
402 std::vector<InDetSimData::Deposit> deposits;
410 for (; i_chargedDiode != i_chargedDiode_end; ++i_chargedDiode) {
412 const list_t &charges =
413 (*i_chargedDiode).second.totalCharge().chargeComposition();
415 bool real_particle_hit =
false;
418 list_t::const_iterator charge_list_itr_end = charges.end();
419 list_t::const_iterator charge_list_itr = charges.begin();
421 for (; charge_list_itr != charge_list_itr_end; ++charge_list_itr) {
427 if (!real_particle_hit) {
438 real_particle_hit =
true;
444 std::vector<InDetSimData::Deposit>::reverse_iterator theDeposit =
446 std::vector<InDetSimData::Deposit>::reverse_iterator depositsR_end =
448 std::vector<InDetSimData::Deposit>::reverse_iterator i_Deposit =
450 for (; i_Deposit != depositsR_end; ++i_Deposit) {
451 if ((*i_Deposit).first == trkLink) {
452 theDeposit = i_Deposit;
458 if (theDeposit != depositsR_end) {
459 if((*theDeposit).second > charge_list_itr->time()){
460 (*theDeposit).first = trkLink;
461 (*theDeposit).second = charge_list_itr->time();
464 deposits.emplace_back(trkLink, charge_list_itr->time());
470 if (real_particle_hit) {
473 (*i_chargedDiode).second.getReadoutCell();
475 int phi_index = readout_cell.
phiIndex();
479 m_sdo_collection_map->try_emplace(id_readout, std::move(deposits), (*i_chargedDiode).second.flag());