ATLAS Offline Software
FPGATrackSimLogicalHitsProcessAlg.cxx
Go to the documentation of this file.
1 // Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration
2 
4 
13 
17 
19 
22 
24 
25 #include "GaudiKernel/IEventProcessor.h"
26 
27 #ifdef BENCHMARK_LOGICALHITSALG
28 #define TIME(name) \
29  t_1 = std::chrono::steady_clock::now(); \
30  (name) += std::chrono::duration_cast<std::chrono::microseconds>(t_1 - t_0).count(); \
31  t_0 = t_1;
32 
33 size_t m_tread = 0, m_tprocess = 0, m_troads = 0, m_troad_filter = 0, m_tlrt = 0, m_ttracks = 0, m_tOR = 0, m_t2ndStage = 0, m_tmon = 0, m_tfin = 0;
34 #else
35 #define TIME(name)
36 #endif
37 
38 
40 // Initialize
41 
42 FPGATrackSimLogicalHitsProcessAlg::FPGATrackSimLogicalHitsProcessAlg (const std::string& name, ISvcLocator* pSvcLocator) :
43  AthAlgorithm(name, pSvcLocator)
44 {
45 }
46 
47 
49 {
50  std::stringstream ss(m_description);
51  std::string line;
52  ATH_MSG_INFO("Tag config:");
53  if (!m_description.empty()) {
54  while (std::getline(ss, line, '\n')) {
55  ATH_MSG_INFO('\t' << line);
56  }
57  }
58 
59  ATH_CHECK(m_roadFinderTool.retrieve());
60  ATH_CHECK(m_LRTRoadFilterTool.retrieve(EnableTool{m_doLRT}));
61  ATH_CHECK(m_LRTRoadFinderTool.retrieve(EnableTool{m_doLRT}));
62  ATH_CHECK(m_houghRootOutputTool.retrieve(EnableTool{m_doHoughRootOutput}));
63  ATH_CHECK(m_NNTrackTool.retrieve(EnableTool{m_doNNTrack}));
64  ATH_CHECK(m_roadFilterTool.retrieve(EnableTool{m_filterRoads}));
65  ATH_CHECK(m_roadFilterTool2.retrieve(EnableTool{m_filterRoads2}));
66  if (m_doSpacepoints) ATH_CHECK(m_spRoadFilterTool.retrieve(EnableTool{m_spRoadFilterTool}));
67 
68  ATH_CHECK(m_trackFitterTool_1st.retrieve(EnableTool{m_doTracking}));
70  ATH_CHECK(m_writeOutputTool.retrieve());
71  ATH_CHECK(m_FPGATrackSimMapping.retrieve());
72 
73  ATH_MSG_DEBUG("initialize() Instantiating root objects");
74 
75  // This file should only need to generate one output tool!
76  m_logicEventOutputHeader = m_writeOutputTool->addOutputBranch(m_outputBranch.value(), true);
77 
78  ATH_MSG_DEBUG("initialize() Setting branch");
79 
80  if (!m_monTool.empty())
81  ATH_CHECK(m_monTool.retrieve());
82 
88  ATH_CHECK( m_FPGAHitKey.initialize() );
91 
92  ATH_MSG_DEBUG("initialize() Finished");
93 
94  return StatusCode::SUCCESS;
95 }
96 
97 
99 // MAIN EXECUTE ROUTINE //
101 
103 {
104 #ifdef BENCHMARK_LOGICALHITSALG
105  std::chrono::time_point<std::chrono::steady_clock> t_0, t_1;
107 #endif
108 
109  const EventContext& ctx = getContext();
110 
111  // Get reference to hits from StoreGate.
112  // Hits have been procesed by the DataPrep algorithm. Now, we need to read them.
113  // If they aren't passed, assume this means we are done.
115  if (!FPGAHits.isValid()) {
116  if (m_evt == 0) {
117  ATH_MSG_WARNING("Didn't receive FPGAHits_1st on first event; assuming no input events.");
118  }
119  SmartIF<IEventProcessor> appMgr{service("ApplicationMgr")};
120  if (!appMgr) {
121  ATH_MSG_ERROR("Failed to retrieve ApplicationMgr as IEventProcessor");
122  return StatusCode::FAILURE;
123  }
124  return appMgr->stopRun();
125  }
126 
127  // Set up write handles.
130 
131  ATH_CHECK( FPGARoads_1st.record (std::make_unique<FPGATrackSimRoadCollection>()));
132  ATH_CHECK( FPGAHitsInRoads_1st.record (std::make_unique<FPGATrackSimHitContainer>()));
133 
135  ATH_CHECK(FPGATracks_1stHandle.record (std::make_unique<FPGATrackSimTrackCollection>()));
136 
138  ATH_CHECK( FPGAHitsFiltered_1st.record (std::make_unique<FPGATrackSimHitCollection>()));
139 
140  // Query the event selection service to make sure this event passed cuts.
141  if (!m_evtSel->getSelectedEvent()) {
142  ATH_MSG_DEBUG("Event skipped by: " << m_evtSel->name());
143  return StatusCode::SUCCESS;
144  }
145 
146  // Event passes cuts, count it. technically, DataPrep does this now.
147  m_evt++;
148 
149  // If we get here, FPGAHits_1st is valid, copy it over.
150  std::vector<std::shared_ptr<const FPGATrackSimHit>> phits_1st;
151  phits_1st.reserve(FPGAHits->size());
152  for (const auto& hit : *FPGAHits) {
153  phits_1st.push_back(std::make_shared<const FPGATrackSimHit>(hit));
154  }
155 
156  // Get truth tracks from DataPrep as well.
158  if (!FPGATruthTracks.isValid()) {
159  ATH_MSG_ERROR("Could not find FPGA Truth Track Collection with key " << FPGATruthTracks.key());
160  return StatusCode::FAILURE;
161  }
162 
163  // Same for offline tracks.
165  if (!FPGAOfflineTracks.isValid()) {
166  ATH_MSG_ERROR("Could not find FPGA Offline Track Collection with key " << FPGAOfflineTracks.key());
167  return StatusCode::FAILURE;
168  }
169 
170  // Get roads
171  std::vector<std::shared_ptr<const FPGATrackSimRoad>> prefilter_roads;
172  std::vector<std::shared_ptr<const FPGATrackSimRoad>> roads_1st = prefilter_roads;
173  ATH_CHECK(m_roadFinderTool->getRoads(phits_1st, roads_1st));
174 
175  auto mon_nroads_1st = Monitored::Scalar<unsigned>("nroads_1st", roads_1st.size());
176  for (auto const &road : roads_1st) {
177  unsigned bitmask = road->getHitLayers();
178  for (size_t l = 0; l < m_FPGATrackSimMapping->PlaneMap_1st()->getNLogiLayers(); l++) {
179  if (bitmask & (1 << l)) {
180  auto mon_layerIDs_1st = Monitored::Scalar<unsigned>("layerIDs_1st",l);
181  Monitored::Group(m_monTool,mon_layerIDs_1st);
182  }
183  }
184  }
185  Monitored::Group(m_monTool, mon_nroads_1st);
186 
187  TIME(m_troads);
188  // Standard road Filter
189  std::vector<std::shared_ptr<const FPGATrackSimRoad>> postfilter_roads;
190  if (m_filterRoads)
191  {
192  ATH_CHECK(m_roadFilterTool->filterRoads(roads_1st, postfilter_roads));
193  roads_1st = postfilter_roads;
194  }
195  ATH_CHECK(m_overlapRemovalTool_1st->runOverlapRemoval(roads_1st));
196  // Road Filter2
197  std::vector<std::shared_ptr<const FPGATrackSimRoad>> postfilter2_roads;
198  if (m_filterRoads2) {
199  ATH_CHECK(m_roadFilterTool2->filterRoads(roads_1st, postfilter2_roads));
200  roads_1st = postfilter2_roads;
201  }
202  // Spacepoint road filter tool. Needed when fitting to spacepoints.
203  std::vector<std::shared_ptr<const FPGATrackSimRoad>> postfilter3_roads;
204  if (m_doSpacepoints) {
205  ATH_CHECK(m_spRoadFilterTool->filterRoads(roads_1st, postfilter3_roads));
206  roads_1st = postfilter3_roads;
207  }
208 
209  for (auto const &road:roads_1st){
210  std::vector<FPGATrackSimHit> road_hits;
211  ATH_MSG_DEBUG("Hough Road X Y: " << road->getX() << " " << road->getY());
212  for (size_t l = 0; l < road->getNLayers(); ++l) {
213  for (const auto &layerH : road->getHits(l)) {
214  road_hits.push_back(*layerH);
215  }
216  }
217  FPGAHitsInRoads_1st->push_back(road_hits);
218  FPGARoads_1st->push_back(*road);
219  }
220 
221  auto mon_nroads_1st_postfilter = Monitored::Scalar<unsigned>("nroads_1st_postfilter", roads_1st.size());
222  Monitored::Group(m_monTool, mon_nroads_1st_postfilter);
223 
224  TIME(m_troad_filter);
225  // Get tracks
226  std::vector<FPGATrackSimTrack> tracks_1st;
227  if (m_doTracking) {
228  if (m_doNNTrack) {
229  ATH_MSG_DEBUG("Performing NN tracking");
230  const FPGATrackSimNNMap* nnMap = m_FPGATrackSimMapping->NNMap();
231  ATH_CHECK(m_NNTrackTool->getTracks(roads_1st, tracks_1st, nnMap));
232  }
233  else {
234  ATH_CHECK(m_trackFitterTool_1st->getTracks(roads_1st, tracks_1st));
235  float bestchi2 = 1.e15;
236  for (const FPGATrackSimTrack& track : tracks_1st) {
237  float chi2 = track.getChi2ndof();
238  if (chi2 < bestchi2) bestchi2 = chi2;
239  auto mon_chi2_1st = Monitored::Scalar<float>("chi2_1st_all", chi2);
240  Monitored::Group(m_monTool, mon_chi2_1st);
241  }
242  auto mon_best_chi2_1st = Monitored::Scalar<float>("best_chi2_1st",bestchi2);
243  Monitored::Group(m_monTool,mon_best_chi2_1st);
244  }
245  }
246  else { // we are not doing tracking so get the number of combinations for monitoring
247  int ntrackDummy = 0;
248  for (const std::shared_ptr<const FPGATrackSimRoad>& road : roads_1st) {
249  ntrackDummy += road->getNHitCombos();
250  }
251  tracks_1st.resize(ntrackDummy); // just filled with dummy tracks for monitoring
252  }
253  auto mon_ntracks_1st = Monitored::Scalar<unsigned>("ntrack_1st", tracks_1st.size());
254  Monitored::Group(m_monTool,mon_ntracks_1st);
255 
256  TIME(m_ttracks);
257 
258  // Overlap removal
259  ATH_CHECK(m_overlapRemovalTool_1st->runOverlapRemoval(tracks_1st));
260  unsigned ntrackOLRChi2 = 0;
261  for (const FPGATrackSimTrack& track : tracks_1st) {
262  if (track.getChi2ndof() < m_trackScoreCut) {
264  if (track.passedOR()) {
265  ntrackOLRChi2++;
267 
268  // For tracks passing overlap removal-- record the chi2 so we can figure out the right cut.
269  float chi2olr = track.getChi2ndof();
270  auto mon_chi2_1st_or = Monitored::Scalar<float>("chi2_1st_afterOLR", chi2olr);
271  Monitored::Group(m_monTool, mon_chi2_1st_or);
272  }
273  }
274  }
275  auto mon_ntracks_1st_olr = Monitored::Scalar<unsigned>("ntrack_1st_afterOLR", ntrackOLRChi2);
276  Monitored::Group(m_monTool,mon_ntracks_1st_olr);
277 
278  m_nRoadsTot += roads_1st.size();
279  m_nTracksTot += tracks_1st.size();
280 
281  // Do some simple monitoring of efficiencies. okay, we need truth tracks here.
282  std::vector<FPGATrackSimTruthTrack> truthtracks = *FPGATruthTracks;
283  std::vector<FPGATrackSimOfflineTrack> offlineTracks = *FPGAOfflineTracks;
284  if (truthtracks.size() > 0) {
285  m_evt_truth++;
286  auto passroad = Monitored::Scalar<bool>("eff_road",(roads_1st.size() > 0));
287  auto passtrack = Monitored::Scalar<bool>("eff_track",(tracks_1st.size() > 0));
288  auto truthpT_zoom = Monitored::Scalar<float>("pT_zoom",truthtracks.front().getPt()*0.001);
289  auto truthpT = Monitored::Scalar<float>("pT",truthtracks.front().getPt()*0.001);
290  auto trutheta = Monitored::Scalar<float>("eta",truthtracks.front().getEta());
291  auto truthphi= Monitored::Scalar<float>("phi",truthtracks.front().getPhi());
292  auto truthd0= Monitored::Scalar<float>("d0",truthtracks.front().getD0());
293  auto truthz0= Monitored::Scalar<float>("z0",truthtracks.front().getZ0());
294  if (roads_1st.size() > 0) m_nRoadsFound++;
295  bool passchi2 = false;
296  bool passchi2OLR = false;
297  if (tracks_1st.size() > 0) {
298  m_nTracksFound++;
299  for (const auto& track : tracks_1st) {
300  if (track.getChi2ndof() < 10) {
301  passchi2 = true;
302  if (track.passedOR()) {
303  passchi2OLR = true;
304  break;
305  }
306  }
307  }
308  }
309  if (passchi2) m_nTracksChi2Found++;
310  if (passchi2OLR) m_nTracksChi2OLRFound++;
311  auto passtrackchi2 = Monitored::Scalar<bool>("eff_track_chi2",passchi2);
312  Monitored::Group(m_monTool,passroad,passtrack,truthpT_zoom,truthpT,trutheta,truthphi,truthd0,truthz0,passtrackchi2);
313  }
314 
315  for (const FPGATrackSimTrack& track : tracks_1st) FPGATracks_1stHandle->push_back(track);
316 
317  TIME(m_tOR);
318 
319  // Now, we may want to do large-radius tracking on the hits not used by the first stage tracking.
320  // This follows overlap removal.
321  std::vector<std::shared_ptr<const FPGATrackSimRoad>> roadsLRT;
322  std::vector<FPGATrackSimTrack> tracksLRT; // currently empty
323  if (m_doLRT) {
324  // Filter out hits that are on successful first-stage tracks
325  std::vector<std::shared_ptr<const FPGATrackSimHit>> remainingHits;
326 
327  if (m_doLRTHitFiltering) {
328  ATH_MSG_DEBUG("Doing hit filtering based on prompt tracks.");
329  ATH_CHECK(m_LRTRoadFilterTool->filterUsedHits(tracks_1st, phits_1st, remainingHits));
330 
331  for (const auto &Hit : remainingHits) FPGAHitsFiltered_1st->push_back(*Hit);
332 
333  } else {
334  ATH_MSG_DEBUG("No hit filtering requested; using all hits for LRT.");
335  remainingHits = phits_1st;
336  }
337 
338  // Get LRT roads with remaining hits
339  ATH_MSG_DEBUG("Finding LRT roads");
340  ATH_CHECK(m_LRTRoadFinderTool->getRoads( remainingHits, roadsLRT ));
341  }
342 
343  TIME(m_tlrt);
344 
345  auto dataFlowInfo = std::make_unique<FPGATrackSimDataFlowInfo>();
346 
347  // Write the output and reset
348  if (m_writeOutputData) {
349  ATH_CHECK(writeOutputData(roads_1st, tracks_1st, dataFlowInfo.get()));
350  }
351 
352  // This one we can do-- by passing in truth and offline tracks via storegate above.
353  if (m_doHoughRootOutput) {
354  ATH_CHECK(m_houghRootOutputTool->fillTree(roads_1st, truthtracks, offlineTracks));
355  }
356 
357  // Reset data pointers
359 
360  TIME(m_tfin);
361 
362  return StatusCode::SUCCESS;
363 }
364 
365 
367 // INPUT PASSING, READING AND PROCESSING //
369 
370 StatusCode FPGATrackSimLogicalHitsProcessAlg::writeOutputData( const std::vector<std::shared_ptr<const FPGATrackSimRoad>>& roads_1st,
371  std::vector<FPGATrackSimTrack> const& tracks_1st,
372  FPGATrackSimDataFlowInfo const* dataFlowInfo)
373 {
375 
376  ATH_MSG_DEBUG("NFPGATrackSimRoads_1st = " << roads_1st.size() << ", NFPGATrackSimTracks_1st = " << tracks_1st.size());
377 
378  if (!m_writeOutputData) return StatusCode::SUCCESS;
381  if (m_doTracking) {
384  }
385 
386 
389 
390  // It would be nice to rearrange this so both algorithms use one instance of this tool, I think.
391  // Which means that dataprep can't call writeData because that does Fill().
392  ATH_CHECK(m_writeOutputTool->writeData());
393 
394 
395 
396  return StatusCode::SUCCESS;
397 }
398 
399 
401 // Finalize
402 
404 {
405 #ifdef BENCHMARK_LOGICALHITSALG
406  ATH_MSG_INFO("Timings:" <<
407  "\nroads: " << std::setw(10) << m_troads <<
408  "\nroad filter: " << std::setw(10) << m_troad_filter <<
409  "\nllp: " << std::setw(10) << m_tlrt <<
410  "\ntracks: " << std::setw(10) << m_ttracks <<
411  "\nOR: " << std::setw(10) << m_tOR <<
412  (m_runSecondStage ? : ("\n2ndStage: " << std::setw(10) << m_t2ndStage) : "") <<
413  "\nmon: " << std::setw(10) << m_tmon <<
414  "\nfin: " << std::setw(10) << m_tfin
415  );
416 #endif
417 
418 
419  ATH_MSG_INFO("PRINTING FPGATRACKSIM SIMPLE STATS");
420  ATH_MSG_INFO("========================================================================================");
421  ATH_MSG_INFO("Inclusive efficiency to find a road = " << m_nRoadsFound/m_evt_truth);
422  ATH_MSG_INFO("Inclusive efficiency to find a track = " << m_nTracksFound/m_evt_truth);
423  ATH_MSG_INFO("Inclusive efficiency to find a track passing chi2 = " << m_nTracksChi2Found/m_evt_truth);
424  ATH_MSG_INFO("Inclusive efficiency to find a track passing chi2 and OLR = " << m_nTracksChi2OLRFound/m_evt_truth);
425 
426 
427  ATH_MSG_INFO("Number of 1st stage roads/event = " << m_nRoadsTot/m_evt);
428  ATH_MSG_INFO("Number of 1st stage track combinations/event = " << m_nTracksTot/m_evt);
429  ATH_MSG_INFO("Number of 1st stage tracks passing chi2/event = " << m_nTracksChi2Tot/m_evt);
430  ATH_MSG_INFO("Number of 1st stage tracks passing chi2 and OLR/event = " << m_nTracksChi2OLRTot/m_evt);
431  ATH_MSG_INFO("========================================================================================");
432 
433  return StatusCode::SUCCESS;
434 }
435 
436 
438 // Helpers
439 
440 void FPGATrackSimLogicalHitsProcessAlg::printHitSubregions(std::vector<FPGATrackSimHit> const & hits)
441 {
442  ATH_MSG_WARNING("Hit regions:");
443  for (auto hit : hits)
444  {
445  std::vector<uint32_t> regions = m_FPGATrackSimMapping->SubRegionMap()->getRegions(hit);
446  std::stringstream ss;
447  for (auto r : regions)
448  ss << r << ",";
449  ATH_MSG_WARNING("\t[" << ss.str() << "]");
450  }
451 }
FPGATrackSimLogicalHitsProcessAlg::m_doSpacepoints
Gaudi::Property< bool > m_doSpacepoints
Definition: FPGATrackSimLogicalHitsProcessAlg.h:94
FPGATrackSimLogicalHitsProcessAlg::m_filterRoads
Gaudi::Property< bool > m_filterRoads
Definition: FPGATrackSimLogicalHitsProcessAlg.h:97
beamspotman.r
def r
Definition: beamspotman.py:676
checkFileSG.line
line
Definition: checkFileSG.py:75
FPGATrackSimLogicalHitsProcessAlg::m_writeOutputTool
ToolHandle< FPGATrackSimOutputHeaderTool > m_writeOutputTool
Definition: FPGATrackSimLogicalHitsProcessAlg.h:89
TrigDefs::Group
Group
Properties of a chain group.
Definition: GroupProperties.h:13
FPGATrackSimRegionSlices.h
Stores slice definitions for FPGATrackSim regions.
FPGATrackSimLogicalHitsProcessAlg::m_LRTRoadFinderTool
ToolHandle< IFPGATrackSimRoadFinderTool > m_LRTRoadFinderTool
Definition: FPGATrackSimLogicalHitsProcessAlg.h:81
TRTCalib_Extractor.hits
hits
Definition: TRTCalib_Extractor.py:35
FPGATrackSimLogicalHitsProcessAlg::m_description
std::string m_description
Definition: FPGATrackSimLogicalHitsProcessAlg.h:76
PowhegControl_ttHplus_NLO.ss
ss
Definition: PowhegControl_ttHplus_NLO.py:83
FPGATrackSimLogicalHitsProcessAlg::m_logicEventOutputHeader
FPGATrackSimLogicalEventOutputHeader * m_logicEventOutputHeader
Definition: FPGATrackSimLogicalHitsProcessAlg.h:111
FPGATrackSimLogicalHitsProcessAlg::m_FPGARoadKey
SG::WriteHandleKey< FPGATrackSimRoadCollection > m_FPGARoadKey
Definition: FPGATrackSimLogicalHitsProcessAlg.h:143
ATH_MSG_INFO
#define ATH_MSG_INFO(x)
Definition: AthMsgStreamMacros.h:31
FPGATrackSimLogicalHitsProcessAlg::m_nTracksTot
long m_nTracksTot
Definition: FPGATrackSimLogicalHitsProcessAlg.h:119
FPGATrackSimLogicalHitsProcessAlg::m_FPGAHitInRoadsKey
SG::WriteHandleKey< FPGATrackSimHitContainer > m_FPGAHitInRoadsKey
Definition: FPGATrackSimLogicalHitsProcessAlg.h:142
FPGATrackSimTrack
Definition: FPGATrackSimTrack.h:18
SG::ReadHandle
Definition: StoreGate/StoreGate/ReadHandle.h:70
FPGATrackSimLogicalEventOutputHeader::reserveFPGATrackSimRoads_1st
void reserveFPGATrackSimRoads_1st(size_t size)
Definition: FPGATrackSimLogicalEventOutputHeader.h:24
FPGATrackSimNNTrackTool.h
Utilize NN score to build track candidates.
FPGATrackSimLogicalHitsProcessAlg::m_LRTRoadFilterTool
ToolHandle< FPGATrackSimLLPRoadFilterTool > m_LRTRoadFilterTool
Definition: FPGATrackSimLogicalHitsProcessAlg.h:80
FPGATrackSimLogicalHitsProcessAlg::m_doTracking
Gaudi::Property< bool > m_doTracking
Definition: FPGATrackSimLogicalHitsProcessAlg.h:95
FPGATrackSimLogicalHitsProcessAlg::FPGATrackSimLogicalHitsProcessAlg
FPGATrackSimLogicalHitsProcessAlg(const std::string &name, ISvcLocator *pSvcLocator)
Definition: FPGATrackSimLogicalHitsProcessAlg.cxx:42
FPGATrackSimLogicalHitsProcessAlg::m_FPGATruthTrackKey
SG::ReadHandleKey< FPGATrackSimTruthTrackCollection > m_FPGATruthTrackKey
Definition: FPGATrackSimLogicalHitsProcessAlg.h:147
FPGATrackSimLogicalHitsProcessAlg::m_evtSel
ServiceHandle< IFPGATrackSimEventSelectionSvc > m_evtSel
Definition: FPGATrackSimLogicalHitsProcessAlg.h:91
FPGATrackSimLogicalEventOutputHeader::reset
void reset()
Definition: FPGATrackSimLogicalEventOutputHeader.cxx:12
FPGATrackSimLogicalHitsProcessAlg::m_writeOutputData
Gaudi::Property< bool > m_writeOutputData
Definition: FPGATrackSimLogicalHitsProcessAlg.h:103
UploadAMITag.l
list l
Definition: UploadAMITag.larcaf.py:158
FPGATrackSimReadRawRandomHitsTool.h
FPGATrackSimLogicalHitsProcessAlg::m_overlapRemovalTool_1st
ToolHandle< FPGATrackSimOverlapRemovalTool > m_overlapRemovalTool_1st
Definition: FPGATrackSimLogicalHitsProcessAlg.h:88
FPGATrackSimLogicalHitsProcessAlg::m_FPGAHitFilteredKey
SG::WriteHandleKey< FPGATrackSimHitCollection > m_FPGAHitFilteredKey
Definition: FPGATrackSimLogicalHitsProcessAlg.h:141
FPGATrackSimLogicalHitsProcessAlg::m_FPGAOfflineTrackKey
SG::ReadHandleKey< FPGATrackSimOfflineTrackCollection > m_FPGAOfflineTrackKey
Definition: FPGATrackSimLogicalHitsProcessAlg.h:148
FPGATrackSimLogicalHitsProcessAlg::m_doNNTrack
Gaudi::Property< bool > m_doNNTrack
Definition: FPGATrackSimLogicalHitsProcessAlg.h:100
FPGATrackSimLogicalHitsProcessAlg::m_FPGATrackKey
SG::WriteHandleKey< FPGATrackSimTrackCollection > m_FPGATrackKey
Definition: FPGATrackSimLogicalHitsProcessAlg.h:144
FPGATrackSimLogicalHitsProcessAlg::m_evt_truth
double m_evt_truth
Definition: FPGATrackSimLogicalHitsProcessAlg.h:123
FPGATrackSimLogicalHitsProcessAlg::m_monTool
ToolHandle< GenericMonitoringTool > m_monTool
Definition: FPGATrackSimLogicalHitsProcessAlg.h:135
FPGATrackSimLogicalEventOutputHeader::getDataFlowInfo
FPGATrackSimDataFlowInfo const & getDataFlowInfo() const
Definition: FPGATrackSimLogicalEventOutputHeader.h:47
FPGATrackSimLogicalHitsProcessAlg::m_runOnRDO
Gaudi::Property< bool > m_runOnRDO
Definition: FPGATrackSimLogicalHitsProcessAlg.h:104
FPGATrackSimLogicalHitsProcessAlg::m_doHoughRootOutput
Gaudi::Property< bool > m_doHoughRootOutput
Definition: FPGATrackSimLogicalHitsProcessAlg.h:99
FPGATrackSimLogicalHitsProcessAlg::m_evt
double m_evt
Definition: FPGATrackSimLogicalHitsProcessAlg.h:117
FPGATrackSimRegionMap.h
Maps ITK module indices to FPGATrackSim regions.
FPGATrackSimLogicalHitsProcessAlg::m_trackScoreCut
Gaudi::Property< float > m_trackScoreCut
Definition: FPGATrackSimLogicalHitsProcessAlg.h:105
FPGATrackSimLogicalHitsProcessAlg::m_doLRTHitFiltering
Gaudi::Property< bool > m_doLRTHitFiltering
Definition: FPGATrackSimLogicalHitsProcessAlg.h:102
FPGATrackSimLogicalHitsProcessAlg::m_roadFilterTool2
ToolHandle< IFPGATrackSimRoadFilterTool > m_roadFilterTool2
Definition: FPGATrackSimLogicalHitsProcessAlg.h:83
Hit
Definition: Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloGpu/ISF_FastCaloGpu/Hit.h:16
python.handimod.now
now
Definition: handimod.py:675
FPGATrackSimDataFlowInfo
Definition: FPGATrackSimDataFlowInfo.h:18
ATH_MSG_ERROR
#define ATH_MSG_ERROR(x)
Definition: AthMsgStreamMacros.h:33
FPGATrackSimLogicalEventOutputHeader::reserveFPGATrackSimTracks_1st
void reserveFPGATrackSimTracks_1st(size_t size)
Definition: FPGATrackSimLogicalEventOutputHeader.h:37
FPGATrackSimLogicalHitsProcessAlg::m_roadFinderTool
ToolHandle< IFPGATrackSimRoadFinderTool > m_roadFinderTool
Definition: FPGATrackSimLogicalHitsProcessAlg.h:79
FPGATrackSimLogicalEventOutputHeader.h
FPGATrackSimLogicalHitsProcessAlg::execute
virtual StatusCode execute() override
Definition: FPGATrackSimLogicalHitsProcessAlg.cxx:102
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
FPGATrackSimLogicalEventOutputHeader::addFPGATrackSimRoads_1st
void addFPGATrackSimRoads_1st(const std::vector< std::shared_ptr< const FPGATrackSimRoad >> &roads_1st)
Definition: FPGATrackSimLogicalEventOutputHeader.h:25
ATH_MSG_DEBUG
#define ATH_MSG_DEBUG(x)
Definition: AthMsgStreamMacros.h:29
FPGATrackSimDataFlowInfo.h
Structs that store the data flow information per event.
FPGATrackSimRawToLogicalHitsTool.h
chi2
double chi2(TH1 *h0, TH1 *h1)
Definition: comparitor.cxx:522
ATH_CHECK
#define ATH_CHECK
Definition: AthCheckMacros.h:40
FPGATrackSimNNMap
Definition: FPGATrackSimNNMap.h:27
FPGATrackSimLogicalHitsProcessAlg::writeOutputData
StatusCode writeOutputData(const std::vector< std::shared_ptr< const FPGATrackSimRoad >> &roads_1st, std::vector< FPGATrackSimTrack > const &tracks_1st, FPGATrackSimDataFlowInfo const *dataFlowInfo)
Definition: FPGATrackSimLogicalHitsProcessAlg.cxx:370
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
FPGATrackSimLogicalEventOutputHeader::setDataFlowInfo
void setDataFlowInfo(FPGATrackSimDataFlowInfo const &info)
Definition: FPGATrackSimLogicalEventOutputHeader.h:48
AthAlgorithm
Definition: AthAlgorithm.h:47
SG::ReadHandle::isValid
virtual bool isValid() override final
Can the handle be successfully dereferenced?
FPGATrackSimLogicalHitsProcessAlg::m_nTracksFound
long m_nTracksFound
Definition: FPGATrackSimLogicalHitsProcessAlg.h:125
FPGATrackSimLogicalHitsProcessAlg::m_nTracksChi2Tot
long m_nTracksChi2Tot
Definition: FPGATrackSimLogicalHitsProcessAlg.h:120
FPGATrackSimLogicalHitsProcessAlg::m_nTracksChi2OLRFound
long m_nTracksChi2OLRFound
Definition: FPGATrackSimLogicalHitsProcessAlg.h:127
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:221
FPGATrackSimLogicalHitsProcessAlg::m_spRoadFilterTool
ToolHandle< IFPGATrackSimRoadFilterTool > m_spRoadFilterTool
Definition: FPGATrackSimLogicalHitsProcessAlg.h:84
FPGATrackSimLogicalEventOutputHeader::addFPGATrackSimTracks_1st
void addFPGATrackSimTracks_1st(std::vector< FPGATrackSimTrack > const &tracks_1st)
Definition: FPGATrackSimLogicalEventOutputHeader.h:38
FPGATrackSimLogicalHitsProcessAlg::m_inputTruthParticleContainerKey
SG::ReadHandleKey< xAOD::TruthParticleContainer > m_inputTruthParticleContainerKey
Definition: FPGATrackSimLogicalHitsProcessAlg.h:146
TIME
#define TIME(name)
Definition: FPGATrackSimLogicalHitsProcessAlg.cxx:35
FPGATrackSimLogicalHitsProcessAlg::printHitSubregions
void printHitSubregions(std::vector< FPGATrackSimHit > const &hits)
Definition: FPGATrackSimLogicalHitsProcessAlg.cxx:440
FPGATrackSimHit.h
: FPGATrackSim-specific class to represent an hit in the detector.
FPGATrackSimOverlapRemovalTool.h
Overlap removal tool for FPGATrackSimTrack.
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
FPGATrackSimLogicalHitsProcessAlg::finalize
virtual StatusCode finalize() override
Definition: FPGATrackSimLogicalHitsProcessAlg.cxx:403
FPGATrackSimLogicalHitsProcessAlg.h
FPGATrackSimLogicalHitsProcessAlg::m_trackFitterTool_1st
ToolHandle< FPGATrackSimTrackFitterTool > m_trackFitterTool_1st
Definition: FPGATrackSimLogicalHitsProcessAlg.h:87
FPGATrackSimLogicalHitsProcessAlg::m_nTracksChi2Found
long m_nTracksChi2Found
Definition: FPGATrackSimLogicalHitsProcessAlg.h:126
SG::WriteHandle
Definition: StoreGate/StoreGate/WriteHandle.h:76
FPGATrackSimLogicalHitsProcessAlg::m_nRoadsTot
long m_nRoadsTot
Definition: FPGATrackSimLogicalHitsProcessAlg.h:118
FPGATrackSimLogicalHitsProcessAlg::m_nTracksChi2OLRTot
long m_nTracksChi2OLRTot
Definition: FPGATrackSimLogicalHitsProcessAlg.h:121
SG::WriteHandle::record
StatusCode record(std::unique_ptr< T > data)
Record a const object to the store.
FPGATrackSimLogicalHitsProcessAlg::m_roadFilterTool
ToolHandle< IFPGATrackSimRoadFilterTool > m_roadFilterTool
Definition: FPGATrackSimLogicalHitsProcessAlg.h:82
ATH_MSG_WARNING
#define ATH_MSG_WARNING(x)
Definition: AthMsgStreamMacros.h:32
FPGATrackSimLogicalHitsProcessAlg::m_doLRT
Gaudi::Property< bool > m_doLRT
Definition: FPGATrackSimLogicalHitsProcessAlg.h:101
FPGATrackSimLogicalHitsProcessAlg::m_nRoadsFound
long m_nRoadsFound
Definition: FPGATrackSimLogicalHitsProcessAlg.h:124
FPGATrackSimLogicalHitsProcessAlg::initialize
virtual StatusCode initialize() override
Definition: FPGATrackSimLogicalHitsProcessAlg.cxx:48
xAOD::track
@ track
Definition: TrackingPrimitives.h:512
FPGATrackSimRoad.h
Defines a class for roads.
Monitored::Scalar
Declare a monitored scalar variable.
Definition: MonitoredScalar.h:34
FPGATrackSimLogicalEventInputHeader.h
FPGATrackSimLogicalHitsProcessAlg::m_filterRoads2
Gaudi::Property< bool > m_filterRoads2
Definition: FPGATrackSimLogicalHitsProcessAlg.h:98
FPGATrackSimLogicalHitsProcessAlg::m_outputBranch
Gaudi::Property< std::string > m_outputBranch
Definition: FPGATrackSimLogicalHitsProcessAlg.h:108
FPGATrackSimLogicalHitsProcessAlg::m_FPGAHitKey
SG::ReadHandleKeyArray< FPGATrackSimHitCollection > m_FPGAHitKey
Definition: FPGATrackSimLogicalHitsProcessAlg.h:138
FPGATrackSimLogicalHitsProcessAlg::m_NNTrackTool
ToolHandle< FPGATrackSimNNTrackTool > m_NNTrackTool
Definition: FPGATrackSimLogicalHitsProcessAlg.h:85
FPGATrackSimTrackFitterTool.h
FPGATrackSimTrackPars.h
Structs that store the 5 track parameters.
FPGATrackSimLogicalHitsProcessAlg::m_houghRootOutputTool
ToolHandle< FPGATrackSimHoughRootOutputTool > m_houghRootOutputTool
Definition: FPGATrackSimLogicalHitsProcessAlg.h:86
FPGATrackSimTrack.h
FPGATrackSimCluster.h
FPGATrackSimLogicalHitsProcessAlg::m_FPGATrackSimMapping
ServiceHandle< IFPGATrackSimMappingSvc > m_FPGATrackSimMapping
Definition: FPGATrackSimLogicalHitsProcessAlg.h:90