561{
562
563
564
565
568 for (const InDet::SiClusterCollection* pixelClusterCollection : *pixelClusterContainerHandler) {
569 if (pixelClusterCollection == nullptr) {
571 continue;
572 }
573 const int size = pixelClusterCollection->size();
574 ATH_MSG_DEBUG(
"PixelClusterCollection found with " << size <<
" clusters");
575 for (const InDet::SiCluster* cluster : *pixelClusterCollection) {
576
577
579 const HepMcParticleLink* bestTruthLink{};
581 for (const Identifier& rdoId : cluster->rdoList()) {
582 const InDetDD::SiDetectorElement* sielement =
m_PIX_mgr->getDetectorElement(rdoId);
583 assert(sielement);
586 InDetSimDataCollection::const_iterator
iter(pixelSDOHandle->find(rdoId));
587
588 if (nCells > 1 && iter == pixelSDOHandle->end()) {
589 InDetDD::SiReadoutCellId SiRC(
m_pixelId->phi_index(rdoId),
m_pixelId->eta_index(rdoId));
590 for (
int ii = 0; ii <
nCells &&
iter == pixelSDOHandle->end(); ++ii) {
592 }
593 }
594
595 if (iter != pixelSDOHandle->end()) { bestTruthLink =
getTruthInformation(iter, parentMask); }
596 }
597 }
599
600 Identifier theID = cluster->identify();
601
602 FPGATrackSimCluster clusterOut;
603
604 FPGATrackSimHit clusterEquiv;
605
606 const InDetDD::SiDetectorElement* sielement =
m_PIX_mgr->getDetectorElement(theID);
607 assert(sielement);
611 clusterEquiv.
setX(globalPos.x());
612 clusterEquiv.
setY(globalPos.y());
613 clusterEquiv.
setZ(globalPos.z());
617
618 int barrel_ec =
m_pixelId->barrel_ec(theID);
619 if (barrel_ec == 0)
621 else if (barrel_ec == 2)
623 else if (barrel_ec == -2)
625
633
634 clusterEquiv.
setPhiWidth(cluster->width().colRow()[1]);
635 clusterEquiv.
setEtaWidth(cluster->width().colRow()[0]);
636
637 if (bestParent) {
641 }
642 else {
643 clusterEquiv.
setEventIndex(std::numeric_limits<long>::max());
644 clusterEquiv.
setBarcode(std::numeric_limits<HepMcParticleLink::barcode_type>::max());
645 clusterEquiv.
setUniqueID(std::numeric_limits<HepMcParticleLink::barcode_type>::max());
646 }
647
648 clusterEquiv.
setBarcodePt(
static_cast<unsigned long>(std::ceil(bestParent ? bestParent->momentum().perp() : 0.)));
652 }
653 }
654
655
656
657
661
662 for (const InDetRawDataCollection<SCT_RDORawData>* SCT_Collection : *stripRDOHandle) {
663 if (SCT_Collection == nullptr) { continue; }
664 for (const SCT_RDORawData* sctRawData : *SCT_Collection) {
665 const Identifier rdoId = sctRawData->identify();
666
667 const InDetDD::SiDetectorElement* sielement =
m_SCT_mgr->getDetectorElement(rdoId);
668 const InDetDD::SiDetectorDesign& design =
dynamic_cast<const InDetDD::SiDetectorDesign&
>(sielement->
design());
671
672
674 const HepMcParticleLink* bestTruthLink{};
676 InDetSimDataCollection::const_iterator
iter(stripSDOHandle->find(rdoId));
677
678 if (iter != stripSDOHandle->end()) { bestTruthLink =
getTruthInformation(iter, parentMask); }
679 }
681
682
683 FPGATrackSimCluster clusterOut;
684 FPGATrackSimHit clusterEquiv;
686 clusterEquiv.
setX(gPos.x());
687 clusterEquiv.
setY(gPos.y());
688 clusterEquiv.
setZ(gPos.z());
692
693 int barrel_ec =
m_sctId->barrel_ec(rdoId);
694 if (barrel_ec == 0)
696 else if (barrel_ec == 2)
698 else if (barrel_ec == -2)
700
709
710 clusterEquiv.
setPhiWidth(sctRawData->getGroupSize());
711
712 if (bestParent) {
716 }
717 else {
718 clusterEquiv.
setEventIndex(std::numeric_limits<long>::max());
719 clusterEquiv.
setBarcode(std::numeric_limits<HepMcParticleLink::barcode_type>::max());
720 clusterEquiv.
setUniqueID(std::numeric_limits<HepMcParticleLink::barcode_type>::max());
721 }
722
723 clusterEquiv.
setBarcodePt(
static_cast<unsigned long>(std::ceil(bestParent ? bestParent->momentum().perp() : 0.)));
727 }
728 }
729
730
731 return StatusCode::SUCCESS;
732}
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