ATLAS Offline Software
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Modules Pages
FPGATrackSimDataPrepAlg.cxx
Go to the documentation of this file.
1 // Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration
2 
4 
12 
16 
18 
21 
23 
24 #include "GaudiKernel/IEventProcessor.h"
25 
26 
27 constexpr bool enableBenchmark =
28 #ifdef BENCHMARK_LOGICALHITSALG
29  true;
30 #else
31  false;
32 #endif
33 
35 // Initialize
36 
37 FPGATrackSimDataPrepAlg::FPGATrackSimDataPrepAlg (const std::string& name, ISvcLocator* pSvcLocator) :
38  AthAlgorithm(name, pSvcLocator)
39 {
40 }
41 
42 
44 {
45  std::stringstream ss(m_description);
46  std::string line;
47  ATH_MSG_INFO("Tag config:");
48  if (!m_description.empty()) {
49  while (std::getline(ss, line, '\n')) {
50  ATH_MSG_INFO('\t' << line);
51  }
52  }
53 
54 
55  ATH_CHECK(m_hitSGInputTool.retrieve(EnableTool{!m_hitSGInputTool.empty()}));
56 
57  ATH_CHECK(m_hitInputTool.retrieve(EnableTool{!m_hitInputTool.empty()}));
58  ATH_CHECK(m_hitInputTool2.retrieve(EnableTool{m_secondInputToolN > 0 && !m_hitInputTool2.empty()}));
59  ATH_CHECK(m_hitMapTool.retrieve());
60  ATH_CHECK(m_hitFilteringTool.retrieve(EnableTool{m_doHitFiltering}));
61  ATH_CHECK(m_clusteringTool.retrieve(EnableTool{m_clustering > 0}));
62  ATH_CHECK(m_spacepointsTool.retrieve(EnableTool{m_doSpacepoints}));
63 
64  ATH_CHECK(m_writeOutputTool.retrieve());
65  ATH_CHECK(m_FPGATrackSimMapping.retrieve());
66  if ( m_doEvtSel ) {
67  ATH_CHECK(m_evtSel.retrieve());
68  }
69 
70  ATH_MSG_DEBUG("initialize() Instantiating root objects");
72  m_logicEventHeader_cluster = m_writeOutputTool->addInputBranch(m_clusterBranch.value(), true);
73  m_logicEventHeader = m_writeOutputTool->addInputBranch(m_postClusterBranch.value(), true);
74 
75  ATH_MSG_DEBUG("initialize() Setting branch");
76 
77  if (!m_monTool.empty())
78  ATH_CHECK(m_monTool.retrieve());
79 
80  ATH_CHECK( m_FPGAClusterKey.initialize() );
83  ATH_CHECK( m_FPGASpacePointsKey.initialize() );
89 
90  ATH_CHECK( m_chrono.retrieve() );
91  ATH_MSG_DEBUG("initialize() Finished");
92 
93 
94  return StatusCode::SUCCESS;
95 }
96 
97 
99 // MAIN EXECUTE ROUTINE //
101 
103 {
104  const EventContext& ctx = getContext();
105 
106  // Read inputs
107  bool done = false;
108  ATH_CHECK(readInputs(done));
109 
110  if (done) {
111  SmartIF<IEventProcessor> appMgr{service("ApplicationMgr")};
112  if (!appMgr) {
113  ATH_MSG_ERROR("Failed to retrieve ApplicationMgr as IEventProcessor");
114  return StatusCode::FAILURE;
115  }
116  return appMgr->stopRun();
117  }
118 
120  ATH_CHECK( FPGAHits.record (std::make_unique<FPGATrackSimHitCollection>()));
121 
123  ATH_CHECK( FPGAHitUnmapped.record (std::make_unique<FPGATrackSimHitCollection>()));
124 
126  ATH_CHECK( FPGAClusters.record (std::make_unique<FPGATrackSimClusterCollection>()));
127 
129  ATH_CHECK( FPGAClustersFiltered.record (std::make_unique<FPGATrackSimClusterCollection>()));
130 
132  ATH_CHECK( FPGASpacePoints.record (std::make_unique<FPGATrackSimClusterCollection>()));
133 
135  ATH_CHECK(truthLinkVec.record(std::make_unique<xAODTruthParticleLinkVector>()));
136 
138  ATH_CHECK(FPGATruthTracks.record(std::make_unique<FPGATrackSimTruthTrackCollection>()));
139 
141  ATH_CHECK(FPGAOfflineTracks.record(std::make_unique<FPGATrackSimOfflineTrackCollection>()));
142 
143  // Apply truth track cuts
144  if constexpr (enableBenchmark) m_chrono->chronoStart("DataPrep: EventSelection");
145  if ( m_doEvtSel ){
146  if (!m_evtSel->selectEvent(&m_eventHeader))
147  {
148  ATH_MSG_DEBUG("Event skipped by: " << m_evtSel->name());
149  return StatusCode::SUCCESS;
150  }
151  else {
152  ATH_MSG_DEBUG("Event accepted by: " << m_evtSel->name());
153  // Make a new truth link vector based on FPGATrackSim selections
155  SG::ReadHandle<xAOD::TruthParticleContainer> truthParticleContainer(m_inputTruthParticleContainerKey, ctx); // Read offline TruthParticles
156  if (!truthParticleContainer.isValid()) {
157  ATH_MSG_ERROR("No valid truth particle container with key " << truthParticleContainer.key());
158  m_evtSel->setSelectedEvent(false);
159  return StatusCode::FAILURE;
160  }
161  const ElementLink<xAOD::TruthParticleContainer> eltp(*truthParticleContainer, truthParticleContainer->size() - 1);
162  std::vector<FPGATrackSimTruthTrack> const& truthtracks = m_eventHeader.optional().getTruthTracks();
163  for (const xAOD::TruthParticle* truthParticle : *truthParticleContainer) // loop over offline truth particles
164  {
165  for (const FPGATrackSimTruthTrack& fpgaTruthTrack : truthtracks) // loop over FPGA truth tracks
166  {
167  if (fpgaTruthTrack.getBarcode() == static_cast<HepMcParticleLink::barcode_type>(HepMC::barcode(truthParticle)))
168  {
169  truthLinkVec->push_back(new xAODTruthParticleLink(HepMcParticleLink(HepMC::barcode(truthParticle), 0,
171  ATH_MSG_VERBOSE("Truth link added");
172  break;
173  }
174  }
175  }
176  std::stable_sort(truthLinkVec->begin(), truthLinkVec->end(), SortTruthParticleLink());
177  ATH_MSG_VERBOSE("Truth link size: " << truthLinkVec->size());
178  if (truthLinkVec->size() == 0)
179  {
180  ATH_MSG_DEBUG("No truth particles selected. Event skipped...");
181  m_evtSel->setSelectedEvent(false);
182  return StatusCode::SUCCESS;
183  }
184  }
185  }
186  } else {
187  ATH_MSG_DEBUG("No Event Selection applied");
188  }
189 
190  // Event passes cuts, count it
191  m_evt++;
192  if constexpr (enableBenchmark) m_chrono->chronoStop("DataPrep: EventSelection");
193  if constexpr (enableBenchmark) m_chrono->chronoStart("DataPrep: processInputs");
194  // Map, cluster, and filter hits
195  ATH_CHECK(processInputs(FPGAHitUnmapped, FPGAClusters, FPGAClustersFiltered, FPGASpacePoints));
196  if constexpr (enableBenchmark) m_chrono->chronoStop("DataPrep: processInputs");
197 
198  if constexpr (enableBenchmark) m_chrono->chronoStart("DataPrep: get truth/offline tracks");
199  // Now that this is done, push truth tracks back to storegate.
200  for (const auto& truthtrack : m_logicEventHeader->optional().getTruthTracks()) {
201  FPGATruthTracks->push_back(truthtrack);
202  }
203 
204  // Need to do the same for offline tracks.
205  for (const auto& offlineTrack : m_logicEventHeader->optional().getOfflineTracks()) {
206  FPGAOfflineTracks->push_back(offlineTrack);
207  }
208 
209  if constexpr (enableBenchmark) m_chrono->chronoStop("DataPrep: get truth/offline tracks");
210 
211  // Get reference to hits
212  unsigned regionID = m_evtSel->getRegionID();
213  // Recording Data
214  auto mon_regionID = Monitored::Scalar<unsigned>("regionID", regionID);
215  Monitored::Group(m_monTool, mon_regionID);
216 
217  // If and when we set up code to run over more than one region/tower at a time this will need to be updated
218  std::vector<FPGATrackSimHit> const & hits = m_logicEventHeader->towers().at(0).hits();
219 
220  std::vector<std::shared_ptr<const FPGATrackSimHit>> phits;
221  phits.reserve(hits.size());
222  for (FPGATrackSimHit const& h : hits) {
223  if (h.isReal()) phits.emplace_back(std::make_shared<const FPGATrackSimHit>(h));
224  }
225 
226  // this part is needed for tracking
227  for (const auto & hit : phits)
228  FPGAHits->push_back(*hit);
229 
230  auto mon_nhits = Monitored::Scalar<unsigned>("nHits", hits.size());
231  auto mon_nhits_unmapped = Monitored::Scalar<unsigned>("nHits_unmapped", m_hits_miss.size());
232  Monitored::Group(m_monTool, mon_nhits, mon_nhits_unmapped);
233 
234  // Write the output and reset
235  if (m_writeOutputData)
236  ATH_CHECK(m_writeOutputTool->writeData());
237 
238  // Reset data pointers
243 
244  return StatusCode::SUCCESS;
245 }
246 
247 
249 // INPUT PASSING, READING AND PROCESSING //
251 
253 {
254 
255  if ( !m_hitSGInputTool.empty()) {
256  ATH_CHECK(m_hitSGInputTool->readData(&m_eventHeader, Gaudi::Hive::currentContext()));
257  ATH_MSG_DEBUG("Loaded " << m_eventHeader.nHits() << " hits in event header from SG");
258 
259  return StatusCode::SUCCESS;
260  }
261 
262  if (m_ev % m_firstInputToolN == 0)
263  {
264  // Read primary input
265  ATH_CHECK(m_hitInputTool->readData(&m_firstInputHeader, done));
266  if (done)
267  {
268  ATH_MSG_INFO("Cannot read more events from file, returning");
269  return StatusCode::SUCCESS; // end of loop over events
270  }
271  }
272 
274 
275  // Read secondary input
276  for (int i = 0; i < m_secondInputToolN; i++)
277  {
278  ATH_CHECK(m_hitInputTool2->readData(&m_eventHeader, done, false));
279  if (done)
280  {
281  ATH_MSG_INFO("Cannot read more events from file, returning");
282  return StatusCode::SUCCESS;
283  }
284  }
285 
286  m_ev++;
287 
288  return StatusCode::SUCCESS;
289 }
290 
291 
292 // Applies clustering, mapping, hit filtering, and space points
297 {
298  m_clusters.clear();
299  m_spacepoints.clear();
300  m_hits_miss.clear();
301 
302  // Map hits
303  ATH_MSG_DEBUG("Running hits conversion");
308 
309  for (const FPGATrackSimHit& hit : m_hits_miss) FPGAHitUnmapped->push_back(hit);
310 
311 
312 
313  ATH_MSG_DEBUG("Hits conversion done, #unmapped hists = " << m_hits_miss.size());
314  // Random removal of hits
315  if (m_doHitFiltering) {
316  ATH_MSG_DEBUG("Running hits filtering");
317  ATH_CHECK(m_hitFilteringTool->DoRandomRemoval(*m_logicEventHeader, true));
318  }
319 
320  // At this stage, copy the logicEventHeader.
322 
323  // Clustering
324  for (int ic = 0; ic < m_clustering; ic++) {
325  ATH_MSG_DEBUG("Running clustering");
328 
329  // I think I also want to pass m_clusters to random removal (but won't work currently)
330  if (m_doHitFiltering) ATH_CHECK(m_hitFilteringTool->DoRandomRemoval(*m_logicEventHeader, false));
331  unsigned npix(0), nstrip(0);
332  for (const FPGATrackSimCluster& cluster : m_clusters_original) {
333  FPGAClusters->push_back(cluster);
334  if (cluster.getClusterEquiv().isPixel()) npix++;
335  else nstrip++;
336  }
337  m_nPixClusters += npix;
338  m_nStripClusters += nstrip;
339  if (npix > m_nMaxPixClusters) m_nMaxPixClusters = npix;
340  if (nstrip > m_nMaxStripClusters) m_nMaxStripClusters = nstrip;
342  }
343 
344  // At this stage, copy the logicEventHeader.
346 
347  // Filter hits/clusters (untested for hits, ie with m_clustering = false)
348  if (m_doHitFiltering)
349  {
350  // get the sets of layers that we want to filter hits from
351  std::vector<int> filter_pixel_physLayers;
352  std::vector<int> filter_strip_physLayers;
353  const FPGATrackSimPlaneMap *planeMap = m_FPGATrackSimMapping->PlaneMap_1st(0);
354  //TODO This needs to change to deal with multimaps when multi logi layer maps start to use strips
355  //Currntly the maps generated that can use diffrent logical layers for the same phys layers only use the pixles
356  //This code will be updated in the future when maps are made with strips that can use the diffrent logical layers
357  ATH_CHECK(m_hitFilteringTool->GetPairedStripPhysLayers(planeMap, filter_strip_physLayers));
358  m_clusters.clear();
359  ATH_CHECK(m_hitFilteringTool->DoHitFiltering(*m_logicEventHeader, filter_pixel_physLayers, filter_strip_physLayers, m_clusters));
360  for (const FPGATrackSimCluster &cluster : m_clusters) FPGAClustersFiltered->push_back(cluster);
361 
362  }
363 
364  // Space points
365  if (m_doSpacepoints) {
367  for (const FPGATrackSimCluster& cluster : m_spacepoints) FPGASpacePoints->push_back(cluster);
368  }
369 
370 
371  return StatusCode::SUCCESS;
372 }
373 
375 // Finalize
376 
378 {
379  ATH_MSG_INFO("PRINTING FPGATRACKSIM SIMPLE DATAPREP STATS");
380  ATH_MSG_INFO("========================================================================================");
381  ATH_MSG_INFO("Number of pixel clusters/event = " << m_nPixClusters/m_evt);
382  ATH_MSG_INFO("Number of strip clusters/event = " << m_nStripClusters/m_evt);
383  ATH_MSG_INFO("Max number of pixel clusters in an event = " << m_nMaxPixClusters);
384  ATH_MSG_INFO("Max number of strip clusters in an event = " << m_nMaxStripClusters);
385  ATH_MSG_INFO("Max number of clusters in an event = " << m_nMaxClusters);
386 
387  return StatusCode::SUCCESS;
388 }
FPGATrackSimDataPrepAlg::readInputs
StatusCode readInputs(bool &done)
Definition: FPGATrackSimDataPrepAlg.cxx:252
FPGATrackSimDataPrepAlg::m_chrono
ServiceHandle< IChronoStatSvc > m_chrono
Definition: FPGATrackSimDataPrepAlg.h:83
FPGATrackSimDataPrepAlg::m_evt
double m_evt
Definition: FPGATrackSimDataPrepAlg.h:113
checkFileSG.line
line
Definition: checkFileSG.py:75
FPGATrackSimDataPrepAlg::m_monTool
ToolHandle< GenericMonitoringTool > m_monTool
Definition: FPGATrackSimDataPrepAlg.h:128
TrigDefs::Group
Group
Properties of a chain group.
Definition: GroupProperties.h:13
FPGATrackSimDataPrepAlg::m_hitSGInputTool
ToolHandle< IFPGATrackSimInputTool > m_hitSGInputTool
Definition: FPGATrackSimDataPrepAlg.h:72
FPGATrackSimOptionalEventInfo::getOfflineTracks
const std::vector< FPGATrackSimOfflineTrack > & getOfflineTracks() const
Definition: FPGATrackSimOptionalEventInfo.h:32
FPGATrackSimRegionSlices.h
Stores slice definitions for FPGATrackSim regions.
TRTCalib_Extractor.hits
hits
Definition: TRTCalib_Extractor.py:35
FPGATrackSimDataPrepAlg::m_hitInputTool2
ToolHandle< FPGATrackSimReadRawRandomHitsTool > m_hitInputTool2
Definition: FPGATrackSimDataPrepAlg.h:74
FPGATrackSimDataPrepAlg::m_nMaxStripClusters
unsigned m_nMaxStripClusters
Definition: FPGATrackSimDataPrepAlg.h:118
PowhegControl_ttHplus_NLO.ss
ss
Definition: PowhegControl_ttHplus_NLO.py:83
FPGATrackSimDataPrepAlg::initialize
virtual StatusCode initialize() override
Definition: FPGATrackSimDataPrepAlg.cxx:43
FPGATrackSimDataPrepAlg::m_eventHeader
FPGATrackSimEventInputHeader m_eventHeader
Definition: FPGATrackSimDataPrepAlg.h:101
FPGATrackSimDataPrepAlg::m_hitMapTool
ToolHandle< FPGATrackSimRawToLogicalHitsTool > m_hitMapTool
Definition: FPGATrackSimDataPrepAlg.h:75
ATH_MSG_INFO
#define ATH_MSG_INFO(x)
Definition: AthMsgStreamMacros.h:31
FPGATrackSimCluster
Definition: FPGATrackSimCluster.h:24
FPGATrackSimDataPrepAlg::execute
virtual StatusCode execute() override
Definition: FPGATrackSimDataPrepAlg.cxx:102
FPGATrackSimDataPrepAlg::m_logicEventHeader_precluster
FPGATrackSimLogicalEventInputHeader * m_logicEventHeader_precluster
Definition: FPGATrackSimDataPrepAlg.h:103
FPGATrackSimDataPrepAlg::m_useInternalTruthTracks
Gaudi::Property< bool > m_useInternalTruthTracks
Definition: FPGATrackSimDataPrepAlg.h:93
SG::ReadHandle< xAOD::TruthParticleContainer >
FPGATrackSimDataPrepAlg::m_doSpacepoints
Gaudi::Property< bool > m_doSpacepoints
Definition: FPGATrackSimDataPrepAlg.h:90
FPGATrackSimNNTrackTool.h
Utilize NN score to build track candidates.
FPGATrackSimDataPrepAlg::m_logicEventHeader
FPGATrackSimLogicalEventInputHeader * m_logicEventHeader
Definition: FPGATrackSimDataPrepAlg.h:105
FPGATrackSimTruthTrack
Definition: FPGATrackSimTruthTrack.h:14
FPGATrackSimDataPrepAlg::m_ev
int m_ev
Definition: FPGATrackSimDataPrepAlg.h:69
FPGATrackSimReadRawRandomHitsTool.h
FPGATrackSimDataPrepAlg::m_evtSel
ServiceHandle< IFPGATrackSimEventSelectionSvc > m_evtSel
Definition: FPGATrackSimDataPrepAlg.h:81
ATH_MSG_VERBOSE
#define ATH_MSG_VERBOSE(x)
Definition: AthMsgStreamMacros.h:28
FPGATrackSimDataPrepAlg::m_description
std::string m_description
Definition: FPGATrackSimDataPrepAlg.h:68
FPGATrackSimDataPrepAlg::m_FPGAOfflineTrackKey
SG::WriteHandleKey< FPGATrackSimOfflineTrackCollection > m_FPGAOfflineTrackKey
Definition: FPGATrackSimDataPrepAlg.h:141
FPGATrackSimOptionalEventInfo::getTruthTracks
const std::vector< FPGATrackSimTruthTrack > & getTruthTracks() const
Definition: FPGATrackSimOptionalEventInfo.h:37
FPGATrackSimHit
Definition: FPGATrackSimHit.h:41
FPGATrackSimDataPrepAlg::m_FPGAClusterFilteredKey
SG::WriteHandleKey< FPGATrackSimClusterCollection > m_FPGAClusterFilteredKey
Definition: FPGATrackSimDataPrepAlg.h:132
FPGATrackSimEventInputHeader::nHits
int nHits() const
Definition: FPGATrackSimEventInputHeader.h:38
FPGATrackSimRegionMap.h
Maps ITK module indices to FPGATrackSim regions.
FPGATrackSimDataPrepAlg::m_nStripClusters
unsigned long m_nStripClusters
Definition: FPGATrackSimDataPrepAlg.h:117
FPGATrackSimDataPrepAlg::m_writeOutputData
Gaudi::Property< bool > m_writeOutputData
Definition: FPGATrackSimDataPrepAlg.h:91
FPGATrackSimDataPrepAlg::m_hitFilteringTool
ToolHandle< IFPGATrackSimHitFilteringTool > m_hitFilteringTool
Definition: FPGATrackSimDataPrepAlg.h:76
FPGATrackSimDataPrepAlg::m_spacepointsTool
ToolHandle< FPGATrackSimSpacePointsToolI > m_spacepointsTool
Definition: FPGATrackSimDataPrepAlg.h:78
FPGATrackSimDataPrepAlg::m_doEvtSel
Gaudi::Property< bool > m_doEvtSel
Definition: FPGATrackSimDataPrepAlg.h:92
FPGATrackSimLogicalEventInputHeader::optional
FPGATrackSimOptionalEventInfo const & optional() const
Definition: FPGATrackSimLogicalEventInputHeader.h:32
FPGATrackSimDataPrepAlg::m_spacepoints
std::vector< FPGATrackSimCluster > m_spacepoints
Definition: FPGATrackSimDataPrepAlg.h:109
ATH_MSG_ERROR
#define ATH_MSG_ERROR(x)
Definition: AthMsgStreamMacros.h:33
FPGATrackSimDataPrepAlg::m_FPGAHitKey
SG::WriteHandleKey< FPGATrackSimHitCollection > m_FPGAHitKey
Definition: FPGATrackSimDataPrepAlg.h:134
lumiFormat.i
int i
Definition: lumiFormat.py:85
FPGATrackSimDataPrepAlg::m_clusterBranch
Gaudi::Property< std::string > m_clusterBranch
Definition: FPGATrackSimDataPrepAlg.h:97
FPGATrackSimDataPrepAlg::m_nMaxPixClusters
unsigned m_nMaxPixClusters
Definition: FPGATrackSimDataPrepAlg.h:116
FPGATrackSimDataPrepAlg::m_doHitFiltering
Gaudi::Property< bool > m_doHitFiltering
Definition: FPGATrackSimDataPrepAlg.h:88
FPGATrackSimDataPrepAlg::m_FPGAHitUnmappedKey
SG::WriteHandleKey< FPGATrackSimHitCollection > m_FPGAHitUnmappedKey
Definition: FPGATrackSimDataPrepAlg.h:135
FPGATrackSimLogicalEventOutputHeader.h
FPGATrackSimDataPrepAlg::m_clustering
Gaudi::Property< int > m_clustering
Definition: FPGATrackSimDataPrepAlg.h:89
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
ATH_MSG_DEBUG
#define ATH_MSG_DEBUG(x)
Definition: AthMsgStreamMacros.h:29
FPGATrackSimDataPrepAlg::m_inputTruthParticleContainerKey
SG::ReadHandleKey< xAOD::TruthParticleContainer > m_inputTruthParticleContainerKey
Definition: FPGATrackSimDataPrepAlg.h:137
HepMC::barcode
int barcode(const T *p)
Definition: Barcode.h:16
xAOD::TruthParticle_v1
Class describing a truth particle in the MC record.
Definition: TruthParticle_v1.h:37
FPGATrackSimRawToLogicalHitsTool.h
ATH_CHECK
#define ATH_CHECK
Definition: AthCheckMacros.h:40
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
FPGATrackSimDataPrepAlg.h
AthAlgorithm
Definition: AthAlgorithm.h:47
SG::ReadHandle::isValid
virtual bool isValid() override final
Can the handle be successfully dereferenced?
FPGATrackSimLogicalEventInputHeader::reset
void reset()
Definition: FPGATrackSimLogicalEventInputHeader.cxx:10
FPGATrackSimPlaneMap
Definition: FPGATrackSimPlaneMap.h:62
grepfile.ic
int ic
Definition: grepfile.py:33
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:228
FPGATrackSimDataPrepAlg::m_secondInputToolN
Gaudi::Property< int > m_secondInputToolN
Definition: FPGATrackSimDataPrepAlg.h:87
FPGATrackSimDataPrepAlg::m_FPGAClusterKey
SG::WriteHandleKeyArray< FPGATrackSimClusterCollection > m_FPGAClusterKey
Definition: FPGATrackSimDataPrepAlg.h:131
FPGATrackSimHit.h
: FPGATrackSim-specific class to represent an hit in the detector.
DataVector::push_back
value_type push_back(value_type pElem)
Add an element to the end of the collection.
FPGATrackSimDataPrepAlg::m_nMaxClusters
unsigned m_nMaxClusters
Definition: FPGATrackSimDataPrepAlg.h:119
FPGATrackSimDataPrepAlg::m_clusters_original
std::vector< FPGATrackSimCluster > m_clusters_original
Definition: FPGATrackSimDataPrepAlg.h:108
FPGATrackSimOverlapRemovalTool.h
Overlap removal tool for FPGATrackSimTrack.
FPGATrackSimDataPrepAlg::m_writeOutputTool
ToolHandle< FPGATrackSimOutputHeaderTool > m_writeOutputTool
Definition: FPGATrackSimDataPrepAlg.h:79
SG::VarHandleBase::key
virtual const std::string & key() const override final
Return the StoreGate ID for the referenced object.
Definition: AthToolSupport/AsgDataHandles/Root/VarHandleBase.cxx:64
FPGATrackSimEventInputHeader::optional
FPGATrackSimOptionalEventInfo const & optional() const
Definition: FPGATrackSimEventInputHeader.h:34
FPGATrackSimDataPrepAlg::m_clusteringTool
ToolHandle< FPGATrackSimClusteringToolI > m_clusteringTool
Definition: FPGATrackSimDataPrepAlg.h:77
DataVector::end
const_iterator end() const noexcept
Return a const_iterator pointing past the end of the collection.
FPGATrackSimDataPrepAlg::m_preClusterBranch
Gaudi::Property< std::string > m_preClusterBranch
Definition: FPGATrackSimDataPrepAlg.h:96
SG::WriteHandle
Definition: StoreGate/StoreGate/WriteHandle.h:76
FPGATrackSimDataPrepAlg::m_postClusterBranch
Gaudi::Property< std::string > m_postClusterBranch
Definition: FPGATrackSimDataPrepAlg.h:98
h
SG::WriteHandle::record
StatusCode record(std::unique_ptr< T > data)
Record a const object to the store.
FPGATrackSimDataPrepAlg::m_clusters
std::vector< FPGATrackSimCluster > m_clusters
Definition: FPGATrackSimDataPrepAlg.h:108
FPGATrackSimDataPrepAlg::m_truthLinkContainerKey
SG::WriteHandleKey< xAODTruthParticleLinkVector > m_truthLinkContainerKey
Definition: FPGATrackSimDataPrepAlg.h:138
FPGATrackSimDataPrepAlg::m_firstInputToolN
Gaudi::Property< int > m_firstInputToolN
Definition: FPGATrackSimDataPrepAlg.h:86
FPGATrackSimDataPrepAlg::m_FPGATrackSimMapping
ServiceHandle< IFPGATrackSimMappingSvc > m_FPGATrackSimMapping
Definition: FPGATrackSimDataPrepAlg.h:80
FPGATrackSimDataPrepAlg::m_hits_miss
std::vector< FPGATrackSimHit > m_hits_miss
Definition: FPGATrackSimDataPrepAlg.h:110
FPGATrackSimDataPrepAlg::FPGATrackSimDataPrepAlg
FPGATrackSimDataPrepAlg(const std::string &name, ISvcLocator *pSvcLocator)
Definition: FPGATrackSimDataPrepAlg.cxx:37
enableBenchmark
constexpr bool enableBenchmark
Definition: FPGATrackSimDataPrepAlg.cxx:27
FPGATrackSimLogicalEventInputHeader::towers
const std::vector< FPGATrackSimTowerInputHeader > & towers() const
Definition: FPGATrackSimLogicalEventInputHeader.h:36
FPGATrackSimDataPrepAlg::m_hitInputTool
ToolHandle< IFPGATrackSimEventInputHeaderTool > m_hitInputTool
Definition: FPGATrackSimDataPrepAlg.h:73
FPGATrackSimRoad.h
Defines a class for roads.
Monitored::Scalar
Declare a monitored scalar variable.
Definition: MonitoredScalar.h:34
FPGATrackSimDataPrepAlg::m_firstInputHeader
FPGATrackSimEventInputHeader m_firstInputHeader
Definition: FPGATrackSimDataPrepAlg.h:102
FPGATrackSimLogicalEventInputHeader.h
FPGATrackSimEventInputHeader::reset
void reset()
Definition: FPGATrackSimEventInputHeader.cxx:14
FPGATrackSimDataPrepAlg::m_FPGASpacePointsKey
SG::WriteHandleKeyArray< FPGATrackSimClusterCollection > m_FPGASpacePointsKey
Definition: FPGATrackSimDataPrepAlg.h:133
FPGATrackSimDataPrepAlg::processInputs
StatusCode processInputs(SG::WriteHandle< FPGATrackSimHitCollection > &FPGAHitUnmapped, SG::WriteHandle< FPGATrackSimClusterCollection > &FPGAClusters, SG::WriteHandle< FPGATrackSimClusterCollection > &FPGAClustersFiltered, SG::WriteHandle< FPGATrackSimClusterCollection > &FPGASpacePoints)
Definition: FPGATrackSimDataPrepAlg.cxx:293
FPGATrackSimDataPrepAlg::m_logicEventHeader_cluster
FPGATrackSimLogicalEventInputHeader * m_logicEventHeader_cluster
Definition: FPGATrackSimDataPrepAlg.h:104
FPGATrackSimDataPrepAlg::finalize
virtual StatusCode finalize() override
Definition: FPGATrackSimDataPrepAlg.cxx:377
DataVector::size
size_type size() const noexcept
Returns the number of elements in the collection.
FPGATrackSimTrackFitterTool.h
FPGATrackSimDataPrepAlg::m_FPGATruthTrackKey
SG::WriteHandleKey< FPGATrackSimTruthTrackCollection > m_FPGATruthTrackKey
Definition: FPGATrackSimDataPrepAlg.h:140
FPGATrackSimTrackPars.h
Structs that store the 5 track parameters.
FPGATrackSimTrack.h
FPGATrackSimCluster.h
DataVector::begin
const_iterator begin() const noexcept
Return a const_iterator pointing at the beginning of the collection.
FPGATrackSimDataPrepAlg::m_nPixClusters
unsigned long m_nPixClusters
Definition: FPGATrackSimDataPrepAlg.h:115