552{
553
554
555
556
559 for (const InDet::SiClusterCollection* pixelClusterCollection : *pixelClusterContainerHandler) {
560 if (pixelClusterCollection == nullptr) {
562 continue;
563 }
564 const int size = pixelClusterCollection->size();
565 ATH_MSG_DEBUG(
"PixelClusterCollection found with " << size <<
" clusters");
566 for (const InDet::SiCluster* cluster : *pixelClusterCollection) {
567
568
570 const HepMcParticleLink* bestTruthLink{};
572 for (const Identifier& rdoId : cluster->rdoList()) {
573 const InDetDD::SiDetectorElement* sielement =
m_PIX_mgr->getDetectorElement(rdoId);
574 assert(sielement);
577 InDetSimDataCollection::const_iterator
iter(pixelSDOHandle->find(rdoId));
578
579 if (nCells > 1 && iter == pixelSDOHandle->end()) {
580 InDetDD::SiReadoutCellId SiRC(
m_pixelId->phi_index(rdoId),
m_pixelId->eta_index(rdoId));
581 for (
int ii = 0; ii <
nCells &&
iter == pixelSDOHandle->end(); ++ii) {
583 }
584 }
585
586 if (iter != pixelSDOHandle->end()) { bestTruthLink =
getTruthInformation(iter, parentMask); }
587 }
588 }
590
591 Identifier theID = cluster->identify();
592
593 FPGATrackSimCluster clusterOut;
594
595 FPGATrackSimHit clusterEquiv;
596
597 const InDetDD::SiDetectorElement* sielement =
m_PIX_mgr->getDetectorElement(theID);
598 assert(sielement);
602 clusterEquiv.
setX(globalPos.x());
603 clusterEquiv.
setY(globalPos.y());
604 clusterEquiv.
setZ(globalPos.z());
608
609 int barrel_ec =
m_pixelId->barrel_ec(theID);
610 if (barrel_ec == 0)
612 else if (barrel_ec == 2)
614 else if (barrel_ec == -2)
616
624
625 clusterEquiv.
setPhiWidth(cluster->width().colRow()[1]);
626 clusterEquiv.
setEtaWidth(cluster->width().colRow()[0]);
627
628 if (bestParent) {
632 }
633 else {
634 clusterEquiv.
setEventIndex(std::numeric_limits<long>::max());
635 clusterEquiv.
setBarcode(std::numeric_limits<HepMcParticleLink::barcode_type>::max());
636 clusterEquiv.
setUniqueID(std::numeric_limits<HepMcParticleLink::barcode_type>::max());
637 }
638
639 clusterEquiv.
setBarcodePt(
static_cast<unsigned long>(std::ceil(bestParent ? bestParent->momentum().perp() : 0.)));
643 }
644 }
645
646
647
648
652
653 for (const InDetRawDataCollection<SCT_RDORawData>* SCT_Collection : *stripRDOHandle) {
654 if (SCT_Collection == nullptr) { continue; }
655 for (const SCT_RDORawData* sctRawData : *SCT_Collection) {
656 const Identifier rdoId = sctRawData->identify();
657
658 const InDetDD::SiDetectorElement* sielement =
m_SCT_mgr->getDetectorElement(rdoId);
659 const InDetDD::SiDetectorDesign& design =
dynamic_cast<const InDetDD::SiDetectorDesign&
>(sielement->
design());
662
663
665 const HepMcParticleLink* bestTruthLink{};
667 InDetSimDataCollection::const_iterator
iter(stripSDOHandle->find(rdoId));
668
669 if (iter != stripSDOHandle->end()) { bestTruthLink =
getTruthInformation(iter, parentMask); }
670 }
672
673
674 FPGATrackSimCluster clusterOut;
675 FPGATrackSimHit clusterEquiv;
677 clusterEquiv.
setX(gPos.x());
678 clusterEquiv.
setY(gPos.y());
679 clusterEquiv.
setZ(gPos.z());
683
684 int barrel_ec =
m_sctId->barrel_ec(rdoId);
685 if (barrel_ec == 0)
687 else if (barrel_ec == 2)
689 else if (barrel_ec == -2)
691
700
701 clusterEquiv.
setPhiWidth(sctRawData->getGroupSize());
702
703 if (bestParent) {
707 }
708 else {
709 clusterEquiv.
setEventIndex(std::numeric_limits<long>::max());
710 clusterEquiv.
setBarcode(std::numeric_limits<HepMcParticleLink::barcode_type>::max());
711 clusterEquiv.
setUniqueID(std::numeric_limits<HepMcParticleLink::barcode_type>::max());
712 }
713
714 clusterEquiv.
setBarcodePt(
static_cast<unsigned long>(std::ceil(bestParent ? bestParent->momentum().perp() : 0.)));
718 }
719 }
720
721
722 return StatusCode::SUCCESS;
723}
void setClusterEquiv(const FPGATrackSimHit &input)
void setPhiModule(unsigned v)
void setIdentifierHash(unsigned v)
void setEtaIndex(unsigned v)
void setEventIndex(long v)
void setPhiIndex(unsigned v)
void setHitType(HitType type)
void setPhiCoord(float v)
void setIdentifier(unsigned int v)
void setBarcode(const HepMcParticleLink::barcode_type &v)
void setParentageMask(unsigned long v)
void setBarcodePt(float v)
void setLayerDisk(unsigned v)
void setEtaCoord(float v)
void setEtaWidth(unsigned v)
void setPhiWidth(unsigned v)
void setUniqueID(const HepMcParticleLink::barcode_type &v)
void setDetectorZone(DetectorZone detZone)
void setDetType(SiliconTech detType)
int id() const
Return the id of the target particle.
index_type eventIndex() const
Return the event number of the referenced GenEvent.
value_type get_compact() const
Get the compact id.
Identifier32 get_identifier32() const
Get the 32-bit version Identifier, will be invalid if >32 bits needed.
virtual SiLocalPosition localPositionOfCell(const SiCellId &cellId) const =0
readout or diode id -> position.
double xPhi() const
position along phi direction:
double xEta() const
position along eta direction:
virtual IdentifierHash identifyHash() const override final
identifier hash (inline)
HepGeom::Point3D< double > globalPosition(const HepGeom::Point3D< double > &localPos) const
transform a reconstruction local position into a global position (inline):
virtual Identifier identify() const override final
identifier of this detector element (inline)
Amg::Vector2D rawLocalPositionOfCell(const SiCellId &cellId) const
Returns position (center) of cell.
Eigen::Matrix< double, 3, 1 > Vector3D
const GenParticle * ConstGenParticlePtr