ATLAS Offline Software
HGTD_DigitizationTool.cxx
Go to the documentation of this file.
1 
11 #include "HGTD_DigitizationTool.h"
12 
17 #include "InDetSimEvent/SiHit.h"
21 
23  const std::string& name,
24  const IInterface* parent)
26 }
27 
29 
30  ATH_CHECK(detStore()->retrieve(m_id_helper, "HGTD_ID"));
31 
33  ATH_CHECK(m_merge_svc.retrieve());
34  }
35 
36  ATH_CHECK(m_rndm_svc.retrieve());
37 
39 
40  ATH_CHECK(m_hgtd_front_end_tool.retrieve());
41 
42  // add the front end to the set of tools used for diode processing
44 
45  // check the input object name
46  if (m_hitsContainerKey.key().empty()) {
47  ATH_MSG_FATAL("Property InputObjectName not set !");
48  return StatusCode::FAILURE;
49  }
51  ATH_MSG_DEBUG("Input objects in container : '" << m_inputObjectName << "'");
52 
53  // Initialize ReadHandleKey
54  ATH_CHECK(m_hitsContainerKey.initialize(true));
58 
59  return StatusCode::SUCCESS;
60 }
61 
63 
64  ATH_MSG_DEBUG("processAllSubEvents");
65 
66  if (prepareEvent(ctx, 0).isFailure()) {
67  return StatusCode::FAILURE;
68  }
69  // Set the RNG to use for this event.
70  ATHRNG::RNGWrapper* rngWrapper = m_rndm_svc->getEngine(this);
71  rngWrapper->setSeed(name(), ctx);
72  CLHEP::HepRandomEngine* rndmEngine = rngWrapper->getEngine(ctx);
73 
74  ATH_MSG_DEBUG("Begin digitizeAllHits");
75 
76  if (retrieveHitCollection(ctx).isSuccess()) {
77  ATH_CHECK(digitizeHitsPerDetectorElement(ctx, rndmEngine));
78  } else {
79  ATH_MSG_DEBUG("retrieveHitCollection found no hits");
80  }
81 
82  // FIXME: needs to be added once noise/selftriggering has to go in
83  // ATH_CHECK(simulateNoisePerDetectorElement());
84 
85  ATH_MSG_DEBUG("processAllSubEvents successful!");
86  return StatusCode::SUCCESS;
87 }
88 
91  SubEventIterator sub_event_itr,
92  SubEventIterator sub_event_itr_end) {
93 
94  ATH_MSG_DEBUG("HGTD_DigitizationTool::processBunchXing " << bunch_xing);
95 
96  // FIXME removed m_HardScatterSplittingMode and
97  // m_HardScatterSplittingSkipper until we have confirmed we need this
98 
99  using TimedHitCollList_t = PileUpMergeSvc::TimedList<SiHitCollection>::type;
100  // this is a list<pair<time_t, DataLink<SiHitCollection> >
101  TimedHitCollList_t timed_hit_coll_list;
102 
103  if ((not (m_merge_svc->retrieveSubSetEvtData(m_inputObjectName, timed_hit_coll_list, bunch_xing,
104  sub_event_itr, sub_event_itr_end).isSuccess())) and
105  timed_hit_coll_list.size() == 0) {
106  ATH_MSG_ERROR("Could not fill TimedHitCollList");
107  return StatusCode::FAILURE;
108  } else {
109  ATH_MSG_VERBOSE(timed_hit_coll_list.size() << " SiHitCollections with key " <<
110  m_inputObjectName << " found");
111  }
112 
113  TimedHitCollList_t::iterator endColl{timed_hit_coll_list.end()};
114  for (TimedHitCollList_t::iterator iColl{timed_hit_coll_list.begin()}; iColl != endColl; ++iColl) {
115  std::unique_ptr<SiHitCollection> hitCollPtr{std::make_unique<SiHitCollection>(*iColl->second)};
116  PileUpTimeEventIndex timeIndex{iColl->first};
117  ATH_MSG_DEBUG("SiHitCollection found with " << hitCollPtr->size() <<
118  " hits");
119  ATH_MSG_VERBOSE("time index info. time: " << timeIndex.time()
120  << " index: " << timeIndex.index()
121  << " type: " << timeIndex.type());
122  m_timed_hit_coll->insert(timeIndex, hitCollPtr.get());
123  m_hit_coll_ptrs.push_back(std::move(hitCollPtr));
124  }
125 
126  return StatusCode::SUCCESS;
127 }
128 
130  ATH_MSG_VERBOSE("HGTD_DigitizationTool::mergeEvent()");
131 
132  // Set the RNG to use for this event.
133  ATHRNG::RNGWrapper* rngWrapper = m_rndm_svc->getEngine(this);
134  rngWrapper->setSeed(name(), ctx);
135  CLHEP::HepRandomEngine* rndmEngine = rngWrapper->getEngine(ctx);
136 
137  ATH_CHECK(digitizeHitsPerDetectorElement(ctx, rndmEngine));
138 
139  // FIXME: needs to be added once noise/selftriggering has to go in
140  // ATH_CHECK(simulateNoisePerDetectorElement());
141 
142  m_hit_coll_ptrs.clear();
143 
144  m_timed_hit_coll.reset(nullptr);
145 
146  ATH_MSG_DEBUG("Digitize success!");
147  return StatusCode::SUCCESS;
148 }
149 
152 
153 StatusCode HGTD_DigitizationTool::prepareEvent(const EventContext& ctx, unsigned int /*index*/) {
154  ATH_MSG_DEBUG("HGTD_DigitizationTool::prepareEvent()");
155  // Create the IdentifiableContainer to contain the digit collections Create
156  // a new RDO container
158  ATH_CHECK(m_hgtd_rdo_container.record(std::make_unique<HGTD_RDO_Container>(m_id_helper->wafer_hash_max())));
159 
160  // Create a map for the SDO and register it into StoreGate
162  ATH_CHECK(m_sdo_collection_map.record(std::make_unique<InDetSimDataCollection>()));
163 
164  m_processed_elements.clear(); // FIXME not sure I need this vector??
166 
167  m_timed_hit_coll = std::make_unique<TimedHitCollection<SiHit>>();
168 
169  return StatusCode::SUCCESS;
170 }
171 
173  ATH_MSG_DEBUG("HGTD_DigitizationTool::retrieveHitCollection()");
174 
175  using TimedHitCollList_t = PileUpMergeSvc::TimedList<SiHitCollection>::type;
176  // this is a list<pair<time_t, DataLink<SiHitCollection> >
177 
178  // In case of single hits container just load the collection using read handles
179  if (!m_onlyUseContainerName) {
181  if (!hitCollection.isValid()) {
182  ATH_MSG_ERROR("Could not get HGTD SiHitCollection container " << hitCollection.name() << " from store " << hitCollection.store());
183  return StatusCode::FAILURE;
184  }
185 
186  // create a new hits collection
187  m_timed_hit_coll = std::make_unique<TimedHitCollection<SiHit>>(1);
188  m_timed_hit_coll->insert(0, hitCollection.cptr());
189  ATH_MSG_DEBUG("SiHitCollection found with " << hitCollection->size() << " hits");
190 
191  return StatusCode::SUCCESS;
192  }
193 
194  TimedHitCollList_t timed_hit_coll_list;
195  unsigned int n_si_hits(0);
196 
197  if (m_merge_svc
198  ->retrieveSubEvtsData(m_inputObjectName, timed_hit_coll_list,
199  n_si_hits)
200  .isFailure() and
201  timed_hit_coll_list.size() == 0) { // FIXME is the size check relevant??
202  ATH_MSG_ERROR("Could not fill TimedHitCollList_t");
203  return StatusCode::FAILURE;
204  } else {
205  ATH_MSG_DEBUG(timed_hit_coll_list.size() << " SiHitCollections with key " << m_inputObjectName << " found");
206  }
207 
208  // create a new hits collection
209  m_timed_hit_coll = std::make_unique<TimedHitCollection<SiHit>>(n_si_hits);
210 
211  // now merge all collections into one
212  TimedHitCollList_t::iterator coll_itr(timed_hit_coll_list.begin());
213  TimedHitCollList_t::iterator coll_itr_end(timed_hit_coll_list.end());
214 
215  while (coll_itr != coll_itr_end) {
216 
217  // FIXME removed m_HardScatterSplittingMode and
218  // m_HardScatterSplittingSkipper until we have confirmed we need this
219 
220  const SiHitCollection *collection(coll_itr->second);
221 
222  m_timed_hit_coll->insert(coll_itr->first, collection);
223 
224  ATH_MSG_DEBUG("SiTrackerHitCollection found with" << collection->size()
225  << " hits");
226  ++coll_itr;
227  }
228  return StatusCode::SUCCESS;
229 }
230 
231 StatusCode HGTD_DigitizationTool::digitizeHitsPerDetectorElement(const EventContext& ctx, CLHEP::HepRandomEngine* rndmEngine) {
232  ATH_MSG_DEBUG("HGTD_DigitizationTool::digitizeHitsPerDetectorElement");
233 
234  // Get HGTD_DetectorElementCollection
236  const InDetDD::HGTD_DetectorElementCollection* elements(hgtdDetEleColl.retrieve());
237  if (elements==nullptr) {
238  ATH_MSG_FATAL(m_HGTDDetEleCollKey.fullKey() << " could not be retrieved");
239  return StatusCode::FAILURE;
240  }
241 
242  // the iterators mark the start and end of si hits that belong to one
243  // collection which means that they were found on the same detector element
244  // (module)
247 
248  // the nextDetectorElement method sets the iterators to a range belonging to
249  // one module, so we iterate over modules (detector elements) in the while
250  // loop
251  while (m_timed_hit_coll->nextDetectorElement(coll_itr, coll_itr_end)) {
252 
253  const TimedHitPtr<SiHit> &fist_hit = *coll_itr;
254 
256  fist_hit->getBarrelEndcap(), fist_hit->getLayerDisk(),
257  fist_hit->getPhiModule(), fist_hit->getEtaModule());
258  IdentifierHash waferHash{m_id_helper->wafer_hash(id)};
259 
260  // get the det element from the manager
261  const InDetDD::HGTD_DetectorElement *det_elem = elements->getDetectorElement(waferHash);
262  // FIXME check for null??
263  // create a diode collection holding the digitized hits
264  // FIXME (init once outside the while loop and use clear and set det elem??)
265  std::unique_ptr<SiChargedDiodeCollection> charged_diode_coll =
266  std::make_unique<SiChargedDiodeCollection>(det_elem);
267 
269  // Loop over the hits on the selected detector element and created charged
270  // diodes
271  for (; coll_itr != coll_itr_end; ++coll_itr) {
272 
273  const TimedHitPtr<SiHit> &current_hit = *coll_itr;
274 
275  // use the surface charge generator to produce the charged diode
276  // and add it to the charged diode collection
277  //
278  // hits that are too far away in time to be captured by the ASICs
279  // are handled internally by the surface charge generator
280  //
281  m_hgtd_surf_charge_gen->createSurfaceChargesFromHit(
282  current_hit, charged_diode_coll.get(), det_elem, rndmEngine, ctx);
283 
284  } // END LOOP over hits
286  // now that the charges have been built, apply all digitization tools
287  applyProcessorTools(charged_diode_coll.get(), rndmEngine);
288  // at this point, the RDOs and SDOs need to be created!!!
289  std::unique_ptr<HGTD_RDO_Collection> rdo_collection =
290  createRDOCollection(charged_diode_coll.get());
291 
292  ATH_CHECK(storeRDOCollection(std::move(rdo_collection)));
293 
294  createAndStoreSDO(charged_diode_coll.get());
295 
296  ATH_MSG_DEBUG("charges filled for module " << id);
297  } // END LOOP over detector elements
298 
299  return StatusCode::SUCCESS;
300 }
301 
303  SiChargedDiodeCollection* charged_diodes,
304  CLHEP::HepRandomEngine* rndmEngine) const {
305  ATH_MSG_DEBUG("applyProcessorTools()");
306  int processorNumber = 0;
307 
308  // std::list<ISiChargedDiodesProcessorTool *>::iterator provessor_itr =
309  // m_diode_processor_tools.begin();
310  // for (; provessor_itr != m_diode_processor_tools.end(); ++provessor_itr) {
311  // (*provessor_itr)->process(*charged_diodes, rndmEngine);
312 
313  // processorNumber++;
314  // ATH_MSG_DEBUG("Applied processor # " << processorNumber);
315  // }
317  proc->process(*charged_diodes, rndmEngine);
318 
319  processorNumber++;
320  ATH_MSG_DEBUG("Applied processor # " << processorNumber);
321  }
322  return;
323 }
324 
326  std::unique_ptr<HGTD_RDO_Collection> coll) {
327  const IdentifierHash identifyHash{coll->identifierHash()};
328  // Create the RDO collection
330  ->addCollection(coll.release(), identifyHash).isFailure()) {
331  ATH_MSG_FATAL("HGTD RDO collection could not be added to container!");
332  return StatusCode::FAILURE;
333  }
334  return StatusCode::SUCCESS;
335 }
336 
337 std::unique_ptr<HGTD_RDO_Collection> HGTD_DigitizationTool::createRDOCollection(
338  SiChargedDiodeCollection* charged_diodes) const {
339 
340  IdentifierHash idHash_de = charged_diodes->identifyHash();
341 
342  std::unique_ptr<HGTD_RDO_Collection> rdo_collection =
343  std::make_unique<HGTD_RDO_Collection>(idHash_de);
344 
345  // need the DE identifier
346  const Identifier id_de = charged_diodes->identify();
347  rdo_collection->setIdentifier(id_de);
348 
349  SiChargedDiodeIterator i_chargedDiode = charged_diodes->begin();
350  SiChargedDiodeIterator i_chargedDiode_end = charged_diodes->end();
351 
352  for (; i_chargedDiode != i_chargedDiode_end; ++i_chargedDiode) {
353 
354  // skip deposits below the charge threshold of ~2fC after amplif.
355  // the charge here is the purely deposited charge, so factor ~20 less
356  // FIXME: gain radiation dependent, compensated with higher bias voltage
357  // more precise modelling in the future
358  SiChargedDiode& diode = (*i_chargedDiode).second;
359  if (diode.totalCharge().charge() < m_charge_threshold) {
360  ATH_MSG_DEBUG("charge of " << diode.totalCharge().charge()
361  << " does not pass threshold of "
362  << m_charge_threshold);
363  continue;
364  }
365 
366  InDetDD::SiReadoutCellId readout_cell =
367  (*i_chargedDiode).second.getReadoutCell();
368  int eta_index = readout_cell.etaIndex();
369  int phi_index = readout_cell.phiIndex();
370 
371  ATH_MSG_DEBUG("readout_cell ID: " << readout_cell << " eta:" << eta_index
372  << " phi:" << phi_index);
373 
374  // FIXME the method takes ID, phi, eta
375  // FIXME switching order here to fix upstream issue with orientations
376  const Identifier id_readout =
377  m_id_helper->pixel_id(charged_diodes->identify(), phi_index, eta_index);
378 
379  const SiTotalCharge& charge = diode.totalCharge();
380 
381  // this is the time of the main charge. For now this might be OK as long as
382  // the toal deposit just gets transformed into "one charge", but will need a
383  // change in the future!!
384  float toa = charge.time();
385 
386  unsigned int dummy_tot = 256;
387  unsigned short dummy_bcid = 0;
388  unsigned short dummy_l1a = 0;
389  unsigned short dummy_l1id = 0;
390 
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);
393 
394  rdo_collection->push_back(p_rdo.release());
395  }
396  return rdo_collection;
397 }
398 
400  SiChargedDiodeCollection *charged_diodes) {
401  using list_t = SiTotalCharge::list_t;
402  std::vector<InDetSimData::Deposit> deposits;
403  deposits.reserve(5); // no idea what a reasonable number for this would be
404  // with pileup
405 
406  // loop over the charged diodes
407  SiChargedDiodeIterator i_chargedDiode = charged_diodes->begin();
408  SiChargedDiodeIterator i_chargedDiode_end = charged_diodes->end();
409 
410  for (; i_chargedDiode != i_chargedDiode_end; ++i_chargedDiode) {
411  deposits.clear();
412  const list_t &charges =
413  (*i_chargedDiode).second.totalCharge().chargeComposition();
414 
415  bool real_particle_hit = false;
416 
417  // loop over the list of elements inside the charged diode
418  list_t::const_iterator charge_list_itr_end = charges.end();
419  list_t::const_iterator charge_list_itr = charges.begin();
420 
421  for (; charge_list_itr != charge_list_itr_end; ++charge_list_itr) {
422 
423  const HepMcParticleLink &trkLink = charge_list_itr->particleLink();
425  continue;
426  }
427  if (!real_particle_hit) {
428  // Types of SiCharges expected from HGTD
429  // Noise: barcode==0 &&
430  // processType()==SiCharge::noise
431  // Delta Rays: barcode==0 &&
432  // processType()==SiCharge::track
433  // Pile Up Tracks With No Truth: barcode!=0 &&
434  // processType()==SiCharge::cut_track
435  // Tracks With Truth: barcode!=0 &&
436  // processType()==SiCharge::track
437  if (!HepMC::no_truth_link(trkLink) && charge_list_itr->processType() == SiCharge::track) {
438  real_particle_hit = true;
439  }
440  // real_particle_hit = trkLink.isValid();
441  }
442 
443  // check if this track number has been already used.
444  std::vector<InDetSimData::Deposit>::reverse_iterator theDeposit =
445  deposits.rend(); // dummy value
446  std::vector<InDetSimData::Deposit>::reverse_iterator depositsR_end =
447  deposits.rend();
448  std::vector<InDetSimData::Deposit>::reverse_iterator i_Deposit =
449  deposits.rbegin();
450  for (; i_Deposit != depositsR_end; ++i_Deposit) {
451  if ((*i_Deposit).first == trkLink) {
452  theDeposit = i_Deposit;
453  break;
454  }
455  }
456 
457  // Diode has already a hit, check which one that arrived first.
458  if (theDeposit != depositsR_end) {
459  if((*theDeposit).second > charge_list_itr->time()){
460  (*theDeposit).first = trkLink;
461  (*theDeposit).second = charge_list_itr->time();
462  }
463  } else { // create a new deposit with the track lick and the ToA
464  deposits.emplace_back(trkLink, charge_list_itr->time());
465  }
466  } // END LOOP charges within diode
467 
468  // add the simdata object to the map if the deposit originated from a
469  // particle to which the truth information was kept. Can be HS and PU.
470  if (real_particle_hit) {
471 
472  InDetDD::SiReadoutCellId readout_cell =
473  (*i_chargedDiode).second.getReadoutCell();
474  int eta_index = readout_cell.etaIndex();
475  int phi_index = readout_cell.phiIndex();
476  const Identifier id_readout = m_id_helper->pixel_id(
477  charged_diodes->identify(), phi_index, eta_index);
478 
479  m_sdo_collection_map->try_emplace(id_readout, std::move(deposits), (*i_chargedDiode).second.flag());
480  }
481  } // END LOOP charged diodes
482 }
python.PyKernel.retrieve
def retrieve(aClass, aKey=None)
Definition: PyKernel.py:110
xAOD::iterator
JetConstituentVector::iterator iterator
Definition: JetConstituentVector.cxx:68
HGTD_DigitizationTool::m_output_sdo_coll_key
SG::WriteHandleKey< InDetSimDataCollection > m_output_sdo_coll_key
Definition: HGTD_DigitizationTool.h:113
ATHRNG::RNGWrapper::setSeed
void setSeed(const std::string &algName, const EventContext &ctx)
Set the random seed using a string (e.g.
Definition: RNGWrapper.h:169
HGTD_DigitizationTool::m_id_helper
const HGTD_ID * m_id_helper
Handle to the ID helper.
Definition: HGTD_DigitizationTool.h:122
HGTD_DigitizationTool::processBunchXing
virtual StatusCode processBunchXing(int bunch_xing, SubEventIterator sub_event_itr, SubEventIterator sub_event_itr_end) override final
called for each active bunch-crossing (time in ns)
Definition: HGTD_DigitizationTool.cxx:90
ATH_MSG_FATAL
#define ATH_MSG_FATAL(x)
Definition: AthMsgStreamMacros.h:34
HGTD_DigitizationTool::mergeEvent
virtual StatusCode mergeEvent(const EventContext &ctx) override final
called at the end of the bunchXing loop
Definition: HGTD_DigitizationTool.cxx:129
SiChargedDiode
Definition: SiChargedDiode.h:30
SG::ReadCondHandle
Definition: ReadCondHandle.h:44
HGTD_ID::wafer_hash
IdentifierHash wafer_hash(Identifier wafer_id) const
wafer hash from id
Definition: HGTD_ID.h:404
HGTD_DigitizationTool::initialize
virtual StatusCode initialize() override final
Definition: HGTD_DigitizationTool.cxx:28
SG::ReadHandle::cptr
const_pointer_type cptr()
Dereference the pointer.
HGTD_DigitizationTool::m_hitsContainerKey
SG::ReadHandleKey< SiHitCollection > m_hitsContainerKey
Definition: HGTD_DigitizationTool.h:107
HGTD_DigitizationTool::m_hgtd_surf_charge_gen
ToolHandle< IHGTD_SurfaceChargesGenerator > m_hgtd_surf_charge_gen
Definition: HGTD_DigitizationTool.h:120
SiHit.h
SG::ReadHandle
Definition: StoreGate/StoreGate/ReadHandle.h:70
SiChargedDiodeCollection::identifyHash
virtual IdentifierHash identifyHash() const override final
Definition: SiChargedDiodeCollection.h:236
SG::VarHandleBase::name
const std::string & name() const
Return the StoreGate ID for the referenced object.
Definition: AthToolSupport/AsgDataHandles/Root/VarHandleBase.cxx:75
HGTD_DigitizationTool.h
Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration.
SiCharge::track
@ track
Definition: SiCharge.h:28
AtlasHitsVector
Definition: AtlasHitsVector.h:33
HGTD_DigitizationTool::processAllSubEvents
virtual StatusCode processAllSubEvents(const EventContext &ctx) override final
alternative interface which uses the PileUpMergeSvc to obtain all the required SubEvents.
Definition: HGTD_DigitizationTool.cxx:62
InDetDD::HGTD_DetectorElement
Definition: HGTD_DetectorElement.h:40
SiChargedDiodeCollection::end
SiChargedDiodeIterator end()
Definition: SiChargedDiodeCollection.h:253
SiTotalCharge::charge
double charge() const
Definition: SiTotalCharge.h:118
HGTD_DigitizationTool::createRDOCollection
std::unique_ptr< HGTD_RDO_Collection > createRDOCollection(SiChargedDiodeCollection *) const
Definition: HGTD_DigitizationTool.cxx:337
InDetDD::SiCellId::phiIndex
int phiIndex() const
Get phi index. Equivalent to strip().
Definition: SiCellId.h:122
TimedHitPtr< SiHit >
ATH_MSG_VERBOSE
#define ATH_MSG_VERBOSE(x)
Definition: AthMsgStreamMacros.h:28
HGTD_DigitizationTool::m_sdo_collection_map
SG::WriteHandle< InDetSimDataCollection > m_sdo_collection_map
SDO Map handle.
Definition: HGTD_DigitizationTool.h:112
HepMC::ignoreTruthLink
bool ignoreTruthLink(const T &p, bool vetoPileUp)
Helper function for SDO creation in PileUpTools.
Definition: MagicNumbers.h:332
SiTotalCharge::list_t
std::vector< SiCharge > list_t
Definition: SiTotalCharge.h:31
SiChargedDiodeCollection::begin
SiChargedDiodeIterator begin()
Definition: SiChargedDiodeCollection.h:248
ISiChargedDiodesProcessorTool
Definition: ISiChargedDiodesProcessorTool.h:26
PileUpToolBase::m_vetoPileUpTruthLinks
Gaudi::Property< int > m_vetoPileUpTruthLinks
Definition: PileUpToolBase.h:58
SiChargedDiodeIterator
SiChargedDiodeMap::iterator SiChargedDiodeIterator
Definition: SiChargedDiodeCollection.h:70
HGTD_DigitizationTool::m_inputObjectName
std::string m_inputObjectName
Definition: HGTD_DigitizationTool.h:108
HGTD_ID::wafer_id
Identifier wafer_id(int endcap, int layer, int phi_module, int eta_module) const
For a single crystal.
Definition: HGTD_ID.h:287
PileUpMergeSvc::TimedList::type
std::list< value_t > type
type of the collection of timed data object
Definition: PileUpMergeSvc.h:75
SG::makeHandle
SG::ReadCondHandle< T > makeHandle(const SG::ReadCondHandleKey< T > &key, const EventContext &ctx=Gaudi::Hive::currentContext())
Definition: ReadCondHandle.h:270
HGTD_DigitizationTool::m_rndm_svc
ServiceHandle< IAthRNGSvc > m_rndm_svc
Random number service.
Definition: HGTD_DigitizationTool.h:117
ISiChargedDiodesProcessorTool.h
SiChargedDiode::totalCharge
const SiTotalCharge & totalCharge() const
Definition: SiChargedDiode.h:107
InDetDD::SiCellId::etaIndex
int etaIndex() const
Get eta index.
Definition: SiCellId.h:114
ATH_MSG_ERROR
#define ATH_MSG_ERROR(x)
Definition: AthMsgStreamMacros.h:33
HGTD_DigitizationTool::storeRDOCollection
StatusCode storeRDOCollection(std::unique_ptr< HGTD_RDO_Collection >)
Definition: HGTD_DigitizationTool.cxx:325
SG::ReadCondHandle::retrieve
const_pointer_type retrieve()
Definition: ReadCondHandle.h:162
SiChargedDiodeCollection
Definition: SiChargedDiodeCollection.h:109
HGTD_RDO_Collection::setIdentifier
void setIdentifier(Identifier id)
Definition: HGTD_RDO_Collection.h:29
HGTD_DigitizationTool::retrieveHitCollection
StatusCode retrieveHitCollection(const EventContext &ctx)
Retrieve the SiHit collection and place it in a TimedHitCollection.
Definition: HGTD_DigitizationTool.cxx:172
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
ATH_MSG_DEBUG
#define ATH_MSG_DEBUG(x)
Definition: AthMsgStreamMacros.h:29
SG::VarHandleBase::store
std::string store() const
Return the name of the store holding the object we are proxying.
Definition: StoreGate/src/VarHandleBase.cxx:376
HGTD_DetectorElement.h
HGTD_DigitizationTool::m_hgtd_front_end_tool
ToolHandle< IFrontEnd > m_hgtd_front_end_tool
Definition: HGTD_DigitizationTool.h:119
test_pyathena.parent
parent
Definition: test_pyathena.py:15
HGTD_DigitizationTool::m_merge_svc
ServiceHandle< PileUpMergeSvc > m_merge_svc
Definition: HGTD_DigitizationTool.h:116
ATH_CHECK
#define ATH_CHECK
Definition: AthCheckMacros.h:40
SG::VarHandleKey::initialize
StatusCode initialize(bool used=true)
If this object is used as a property, then this should be called during the initialize phase.
Definition: AthToolSupport/AsgDataHandles/Root/VarHandleKey.cxx:103
createCablingJSON.eta_index
int eta_index
Definition: createCablingJSON.py:9
HGTD_DigitizationTool::m_timed_hit_coll
std::unique_ptr< TimedHitCollection< SiHit > > m_timed_hit_coll
Definition: HGTD_DigitizationTool.h:126
SG::ReadHandle::isValid
virtual bool isValid() override final
Can the handle be successfully dereferenced?
HGTD_DigitizationTool::applyProcessorTools
void applyProcessorTools(SiChargedDiodeCollection *, CLHEP::HepRandomEngine *rndmEngine) const
FIXME: will be implemented once we know how much noise we expect.
Definition: HGTD_DigitizationTool.cxx:302
PileUpToolBase
Definition: PileUpToolBase.h:18
HGTD_ID::wafer_hash_max
size_type wafer_hash_max(void) const
Definition: HGTD_ID.cxx:832
python.PyKernel.detStore
detStore
Definition: PyKernel.py:41
HGTD_DigitizationTool::digitizeHitsPerDetectorElement
StatusCode digitizeHitsPerDetectorElement(const EventContext &ctx, CLHEP::HepRandomEngine *rndmEngine)
Definition: HGTD_DigitizationTool.cxx:231
HGTD_DigitizationTool::m_HGTDDetEleCollKey
SG::ReadCondHandleKey< InDetDD::HGTD_DetectorElementCollection > m_HGTDDetEleCollKey
Definition: HGTD_DigitizationTool.h:114
mc.proc
proc
Definition: mc.PhPy8EG_A14NNPDF23_gg4l_example.py:22
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:221
ATHRNG::RNGWrapper
A wrapper class for event-slot-local random engines.
Definition: RNGWrapper.h:56
HGTD_RDO_Collection::identifierHash
const IdentifierHash & identifierHash() const
Definition: HGTD_RDO_Collection.h:31
HGTD_DigitizationTool::m_hit_coll_ptrs
std::vector< std::unique_ptr< SiHitCollection > > m_hit_coll_ptrs
Definition: HGTD_DigitizationTool.h:133
Muon::IDC_Helper::addCollection
IDC::IDENTIFIABLE * addCollection(const Identifier collId, IDC *idc, const IDHELPER &idHelper, MsgStream &log)
charge
double charge(const T &p)
Definition: AtlasPID.h:538
HGTD_ID.h
HGTD_DigitizationTool::m_output_rdo_cont_key
SG::WriteHandleKey< HGTD_RDO_Container > m_output_rdo_cont_key
Definition: HGTD_DigitizationTool.h:111
DataVector::push_back
value_type push_back(value_type pElem)
Add an element to the end of the collection.
SG::CondHandleKey::initialize
StatusCode initialize(bool used=true)
HGTD_ID::pixel_id
Identifier pixel_id(int endcap, int layer, int phi_module, int eta_module, int phi_index, int eta_index) const
For an individual pixel.
Definition: HGTD_ID.h:331
ATHRNG::RNGWrapper::getEngine
CLHEP::HepRandomEngine * getEngine(const EventContext &ctx) const
Retrieve the random engine corresponding to the provided EventContext.
Definition: RNGWrapper.h:134
RNGWrapper.h
HGTD_DigitizationTool::createAndStoreSDO
void createAndStoreSDO(SiChargedDiodeCollection *collection)
Definition: HGTD_DigitizationTool.cxx:399
SG::WriteHandle::record
StatusCode record(std::unique_ptr< T > data)
Record a const object to the store.
SiTotalCharge
Definition: SiTotalCharge.h:24
IFrontEnd.h
InDetSimDataCollection.h
python.CaloScaleNoiseConfig.type
type
Definition: CaloScaleNoiseConfig.py:78
HGTD_DigitizationTool::m_diode_processor_tools
std::list< ISiChargedDiodesProcessorTool * > m_diode_processor_tools
Definition: HGTD_DigitizationTool.h:118
AtlasHitsVector::size
size_type size() const
Definition: AtlasHitsVector.h:143
SubEventIterator
std::vector< xAOD::EventInfo::SubEvent >::const_iterator SubEventIterator
Definition: IPileUpTool.h:22
InDetDD::SiReadoutCellId
Definition: SiReadoutCellId.h:42
HGTD_DigitizationTool::prepareEvent
virtual StatusCode prepareEvent(const EventContext &ctx, unsigned int) override final
called before the bunchXing loop
Definition: HGTD_DigitizationTool.cxx:153
IdentifierHash
This is a "hash" representation of an Identifier. This encodes a 32 bit index which can be used to lo...
Definition: IdentifierHash.h:25
InDetDD::HGTD_DetectorElementCollection
Definition: HGTD_DetectorElementCollection.h:29
InDetDD::HGTD_DetectorElementCollection::getDetectorElement
const HGTD_DetectorElement * getDetectorElement(const IdentifierHash &hash) const
Definition: HGTD_DetectorElementCollection.cxx:11
PileUpTimeEventIndex
a struct encapsulating the identifier of a pile-up event
Definition: PileUpTimeEventIndex.h:12
HGTD_DigitizationTool::HGTD_DigitizationTool
HGTD_DigitizationTool(const std::string &type, const std::string &name, const IInterface *parent)
Definition: HGTD_DigitizationTool.cxx:22
HGTD_DigitizationTool::m_charge_threshold
FloatProperty m_charge_threshold
Definition: HGTD_DigitizationTool.h:104
TimedHitCollection
Definition: TimedHitCollection.h:15
HepMC::no_truth_link
bool no_truth_link(const T &p)
Method to establish if a if the object is linked to something which was never saved to the HepMC Trut...
Definition: MagicNumbers.h:329
HGTD_DigitizationTool::m_hgtd_rdo_container
SG::WriteHandle< HGTD_RDO_Container > m_hgtd_rdo_container
RDO container handle.
Definition: HGTD_DigitizationTool.h:110
HGTD_DigitizationTool::m_onlyUseContainerName
BooleanProperty m_onlyUseContainerName
Definition: HGTD_DigitizationTool.h:106
SiChargedDiodeCollection.h
HGTD_DigitizationTool::m_processed_elements
std::vector< bool > m_processed_elements
In order to process all element rather than just those with hits we create a vector to keep track of ...
Definition: HGTD_DigitizationTool.h:131
SiChargedDiodeCollection::identify
virtual Identifier identify() const override final
Definition: SiChargedDiodeCollection.h:230
Identifier
Definition: IdentifierFieldParser.cxx:14