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

#include <StripDigitizationTool.h>

Inheritance diagram for ITk::StripDigitizationTool:
Collaboration diagram for ITk::StripDigitizationTool:

Public Member Functions

 StripDigitizationTool (const std::string &type, const std::string &name, const IInterface *parent)
 
virtual ~StripDigitizationTool ()
 
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, SiChargedDiodeCollectionMap &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 StripFrontEnd AlgTool. More...
 
StatusCode initDisabledCells ()
 Initialize the StripRandomDisabledCellGenerator AlgTool. More...
 
StatusCode initSurfaceChargesGeneratorTool ()
 Initialize the StripSurfaceChargesGenerator 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", "StripHits", "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", "StripSDO_Map", "Output SDO container name"}
 
SG::WriteHandle< InDetSimDataCollectionm_simDataCollMap
 SDO Map handle. More...
 
SG::ReadCondHandleKey< InDetDD::SiDetectorElementCollectionm_stripDetEleCollKey {this, "StripDetEleCollKey", "ITkStripDetectorElementCollection", "Key of SiDetectorElementCollection for SCT"}
 
ToolHandle< IFrontEndm_sct_FrontEnd {this, "FrontEnd", "StripFrontEnd", "Handle the Front End Electronic tool"}
 
ToolHandle< ISurfaceChargesGeneratorm_sct_SurfaceChargesGenerator {this, "SurfaceChargesGenerator", "StripSurfaceChargesGenerator", "Choice of using a more detailed charge drift model"}
 
ToolHandle< IRandomDisabledCellGeneratorm_sct_RandomDisabledCellGenerator {this, "RandomDisabledCellGenerator", "StripRandomDisabledCellGenerator", ""}
 
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 58 of file StripDigitizationTool.h.

Constructor & Destructor Documentation

◆ StripDigitizationTool()

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

Definition at line 44 of file StripDigitizationTool.cxx.

46  :
47  base_class(type, name, parent) {
49 }

◆ ~StripDigitizationTool()

ITk::StripDigitizationTool::~StripDigitizationTool ( )
virtualdefault

Member Function Documentation

◆ addSDO()

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

Definition at line 871 of file StripDigitizationTool.cxx.

871  {
872 
873  using list_t = SiTotalCharge::list_t;
874  std::vector<InDetSimData::Deposit> deposits;
875  deposits.reserve(5); // no idea what a reasonable number for this would be
876  // with pileup
877  // loop over the charged diodes
878  SiChargedDiodeIterator EndOfDiodeCollection{collection->end()};
879  for (SiChargedDiodeIterator i_chargedDiode{collection->begin()}; i_chargedDiode != EndOfDiodeCollection; ++i_chargedDiode) {
880  deposits.clear();
881  const list_t& charges{(*i_chargedDiode).second.totalCharge().chargeComposition()};
882 
883  bool real_particle_hit{false};
884  // loop over the list
885  list_t::const_iterator EndOfChargeList{charges.end()};
886  for (list_t::const_iterator i_ListOfCharges{charges.begin()}; i_ListOfCharges != EndOfChargeList; ++i_ListOfCharges) {
887  const HepMcParticleLink& trkLink{i_ListOfCharges->particleLink()};
888  const int barcode{trkLink.barcode()};
889  if (HepMC::ignoreTruthLink(barcode, m_vetoPileUpTruthLinks)) {
890  continue;
891  }
892  if (not real_particle_hit) {
893  // Types of SiCharges expected from SCT
894  // Noise: barcode==0 and
895  // processType()==SiCharge::noise
896  // Delta Rays: barcode==0 and
897  // processType()==SiCharge::track
898  // Pile Up Tracks With No Truth: barcode!=0 and
899  // processType()==SiCharge::cut_track
900  // Tracks With Truth: barcode!=0 and
901  // processType()==SiCharge::track
902  if (!HepMC::no_truth_link(barcode) && i_ListOfCharges->processType() == SiCharge::track) {
903  real_particle_hit = true;
904  }
905  }
906  // check if this track number has been already used.
907  std::vector<InDetSimData::Deposit>::reverse_iterator theDeposit{deposits.rend()}; // dummy value
908  std::vector<InDetSimData::Deposit>::reverse_iterator depositsR_end{deposits.rend()};
909  std::vector<InDetSimData::Deposit>::reverse_iterator i_Deposit{deposits.rbegin()};
910  for (; i_Deposit != depositsR_end; ++i_Deposit) {
911  if ((*i_Deposit).first == trkLink) {
912  theDeposit = i_Deposit;
913  break;
914  }
915  }
916 
917  // if the charge has already hit the Diode add it to the deposit
918  if (theDeposit != depositsR_end) {
919  (*theDeposit).second += i_ListOfCharges->charge();
920  } else { // create a new deposit
921  deposits.emplace_back(trkLink, i_ListOfCharges->charge());
922  }
923  }
924 
925  // add the simdata object to the map:
926  if (real_particle_hit or m_createNoiseSDO) {
927  InDetDD::SiReadoutCellId roCell{(*i_chargedDiode).second.getReadoutCell()};
928  int strip{roCell.strip()};
929  const InDetDD::SCT_ModuleSideDesign& sctDesign{dynamic_cast<const InDetDD::SCT_ModuleSideDesign&>(collection->design())};
930 
931  int row2D{sctDesign.row(strip)};
932  Identifier id_readout;
933  if (row2D < 0) { // SCT sensors and new-style ITkStrip sensors
934  id_readout = m_detID->strip_id(collection->identify(),strip);
935  } else { // old-style (21.9) ITkStrip sensors
936  int strip2D{sctDesign.strip(strip)};
937  id_readout = m_detID->strip_id(collection->identify(),row2D, strip2D);
938  }
939  (*simDataCollMap)->try_emplace(id_readout, std::move(deposits), (*i_chargedDiode).second.flag());
940  }
941  }
942 }

◆ applyProcessorTools()

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

Definition at line 542 of file StripDigitizationTool.cxx.

542  {
543  ATH_MSG_DEBUG("applyProcessorTools()");
544  int processorNumber{0};
545 
547  proc->process(*chargedDiodes, rndmEngine);
548 
549  processorNumber++;
550  ATH_MSG_DEBUG("Applied processor # " << processorNumber);
551  }
552 }

◆ createAndStoreRDO()

StatusCode ITk::StripDigitizationTool::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 641 of file StripDigitizationTool.cxx.

641  {
642 
643  // Create the RDO collection
644  std::unique_ptr<SCT_RDO_Collection> RDOColl{createRDO(chDiodeCollection)};
645  const IdentifierHash identifyHash{RDOColl->identifyHash()};
646 
647  // Add it to storegate
648  Identifier id_coll{RDOColl->identify()};
649  int barrelec{m_detID->barrel_ec(id_coll)};
650 
651  if ((not m_barrelonly) or (std::abs(barrelec) <= 1)) {
652  if ((*rdoContainer)->addCollection(RDOColl.release(), identifyHash).isFailure()) {
653  ATH_MSG_FATAL("SCT RDO collection could not be added to container!");
654  return StatusCode::FAILURE;
655  }
656  } else {
657  ATH_MSG_VERBOSE("Not saving SCT_RDO_Collection: " << m_detID->show_to_string(RDOColl->identify()) << " to container!");
658  }
659  return StatusCode::SUCCESS;
660 } // StripDigitization::createAndStoreRDO()

◆ createRDO()

std::unique_ptr< SCT_RDO_Collection > ITk::StripDigitizationTool::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 665 of file StripDigitizationTool.cxx.

665  {
666 
667  // create a new SCT RDO collection
668  std::unique_ptr<SCT_RDO_Collection> p_rdocoll;
669 
670  // need the DE identifier
671  const Identifier id_de{collection->identify()};
672  IdentifierHash idHash_de{collection->identifyHash()};
673  try {
674  p_rdocoll = std::make_unique<SCT_RDO_Collection>(idHash_de);
675  } catch (const std::bad_alloc&) {
676  ATH_MSG_FATAL("Could not create a new SCT_RDORawDataCollection !");
677  }
678  p_rdocoll->setIdentifier(id_de);
679 
680  SiChargedDiodeIterator i_chargedDiode{collection->begin()};
681  SiChargedDiodeIterator i_chargedDiode_end{collection->end()};
682  // Choice of producing SCT1_RawData or SCT3_RawData
683  if (m_WriteSCT1_RawData.value()) {
684  for (; i_chargedDiode != i_chargedDiode_end; ++i_chargedDiode) {
685  unsigned int flagmask{static_cast<unsigned int>((*i_chargedDiode).second.flag() & 0xFE)};
686 
687  if (!flagmask) { // now check it wasn't masked:
688  // create new SCT RDO, using method 1 for mask:
689  // GroupSize=1: need readout id, make use of
690  // SiTrackerDetDescr
691  InDetDD::SiReadoutCellId roCell{(*i_chargedDiode).second.getReadoutCell()};
692  int strip{roCell.strip()};
693  if (strip > 0xffff) { // In upgrade layouts strip can be bigger
694  // than 4000
695  ATH_MSG_FATAL("Strip number too big for SCT1 raw data format.");
696  }
697  const Identifier id_readout{m_detID->strip_id(collection->identify(), strip)};
698 
699  // build word, masks taken from SiTrackerEvent/SCTRawData.cxx
700  const unsigned int strip_rdo{static_cast<unsigned int>((strip & 0xFFFF) << 16)};
701 
702  // user can define what GroupSize is, here 1: TC. Incorrect,
703  // GroupSize >= 1
704  int size{SiHelper::GetStripNum((*i_chargedDiode).second)};
705  unsigned int size_rdo{static_cast<unsigned int>(size & 0xFFFF)};
706 
707  // TC. Need to check if there are disabled strips in the cluster
708  int cluscounter{0};
709  if (size > 1) {
710  SiChargedDiodeIterator it2{i_chargedDiode};
711  ++it2;
712  for (; it2 != i_chargedDiode_end; ++it2) {
713  ++cluscounter;
714  if (cluscounter >= size) {
715  break;
716  }
717  if (it2->second.flag() & 0xDE) {
718  int tmp{cluscounter};
719  while ((it2 != i_chargedDiode_end) and (cluscounter < size - 1) and (it2->second.flag() & 0xDE)) {
720  ++it2;
721  ++cluscounter;
722  }
723  if ((it2 != collection->end()) and !(it2->second.flag() & 0xDE)) {
724  SiHelper::ClusterUsed(it2->second, false);
725  SiHelper::SetStripNum(it2->second, size - cluscounter, &msg());
726  }
727  // groupSize=tmp;
728  size_rdo = tmp & 0xFFFF;
729  break;
730  }
731  }
732  }
733  unsigned int StripWord{strip_rdo | size_rdo};
734  SCT1_RawData* p_rdo{new SCT1_RawData(id_readout, StripWord)};
735  if (p_rdo) {
736  p_rdocoll->push_back(p_rdo);
737  }
738  }
739  }
740  } else {
741  // Under the current scheme time bin and ERRORS are hard-coded to
742  // default values.
743  int ERRORS{0};
744  static const std::vector<int> dummyvector;
745  for (; i_chargedDiode != i_chargedDiode_end; ++i_chargedDiode) {
746  unsigned int flagmask{static_cast<unsigned int>((*i_chargedDiode).second.flag() & 0xFE)};
747 
748  if (!flagmask) { // Check it wasn't masked
749  int tbin{SiHelper::GetTimeBin((*i_chargedDiode).second)};
750  // create new SCT RDO
751  InDetDD::SiReadoutCellId roCell{(*i_chargedDiode).second.getReadoutCell()};
752  int strip{roCell.strip()};
753  const InDetDD::SCT_ModuleSideDesign& sctDesign{static_cast<const InDetDD::SCT_ModuleSideDesign&>(collection->design())};
754  int row2D{sctDesign.row(strip)};
755  Identifier id_readout;
756  if (row2D < 0) { // SCT sensors
757  id_readout = m_detID->strip_id(collection->identify(), strip);
758  } else { // Upgrade sensors
759  int strip2D{sctDesign.strip(strip)};
760  id_readout = m_detID->strip_id(collection->identify(), row2D, strip2D);
761  }
762 
763  // build word (compatible with
764  // StripRawDataByteStreamCnv/src/StripRodDecoder.cxx)
765  int size{SiHelper::GetStripNum((*i_chargedDiode).second)};
766  int groupSize{size};
767 
768  // TC. Need to check if there are disabled strips in the cluster
769  int cluscounter{0};
770  if (size > 1) {
771  SiChargedDiode* diode{i_chargedDiode->second.nextInCluster()};
772  while (diode) {//check if there is a further strip in the cluster
773  ++cluscounter;
774  if (cluscounter >= size) {
775  ATH_MSG_WARNING("Cluster size reached while neighbouring strips still defined.");
776  break;
777  }
778  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)
779  int tmp{cluscounter};
780  while ((cluscounter < size - 1) and (diode->flag() & 0xDE)) { //check its not the end and still disabled
781  diode = diode->nextInCluster();
782  cluscounter++;
783  }
784  if (diode and !(diode->flag() & 0xDE)) {
785  SiHelper::ClusterUsed(*diode, false);
786  SiHelper::SetStripNum(*diode, size - cluscounter, &msg());
787  }
788  groupSize = tmp;
789  break;
790  }
791  diode = diode->nextInCluster();
792  }
793  }
794 
795  int stripIn11bits{strip & 0x7ff};
796  if (stripIn11bits != strip) {
797  ATH_MSG_DEBUG("Strip number " << strip << " doesn't fit into 11 bits - will be truncated");
798  }
799 
800  unsigned int StripWord{static_cast<unsigned int>(groupSize | (stripIn11bits << 11) | (tbin << 22) | (ERRORS << 25))};
801  SCT3_RawData *p_rdo{new SCT3_RawData(id_readout, StripWord, &dummyvector)};
802  if (p_rdo) {
803  p_rdocoll->push_back(p_rdo);
804  }
805  }
806  }
807  }
808  return p_rdocoll;
809 } // StripDigitization::createRDO()

◆ digitizeAllHits()

void ITk::StripDigitizationTool::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 297 of file StripDigitizationTool.cxx.

297  {
299  //
300  // In order to process all element rather than just those with hits we
301  // create a vector to keep track of which elements have been processed.
302  // NB. an element is an sct module
303  //
305  ATH_MSG_DEBUG("Digitizing hits");
306  int hitcount{0}; // First, elements with hits.
307 
308  //map with key representing the row of strips
309  SiChargedDiodeCollectionMap chargedDiodesMap;
310 
311  while (digitizeElement(ctx, chargedDiodesMap, thpcsi, rndmEngine)) {
312 
313  ATH_MSG_DEBUG("Digitizing "<<chargedDiodesMap.size()<<" Element(s)");
314 
315  hitcount++; // Hitcount will be a number in the hit collection minus
316  // number of hits in missing mods
317 
318  for (SiChargedDiodeCollectionIterator & chargedDiodesIter : chargedDiodesMap){
319 
320  SiChargedDiodeCollection & chargedDiodes = *chargedDiodesIter.second;
321  ATH_MSG_DEBUG("Hit collection ID=" << m_detID->show_to_string(chargedDiodes.identify()));
322 
323  ATH_MSG_DEBUG("in digitize elements with hits: ec - layer - eta - phi "
324  << m_detID->barrel_ec(chargedDiodes.identify()) << " - "
325  << m_detID->layer_disk(chargedDiodes.identify()) << " - "
326  << m_detID->eta_module(chargedDiodes.identify()) << " - "
327  << m_detID->phi_module(chargedDiodes.identify()) << " - "
328  << " processing hit number " << hitcount);
329 
330  // Have a flag to check if the module is present or not
331  // Generally assume it is:
332 
333  IdentifierHash idHash{chargedDiodes.identifyHash()};
334 
335  assert(idHash < processedElements->size());
336  (*processedElements)[idHash] = true;
337 
338  // create and store RDO and SDO
339 
340  if (not chargedDiodes.empty()) {
341  StatusCode sc{createAndStoreRDO(&chargedDiodes, rdoContainer)};
342  if (sc.isSuccess()) { // error msg is given inside
343  // createAndStoreRDO()
344  addSDO(&chargedDiodes, simDataCollMap);
345  }
346  }
347 
348  chargedDiodes.clear();
349  }
350  }
351  ATH_MSG_DEBUG("hits processed");
352 }

◆ digitizeElement()

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

Definition at line 403 of file StripDigitizationTool.cxx.

403  {
404  if (nullptr == thpcsi) {
405  ATH_MSG_ERROR("thpcsi should not be nullptr!");
406 
407  return false;
408  }
409 
410  chargedDiodesMap.clear();
411 
412  // get the iterator pairs for this DetEl
413 
415  if (!thpcsi->nextDetectorElement(i, e)) { // no more hits
416  return false;
417  }
418 
419  // create the identifier for the collection:
420  ATH_MSG_DEBUG("create ID for the hit collection");
421  const TimedHitPtr<SiHit>& firstHit{*i};
422  int barrel{firstHit->getBarrelEndcap()};
423  Identifier id{m_detID->wafer_id(barrel,
424  firstHit->getLayerDisk(),
425  firstHit->getPhiModule(),
426  firstHit->getEtaModule(),
427  firstHit->getSide())};
428  IdentifierHash waferHash{m_detID->wafer_hash(id)};
429 
430  // Get StripDetectorElementCollection
432  const InDetDD::SiDetectorElementCollection* elements(stripDetEle.retrieve());
433  if (elements==nullptr) {
434  ATH_MSG_FATAL(m_stripDetEleCollKey.fullKey() << " could not be retrieved");
435  return false;
436  }
437 
438  // get the det element from the manager
439  const InDetDD::SiDetectorElement* sielement{elements->getDetectorElement(waferHash)};
440 
441  if (sielement == nullptr) {
442  ATH_MSG_DEBUG("Barrel=" << barrel << " layer=" << firstHit->getLayerDisk() << " Eta=" << firstHit->getEtaModule() << " Phi=" << firstHit->getPhiModule() << " Side=" << firstHit->getSide());
443  ATH_MSG_ERROR("detector manager could not find element with id = " << id);
444  return false;
445  }
446 
447 
448  //Now we have to get the sub-elements if they exist!
449  const InDetDD::SCT_ModuleSideDesign * thisDesign = static_cast<const InDetDD::SCT_ModuleSideDesign*>(&sielement->design());
450 
451  const InDetDD::SCT_ModuleSideDesign * motherDesign = thisDesign->getMother();
452 
453  //should become un-ordederd map
454  std::map<int, const InDetDD::SCT_ModuleSideDesign *> children;
455 
456  if(motherDesign){
457  //see above
458  children = motherDesign->getChildren();
459  }
460  else {
461  //if no mother/children relationship, just use what you got intially
462  children.emplace(0,thisDesign);
463  }
464 
465 
466  for (const std::pair <const int, const InDetDD::SCT_ModuleSideDesign *> &subDesign : children){
467 
468  //Create the charged diodes collection.
469  //We are incrementing the eta index with the number of the
470  //sub-element (child) in the returned set.
471  //This "fills in" the gaps in the SiHitIdentifiers with the
472  //number of the strip row, such that the SCT_ID is continuous
473  //once we split the single simulated sensor into multiple SiDetectorElements
474  Identifier id_child{m_detID->wafer_id(firstHit->getBarrelEndcap(), firstHit->getLayerDisk(),
475  firstHit->getPhiModule(), firstHit->getEtaModule()+subDesign.first,
476  firstHit->getSide())};
477 
478  IdentifierHash hash_child = m_detID->wafer_hash(id_child);
479 
480  const InDetDD::SiDetectorElement* sielement_child{elements->getDetectorElement(hash_child)};
481 
482  if(sielement_child){
483 
484  std::unique_ptr<SiChargedDiodeCollection> thisChargedDiode(std::make_unique<SiChargedDiodeCollection>());
485  int i_index = subDesign.first;
486  thisChargedDiode->setDetectorElement(sielement_child);
487  chargedDiodesMap.insert({i_index,std::move(thisChargedDiode)});
488 
489  }
490 
491  else ATH_MSG_ERROR("detector manager could not find element with id = "<<id_child<<" Barrel=" << firstHit->getBarrelEndcap() << " layer=" <<
492  firstHit->getLayerDisk() << " Eta=" << firstHit->getEtaModule()+subDesign.first <<" Phi=" << firstHit->getPhiModule()
493  << " Side=" <<firstHit->getSide());
494  }
495 
496 
497  // Loop over the hits and created charged diodes:
498  while (i != e) {
499  const TimedHitPtr<SiHit>& phit{*i++};
500 
501  // skip hits which are more than 10us away
502  if (std::abs(phit->meanTime()) < 10000. * CLHEP::ns) {
503  ATH_MSG_DEBUG("HASH = " << m_detID->wafer_hash(m_detID->wafer_id(phit->getBarrelEndcap(),
504  phit->getLayerDisk(),
505  phit->getPhiModule(),
506  phit->getEtaModule(),
507  phit->getSide())));
508  ATH_MSG_DEBUG("calling process() for all methods");
509 
510  if(!motherDesign) {
511  //no row splitting
512  //should only be one diode collection here, so just use it
513  if(chargedDiodesMap.size()>1) {
514  ATH_MSG_WARNING("More DiodesCollections("<<chargedDiodesMap.size()<<") than expected (1). Please check your configuration!");
515  }
516 
517  SiDigitizationSurfaceChargeInserter inserter(sielement,chargedDiodesMap[0].get());
518  m_sct_SurfaceChargesGenerator->process(sielement, phit, inserter, rndmEngine, ctx);
519  }
520 
521  else{
522  //with row splitting
523  MultiElementChargeInserter inserter(chargedDiodesMap,motherDesign);
524  m_sct_SurfaceChargesGenerator->process(sielement, phit,inserter, rndmEngine, ctx);
525  }
526 
527  ATH_MSG_DEBUG("charges filled!");
528  }
529  }
530 
531  //Now loop over set of diodes and apply processors
532  for (SiChargedDiodeCollectionIterator & theDiode : chargedDiodesMap){
533  if(theDiode.second) applyProcessorTools(theDiode.second.get(), rndmEngine); // !< Use of the new AlgTool surface
534  }
535  // charges generator class
536  return true;
537 }

◆ digitizeNonHits()

void ITk::StripDigitizationTool::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 355 of file StripDigitizationTool.cxx.

355  {
356  // Get StripDetectorElementCollection
358  const InDetDD::SiDetectorElementCollection* elements{stripDetEle.retrieve()};
359  if (elements==nullptr) {
360  ATH_MSG_FATAL(m_stripDetEleCollKey.fullKey() << " could not be retrieved");
361  return;
362  }
363 
364  ATH_MSG_DEBUG("processing elements without hits");
365  SiChargedDiodeCollection chargedDiodes;
366 
367  for (unsigned int i{0}; i < processedElements->size(); i++) {
368  if (not (*processedElements)[i]) {
369  IdentifierHash idHash{i};
370  if (not idHash.is_valid()) {
371  ATH_MSG_ERROR("SCT Detector element id hash is invalid = " << i);
372  }
373 
374  const InDetDD::SiDetectorElement* element{elements->getDetectorElement(idHash)};
375  if (element) {
376  ATH_MSG_DEBUG("In digitize of untouched elements: layer - phi - eta "
377  << m_detID->layer_disk(element->identify()) << " - "
378  << m_detID->phi_module(element->identify()) << " - "
379  << m_detID->eta_module(element->identify()) << " - "
380  << "size: " << processedElements->size());
381 
382  chargedDiodes.setDetectorElement(element);
383  ATH_MSG_DEBUG("calling applyProcessorTools() for NON hits");
384  applyProcessorTools(&chargedDiodes, rndmEngine);
385 
386  // Create and store RDO and SDO
387  // Don't create empty ones.
388  if (not chargedDiodes.empty()) {
389  StatusCode sc{createAndStoreRDO(&chargedDiodes, rdoContainer)};
390  if (sc.isSuccess()) {// error msg is given inside
391  // createAndStoreRDO()
392  addSDO(&chargedDiodes, simDataCollMap);
393  }
394  }
395 
396  chargedDiodes.clear();
397  }
398  }
399  }
400 
401  }

◆ getNextEvent()

StatusCode ITk::StripDigitizationTool::getNextEvent ( const EventContext &  ctx)
private

Definition at line 814 of file StripDigitizationTool.cxx.

814  {
815  ATH_MSG_DEBUG("StripDigitizationTool::getNextEvent");
816  // get the container(s)
817  using TimedHitCollList = PileUpMergeSvc::TimedList<SiHitCollection>::type;
818  // this is a list<pair<time_t, DataLink<SiHitCollection> >
819 
820  // In case of single hits container just load the collection using read handles
821  if (!m_onlyUseContainerName) {
823  if (!hitCollection.isValid()) {
824  ATH_MSG_ERROR("Could not get SCT SiHitCollection container " << hitCollection.name() << " from store " << hitCollection.store());
825  return StatusCode::FAILURE;
826  }
827 
828  // create a new hits collection
829  m_thpcsi = std::make_unique<TimedHitCollection<SiHit>>(1);
830  m_thpcsi->insert(0, hitCollection.cptr());
831  ATH_MSG_DEBUG("SiHitCollection found with " << hitCollection->size() << " hits");
832 
833  return StatusCode::SUCCESS;
834  }
835 
836  TimedHitCollList hitCollList;
837  unsigned int numberOfSiHits{0};
838  if (not (m_mergeSvc->retrieveSubEvtsData(m_inputObjectName, hitCollList, numberOfSiHits).isSuccess()) and hitCollList.empty()) {
839  ATH_MSG_ERROR("Could not fill TimedHitCollList");
840  return StatusCode::FAILURE;
841  } else {
842  ATH_MSG_DEBUG(hitCollList.size() << " SiHitCollections with key " << m_inputObjectName << " found");
843  }
844  // create a new hits collection
845  m_thpcsi = std::make_unique<TimedHitCollection<SiHit>>(numberOfSiHits);
846  // now merge all collections into one
847  TimedHitCollList::iterator endColl{hitCollList.end()};
848  for (TimedHitCollList::iterator iColl{hitCollList.begin()}; iColl != endColl; ++iColl) {
849  // decide if this event will be processed depending on
850  // HardScatterSplittingMode & bunchXing
853  continue;
854  }
856  continue;
857  }
860  }
861  const SiHitCollection* p_collection{iColl->second};
862  m_thpcsi->insert(iColl->first, p_collection);
863  ATH_MSG_DEBUG("SiTrackerHitCollection found with " << p_collection->size() << " hits"); // loop on the hit collections
864  }
865  return StatusCode::SUCCESS;
866 }

◆ initDisabledCells()

StatusCode ITk::StripDigitizationTool::initDisabledCells ( )
private

Initialize the StripRandomDisabledCellGenerator AlgTool.

Definition at line 209 of file StripDigitizationTool.cxx.

209  {
210  // +++ Retrieve the StripRandomDisabledCellGenerator
212 
214 
215  ATH_MSG_INFO("Retrieved the StripRandomDisabledCellGenerator tool:" << m_sct_RandomDisabledCellGenerator);
216  return StatusCode::SUCCESS;
217 }

◆ initFrontEndTool()

StatusCode ITk::StripDigitizationTool::initFrontEndTool ( )
private

Initialize the StripFrontEnd AlgTool.

Definition at line 181 of file StripDigitizationTool.cxx.

181  {
182  ATH_CHECK(m_sct_FrontEnd.retrieve());
183 
185 
186  ATH_MSG_DEBUG("Retrieved and initialised tool " << m_sct_FrontEnd);
187  return StatusCode::SUCCESS;
188 }

◆ initialize()

StatusCode ITk::StripDigitizationTool::initialize ( )
finaloverridevirtual

Definition at line 56 of file StripDigitizationTool.cxx.

56  {
57  ATH_MSG_DEBUG("StripDigitizationTool::initialize()");
58 
59  // +++ Init the services
61 
62  // +++ Get the Surface Charges Generator tool
64 
65  // +++ Get the Front End tool
67 
68  // +++ Initialise for disabled cells from the random disabled cells tool
69  // +++ Default off, since disabled cells taken form configuration in
70  // reconstruction stage
73  ATH_MSG_INFO("Use of Random disabled cells");
74  } else {
76  }
77 
78  // check the input object name
79  if (m_hitsContainerKey.key().empty()) {
80  ATH_MSG_FATAL("Property InputObjectName not set !");
81  return StatusCode::FAILURE;
82  }
84  ATH_MSG_DEBUG("Input objects in container : '" << m_inputObjectName << "'");
85 
86  // Initialize ReadHandleKey
87  ATH_CHECK(m_hitsContainerKey.initialize(true));
88 
89  // +++ Initialize WriteHandleKey
90  ATH_CHECK(m_rdoContainerKey.initialize());
92 
93  // Initialize ReadCondHandleKey
95 
96  ATH_MSG_DEBUG("SiDigitizationTool::initialize() complete");
97 
98  return StatusCode::SUCCESS;
99 }

◆ initServices()

StatusCode ITk::StripDigitizationTool::initServices ( )
private

initialize the required services

Definition at line 193 of file StripDigitizationTool.cxx.

193  {
194  // Get SCT ID helper for hash function and Store them using methods from the
195  // SiDigitization.
196  ATH_CHECK(detStore()->retrieve(m_detID, "SCT_ID"));
197 
199  ATH_CHECK(m_mergeSvc.retrieve());
200  }
201  ATH_CHECK(m_rndmSvc.retrieve());
202 
203  return StatusCode::SUCCESS;
204 }

◆ initSurfaceChargesGeneratorTool()

StatusCode ITk::StripDigitizationTool::initSurfaceChargesGeneratorTool ( )
private

Initialize the StripSurfaceChargesGenerator AlgTool.

Definition at line 165 of file StripDigitizationTool.cxx.

165  {
167 
168  if (m_cosmicsRun and m_tfix > -998) {
169  m_sct_SurfaceChargesGenerator->setFixedTime(m_tfix);
170  ATH_MSG_INFO("Use of FixedTime = " << m_tfix << " in cosmics");
171  }
172 
173  ATH_MSG_DEBUG("Retrieved and initialised tool " << m_sct_SurfaceChargesGenerator);
174 
175  return StatusCode::SUCCESS;
176 }

◆ interfaceID()

const InterfaceID & ITk::StripDigitizationTool::interfaceID ( )
inlinestatic

Definition at line 161 of file StripDigitizationTool.h.

161  {
162  return IID_IStripDigitizationTool;
163 }

◆ mergeEvent()

StatusCode ITk::StripDigitizationTool::mergeEvent ( const EventContext &  ctx)
finaloverridevirtual

Definition at line 273 of file StripDigitizationTool.cxx.

273  {
274  ATH_MSG_VERBOSE("StripDigitizationTool::mergeEvent()");
275 
276  // Set the RNG to use for this event.
277  ATHRNG::RNGWrapper* rngWrapper = m_rndmSvc->getEngine(this);
278  rngWrapper->setSeed( name(), ctx );
279  CLHEP::HepRandomEngine *rndmEngine = rngWrapper->getEngine(ctx);
280 
281  if (m_enableHits) {
283  }
284 
285  if (not m_onlyHitElements) {
287  }
288 
289  m_hitCollPtrs.clear();
290 
291  m_thpcsi.reset(nullptr);
292 
293  ATH_MSG_DEBUG("Digitize success!");
294  return StatusCode::SUCCESS;
295 }

◆ prepareEvent()

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

Called before processing physics events.

Definition at line 251 of file StripDigitizationTool.cxx.

251  {
252  ATH_MSG_VERBOSE("StripDigitizationTool::prepareEvent()");
253  // Create the IdentifiableContainer to contain the digit collections Create
254  // a new RDO container
256  ATH_CHECK(m_rdoContainer.record(std::make_unique<SCT_RDO_Container>(m_detID->wafer_hash_max())));
257 
258  // Create a map for the SDO and register it into StoreGate
260  ATH_CHECK(m_simDataCollMap.record(std::make_unique<InDetSimDataCollection>()));
261 
262  m_processedElements.clear();
263  m_processedElements.resize(m_detID->wafer_hash_max(), false);
264 
265  m_thpcsi = std::make_unique<TimedHitCollection<SiHit>>();
267  return StatusCode::SUCCESS;
268 }

◆ processAllSubEvents()

StatusCode ITk::StripDigitizationTool::processAllSubEvents ( const EventContext &  ctx)
finaloverridevirtual

Definition at line 219 of file StripDigitizationTool.cxx.

219  {
220  if (prepareEvent(ctx, 0).isFailure()) {
221  return StatusCode::FAILURE;
222  }
223  // Set the RNG to use for this event.
224  ATHRNG::RNGWrapper* rngWrapper = m_rndmSvc->getEngine(this);
225  rngWrapper->setSeed( name(), ctx );
226  CLHEP::HepRandomEngine *rndmEngine = rngWrapper->getEngine(ctx);
227 
228  ATH_MSG_VERBOSE("Begin digitizeAllHits");
229  if (m_enableHits and (not getNextEvent(ctx).isFailure())) {
231  } else {
232  ATH_MSG_DEBUG("no hits found in event!");
233  }
234  ATH_MSG_DEBUG("Digitized Elements with Hits");
235 
236  // loop over elements without hits
237  if (not m_onlyHitElements) {
239  ATH_MSG_DEBUG("Digitized Elements without Hits");
240  }
241 
242  m_thpcsi.reset(nullptr);
243 
244  ATH_MSG_VERBOSE("Digitize success!");
245  return StatusCode::SUCCESS;
246 }

◆ processBunchXing()

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

Definition at line 554 of file StripDigitizationTool.cxx.

556  {
557  ATH_MSG_VERBOSE("StripDigitizationTool::processBunchXing() " << bunchXing);
558  // decide if this event will be processed depending on
559  // HardScatterSplittingMode & bunchXing
562  return StatusCode::SUCCESS;
563  }
565  return StatusCode::SUCCESS;
566  }
569  }
570 
571  using TimedHitCollList = PileUpMergeSvc::TimedList<SiHitCollection>::type;
572  TimedHitCollList hitCollList;
573 
574  if ((not (m_mergeSvc->retrieveSubSetEvtData(m_inputObjectName, hitCollList, bunchXing,
575  bSubEvents, eSubEvents).isSuccess())) and
576  hitCollList.empty()) {
577  ATH_MSG_ERROR("Could not fill TimedHitCollList");
578  return StatusCode::FAILURE;
579  } else {
580  ATH_MSG_VERBOSE(hitCollList.size() << " SiHitCollections with key " <<
581  m_inputObjectName << " found");
582  }
583 
584  TimedHitCollList::iterator endColl{hitCollList.end()};
585  for (TimedHitCollList::iterator iColl{hitCollList.begin()}; iColl != endColl; ++iColl) {
586  std::unique_ptr<SiHitCollection> hitCollPtr{std::make_unique<SiHitCollection>(*iColl->second)};
587  PileUpTimeEventIndex timeIndex{iColl->first};
588  ATH_MSG_DEBUG("SiHitCollection found with " << hitCollPtr->size() <<
589  " hits");
590  ATH_MSG_VERBOSE("time index info. time: " << timeIndex.time()
591  << " index: " << timeIndex.index()
592  << " type: " << timeIndex.type());
593  m_thpcsi->insert(timeIndex, hitCollPtr.get());
594  m_hitCollPtrs.push_back(std::move(hitCollPtr));
595  }
596 
597  return StatusCode::SUCCESS;
598 
599 }

◆ SetupRdoOutputType()

void ITk::StripDigitizationTool::SetupRdoOutputType ( Gaudi::Details::PropertyBase &  )
private

Called when m_WriteSCT1_RawData is altered.

Does nothing, but required by Gaudi.

Definition at line 604 of file StripDigitizationTool.cxx.

604  {
605 }

◆ storeTool()

void ITk::StripDigitizationTool::storeTool ( ISiChargedDiodesProcessorTool p_processor)
inlineprotected

Definition at line 84 of file StripDigitizationTool.h.

84 {m_diodeCollectionTools.push_back(p_processor);}

Member Data Documentation

◆ m_barrelonly

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

Definition at line 130 of file StripDigitizationTool.h.

◆ m_cosmicsRun

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

Definition at line 129 of file StripDigitizationTool.h.

◆ m_createNoiseSDO

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

Definition at line 132 of file StripDigitizationTool.h.

◆ m_detID

const SCT_ID* ITk::StripDigitizationTool::m_detID {nullptr}
private

Handle to the ID helper.

Definition at line 152 of file StripDigitizationTool.h.

◆ m_diodeCollectionTools

std::vector<ISiChargedDiodesProcessorTool*> ITk::StripDigitizationTool::m_diodeCollectionTools
private

Definition at line 154 of file StripDigitizationTool.h.

◆ m_enableHits

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

Definition at line 127 of file StripDigitizationTool.h.

◆ m_HardScatterSplittingMode

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

Definition at line 133 of file StripDigitizationTool.h.

◆ m_HardScatterSplittingSkipper

bool ITk::StripDigitizationTool::m_HardScatterSplittingSkipper {false}
private

Definition at line 157 of file StripDigitizationTool.h.

◆ m_hitCollPtrs

std::vector<std::unique_ptr<SiHitCollection> > ITk::StripDigitizationTool::m_hitCollPtrs
private

Definition at line 156 of file StripDigitizationTool.h.

◆ m_hitsContainerKey

SG::ReadHandleKey<SiHitCollection> ITk::StripDigitizationTool::m_hitsContainerKey {this, "InputObjectName", "StripHits", "Input HITS collection name"}
private

Definition at line 137 of file StripDigitizationTool.h.

◆ m_inputObjectName

std::string ITk::StripDigitizationTool::m_inputObjectName {""}
private

Definition at line 138 of file StripDigitizationTool.h.

◆ m_mergeSvc

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

Definition at line 150 of file StripDigitizationTool.h.

◆ m_onlyHitElements

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

Definition at line 128 of file StripDigitizationTool.h.

◆ m_onlyUseContainerName

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

Definition at line 136 of file StripDigitizationTool.h.

◆ m_processedElements

std::vector<bool> ITk::StripDigitizationTool::m_processedElements
private

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

Definition at line 155 of file StripDigitizationTool.h.

◆ m_randomDisabledCells

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

Definition at line 131 of file StripDigitizationTool.h.

◆ m_rdoContainer

SG::WriteHandle<SCT_RDO_Container> ITk::StripDigitizationTool::m_rdoContainer
private

RDO container handle.

Definition at line 141 of file StripDigitizationTool.h.

◆ m_rdoContainerKey

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

Definition at line 140 of file StripDigitizationTool.h.

◆ m_rndmSvc

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

Random number service.

Definition at line 149 of file StripDigitizationTool.h.

◆ m_sct_FrontEnd

ToolHandle<IFrontEnd> ITk::StripDigitizationTool::m_sct_FrontEnd {this, "FrontEnd", "StripFrontEnd", "Handle the Front End Electronic tool"}
private

Definition at line 146 of file StripDigitizationTool.h.

◆ m_sct_RandomDisabledCellGenerator

ToolHandle<IRandomDisabledCellGenerator> ITk::StripDigitizationTool::m_sct_RandomDisabledCellGenerator {this, "RandomDisabledCellGenerator", "StripRandomDisabledCellGenerator", ""}
private

Definition at line 148 of file StripDigitizationTool.h.

◆ m_sct_SurfaceChargesGenerator

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

Definition at line 147 of file StripDigitizationTool.h.

◆ m_simDataCollMap

SG::WriteHandle<InDetSimDataCollection> ITk::StripDigitizationTool::m_simDataCollMap
private

SDO Map handle.

Definition at line 143 of file StripDigitizationTool.h.

◆ m_simDataCollMapKey

SG::WriteHandleKey<InDetSimDataCollection> ITk::StripDigitizationTool::m_simDataCollMapKey {this, "OutputSDOName", "StripSDO_Map", "Output SDO container name"}
private

Definition at line 142 of file StripDigitizationTool.h.

◆ m_stripDetEleCollKey

SG::ReadCondHandleKey<InDetDD::SiDetectorElementCollection> ITk::StripDigitizationTool::m_stripDetEleCollKey {this, "StripDetEleCollKey", "ITkStripDetectorElementCollection", "Key of SiDetectorElementCollection for SCT"}
private

Definition at line 144 of file StripDigitizationTool.h.

◆ m_tfix

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

Definition at line 126 of file StripDigitizationTool.h.

◆ m_thpcsi

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

Definition at line 153 of file StripDigitizationTool.h.

◆ m_WriteSCT1_RawData

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

Definition at line 134 of file StripDigitizationTool.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
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
ITk::StripDigitizationTool::m_sct_RandomDisabledCellGenerator
ToolHandle< IRandomDisabledCellGenerator > m_sct_RandomDisabledCellGenerator
Definition: StripDigitizationTool.h:148
python.SystemOfUnits.second
int second
Definition: SystemOfUnits.py:120
ITk::StripDigitizationTool::createAndStoreRDO
StatusCode createAndStoreRDO(SiChargedDiodeCollection *chDiodeCollection, SG::WriteHandle< SCT_RDO_Container > *rdoContainer) const
RDO and SDO methods.
Definition: StripDigitizationTool.cxx:641
ATH_MSG_FATAL
#define ATH_MSG_FATAL(x)
Definition: AthMsgStreamMacros.h:34
ITk::StripDigitizationTool::m_detID
const SCT_ID * m_detID
Handle to the ID helper.
Definition: StripDigitizationTool.h:152
ITk::StripDigitizationTool::initFrontEndTool
StatusCode initFrontEndTool()
Initialize the StripFrontEnd AlgTool.
Definition: StripDigitizationTool.cxx:181
SiChargedDiode
Definition: SiChargedDiode.h:30
ITk::StripDigitizationTool::m_WriteSCT1_RawData
BooleanProperty m_WriteSCT1_RawData
Definition: StripDigitizationTool.h:134
ITk::StripDigitizationTool::initDisabledCells
StatusCode initDisabledCells()
Initialize the StripRandomDisabledCellGenerator AlgTool.
Definition: StripDigitizationTool.cxx:209
ITk::StripDigitizationTool::m_thpcsi
std::unique_ptr< TimedHitCollection< SiHit > > m_thpcsi
Definition: StripDigitizationTool.h:153
InDetRawDataCollection::setIdentifier
void setIdentifier(Identifier id)
ITk::StripDigitizationTool::m_mergeSvc
ServiceHandle< PileUpMergeSvc > m_mergeSvc
Definition: StripDigitizationTool.h:150
InDetDD::SiDetectorElementCollection
Definition: SiDetectorElementCollection.h:30
SG::ReadCondHandle
Definition: ReadCondHandle.h:44
ATH_MSG_INFO
#define ATH_MSG_INFO(x)
Definition: AthMsgStreamMacros.h:31
ITk::StripDigitizationTool::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: StripDigitizationTool.cxx:355
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
ITk::StripDigitizationTool::m_simDataCollMapKey
SG::WriteHandleKey< InDetSimDataCollection > m_simDataCollMapKey
Definition: StripDigitizationTool.h:142
ITk::StripDigitizationTool::m_rndmSvc
ServiceHandle< IAthRNGSvc > m_rndmSvc
Random number service.
Definition: StripDigitizationTool.h:149
InDetDD::SCT_ModuleSideDesign::getMother
const SCT_ModuleSideDesign * getMother() const
Definition: SCT_ModuleSideDesign.h:283
SiCharge::track
@ track
Definition: SiCharge.h:28
AtlasHitsVector
Definition: AtlasHitsVector.h:33
SiChargedDiodeCollection::end
SiChargedDiodeIterator end()
Definition: SiChargedDiodeCollection.h:253
ReadBchFromCool.barrel
barrel
Definition: ReadBchFromCool.py:405
SCT_ID::barrel_ec
int barrel_ec(const Identifier &id) const
Values of different levels (failure returns 0)
Definition: SCT_ID.h:728
SiChargedDiodeCollection::empty
bool empty() const
Definition: SiChargedDiodeCollection.h:274
TimedHitPtr< SiHit >
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
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
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
ITk::StripDigitizationTool::m_HardScatterSplittingSkipper
bool m_HardScatterSplittingSkipper
Definition: StripDigitizationTool.h:157
SiChargedDiodeCollection::begin
SiChargedDiodeIterator begin()
Definition: SiChargedDiodeCollection.h:248
ITk::StripDigitizationTool::m_processedElements
std::vector< bool > m_processedElements
vector of processed elements - set by digitizeHits() *‍/
Definition: StripDigitizationTool.h:155
keylayer_zslicemap.strip
strip
Definition: keylayer_zslicemap.py:151
ITk::StripDigitizationTool::m_sct_SurfaceChargesGenerator
ToolHandle< ISurfaceChargesGenerator > m_sct_SurfaceChargesGenerator
Definition: StripDigitizationTool.h:147
ISiChargedDiodesProcessorTool
Definition: ISiChargedDiodesProcessorTool.h:26
SiChargedDiodeIterator
SiChargedDiodeMap::iterator SiChargedDiodeIterator
Definition: SiChargedDiodeCollection.h:70
AthenaPoolTestRead.sc
sc
Definition: AthenaPoolTestRead.py:27
ITk::StripDigitizationTool::m_simDataCollMap
SG::WriteHandle< InDetSimDataCollection > m_simDataCollMap
SDO Map handle.
Definition: StripDigitizationTool.h:143
ITk::StripDigitizationTool::m_rdoContainer
SG::WriteHandle< SCT_RDO_Container > m_rdoContainer
RDO container handle.
Definition: StripDigitizationTool.h:141
PileUpMergeSvc::TimedList::type
std::list< value_t > type
type of the collection of timed data object
Definition: PileUpMergeSvc.h:75
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
ITk::StripDigitizationTool::addSDO
void addSDO(SiChargedDiodeCollection *collection, SG::WriteHandle< InDetSimDataCollection > *simDataCollMap) const
Definition: StripDigitizationTool.cxx:871
python.setupRTTAlg.size
int size
Definition: setupRTTAlg.py:39
ITk::StripDigitizationTool::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: StripDigitizationTool.cxx:297
InDetDD::SCT_ModuleSideDesign::getChildren
std::map< int, const SCT_ModuleSideDesign * > getChildren() const
Definition: SCT_ModuleSideDesign.h:287
ATH_MSG_ERROR
#define ATH_MSG_ERROR(x)
Definition: AthMsgStreamMacros.h:33
SiChargedDiodeCollection
Definition: SiChargedDiodeCollection.h:109
SiChargedDiodeCollection::setDetectorElement
void setDetectorElement(const InDetDD::SolidStateDetectorElementBase *SiElement)
Definition: SiChargedDiodeCollection.h:207
ITk::StripDigitizationTool::applyProcessorTools
void applyProcessorTools(SiChargedDiodeCollection *chargedDiodes, CLHEP::HepRandomEngine *rndmEngine) const
Definition: StripDigitizationTool.cxx:542
lumiFormat.i
int i
Definition: lumiFormat.py:92
SCT3_RawData
Definition: SCT3_RawData.h:24
Identifier
Definition: DetectorDescription/Identifier/Identifier/Identifier.h:32
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
ITk::StripDigitizationTool::m_hitsContainerKey
SG::ReadHandleKey< SiHitCollection > m_hitsContainerKey
Definition: StripDigitizationTool.h:137
HepMC::barcode
int barcode(const T *p)
Definition: Barcode.h:16
ITk::StripDigitizationTool::SetupRdoOutputType
void SetupRdoOutputType(Gaudi::Details::PropertyBase &)
Called when m_WriteSCT1_RawData is altered.
Definition: StripDigitizationTool.cxx:604
master.flag
bool flag
Definition: master.py:29
ITk::StripDigitizationTool::m_onlyUseContainerName
BooleanProperty m_onlyUseContainerName
Definition: StripDigitizationTool.h:136
SiChargedDiodeCollection::clear
void clear()
Definition: SiChargedDiodeCollection.cxx:45
ITk::StripDigitizationTool::m_onlyHitElements
BooleanProperty m_onlyHitElements
Definition: StripDigitizationTool.h:128
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
ITk::StripDigitizationTool::digitizeElement
bool digitizeElement(const EventContext &ctx, SiChargedDiodeCollectionMap &chargedDiodes, TimedHitCollection< SiHit > *&thpcsi, CLHEP::HepRandomEngine *rndmEngine)
Definition: StripDigitizationTool.cxx:403
SiChargedDiodeCollectionMap
std::unordered_map< int, std::unique_ptr< SiChargedDiodeCollection > > SiChargedDiodeCollectionMap
Definition: StripDigitizationTool.h:45
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
ITk::StripDigitizationTool::m_sct_FrontEnd
ToolHandle< IFrontEnd > m_sct_FrontEnd
Definition: StripDigitizationTool.h:146
python.PyKernel.detStore
detStore
Definition: PyKernel.py:41
ITk::StripDigitizationTool::m_HardScatterSplittingMode
IntegerProperty m_HardScatterSplittingMode
Definition: StripDigitizationTool.h:133
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:192
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
ITk::StripDigitizationTool::m_rdoContainerKey
SG::WriteHandleKey< SCT_RDO_Container > m_rdoContainerKey
Definition: StripDigitizationTool.h:140
SCT_ID::layer_disk
int layer_disk(const Identifier &id) const
Definition: SCT_ID.h:734
ITk::StripDigitizationTool::m_cosmicsRun
BooleanProperty m_cosmicsRun
Definition: StripDigitizationTool.h:129
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)
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
ATHRNG::RNGWrapper::getEngine
CLHEP::HepRandomEngine * getEngine(const EventContext &ctx) const
Retrieve the random engine corresponding to the provided EventContext.
Definition: RNGWrapper.h:134
ITk::StripDigitizationTool::m_barrelonly
BooleanProperty m_barrelonly
Definition: StripDigitizationTool.h:130
ITk::StripDigitizationTool::prepareEvent
virtual StatusCode prepareEvent(const EventContext &ctx, unsigned int) override final
Called before processing physics events.
Definition: StripDigitizationTool.cxx:251
SiHelper::GetStripNum
static int GetStripNum(SiChargedDiode &chDiode)
Definition: SiHelper.h:199
ITk::StripDigitizationTool::getNextEvent
StatusCode getNextEvent(const EventContext &ctx)
Definition: StripDigitizationTool.cxx:814
ITk::StripDigitizationTool::m_hitCollPtrs
std::vector< std::unique_ptr< SiHitCollection > > m_hitCollPtrs
Definition: StripDigitizationTool.h:156
DiTauMassTools::MaxHistStrategyV2::e
e
Definition: PhysicsAnalysis/TauID/DiTauMassTools/DiTauMassTools/HelperFunctions.h:26
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
ATH_MSG_WARNING
#define ATH_MSG_WARNING(x)
Definition: AthMsgStreamMacros.h:32
ITk::StripDigitizationTool::m_inputObjectName
std::string m_inputObjectName
Definition: StripDigitizationTool.h:138
ITk::StripDigitizationTool::initSurfaceChargesGeneratorTool
StatusCode initSurfaceChargesGeneratorTool()
Initialize the StripSurfaceChargesGenerator AlgTool.
Definition: StripDigitizationTool.cxx:165
python.CaloScaleNoiseConfig.type
type
Definition: CaloScaleNoiseConfig.py:78
SCT_ID::eta_module
int eta_module(const Identifier &id) const
Definition: SCT_ID.h:746
get
T * get(TKey *tobj)
get a TObject* from a TKey* (why can't a TObject be a TKey?)
Definition: hcg.cxx:127
SCT1_RawData
Definition: SCT1_RawData.h:27
ITk::StripDigitizationTool::m_diodeCollectionTools
std::vector< ISiChargedDiodesProcessorTool * > m_diodeCollectionTools
Definition: StripDigitizationTool.h:154
python.DecayParser.children
children
Definition: DecayParser.py:32
ITk::StripDigitizationTool::storeTool
void storeTool(ISiChargedDiodesProcessorTool *p_processor)
Definition: StripDigitizationTool.h:84
SiChargedDiodeCollectionIterator
std::pair< const int, std::unique_ptr< SiChargedDiodeCollection > > SiChargedDiodeCollectionIterator
Definition: StripDigitizationTool.h:48
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
ITk::StripDigitizationTool::m_tfix
FloatProperty m_tfix
Definition: StripDigitizationTool.h:126
IdentifierHash
Definition: IdentifierHash.h:38
ITk::StripDigitizationTool::initServices
StatusCode initServices()
initialize the required services
Definition: StripDigitizationTool.cxx:193
PileUpTimeEventIndex
a struct encapsulating the identifier of a pile-up event
Definition: PileUpTimeEventIndex.h:12
ITk::StripDigitizationTool::m_randomDisabledCells
BooleanProperty m_randomDisabledCells
Definition: StripDigitizationTool.h:131
ITk::StripDigitizationTool::createRDO
std::unique_ptr< SCT_RDO_Collection > createRDO(SiChargedDiodeCollection *collection) const
Create RDOs from the SiChargedDiodeCollection for the current wafer.
Definition: StripDigitizationTool.cxx:665
python.AutoConfigFlags.msg
msg
Definition: AutoConfigFlags.py:7
ITk::StripDigitizationTool::m_createNoiseSDO
BooleanProperty m_createNoiseSDO
Definition: StripDigitizationTool.h:132
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
ITk::StripDigitizationTool::m_enableHits
BooleanProperty m_enableHits
Definition: StripDigitizationTool.h:127
ITk::StripDigitizationTool::m_stripDetEleCollKey
SG::ReadCondHandleKey< InDetDD::SiDetectorElementCollection > m_stripDetEleCollKey
Definition: StripDigitizationTool.h:144
SiChargedDiodeCollection::design
const InDetDD::DetectorDesign & design() const
Definition: SiChargedDiodeCollection.h:224
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