Loading [MathJax]/extensions/tex2jax.js
ATLAS Offline Software
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Modules Pages
FPGATrackSimSGToRawHitsTool.cxx
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration
3 */
4 
5 
12 
13 #include "StoreGate/DataHandle.h"
14 
24 
27 
29 
30 #include "AtlasHepMC/GenEvent.h"
31 #include "AtlasHepMC/GenVertex.h"
32 #include "AtlasHepMC/GenParticle.h"
34 
36 
37 #include "GaudiKernel/IPartPropSvc.h"
39 
40 #include <bitset>
41 
42 
43 namespace {
44  // A few constants for truth cuts
45  const float FPGATrackSim_PT_TRUTHMIN = 400.;
46  const float FPGATrackSim_Z_TRUTHMIN = 2300.;
47 }
48 
49 FPGATrackSimSGToRawHitsTool::FPGATrackSimSGToRawHitsTool(const std::string& algname, const std::string& name, const IInterface* ifc) :
50  base_class(algname, name, ifc)
51 {}
52 
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 
81 
82  ATH_MSG_DEBUG("Initialization complete");
83  return StatusCode::SUCCESS;
84 }
85 
86 
88  return StatusCode::SUCCESS;
89 }
90 
91 
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 }
141 
142 
143 StatusCode FPGATrackSimSGToRawHitsTool::readOfflineTracks(std::vector<FPGATrackSimOfflineTrack>& offline, const EventContext& eventContext)
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 }
205 
206 
207 
208 // dump silicon channels with geant matching information.
210 FPGATrackSimSGToRawHitsTool::readRawSilicon(HitIndexMap& hitIndexMap, const EventContext& eventContext) // const cannot make variables push back to DataInput
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 }
220 
221 
223 FPGATrackSimSGToRawHitsTool::readPixelSimulation(HitIndexMap& hitIndexMap, unsigned int& hitIndex, const EventContext& eventContext) {
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.setPhiCoord(localPos[0]);
289  tmpSGhit.setEtaCoord(localPos[1]);
290  tmpSGhit.setEtaWidth(0);
291  tmpSGhit.setPhiWidth(0);
292  tmpSGhit.setX(globalPos[Amg::x]);
293  tmpSGhit.setY(globalPos[Amg::y]);
294  tmpSGhit.setZ(globalPos[Amg::z]);
295  tmpSGhit.setToT(pixelRawData->getToT());
296  tmpSGhit.setisValidForITkHit(true); // Pixel clusters are close enough right now that they all can be considered valid for ITK
297  if (bestParent) {
298  tmpSGhit.setEventIndex(bestTruthLink->eventIndex());
299  tmpSGhit.setBarcode(bestTruthLink->barcode()); // FIXME barcode-based
300  tmpSGhit.setUniqueID(bestTruthLink->id()); // May need fixing when uid will be used.
301  }
302  else {
306  }
307 
308  tmpSGhit.setBarcodePt(static_cast<unsigned long>(std::ceil(bestParent ? bestParent->momentum().perp() : 0.)));
309  tmpSGhit.setParentageMask(parentMask.to_ulong());
310 
311  // Add truth
313  FPGATrackSimMultiTruth::Barcode uniqueID(tmpSGhit.getEventIndex(), tmpSGhit.getBarcode()); // FIXME barcode-based
314  mt.maximize(uniqueID, tmpSGhit.getBarcodePt()); // FIXME barcode-based
315  tmpSGhit.setTruth(mt);
316 
317  m_eventHeader->addHit(tmpSGhit);
318  } // end for each RDO in the collection
319  } // for each pixel RDO collection
320 
321  return StatusCode::SUCCESS;
322 }
323 
325 FPGATrackSimSGToRawHitsTool::readStripSimulation(HitIndexMap& hitIndexMap, unsigned int& hitIndex, const EventContext& eventContext) {
326 
327  constexpr int MaxChannelinStripRow = 128;
328 
329  auto stripSDOHandle = SG::makeHandle(m_stripSDOKey, eventContext);
330  ATH_MSG_DEBUG("Found SCT SDO Map");
331  auto stripRDOHandle = SG::makeHandle(m_stripRDOKey, eventContext);
332  for (const InDetRawDataCollection<SCT_RDORawData>* SCT_Collection : *stripRDOHandle) {
333  if (SCT_Collection == nullptr) { continue; }
334 
335  std::map<int, bool> firedStrips;
336  // Preprocess the SCT collection hits to get information for encoding strip in ITK format
337  // All strips fired read into a map to an overview of full module that should be used to encode
338  // the data into the ITk formatl
339  for (const SCT_RDORawData* sctRawData : *SCT_Collection)
340  {
341  const Identifier rdoId = sctRawData->identify();
342  const int baseLineStrip{m_sctId->strip(rdoId)};
343  for(int i = 0; i < sctRawData->getGroupSize(); i++) {
344  firedStrips[baseLineStrip+ i] = true;
345  }
346  }
347 
348  // Loop over the fired hits and encode them in the ITk strips hit map
349  // It find unique hits in the list that can be encoded and don't overlap
350  std::map<int, int> stripEncodingForITK;
351  for(auto& [stripID, fired]: firedStrips)
352  {
353  // Don't use the strip that has been set false.
354  // This will be the case where neighbouring strip will "used up in the cluster"
355  // And then we don't want to re use them
356  if(!fired) continue;
357 
358  // Check the next 3 hits if they are there and have a hit in them
359  std::bitset<3> hitMap;
360 
361 
362  // Get the current chip id of the strip
363  int currChipID = stripID / MaxChannelinStripRow;
364  // Compute the maximum stripID this chip can have
365  int maxStripIDForCurrChip = (currChipID + 1) * MaxChannelinStripRow;
366 
367  for(int i = 0; i < 3; i++)
368  {
369  // We don't want to "cluster" strips that are outside the range of this chip
370  if((stripID + 1 + i) >= maxStripIDForCurrChip) continue;
371 
372  if(firedStrips.find(stripID + 1 + i) != firedStrips.end())
373  {
374  if(firedStrips.at(stripID + 1 + i))
375  {
376  hitMap[2 - i] = 1;
377  firedStrips[stripID + 1 + i] = false;
378  }
379  else
380  {
381  hitMap[2 - i] = 0;
382  }
383  }
384  }
385 
386  // Encode the hit map into a int
387  stripEncodingForITK[stripID] = (int)(hitMap.to_ulong());
388 
389  }
390 
391  // Actual creation of the FPGAHit objects
392  for (const SCT_RDORawData* sctRawData : *SCT_Collection)
393  {
394  const Identifier rdoId = sctRawData->identify();
395  // get the det element from the det element collection
396  const InDetDD::SiDetectorElement* sielement = m_SCT_mgr->getDetectorElement(rdoId);
397  Amg::Vector2D localPos = sielement->rawLocalPositionOfCell(rdoId);
398  std::pair<Amg::Vector3D, Amg::Vector3D> endsOfStrip = sielement->endsOfStrip(localPos);
399 
400  hitIndexMap[rdoId] = hitIndex;
401  ++hitIndex;
402  // if there is simulation truth available, try to retrieve the
403  // "most likely" barcode for this strip.
405  const HepMcParticleLink* bestTruthLink{};
406  if (!m_stripSDOKey.empty()) {
407  InDetSimDataCollection::const_iterator iter(stripSDOHandle->find(rdoId));
408  // if SDO found for this strip, associate the particle
409  if (iter != stripSDOHandle->end()) { bestTruthLink = getTruthInformation(iter, parentMask); }
410  } // end if sct truth available
411  HepMC::ConstGenParticlePtr bestParent = (bestTruthLink) ? bestTruthLink->cptr() : nullptr;
412  // push back the hit information to DataInput for HitList , copy from RawInput.cxx
413 
414  FPGATrackSimHit tmpSGhit;
415  tmpSGhit.setHitType(HitType::unmapped);
416  tmpSGhit.setDetType(SiliconTech::strip);
417  tmpSGhit.setIdentifierHash(sielement->identifyHash());
418  tmpSGhit.setIdentifier(sielement->identify().get_identifier32().get_compact());
419 
420  int barrel_ec = m_sctId->barrel_ec(rdoId);
421  if (barrel_ec == 0)
423  else if (barrel_ec == 2)
425  else if (barrel_ec == -2)
427 
428  tmpSGhit.setLayerDisk(m_sctId->layer_disk(rdoId));
429  tmpSGhit.setPhiModule(m_sctId->phi_module(rdoId));
430  tmpSGhit.setEtaModule(m_sctId->eta_module(rdoId));
431  tmpSGhit.setPhiIndex(m_sctId->strip(rdoId));
432  tmpSGhit.setEtaIndex(m_sctId->row(rdoId));
433  tmpSGhit.setPhiCoord(localPos[0]);
434  tmpSGhit.setEtaCoord(localPos[1]);
435  tmpSGhit.setSide(m_sctId->side(rdoId));
436  tmpSGhit.setEtaWidth(sctRawData->getGroupSize());
437  tmpSGhit.setPhiWidth(0);
438  if (bestParent) {
439  tmpSGhit.setEventIndex(bestTruthLink->eventIndex());
440  tmpSGhit.setBarcode(bestTruthLink->barcode()); // FIXME barcode-based
441  tmpSGhit.setUniqueID(bestTruthLink->id());
442  }
443  else {
447  }
448 
449  // If the strip has been identified by the previous for loop as a valid hit that can be encoded into ITk Strip format
450  int stripID = m_sctId->strip(rdoId);
451  if(stripEncodingForITK.find(stripID) != stripEncodingForITK.end())
452  {
453  // 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
454  // for the Strip ID, it is the remainder left after dividing by 128
455  int chipID = stripID / MaxChannelinStripRow;
456  int ITkStripID = stripID % MaxChannelinStripRow;
457 
458  // for each ABC chip readout, each reads 256 channels actually. 0-127 corresponds to lower row and then 128-255 corresponds to the
459  // upper. This can be simulated in the code by using the eta module index. Even index are not offest, while odd index, the
460  // strip id is offest by 128
461  // 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
462  int offset = m_sctId->eta_module(rdoId) % 2;
463  if(m_sctId->barrel_ec(rdoId) == 0) offset = (std::abs(m_sctId->eta_module(rdoId)) - 1) % 2;
464 
465  ITkStripID += offset * MaxChannelinStripRow;
466 
467  tmpSGhit.setisValidForITkHit(true);
468  tmpSGhit.setStripRowIDForITk(ITkStripID);
469  tmpSGhit.setStripChipIDForITk(chipID);
470  tmpSGhit.setStripHitMapForITk(stripEncodingForITK.at(stripID));
471  }
472 
473  tmpSGhit.setBarcodePt(static_cast<unsigned long>(std::ceil(bestParent ? bestParent->momentum().perp() : 0.)));
474  tmpSGhit.setParentageMask(parentMask.to_ulong());
475  tmpSGhit.setX(0.5 * (endsOfStrip.first.x() + endsOfStrip.second.x()));
476  tmpSGhit.setY(0.5 * (endsOfStrip.first.y() + endsOfStrip.second.y()));
477  tmpSGhit.setZ(0.5 * (endsOfStrip.first.z() + endsOfStrip.second.z()));
478 
479  // Add truth
481  FPGATrackSimMultiTruth::Barcode uniqueID(tmpSGhit.getEventIndex(), tmpSGhit.getBarcode()); // FIXME barcode-based
482  mt.maximize(uniqueID, tmpSGhit.getBarcodePt()); // FIMXE barcode-based
483  tmpSGhit.setTruth(mt);
484 
485  m_eventHeader->addHit(tmpSGhit);
486  } // end for each RDO in the strip collection
487  } // end for each strip RDO collection
488  // dump all RDO's and SDO's for a given event, for debugging purposes
489 
490  return StatusCode::SUCCESS;
491 }
492 
493 
495 FPGATrackSimSGToRawHitsTool::dumpPixelClusters(HitIndexMap& pixelClusterIndexMap, const EventContext& eventContext) {
496  unsigned int pixelClusterIndex = 0;
497  auto pixelSDOHandle = SG::makeHandle(m_pixelSDOKey, eventContext);
498  auto pixelClusterContainerHandle = SG::makeHandle(m_pixelClusterContainerKey, eventContext);
499  // Dump pixel clusters. They're in m_pixelContainer
500  for (const InDet::SiClusterCollection* pixelClusterCollection : *pixelClusterContainerHandle) {
501  if (pixelClusterCollection == nullptr) {
502  ATH_MSG_DEBUG("pixelClusterCollection not available!");
503  continue;
504  }
505 
506  for (const InDet::SiCluster* cluster : *pixelClusterCollection) {
507  Identifier theId = cluster->identify();
508  // if there is simulation truth available, try to retrieve the "most likely" barcode for this pixel cluster.
509  FPGATrackSimInputUtils::ParentBitmask parentMask; // FIXME set, but not used
510  if (!m_pixelSDOKey.empty()) {
511  for (const Identifier& rdoId : cluster->rdoList()) {
512  const InDetDD::SiDetectorElement* sielement = m_PIX_mgr->getDetectorElement(rdoId);
513  assert(sielement);
514  InDetDD::SiCellId cellID = sielement->cellIdFromIdentifier(rdoId);
515 
516  const int nCells = sielement->numberOfConnectedCells(cellID);
517  InDetSimDataCollection::const_iterator iter(pixelSDOHandle->find(rdoId));
518  // this might be the ganged pixel copy.
519  if (nCells > 1 && iter == pixelSDOHandle->end()) {
521  for (int ii = 0; ii < nCells && iter == pixelSDOHandle->end(); ++ii) {
522  iter = pixelSDOHandle->find(sielement->identifierFromCellId(sielement->design().connectedCell(SiRC, ii)));
523  }
524  } // end search for correct ganged pixel
525  // if SDO found for this pixel, associate the particle. otherwise leave unassociated.
526  if (iter != pixelSDOHandle->end()) { (void) getTruthInformation(iter, parentMask); } // FIXME not used??
527  } // if we have pixel sdo's available
528  }
529  pixelClusterIndexMap[theId] = pixelClusterIndex;
530  pixelClusterIndex++;
531  } // End loop over pixel clusters
532  } // End loop over pixel cluster collection
533 
534  return StatusCode::SUCCESS;
535 }
536 
538 FPGATrackSimSGToRawHitsTool::readOfflineClusters(std::vector <FPGATrackSimCluster>& clusters, const EventContext& eventContext)
539 {
540 
541  //Lets do the Pixel clusters first
542  //Loopover the pixel clusters and convert them into a FPGATrackSimCluster for storage
543  // Dump pixel clusters. They're in m_pixelContainer
544  auto pixelSDOHandle = SG::makeHandle(m_pixelSDOKey, eventContext);
545  auto pixelClusterContainerHandler = SG::makeHandle(m_pixelClusterContainerKey, eventContext);
546  for (const InDet::SiClusterCollection* pixelClusterCollection : *pixelClusterContainerHandler) {
547  if (pixelClusterCollection == nullptr) {
548  ATH_MSG_DEBUG("pixelClusterCollection not available!");
549  continue;
550  }
551  const int size = pixelClusterCollection->size();
552  ATH_MSG_DEBUG("PixelClusterCollection found with " << size << " clusters");
553  for (const InDet::SiCluster* cluster : *pixelClusterCollection) {
554 
555  // if there is simulation truth available, try to retrieve the "most likely" barcode for this pixel cluster.
557  const HepMcParticleLink* bestTruthLink{};
558  if (!m_pixelSDOKey.empty()) {
559  for (const Identifier& rdoId : cluster->rdoList()) {
560  const InDetDD::SiDetectorElement* sielement = m_PIX_mgr->getDetectorElement(rdoId);
561  assert(sielement);
562  InDetDD::SiCellId cellID = sielement->cellIdFromIdentifier(rdoId);
563  const int nCells = sielement->numberOfConnectedCells(cellID);
564  InDetSimDataCollection::const_iterator iter(pixelSDOHandle->find(rdoId));
565  // this might be the ganged pixel copy.
566  if (nCells > 1 && iter == pixelSDOHandle->end()) {
568  for (int ii = 0; ii < nCells && iter == pixelSDOHandle->end(); ++ii) {
569  iter = pixelSDOHandle->find(sielement->identifierFromCellId(sielement->design().connectedCell(SiRC, ii)));
570  }
571  } // end search for correct ganged pixel
572  // if SDO found for this pixel, associate the particle. otherwise leave unassociated.
573  if (iter != pixelSDOHandle->end()) { bestTruthLink = getTruthInformation(iter, parentMask); }
574  } // if we have pixel sdo's available
575  }
576  HepMC::ConstGenParticlePtr bestParent = (bestTruthLink) ? bestTruthLink->cptr() : nullptr;
577 
578  Identifier theID = cluster->identify();
579  //cluster object to be written out
580  FPGATrackSimCluster clusterOut;
581  //Rawhit object to represent the cluster
582  FPGATrackSimHit clusterEquiv;
583  //Lets get the information of this pixel cluster
584  const InDetDD::SiDetectorElement* sielement = m_PIX_mgr->getDetectorElement(theID);
585  assert(sielement);
586  const InDetDD::SiLocalPosition localPos = sielement->rawLocalPositionOfCell(theID);
587  const Amg::Vector3D globalPos(sielement->globalPosition(localPos));
588  clusterEquiv.setHitType(HitType::clustered);
589  clusterEquiv.setX(globalPos.x());
590  clusterEquiv.setY(globalPos.y());
591  clusterEquiv.setZ(globalPos.z());
592  clusterEquiv.setDetType(SiliconTech::pixel);
593  clusterEquiv.setIdentifierHash(sielement->identifyHash());
594  clusterEquiv.setIdentifier(sielement->identify().get_identifier32().get_compact());
595 
596  int barrel_ec = m_pixelId->barrel_ec(theID);
597  if (barrel_ec == 0)
599  else if (barrel_ec == 2)
601  else if (barrel_ec == -2)
603 
604  clusterEquiv.setLayerDisk(m_pixelId->layer_disk(theID));
605  clusterEquiv.setPhiModule(m_pixelId->phi_module(theID));
606  clusterEquiv.setEtaModule(m_pixelId->eta_module(theID));
607  clusterEquiv.setPhiIndex(m_pixelId->phi_index(theID));
608  clusterEquiv.setEtaIndex(m_pixelId->eta_index(theID));
609  clusterEquiv.setPhiCoord(localPos.xPhi());
610  clusterEquiv.setEtaCoord(localPos.xEta());
611 
612  clusterEquiv.setPhiWidth(cluster->width().colRow()[1]);
613  clusterEquiv.setEtaWidth(cluster->width().colRow()[0]);
614  //Save the truth here as the MultiTruth object is only transient
615  if (bestParent) {
616  clusterEquiv.setEventIndex(bestTruthLink->eventIndex());
617  clusterEquiv.setBarcode(bestTruthLink->barcode()); // FIXME barcode-based
618  clusterEquiv.setUniqueID(bestTruthLink->id());
619  }
620  else {
624  }
625 
626  clusterEquiv.setBarcodePt(static_cast<unsigned long>(std::ceil(bestParent ? bestParent->momentum().perp() : 0.)));
627  clusterEquiv.setParentageMask(parentMask.to_ulong());
628  clusterOut.setClusterEquiv(clusterEquiv);
629  clusters.push_back(clusterOut);
630  }
631  }
632 
633  //Now lets do the strip clusters
634  //Loopover the pixel clusters and convert them into a FPGATrackSimCluster for storage
635  // Dump pixel clusters. They're in m_pixelContainer
636  auto stripSDOHandle = SG::makeHandle(m_stripSDOKey, eventContext);
637  ATH_MSG_DEBUG("Found SCT SDO Map");
638  auto stripRDOHandle = SG::makeHandle(m_stripRDOKey, eventContext);
639 
640  for (const InDetRawDataCollection<SCT_RDORawData>* SCT_Collection : *stripRDOHandle) {
641  if (SCT_Collection == nullptr) { continue; }
642  for (const SCT_RDORawData* sctRawData : *SCT_Collection) {
643  const Identifier rdoId = sctRawData->identify();
644  // get the det element from the det element collection
645  const InDetDD::SiDetectorElement* sielement = m_SCT_mgr->getDetectorElement(rdoId);
646  const InDetDD::SiDetectorDesign& design = dynamic_cast<const InDetDD::SiDetectorDesign&>(sielement->design());
647  const InDetDD::SiLocalPosition localPos = design.localPositionOfCell(m_sctId->strip(rdoId));
648  const Amg::Vector3D gPos = sielement->globalPosition(localPos);
649  // if there is simulation truth available, try to retrieve the
650  // "most likely" barcode for this strip.
652  const HepMcParticleLink* bestTruthLink{};
653  if (!m_stripSDOKey.empty()) {
654  InDetSimDataCollection::const_iterator iter(stripSDOHandle->find(rdoId));
655  // if SDO found for this pixel, associate the particle
656  if (iter != stripSDOHandle->end()) { bestTruthLink = getTruthInformation(iter, parentMask); }
657  } // end if sct truth available
658  HepMC::ConstGenParticlePtr bestParent = (bestTruthLink) ? bestTruthLink->cptr() : nullptr;
659 
660  // push back the hit information to DataInput for HitList , copy from RawInput.cxx
661  FPGATrackSimCluster clusterOut;
662  FPGATrackSimHit clusterEquiv;
663  clusterEquiv.setHitType(HitType::clustered);
664  clusterEquiv.setX(gPos.x());
665  clusterEquiv.setY(gPos.y());
666  clusterEquiv.setZ(gPos.z());
667  clusterEquiv.setDetType(SiliconTech::strip);
668  clusterEquiv.setIdentifierHash(sielement->identifyHash());
669  clusterEquiv.setIdentifier(sielement->identify().get_identifier32().get_compact());
670 
671  int barrel_ec = m_sctId->barrel_ec(rdoId);
672  if (barrel_ec == 0)
674  else if (barrel_ec == 2)
676  else if (barrel_ec == -2)
678 
679  clusterEquiv.setLayerDisk(m_sctId->layer_disk(rdoId));
680  clusterEquiv.setPhiModule(m_sctId->phi_module(rdoId));
681  clusterEquiv.setEtaModule(m_sctId->eta_module(rdoId));
682  clusterEquiv.setPhiIndex(m_sctId->strip(rdoId));
683  clusterEquiv.setEtaIndex(m_sctId->row(rdoId));
684  clusterEquiv.setPhiCoord(localPos.xPhi());
685  clusterEquiv.setEtaCoord(localPos.xEta());
686  clusterEquiv.setSide(m_sctId->side(rdoId));
687  //I think this is the strip "cluster" width
688  clusterEquiv.setPhiWidth(sctRawData->getGroupSize());
689  //Save the truth here as the MultiTruth object is only transient
690  if (bestParent) {
691  clusterEquiv.setEventIndex(bestTruthLink->eventIndex());
692  clusterEquiv.setBarcode(bestTruthLink->barcode()); // FIXME barcode-based
693  clusterEquiv.setUniqueID(bestTruthLink->id());
694  }
695  else {
699  }
700 
701  clusterEquiv.setBarcodePt(static_cast<unsigned long>(std::ceil(bestParent ? bestParent->momentum().perp() : 0.)));
702  clusterEquiv.setParentageMask(parentMask.to_ulong());
703  clusterOut.setClusterEquiv(clusterEquiv);
704  clusters.push_back(clusterOut);
705  } // end for each RDO in the strip collection
706  } // end for each strip RDO collection
707  // dump all RDO's and SDO's for a given event, for debugging purposes
708 
709  return StatusCode::SUCCESS;
710 }
711 
713 FPGATrackSimSGToRawHitsTool::readTruthTracks(std::vector <FPGATrackSimTruthTrack>& truth, const EventContext& eventContext)
714 {
715  auto simTracksHandle = SG::makeHandle(m_mcCollectionKey, eventContext);
716  ATH_MSG_DEBUG("Dump truth tracks, size " << simTracksHandle->size());
717 
718  // dump each truth track
719  for (unsigned int ievt = 0; ievt < simTracksHandle->size(); ++ievt) {
720  const HepMC::GenEvent* genEvent = simTracksHandle->at(ievt);
721  // retrieve the primary interaction vertex here. for now, use the dummy origin.
722  HepGeom::Point3D<double> primaryVtx(0., 0., 0.);
723  // the event should have signal process vertex unless it was generated as single particles.
724  // if it exists, use it for the primary vertex.
726  if (spv) {
727  primaryVtx.set(spv->position().x(),
728  spv->position().y(),
729  spv->position().z());
730  ATH_MSG_DEBUG("using signal process vertex for eventIndex " << ievt << ":"
731  << primaryVtx.x() << "\t" << primaryVtx.y() << "\t" << primaryVtx.z());
732  }
733  for (const auto& particle: *genEvent) {
734  const int pdgcode = particle->pdg_id();
735  // reject generated particles without a production vertex.
736  if (particle->production_vertex() == nullptr) {
737  continue;
738  }
739  // reject neutral or unstable particles
740  const HepPDT::ParticleData* pd = m_particleDataTable->particle(abs(pdgcode));
741  if (pd == nullptr) {
742  continue;
743  }
744  float charge = pd->charge();
745  if (pdgcode < 0) charge *= -1.; // since we took absolute value above
746  if (std::abs(charge) < 0.5) {
747  continue;
748  }
749  if (!MC::isStable(particle)) {
750  continue;
751  }
752  // truth-to-track tool
753  const Amg::Vector3D momentum(particle->momentum().px(), particle->momentum().py(), particle->momentum().pz());
754  const Amg::Vector3D position(particle->production_vertex()->position().x(), particle->production_vertex()->position().y(), particle->production_vertex()->position().z());
755  const Trk::CurvilinearParameters cParameters(position, momentum, charge);
756  Trk::PerigeeSurface persf;
757  if (m_UseNominalOrigin) {
758  Amg::Vector3D origin(0, 0, 0);
759  persf = Trk::PerigeeSurface(origin);
760  }
761  else {
762  SG::ReadCondHandle<InDet::BeamSpotData> beamSpotHandle{ m_beamSpotKey, eventContext };
763  Trk::PerigeeSurface persf(beamSpotHandle->beamPos());
764  }
765  const std::unique_ptr<Trk::TrackParameters> tP = m_extrapolator->extrapolate(eventContext, cParameters, persf, Trk::anyDirection, false);
766  const double track_truth_d0 = tP ? tP->parameters()[Trk::d0] : 999.;
767  const double track_truth_phi = tP ? tP->parameters()[Trk::phi] : 999.;
768  const double track_truth_p = (tP && fabs(tP->parameters()[Trk::qOverP]) > 1.e-8) ?
769  tP->charge() / tP->parameters()[Trk::qOverP] : 10E7;
770  const double track_truth_x0 = tP ? tP->position().x() : 999.;
771  const double track_truth_y0 = tP ? tP->position().y() : 999.;
772  const double track_truth_z0 = tP ? tP->parameters()[Trk::z0] : 999.;
773  const double track_truth_q = tP ? tP->charge() : 0.;
774  const double track_truth_sinphi = tP ? std::sin(tP->parameters()[Trk::phi]) : -1.;
775  const double track_truth_cosphi = tP ? std::cos(tP->parameters()[Trk::phi]) : -1.;
776  const double track_truth_sintheta = tP ? std::sin(tP->parameters()[Trk::theta]) : -1.;
777  const double track_truth_costheta = tP ? std::cos(tP->parameters()[Trk::theta]) : -1.;
778  double truth_d0corr = track_truth_d0 - (primaryVtx.y() * cos(track_truth_phi) - primaryVtx.x() * sin(track_truth_phi));
779  double truth_zvertex = 0.;
780  const HepGeom::Point3D<double> startVertex(particle->production_vertex()->position().x(), particle->production_vertex()->position().y(), particle->production_vertex()->position().z());
781  // categorize particle (prompt, secondary, etc.) based on InDetPerformanceRTT/detector paper criteria.
782  bool isPrimary = true;
783  if (std::abs(truth_d0corr) > 2.) { isPrimary = false; }
784  const int bc = HepMC::barcode(particle); // FIXME update barcode-based syntax
785  const int uid = HepMC::uniqueID(particle);
786  if (HepMC::is_simulation_particle(particle) || bc == 0) { isPrimary = false; } // FIXME update barcode-based syntax
787  if (isPrimary && particle->production_vertex()) {
788  const HepGeom::Point3D<double> startVertex(particle->production_vertex()->position().x(), particle->production_vertex()->position().y(), particle->production_vertex()->position().z());
789  if (std::abs(startVertex.z() - truth_zvertex) > 100.) { isPrimary = false; }
790  if (particle->end_vertex()) {
791  HepGeom::Point3D<double> endVertex(particle->end_vertex()->position().x(), particle->end_vertex()->position().y(), particle->end_vertex()->position().z());
792  if (endVertex.perp() < FPGATrackSim_PT_TRUTHMIN && std::abs(endVertex.z()) < FPGATrackSim_Z_TRUTHMIN) { isPrimary = false; }
793  }
794  }
795  else {
796  isPrimary = false;
797  }
798 
800 
801  FPGATrackSimTruthTrack tmpSGTrack;
802  tmpSGTrack.setVtxX(track_truth_x0);
803  tmpSGTrack.setVtxY(track_truth_y0);
804  tmpSGTrack.setVtxZ(track_truth_z0);
805  tmpSGTrack.setD0(track_truth_d0);
806  tmpSGTrack.setZ0(track_truth_z0);
807  tmpSGTrack.setVtxZ(primaryVtx.z());
808  tmpSGTrack.setQ(track_truth_q);
809  tmpSGTrack.setPX(track_truth_p * (track_truth_cosphi * track_truth_sintheta));
810  tmpSGTrack.setPY(track_truth_p * (track_truth_sinphi * track_truth_sintheta));
811  tmpSGTrack.setPZ(track_truth_p * track_truth_costheta);
812  tmpSGTrack.setPDGCode(pdgcode);
813  tmpSGTrack.setStatus(particle->status());
814 
815  tmpSGTrack.setBarcode(truthLink2.barcode());
816  tmpSGTrack.setUniqueID(truthLink2.id());
817  tmpSGTrack.setEventIndex(truthLink2.eventIndex());
818 
819  truth.push_back(tmpSGTrack);
820  } // end for each GenParticle in this GenEvent
821  } // end for each GenEvent
822 
823 
824  return StatusCode::SUCCESS;
825 }
826 
827 
828 const HepMcParticleLink* FPGATrackSimSGToRawHitsTool::getTruthInformation(InDetSimDataCollection::const_iterator& iter,
830  const HepMcParticleLink* bestTruthLink{};
831  const InDetSimData& sdo(iter->second);
832  const std::vector<InDetSimData::Deposit>& deposits(sdo.getdeposits());
833  float bestPt{-999.f};
834  for (const InDetSimData::Deposit& dep : deposits) {
835 
836  const HepMcParticleLink& particleLink = dep.first;
837  // RDO's without SDO's are delta rays or detector noise.
838  if (!particleLink.isValid()) { continue; }
839  const float genEta = particleLink->momentum().pseudoRapidity();
840  const float genPt = particleLink->momentum().perp(); // MeV
841  // reject unstable particles
842  if (!MC::isStable(particleLink.cptr())) { continue; }
843  // reject secondaries and low pT (<400 MeV) pileup
844  if (HepMC::is_simulation_particle(particleLink.cptr()) || particleLink.barcode() == 0 /*HepMC::no_truth_link(particleLink)*/) { continue; } // FIXME
845  // reject far forward particles
846  if (std::fabs(genEta) > m_maxEta) { continue; }
847  // "bestTruthLink" links to the highest pt particle
848  if (bestPt < genPt) {
849  bestPt = genPt;
850  bestTruthLink = &particleLink;
851  }
852  #ifdef HEPMC3
853  parentMask |= FPGATrackSimInputUtils::construct_truth_bitmap(std::shared_ptr<const HepMC3::GenParticle>(particleLink.cptr()));
854  #else
855  parentMask |= FPGATrackSimInputUtils::construct_truth_bitmap(particleLink.cptr());
856  #endif
857  // check SDO
858  } // end for each contributing particle
859  return bestTruthLink;
860 }
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:158
FPGATrackSimOfflineTrack::addHit
void addHit(const FPGATrackSimOfflineHit &s)
Definition: FPGATrackSimOfflineTrack.h:37
FPGATrackSimSGToRawHitsTool::m_readTruthTracks
Gaudi::Property< bool > m_readTruthTracks
Definition: FPGATrackSimSGToRawHitsTool.h:80
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
GenEvent.h
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
header
Definition: hcg.cxx:526
TrackParameters.h
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:177
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
InDetSimData::getdeposits
const std::vector< Deposit > & getdeposits() const
Definition: InDetSimData.h:74
FPGATrackSimCluster
Definition: FPGATrackSimCluster.h:24
FPGATrackSimEventInfo::setBCID
void setBCID(const int &val)
Definition: FPGATrackSimEventInfo.h:60
FPGATrackSimHit::setEtaIndex
void setEtaIndex(unsigned v)
Definition: FPGATrackSimHit.h:102
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:176
FPGATrackSimHit::setPhiCoord
void setPhiCoord(float v)
Definition: FPGATrackSimHit.h:105
FPGATrackSimHit::setIdentifierHash
void setIdentifierHash(unsigned v)
Definition: FPGATrackSimHit.h:72
max
constexpr double max()
Definition: ap_fixedTest.cxx:33
FPGATrackSimTruthTrack
Definition: FPGATrackSimTruthTrack.h:14
PixelSimHelper.h
GenVertex.h
FPGATrackSimOfflineTrack.h
FPGATrackSimHit::getBarcodePt
float getBarcodePt() const
Definition: FPGATrackSimHit.h:159
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:495
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:713
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
SiClusterOnTrack.h
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
IdDictManager.h
FPGATrackSimHit::setY
void setY(float v)
Definition: FPGATrackSimHit.h:138
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
InDetRawDataContainer.h
FPGATrackSimHit::setDetectorZone
void setDetectorZone(DetectorZone detZone)
Definition: FPGATrackSimHit.h:56
DataHandle.h
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
GenParticle.h
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:274
InDetDD::SiLocalPosition::xPhi
double xPhi() const
position along phi direction:
Definition: SiLocalPosition.h:123
FPGATrackSimHit::setUniqueID
void setUniqueID(const HepMcParticleLink::barcode_type &v)
Definition: FPGATrackSimHit.h:150
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:137
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:148
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
SiReadoutCellId.h
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:101
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:355
xAOD::nCells
setRawEt setRawPhi nCells
Definition: TrigCaloCluster_v1.cxx:33
lumiFormat.i
int i
Definition: lumiFormat.py:85
InDetDD::SiLocalPosition::xEta
double xEta() const
position along eta direction:
Definition: SiLocalPosition.h:118
Trk::theta
@ theta
Definition: ParamDefs.h:66
FPGATrackSimOfflineHit::setLocY
void setLocY(float locy)
Definition: FPGATrackSimOfflineHit.h:18
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
FPGATrackSimEventInputHeader::addHit
void addHit(FPGATrackSimHit const &s)
Definition: FPGATrackSimEventInputHeader.h:39
FPGATrackSimEventInfo.h
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:179
FPGATrackSimSGToRawHitsTool::m_SCT_mgr
const InDetDD::SiDetectorManager * m_SCT_mgr
Definition: FPGATrackSimSGToRawHitsTool.h:91
python.LArMinBiasAlgConfig.int
int
Definition: LArMinBiasAlgConfig.py:59
FPGATrackSimHit::setEtaModule
void setEtaModule(int v)
Definition: FPGATrackSimHit.h:76
FPGATrackSimOfflineHit.h
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
FPGATrackSimHit::setEtaCoord
void setEtaCoord(float v)
Definition: FPGATrackSimHit.h:106
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:116
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
FPGATrackSimEventInputHeader
Definition: FPGATrackSimEventInputHeader.h:22
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:149
FPGATrackSimHit::setPhiModule
void setPhiModule(unsigned v)
Definition: FPGATrackSimHit.h:77
DataVector< const Trk::TrackStateOnSurface >
SCT_SimHelper.h
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
FPGATrackSimEventInputHeader.h
FPGATrackSimSGToRawHitsTool::finalize
virtual StatusCode finalize() override
Definition: FPGATrackSimSGToRawHitsTool.cxx:87
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:228
Trk::d0
@ d0
Definition: ParamDefs.h:63
FPGATrackSimOfflineTrack::setEta
void setEta(double v)
Definition: FPGATrackSimOfflineTrack.h:18
SiClusterCollection.h
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:325
FPGATrackSimHit.h
: FPGATrackSim-specific class to represent an hit in the detector.
charge
double charge(const T &p)
Definition: AtlasPID.h:897
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:538
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:152
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:139
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
FPGATrackSimSGToRawHitsTool.h
DetectorZone::negEndcap
@ negEndcap
FPGATrackSimEventInfo::setaverageInteractionsPerCrossing
void setaverageInteractionsPerCrossing(const int &val)
Definition: FPGATrackSimEventInfo.h:57
SiClusterContainer.h
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
FPGATrackSimSGToRawHitsTool::FPGATrackSimSGToRawHitsTool
FPGATrackSimSGToRawHitsTool(const std::string &, const std::string &, const IInterface *)
Definition: FPGATrackSimSGToRawHitsTool.cxx:49
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
InDetRawDataCollection.h
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:178
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:828
FPGATrackSimHit::setIdentifier
void setIdentifier(unsigned int v)
Definition: FPGATrackSimHit.h:71
drawFromPickle.sin
sin
Definition: drawFromPickle.py:36
InDetRawDataCLASS_DEF.h
FPGATrackSimHit::setTruth
void setTruth(const FPGATrackSimMultiTruth &v)
Definition: FPGATrackSimHit.h:154
InDetDD::SiDetectorDesign
Definition: SiDetectorDesign.h:50
FPGATrackSimHit::setParentageMask
void setParentageMask(unsigned long v)
Definition: FPGATrackSimHit.h:153
makeTOC.header
header
Definition: makeTOC.py:28
InDetSimData::Deposit
std::pair< HepMcParticleLink, float > Deposit
Definition: InDetSimData.h:48
FPGATrackSimSGToRawHitsTool::initialize
virtual StatusCode initialize() override
Definition: FPGATrackSimSGToRawHitsTool.cxx:53
FPGATrackSimTruthTrack::setBarcode
void setBarcode(const HepMcParticleLink::barcode_type &v)
Definition: FPGATrackSimTruthTrack.h:33
SiCellId.h
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
FPGATrackSimSGToRawHitsTool::readData
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 simulati...
Definition: FPGATrackSimSGToRawHitsTool.cxx:94
FPGATrackSimTruthTrack.h
FPGATrackSimHit::setBarcodePt
void setBarcodePt(float v)
Definition: FPGATrackSimHit.h:151
FPGATrackSimOfflineTrack::setPhi
void setPhi(double v)
Definition: FPGATrackSimOfflineTrack.h:19
SiDetectorDesign.h
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
HepMCHelpers.h
HitType::unmapped
@ unmapped
FPGATrackSimEventInfo::setLB
void setLB(const int &val)
Definition: FPGATrackSimEventInfo.h:59
FPGATrackSimHit::getBarcode
HepMcParticleLink::barcode_type getBarcode() const
Definition: FPGATrackSimHit.h:156
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