563{
564
565
566
567
570 for (const InDet::SiClusterCollection* pixelClusterCollection : *pixelClusterContainerHandler) {
571 if (pixelClusterCollection == nullptr) {
573 continue;
574 }
575 const int size = pixelClusterCollection->size();
576 ATH_MSG_DEBUG(
"PixelClusterCollection found with " << size <<
" clusters");
577 for (const InDet::SiCluster* cluster : *pixelClusterCollection) {
578
579
581 const HepMcParticleLink* bestTruthLink{};
583 for (const Identifier& rdoId : cluster->rdoList()) {
584 const InDetDD::SiDetectorElement* sielement =
m_PIX_mgr->getDetectorElement(rdoId);
585 assert(sielement);
588 InDetSimDataCollection::const_iterator
iter(pixelSDOHandle->find(rdoId));
589
590 if (nCells > 1 && iter == pixelSDOHandle->end()) {
591 InDetDD::SiReadoutCellId SiRC(
m_pixelId->phi_index(rdoId),
m_pixelId->eta_index(rdoId));
592 for (
int ii = 0; ii <
nCells &&
iter == pixelSDOHandle->end(); ++ii) {
594 }
595 }
596
597 if (iter != pixelSDOHandle->end()) { bestTruthLink =
getTruthInformation(iter, parentMask); }
598 }
599 }
601
602 Identifier theID = cluster->identify();
603
604 FPGATrackSimCluster clusterOut;
605
606 FPGATrackSimHit clusterEquiv;
607
608 const InDetDD::SiDetectorElement* sielement =
m_PIX_mgr->getDetectorElement(theID);
609 assert(sielement);
613 clusterEquiv.
setX(globalPos.x());
614 clusterEquiv.
setY(globalPos.y());
615 clusterEquiv.
setZ(globalPos.z());
619
620 int barrel_ec =
m_pixelId->barrel_ec(theID);
621 if (barrel_ec == 0)
623 else if (barrel_ec == 2)
625 else if (barrel_ec == -2)
627
635
636 clusterEquiv.
setPhiWidth(cluster->width().colRow()[1]);
637 clusterEquiv.
setEtaWidth(cluster->width().colRow()[0]);
638
639 if (bestParent) {
643 }
644 else {
645 clusterEquiv.
setEventIndex(std::numeric_limits<long>::max());
646 clusterEquiv.
setBarcode(std::numeric_limits<HepMcParticleLink::barcode_type>::max());
647 clusterEquiv.
setUniqueID(std::numeric_limits<HepMcParticleLink::barcode_type>::max());
648 }
649
650 clusterEquiv.
setBarcodePt(
static_cast<unsigned long>(std::ceil(bestParent ? bestParent->momentum().perp() : 0.)));
654 }
655 }
656
657
658
659
663
664 for (const InDetRawDataCollection<SCT_RDORawData>* SCT_Collection : *stripRDOHandle) {
665 if (SCT_Collection == nullptr) { continue; }
666 for (const SCT_RDORawData* sctRawData : *SCT_Collection) {
667 const Identifier rdoId = sctRawData->identify();
668
669 const InDetDD::SiDetectorElement* sielement =
m_SCT_mgr->getDetectorElement(rdoId);
670 const InDetDD::SiDetectorDesign& design =
dynamic_cast<const InDetDD::SiDetectorDesign&
>(sielement->
design());
673
674
676 const HepMcParticleLink* bestTruthLink{};
678 InDetSimDataCollection::const_iterator
iter(stripSDOHandle->find(rdoId));
679
680 if (iter != stripSDOHandle->end()) { bestTruthLink =
getTruthInformation(iter, parentMask); }
681 }
683
684
685 FPGATrackSimCluster clusterOut;
686 FPGATrackSimHit clusterEquiv;
688 clusterEquiv.
setX(gPos.x());
689 clusterEquiv.
setY(gPos.y());
690 clusterEquiv.
setZ(gPos.z());
694
695 int barrel_ec =
m_sctId->barrel_ec(rdoId);
696 if (barrel_ec == 0)
698 else if (barrel_ec == 2)
700 else if (barrel_ec == -2)
702
711
712 clusterEquiv.
setPhiWidth(sctRawData->getGroupSize());
713
714 if (bestParent) {
718 }
719 else {
720 clusterEquiv.
setEventIndex(std::numeric_limits<long>::max());
721 clusterEquiv.
setBarcode(std::numeric_limits<HepMcParticleLink::barcode_type>::max());
722 clusterEquiv.
setUniqueID(std::numeric_limits<HepMcParticleLink::barcode_type>::max());
723 }
724
725 clusterEquiv.
setBarcodePt(
static_cast<unsigned long>(std::ceil(bestParent ? bestParent->momentum().perp() : 0.)));
729 }
730 }
731
732
733 return StatusCode::SUCCESS;
734}
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