ATLAS Offline Software
Public Member Functions | Private Types | Private Member Functions | Private Attributes | List of all members
FPGATrackSimSGToRawHitsTool Class Reference

Extract the raw hists from info in SG. More...

#include <FPGATrackSimSGToRawHitsTool.h>

Inheritance diagram for FPGATrackSimSGToRawHitsTool:
Collaboration diagram for FPGATrackSimSGToRawHitsTool:

Public Member Functions

 FPGATrackSimSGToRawHitsTool (const std::string &, const std::string &, const IInterface *)
 
virtual ~FPGATrackSimSGToRawHitsTool ()
 
virtual StatusCode initialize () override
 
virtual StatusCode finalize () override
 
virtual StatusCode readData (FPGATrackSimEventInputHeader *header, const EventContext &eventContext) override
 This function get from the SG the inner detector raw hits and prepares them for FPGATrackSim simulation. More...
 

Private Types

typedef std::map< Identifier, int > HitIndexMap
 

Private Member Functions

StatusCode readRawSilicon (HitIndexMap &hitIndexMap, const EventContext &eventContext)
 
StatusCode readTruthTracks (std::vector< FPGATrackSimTruthTrack > &truth, const EventContext &eventContext)
 
StatusCode readOfflineTracks (std::vector< FPGATrackSimOfflineTrack > &Track, const EventContext &eventContext)
 
StatusCode readOfflineClusters (std::vector< FPGATrackSimCluster > &Clusters, const EventContext &eventContext)
 
StatusCode readPixelSimulation (HitIndexMap &hitIndexMap, unsigned int &hitIndex, const EventContext &eventContext)
 
StatusCode readStripSimulation (HitIndexMap &hitIndexMap, unsigned int &hitIndex, const EventContext &eventContext)
 
StatusCode dumpPixelClusters (HitIndexMap &pixelClusterIndexMap, const EventContext &eventContext)
 
const HepMcParticleLinkgetTruthInformation (InDetSimDataCollection::const_iterator &iter, FPGATrackSimInputUtils::ParentBitmask &parentMask)
 

Private Attributes

ToolHandle< Trk::ITruthToTrackm_truthToTrack {this, "TruthToTrackTool", "Trk::TruthToTrack/InDetTruthToTrack" }
 tool to create track parameters from a gen particle More...
 
ToolHandle< Trk::IExtrapolatorm_extrapolator {this, "Extrapolator", "Trk::Extrapolator/AtlasExtrapolator"}
 ToolHandle for Extrapolator. More...
 
SG::ReadCondHandleKey< InDet::BeamSpotDatam_beamSpotKey { this, "BeamSpotKey", "BeamSpotData", "SG key for beam spot" }
 
SG::ReadHandleKey< xAOD::EventInfom_eventInfoKey { this, "EventInfo", "EventInfo" }
 
SG::ReadHandleKey< InDet::SiClusterContainerm_pixelClusterContainerKey { this, "pixelClustersName", "ITkPixelClusters" }
 
SG::ReadHandleKey< InDet::SiClusterContainerm_sctClusterContainerKey { this, "SCT_ClustersName", "SCT_Clusters" }
 
SG::ReadHandleKey< xAOD::TrackParticleContainerm_offlineTracksKey { this, "OfflineTracks", "InDetTrackParticles"}
 
SG::ReadHandleKey< McEventCollectionm_mcCollectionKey { this, "McTruth", "TruthEvent" }
 
SG::ReadHandleKey< InDetSimDataCollectionm_pixelSDOKey { this, "PixelSDO", "ITkPixelSDO_Map" }
 
SG::ReadHandleKey< InDetSimDataCollectionm_stripSDOKey { this, "StripSDO", "ITkStripSDO_Map" }
 
SG::ReadHandleKey< PixelRDO_Containerm_pixelRDOKey { this, "PixelRDO", "ITkPixelRDOs" }
 
SG::ReadHandleKey< SCT_RDO_Containerm_stripRDOKey { this, "StripRDO", "ITkStripRDOs" }
 
Gaudi::Property< std::string > m_tracksTruthName { this, "OfflineName", "InDetTrackParticles", "name of offline tracks collection" }
 
Gaudi::Property< bool > m_dumpHitsOnTracks { this, "dumpHitsOnTracks", false }
 
Gaudi::Property< bool > m_dumpTruthIntersections { this, "dumpTruthIntersections", false }
 
Gaudi::Property< bool > m_readOfflineClusters { this, "ReadOfflineClusters", true, "flag to enable the offline cluster save" }
 
Gaudi::Property< bool > m_readTruthTracks { this, "ReadTruthTracks", true, "flag to enable the truth tracking save" }
 
Gaudi::Property< bool > m_readOfflineTracks { this, "ReadOfflineTracks", true, "flag to enable the offline tracking save" }
 
Gaudi::Property< bool > m_UseNominalOrigin { this, "UseNominalOrigin", false, "if true truth values are always with respect to (0,0,0)" }
 
Gaudi::Property< double > m_maxEta { this, "maxEta", 3.3 }
 
Gaudi::Property< double > m_minPt { this, "minPt", .8*CLHEP::GeV }
 
const PixelIDm_pixelId = nullptr
 
const SCT_IDm_sctId = nullptr
 
const InDetDD::SiDetectorManagerm_PIX_mgr = nullptr
 
const InDetDD::SiDetectorManagerm_SCT_mgr = nullptr
 
const HepPDT::ParticleDataTable * m_particleDataTable = nullptr
 
FPGATrackSimEventInputHeaderm_eventHeader = nullptr
 

Detailed Description

Extract the raw hists from info in SG.

Definition at line 45 of file FPGATrackSimSGToRawHitsTool.h.

Member Typedef Documentation

◆ HitIndexMap

typedef std::map<Identifier, int> FPGATrackSimSGToRawHitsTool::HitIndexMap
private

Definition at line 94 of file FPGATrackSimSGToRawHitsTool.h.

Constructor & Destructor Documentation

◆ FPGATrackSimSGToRawHitsTool()

FPGATrackSimSGToRawHitsTool::FPGATrackSimSGToRawHitsTool ( const std::string &  algname,
const std::string &  name,
const IInterface *  ifc 
)

Definition at line 49 of file FPGATrackSimSGToRawHitsTool.cxx.

49  :
50  base_class(algname, name, ifc)
51 {}

◆ ~FPGATrackSimSGToRawHitsTool()

virtual FPGATrackSimSGToRawHitsTool::~FPGATrackSimSGToRawHitsTool ( )
inlinevirtual

Definition at line 49 of file FPGATrackSimSGToRawHitsTool.h.

49 { ; }

Member Function Documentation

◆ dumpPixelClusters()

StatusCode FPGATrackSimSGToRawHitsTool::dumpPixelClusters ( HitIndexMap pixelClusterIndexMap,
const EventContext &  eventContext 
)
private

Definition at line 491 of file FPGATrackSimSGToRawHitsTool.cxx.

491  {
492  unsigned int pixelClusterIndex = 0;
493  auto pixelSDOHandle = SG::makeHandle(m_pixelSDOKey, eventContext);
494  auto pixelClusterContainerHandle = SG::makeHandle(m_pixelClusterContainerKey, eventContext);
495  // Dump pixel clusters. They're in m_pixelContainer
496  for (const InDet::SiClusterCollection* pixelClusterCollection : *pixelClusterContainerHandle) {
497  if (pixelClusterCollection == nullptr) {
498  ATH_MSG_DEBUG("pixelClusterCollection not available!");
499  continue;
500  }
501 
502  for (const InDet::SiCluster* cluster : *pixelClusterCollection) {
503  Identifier theId = cluster->identify();
504  // if there is simulation truth available, try to retrieve the "most likely" barcode for this pixel cluster.
505  FPGATrackSimInputUtils::ParentBitmask parentMask; // FIXME set, but not used
506  if (!m_pixelSDOKey.empty()) {
507  for (const Identifier& rdoId : cluster->rdoList()) {
508  const InDetDD::SiDetectorElement* sielement = m_PIX_mgr->getDetectorElement(rdoId);
509  assert(sielement);
510  InDetDD::SiCellId cellID = sielement->cellIdFromIdentifier(rdoId);
511 
512  const int nCells = sielement->numberOfConnectedCells(cellID);
513  InDetSimDataCollection::const_iterator iter(pixelSDOHandle->find(rdoId));
514  // this might be the ganged pixel copy.
515  if (nCells > 1 && iter == pixelSDOHandle->end()) {
517  for (int ii = 0; ii < nCells && iter == pixelSDOHandle->end(); ++ii) {
518  iter = pixelSDOHandle->find(sielement->identifierFromCellId(sielement->design().connectedCell(SiRC, ii)));
519  }
520  } // end search for correct ganged pixel
521  // if SDO found for this pixel, associate the particle. otherwise leave unassociated.
522  if (iter != pixelSDOHandle->end()) { (void) getTruthInformation(iter, parentMask); } // FIXME not used??
523  } // if we have pixel sdo's available
524  }
525  pixelClusterIndexMap[theId] = pixelClusterIndex;
526  pixelClusterIndex++;
527  } // End loop over pixel clusters
528  } // End loop over pixel cluster collection
529 
530  return StatusCode::SUCCESS;
531 }

◆ finalize()

StatusCode FPGATrackSimSGToRawHitsTool::finalize ( )
overridevirtual

Definition at line 87 of file FPGATrackSimSGToRawHitsTool.cxx.

87  {
88  return StatusCode::SUCCESS;
89 }

◆ getTruthInformation()

const HepMcParticleLink * FPGATrackSimSGToRawHitsTool::getTruthInformation ( InDetSimDataCollection::const_iterator &  iter,
FPGATrackSimInputUtils::ParentBitmask parentMask 
)
private

Definition at line 819 of file FPGATrackSimSGToRawHitsTool.cxx.

820  {
821  const HepMcParticleLink* bestTruthLink{};
822  const InDetSimData& sdo(iter->second);
823  const std::vector<InDetSimData::Deposit>& deposits(sdo.getdeposits());
824  float bestPt{-999.f};
825  for (const InDetSimData::Deposit& dep : deposits) {
826 
827  const HepMcParticleLink& particleLink = dep.first;
828  // RDO's without SDO's are delta rays or detector noise.
829  if (!particleLink.isValid()) { continue; }
830  const float genEta = particleLink->momentum().pseudoRapidity();
831  const float genPt = particleLink->momentum().perp(); // MeV
832  // reject unstable particles
833  if (!MC::isStable(particleLink.cptr())) { continue; }
834  // reject secondaries and low pT (<400 MeV) pileup
835  if (HepMC::is_simulation_particle(particleLink.cptr()) || particleLink.barcode() == 0 /*HepMC::no_truth_link(particleLink)*/) { continue; } // FIXME
836  // reject far forward particles
837  if (std::fabs(genEta) > m_maxEta) { continue; }
838  // "bestTruthLink" links to the highest pt particle
839  if (bestPt < genPt) {
840  bestPt = genPt;
841  bestTruthLink = &particleLink;
842  }
843  #ifdef HEPMC3
844  parentMask |= FPGATrackSimInputUtils::construct_truth_bitmap(std::shared_ptr<const HepMC3::GenParticle>(particleLink.cptr()));
845  #else
846  parentMask |= FPGATrackSimInputUtils::construct_truth_bitmap(particleLink.cptr());
847  #endif
848  // check SDO
849  } // end for each contributing particle
850  return bestTruthLink;
851 }

◆ initialize()

StatusCode FPGATrackSimSGToRawHitsTool::initialize ( )
overridevirtual

Definition at line 53 of file FPGATrackSimSGToRawHitsTool.cxx.

53  {
54 
55  ATH_MSG_DEBUG("FPGATrackSimSGToRawHitsTool::initialize()");
56 
57  if(!m_truthToTrack.empty() ) ATH_CHECK(m_truthToTrack.retrieve());
58  if(!m_extrapolator.empty()) ATH_CHECK(m_extrapolator.retrieve());
60 
61  SmartIF<IPartPropSvc> partPropSvc{service("PartPropSvc")};
62  ATH_CHECK(partPropSvc.isValid());
63  m_particleDataTable = partPropSvc->PDT();
64 
65  ATH_CHECK(detStore()->retrieve(m_PIX_mgr, "ITkPixel"));
66  ATH_CHECK(detStore()->retrieve(m_pixelId, "PixelID"));
67  ATH_CHECK(detStore()->retrieve(m_SCT_mgr, "ITkStrip"));
68  ATH_CHECK(detStore()->retrieve(m_sctId, "SCT_ID"));
69 
73 
75 
79  ATH_CHECK(m_pixelRDOKey.initialize());
80  ATH_CHECK(m_stripRDOKey.initialize());
81 
82  ATH_MSG_DEBUG("Initialization complete");
83  return StatusCode::SUCCESS;
84 }

◆ readData()

StatusCode FPGATrackSimSGToRawHitsTool::readData ( FPGATrackSimEventInputHeader header,
const EventContext &  eventContext 
)
overridevirtual

This function get from the SG the inner detector raw hits and prepares them for FPGATrackSim simulation.

Definition at line 94 of file FPGATrackSimSGToRawHitsTool.cxx.

95 {
96  m_eventHeader = header; //take the external pointer
97  auto eventInfo = SG::makeHandle(m_eventInfoKey, eventContext);
98  //Filled to variable / start event
99  FPGATrackSimEventInfo event_info;
100  event_info.setRunNumber(eventInfo->runNumber());
101  event_info.setEventNumber(eventInfo->eventNumber());
102  event_info.setLB(eventInfo->lumiBlock());
103  event_info.setBCID(eventInfo->bcid());
104  event_info.setaverageInteractionsPerCrossing(eventInfo->averageInteractionsPerCrossing());
105  event_info.setactualInteractionsPerCrossing(eventInfo->actualInteractionsPerCrossing());
106  event_info.setextendedLevel1ID(eventInfo->extendedLevel1ID());
107  event_info.setlevel1TriggerType(eventInfo->level1TriggerType());
108  // event_info.setlevel1TriggerInfo(eventInfo->level1TriggerInfo ()); // unclear if needed, TODO come back to it
109  m_eventHeader->newEvent(event_info);//this also reset all variables
110  HitIndexMap hitIndexMap; // keep running index event-unique to each hit
111  HitIndexMap pixelClusterIndexMap;
112  // get pixel and sct cluster containers
113  // dump raw silicon data
114  ATH_MSG_DEBUG("Dump raw silicon data");
115  ATH_CHECK(readRawSilicon(hitIndexMap, eventContext));
117  if (m_readOfflineClusters) {
118  std::vector <FPGATrackSimCluster> clusters;
119  ATH_CHECK(readOfflineClusters(clusters, eventContext));
120  for (const auto& cluster : clusters) optional.addOfflineCluster(cluster);
121  ATH_MSG_DEBUG("Saved " << optional.nOfflineClusters() << " offline clusters");
122  ATH_CHECK(dumpPixelClusters(pixelClusterIndexMap, eventContext));
123  }
124  if (m_readTruthTracks) {
125  std::vector <FPGATrackSimTruthTrack> truth;
126  ATH_CHECK(readTruthTracks(truth, eventContext));
127  for (const FPGATrackSimTruthTrack& trk : truth) optional.addTruthTrack(trk);
128  ATH_MSG_DEBUG("Saved " << optional.nTruthTracks() << " truth tracks");
129  }
130  std::vector <FPGATrackSimOfflineTrack> offline;
131  if (m_readOfflineTracks) {
132  ATH_CHECK(readOfflineTracks(offline, eventContext));
133  for (const FPGATrackSimOfflineTrack& trk : offline) optional.addOfflineTrack(trk);
134  ATH_MSG_DEBUG("Saved " << optional.nOfflineTracks() << " offline tracks");
135  }
136  m_eventHeader->setOptional(optional);
138  ATH_MSG_DEBUG("End of execute()");
139  return StatusCode::SUCCESS;
140 }

◆ readOfflineClusters()

StatusCode FPGATrackSimSGToRawHitsTool::readOfflineClusters ( std::vector< FPGATrackSimCluster > &  Clusters,
const EventContext &  eventContext 
)
private

Definition at line 534 of file FPGATrackSimSGToRawHitsTool.cxx.

535 {
536 
537  //Lets do the Pixel clusters first
538  //Loopover the pixel clusters and convert them into a FPGATrackSimCluster for storage
539  // Dump pixel clusters. They're in m_pixelContainer
540  auto pixelSDOHandle = SG::makeHandle(m_pixelSDOKey, eventContext);
541  auto pixelClusterContainerHandler = SG::makeHandle(m_pixelClusterContainerKey, eventContext);
542  for (const InDet::SiClusterCollection* pixelClusterCollection : *pixelClusterContainerHandler) {
543  if (pixelClusterCollection == nullptr) {
544  ATH_MSG_DEBUG("pixelClusterCollection not available!");
545  continue;
546  }
547  const int size = pixelClusterCollection->size();
548  ATH_MSG_DEBUG("PixelClusterCollection found with " << size << " clusters");
549  for (const InDet::SiCluster* cluster : *pixelClusterCollection) {
550 
551  // if there is simulation truth available, try to retrieve the "most likely" barcode for this pixel cluster.
553  const HepMcParticleLink* bestTruthLink{};
554  if (!m_pixelSDOKey.empty()) {
555  for (const Identifier& rdoId : cluster->rdoList()) {
556  const InDetDD::SiDetectorElement* sielement = m_PIX_mgr->getDetectorElement(rdoId);
557  assert(sielement);
558  InDetDD::SiCellId cellID = sielement->cellIdFromIdentifier(rdoId);
559  const int nCells = sielement->numberOfConnectedCells(cellID);
560  InDetSimDataCollection::const_iterator iter(pixelSDOHandle->find(rdoId));
561  // this might be the ganged pixel copy.
562  if (nCells > 1 && iter == pixelSDOHandle->end()) {
564  for (int ii = 0; ii < nCells && iter == pixelSDOHandle->end(); ++ii) {
565  iter = pixelSDOHandle->find(sielement->identifierFromCellId(sielement->design().connectedCell(SiRC, ii)));
566  }
567  } // end search for correct ganged pixel
568  // if SDO found for this pixel, associate the particle. otherwise leave unassociated.
569  if (iter != pixelSDOHandle->end()) { bestTruthLink = getTruthInformation(iter, parentMask); }
570  } // if we have pixel sdo's available
571  }
572  HepMC::ConstGenParticlePtr bestParent = (bestTruthLink) ? bestTruthLink->cptr() : nullptr;
573 
574  Identifier theID = cluster->identify();
575  //cluster object to be written out
576  FPGATrackSimCluster clusterOut;
577  //Rawhit object to represent the cluster
578  FPGATrackSimHit clusterEquiv;
579  //Lets get the information of this pixel cluster
580  const InDetDD::SiDetectorElement* sielement = m_PIX_mgr->getDetectorElement(theID);
581  assert(sielement);
582  const InDetDD::SiLocalPosition localPos = sielement->rawLocalPositionOfCell(theID);
583  const Amg::Vector3D globalPos(sielement->globalPosition(localPos));
584  clusterEquiv.setHitType(HitType::clustered);
585  clusterEquiv.setX(globalPos.x());
586  clusterEquiv.setY(globalPos.y());
587  clusterEquiv.setZ(globalPos.z());
588  clusterEquiv.setDetType(SiliconTech::pixel);
589  clusterEquiv.setIdentifierHash(sielement->identifyHash());
590  clusterEquiv.setIdentifier(sielement->identify().get_identifier32().get_compact());
591 
592  int barrel_ec = m_pixelId->barrel_ec(theID);
593  if (barrel_ec == 0)
595  else if (barrel_ec == 2)
597  else if (barrel_ec == -2)
599 
600  clusterEquiv.setLayerDisk(m_pixelId->layer_disk(theID));
601  clusterEquiv.setPhiModule(m_pixelId->phi_module(theID));
602  clusterEquiv.setEtaModule(m_pixelId->eta_module(theID));
603  clusterEquiv.setPhiIndex(m_pixelId->phi_index(theID));
604  clusterEquiv.setEtaIndex(m_pixelId->eta_index(theID));
605 
606  clusterEquiv.setPhiWidth(cluster->width().colRow()[1]);
607  clusterEquiv.setEtaWidth(cluster->width().colRow()[0]);
608  //Save the truth here as the MultiTruth object is only transient
609  if (bestParent) {
610  clusterEquiv.setEventIndex(bestTruthLink->eventIndex());
611  clusterEquiv.setBarcode(bestTruthLink->barcode()); // FIXME barcode-based
612  clusterEquiv.setUniqueID(bestTruthLink->id());
613  }
614  else {
618  }
619 
620  clusterEquiv.setBarcodePt(static_cast<unsigned long>(std::ceil(bestParent ? bestParent->momentum().perp() : 0.)));
621  clusterEquiv.setParentageMask(parentMask.to_ulong());
622  clusterOut.setClusterEquiv(clusterEquiv);
623  clusters.push_back(clusterOut);
624  }
625  }
626 
627  //Now lets do the strip clusters
628  //Loopover the pixel clusters and convert them into a FPGATrackSimCluster for storage
629  // Dump pixel clusters. They're in m_pixelContainer
630  auto stripSDOHandle = SG::makeHandle(m_stripSDOKey, eventContext);
631  ATH_MSG_DEBUG("Found SCT SDO Map");
632  auto stripRDOHandle = SG::makeHandle(m_stripRDOKey, eventContext);
633 
634  for (const InDetRawDataCollection<SCT_RDORawData>* SCT_Collection : *stripRDOHandle) {
635  if (SCT_Collection == nullptr) { continue; }
636  for (const SCT_RDORawData* sctRawData : *SCT_Collection) {
637  const Identifier rdoId = sctRawData->identify();
638  // get the det element from the det element collection
639  const InDetDD::SiDetectorElement* sielement = m_SCT_mgr->getDetectorElement(rdoId);
640  const InDetDD::SiDetectorDesign& design = dynamic_cast<const InDetDD::SiDetectorDesign&>(sielement->design());
641  const InDetDD::SiLocalPosition localPos = design.localPositionOfCell(m_sctId->strip(rdoId));
642  const Amg::Vector3D gPos = sielement->globalPosition(localPos);
643  // if there is simulation truth available, try to retrieve the
644  // "most likely" barcode for this strip.
646  const HepMcParticleLink* bestTruthLink{};
647  if (!m_stripSDOKey.empty()) {
648  InDetSimDataCollection::const_iterator iter(stripSDOHandle->find(rdoId));
649  // if SDO found for this pixel, associate the particle
650  if (iter != stripSDOHandle->end()) { bestTruthLink = getTruthInformation(iter, parentMask); }
651  } // end if sct truth available
652  HepMC::ConstGenParticlePtr bestParent = (bestTruthLink) ? bestTruthLink->cptr() : nullptr;
653 
654  // push back the hit information to DataInput for HitList , copy from RawInput.cxx
655  FPGATrackSimCluster clusterOut;
656  FPGATrackSimHit clusterEquiv;
657  clusterEquiv.setHitType(HitType::clustered);
658  clusterEquiv.setX(gPos.x());
659  clusterEquiv.setY(gPos.y());
660  clusterEquiv.setZ(gPos.z());
661  clusterEquiv.setDetType(SiliconTech::strip);
662  clusterEquiv.setIdentifierHash(sielement->identifyHash());
663  clusterEquiv.setIdentifier(sielement->identify().get_identifier32().get_compact());
664 
665  int barrel_ec = m_sctId->barrel_ec(rdoId);
666  if (barrel_ec == 0)
668  else if (barrel_ec == 2)
670  else if (barrel_ec == -2)
672 
673  clusterEquiv.setLayerDisk(m_sctId->layer_disk(rdoId));
674  clusterEquiv.setPhiModule(m_sctId->phi_module(rdoId));
675  clusterEquiv.setEtaModule(m_sctId->eta_module(rdoId));
676  clusterEquiv.setPhiIndex(m_sctId->strip(rdoId));
677  clusterEquiv.setEtaIndex(m_sctId->row(rdoId));
678  clusterEquiv.setSide(m_sctId->side(rdoId));
679  //I think this is the strip "cluster" width
680  clusterEquiv.setPhiWidth(sctRawData->getGroupSize());
681  //Save the truth here as the MultiTruth object is only transient
682  if (bestParent) {
683  clusterEquiv.setEventIndex(bestTruthLink->eventIndex());
684  clusterEquiv.setBarcode(bestTruthLink->barcode()); // FIXME barcode-based
685  }
686  else {
690  }
691 
692  clusterEquiv.setBarcodePt(static_cast<unsigned long>(std::ceil(bestParent ? bestParent->momentum().perp() : 0.)));
693  clusterEquiv.setParentageMask(parentMask.to_ulong());
694  clusterOut.setClusterEquiv(clusterEquiv);
695  clusters.push_back(clusterOut);
696  } // end for each RDO in the strip collection
697  } // end for each strip RDO collection
698  // dump all RDO's and SDO's for a given event, for debugging purposes
699 
700  return StatusCode::SUCCESS;
701 }

◆ readOfflineTracks()

StatusCode FPGATrackSimSGToRawHitsTool::readOfflineTracks ( std::vector< FPGATrackSimOfflineTrack > &  Track,
const EventContext &  eventContext 
)
private

Definition at line 143 of file FPGATrackSimSGToRawHitsTool.cxx.

144 {
145  auto offlineTracksHandle = SG::makeHandle(m_offlineTracksKey, eventContext);
146  ATH_MSG_DEBUG("read Offline tracks, size= " << offlineTracksHandle->size());
147 
148  int iTrk = -1;
149  for (const xAOD::TrackParticle* trackParticle : *offlineTracksHandle) {
150  iTrk++;
151  FPGATrackSimOfflineTrack tmpOfflineTrack;
152  tmpOfflineTrack.setQOverPt(trackParticle->pt() > 0 ? trackParticle->charge() / trackParticle->pt() : 0);
153  tmpOfflineTrack.setEta(trackParticle->eta());
154  tmpOfflineTrack.setPhi(trackParticle->phi());
155  tmpOfflineTrack.setD0(trackParticle->d0());
156  tmpOfflineTrack.setZ0(trackParticle->z0());
157 
158  const Trk::TrackStates* trackStates = trackParticle->track()->trackStateOnSurfaces();
159  if (trackStates == nullptr) {
160  ATH_MSG_ERROR("missing trackStatesOnSurface");
161  return StatusCode::FAILURE;
162  }
163  for (const Trk::TrackStateOnSurface* tsos : *trackStates) {
164  if (tsos == nullptr) continue;
165  if (tsos->type(Trk::TrackStateOnSurface::Measurement)) {
166  const Trk::MeasurementBase* measurement = tsos->measurementOnTrack();
167  if (tsos->trackParameters() != nullptr &&
168  tsos->trackParameters()->associatedSurface().associatedDetectorElement() != nullptr &&
169  tsos->trackParameters()->associatedSurface().associatedDetectorElement()->identify() != 0
170  ) {
171  const Trk::RIO_OnTrack* hit = dynamic_cast <const Trk::RIO_OnTrack*>(measurement);
172  const Identifier& hitId = hit->identify();
173  FPGATrackSimOfflineHit tmpOfflineHit;
174  if (m_pixelId->is_pixel(hitId)) {
175  tmpOfflineHit.setIsPixel(true);
176  tmpOfflineHit.setIsBarrel(m_pixelId->is_barrel(hitId));
177 
178  const InDetDD::SiDetectorElement* sielement = m_PIX_mgr->getDetectorElement(hitId);
179  tmpOfflineHit.setClusterID(sielement->identifyHash());
180  tmpOfflineHit.setTrackNumber(iTrk);
181  tmpOfflineHit.setLayer(m_pixelId->layer_disk(hitId));
182  tmpOfflineHit.setLocX((float)measurement->localParameters()[Trk::locX]);
183  tmpOfflineHit.setLocY((float)measurement->localParameters()[Trk::locY]);
184  }
185  else if (m_sctId->is_sct(hitId)) {
186  tmpOfflineHit.setIsPixel(false);
187  tmpOfflineHit.setIsBarrel(m_sctId->is_barrel(hitId));
188  const InDetDD::SiDetectorElement* sielement = m_SCT_mgr->getDetectorElement(hitId);
189  tmpOfflineHit.setClusterID(sielement->identifyHash());
190  tmpOfflineHit.setTrackNumber(iTrk);
191  tmpOfflineHit.setLayer(m_sctId->layer_disk(hitId));
192  tmpOfflineHit.setLocX(((float)measurement->localParameters()[Trk::locX]));
193  tmpOfflineHit.setLocY(-99999.9);
194  }
195  tmpOfflineTrack.addHit(tmpOfflineHit);
196  }
197  }
198  }
199  offline.push_back(tmpOfflineTrack);
200  }//end of loop over tracks
201 
202 
203  return StatusCode::SUCCESS;
204 }

◆ readPixelSimulation()

StatusCode FPGATrackSimSGToRawHitsTool::readPixelSimulation ( HitIndexMap hitIndexMap,
unsigned int &  hitIndex,
const EventContext &  eventContext 
)
private

Definition at line 223 of file FPGATrackSimSGToRawHitsTool.cxx.

223  {
224 
225  auto pixelSDOHandle = SG::makeHandle(m_pixelSDOKey, eventContext);
226  auto pixelRDOHandle = SG::makeHandle(m_pixelRDOKey, eventContext);
227 
228  ATH_MSG_DEBUG("Found Pixel SDO Map");
229 
230  for (const InDetRawDataCollection<PixelRDORawData>* pixel_rdoCollection : *pixelRDOHandle) {
231  if (pixel_rdoCollection == nullptr) { continue; }
232  // loop on all RDOs
233  for (const PixelRDORawData* pixelRawData : *pixel_rdoCollection) {
234  Identifier rdoId = pixelRawData->identify();
235  // get the det element from the det element collection
236  const InDetDD::SiDetectorElement* sielement = m_PIX_mgr->getDetectorElement(rdoId); assert(sielement);
237 
238  Amg::Vector2D LocalPos = sielement->rawLocalPositionOfCell(rdoId);
239  Amg::Vector3D globalPos = sielement->globalPosition(LocalPos);
240  InDetDD::SiCellId cellID = sielement->cellIdFromIdentifier(rdoId);
241 
242  // update map between pixel identifier and event-unique hit index.
243  // ganged pixels (nCells==2) get two entries.
244  hitIndexMap[rdoId] = hitIndex;
245  const int nCells = sielement->numberOfConnectedCells(cellID);
246  if (nCells == 2) {
247  const InDetDD::SiCellId tmpCell = sielement->connectedCell(cellID, 1);
248  const Identifier tmpId = sielement->identifierFromCellId(tmpCell);
249  hitIndexMap[tmpId] = hitIndex; // add second entry for ganged pixel ID
250  }
251  // if there is simulation truth available, try to retrieve the "most likely" barcode for this pixel.
253  const HepMcParticleLink* bestTruthLink{};
254  if (!m_pixelSDOKey.empty()) {
255  InDetSimDataCollection::const_iterator iter(pixelSDOHandle->find(rdoId));
256  if (nCells > 1 && iter == pixelSDOHandle->end()) {
258  for (int ii = 0; ii < nCells && iter == pixelSDOHandle->end(); ++ii) {
259  iter = pixelSDOHandle->find(sielement->identifierFromCellId(sielement->design().connectedCell(SiRC, ii)));
260  }
261  } // end search for correct ganged pixel
262  // if SDO found for this pixel, associate the particle. otherwise leave unassociated.
263  if (iter != pixelSDOHandle->end()) { bestTruthLink = getTruthInformation(iter, parentMask); }
264  } // end if pixel truth available
265  HepMC::ConstGenParticlePtr bestParent = (bestTruthLink) ? bestTruthLink->cptr() : nullptr;
266  ++hitIndex;
267 
268  // push back the hit information to DataInput for HitList
269  FPGATrackSimHit tmpSGhit;
270  tmpSGhit.setHitType(HitType::unmapped);
271  tmpSGhit.setDetType(SiliconTech::pixel);
272  tmpSGhit.setIdentifierHash(sielement->identifyHash());
273  tmpSGhit.setIdentifier(sielement->identify().get_identifier32().get_compact());
274 
275  int barrel_ec = m_pixelId->barrel_ec(rdoId);
276  if (barrel_ec == 0)
278  else if (barrel_ec == 2)
280  else if (barrel_ec == -2)
282 
283  tmpSGhit.setLayerDisk(m_pixelId->layer_disk(rdoId));
284  tmpSGhit.setPhiModule(m_pixelId->phi_module(rdoId));
285  tmpSGhit.setEtaModule(m_pixelId->eta_module(rdoId));
286  tmpSGhit.setPhiIndex(m_pixelId->phi_index(rdoId));
287  tmpSGhit.setEtaIndex(m_pixelId->eta_index(rdoId));
288  tmpSGhit.setEtaWidth(0);
289  tmpSGhit.setPhiWidth(0);
290  tmpSGhit.setX(globalPos[Amg::x]);
291  tmpSGhit.setY(globalPos[Amg::y]);
292  tmpSGhit.setZ(globalPos[Amg::z]);
293  tmpSGhit.setToT(pixelRawData->getToT());
294  tmpSGhit.setisValidForITkHit(true); // Pixel clusters are close enough right now that they all can be considered valid for ITK
295  if (bestParent) {
296  tmpSGhit.setEventIndex(bestTruthLink->eventIndex());
297  tmpSGhit.setBarcode(bestTruthLink->barcode()); // FIXME barcode-based
298  tmpSGhit.setUniqueID(bestTruthLink->id()); // May need fixing when uid will be used.
299  }
300  else {
304  }
305 
306  tmpSGhit.setBarcodePt(static_cast<unsigned long>(std::ceil(bestParent ? bestParent->momentum().perp() : 0.)));
307  tmpSGhit.setParentageMask(parentMask.to_ulong());
308 
309  // Add truth
311  FPGATrackSimMultiTruth::Barcode uniqueID(tmpSGhit.getEventIndex(), tmpSGhit.getBarcode()); // FIXME barcode-based
312  mt.maximize(uniqueID, tmpSGhit.getBarcodePt()); // FIXME barcode-based
313  tmpSGhit.setTruth(mt);
314 
315  m_eventHeader->addHit(tmpSGhit);
316  } // end for each RDO in the collection
317  } // for each pixel RDO collection
318 
319  return StatusCode::SUCCESS;
320 }

◆ readRawSilicon()

StatusCode FPGATrackSimSGToRawHitsTool::readRawSilicon ( HitIndexMap hitIndexMap,
const EventContext &  eventContext 
)
private

Definition at line 210 of file FPGATrackSimSGToRawHitsTool.cxx.

211 {
212  ATH_MSG_DEBUG("read silicon hits");
213  unsigned int hitIndex = 0u;
214 
215  ATH_CHECK(readPixelSimulation(hitIndexMap, hitIndex, eventContext));
216  ATH_CHECK(readStripSimulation(hitIndexMap, hitIndex, eventContext));
217 
218  return StatusCode::SUCCESS;
219 }

◆ readStripSimulation()

StatusCode FPGATrackSimSGToRawHitsTool::readStripSimulation ( HitIndexMap hitIndexMap,
unsigned int &  hitIndex,
const EventContext &  eventContext 
)
private

Definition at line 323 of file FPGATrackSimSGToRawHitsTool.cxx.

323  {
324 
325  constexpr int MaxChannelinStripRow = 128;
326 
327  auto stripSDOHandle = SG::makeHandle(m_stripSDOKey, eventContext);
328  ATH_MSG_DEBUG("Found SCT SDO Map");
329  auto stripRDOHandle = SG::makeHandle(m_stripRDOKey, eventContext);
330  for (const InDetRawDataCollection<SCT_RDORawData>* SCT_Collection : *stripRDOHandle) {
331  if (SCT_Collection == nullptr) { continue; }
332 
333  std::map<int, bool> firedStrips;
334  // Preprocess the SCT collection hits to get information for encoding strip in ITK format
335  // All strips fired read into a map to an overview of full module that should be used to encode
336  // the data into the ITk formatl
337  for (const SCT_RDORawData* sctRawData : *SCT_Collection)
338  {
339  const Identifier rdoId = sctRawData->identify();
340  const int baseLineStrip{m_sctId->strip(rdoId)};
341  for(int i = 0; i < sctRawData->getGroupSize(); i++) {
342  firedStrips[baseLineStrip+ i] = true;
343  }
344  }
345 
346  // Loop over the fired hits and encode them in the ITk strips hit map
347  // It find unique hits in the list that can be encoded and don't overlap
348  std::map<int, int> stripEncodingForITK;
349  for(auto& [stripID, fired]: firedStrips)
350  {
351  // Don't use the strip that has been set false.
352  // This will be the case where neighbouring strip will "used up in the cluster"
353  // And then we don't want to re use them
354  if(!fired) continue;
355 
356  // Check the next 3 hits if they are there and have a hit in them
357  std::bitset<3> hitMap;
358 
359 
360  // Get the current chip id of the strip
361  int currChipID = stripID / MaxChannelinStripRow;
362  // Compute the maximum stripID this chip can have
363  int maxStripIDForCurrChip = (currChipID + 1) * MaxChannelinStripRow;
364 
365  for(int i = 0; i < 3; i++)
366  {
367  // We don't want to "cluster" strips that are outside the range of this chip
368  if((stripID + 1 + i) >= maxStripIDForCurrChip) continue;
369 
370  if(firedStrips.find(stripID + 1 + i) != firedStrips.end())
371  {
372  if(firedStrips.at(stripID + 1 + i))
373  {
374  hitMap[2 - i] = 1;
375  firedStrips[stripID + 1 + i] = false;
376  }
377  else
378  {
379  hitMap[2 - i] = 0;
380  }
381  }
382  }
383 
384  // Encode the hit map into a int
385  stripEncodingForITK[stripID] = (int)(hitMap.to_ulong());
386 
387  }
388 
389  // Actual creation of the FPGAHit objects
390  for (const SCT_RDORawData* sctRawData : *SCT_Collection)
391  {
392  const Identifier rdoId = sctRawData->identify();
393  // get the det element from the det element collection
394  const InDetDD::SiDetectorElement* sielement = m_SCT_mgr->getDetectorElement(rdoId);
395  Amg::Vector2D LocalPos = sielement->rawLocalPositionOfCell(rdoId);
396  std::pair<Amg::Vector3D, Amg::Vector3D> endsOfStrip = sielement->endsOfStrip(LocalPos);
397 
398  hitIndexMap[rdoId] = hitIndex;
399  ++hitIndex;
400  // if there is simulation truth available, try to retrieve the
401  // "most likely" barcode for this strip.
403  const HepMcParticleLink* bestTruthLink{};
404  if (!m_stripSDOKey.empty()) {
405  InDetSimDataCollection::const_iterator iter(stripSDOHandle->find(rdoId));
406  // if SDO found for this strip, associate the particle
407  if (iter != stripSDOHandle->end()) { bestTruthLink = getTruthInformation(iter, parentMask); }
408  } // end if sct truth available
409  HepMC::ConstGenParticlePtr bestParent = (bestTruthLink) ? bestTruthLink->cptr() : nullptr;
410  // push back the hit information to DataInput for HitList , copy from RawInput.cxx
411 
412  FPGATrackSimHit tmpSGhit;
413  tmpSGhit.setHitType(HitType::unmapped);
414  tmpSGhit.setDetType(SiliconTech::strip);
415  tmpSGhit.setIdentifierHash(sielement->identifyHash());
416  tmpSGhit.setIdentifier(sielement->identify().get_identifier32().get_compact());
417 
418  int barrel_ec = m_sctId->barrel_ec(rdoId);
419  if (barrel_ec == 0)
421  else if (barrel_ec == 2)
423  else if (barrel_ec == -2)
425 
426  tmpSGhit.setLayerDisk(m_sctId->layer_disk(rdoId));
427  tmpSGhit.setPhiModule(m_sctId->phi_module(rdoId));
428  tmpSGhit.setEtaModule(m_sctId->eta_module(rdoId));
429  tmpSGhit.setPhiIndex(m_sctId->strip(rdoId));
430  tmpSGhit.setEtaIndex(m_sctId->row(rdoId));
431  tmpSGhit.setSide(m_sctId->side(rdoId));
432  tmpSGhit.setEtaWidth(sctRawData->getGroupSize());
433  tmpSGhit.setPhiWidth(0);
434  if (bestParent) {
435  tmpSGhit.setEventIndex(bestTruthLink->eventIndex());
436  tmpSGhit.setBarcode(bestTruthLink->barcode()); // FIXME barcode-based
437  tmpSGhit.setUniqueID(bestTruthLink->id());
438  }
439  else {
443  }
444 
445  // If the strip has been identified by the previous for loop as a valid hit that can be encoded into ITk Strip format
446  int stripID = m_sctId->strip(rdoId);
447  if(stripEncodingForITK.find(stripID) != stripEncodingForITK.end())
448  {
449  // Each ITK ABC chip reads 128 channels in one row, so we just need to divide the current strip with 128 to get the chip index
450  // for the Strip ID, it is the remainder left after dividing by 128
451  int chipID = stripID / MaxChannelinStripRow;
452  int ITkStripID = stripID % MaxChannelinStripRow;
453 
454  // for each ABC chip readout, each reads 256 channels actually. 0-127 corresponds to lower row and then 128-255 corresponds to the
455  // upper. This can be simulated in the code by using the eta module index. Even index are not offest, while odd index, the
456  // strip id is offest by 128
457  // One point to not is that for barrel, the eta module index start at 1, and not zero. Hence a shift of 1 is needed
458  int offset = m_sctId->eta_module(rdoId) % 2;
459  if(m_sctId->barrel_ec(rdoId) == 0) offset = (std::abs(m_sctId->eta_module(rdoId)) - 1) % 2;
460 
461  ITkStripID += offset * MaxChannelinStripRow;
462 
463  tmpSGhit.setisValidForITkHit(true);
464  tmpSGhit.setStripRowIDForITk(ITkStripID);
465  tmpSGhit.setStripChipIDForITk(chipID);
466  tmpSGhit.setStripHitMapForITk(stripEncodingForITK.at(stripID));
467  }
468 
469  tmpSGhit.setBarcodePt(static_cast<unsigned long>(std::ceil(bestParent ? bestParent->momentum().perp() : 0.)));
470  tmpSGhit.setParentageMask(parentMask.to_ulong());
471  tmpSGhit.setX(0.5 * (endsOfStrip.first.x() + endsOfStrip.second.x()));
472  tmpSGhit.setY(0.5 * (endsOfStrip.first.y() + endsOfStrip.second.y()));
473  tmpSGhit.setZ(0.5 * (endsOfStrip.first.z() + endsOfStrip.second.z()));
474 
475  // Add truth
477  FPGATrackSimMultiTruth::Barcode uniqueID(tmpSGhit.getEventIndex(), tmpSGhit.getBarcode()); // FIXME barcode-based
478  mt.maximize(uniqueID, tmpSGhit.getBarcodePt()); // FIMXE barcode-based
479  tmpSGhit.setTruth(mt);
480 
481  m_eventHeader->addHit(tmpSGhit);
482  } // end for each RDO in the strip collection
483  } // end for each strip RDO collection
484  // dump all RDO's and SDO's for a given event, for debugging purposes
485 
486  return StatusCode::SUCCESS;
487 }

◆ readTruthTracks()

StatusCode FPGATrackSimSGToRawHitsTool::readTruthTracks ( std::vector< FPGATrackSimTruthTrack > &  truth,
const EventContext &  eventContext 
)
private

Definition at line 704 of file FPGATrackSimSGToRawHitsTool.cxx.

705 {
706  auto simTracksHandle = SG::makeHandle(m_mcCollectionKey, eventContext);
707  ATH_MSG_DEBUG("Dump truth tracks, size " << simTracksHandle->size());
708 
709  // dump each truth track
710  for (unsigned int ievt = 0; ievt < simTracksHandle->size(); ++ievt) {
711  const HepMC::GenEvent* genEvent = simTracksHandle->at(ievt);
712  // retrieve the primary interaction vertex here. for now, use the dummy origin.
713  HepGeom::Point3D<double> primaryVtx(0., 0., 0.);
714  // the event should have signal process vertex unless it was generated as single particles.
715  // if it exists, use it for the primary vertex.
717  if (spv) {
718  primaryVtx.set(spv->position().x(),
719  spv->position().y(),
720  spv->position().z());
721  ATH_MSG_DEBUG("using signal process vertex for eventIndex " << ievt << ":"
722  << primaryVtx.x() << "\t" << primaryVtx.y() << "\t" << primaryVtx.z());
723  }
724  for (const auto& particle: *genEvent) {
725  const int pdgcode = particle->pdg_id();
726  // reject generated particles without a production vertex.
727  if (particle->production_vertex() == nullptr) {
728  continue;
729  }
730  // reject neutral or unstable particles
731  const HepPDT::ParticleData* pd = m_particleDataTable->particle(abs(pdgcode));
732  if (pd == nullptr) {
733  continue;
734  }
735  float charge = pd->charge();
736  if (pdgcode < 0) charge *= -1.; // since we took absolute value above
737  if (std::abs(charge) < 0.5) {
738  continue;
739  }
740  if (!MC::isStable(particle)) {
741  continue;
742  }
743  // truth-to-track tool
744  const Amg::Vector3D momentum(particle->momentum().px(), particle->momentum().py(), particle->momentum().pz());
745  const Amg::Vector3D position(particle->production_vertex()->position().x(), particle->production_vertex()->position().y(), particle->production_vertex()->position().z());
746  const Trk::CurvilinearParameters cParameters(position, momentum, charge);
747  Trk::PerigeeSurface persf;
748  if (m_UseNominalOrigin) {
749  Amg::Vector3D origin(0, 0, 0);
750  persf = Trk::PerigeeSurface(origin);
751  }
752  else {
753  SG::ReadCondHandle<InDet::BeamSpotData> beamSpotHandle{ m_beamSpotKey, eventContext };
754  Trk::PerigeeSurface persf(beamSpotHandle->beamPos());
755  }
756  const std::unique_ptr<Trk::TrackParameters> tP = m_extrapolator->extrapolate(eventContext, cParameters, persf, Trk::anyDirection, false);
757  const double track_truth_d0 = tP ? tP->parameters()[Trk::d0] : 999.;
758  const double track_truth_phi = tP ? tP->parameters()[Trk::phi] : 999.;
759  const double track_truth_p = (tP && fabs(tP->parameters()[Trk::qOverP]) > 1.e-8) ?
760  tP->charge() / tP->parameters()[Trk::qOverP] : 10E7;
761  const double track_truth_x0 = tP ? tP->position().x() : 999.;
762  const double track_truth_y0 = tP ? tP->position().y() : 999.;
763  const double track_truth_z0 = tP ? tP->parameters()[Trk::z0] : 999.;
764  const double track_truth_q = tP ? tP->charge() : 0.;
765  const double track_truth_sinphi = tP ? std::sin(tP->parameters()[Trk::phi]) : -1.;
766  const double track_truth_cosphi = tP ? std::cos(tP->parameters()[Trk::phi]) : -1.;
767  const double track_truth_sintheta = tP ? std::sin(tP->parameters()[Trk::theta]) : -1.;
768  const double track_truth_costheta = tP ? std::cos(tP->parameters()[Trk::theta]) : -1.;
769  double truth_d0corr = track_truth_d0 - (primaryVtx.y() * cos(track_truth_phi) - primaryVtx.x() * sin(track_truth_phi));
770  double truth_zvertex = 0.;
771  const HepGeom::Point3D<double> startVertex(particle->production_vertex()->position().x(), particle->production_vertex()->position().y(), particle->production_vertex()->position().z());
772  // categorize particle (prompt, secondary, etc.) based on InDetPerformanceRTT/detector paper criteria.
773  bool isPrimary = true;
774  if (std::abs(truth_d0corr) > 2.) { isPrimary = false; }
775  const int bc = HepMC::barcode(particle); // FIXME update barcode-based syntax
776  const int uid = HepMC::uniqueID(particle);
777  if (HepMC::is_simulation_particle(particle) || bc == 0) { isPrimary = false; } // FIXME update barcode-based syntax
778  if (isPrimary && particle->production_vertex()) {
779  const HepGeom::Point3D<double> startVertex(particle->production_vertex()->position().x(), particle->production_vertex()->position().y(), particle->production_vertex()->position().z());
780  if (std::abs(startVertex.z() - truth_zvertex) > 100.) { isPrimary = false; }
781  if (particle->end_vertex()) {
782  HepGeom::Point3D<double> endVertex(particle->end_vertex()->position().x(), particle->end_vertex()->position().y(), particle->end_vertex()->position().z());
783  if (endVertex.perp() < FPGATrackSim_PT_TRUTHMIN && std::abs(endVertex.z()) < FPGATrackSim_Z_TRUTHMIN) { isPrimary = false; }
784  }
785  }
786  else {
787  isPrimary = false;
788  }
789 
791 
792  FPGATrackSimTruthTrack tmpSGTrack;
793  tmpSGTrack.setVtxX(track_truth_x0);
794  tmpSGTrack.setVtxY(track_truth_y0);
795  tmpSGTrack.setVtxZ(track_truth_z0);
796  tmpSGTrack.setD0(track_truth_d0);
797  tmpSGTrack.setZ0(track_truth_z0);
798  tmpSGTrack.setVtxZ(primaryVtx.z());
799  tmpSGTrack.setQ(track_truth_q);
800  tmpSGTrack.setPX(track_truth_p * (track_truth_cosphi * track_truth_sintheta));
801  tmpSGTrack.setPY(track_truth_p * (track_truth_sinphi * track_truth_sintheta));
802  tmpSGTrack.setPZ(track_truth_p * track_truth_costheta);
803  tmpSGTrack.setPDGCode(pdgcode);
804  tmpSGTrack.setStatus(particle->status());
805 
806  tmpSGTrack.setBarcode(truthLink2.barcode());
807  tmpSGTrack.setUniqueID(truthLink2.id());
808  tmpSGTrack.setEventIndex(truthLink2.eventIndex());
809 
810  truth.push_back(tmpSGTrack);
811  } // end for each GenParticle in this GenEvent
812  } // end for each GenEvent
813 
814 
815  return StatusCode::SUCCESS;
816 }

Member Data Documentation

◆ m_beamSpotKey

SG::ReadCondHandleKey<InDet::BeamSpotData> FPGATrackSimSGToRawHitsTool::m_beamSpotKey { this, "BeamSpotKey", "BeamSpotData", "SG key for beam spot" }
private

Definition at line 60 of file FPGATrackSimSGToRawHitsTool.h.

◆ m_dumpHitsOnTracks

Gaudi::Property<bool> FPGATrackSimSGToRawHitsTool::m_dumpHitsOnTracks { this, "dumpHitsOnTracks", false }
private

Definition at line 77 of file FPGATrackSimSGToRawHitsTool.h.

◆ m_dumpTruthIntersections

Gaudi::Property<bool> FPGATrackSimSGToRawHitsTool::m_dumpTruthIntersections { this, "dumpTruthIntersections", false }
private

Definition at line 78 of file FPGATrackSimSGToRawHitsTool.h.

◆ m_eventHeader

FPGATrackSimEventInputHeader* FPGATrackSimSGToRawHitsTool::m_eventHeader = nullptr
private

Definition at line 105 of file FPGATrackSimSGToRawHitsTool.h.

◆ m_eventInfoKey

SG::ReadHandleKey<xAOD::EventInfo> FPGATrackSimSGToRawHitsTool::m_eventInfoKey { this, "EventInfo", "EventInfo" }
private

Definition at line 61 of file FPGATrackSimSGToRawHitsTool.h.

◆ m_extrapolator

ToolHandle<Trk::IExtrapolator> FPGATrackSimSGToRawHitsTool::m_extrapolator {this, "Extrapolator", "Trk::Extrapolator/AtlasExtrapolator"}
private

ToolHandle for Extrapolator.

Definition at line 58 of file FPGATrackSimSGToRawHitsTool.h.

◆ m_maxEta

Gaudi::Property<double> FPGATrackSimSGToRawHitsTool::m_maxEta { this, "maxEta", 3.3 }
private

Definition at line 83 of file FPGATrackSimSGToRawHitsTool.h.

◆ m_mcCollectionKey

SG::ReadHandleKey<McEventCollection> FPGATrackSimSGToRawHitsTool::m_mcCollectionKey { this, "McTruth", "TruthEvent" }
private

Definition at line 66 of file FPGATrackSimSGToRawHitsTool.h.

◆ m_minPt

Gaudi::Property<double> FPGATrackSimSGToRawHitsTool::m_minPt { this, "minPt", .8*CLHEP::GeV }
private

Definition at line 84 of file FPGATrackSimSGToRawHitsTool.h.

◆ m_offlineTracksKey

SG::ReadHandleKey<xAOD::TrackParticleContainer> FPGATrackSimSGToRawHitsTool::m_offlineTracksKey { this, "OfflineTracks", "InDetTrackParticles"}
private

Definition at line 65 of file FPGATrackSimSGToRawHitsTool.h.

◆ m_particleDataTable

const HepPDT::ParticleDataTable* FPGATrackSimSGToRawHitsTool::m_particleDataTable = nullptr
private

Definition at line 92 of file FPGATrackSimSGToRawHitsTool.h.

◆ m_PIX_mgr

const InDetDD::SiDetectorManager* FPGATrackSimSGToRawHitsTool::m_PIX_mgr = nullptr
private

Definition at line 90 of file FPGATrackSimSGToRawHitsTool.h.

◆ m_pixelClusterContainerKey

SG::ReadHandleKey<InDet::SiClusterContainer> FPGATrackSimSGToRawHitsTool::m_pixelClusterContainerKey { this, "pixelClustersName", "ITkPixelClusters" }
private

Definition at line 62 of file FPGATrackSimSGToRawHitsTool.h.

◆ m_pixelId

const PixelID* FPGATrackSimSGToRawHitsTool::m_pixelId = nullptr
private

Definition at line 87 of file FPGATrackSimSGToRawHitsTool.h.

◆ m_pixelRDOKey

SG::ReadHandleKey<PixelRDO_Container> FPGATrackSimSGToRawHitsTool::m_pixelRDOKey { this, "PixelRDO", "ITkPixelRDOs" }
private

Definition at line 69 of file FPGATrackSimSGToRawHitsTool.h.

◆ m_pixelSDOKey

SG::ReadHandleKey<InDetSimDataCollection> FPGATrackSimSGToRawHitsTool::m_pixelSDOKey { this, "PixelSDO", "ITkPixelSDO_Map" }
private

Definition at line 67 of file FPGATrackSimSGToRawHitsTool.h.

◆ m_readOfflineClusters

Gaudi::Property<bool> FPGATrackSimSGToRawHitsTool::m_readOfflineClusters { this, "ReadOfflineClusters", true, "flag to enable the offline cluster save" }
private

Definition at line 79 of file FPGATrackSimSGToRawHitsTool.h.

◆ m_readOfflineTracks

Gaudi::Property<bool> FPGATrackSimSGToRawHitsTool::m_readOfflineTracks { this, "ReadOfflineTracks", true, "flag to enable the offline tracking save" }
private

Definition at line 81 of file FPGATrackSimSGToRawHitsTool.h.

◆ m_readTruthTracks

Gaudi::Property<bool> FPGATrackSimSGToRawHitsTool::m_readTruthTracks { this, "ReadTruthTracks", true, "flag to enable the truth tracking save" }
private

Definition at line 80 of file FPGATrackSimSGToRawHitsTool.h.

◆ m_SCT_mgr

const InDetDD::SiDetectorManager* FPGATrackSimSGToRawHitsTool::m_SCT_mgr = nullptr
private

Definition at line 91 of file FPGATrackSimSGToRawHitsTool.h.

◆ m_sctClusterContainerKey

SG::ReadHandleKey<InDet::SiClusterContainer> FPGATrackSimSGToRawHitsTool::m_sctClusterContainerKey { this, "SCT_ClustersName", "SCT_Clusters" }
private

Definition at line 63 of file FPGATrackSimSGToRawHitsTool.h.

◆ m_sctId

const SCT_ID* FPGATrackSimSGToRawHitsTool::m_sctId = nullptr
private

Definition at line 88 of file FPGATrackSimSGToRawHitsTool.h.

◆ m_stripRDOKey

SG::ReadHandleKey<SCT_RDO_Container> FPGATrackSimSGToRawHitsTool::m_stripRDOKey { this, "StripRDO", "ITkStripRDOs" }
private

Definition at line 70 of file FPGATrackSimSGToRawHitsTool.h.

◆ m_stripSDOKey

SG::ReadHandleKey<InDetSimDataCollection> FPGATrackSimSGToRawHitsTool::m_stripSDOKey { this, "StripSDO", "ITkStripSDO_Map" }
private

Definition at line 68 of file FPGATrackSimSGToRawHitsTool.h.

◆ m_tracksTruthName

Gaudi::Property<std::string> FPGATrackSimSGToRawHitsTool::m_tracksTruthName { this, "OfflineName", "InDetTrackParticles", "name of offline tracks collection" }
private

Definition at line 76 of file FPGATrackSimSGToRawHitsTool.h.

◆ m_truthToTrack

ToolHandle<Trk::ITruthToTrack> FPGATrackSimSGToRawHitsTool::m_truthToTrack {this, "TruthToTrackTool", "Trk::TruthToTrack/InDetTruthToTrack" }
private

tool to create track parameters from a gen particle

Definition at line 57 of file FPGATrackSimSGToRawHitsTool.h.

◆ m_UseNominalOrigin

Gaudi::Property<bool> FPGATrackSimSGToRawHitsTool::m_UseNominalOrigin { this, "UseNominalOrigin", false, "if true truth values are always with respect to (0,0,0)" }
private

Definition at line 82 of file FPGATrackSimSGToRawHitsTool.h.


The documentation for this class was generated from the following files:
python.PyKernel.retrieve
def retrieve(aClass, aKey=None)
Definition: PyKernel.py:110
AtlasDetectorID::is_pixel
bool is_pixel(Identifier id) const
Definition: AtlasDetectorID.h:760
Trk::anyDirection
@ anyDirection
Definition: PropDirection.h:22
FPGATrackSimHit::getEventIndex
long getEventIndex() const
Definition: FPGATrackSimHit.h:148
FPGATrackSimSGToRawHitsTool::m_readTruthTracks
Gaudi::Property< bool > m_readTruthTracks
Definition: FPGATrackSimSGToRawHitsTool.h:80
FPGATrackSimOfflineTrack::addHit
void addHit(FPGATrackSimOfflineHit s)
Definition: FPGATrackSimOfflineTrack.h:37
getMenu.algname
algname
Definition: getMenu.py:54
Trk::ParticleSwitcher::particle
constexpr ParticleHypothesis particle[PARTICLEHYPOTHESES]
the array of masses
Definition: ParticleHypothesis.h:76
PixelID::phi_index
int phi_index(const Identifier &id) const
Definition: PixelID.h:658
InDetDD::SolidStateDetectorElementBase::connectedCell
SiCellId connectedCell(const SiCellId cellId, int number) const
Get the cell ids sharing the readout for this cell.
Definition: SolidStateDetectorElementBase.cxx:250
InDetDD::SiDetectorManager::getDetectorElement
virtual SiDetectorElement * getDetectorElement(const Identifier &id) const =0
access to individual elements using Identifier or IdentiferHash
FPGATrackSimInputUtils::ParentBitmask
std::bitset< NBITS > ParentBitmask
Definition: FPGATrackSimInputUtils.h:16
FPGATrackSimSGToRawHitsTool::m_truthToTrack
ToolHandle< Trk::ITruthToTrack > m_truthToTrack
tool to create track parameters from a gen particle
Definition: FPGATrackSimSGToRawHitsTool.h:57
SiliconTech::strip
@ strip
max
#define max(a, b)
Definition: cfImp.cxx:41
FPGATrackSimSGToRawHitsTool::m_UseNominalOrigin
Gaudi::Property< bool > m_UseNominalOrigin
Definition: FPGATrackSimSGToRawHitsTool.h:82
SG::ReadCondHandle
Definition: ReadCondHandle.h:44
FPGATrackSimHit::setStripRowIDForITk
void setStripRowIDForITk(int v)
Definition: FPGATrackSimHit.h:167
FPGATrackSimEventInputHeader::newEvent
void newEvent(FPGATrackSimEventInfo const &event)
Definition: FPGATrackSimEventInputHeader.h:28
Trk::locX
@ locX
Definition: ParamDefs.h:37
Trk::ParametersBase::charge
double charge() const
Returns the charge.
Trk::locY
@ locY
local cartesian
Definition: ParamDefs.h:38
FPGATrackSimCluster
Definition: FPGATrackSimCluster.h:24
CaloCellPos2Ntuple.int
int
Definition: CaloCellPos2Ntuple.py:24
FPGATrackSimEventInfo::setBCID
void setBCID(const int &val)
Definition: FPGATrackSimEventInfo.h:60
FPGATrackSimHit::setEtaIndex
void setEtaIndex(unsigned v)
Definition: FPGATrackSimHit.h:103
Trk::PerigeeSurface
Definition: PerigeeSurface.h:43
AtlasDetectorID::is_sct
bool is_sct(Identifier id) const
Definition: AtlasDetectorID.h:770
PixelID::barrel_ec
int barrel_ec(const Identifier &id) const
Values of different levels (failure returns 0)
Definition: PixelID.h:619
DetectorZone::posEndcap
@ posEndcap
Trk::ParametersBase::position
const Amg::Vector3D & position() const
Access method for the position.
Amg::Vector2D
Eigen::Matrix< double, 2, 1 > Vector2D
Definition: GeoPrimitives.h:48
MatchToEnum::offline
@ offline
FPGATrackSimHit::setisValidForITkHit
void setisValidForITkHit(bool v)
Definition: FPGATrackSimHit.h:166
FPGATrackSimHit::setIdentifierHash
void setIdentifierHash(unsigned v)
Definition: FPGATrackSimHit.h:72
FPGATrackSimTruthTrack
Definition: FPGATrackSimTruthTrack.h:14
FPGATrackSimHit::getBarcodePt
float getBarcodePt() const
Definition: FPGATrackSimHit.h:149
FPGATrackSimTruthTrack::setPX
void setPX(double v)
Definition: FPGATrackSimTruthTrack.h:25
InDetDD::DetectorDesign::localPositionOfCell
virtual SiLocalPosition localPositionOfCell(const SiCellId &cellId) const =0
readout or diode id -> position.
FPGATrackSimOfflineHit::setClusterID
void setClusterID(int clus)
Definition: FPGATrackSimOfflineHit.h:22
FPGATrackSimOfflineTrack::setZ0
void setZ0(double v)
Definition: FPGATrackSimOfflineTrack.h:21
Amg::y
@ y
Definition: GeoPrimitives.h:35
FPGATrackSimSGToRawHitsTool::m_offlineTracksKey
SG::ReadHandleKey< xAOD::TrackParticleContainer > m_offlineTracksKey
Definition: FPGATrackSimSGToRawHitsTool.h:65
FPGATrackSimSGToRawHitsTool::dumpPixelClusters
StatusCode dumpPixelClusters(HitIndexMap &pixelClusterIndexMap, const EventContext &eventContext)
Definition: FPGATrackSimSGToRawHitsTool.cxx:491
FPGATrackSimEventInfo::setRunNumber
void setRunNumber(const unsigned long &val)
Definition: FPGATrackSimEventInfo.h:55
FPGATrackSimSGToRawHitsTool::HitIndexMap
std::map< Identifier, int > HitIndexMap
Definition: FPGATrackSimSGToRawHitsTool.h:94
FPGATrackSimSGToRawHitsTool::m_pixelClusterContainerKey
SG::ReadHandleKey< InDet::SiClusterContainer > m_pixelClusterContainerKey
Definition: FPGATrackSimSGToRawHitsTool.h:62
Identifier::get_identifier32
Identifier32 get_identifier32() const
Get the 32-bit version Identifier, will be invalid if >32 bits needed.
Trk::z0
@ z0
Definition: ParamDefs.h:64
FPGATrackSimHit::setEtaWidth
void setEtaWidth(unsigned v)
Definition: FPGATrackSimHit.h:78
FPGATrackSimSGToRawHitsTool::readTruthTracks
StatusCode readTruthTracks(std::vector< FPGATrackSimTruthTrack > &truth, const EventContext &eventContext)
Definition: FPGATrackSimSGToRawHitsTool.cxx:704
FPGATrackSimOfflineHit::setTrackNumber
void setTrackNumber(int track)
Definition: FPGATrackSimOfflineHit.h:23
InDetDD::DetectorDesign::connectedCell
virtual SiCellId connectedCell(const SiReadoutCellId &readoutId, int number) const =0
readout id -> id of connected diodes.
FPGATrackSimHit::setSide
void setSide(unsigned v)
Definition: FPGATrackSimHit.h:74
offline
makeDTCalibBlob_pickPhase.pd
pd
Definition: makeDTCalibBlob_pickPhase.py:342
Trk::RIO_OnTrack
Definition: RIO_OnTrack.h:70
SCT_RDORawData
Definition: SCT_RDORawData.h:24
FPGATrackSimSGToRawHitsTool::m_stripSDOKey
SG::ReadHandleKey< InDetSimDataCollection > m_stripSDOKey
Definition: FPGATrackSimSGToRawHitsTool.h:68
SCT_ID::barrel_ec
int barrel_ec(const Identifier &id) const
Values of different levels (failure returns 0)
Definition: SCT_ID.h:728
FPGATrackSimTruthTrack::setPZ
void setPZ(double v)
Definition: FPGATrackSimTruthTrack.h:27
SCT_ID::phi_module
int phi_module(const Identifier &id) const
Definition: SCT_ID.h:740
drawFromPickle.cos
cos
Definition: drawFromPickle.py:36
FPGATrackSimHit::setY
void setY(float v)
Definition: FPGATrackSimHit.h:128
SG::VarHandleKey::empty
bool empty() const
Test if the key is blank.
Definition: AthToolSupport/AsgDataHandles/Root/VarHandleKey.cxx:150
FPGATrackSimTruthTrack::setVtxZ
void setVtxZ(double v)
Definition: FPGATrackSimTruthTrack.h:24
FPGATrackSimCluster::setClusterEquiv
void setClusterEquiv(const FPGATrackSimHit &input)
Definition: FPGATrackSimCluster.h:35
FPGATrackSimHit::setDetectorZone
void setDetectorZone(DetectorZone detZone)
Definition: FPGATrackSimHit.h:56
FPGATrackSimSGToRawHitsTool::m_pixelId
const PixelID * m_pixelId
Definition: FPGATrackSimSGToRawHitsTool.h:87
Identifier32::get_compact
value_type get_compact() const
Get the compact id.
Definition: Identifier32.h:44
Trk::u
@ u
Enums for curvilinear frames.
Definition: ParamDefs.h:77
InDetDD::SolidStateDetectorElementBase::identifyHash
virtual IdentifierHash identifyHash() const override final
identifier hash (inline)
FPGATrackSimEventInfo::setextendedLevel1ID
void setextendedLevel1ID(const unsigned int &val)
Definition: FPGATrackSimEventInfo.h:61
FPGATrackSimSGToRawHitsTool::m_readOfflineClusters
Gaudi::Property< bool > m_readOfflineClusters
Definition: FPGATrackSimSGToRawHitsTool.h:79
FPGATrackSimOptionalEventInfo::nTruthTracks
size_t nTruthTracks() const
Definition: FPGATrackSimOptionalEventInfo.h:38
FPGATrackSimHit
Definition: FPGATrackSimHit.h:41
InDet::SiClusterCollection
Trk::PrepRawDataCollection< InDet::SiCluster > SiClusterCollection
Definition: SiClusterCollection.h:26
FPGATrackSimSGToRawHitsTool::m_maxEta
Gaudi::Property< double > m_maxEta
Definition: FPGATrackSimSGToRawHitsTool.h:83
FPGATrackSimOptionalEventInfo::nOfflineClusters
size_t nOfflineClusters() const
Definition: FPGATrackSimOptionalEventInfo.h:28
FPGATrackSimOfflineHit::setLocX
void setLocX(float locx)
Definition: FPGATrackSimOfflineHit.h:17
InDetDD::SiLocalPosition
Definition: SiLocalPosition.h:31
SG::makeHandle
SG::ReadCondHandle< T > makeHandle(const SG::ReadCondHandleKey< T > &key, const EventContext &ctx=Gaudi::Hive::currentContext())
Definition: ReadCondHandle.h:270
FPGATrackSimHit::setUniqueID
void setUniqueID(const HepMcParticleLink::barcode_type &v)
Definition: FPGATrackSimHit.h:140
FPGATrackSimSGToRawHitsTool::m_readOfflineTracks
Gaudi::Property< bool > m_readOfflineTracks
Definition: FPGATrackSimSGToRawHitsTool.h:81
python.setupRTTAlg.size
int size
Definition: setupRTTAlg.py:39
FPGATrackSimSGToRawHitsTool::m_particleDataTable
const HepPDT::ParticleDataTable * m_particleDataTable
Definition: FPGATrackSimSGToRawHitsTool.h:92
FPGATrackSimHit::setDetType
void setDetType(SiliconTech detType)
Definition: FPGATrackSimHit.h:55
FPGATrackSimHit::setX
void setX(float v)
Definition: FPGATrackSimHit.h:127
FPGATrackSimSGToRawHitsTool::m_eventInfoKey
SG::ReadHandleKey< xAOD::EventInfo > m_eventInfoKey
Definition: FPGATrackSimSGToRawHitsTool.h:61
FPGATrackSimEventInfo
Definition: FPGATrackSimEventInfo.h:14
FPGATrackSimHit::setToT
void setToT(unsigned v)
Definition: FPGATrackSimHit.h:138
FPGATrackSimEventInfo::setEventNumber
void setEventNumber(const unsigned long &val)
Definition: FPGATrackSimEventInfo.h:56
Amg::z
@ z
Definition: GeoPrimitives.h:36
PixelID::is_barrel
bool is_barrel(const Identifier &id) const
Test for barrel - WARNING: id MUST be pixel id, otherwise answer is not accurate. Use SiliconID for g...
Definition: PixelID.h:605
InDetDD::SiDetectorElement::cellIdFromIdentifier
virtual SiCellId cellIdFromIdentifier(const Identifier &identifier) const override final
SiCellId from Identifier.
Definition: SiDetectorElement.cxx:120
InDetDD::SolidStateDetectorElementBase::numberOfConnectedCells
int numberOfConnectedCells(const SiCellId cellId) const
Test if readout cell has more than one diode associated with it.
Definition: SolidStateDetectorElementBase.cxx:243
FPGATrackSimOfflineHit::setLayer
void setLayer(int lay)
Definition: FPGATrackSimOfflineHit.h:21
FPGATrackSimHit::setPhiIndex
void setPhiIndex(unsigned v)
Definition: FPGATrackSimHit.h:102
ATH_MSG_ERROR
#define ATH_MSG_ERROR(x)
Definition: AthMsgStreamMacros.h:33
FPGATrackSimSGToRawHitsTool::readRawSilicon
StatusCode readRawSilicon(HitIndexMap &hitIndexMap, const EventContext &eventContext)
Definition: FPGATrackSimSGToRawHitsTool.cxx:210
ParticleGun_EoverP_Config.momentum
momentum
Definition: ParticleGun_EoverP_Config.py:63
HepMC::is_simulation_particle
bool is_simulation_particle(const T &p)
Method to establish if a particle (or barcode) was created during the simulation (TODO update to be s...
Definition: MagicNumbers.h:342
xAOD::nCells
setRawEt setRawPhi nCells
Definition: TrigCaloCluster_v1.cxx:33
lumiFormat.i
int i
Definition: lumiFormat.py:85
Trk::theta
@ theta
Definition: ParamDefs.h:66
FPGATrackSimOfflineHit::setLocY
void setLocY(float locy)
Definition: FPGATrackSimOfflineHit.h:18
FPGATrackSimEventInputHeader::addHit
void addHit(FPGATrackSimHit const &s)
Definition: FPGATrackSimEventInputHeader.h:39
ATH_MSG_DEBUG
#define ATH_MSG_DEBUG(x)
Definition: AthMsgStreamMacros.h:29
HepMC::barcode
int barcode(const T *p)
Definition: Barcode.h:16
Amg::x
@ x
Definition: GeoPrimitives.h:34
SCT_ID::row
int row(const Identifier &id) const
Definition: SCT_ID.h:758
FPGATrackSimHit::setStripHitMapForITk
void setStripHitMapForITk(int v)
Definition: FPGATrackSimHit.h:169
FPGATrackSimSGToRawHitsTool::m_SCT_mgr
const InDetDD::SiDetectorManager * m_SCT_mgr
Definition: FPGATrackSimSGToRawHitsTool.h:91
FPGATrackSimHit::setEtaModule
void setEtaModule(int v)
Definition: FPGATrackSimHit.h:76
InDetDD::SiDetectorElement::identifierFromCellId
virtual Identifier identifierFromCellId(const SiCellId &cellId) const override final
Identifier <-> SiCellId (ie strip number or pixel eta_index,phi_index) Identifier from SiCellId (ie s...
Definition: SiDetectorElement.cxx:89
InDetSimData
Definition: InDetSimData.h:42
FPGATrackSimMultiTruth::Barcode
std::pair< unsigned long, unsigned long > Barcode
Definition: FPGATrackSimMultiTruth.h:49
FPGATrackSimOptionalEventInfo::addOfflineTrack
void addOfflineTrack(const FPGATrackSimOfflineTrack &t)
Definition: FPGATrackSimOptionalEventInfo.h:34
FPGATrackSimTruthTrack::setD0
void setD0(double v)
Definition: FPGATrackSimTruthTrack.h:19
HepMC::uniqueID
int uniqueID(const T &p)
Definition: MagicNumbers.h:109
InDetRawDataCollection
Definition: InDetRawDataCollection.h:31
FPGATrackSimTruthTrack::setEventIndex
void setEventIndex(int v)
Definition: FPGATrackSimTruthTrack.h:35
PixelID::eta_index
int eta_index(const Identifier &id) const
Definition: PixelID.h:664
ATH_CHECK
#define ATH_CHECK
Definition: AthCheckMacros.h:40
FPGATrackSimInputUtils::construct_truth_bitmap
const ParentBitmask construct_truth_bitmap(HepMC::ConstGenParticlePtr p)
Definition: FPGATrackSimInputUtils.cxx:10
FPGATrackSimOptionalEventInfo
Definition: FPGATrackSimOptionalEventInfo.h:17
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
Trk::CurvilinearParametersT
Definition: CurvilinearParametersT.h:48
FPGATrackSimHit::setBarcode
void setBarcode(const HepMcParticleLink::barcode_type &v)
Definition: FPGATrackSimHit.h:139
FPGATrackSimHit::setPhiModule
void setPhiModule(unsigned v)
Definition: FPGATrackSimHit.h:77
DataVector< const Trk::TrackStateOnSurface >
FPGATrackSimOfflineTrack
Definition: FPGATrackSimOfflineTrack.h:12
FPGATrackSimSGToRawHitsTool::m_PIX_mgr
const InDetDD::SiDetectorManager * m_PIX_mgr
Definition: FPGATrackSimSGToRawHitsTool.h:90
FPGATrackSimOfflineTrack::setD0
void setD0(double v)
Definition: FPGATrackSimOfflineTrack.h:20
FPGATrackSimOptionalEventInfo::nOfflineTracks
size_t nOfflineTracks() const
Definition: FPGATrackSimOptionalEventInfo.h:33
FPGATrackSimSGToRawHitsTool::m_pixelRDOKey
SG::ReadHandleKey< PixelRDO_Container > m_pixelRDOKey
Definition: FPGATrackSimSGToRawHitsTool.h:69
Trk::MeasurementBase
Definition: MeasurementBase.h:58
FPGATrackSimSGToRawHitsTool::m_sctClusterContainerKey
SG::ReadHandleKey< InDet::SiClusterContainer > m_sctClusterContainerKey
Definition: FPGATrackSimSGToRawHitsTool.h:63
PixelID::layer_disk
int layer_disk(const Identifier &id) const
Definition: PixelID.h:626
python.PyKernel.detStore
detStore
Definition: PyKernel.py:41
InDetDD::SiDetectorElement::endsOfStrip
std::pair< Amg::Vector3D, Amg::Vector3D > endsOfStrip(const Amg::Vector2D &position) const
Special method for SCT to retrieve the two ends of a "strip" Returned coordinates are in global frame...
Definition: SiDetectorElement.cxx:339
FPGATrackSimHit::setLayerDisk
void setLayerDisk(unsigned v)
Definition: FPGATrackSimHit.h:73
HepMC::ConstGenParticlePtr
const GenParticle * ConstGenParticlePtr
Definition: GenParticle.h:38
FPGATrackSimOfflineHit::setIsPixel
void setIsPixel(bool is)
Definition: FPGATrackSimOfflineHit.h:19
PixelID::eta_module
int eta_module(const Identifier &id) const
Definition: PixelID.h:651
FPGATrackSimSGToRawHitsTool::m_mcCollectionKey
SG::ReadHandleKey< McEventCollection > m_mcCollectionKey
Definition: FPGATrackSimSGToRawHitsTool.h:66
FPGATrackSimMultiTruth::maximize
void maximize(const FPGATrackSimMultiTruth::Barcode &code, const FPGATrackSimMultiTruth::Weight &weight)
Definition: FPGATrackSimMultiTruth.cxx:36
FPGATrackSimMultiTruth
Definition: FPGATrackSimMultiTruth.h:46
Trk::TrackStateOnSurface
represents the track state (measurement, material, fit parameters and quality) at a surface.
Definition: TrackStateOnSurface.h:71
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:221
Trk::d0
@ d0
Definition: ParamDefs.h:63
FPGATrackSimOfflineTrack::setEta
void setEta(double v)
Definition: FPGATrackSimOfflineTrack.h:18
FPGATrackSimSGToRawHitsTool::m_pixelSDOKey
SG::ReadHandleKey< InDetSimDataCollection > m_pixelSDOKey
Definition: FPGATrackSimSGToRawHitsTool.h:67
FPGATrackSimSGToRawHitsTool::readStripSimulation
StatusCode readStripSimulation(HitIndexMap &hitIndexMap, unsigned int &hitIndex, const EventContext &eventContext)
Definition: FPGATrackSimSGToRawHitsTool.cxx:323
charge
double charge(const T &p)
Definition: AtlasPID.h:538
SCT_ID::layer_disk
int layer_disk(const Identifier &id) const
Definition: SCT_ID.h:734
HitType::clustered
@ clustered
FPGATrackSimHit::setPhiWidth
void setPhiWidth(unsigned v)
Definition: FPGATrackSimHit.h:79
InDetDD::SiDetectorElement
Definition: SiDetectorElement.h:109
FPGATrackSimTruthTrack::setZ0
void setZ0(double v)
Definition: FPGATrackSimTruthTrack.h:20
SG::CondHandleKey::initialize
StatusCode initialize(bool used=true)
FPGATrackSimTruthTrack::setUniqueID
void setUniqueID(const HepMcParticleLink::barcode_type &v)
Definition: FPGATrackSimTruthTrack.h:34
FPGATrackSimSGToRawHitsTool::readOfflineClusters
StatusCode readOfflineClusters(std::vector< FPGATrackSimCluster > &Clusters, const EventContext &eventContext)
Definition: FPGATrackSimSGToRawHitsTool.cxx:534
Amg::Vector3D
Eigen::Matrix< double, 3, 1 > Vector3D
Definition: GeoPrimitives.h:47
FPGATrackSimEventInputHeader::setOptional
void setOptional(FPGATrackSimOptionalEventInfo const &optional)
Definition: FPGATrackSimEventInputHeader.h:29
FPGATrackSimHit::setEventIndex
void setEventIndex(long v)
Definition: FPGATrackSimHit.h:142
Trk::MeasurementBase::localParameters
const LocalParameters & localParameters() const
Interface method to get the LocalParameters.
Definition: MeasurementBase.h:132
FPGATrackSimTruthTrack::setPY
void setPY(double v)
Definition: FPGATrackSimTruthTrack.h:26
FPGATrackSimHit::setZ
void setZ(float v)
Definition: FPGATrackSimHit.h:129
FPGATrackSimOptionalEventInfo::addTruthTrack
void addTruthTrack(const FPGATrackSimTruthTrack &t)
Definition: FPGATrackSimOptionalEventInfo.h:39
FPGATrackSimSGToRawHitsTool::m_sctId
const SCT_ID * m_sctId
Definition: FPGATrackSimSGToRawHitsTool.h:88
InDetDD::SiCellId
Definition: SiCellId.h:29
DetectorZone::negEndcap
@ negEndcap
FPGATrackSimEventInfo::setaverageInteractionsPerCrossing
void setaverageInteractionsPerCrossing(const int &val)
Definition: FPGATrackSimEventInfo.h:57
InDetDD::SolidStateDetectorElementBase::rawLocalPositionOfCell
Amg::Vector2D rawLocalPositionOfCell(const SiCellId &cellId) const
Returns position (center) of cell.
Definition: SolidStateDetectorElementBase.cxx:230
MC::isStable
bool isStable(const T &p)
Identify if the particle is stable, i.e. has not decayed.
Definition: HepMCHelpers.h:45
FPGATrackSimTruthTrack::setVtxY
void setVtxY(double v)
Definition: FPGATrackSimTruthTrack.h:23
FPGATrackSimEventInfo::setlevel1TriggerType
void setlevel1TriggerType(const unsigned int &val)
Definition: FPGATrackSimEventInfo.h:62
FPGATrackSimSGToRawHitsTool::readOfflineTracks
StatusCode readOfflineTracks(std::vector< FPGATrackSimOfflineTrack > &Track, const EventContext &eventContext)
Definition: FPGATrackSimSGToRawHitsTool.cxx:143
SCT_ID::strip
int strip(const Identifier &id) const
Definition: SCT_ID.h:764
InDetDD::SolidStateDetectorElementBase::globalPosition
HepGeom::Point3D< double > globalPosition(const HepGeom::Point3D< double > &localPos) const
transform a reconstruction local position into a global position (inline):
Trk::RIO_OnTrack::identify
Identifier identify() const
return the identifier -extends MeasurementBase
Definition: RIO_OnTrack.h:152
SCT_ID::eta_module
int eta_module(const Identifier &id) const
Definition: SCT_ID.h:746
FPGATrackSimOptionalEventInfo::addOfflineCluster
void addOfflineCluster(const FPGATrackSimCluster &c)
Definition: FPGATrackSimOptionalEventInfo.h:29
FPGATrackSimTruthTrack::setPDGCode
void setPDGCode(int v)
Definition: FPGATrackSimTruthTrack.h:31
Trk::qOverP
@ qOverP
perigee
Definition: ParamDefs.h:67
FPGATrackSimSGToRawHitsTool::m_eventHeader
FPGATrackSimEventInputHeader * m_eventHeader
Definition: FPGATrackSimSGToRawHitsTool.h:105
RunTileMonitoring.clusters
clusters
Definition: RunTileMonitoring.py:133
DetectorZone::barrel
@ barrel
FPGATrackSimOfflineTrack::setQOverPt
void setQOverPt(double v)
Definition: FPGATrackSimOfflineTrack.h:17
convertTimingResiduals.offset
offset
Definition: convertTimingResiduals.py:71
FPGATrackSimSGToRawHitsTool::readPixelSimulation
StatusCode readPixelSimulation(HitIndexMap &hitIndexMap, unsigned int &hitIndex, const EventContext &eventContext)
Definition: FPGATrackSimSGToRawHitsTool.cxx:223
FPGATrackSimTruthTrack::setStatus
void setStatus(int v)
Definition: FPGATrackSimTruthTrack.h:32
FPGATrackSimSGToRawHitsTool::m_beamSpotKey
SG::ReadCondHandleKey< InDet::BeamSpotData > m_beamSpotKey
Definition: FPGATrackSimSGToRawHitsTool.h:60
FPGATrackSimOfflineHit::setIsBarrel
void setIsBarrel(bool is)
Definition: FPGATrackSimOfflineHit.h:20
SCT_ID::side
int side(const Identifier &id) const
Definition: SCT_ID.h:752
PixelRDORawData
Definition: PixelRDORawData.h:23
LVL1::gFEXPos
Definition: gFexPos.h:11
Trk::phi
@ phi
Definition: ParamDefs.h:75
FPGATrackSimHit::setStripChipIDForITk
void setStripChipIDForITk(int v)
Definition: FPGATrackSimHit.h:168
FPGATrackSimOfflineHit
Definition: FPGATrackSimOfflineHit.h:12
FPGATrackSimEventInfo::setactualInteractionsPerCrossing
void setactualInteractionsPerCrossing(const int &val)
Definition: FPGATrackSimEventInfo.h:58
HepMC::ConstGenVertexPtr
const HepMC::GenVertex * ConstGenVertexPtr
Definition: GenVertex.h:60
InDetDD::SiReadoutCellId
Definition: SiReadoutCellId.h:42
xAOD::TrackParticle_v1
Class describing a TrackParticle.
Definition: TrackParticle_v1.h:43
FPGATrackSimSGToRawHitsTool::getTruthInformation
const HepMcParticleLink * getTruthInformation(InDetSimDataCollection::const_iterator &iter, FPGATrackSimInputUtils::ParentBitmask &parentMask)
Definition: FPGATrackSimSGToRawHitsTool.cxx:819
FPGATrackSimHit::setIdentifier
void setIdentifier(unsigned int v)
Definition: FPGATrackSimHit.h:71
drawFromPickle.sin
sin
Definition: drawFromPickle.py:36
FPGATrackSimHit::setTruth
void setTruth(const FPGATrackSimMultiTruth &v)
Definition: FPGATrackSimHit.h:144
InDetDD::SiDetectorDesign
Definition: SiDetectorDesign.h:50
FPGATrackSimHit::setParentageMask
void setParentageMask(unsigned long v)
Definition: FPGATrackSimHit.h:143
makeTOC.header
header
Definition: makeTOC.py:28
InDetSimData::Deposit
std::pair< HepMcParticleLink, float > Deposit
Definition: InDetSimData.h:48
FPGATrackSimTruthTrack::setBarcode
void setBarcode(const HepMcParticleLink::barcode_type &v)
Definition: FPGATrackSimTruthTrack.h:33
InDetDD::SiDetectorElement::design
virtual const SiDetectorDesign & design() const override final
access to the local description (inline):
PixelID::phi_module
int phi_module(const Identifier &id) const
Definition: PixelID.h:644
FPGATrackSimSGToRawHitsTool::m_stripRDOKey
SG::ReadHandleKey< SCT_RDO_Container > m_stripRDOKey
Definition: FPGATrackSimSGToRawHitsTool.h:70
SG::AllowEmpty
@ AllowEmpty
Definition: StoreGate/StoreGate/VarHandleKey.h:30
FPGATrackSimTruthTrack::setQ
void setQ(int v)
Definition: FPGATrackSimTruthTrack.h:29
FPGATrackSimHit::setBarcodePt
void setBarcodePt(float v)
Definition: FPGATrackSimHit.h:141
FPGATrackSimOfflineTrack::setPhi
void setPhi(double v)
Definition: FPGATrackSimOfflineTrack.h:19
InDet::SiCluster
Definition: InnerDetector/InDetRecEvent/InDetPrepRawData/InDetPrepRawData/SiCluster.h:40
InDetDD::SolidStateDetectorElementBase::identify
virtual Identifier identify() const override final
identifier of this detector element (inline)
Trk::TrackStateOnSurface::Measurement
@ Measurement
This is a measurement, and will at least contain a Trk::MeasurementBase.
Definition: TrackStateOnSurface.h:101
FPGATrackSimTruthTrack::setVtxX
void setVtxX(double v)
Definition: FPGATrackSimTruthTrack.h:22
SiliconTech::pixel
@ pixel
HitType::unmapped
@ unmapped
FPGATrackSimEventInfo::setLB
void setLB(const int &val)
Definition: FPGATrackSimEventInfo.h:59
FPGATrackSimHit::getBarcode
HepMcParticleLink::barcode_type getBarcode() const
Definition: FPGATrackSimHit.h:146
egammaParameters::isPrimary
@ isPrimary
true if matched track has a hit in first or second pixel layer
Definition: egammaParamDefs.h:225
SCT_ID::is_barrel
bool is_barrel(const Identifier &id) const
Test for barrel - WARNING: id MUST be sct id, otherwise answer is not accurate. Use SiliconID for gen...
Definition: SCT_ID.h:721
FPGATrackSimHit::setHitType
void setHitType(HitType type)
Definition: FPGATrackSimHit.h:54
FPGATrackSimSGToRawHitsTool::m_extrapolator
ToolHandle< Trk::IExtrapolator > m_extrapolator
ToolHandle for Extrapolator.
Definition: FPGATrackSimSGToRawHitsTool.h:58
HepMC::signal_process_vertex
GenVertex * signal_process_vertex(const GenEvent *e)
Definition: GenEvent.h:625
Identifier
Definition: IdentifierFieldParser.cxx:14