ATLAS Offline Software
Public Member Functions | Protected Attributes | Private Member Functions | Private Attributes | List of all members
TgcDigitizationTool Class Reference

#include <TgcDigitizationTool.h>

Inheritance diagram for TgcDigitizationTool:
Collaboration diagram for TgcDigitizationTool:

Public Member Functions

 TgcDigitizationTool (const std::string &type, const std::string &name, const IInterface *parent)
 
virtual StatusCode initialize () override final
 Initialize. More...
 
virtual StatusCode prepareEvent (const EventContext &ctx, unsigned int) override final
 
virtual StatusCode processBunchXing (int bunchXing, SubEventIterator bSubEvents, SubEventIterator eSubEvents) override final
 called for each active bunch-crossing to process current SubEvents bunchXing is in ns More...
 
virtual StatusCode mergeEvent (const EventContext &ctx) override final
 called at the end of the subevts loop. More...
 
virtual StatusCode processAllSubEvents (const EventContext &ctx) override final
 alternative interface which uses the PileUpMergeSvc to obtain all the required SubEvents. More...
 
virtual StatusCode finalize () override final
 Finalize. More...
 

Protected Attributes

ServiceHandle< PileUpMergeSvcm_mergeSvc
 
ServiceHandle< IAthRNGSvcm_rndmSvc
 

Private Member Functions

StatusCode getNextEvent (const EventContext &ctx)
 Get next event and extract collection of hit collections. More...
 
StatusCode digitizeCore (const EventContext &ctx)
 Core part of digitization used by processAllSubEvents and mergeEvent. More...
 

Private Attributes

const TgcHitIdHelperm_hitIdHelper {}
 
const TgcIdHelperm_idHelper {}
 
const MuonGM::MuonDetectorManagerm_mdManager {}
 
TgcDigitMakerm_digitizer {}
 
TimedHitCollection< TGCSimHit > * m_thpcTGC {}
 
std::list< TGCSimHitCollection * > m_TGCHitCollList
 
Gaudi::Property< bool > m_onlyUseContainerName
 
Gaudi::Property< bool > m_doFourBunchDigitization
 
SG::ReadHandleKey< TGCSimHitCollectionm_hitsContainerKey
 
std::string m_inputHitCollectionName {""}
 
SG::ReadCondHandleKey< TgcDigitASDposDatam_readCondKey_ASDpos
 
SG::ReadCondHandleKey< TgcDigitTimeOffsetDatam_readCondKey_TimeOffset
 
SG::ReadCondHandleKey< TgcDigitCrosstalkDatam_readCondKey_Crosstalk
 
SG::WriteHandleKey< TgcDigitContainerm_outputDigitCollectionKey
 
SG::WriteHandleKey< MuonSimDataCollectionm_outputSDO_CollectionKey
 
Gaudi::Property< bool > m_includePileUpTruth
 

structors and AlgTool implementation

Gaudi::Property< int > m_firstXing
 
Gaudi::Property< int > m_lastXing
 
Gaudi::Property< int > m_vetoPileUpTruthLinks
 
bool m_filterPassed {true}
 
virtual bool toProcess (int bunchXing) const override
 the method this base class helps implementing More...
 
virtual StatusCode processAllSubEvents (const EventContext &ctx)=0
 dummy implementation to allow compilation while all Digitization packages are migrated to use this new interface. More...
 
virtual bool filterPassed () const override
 dummy implementation of passing filter More...
 
virtual void resetFilter () override
 dummy implementation of filter reset More...
 

Detailed Description

Definition at line 41 of file TgcDigitizationTool.h.

Constructor & Destructor Documentation

◆ TgcDigitizationTool()

TgcDigitizationTool::TgcDigitizationTool ( const std::string &  type,
const std::string &  name,
const IInterface *  parent 
)

Definition at line 29 of file TgcDigitizationTool.cxx.

Member Function Documentation

◆ digitizeCore()

StatusCode TgcDigitizationTool::digitizeCore ( const EventContext &  ctx)
private

Core part of digitization used by processAllSubEvents and mergeEvent.

NOTE:

Since not every hit might end up resulting in a digit, this construction might take place after the hit loop in a loop of its own!

Definition at line 290 of file TgcDigitizationTool.cxx.

290  {
291 
292  ATHRNG::RNGWrapper* rngWrapper = m_rndmSvc->getEngine(this);
293  rngWrapper->setSeed(name(), ctx);
294  CLHEP::HepRandomEngine* rndmEngine = rngWrapper->getEngine(ctx);
295 
296  // create and record the Digit container in StoreGate
297  SG::WriteHandle<TgcDigitContainer> digitContainer(
299  ATH_CHECK(digitContainer.record(
300  std::make_unique<TgcDigitContainer>(m_idHelper->module_hash_max())));
301  ATH_MSG_DEBUG("TgcDigitContainer recorded in StoreGate.");
302 
303  // Create and record the SDO container in StoreGate
306  ATH_CHECK(sdoContainer.record(std::make_unique<MuonSimDataCollection>()));
307  ATH_MSG_DEBUG("TgcSDOCollection recorded in StoreGate.");
308 
309  // get the iterator pairs for this DetEl
310  // iterate over hits and fill id-keyed drift time map
311  IdContext tgcContext = m_idHelper->module_context();
312 
313  // Read needed conditions data
314  const TgcDigitASDposData* ASDpos{};
315  if (!m_readCondKey_ASDpos.empty()) {
316  SG::ReadCondHandle<TgcDigitASDposData> readHandle_ASDpos{
317  m_readCondKey_ASDpos, ctx};
318  ASDpos = readHandle_ASDpos.cptr();
319  } else {
321  "ASD Position parameters /TGC/DIGIT/ASDPOS must be available for "
322  "TGC_Digitization. Check the configuration!");
323  }
324  const TgcDigitTimeOffsetData* TOffset{};
326  SG::ReadCondHandle<TgcDigitTimeOffsetData> readHandle_TimeOffset{
328  TOffset = readHandle_TimeOffset.cptr();
329  } else {
331  "Timing Offset parameters /TGC/DIGIT/TOFFSET must be available for "
332  "TGC_Digitization. Check the configuration!");
333  }
334  const TgcDigitCrosstalkData* Crosstalk{};
336  SG::ReadCondHandle<TgcDigitCrosstalkData> readHandle_Crosstalk{
338  Crosstalk = readHandle_Crosstalk.cptr();
339  } else {
341  "/TGC/DIGIT/XTALK is not provided. Probabilities of TGC channel "
342  "crosstalk will be zero.");
343  }
344 
345  std::vector<std::unique_ptr<TgcDigitCollection> > collections;
346 
348  while (m_thpcTGC->nextDetectorElement(i, e)) {
349  ATH_MSG_DEBUG("TgcDigitizationTool::digitizeCore next element");
350 
351  // Loop over the hits:
352  while (i != e) {
353  TimedHitPtr<TGCSimHit> phit = *i++;
354  const TGCSimHit& hit = *phit;
355  double globalHitTime = hitTime(phit);
356  double tof = phit->globalTime();
358  &hit, globalHitTime, ASDpos, TOffset, Crosstalk, rndmEngine);
359 
360  if (!digiHits)
361  continue;
362 
364  for (it_digiHits = digiHits->begin();
365  it_digiHits != digiHits->end(); ++it_digiHits) {
366 
375  Identifier newDigiId = (*it_digiHits)->identify();
376  uint16_t newBcTag = (*it_digiHits)->bcTag();
377  Identifier elemId = m_idHelper->elementID(newDigiId);
378 
379  TgcDigitCollection* digitCollection = nullptr;
380 
381  IdentifierHash coll_hash;
382  if (m_idHelper->get_hash(elemId, coll_hash, &tgcContext)) {
384  "Unable to get TGC hash id from TGC Digit collection "
385  << "context begin_index = " << tgcContext.begin_index()
386  << " context end_index = " << tgcContext.end_index()
387  << " the identifier is ");
388  elemId.show();
389  }
390 
391  // make new TgcDigit and record it in StoreGate
392  auto newDigit = std::make_unique<TgcDigit>(newDigiId, newBcTag);
393 
394  // record the digit container in StoreGate
395  bool duplicate = false;
396  if (coll_hash >= collections.size()) {
397  collections.resize(coll_hash + 1);
398  }
399  digitCollection = collections[coll_hash].get();
400  if (nullptr == digitCollection) {
401  collections[coll_hash] =
402  std::make_unique<TgcDigitCollection>(elemId, coll_hash);
403  digitCollection = collections[coll_hash].get();
404  ATH_MSG_DEBUG("Digit Id(1st) = "
405  << m_idHelper->show_to_string(newDigiId)
406  << " BC tag = " << newBcTag
407  << " Coll. key = " << coll_hash);
408  digitCollection->push_back(std::move(newDigit));
409  } else {
410  // to avoid to store digits with identical id
412  for (it_tgcDigit = digitCollection->begin();
413  it_tgcDigit != digitCollection->end(); ++it_tgcDigit) {
414  if (newDigiId == (*it_tgcDigit)->identify() &&
415  newBcTag == (*it_tgcDigit)->bcTag()) {
416  duplicate = true;
417  IdContext context = m_idHelper->channel_context();
418  ATH_MSG_DEBUG("Duplicate digit(removed) = "
420  newDigiId, &context)
421  << " BC tag = " << newBcTag);
422  newDigit.reset();
423  break;
424  }
425  }
426  if (!duplicate) {
427  digitCollection->push_back(std::move(newDigit));
428  ATH_MSG_DEBUG("Digit Id= "
429  << m_idHelper->show_to_string(newDigiId)
430  << " BC tag = " << newBcTag);
431  }
432  }
433 
434  if (!duplicate) {
435  static const double invalid_pos = -99999.;
436  Amg::Vector3D gpos(invalid_pos, invalid_pos, invalid_pos);
437  const MuonGM::TgcReadoutElement* tgcChamber =
438  m_mdManager->getTgcReadoutElement(newDigiId);
439  if (tgcChamber) {
440  gpos = tgcChamber->localToGlobalTransf(newDigiId) * hit.localPosition();
441  }
442 
443  // fill the SDO collection in StoreGate if not pile-up
444  if (!m_includePileUpTruth &&
445  HepMC::ignoreTruthLink(phit->particleLink(),
447  continue;
448  }
449 
450  // link to MC info
451  // create here deposit for MuonSimData, link and tof
452  std::vector<MuonSimData::Deposit> deposits;
453  deposits.emplace_back(
454  HepMcParticleLink::getRedirectedLink(phit->particleLink(), phit.eventId(), ctx), // This link should now correctly resolve to the TruthEvent McEventCollection in the main StoreGateSvc.
455  MuonMCData(tof, 0));
456  MuonSimData simData(deposits, 0);
457  simData.setPosition(gpos);
458  simData.setTime(hitTime(phit));
459  sdoContainer->insert(std::make_pair(newDigiId, simData));
460  }
461  }
462  delete digiHits;
463  digiHits = nullptr;
464  } // while(i != e)
465  } // while(m_thpcTGC->nextDetectorElement(i, e))
466 
467  for (size_t coll_hash = 0; coll_hash < collections.size(); ++coll_hash) {
468  if (collections[coll_hash]) {
469  ATH_CHECK(digitContainer->addCollection(
470  collections[coll_hash].release(), coll_hash));
471  }
472  }
473 
474  return StatusCode::SUCCESS;
475 }

◆ filterPassed()

virtual bool PileUpToolBase::filterPassed ( ) const
inlineoverridevirtualinherited

dummy implementation of passing filter

Definition at line 49 of file PileUpToolBase.h.

49 { return m_filterPassed; }

◆ finalize()

StatusCode TgcDigitizationTool::finalize ( )
finaloverridevirtual

Finalize.

Definition at line 216 of file TgcDigitizationTool.cxx.

216  {
217  ATH_MSG_DEBUG("finalize.");
218 
219  delete m_digitizer;
220  m_digitizer = nullptr;
221 
222  return StatusCode::SUCCESS;
223 }

◆ getNextEvent()

StatusCode TgcDigitizationTool::getNextEvent ( const EventContext &  ctx)
private

Get next event and extract collection of hit collections.

Definition at line 227 of file TgcDigitizationTool.cxx.

227  {
228  // initialize pointer
229  m_thpcTGC = nullptr;
230 
231  // get the container(s)
232  using TimedHitCollList =
234 
235  // In case of single hits container just load the collection using read
236  // handles
237  if (!m_onlyUseContainerName) {
239  ctx);
240  if (!hitCollection.isValid()) {
241  ATH_MSG_ERROR("Could not get TGCSimHitCollection container "
242  << hitCollection.name() << " from store "
243  << hitCollection.store());
244  return StatusCode::FAILURE;
245  }
246 
247  // create a new hits collection
249  m_thpcTGC->insert(0, hitCollection.cptr());
250  ATH_MSG_DEBUG("TGCSimHitCollection found with " << hitCollection->size()
251  << " hits");
252 
253  return StatusCode::SUCCESS;
254  }
255 
256  // this is a list<pair<time_t, DataLink<TGCSimHitCollection> > >
257  TimedHitCollList hitCollList;
258 
259  if (!(m_mergeSvc->retrieveSubEvtsData(m_inputHitCollectionName, hitCollList)
260  .isSuccess())) {
261  ATH_MSG_FATAL("Could not fill TimedHitCollList");
262  return StatusCode::FAILURE;
263  }
264  if (hitCollList.empty()) {
265  ATH_MSG_FATAL("TimedHitCollList has size 0");
266  return StatusCode::FAILURE;
267  } else {
268  ATH_MSG_DEBUG(hitCollList.size()
269  << " TGCSimHitCollections with key "
270  << m_inputHitCollectionName << " found");
271  }
272 
273  // create a new hits collection
275 
276  // now merge all collections into one
277  TimedHitCollList::iterator iColl = hitCollList.begin();
278  TimedHitCollList::iterator endColl = hitCollList.end();
279  while (iColl != endColl) {
280  const TGCSimHitCollection* p_collection = iColl->second;
281  m_thpcTGC->insert(iColl->first, p_collection);
282  ATH_MSG_DEBUG("TGCSimHitCollection found with "
283  << p_collection->size()
284  << " hits"); // loop on the hit collections
285  ++iColl;
286  }
287  return StatusCode::SUCCESS;
288 }

◆ initialize()

StatusCode TgcDigitizationTool::initialize ( )
finaloverridevirtual

Initialize.

Reimplemented from PileUpToolBase.

Definition at line 35 of file TgcDigitizationTool.cxx.

35  {
36  // retrieve MuonDetctorManager from DetectorStore
38  ATH_MSG_DEBUG("Retrieved MuonDetectorManager from DetectorStore.");
39 
41  ATH_CHECK(m_mergeSvc.retrieve());
42  }
43 
44  // initialize the TgcIdHelper
46  if (!m_idHelper) {
47  ATH_MSG_WARNING("tgcIdHelper could not be retrieved.");
48  return StatusCode::FAILURE;
49  }
50 
51  // TgcHitIdHelper
53 
54  // check the input object name
55  if (m_hitsContainerKey.key().empty()) {
56  ATH_MSG_FATAL("Property InputObjectName not set !");
57  return StatusCode::FAILURE;
58  }
61  ATH_MSG_DEBUG("Input objects in container : '" << m_inputHitCollectionName
62  << "'");
63 
64  // Initialize Read(Cond)HandleKey
65  ATH_CHECK(m_hitsContainerKey.initialize(true));
67  ATH_CHECK(
69  ATH_CHECK(
71 
72  // initialize the output WriteHandleKeys
75  ATH_MSG_DEBUG("Output Digits: '" << m_outputDigitCollectionKey.key()
76  << "'");
77 
78  ATH_MSG_DEBUG("IncludePileUpTruth: " << m_includePileUpTruth);
79  ATH_MSG_DEBUG("VetoPileUpTruthLinks: " << m_vetoPileUpTruthLinks);
80 
81  const IGeoModelSvc* geoModel = nullptr;
82  CHECK(service("GeoModelSvc", geoModel));
83  std::string atlasVersion = geoModel->atlasVersion();
84 
85  IRDBAccessSvc* rdbAccess = nullptr;
86  CHECK(service("RDBAccessSvc", rdbAccess));
87 
88  IRDBRecordset_ptr atlasCommonRec =
89  rdbAccess->getRecordsetPtr("AtlasCommon", atlasVersion, "ATLAS");
90  unsigned int runperiod = 1;
91  if (atlasCommonRec->size() == 0)
92  runperiod = 1;
93  else {
94  std::string configVal = (*atlasCommonRec)[0]->getString("CONFIG");
95  if (configVal == "RUN1")
96  runperiod = 1;
97  else if (configVal == "RUN2")
98  runperiod = 2;
99  else if (configVal == "RUN3")
100  runperiod =
101  3; // currently runperiod 3 means no masking => ok for upgrade
102  else if (configVal == "RUN4")
103  runperiod =
104  3; // currently runperiod 3 means no masking => ok for upgrade
105  else {
107  "Unexpected value for geometry config read from the database: "
108  << configVal);
109  return StatusCode::FAILURE;
110  }
111  }
112 
113  // initialize class to execute digitization
116  m_digitizer->setLevel(static_cast<MSG::Level>(msgLevel()));
117  ATH_CHECK(m_rndmSvc.retrieve());
118 
120 
121  return StatusCode::SUCCESS;
122 }

◆ mergeEvent()

StatusCode TgcDigitizationTool::mergeEvent ( const EventContext &  ctx)
finaloverridevirtual

called at the end of the subevts loop.

Not (necessarily) able to access SubEvents (IPileUpTool)

Definition at line 180 of file TgcDigitizationTool.cxx.

180  {
181  ATH_MSG_DEBUG("TgcDigitizationTool::mergeEvent()");
182 
183  ATH_CHECK(digitizeCore(ctx));
184  // reset the pointer (delete null pointer should be safe)
185  delete m_thpcTGC;
186  m_thpcTGC = nullptr;
187 
189  m_TGCHitCollList.begin();
191  m_TGCHitCollList.end();
192  while (TGCHitColl != TGCHitCollEnd) {
193  delete (*TGCHitColl);
194  ++TGCHitColl;
195  }
196  m_TGCHitCollList.clear();
197 
198  return StatusCode::SUCCESS;
199 }

◆ prepareEvent()

StatusCode TgcDigitizationTool::prepareEvent ( const EventContext &  ctx,
unsigned int   
)
finaloverridevirtual

Definition at line 125 of file TgcDigitizationTool.cxx.

126  {
127  m_TGCHitCollList.clear();
129 
130  return StatusCode::SUCCESS;
131 }

◆ processAllSubEvents() [1/2]

StatusCode TgcDigitizationTool::processAllSubEvents ( const EventContext &  ctx)
finaloverridevirtual

alternative interface which uses the PileUpMergeSvc to obtain all the required SubEvents.

Reads GEANT4 hits from StoreGate in each of detector components corresponding to TGC modules which are triplets or doublets. A triplet has tree sensitive volumes and a double has two. This method calls TgcDigitMaker::executeDigi, which digitizes every hit, for every readout element, i.e., a sensitive volume of a chamber.

Reimplemented from PileUpToolBase.

Definition at line 202 of file TgcDigitizationTool.cxx.

202  {
203  ATH_MSG_DEBUG("TgcDigitizationTool::processAllSubEvents()");
204  // merging of the hit collection in getNextEvent method
205  if (!m_thpcTGC) {
206  ATH_CHECK(getNextEvent(ctx));
207  }
208  ATH_CHECK(digitizeCore(ctx));
209  // reset the pointer (delete null pointer should be safe)
210  delete m_thpcTGC;
211  m_thpcTGC = nullptr;
212  return StatusCode::SUCCESS;
213 }

◆ processAllSubEvents() [2/2]

virtual StatusCode IPileUpTool::processAllSubEvents
inherited

dummy implementation to allow compilation while all Digitization packages are migrated to use this new interface.

◆ processBunchXing()

StatusCode TgcDigitizationTool::processBunchXing ( int  bunchXing,
SubEventIterator  bSubEvents,
SubEventIterator  eSubEvents 
)
finaloverridevirtual

called for each active bunch-crossing to process current SubEvents bunchXing is in ns

Reimplemented from PileUpToolBase.

Definition at line 134 of file TgcDigitizationTool.cxx.

136  {
137  ATH_MSG_DEBUG("TgcDigitizationTool::processBunchXing() " << bunchXing);
138 
140  TimedHitCollList;
141  TimedHitCollList hitCollList;
142 
143  if (!(m_mergeSvc
144  ->retrieveSubSetEvtData(m_inputHitCollectionName, hitCollList,
145  bunchXing, bSubEvents, eSubEvents)
146  .isSuccess()) &&
147  hitCollList.empty()) {
148  ATH_MSG_ERROR("Could not fill TimedHitCollList");
149  return StatusCode::FAILURE;
150  } else {
151  ATH_MSG_VERBOSE(hitCollList.size()
152  << " TGCSimHitCollection with key "
153  << m_inputHitCollectionName << " found");
154  }
155 
156  TimedHitCollList::iterator iColl(hitCollList.begin());
157  TimedHitCollList::iterator endColl(hitCollList.end());
158 
159  // Iterating over the list of collections
160  for (; iColl != endColl; ++iColl) {
161 
162  TGCSimHitCollection* hitCollPtr =
163  new TGCSimHitCollection(*iColl->second);
164  PileUpTimeEventIndex timeIndex(iColl->first);
165 
166  ATH_MSG_DEBUG("TGCSimHitCollection found with " << hitCollPtr->size()
167  << " hits");
168  ATH_MSG_VERBOSE("time index info. time: "
169  << timeIndex.time() << " index: " << timeIndex.index()
170  << " type: " << timeIndex.type());
171 
172  m_thpcTGC->insert(timeIndex, hitCollPtr);
173  m_TGCHitCollList.push_back(hitCollPtr);
174  }
175 
176  return StatusCode::SUCCESS;
177 }

◆ resetFilter()

virtual void PileUpToolBase::resetFilter ( )
inlineoverridevirtualinherited

dummy implementation of filter reset

Reimplemented in MergeTruthJetsTool.

Definition at line 51 of file PileUpToolBase.h.

51 { m_filterPassed=true; }

◆ toProcess()

virtual bool PileUpToolBase::toProcess ( int  bunchXing) const
inlineoverridevirtualinherited

the method this base class helps implementing

Reimplemented in MergeHijingParsTool, and MergeTrackRecordCollTool.

Definition at line 32 of file PileUpToolBase.h.

32  {
33  //closed interval [m_firstXing,m_lastXing]
34  return !((m_firstXing > bunchXing) || (bunchXing > m_lastXing));
35  }

Member Data Documentation

◆ m_digitizer

TgcDigitMaker* TgcDigitizationTool::m_digitizer {}
private

Definition at line 90 of file TgcDigitizationTool.h.

◆ m_doFourBunchDigitization

Gaudi::Property<bool> TgcDigitizationTool::m_doFourBunchDigitization
private
Initial value:
{
this, "FourBunchDigitization", true,
"Do the four bunch digitization since Run-3"}

Definition at line 98 of file TgcDigitizationTool.h.

◆ m_filterPassed

bool PileUpToolBase::m_filterPassed {true}
protectedinherited

Definition at line 60 of file PileUpToolBase.h.

◆ m_firstXing

Gaudi::Property<int> PileUpToolBase::m_firstXing
protectedinherited
Initial value:
{this, "FirstXing", -999,
"First bunch-crossing in which det is live"}

Definition at line 54 of file PileUpToolBase.h.

◆ m_hitIdHelper

const TgcHitIdHelper* TgcDigitizationTool::m_hitIdHelper {}
private

Definition at line 87 of file TgcDigitizationTool.h.

◆ m_hitsContainerKey

SG::ReadHandleKey<TGCSimHitCollection> TgcDigitizationTool::m_hitsContainerKey
private
Initial value:
{
this, "InputObjectName", "TGC_Hits", "name of the input object"}

Definition at line 101 of file TgcDigitizationTool.h.

◆ m_idHelper

const TgcIdHelper* TgcDigitizationTool::m_idHelper {}
private

Definition at line 88 of file TgcDigitizationTool.h.

◆ m_includePileUpTruth

Gaudi::Property<bool> TgcDigitizationTool::m_includePileUpTruth
private
Initial value:
{this, "IncludePileUpTruth", true,
"Include pile-up truth info"}

Definition at line 123 of file TgcDigitizationTool.h.

◆ m_inputHitCollectionName

std::string TgcDigitizationTool::m_inputHitCollectionName {""}
private

Definition at line 103 of file TgcDigitizationTool.h.

◆ m_lastXing

Gaudi::Property<int> PileUpToolBase::m_lastXing
protectedinherited
Initial value:
{this, "LastXing", 999,
"Last bunch-crossing in which det is live"}

Definition at line 56 of file PileUpToolBase.h.

◆ m_mdManager

const MuonGM::MuonDetectorManager* TgcDigitizationTool::m_mdManager {}
private

Definition at line 89 of file TgcDigitizationTool.h.

◆ m_mergeSvc

ServiceHandle<PileUpMergeSvc> TgcDigitizationTool::m_mergeSvc
protected
Initial value:
{
this, "PileUpMergeSvc", "PileUpMergeSvc", ""}

Definition at line 81 of file TgcDigitizationTool.h.

◆ m_onlyUseContainerName

Gaudi::Property<bool> TgcDigitizationTool::m_onlyUseContainerName
private
Initial value:
{
this, "OnlyUseContainerName", true,
"Don't use the ReadHandleKey directly. Just extract the container name "
"from it."}

Definition at line 94 of file TgcDigitizationTool.h.

◆ m_outputDigitCollectionKey

SG::WriteHandleKey<TgcDigitContainer> TgcDigitizationTool::m_outputDigitCollectionKey
private
Initial value:
{
this, "OutputObjectName", "TGC_DIGITS",
"WriteHandleKey for Output TgcDigitContainer"}

Definition at line 113 of file TgcDigitizationTool.h.

◆ m_outputSDO_CollectionKey

SG::WriteHandleKey<MuonSimDataCollection> TgcDigitizationTool::m_outputSDO_CollectionKey
private
Initial value:
{
this, "OutputSDOName", "TGC_SDO",
"WriteHandleKey for Output MuonSimDataCollection"}

Definition at line 117 of file TgcDigitizationTool.h.

◆ m_readCondKey_ASDpos

SG::ReadCondHandleKey<TgcDigitASDposData> TgcDigitizationTool::m_readCondKey_ASDpos
private
Initial value:
{
this, "TGCDigitASDposKey", "",
"ReadCondHandleKey for TGCDigitASDposData"}

Definition at line 104 of file TgcDigitizationTool.h.

◆ m_readCondKey_Crosstalk

SG::ReadCondHandleKey<TgcDigitCrosstalkData> TgcDigitizationTool::m_readCondKey_Crosstalk
private
Initial value:
{
this, "TGCDigitCrosstalkKey", "",
"ReadCondHandleKey for TGCDigitCrosstalkData"}

Definition at line 110 of file TgcDigitizationTool.h.

◆ m_readCondKey_TimeOffset

SG::ReadCondHandleKey<TgcDigitTimeOffsetData> TgcDigitizationTool::m_readCondKey_TimeOffset
private
Initial value:
{
this, "TGCDigitTimeOffsetKey", "",
"ReadCondHandleKey for TGCDigitTimeOffsetData"}

Definition at line 107 of file TgcDigitizationTool.h.

◆ m_rndmSvc

ServiceHandle<IAthRNGSvc> TgcDigitizationTool::m_rndmSvc
protected
Initial value:
{this, "RndmSvc", "AthRNGSvc",
""}

Definition at line 83 of file TgcDigitizationTool.h.

◆ m_TGCHitCollList

std::list<TGCSimHitCollection*> TgcDigitizationTool::m_TGCHitCollList
private

Definition at line 92 of file TgcDigitizationTool.h.

◆ m_thpcTGC

TimedHitCollection<TGCSimHit>* TgcDigitizationTool::m_thpcTGC {}
private

Definition at line 91 of file TgcDigitizationTool.h.

◆ m_vetoPileUpTruthLinks

Gaudi::Property<int> PileUpToolBase::m_vetoPileUpTruthLinks
protectedinherited
Initial value:
{this, "VetoPileUpTruthLinks", true,
"Ignore links to suppressed pile-up truth"}

Definition at line 58 of file PileUpToolBase.h.


The documentation for this class was generated from the following files:
TgcDigitMaker
Definition: TgcDigitMaker.h:40
python.PyKernel.retrieve
def retrieve(aClass, aKey=None)
Definition: PyKernel.py:110
xAOD::iterator
JetConstituentVector::iterator iterator
Definition: JetConstituentVector.cxx:68
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
ATH_MSG_FATAL
#define ATH_MSG_FATAL(x)
Definition: AthMsgStreamMacros.h:34
DataModel_detail::const_iterator
Const iterator class for DataVector/DataList.
Definition: DVLIterator.h:82
SG::ReadCondHandle
Definition: ReadCondHandle.h:44
PileUpToolBase::m_filterPassed
bool m_filterPassed
Definition: PileUpToolBase.h:60
IRDBAccessSvc::getRecordsetPtr
virtual IRDBRecordset_ptr getRecordsetPtr(const std::string &node, const std::string &tag, const std::string &tag2node="", const std::string &connName="ATLASDD")=0
Provides access to the Recordset object containing HVS-tagged data.
IGeoModelSvc
Definition: IGeoModelSvc.h:17
TgcDigitTimeOffsetData
Definition: TgcDigitTimeOffsetData.h:20
TgcDigitizationTool::m_readCondKey_ASDpos
SG::ReadCondHandleKey< TgcDigitASDposData > m_readCondKey_ASDpos
Definition: TgcDigitizationTool.h:104
MuonIdHelper::channel_context
IdContext channel_context() const
id for channel
Definition: MuonIdHelper.cxx:745
SG::ReadHandle
Definition: StoreGate/StoreGate/ReadHandle.h:70
AtlasHitsVector
Definition: AtlasHitsVector.h:33
TGCSimHitCollection
AtlasHitsVector< TGCSimHit > TGCSimHitCollection
Definition: TGCSimHitCollection.h:15
TgcDigitizationTool::m_rndmSvc
ServiceHandle< IAthRNGSvc > m_rndmSvc
Definition: TgcDigitizationTool.h:83
TgcDigitCrosstalkData
Definition: TgcDigitCrosstalkData.h:22
IdContext::end_index
size_type end_index(void) const
Definition: IdContext.h:106
TgcDigitizationTool::m_hitIdHelper
const TgcHitIdHelper * m_hitIdHelper
Definition: TgcDigitizationTool.h:87
TimedHitPtr< TGCSimHit >
ATH_MSG_VERBOSE
#define ATH_MSG_VERBOSE(x)
Definition: AthMsgStreamMacros.h:28
SG::VarHandleKey::key
const std::string & key() const
Return the StoreGate ID for the referenced object.
Definition: AthToolSupport/AsgDataHandles/Root/VarHandleKey.cxx:141
PileUpToolBase::m_lastXing
Gaudi::Property< int > m_lastXing
Definition: PileUpToolBase.h:56
HepMC::ignoreTruthLink
bool ignoreTruthLink(const T &p, bool vetoPileUp)
Helper function for SDO creation in PileUpTools.
Definition: MagicNumbers.h:296
SG::VarHandleKey::empty
bool empty() const
Test if the key is blank.
Definition: AthToolSupport/AsgDataHandles/Root/VarHandleKey.cxx:150
TimedHitCollection::nextDetectorElement
bool nextDetectorElement(const_iterator &b, const_iterator &e)
sets an iterator range with the hits of current detector element returns a bool when done
TgcDigitizationTool::m_TGCHitCollList
std::list< TGCSimHitCollection * > m_TGCHitCollList
Definition: TgcDigitizationTool.h:92
PileUpToolBase::m_vetoPileUpTruthLinks
Gaudi::Property< int > m_vetoPileUpTruthLinks
Definition: PileUpToolBase.h:58
TgcDigitizationTool::m_readCondKey_Crosstalk
SG::ReadCondHandleKey< TgcDigitCrosstalkData > m_readCondKey_Crosstalk
Definition: TgcDigitizationTool.h:110
PileUpMergeSvc::TimedList::type
std::list< value_t > type
type of the collection of timed data object
Definition: PileUpMergeSvc.h:75
MuonGM::MuonDetectorManager::getTgcReadoutElement
const TgcReadoutElement * getTgcReadoutElement(const Identifier &id) const
access via extended identifier (requires unpacking)
Definition: MuonDetDescr/MuonReadoutGeometry/src/MuonDetectorManager.cxx:247
TGCSimHit::localPosition
const Amg::Vector3D & localPosition() const
Definition: TGCSimHit.h:43
TgcDigitMaker::initialize
StatusCode initialize()
Initializes TgcHitIdHelper, TgcIdHelper and random number of a stream for the digitization.
Definition: TgcDigitMaker.cxx:58
TgcDigitizationTool::m_mdManager
const MuonGM::MuonDetectorManager * m_mdManager
Definition: TgcDigitizationTool.h:89
AthMessaging::setLevel
void setLevel(MSG::Level lvl)
Change the current logging level.
Definition: AthMessaging.cxx:28
TgcDigitizationTool::m_digitizer
TgcDigitMaker * m_digitizer
Definition: TgcDigitizationTool.h:90
TrigConf::MSGTC::Level
Level
Definition: Trigger/TrigConfiguration/TrigConfBase/TrigConfBase/MsgStream.h:21
ATH_MSG_ERROR
#define ATH_MSG_ERROR(x)
Definition: AthMsgStreamMacros.h:33
TimedHitCollection::insert
void insert(const PileUpTimeEventIndex &timeEventIndex, const AtlasHitsVector< HIT > *inputCollection)
DeMoScan.runperiod
runperiod
Definition: DeMoScan.py:324
xAOD::uint16_t
setWord1 uint16_t
Definition: eFexEMRoI_v1.cxx:88
lumiFormat.i
int i
Definition: lumiFormat.py:92
Identifier
Definition: DetectorDescription/Identifier/Identifier/Identifier.h:32
IRDBAccessSvc
IRDBAccessSvc is an abstract interface to the athena service that provides the following functionalit...
Definition: IRDBAccessSvc.h:45
TgcDigitizationTool::m_mergeSvc
ServiceHandle< PileUpMergeSvc > m_mergeSvc
Definition: TgcDigitizationTool.h:81
ATH_MSG_DEBUG
#define ATH_MSG_DEBUG(x)
Definition: AthMsgStreamMacros.h:29
TgcDigitizationTool::m_doFourBunchDigitization
Gaudi::Property< bool > m_doFourBunchDigitization
Definition: TgcDigitizationTool.h:98
TgcDigitCollection
Definition: TgcDigitCollection.h:17
MuonGM::TgcReadoutElement
A TgcReadoutElement corresponds to a single TGC chamber; therefore typically a TGC station contains s...
Definition: MuonDetDescr/MuonReadoutGeometry/MuonReadoutGeometry/TgcReadoutElement.h:42
test_pyathena.parent
parent
Definition: test_pyathena.py:15
PileUpToolBase::PileUpToolBase
PileUpToolBase(const std::string &type, const std::string &name, const IInterface *parent)
Definition: PileUpToolBase.cxx:7
ATH_CHECK
#define ATH_CHECK
Definition: AthCheckMacros.h:40
CHECK
#define CHECK(...)
Evaluate an expression and check for errors.
Definition: Control/AthenaKernel/AthenaKernel/errorcheck.h:422
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
TgcHitIdHelper::GetHelper
static const TgcHitIdHelper * GetHelper()
Definition: TgcHitIdHelper.cxx:23
TgcDigitizationTool::m_hitsContainerKey
SG::ReadHandleKey< TGCSimHitCollection > m_hitsContainerKey
Definition: TgcDigitizationTool.h:101
TgcDigitASDposData
Definition: TgcDigitASDposData.h:24
Identifier::show
void show() const
Print out in hex form.
Definition: Identifier.cxx:36
IRDBRecordset_ptr
std::shared_ptr< IRDBRecordset > IRDBRecordset_ptr
Definition: IRDBAccessSvc.h:25
MuonGM::TgcReadoutElement::localToGlobalTransf
const Amg::Transform3D & localToGlobalTransf(const Identifier &id) const
Returns the local -> global transformation x-axis: Parallel to the wires (strips) if the Identifier b...
TgcDigitizationTool::digitizeCore
StatusCode digitizeCore(const EventContext &ctx)
Core part of digitization used by processAllSubEvents and mergeEvent.
Definition: TgcDigitizationTool.cxx:290
TgcIdHelper::elementID
Identifier elementID(int stationName, int stationEta, int stationPhi) const
Definition: TgcIdHelper.cxx:556
IdContext::begin_index
size_type begin_index(void) const
Definition: IdContext.h:100
python.PyKernel.detStore
detStore
Definition: PyKernel.py:41
MuonGM::MuonDetectorManager::tgcIdHelper
const TgcIdHelper * tgcIdHelper() const
Definition: MuonDetDescr/MuonReadoutGeometry/MuonReadoutGeometry/MuonDetectorManager.h:230
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:195
ATHRNG::RNGWrapper
A wrapper class for event-slot-local random engines.
Definition: RNGWrapper.h:56
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)
MuonSimData
Definition: MuonSimData.h:62
Amg::Vector3D
Eigen::Matrix< double, 3, 1 > Vector3D
Definition: GeoPrimitives.h:47
TgcDigitizationTool::m_thpcTGC
TimedHitCollection< TGCSimHit > * m_thpcTGC
Definition: TgcDigitizationTool.h:91
MuonIdHelper::module_hash_max
size_type module_hash_max() const
the maximum hash value
Definition: MuonIdHelper.cxx:752
ATHRNG::RNGWrapper::getEngine
CLHEP::HepRandomEngine * getEngine(const EventContext &ctx) const
Retrieve the random engine corresponding to the provided EventContext.
Definition: RNGWrapper.h:134
TGCSimHit
Definition: TGCSimHit.h:19
TgcDigitizationTool::m_inputHitCollectionName
std::string m_inputHitCollectionName
Definition: TgcDigitizationTool.h:103
DataVector::end
const_iterator end() const noexcept
Return a const_iterator pointing past the end of the collection.
SG::WriteHandle
Definition: StoreGate/StoreGate/WriteHandle.h:76
DiTauMassTools::MaxHistStrategyV2::e
e
Definition: PhysicsAnalysis/TauID/DiTauMassTools/DiTauMassTools/HelperFunctions.h:26
TgcDigitMaker::executeDigi
TgcDigitCollection * executeDigi(const TGCSimHit *hit, const double globalHitTime, const TgcDigitASDposData *ASDpos, const TgcDigitTimeOffsetData *TOffset, const TgcDigitCrosstalkData *Crosstalk, CLHEP::HepRandomEngine *rndmEngine)
A single hit can be digitized in the two directions independently: R and phi directions.
Definition: TgcDigitMaker.cxx:87
AtlasDetectorID::show_to_string
std::string show_to_string(Identifier id, const IdContext *context=0, char sep='.') const
or provide the printout in string form
Definition: AtlasDetectorID.cxx:574
TimedHitPtr::eventId
unsigned short eventId() const
the index of the component event in PileUpEventInfo.
Definition: TimedHitPtr.h:42
ATH_MSG_WARNING
#define ATH_MSG_WARNING(x)
Definition: AthMsgStreamMacros.h:32
MuonIdHelper::get_hash
virtual int get_hash(const Identifier &id, IdentifierHash &hash_id, const IdContext *context=0) const override
Create hash id from compact id (return == 0 for OK)
Definition: MuonIdHelper.cxx:143
python.CaloScaleNoiseConfig.type
type
Definition: CaloScaleNoiseConfig.py:78
TgcDigitizationTool::m_outputSDO_CollectionKey
SG::WriteHandleKey< MuonSimDataCollection > m_outputSDO_CollectionKey
Definition: TgcDigitizationTool.h:117
PileUpToolBase::m_firstXing
Gaudi::Property< int > m_firstXing
Definition: PileUpToolBase.h:54
MuonIdHelper::module_context
IdContext module_context() const
id for module
Definition: MuonIdHelper.cxx:735
TgcDigitizationTool::m_idHelper
const TgcIdHelper * m_idHelper
Definition: TgcDigitizationTool.h:88
TgcDigitizationTool::m_includePileUpTruth
Gaudi::Property< bool > m_includePileUpTruth
Definition: TgcDigitizationTool.h:123
AtlasHitsVector::size
size_type size() const
Definition: AtlasHitsVector.h:143
simData
constexpr bool simData
Definition: constants.h:36
hitTime
float hitTime(const AFP_SIDSimHit &hit)
Definition: AFP_SIDSimHit.h:39
TgcDigitizationTool::m_outputDigitCollectionKey
SG::WriteHandleKey< TgcDigitContainer > m_outputDigitCollectionKey
Definition: TgcDigitizationTool.h:113
IdentifierHash
Definition: IdentifierHash.h:38
TgcDigitizationTool::getNextEvent
StatusCode getNextEvent(const EventContext &ctx)
Get next event and extract collection of hit collections.
Definition: TgcDigitizationTool.cxx:227
TgcDigitizationTool::m_onlyUseContainerName
Gaudi::Property< bool > m_onlyUseContainerName
Definition: TgcDigitizationTool.h:94
IGeoModelSvc::atlasVersion
virtual const std::string & atlasVersion() const =0
PileUpTimeEventIndex
a struct encapsulating the identifier of a pile-up event
Definition: PileUpTimeEventIndex.h:12
TgcDigitizationTool::m_readCondKey_TimeOffset
SG::ReadCondHandleKey< TgcDigitTimeOffsetData > m_readCondKey_TimeOffset
Definition: TgcDigitizationTool.h:107
IdContext
class IdContext
Definition: IdContext.h:34
TimedHitCollection
Definition: TimedHitCollection.h:15
DataVector::begin
const_iterator begin() const noexcept
Return a const_iterator pointing at the beginning of the collection.
MuonMCData
Definition: MuonSimData.h:42