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

#include <SCT_DigitizationTool.h>

Inheritance diagram for SCT_DigitizationTool:
Collaboration diagram for SCT_DigitizationTool:

Public Member Functions

 SCT_DigitizationTool (const std::string &type, const std::string &name, const IInterface *parent)
 
virtual ~SCT_DigitizationTool ()
 
virtual StatusCode prepareEvent (const EventContext &ctx, unsigned int) override final
 Called before processing physics events. More...
 
virtual StatusCode processBunchXing (int bunchXing, SubEventIterator bSubEvents, SubEventIterator eSubEvents) override final
 
virtual StatusCode mergeEvent (const EventContext &ctx) override final
 
virtual StatusCode initialize () override final
 
virtual StatusCode processAllSubEvents (const EventContext &ctx) override final
 

Static Public Member Functions

static const InterfaceID & interfaceID ()
 

Protected Member Functions

bool digitizeElement (const EventContext &ctx, SiChargedDiodeCollection *chargedDiodes, TimedHitCollection< SiHit > *&thpcsi, CLHEP::HepRandomEngine *rndmEngine)
 
void applyProcessorTools (SiChargedDiodeCollection *chargedDiodes, CLHEP::HepRandomEngine *rndmEngine) const
 
void addSDO (SiChargedDiodeCollection *collection, SG::WriteHandle< InDetSimDataCollection > *simDataCollMap) const
 
void storeTool (ISiChargedDiodesProcessorTool *p_processor)
 

Private Member Functions

StatusCode initServices ()
 initialize the required services More...
 
StatusCode initFrontEndTool ()
 Initialize the SCT_FrontEnd AlgTool. More...
 
StatusCode initDisabledCells ()
 Initialize the SCT_RandomDisabledCellGenerator AlgTool. More...
 
StatusCode initSurfaceChargesGeneratorTool ()
 Initialize the SCT_SurfaceChargesGenerator AlgTool. More...
 
StatusCode createAndStoreRDO (SiChargedDiodeCollection *chDiodeCollection, SG::WriteHandle< SCT_RDO_Container > *rdoContainer) const
 RDO and SDO methods. More...
 
std::unique_ptr< SCT_RDO_CollectioncreateRDO (SiChargedDiodeCollection *collection) const
 Create RDOs from the SiChargedDiodeCollection for the current wafer. More...
 
StatusCode getNextEvent (const EventContext &ctx)
 
void digitizeAllHits (const EventContext &ctx, SG::WriteHandle< SCT_RDO_Container > *rdoContainer, SG::WriteHandle< InDetSimDataCollection > *simDataCollMap, std::vector< bool > *processedElements, TimedHitCollection< SiHit > *thpcsi, CLHEP::HepRandomEngine *rndmEngine)
 digitize all hits More...
 
void digitizeNonHits (const EventContext &ctx, SG::WriteHandle< SCT_RDO_Container > *rdoContainer, SG::WriteHandle< InDetSimDataCollection > *simDataCollMap, const std::vector< bool > *processedElements, CLHEP::HepRandomEngine *rndmEngine) const
 digitize SCT without hits More...
 
void SetupRdoOutputType (Gaudi::Details::PropertyBase &)
 Called when m_WriteSCT1_RawData is altered. More...
 

Private Attributes

FloatProperty m_tfix {this, "FixedTime", -999., "Fixed time for Cosmics run selection"}
 
BooleanProperty m_enableHits {this, "EnableHits", true, "Enable hits"}
 
BooleanProperty m_onlyHitElements {this, "OnlyHitElements", false, "Process only elements with hits"}
 
BooleanProperty m_cosmicsRun {this, "CosmicsRun", false, "Cosmics run selection"}
 
BooleanProperty m_barrelonly {this, "BarrelOnly", false, "Only Barrel layers"}
 
BooleanProperty m_randomDisabledCells {this, "RandomDisabledCells", false, "Use Random disabled cells, default no"}
 
BooleanProperty m_createNoiseSDO {this, "CreateNoiseSDO", false, "Create SDOs for strips with only noise hits (huge increase in SDO collection size"}
 
IntegerProperty m_HardScatterSplittingMode {this, "HardScatterSplittingMode", 0, "Control pileup & signal splitting. Process all SiHit or just those from signal or background events"}
 
BooleanProperty m_WriteSCT1_RawData {this, "WriteSCT1_RawData", false, "Write out SCT1_RawData rather than SCT3_RawData"}
 
BooleanProperty m_onlyUseContainerName {this, "OnlyUseContainerName", true, "Don't use the ReadHandleKey directly. Just extract the container name from it."}
 
SG::ReadHandleKey< SiHitCollectionm_hitsContainerKey {this, "InputObjectName", "SCT_Hits", "Input HITS collection name"}
 
std::string m_inputObjectName {""}
 
SG::WriteHandleKey< SCT_RDO_Containerm_rdoContainerKey {this, "OutputObjectName", "SCT_RDOs", "Output Object name"}
 
SG::WriteHandle< SCT_RDO_Containerm_rdoContainer
 RDO container handle. More...
 
SG::WriteHandleKey< InDetSimDataCollectionm_simDataCollMapKey {this, "OutputSDOName", "SCT_SDO_Map", "Output SDO container name"}
 
SG::WriteHandle< InDetSimDataCollectionm_simDataCollMap
 SDO Map handle. More...
 
SG::ReadCondHandleKey< InDetDD::SiDetectorElementCollectionm_SCTDetEleCollKey {this, "SCTDetEleCollKey", "SCT_DetectorElementCollection", "Key of SiDetectorElementCollection for SCT"}
 
ToolHandle< IFrontEndm_sct_FrontEnd {this, "FrontEnd", "SCT_FrontEnd", "Handle the Front End Electronic tool"}
 
ToolHandle< ISurfaceChargesGeneratorm_sct_SurfaceChargesGenerator {this, "SurfaceChargesGenerator", "SCT_SurfaceChargesGenerator", "Choice of using a more detailed charge drift model"}
 
ToolHandle< IRandomDisabledCellGeneratorm_sct_RandomDisabledCellGenerator {this, "RandomDisabledCellGenerator", "SCT_RandomDisabledCellGenerator", ""}
 
ServiceHandle< IAthRNGSvcm_rndmSvc {this, "RndmSvc", "AthRNGSvc", ""}
 Random number service. More...
 
ServiceHandle< PileUpMergeSvcm_mergeSvc {this, "MergeSvc", "PileUpMergeSvc", "Merge service used in Pixel & SCT digitization"}
 
const SCT_IDm_detID {nullptr}
 Handle to the ID helper. More...
 
std::unique_ptr< TimedHitCollection< SiHit > > m_thpcsi {nullptr}
 
std::vector< ISiChargedDiodesProcessorTool * > m_diodeCollectionTools
 
std::vector< bool > m_processedElements
 vector of processed elements - set by digitizeHits() *‍/ More...
 
std::vector< std::unique_ptr< SiHitCollection > > m_hitCollPtrs
 
bool m_HardScatterSplittingSkipper {false}
 

Detailed Description

Definition at line 53 of file SCT_DigitizationTool.h.

Constructor & Destructor Documentation

◆ SCT_DigitizationTool()

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

Definition at line 39 of file SCT_DigitizationTool.cxx.

41  :
42  base_class(type, name, parent) {
44 }

◆ ~SCT_DigitizationTool()

SCT_DigitizationTool::~SCT_DigitizationTool ( )
virtualdefault

Member Function Documentation

◆ addSDO()

void SCT_DigitizationTool::addSDO ( SiChargedDiodeCollection collection,
SG::WriteHandle< InDetSimDataCollection > *  simDataCollMap 
) const
protected

Definition at line 757 of file SCT_DigitizationTool.cxx.

757  {
758  using list_t = SiTotalCharge::list_t;
759  std::vector<InDetSimData::Deposit> deposits;
760  const InDetDD::SCT_ModuleSideDesign& sctDesign{dynamic_cast<const InDetDD::SCT_ModuleSideDesign&>(collection->design())};
761  const auto collectionid = collection->identify();
762  //Check for optimization
764  deposits.reserve(5); // no idea what a reasonable number for this would be
765  // with pileup
766  // loop over the charged diodes
767  const SiChargedDiodeIterator EndOfDiodeCollection{collection->end()};
768  for (SiChargedDiodeIterator i_chargedDiode{collection->begin()}; i_chargedDiode != EndOfDiodeCollection; ++i_chargedDiode) {
769  deposits.clear();
770  const list_t& charges{(*i_chargedDiode).second.totalCharge().chargeComposition()};
771 
772  bool real_particle_hit{false};
773  // loop over the list
774  const list_t::const_iterator EndOfChargeList{charges.end()};
775  for (list_t::const_iterator i_ListOfCharges{charges.begin()}; i_ListOfCharges != EndOfChargeList; ++i_ListOfCharges) {
776  const HepMcParticleLink& trkLink{i_ListOfCharges->particleLink()};
777  const int barcode{trkLink.barcode()};
778  if (HepMC::ignoreTruthLink(barcode, m_vetoPileUpTruthLinks)) {
779  continue;
780  }
781  if (!real_particle_hit) {
782  // Types of SiCharges expected from SCT
783  // Noise: barcode==0 and
784  // processType()==SiCharge::noise
785  // Delta Rays: barcode==0 and
786  // processType()==SiCharge::track
787  // Pile Up Tracks With No Truth: barcode!=0 and
788  // processType()==SiCharge::cut_track
789  // Tracks With Truth: barcode!=0 and
790  // processType()==SiCharge::track
791  if (!HepMC::no_truth_link(barcode) && i_ListOfCharges->processType() == SiCharge::track) {
792  real_particle_hit = true;
793  }
794  }
795  // check if this track number has been already used.
796  std::vector<InDetSimData::Deposit>::reverse_iterator theDeposit{deposits.rend()}; // dummy value
797  std::vector<InDetSimData::Deposit>::reverse_iterator depositsR_end{deposits.rend()};
798  std::vector<InDetSimData::Deposit>::reverse_iterator i_Deposit{deposits.rbegin()};
799  for (; i_Deposit != depositsR_end; ++i_Deposit) {
800  if ((*i_Deposit).first == trkLink) {
801  theDeposit = i_Deposit;
802  break;
803  }
804  }
805 
806  // if the charge has already hit the Diode add it to the deposit
807  if (theDeposit != depositsR_end) {
808  (*theDeposit).second += i_ListOfCharges->charge();
809  } else { // create a new deposit
810  deposits.emplace_back(trkLink, i_ListOfCharges->charge());
811  }
812  }
813 
814  // add the simdata object to the map:
815  if (real_particle_hit or m_createNoiseSDO) {
816  InDetDD::SiReadoutCellId roCell{(*i_chargedDiode).second.getReadoutCell()};
817  const int strip{roCell.strip()};
818  const int row2D{sctDesign.row(strip)};
819  Identifier id_readout = row2D < 0 ? m_detID->strip_id(collectionid,strip) : m_detID->strip_id(collectionid,row2D, sctDesign.strip(strip));
820  (*simDataCollMap)->try_emplace(id_readout, std::move(deposits),(*i_chargedDiode).second.flag());
821  }
822  }
823 }

◆ applyProcessorTools()

void SCT_DigitizationTool::applyProcessorTools ( SiChargedDiodeCollection chargedDiodes,
CLHEP::HepRandomEngine *  rndmEngine 
) const
protected

Definition at line 428 of file SCT_DigitizationTool.cxx.

428  {
429  ATH_MSG_DEBUG("applyProcessorTools()");
430  int processorNumber{0};
431 
433  proc->process(*chargedDiodes, rndmEngine);
434 
435  processorNumber++;
436  ATH_MSG_DEBUG("Applied processor # " << processorNumber);
437  }
438 }

◆ createAndStoreRDO()

StatusCode SCT_DigitizationTool::createAndStoreRDO ( SiChargedDiodeCollection chDiodeCollection,
SG::WriteHandle< SCT_RDO_Container > *  rdoContainer 
) const
private

RDO and SDO methods.

Create RDOs from the SiChargedDiodeCollection for the current wafer and save to StoreGate

Parameters
chDiodeCollectionlist of the SiChargedDiodes on the current wafer

Definition at line 527 of file SCT_DigitizationTool.cxx.

527  {
528 
529  // Create the RDO collection
530  std::unique_ptr<SCT_RDO_Collection> RDOColl{createRDO(chDiodeCollection)};
531  const IdentifierHash identifyHash{RDOColl->identifyHash()};
532 
533  // Add it to storegate
534  Identifier id_coll{RDOColl->identify()};
535  int barrelec{m_detID->barrel_ec(id_coll)};
536 
537  if ((not m_barrelonly) or (std::abs(barrelec) <= 1)) {
538  if ((*rdoContainer)->addCollection(RDOColl.release(), identifyHash).isFailure()) {
539  ATH_MSG_FATAL("SCT RDO collection could not be added to container!");
540  return StatusCode::FAILURE;
541  }
542  } else {
543  ATH_MSG_VERBOSE("Not saving SCT_RDO_Collection: " << m_detID->show_to_string(RDOColl->identify()) << " to container!");
544  }
545  return StatusCode::SUCCESS;
546 } // SCT_Digitization::createAndStoreRDO()

◆ createRDO()

std::unique_ptr< SCT_RDO_Collection > SCT_DigitizationTool::createRDO ( SiChargedDiodeCollection collection) const
private

Create RDOs from the SiChargedDiodeCollection for the current wafer.

Parameters
collectionlist of the SiChargedDiodes on the current wafer

Definition at line 551 of file SCT_DigitizationTool.cxx.

551  {
552 
553  // create a new SCT RDO collection
554  std::unique_ptr<SCT_RDO_Collection> p_rdocoll;
555 
556  // need the DE identifier
557  const Identifier id_de{collection->identify()};
558  IdentifierHash idHash_de{collection->identifyHash()};
559  try {
560  p_rdocoll = std::make_unique<SCT_RDO_Collection>(idHash_de);
561  } catch (const std::bad_alloc&) {
562  ATH_MSG_FATAL("Could not create a new SCT_RDORawDataCollection !");
563  }
564  p_rdocoll->setIdentifier(id_de);
565 
566  SiChargedDiodeIterator i_chargedDiode{collection->begin()};
567  const SiChargedDiodeIterator i_chargedDiode_end{collection->end()};
568  // Choice of producing SCT1_RawData or SCT3_RawData
569  if (m_WriteSCT1_RawData.value()) {
570  for (; i_chargedDiode != i_chargedDiode_end; ++i_chargedDiode) {
571  unsigned int flagmask{static_cast<unsigned int>((*i_chargedDiode).second.flag() & 0xFE)};
572 
573  if (!flagmask) { // now check it wasn't masked:
574  // create new SCT RDO, using method 1 for mask:
575  // GroupSize=1: need readout id, make use of
576  // SiTrackerDetDescr
577  InDetDD::SiReadoutCellId roCell{(*i_chargedDiode).second.getReadoutCell()};
578  int strip{roCell.strip()};
579  if (strip > 0xffff) { // In upgrade layouts strip can be bigger
580  // than 4000
581  ATH_MSG_FATAL("Strip number too big for SCT1 raw data format.");
582  }
583  const Identifier id_readout{m_detID->strip_id(collection->identify(), strip)};
584 
585  // build word, masks taken from SiTrackerEvent/SCTRawData.cxx
586  const unsigned int strip_rdo{static_cast<unsigned int>((strip & 0xFFFF) << 16)};
587 
588  // user can define what GroupSize is, here 1: TC. Incorrect,
589  // GroupSize >= 1
590  int size{SiHelper::GetStripNum((*i_chargedDiode).second)};
591  unsigned int size_rdo{static_cast<unsigned int>(size & 0xFFFF)};
592 
593  // TC. Need to check if there are disabled strips in the cluster
594  int cluscounter{0};
595  if (size > 1) {
596  SiChargedDiodeIterator it2{i_chargedDiode};
597  ++it2;
598  for (; it2 != i_chargedDiode_end; ++it2) {
599  ++cluscounter;
600  if (cluscounter >= size) {
601  break;
602  }
603  if (it2->second.flag() & 0xDE) {
604  int tmp{cluscounter};
605  while ((it2 != i_chargedDiode_end) and (cluscounter < size - 1) and (it2->second.flag() & 0xDE)) {
606  ++it2;
607  ++cluscounter;
608  }
609  if ((it2 != collection->end()) and !(it2->second.flag() & 0xDE)) {
610  SiHelper::ClusterUsed(it2->second, false);
611  SiHelper::SetStripNum(it2->second, size - cluscounter, &msg());
612  }
613  // groupSize=tmp;
614  size_rdo = tmp & 0xFFFF;
615  break;
616  }
617  }
618  }
619  unsigned int SCT_Word{strip_rdo | size_rdo};
620  SCT1_RawData* p_rdo{new SCT1_RawData(id_readout, SCT_Word)};
621  if (p_rdo) {
622  p_rdocoll->push_back(p_rdo);
623  }
624  }
625  }
626  } else {
627  // Under the current scheme time bin and ERRORS are hard-coded to
628  // default values.
629  int ERRORS{0};
630  static const std::vector<int> dummyvector;
631  for (; i_chargedDiode != i_chargedDiode_end; ++i_chargedDiode) {
632  unsigned int flagmask{static_cast<unsigned int>((*i_chargedDiode).second.flag() & 0xFE)};
633 
634  if (!flagmask) { // Check it wasn't masked
635  int tbin{SiHelper::GetTimeBin((*i_chargedDiode).second)};
636  // create new SCT RDO
637  InDetDD::SiReadoutCellId roCell{(*i_chargedDiode).second.getReadoutCell()};
638  int strip{roCell.strip()};
639  const InDetDD::SCT_ModuleSideDesign& sctDesign{static_cast<const InDetDD::SCT_ModuleSideDesign&>(collection->design())};
640  int row2D{sctDesign.row(strip)};
641  Identifier id_readout;
642  if (row2D < 0) { // SCT sensors
643  id_readout = m_detID->strip_id(collection->identify(), strip);
644  } else { // Upgrade sensors
645  int strip2D{sctDesign.strip(strip)};
646  id_readout = m_detID->strip_id(collection->identify(), row2D, strip2D);
647  }
648 
649  // build word (compatible with
650  // SCT_RawDataByteStreamCnv/src/SCT_RodDecoder.cxx)
651  int size{SiHelper::GetStripNum((*i_chargedDiode).second)};
652  int groupSize{size};
653 
654  // TC. Need to check if there are disabled strips in the cluster
655  int cluscounter{0};
656  if (size > 1) {
657  SiChargedDiode* diode{i_chargedDiode->second.nextInCluster()};
658  while (diode) {//check if there is a further strip in the cluster
659  ++cluscounter;
660  if (cluscounter >= size) {
661  ATH_MSG_WARNING("Cluster size reached while neighbouring strips still defined.");
662  break;
663  }
664  if (diode->flag() & 0xDE) {//see if it is disabled/below threshold/disconnected/etc (0xDE corresponds to BT_SET | DISABLED_SET | BADTOT_SET | DISCONNECTED_SET | MASKOFF_SET)
665  int tmp{cluscounter};
666  while ((cluscounter < size - 1) and (diode->flag() & 0xDE)) { //check its not the end and still disabled
667  diode = diode->nextInCluster();
668  cluscounter++;
669  }
670  if (diode and !(diode->flag() & 0xDE)) {
671  SiHelper::ClusterUsed(*diode, false);
672  SiHelper::SetStripNum(*diode, size - cluscounter, &msg());
673  }
674  groupSize = tmp;
675  break;
676  }
677  diode = diode->nextInCluster();
678  }
679  }
680 
681  int stripIn11bits{strip & 0x7ff};
682  if (stripIn11bits != strip) {
683  ATH_MSG_DEBUG("Strip number " << strip << " doesn't fit into 11 bits - will be truncated");
684  }
685 
686  unsigned int SCT_Word{static_cast<unsigned int>(groupSize | (stripIn11bits << 11) | (tbin << 22) | (ERRORS << 25))};
687  SCT3_RawData *p_rdo{new SCT3_RawData(id_readout, SCT_Word, &dummyvector)};
688  if (p_rdo) {
689  p_rdocoll->push_back(p_rdo);
690  }
691  }
692  }
693  }
694  return p_rdocoll;
695 } // SCT_Digitization::createRDO()

◆ digitizeAllHits()

void SCT_DigitizationTool::digitizeAllHits ( const EventContext &  ctx,
SG::WriteHandle< SCT_RDO_Container > *  rdoContainer,
SG::WriteHandle< InDetSimDataCollection > *  simDataCollMap,
std::vector< bool > *  processedElements,
TimedHitCollection< SiHit > *  thpcsi,
CLHEP::HepRandomEngine *  rndmEngine 
)
private

digitize all hits

Definition at line 261 of file SCT_DigitizationTool.cxx.

261  {
263  //
264  // In order to process all element rather than just those with hits we
265  // create a vector to keep track of which elements have been processed.
266  // NB. an element is an sct module
267  //
269  ATH_MSG_DEBUG("Digitizing hits");
270  int hitcount{0}; // First, elements with hits.
271 
272  SiChargedDiodeCollection chargedDiodes;
273 
274  while (digitizeElement(ctx, &chargedDiodes, thpcsi, rndmEngine)) {
275  ATH_MSG_DEBUG("Hit collection ID=" << m_detID->show_to_string(chargedDiodes.identify()));
276 
277  hitcount++; // Hitcount will be a number in the hit collection minus
278  // number of hits in missing mods
279 
280  ATH_MSG_DEBUG("in digitize elements with hits: ec - layer - eta - phi "
281  << m_detID->barrel_ec(chargedDiodes.identify()) << " - "
282  << m_detID->layer_disk(chargedDiodes.identify()) << " - "
283  << m_detID->eta_module(chargedDiodes.identify()) << " - "
284  << m_detID->phi_module(chargedDiodes.identify()) << " - "
285  << " processing hit number " << hitcount);
286 
287  // Have a flag to check if the module is present or not
288  // Generally assume it is:
289 
290  IdentifierHash idHash{chargedDiodes.identifyHash()};
291 
292  assert(idHash < processedElements->size());
293  (*processedElements)[idHash] = true;
294 
295  // create and store RDO and SDO
296 
297  if (not chargedDiodes.empty()) {
298  StatusCode sc{createAndStoreRDO(&chargedDiodes, rdoContainer)};
299  if (sc.isSuccess()) { // error msg is given inside
300  // createAndStoreRDO()
301  addSDO(&chargedDiodes, simDataCollMap);
302  }
303  }
304 
305  chargedDiodes.clear();
306  }
307  ATH_MSG_DEBUG("hits processed");
308 }

◆ digitizeElement()

bool SCT_DigitizationTool::digitizeElement ( const EventContext &  ctx,
SiChargedDiodeCollection chargedDiodes,
TimedHitCollection< SiHit > *&  thpcsi,
CLHEP::HepRandomEngine *  rndmEngine 
)
protected

Definition at line 359 of file SCT_DigitizationTool.cxx.

359  {
360  if (nullptr == thpcsi) {
361  ATH_MSG_ERROR("thpcsi should not be nullptr!");
362 
363  return false;
364  }
365 
366  // get the iterator pairs for this DetEl
367 
369  if (!thpcsi->nextDetectorElement(i, e)) { // no more hits
370  return false;
371  }
372 
373  // create the identifier for the collection:
374  ATH_MSG_DEBUG("create ID for the hit collection");
375  const TimedHitPtr<SiHit>& firstHit{*i};
376  int barrel{firstHit->getBarrelEndcap()};
378  firstHit->getLayerDisk(),
379  firstHit->getPhiModule(),
380  firstHit->getEtaModule(),
381  firstHit->getSide())};
382  IdentifierHash waferHash{m_detID->wafer_hash(id)};
383 
384  // Get SCT_DetectorElementCollection
386  const InDetDD::SiDetectorElementCollection* elements(sctDetEle.retrieve());
387  if (elements==nullptr) {
388  ATH_MSG_FATAL(m_SCTDetEleCollKey.fullKey() << " could not be retrieved");
389  return false;
390  }
391 
392  // get the det element from the manager
393  const InDetDD::SiDetectorElement* sielement{elements->getDetectorElement(waferHash)};
394 
395  if (sielement == nullptr) {
396  ATH_MSG_DEBUG("Barrel=" << barrel << " layer=" << firstHit->getLayerDisk() << " Eta=" << firstHit->getEtaModule() << " Phi=" << firstHit->getPhiModule() << " Side=" << firstHit->getSide());
397  ATH_MSG_ERROR("detector manager could not find element with id = " << id);
398  return false;
399  }
400  // create the charged diodes collection
401  chargedDiodes->setDetectorElement(sielement);
402 
403  // Loop over the hits and created charged diodes:
404  while (i != e) {
405  const TimedHitPtr<SiHit>& phit{*i++};
406 
407  // skip hits which are more than 10us away
408  if (std::abs(phit->meanTime()) < 10000. * CLHEP::ns) {
409  ATH_MSG_DEBUG("HASH = " << m_detID->wafer_hash(m_detID->wafer_id(phit->getBarrelEndcap(),
410  phit->getLayerDisk(),
411  phit->getPhiModule(),
412  phit->getEtaModule(),
413  phit->getSide())));
414  ATH_MSG_DEBUG("calling process() for all methods");
415  SiDigitizationSurfaceChargeInserter inserter(sielement, chargedDiodes);
416  m_sct_SurfaceChargesGenerator->process(sielement, phit, inserter, rndmEngine, ctx);
417  ATH_MSG_DEBUG("charges filled!");
418  }
419  }
420  applyProcessorTools(chargedDiodes, rndmEngine); // !< Use of the new AlgTool surface
421  // charges generator class
422  return true;
423 }

◆ digitizeNonHits()

void SCT_DigitizationTool::digitizeNonHits ( const EventContext &  ctx,
SG::WriteHandle< SCT_RDO_Container > *  rdoContainer,
SG::WriteHandle< InDetSimDataCollection > *  simDataCollMap,
const std::vector< bool > *  processedElements,
CLHEP::HepRandomEngine *  rndmEngine 
) const
private

digitize SCT without hits

Definition at line 311 of file SCT_DigitizationTool.cxx.

311  {
312  // Get SCT_DetectorElementCollection
314  const InDetDD::SiDetectorElementCollection* elements{sctDetEle.retrieve()};
315  if (elements==nullptr) {
316  ATH_MSG_FATAL(m_SCTDetEleCollKey.fullKey() << " could not be retrieved");
317  return;
318  }
319 
320  ATH_MSG_DEBUG("processing elements without hits");
321  SiChargedDiodeCollection chargedDiodes;
322 
323  for (unsigned int i{0}; i < processedElements->size(); i++) {
324  if (not (*processedElements)[i]) {
325  IdentifierHash idHash{i};
326  if (not idHash.is_valid()) {
327  ATH_MSG_ERROR("SCT Detector element id hash is invalid = " << i);
328  }
329 
330  const InDetDD::SiDetectorElement* element{elements->getDetectorElement(idHash)};
331  if (element) {
332  ATH_MSG_DEBUG("In digitize of untouched elements: layer - phi - eta "
333  << m_detID->layer_disk(element->identify()) << " - "
334  << m_detID->phi_module(element->identify()) << " - "
335  << m_detID->eta_module(element->identify()) << " - "
336  << "size: " << processedElements->size());
337 
338  chargedDiodes.setDetectorElement(element);
339  ATH_MSG_DEBUG("calling applyProcessorTools() for NON hits");
340  applyProcessorTools(&chargedDiodes, rndmEngine);
341 
342  // Create and store RDO and SDO
343  // Don't create empty ones.
344  if (not chargedDiodes.empty()) {
345  StatusCode sc{createAndStoreRDO(&chargedDiodes, rdoContainer)};
346  if (sc.isSuccess()) {// error msg is given inside
347  // createAndStoreRDO()
348  addSDO(&chargedDiodes, simDataCollMap);
349  }
350  }
351 
352  chargedDiodes.clear();
353  }
354  }
355  }
356 
357  }

◆ getNextEvent()

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

Definition at line 700 of file SCT_DigitizationTool.cxx.

700  {
701  ATH_MSG_DEBUG("SCT_DigitizationTool::getNextEvent");
702  // get the container(s)
703  using TimedHitCollList = PileUpMergeSvc::TimedList<SiHitCollection>::type;
704  // this is a list<pair<time_t, DataLink<SiHitCollection> >
705 
706  // In case of single hits container just load the collection using read handles
707  if (!m_onlyUseContainerName) {
709  if (!hitCollection.isValid()) {
710  ATH_MSG_ERROR("Could not get SCT SiHitCollection container " << hitCollection.name() << " from store " << hitCollection.store());
711  return StatusCode::FAILURE;
712  }
713 
714  // create a new hits collection
715  m_thpcsi = std::make_unique<TimedHitCollection<SiHit>>(1);
716  m_thpcsi->insert(0, hitCollection.cptr());
717  ATH_MSG_DEBUG("SiHitCollection found with " << hitCollection->size() << " hits");
718 
719  return StatusCode::SUCCESS;
720  }
721 
722  TimedHitCollList hitCollList;
723  unsigned int numberOfSiHits{0};
724  if (not (m_mergeSvc->retrieveSubEvtsData(m_inputObjectName, hitCollList, numberOfSiHits).isSuccess()) and hitCollList.empty()) {
725  ATH_MSG_ERROR("Could not fill TimedHitCollList");
726  return StatusCode::FAILURE;
727  } else {
728  ATH_MSG_DEBUG(hitCollList.size() << " SiHitCollections with key " << m_inputObjectName << " found");
729  }
730  // create a new hits collection
731  m_thpcsi = std::make_unique<TimedHitCollection<SiHit>>(numberOfSiHits);
732  // now merge all collections into one
733  TimedHitCollList::iterator endColl{hitCollList.end()};
734  for (TimedHitCollList::iterator iColl{hitCollList.begin()}; iColl != endColl; ++iColl) {
735  // decide if this event will be processed depending on
736  // HardScatterSplittingMode & bunchXing
739  continue;
740  }
742  continue;
743  }
746  }
747  const SiHitCollection* p_collection{iColl->second};
748  m_thpcsi->insert(iColl->first, p_collection);
749  ATH_MSG_DEBUG("SiTrackerHitCollection found with " << p_collection->size() << " hits"); // loop on the hit collections
750  }
751  return StatusCode::SUCCESS;
752 }

◆ initDisabledCells()

StatusCode SCT_DigitizationTool::initDisabledCells ( )
private

Initialize the SCT_RandomDisabledCellGenerator AlgTool.

Definition at line 173 of file SCT_DigitizationTool.cxx.

173  {
174  // +++ Retrieve the SCT_RandomDisabledCellGenerator
176 
178 
179  ATH_MSG_INFO("Retrieved the SCT_RandomDisabledCellGenerator tool:" << m_sct_RandomDisabledCellGenerator);
180  return StatusCode::SUCCESS;
181 }

◆ initFrontEndTool()

StatusCode SCT_DigitizationTool::initFrontEndTool ( )
private

Initialize the SCT_FrontEnd AlgTool.

Definition at line 145 of file SCT_DigitizationTool.cxx.

145  {
146  ATH_CHECK(m_sct_FrontEnd.retrieve());
147 
149 
150  ATH_MSG_DEBUG("Retrieved and initialised tool " << m_sct_FrontEnd);
151  return StatusCode::SUCCESS;
152 }

◆ initialize()

StatusCode SCT_DigitizationTool::initialize ( )
finaloverridevirtual

Definition at line 51 of file SCT_DigitizationTool.cxx.

51  {
52  ATH_MSG_DEBUG("SCT_DigitizationTool::initialize()");
53 
54  // +++ Init the services
56 
57  // +++ Get the Surface Charges Generator tool
59 
60  // +++ Get the Front End tool
62 
63  // +++ Initialise for disabled cells from the random disabled cells tool
64  // +++ Default off, since disabled cells taken form configuration in
65  // reconstruction stage
68  ATH_MSG_INFO("Use of Random disabled cells");
69  } else {
71  }
72 
73  // check the input object name
74  if (m_hitsContainerKey.key().empty()) {
75  ATH_MSG_FATAL("Property InputObjectName not set !");
76  return StatusCode::FAILURE;
77  }
79  ATH_MSG_DEBUG("Input objects in container : '" << m_inputObjectName << "'");
80 
81  // Initialize ReadHandleKey
82  ATH_CHECK(m_hitsContainerKey.initialize(true));
83 
84  // +++ Initialize WriteHandleKey
85  ATH_CHECK(m_rdoContainerKey.initialize());
87 
88  // Initialize ReadCondHandleKey
90 
91  ATH_MSG_DEBUG("SiDigitizationTool::initialize() complete");
92 
93  return StatusCode::SUCCESS;
94 }

◆ initServices()

StatusCode SCT_DigitizationTool::initServices ( )
private

initialize the required services

Definition at line 157 of file SCT_DigitizationTool.cxx.

157  {
158  // Get SCT ID helper for hash function and Store them using methods from the
159  // SiDigitization.
160  ATH_CHECK(detStore()->retrieve(m_detID, "SCT_ID"));
161 
163  ATH_CHECK(m_mergeSvc.retrieve());
164  }
165  ATH_CHECK(m_rndmSvc.retrieve());
166 
167  return StatusCode::SUCCESS;
168 }

◆ initSurfaceChargesGeneratorTool()

StatusCode SCT_DigitizationTool::initSurfaceChargesGeneratorTool ( )
private

Initialize the SCT_SurfaceChargesGenerator AlgTool.

Definition at line 129 of file SCT_DigitizationTool.cxx.

129  {
131 
132  if (m_cosmicsRun and m_tfix > -998) {
133  m_sct_SurfaceChargesGenerator->setFixedTime(m_tfix);
134  ATH_MSG_INFO("Use of FixedTime = " << m_tfix << " in cosmics");
135  }
136 
137  ATH_MSG_DEBUG("Retrieved and initialised tool " << m_sct_SurfaceChargesGenerator);
138 
139  return StatusCode::SUCCESS;
140 }

◆ interfaceID()

const InterfaceID & SCT_DigitizationTool::interfaceID ( )
inlinestatic

Definition at line 156 of file SCT_DigitizationTool.h.

156  {
157  return IID_ISCT_DigitizationTool;
158 }

◆ mergeEvent()

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

Definition at line 237 of file SCT_DigitizationTool.cxx.

237  {
238  ATH_MSG_VERBOSE("SCT_DigitizationTool::mergeEvent()");
239 
240  // Set the RNG to use for this event.
241  ATHRNG::RNGWrapper* rngWrapper = m_rndmSvc->getEngine(this);
242  rngWrapper->setSeed( name(), ctx );
243  CLHEP::HepRandomEngine *rndmEngine = rngWrapper->getEngine(ctx);
244 
245  if (m_enableHits) {
247  }
248 
249  if (not m_onlyHitElements) {
251  }
252 
253  m_hitCollPtrs.clear();
254 
255  m_thpcsi.reset(nullptr);
256 
257  ATH_MSG_DEBUG("Digitize success!");
258  return StatusCode::SUCCESS;
259 }

◆ prepareEvent()

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

Called before processing physics events.

Definition at line 215 of file SCT_DigitizationTool.cxx.

215  {
216  ATH_MSG_VERBOSE("SCT_DigitizationTool::prepareEvent()");
217  // Create the IdentifiableContainer to contain the digit collections Create
218  // a new RDO container
220  ATH_CHECK(m_rdoContainer.record(std::make_unique<SCT_RDO_Container>(m_detID->wafer_hash_max())));
221 
222  // Create a map for the SDO and register it into StoreGate
224  ATH_CHECK(m_simDataCollMap.record(std::make_unique<InDetSimDataCollection>()));
225 
226  m_processedElements.clear();
227  m_processedElements.resize(m_detID->wafer_hash_max(), false);
228 
229  m_thpcsi = std::make_unique<TimedHitCollection<SiHit>>();
231  return StatusCode::SUCCESS;
232 }

◆ processAllSubEvents()

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

Definition at line 183 of file SCT_DigitizationTool.cxx.

183  {
184  if (prepareEvent(ctx, 0).isFailure()) {
185  return StatusCode::FAILURE;
186  }
187  // Set the RNG to use for this event.
188  ATHRNG::RNGWrapper* rngWrapper = m_rndmSvc->getEngine(this);
189  rngWrapper->setSeed( name(), ctx );
190  CLHEP::HepRandomEngine *rndmEngine = rngWrapper->getEngine(ctx);
191 
192  ATH_MSG_VERBOSE("Begin digitizeAllHits");
193  if (m_enableHits and (not getNextEvent(ctx).isFailure())) {
195  } else {
196  ATH_MSG_DEBUG("no hits found in event!");
197  }
198  ATH_MSG_DEBUG("Digitized Elements with Hits");
199 
200  // loop over elements without hits
201  if (not m_onlyHitElements) {
203  ATH_MSG_DEBUG("Digitized Elements without Hits");
204  }
205 
206  m_thpcsi.reset(nullptr);
207 
208  ATH_MSG_VERBOSE("Digitize success!");
209  return StatusCode::SUCCESS;
210 }

◆ processBunchXing()

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

Definition at line 440 of file SCT_DigitizationTool.cxx.

442  {
443  ATH_MSG_VERBOSE("SCT_DigitizationTool::processBunchXing() " << bunchXing);
444  // decide if this event will be processed depending on
445  // HardScatterSplittingMode & bunchXing
448  return StatusCode::SUCCESS;
449  }
451  return StatusCode::SUCCESS;
452  }
455  }
456 
457  using TimedHitCollList = PileUpMergeSvc::TimedList<SiHitCollection>::type;
458  TimedHitCollList hitCollList;
459 
460  if ((not (m_mergeSvc->retrieveSubSetEvtData(m_inputObjectName, hitCollList, bunchXing,
461  bSubEvents, eSubEvents).isSuccess())) and
462  hitCollList.empty()) {
463  ATH_MSG_ERROR("Could not fill TimedHitCollList");
464  return StatusCode::FAILURE;
465  } else {
466  ATH_MSG_VERBOSE(hitCollList.size() << " SiHitCollections with key " <<
467  m_inputObjectName << " found");
468  }
469 
470  const TimedHitCollList::iterator endColl{hitCollList.end()};
471  for (TimedHitCollList::iterator iColl{hitCollList.begin()}; iColl != endColl; ++iColl) {
472  std::unique_ptr<SiHitCollection> hitCollPtr{std::make_unique<SiHitCollection>(*iColl->second)};
473  PileUpTimeEventIndex timeIndex{iColl->first};
474  ATH_MSG_DEBUG("SiHitCollection found with " << hitCollPtr->size() <<
475  " hits");
476  ATH_MSG_VERBOSE("time index info. time: " << timeIndex.time()
477  << " index: " << timeIndex.index()
478  << " type: " << timeIndex.type());
479  m_thpcsi->insert(timeIndex, hitCollPtr.get());
480  m_hitCollPtrs.push_back(std::move(hitCollPtr));
481  }
482 
483  return StatusCode::SUCCESS;
484 
485 }

◆ SetupRdoOutputType()

void SCT_DigitizationTool::SetupRdoOutputType ( Gaudi::Details::PropertyBase &  )
private

Called when m_WriteSCT1_RawData is altered.

Does nothing, but required by Gaudi.

Definition at line 490 of file SCT_DigitizationTool.cxx.

490  {
491 }

◆ storeTool()

void SCT_DigitizationTool::storeTool ( ISiChargedDiodesProcessorTool p_processor)
inlineprotected

Definition at line 79 of file SCT_DigitizationTool.h.

79 {m_diodeCollectionTools.push_back(p_processor);}

Member Data Documentation

◆ m_barrelonly

BooleanProperty SCT_DigitizationTool::m_barrelonly {this, "BarrelOnly", false, "Only Barrel layers"}
private

Definition at line 125 of file SCT_DigitizationTool.h.

◆ m_cosmicsRun

BooleanProperty SCT_DigitizationTool::m_cosmicsRun {this, "CosmicsRun", false, "Cosmics run selection"}
private

Definition at line 124 of file SCT_DigitizationTool.h.

◆ m_createNoiseSDO

BooleanProperty SCT_DigitizationTool::m_createNoiseSDO {this, "CreateNoiseSDO", false, "Create SDOs for strips with only noise hits (huge increase in SDO collection size"}
private

Definition at line 127 of file SCT_DigitizationTool.h.

◆ m_detID

const SCT_ID* SCT_DigitizationTool::m_detID {nullptr}
private

Handle to the ID helper.

Definition at line 147 of file SCT_DigitizationTool.h.

◆ m_diodeCollectionTools

std::vector<ISiChargedDiodesProcessorTool*> SCT_DigitizationTool::m_diodeCollectionTools
private

Definition at line 149 of file SCT_DigitizationTool.h.

◆ m_enableHits

BooleanProperty SCT_DigitizationTool::m_enableHits {this, "EnableHits", true, "Enable hits"}
private

Definition at line 122 of file SCT_DigitizationTool.h.

◆ m_HardScatterSplittingMode

IntegerProperty SCT_DigitizationTool::m_HardScatterSplittingMode {this, "HardScatterSplittingMode", 0, "Control pileup & signal splitting. Process all SiHit or just those from signal or background events"}
private

Definition at line 128 of file SCT_DigitizationTool.h.

◆ m_HardScatterSplittingSkipper

bool SCT_DigitizationTool::m_HardScatterSplittingSkipper {false}
private

Definition at line 152 of file SCT_DigitizationTool.h.

◆ m_hitCollPtrs

std::vector<std::unique_ptr<SiHitCollection> > SCT_DigitizationTool::m_hitCollPtrs
private

Definition at line 151 of file SCT_DigitizationTool.h.

◆ m_hitsContainerKey

SG::ReadHandleKey<SiHitCollection> SCT_DigitizationTool::m_hitsContainerKey {this, "InputObjectName", "SCT_Hits", "Input HITS collection name"}
private

Definition at line 132 of file SCT_DigitizationTool.h.

◆ m_inputObjectName

std::string SCT_DigitizationTool::m_inputObjectName {""}
private

Definition at line 133 of file SCT_DigitizationTool.h.

◆ m_mergeSvc

ServiceHandle<PileUpMergeSvc> SCT_DigitizationTool::m_mergeSvc {this, "MergeSvc", "PileUpMergeSvc", "Merge service used in Pixel & SCT digitization"}
private

Definition at line 145 of file SCT_DigitizationTool.h.

◆ m_onlyHitElements

BooleanProperty SCT_DigitizationTool::m_onlyHitElements {this, "OnlyHitElements", false, "Process only elements with hits"}
private

Definition at line 123 of file SCT_DigitizationTool.h.

◆ m_onlyUseContainerName

BooleanProperty SCT_DigitizationTool::m_onlyUseContainerName {this, "OnlyUseContainerName", true, "Don't use the ReadHandleKey directly. Just extract the container name from it."}
private

Definition at line 131 of file SCT_DigitizationTool.h.

◆ m_processedElements

std::vector<bool> SCT_DigitizationTool::m_processedElements
private

vector of processed elements - set by digitizeHits() *‍/

Definition at line 150 of file SCT_DigitizationTool.h.

◆ m_randomDisabledCells

BooleanProperty SCT_DigitizationTool::m_randomDisabledCells {this, "RandomDisabledCells", false, "Use Random disabled cells, default no"}
private

Definition at line 126 of file SCT_DigitizationTool.h.

◆ m_rdoContainer

SG::WriteHandle<SCT_RDO_Container> SCT_DigitizationTool::m_rdoContainer
private

RDO container handle.

Definition at line 136 of file SCT_DigitizationTool.h.

◆ m_rdoContainerKey

SG::WriteHandleKey<SCT_RDO_Container> SCT_DigitizationTool::m_rdoContainerKey {this, "OutputObjectName", "SCT_RDOs", "Output Object name"}
private

Definition at line 135 of file SCT_DigitizationTool.h.

◆ m_rndmSvc

ServiceHandle<IAthRNGSvc> SCT_DigitizationTool::m_rndmSvc {this, "RndmSvc", "AthRNGSvc", ""}
private

Random number service.

Definition at line 144 of file SCT_DigitizationTool.h.

◆ m_sct_FrontEnd

ToolHandle<IFrontEnd> SCT_DigitizationTool::m_sct_FrontEnd {this, "FrontEnd", "SCT_FrontEnd", "Handle the Front End Electronic tool"}
private

Definition at line 141 of file SCT_DigitizationTool.h.

◆ m_sct_RandomDisabledCellGenerator

ToolHandle<IRandomDisabledCellGenerator> SCT_DigitizationTool::m_sct_RandomDisabledCellGenerator {this, "RandomDisabledCellGenerator", "SCT_RandomDisabledCellGenerator", ""}
private

Definition at line 143 of file SCT_DigitizationTool.h.

◆ m_sct_SurfaceChargesGenerator

ToolHandle<ISurfaceChargesGenerator> SCT_DigitizationTool::m_sct_SurfaceChargesGenerator {this, "SurfaceChargesGenerator", "SCT_SurfaceChargesGenerator", "Choice of using a more detailed charge drift model"}
private

Definition at line 142 of file SCT_DigitizationTool.h.

◆ m_SCTDetEleCollKey

SG::ReadCondHandleKey<InDetDD::SiDetectorElementCollection> SCT_DigitizationTool::m_SCTDetEleCollKey {this, "SCTDetEleCollKey", "SCT_DetectorElementCollection", "Key of SiDetectorElementCollection for SCT"}
private

Definition at line 139 of file SCT_DigitizationTool.h.

◆ m_simDataCollMap

SG::WriteHandle<InDetSimDataCollection> SCT_DigitizationTool::m_simDataCollMap
private

SDO Map handle.

Definition at line 138 of file SCT_DigitizationTool.h.

◆ m_simDataCollMapKey

SG::WriteHandleKey<InDetSimDataCollection> SCT_DigitizationTool::m_simDataCollMapKey {this, "OutputSDOName", "SCT_SDO_Map", "Output SDO container name"}
private

Definition at line 137 of file SCT_DigitizationTool.h.

◆ m_tfix

FloatProperty SCT_DigitizationTool::m_tfix {this, "FixedTime", -999., "Fixed time for Cosmics run selection"}
private

Definition at line 121 of file SCT_DigitizationTool.h.

◆ m_thpcsi

std::unique_ptr<TimedHitCollection<SiHit> > SCT_DigitizationTool::m_thpcsi {nullptr}
private

Definition at line 148 of file SCT_DigitizationTool.h.

◆ m_WriteSCT1_RawData

BooleanProperty SCT_DigitizationTool::m_WriteSCT1_RawData {this, "WriteSCT1_RawData", false, "Write out SCT1_RawData rather than SCT3_RawData"}
private

Definition at line 129 of file SCT_DigitizationTool.h.


The documentation for this class was generated from the following files:
python.PyKernel.retrieve
def retrieve(aClass, aKey=None)
Definition: PyKernel.py:110
xAOD::iterator
JetConstituentVector::iterator iterator
Definition: JetConstituentVector.cxx:68
SCT_DigitizationTool::m_thpcsi
std::unique_ptr< TimedHitCollection< SiHit > > m_thpcsi
Definition: SCT_DigitizationTool.h:148
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
python.SystemOfUnits.second
int second
Definition: SystemOfUnits.py:120
ATH_MSG_FATAL
#define ATH_MSG_FATAL(x)
Definition: AthMsgStreamMacros.h:34
SCT_DigitizationTool::m_sct_RandomDisabledCellGenerator
ToolHandle< IRandomDisabledCellGenerator > m_sct_RandomDisabledCellGenerator
Definition: SCT_DigitizationTool.h:143
SCT_DigitizationTool::createAndStoreRDO
StatusCode createAndStoreRDO(SiChargedDiodeCollection *chDiodeCollection, SG::WriteHandle< SCT_RDO_Container > *rdoContainer) const
RDO and SDO methods.
Definition: SCT_DigitizationTool.cxx:527
SCT_DigitizationTool::m_processedElements
std::vector< bool > m_processedElements
vector of processed elements - set by digitizeHits() *‍/
Definition: SCT_DigitizationTool.h:150
SiChargedDiode
Definition: SiChargedDiode.h:30
SiliconTech::strip
@ strip
InDetRawDataCollection::setIdentifier
void setIdentifier(Identifier id)
InDetDD::SiDetectorElementCollection
Definition: SiDetectorElementCollection.h:30
SG::ReadCondHandle
Definition: ReadCondHandle.h:44
ATH_MSG_INFO
#define ATH_MSG_INFO(x)
Definition: AthMsgStreamMacros.h:31
SCT_DigitizationTool::m_hitCollPtrs
std::vector< std::unique_ptr< SiHitCollection > > m_hitCollPtrs
Definition: SCT_DigitizationTool.h:151
SCT_DigitizationTool::prepareEvent
virtual StatusCode prepareEvent(const EventContext &ctx, unsigned int) override final
Called before processing physics events.
Definition: SCT_DigitizationTool.cxx:215
SCT_DigitizationTool::getNextEvent
StatusCode getNextEvent(const EventContext &ctx)
Definition: SCT_DigitizationTool.cxx:700
SG::ReadHandle
Definition: StoreGate/StoreGate/ReadHandle.h:70
InDetDD::SCT_ModuleSideDesign
Definition: SCT_ModuleSideDesign.h:40
SiChargedDiodeCollection::identifyHash
virtual IdentifierHash identifyHash() const override final
Definition: SiChargedDiodeCollection.h:236
SiCharge::track
@ track
Definition: SiCharge.h:28
AtlasHitsVector
Definition: AtlasHitsVector.h:33
SCT_DigitizationTool::m_HardScatterSplittingMode
IntegerProperty m_HardScatterSplittingMode
Definition: SCT_DigitizationTool.h:128
SCT_DigitizationTool::digitizeAllHits
void digitizeAllHits(const EventContext &ctx, SG::WriteHandle< SCT_RDO_Container > *rdoContainer, SG::WriteHandle< InDetSimDataCollection > *simDataCollMap, std::vector< bool > *processedElements, TimedHitCollection< SiHit > *thpcsi, CLHEP::HepRandomEngine *rndmEngine)
digitize all hits
Definition: SCT_DigitizationTool.cxx:261
SiChargedDiodeCollection::end
SiChargedDiodeIterator end()
Definition: SiChargedDiodeCollection.h:253
athena.value
value
Definition: athena.py:122
SCT_DigitizationTool::m_barrelonly
BooleanProperty m_barrelonly
Definition: SCT_DigitizationTool.h:125
SCT_DigitizationTool::m_rdoContainerKey
SG::WriteHandleKey< SCT_RDO_Container > m_rdoContainerKey
Definition: SCT_DigitizationTool.h:135
SCT_ID::barrel_ec
int barrel_ec(const Identifier &id) const
Values of different levels (failure returns 0)
Definition: SCT_ID.h:728
SCT_DigitizationTool::m_onlyHitElements
BooleanProperty m_onlyHitElements
Definition: SCT_DigitizationTool.h:123
SCT_DigitizationTool::m_onlyUseContainerName
BooleanProperty m_onlyUseContainerName
Definition: SCT_DigitizationTool.h:131
SiChargedDiodeCollection::empty
bool empty() const
Definition: SiChargedDiodeCollection.h:274
SCT_DigitizationTool::m_createNoiseSDO
BooleanProperty m_createNoiseSDO
Definition: SCT_DigitizationTool.h:127
TimedHitPtr< SiHit >
SCT_DigitizationTool::applyProcessorTools
void applyProcessorTools(SiChargedDiodeCollection *chargedDiodes, CLHEP::HepRandomEngine *rndmEngine) const
Definition: SCT_DigitizationTool.cxx:428
SCT_ID::phi_module
int phi_module(const Identifier &id) const
Definition: SCT_ID.h:740
ATH_MSG_VERBOSE
#define ATH_MSG_VERBOSE(x)
Definition: AthMsgStreamMacros.h:28
SCT_DigitizationTool::m_rndmSvc
ServiceHandle< IAthRNGSvc > m_rndmSvc
Random number service.
Definition: SCT_DigitizationTool.h:144
HepMC::ignoreTruthLink
bool ignoreTruthLink(const T &p, bool vetoPileUp)
Helper function for SDO creation in PileUpTools.
Definition: MagicNumbers.h:296
SiTotalCharge::list_t
std::vector< SiCharge > list_t
Definition: SiTotalCharge.h:31
SCT_DigitizationTool::initServices
StatusCode initServices()
initialize the required services
Definition: SCT_DigitizationTool.cxx:157
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
SiChargedDiodeCollection::begin
SiChargedDiodeIterator begin()
Definition: SiChargedDiodeCollection.h:248
SCT_DigitizationTool::addSDO
void addSDO(SiChargedDiodeCollection *collection, SG::WriteHandle< InDetSimDataCollection > *simDataCollMap) const
Definition: SCT_DigitizationTool.cxx:757
ISiChargedDiodesProcessorTool
Definition: ISiChargedDiodesProcessorTool.h:26
SiChargedDiodeIterator
SiChargedDiodeMap::iterator SiChargedDiodeIterator
Definition: SiChargedDiodeCollection.h:70
AthenaPoolTestRead.sc
sc
Definition: AthenaPoolTestRead.py:27
SCT_DigitizationTool::initSurfaceChargesGeneratorTool
StatusCode initSurfaceChargesGeneratorTool()
Initialize the SCT_SurfaceChargesGenerator AlgTool.
Definition: SCT_DigitizationTool.cxx:129
PileUpMergeSvc::TimedList::type
std::list< value_t > type
type of the collection of timed data object
Definition: PileUpMergeSvc.h:75
SCT_DigitizationTool::m_SCTDetEleCollKey
SG::ReadCondHandleKey< InDetDD::SiDetectorElementCollection > m_SCTDetEleCollKey
Definition: SCT_DigitizationTool.h:139
InDetDD::SCT_ModuleSideDesign::row
virtual int row(int stripId1Dim) const
Definition: SCT_ModuleSideDesign.h:271
SG::makeHandle
SG::ReadCondHandle< T > makeHandle(const SG::ReadCondHandleKey< T > &key, const EventContext &ctx=Gaudi::Hive::currentContext())
Definition: ReadCondHandle.h:269
SCT_DigitizationTool::createRDO
std::unique_ptr< SCT_RDO_Collection > createRDO(SiChargedDiodeCollection *collection) const
Create RDOs from the SiChargedDiodeCollection for the current wafer.
Definition: SCT_DigitizationTool.cxx:551
python.setupRTTAlg.size
int size
Definition: setupRTTAlg.py:39
ATH_MSG_ERROR
#define ATH_MSG_ERROR(x)
Definition: AthMsgStreamMacros.h:33
SCT_DigitizationTool::m_hitsContainerKey
SG::ReadHandleKey< SiHitCollection > m_hitsContainerKey
Definition: SCT_DigitizationTool.h:132
SiChargedDiodeCollection
Definition: SiChargedDiodeCollection.h:109
SiChargedDiodeCollection::setDetectorElement
void setDetectorElement(const InDetDD::SolidStateDetectorElementBase *SiElement)
Definition: SiChargedDiodeCollection.h:207
lumiFormat.i
int i
Definition: lumiFormat.py:92
SCT3_RawData
Definition: SCT3_RawData.h:24
Identifier
Definition: DetectorDescription/Identifier/Identifier/Identifier.h:32
SCT_DigitizationTool::m_simDataCollMapKey
SG::WriteHandleKey< InDetSimDataCollection > m_simDataCollMapKey
Definition: SCT_DigitizationTool.h:137
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
SCT_DigitizationTool::m_enableHits
BooleanProperty m_enableHits
Definition: SCT_DigitizationTool.h:122
HepMC::barcode
int barcode(const T *p)
Definition: Barcode.h:16
SCT_DigitizationTool::SetupRdoOutputType
void SetupRdoOutputType(Gaudi::Details::PropertyBase &)
Called when m_WriteSCT1_RawData is altered.
Definition: SCT_DigitizationTool.cxx:490
SCT_DigitizationTool::m_randomDisabledCells
BooleanProperty m_randomDisabledCells
Definition: SCT_DigitizationTool.h:126
master.flag
bool flag
Definition: master.py:29
SCT_DigitizationTool::m_diodeCollectionTools
std::vector< ISiChargedDiodesProcessorTool * > m_diodeCollectionTools
Definition: SCT_DigitizationTool.h:149
SCT_DigitizationTool::m_HardScatterSplittingSkipper
bool m_HardScatterSplittingSkipper
Definition: SCT_DigitizationTool.h:152
SiChargedDiodeCollection::clear
void clear()
Definition: SiChargedDiodeCollection.cxx:45
test_pyathena.parent
parent
Definition: test_pyathena.py:15
ATH_CHECK
#define ATH_CHECK
Definition: AthCheckMacros.h:40
SiHelper::GetTimeBin
static int GetTimeBin(SiChargedDiode &chDiode)
Definition: SiHelper.h:203
SCT_ID::wafer_hash
IdentifierHash wafer_hash(const Identifier &wafer_id) const
wafer hash from id - optimized
Definition: SCT_ID.h:492
SCT_DigitizationTool::m_sct_FrontEnd
ToolHandle< IFrontEnd > m_sct_FrontEnd
Definition: SCT_DigitizationTool.h:141
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
DeMoUpdate.tmp
string tmp
Definition: DeMoUpdate.py:1167
python.PyKernel.detStore
detStore
Definition: PyKernel.py:41
SCT_DigitizationTool::storeTool
void storeTool(ISiChargedDiodesProcessorTool *p_processor)
Definition: SCT_DigitizationTool.h:79
SCT_DigitizationTool::digitizeNonHits
void digitizeNonHits(const EventContext &ctx, SG::WriteHandle< SCT_RDO_Container > *rdoContainer, SG::WriteHandle< InDetSimDataCollection > *simDataCollMap, const std::vector< bool > *processedElements, CLHEP::HepRandomEngine *rndmEngine) const
digitize SCT without hits
Definition: SCT_DigitizationTool.cxx:311
SCT_DigitizationTool::initFrontEndTool
StatusCode initFrontEndTool()
Initialize the SCT_FrontEnd AlgTool.
Definition: SCT_DigitizationTool.cxx:145
SiHelper::ClusterUsed
static void ClusterUsed(SiChargedDiode &chDiode, bool flag)
Definition: SiHelper.h:121
mc.proc
proc
Definition: mc.PhPy8EG_A14NNPDF23_gg4l_example.py:22
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:195
SCT_ID::wafer_hash_max
size_type wafer_hash_max(void) const
Definition: SCT_ID.cxx:639
ATHRNG::RNGWrapper
A wrapper class for event-slot-local random engines.
Definition: RNGWrapper.h:56
SCT_DigitizationTool::m_WriteSCT1_RawData
BooleanProperty m_WriteSCT1_RawData
Definition: SCT_DigitizationTool.h:129
SCT_ID::layer_disk
int layer_disk(const Identifier &id) const
Definition: SCT_ID.h:734
InDetDD::SiDetectorElement
Definition: SiDetectorElement.h:109
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)
SCT_DigitizationTool::m_simDataCollMap
SG::WriteHandle< InDetSimDataCollection > m_simDataCollMap
SDO Map handle.
Definition: SCT_DigitizationTool.h:138
xAOD::EgammaHelpers::numberOfSiHits
std::size_t numberOfSiHits(const xAOD::TrackParticle *tp)
return the number of Si hits in the track particle
Definition: ElectronxAODHelpers.cxx:66
SCT_DigitizationTool::m_rdoContainer
SG::WriteHandle< SCT_RDO_Container > m_rdoContainer
RDO container handle.
Definition: SCT_DigitizationTool.h:136
ATHRNG::RNGWrapper::getEngine
CLHEP::HepRandomEngine * getEngine(const EventContext &ctx) const
Retrieve the random engine corresponding to the provided EventContext.
Definition: RNGWrapper.h:134
SiHelper::GetStripNum
static int GetStripNum(SiChargedDiode &chDiode)
Definition: SiHelper.h:199
SCT_DigitizationTool::initDisabledCells
StatusCode initDisabledCells()
Initialize the SCT_RandomDisabledCellGenerator AlgTool.
Definition: SCT_DigitizationTool.cxx:173
DiTauMassTools::MaxHistStrategyV2::e
e
Definition: PhysicsAnalysis/TauID/DiTauMassTools/DiTauMassTools/HelperFunctions.h:26
SCT_DigitizationTool::m_mergeSvc
ServiceHandle< PileUpMergeSvc > m_mergeSvc
Definition: SCT_DigitizationTool.h:145
SG::WriteHandle::record
StatusCode record(std::unique_ptr< T > data)
Record a const object to the store.
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
SCT_DigitizationTool::m_sct_SurfaceChargesGenerator
ToolHandle< ISurfaceChargesGenerator > m_sct_SurfaceChargesGenerator
Definition: SCT_DigitizationTool.h:142
ATH_MSG_WARNING
#define ATH_MSG_WARNING(x)
Definition: AthMsgStreamMacros.h:32
SCT_DigitizationTool::digitizeElement
bool digitizeElement(const EventContext &ctx, SiChargedDiodeCollection *chargedDiodes, TimedHitCollection< SiHit > *&thpcsi, CLHEP::HepRandomEngine *rndmEngine)
Definition: SCT_DigitizationTool.cxx:359
python.CaloScaleNoiseConfig.type
type
Definition: CaloScaleNoiseConfig.py:78
SCT_ID::eta_module
int eta_module(const Identifier &id) const
Definition: SCT_ID.h:746
SCT_DigitizationTool::m_detID
const SCT_ID * m_detID
Handle to the ID helper.
Definition: SCT_DigitizationTool.h:147
DetectorZone::barrel
@ barrel
SCT1_RawData
Definition: SCT1_RawData.h:27
python.SystemOfUnits.ns
int ns
Definition: SystemOfUnits.py:130
SiHelper::SetStripNum
static void SetStripNum(SiChargedDiode &chDiode, int nstrip, MsgStream *log=nullptr)
Definition: SiHelper.h:139
InDetDD::SiReadoutCellId
Definition: SiReadoutCellId.h:42
SiChargedDiode::nextInCluster
SiChargedDiode * nextInCluster()
Definition: SiChargedDiode.h:120
SCT_ID::wafer_id
Identifier wafer_id(int barrel_ec, int layer_disk, int phi_module, int eta_module, int side) const
For a single side of module.
Definition: SCT_ID.h:464
IdentifierHash
Definition: IdentifierHash.h:38
SCT_DigitizationTool::m_inputObjectName
std::string m_inputObjectName
Definition: SCT_DigitizationTool.h:133
PileUpTimeEventIndex
a struct encapsulating the identifier of a pile-up event
Definition: PileUpTimeEventIndex.h:12
python.AutoConfigFlags.msg
msg
Definition: AutoConfigFlags.py:7
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:293
SiChargedDiodeCollection::design
const InDetDD::DetectorDesign & design() const
Definition: SiChargedDiodeCollection.h:224
SCT_DigitizationTool::m_cosmicsRun
BooleanProperty m_cosmicsRun
Definition: SCT_DigitizationTool.h:124
SCT_DigitizationTool::m_tfix
FloatProperty m_tfix
Definition: SCT_DigitizationTool.h:121
SiChargedDiodeCollection::identify
virtual Identifier identify() const override final
Definition: SiChargedDiodeCollection.h:230
SCT_ID::strip_id
Identifier strip_id(int barrel_ec, int layer_disk, int phi_module, int eta_module, int side, int strip) const
For an individual strip.
Definition: SCT_ID.h:535