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  ATH_CHECK(m_roadFinderTool.retrieve());
59  ATH_CHECK(m_LRTRoadFilterTool.retrieve(EnableTool{m_doLRT}));
60  ATH_CHECK(m_LRTRoadFinderTool.retrieve(EnableTool{m_doLRT}));
61  ATH_CHECK(m_houghRootOutputTool.retrieve(EnableTool{m_doHoughRootOutput}));
62  ATH_CHECK(m_NNTrackTool.retrieve(EnableTool{m_doNNTrack}));
63  ATH_CHECK(m_roadFilterTool.retrieve(EnableTool{m_filterRoads}));
64  ATH_CHECK(m_roadFilterTool2.retrieve(EnableTool{m_filterRoads2}));
65  if (m_doSpacepoints) ATH_CHECK(m_spRoadFilterTool.retrieve(EnableTool{m_spRoadFilterTool}));
66 
67  ATH_CHECK(m_trackFitterTool_1st.retrieve(EnableTool{m_doTracking}));
69  ATH_CHECK(m_writeOutputTool.retrieve());
70  ATH_CHECK(m_FPGATrackSimMapping.retrieve());
71 
72  ATH_MSG_DEBUG("initialize() Instantiating root objects");
73 
74  // This file should only need to generate one input and output branch.
75  m_slicedHitHeader = m_writeOutputTool->addInputBranch(m_sliceBranch.value(), true);
76  m_logicEventOutputHeader = m_writeOutputTool->addOutputBranch(m_outputBranch.value(), true);
77 
78  // Connect the road union tool accordingly.
79  m_roadFinderTool->setupSlices(m_slicedHitHeader);
80 
81  ATH_MSG_DEBUG("initialize() Setting branch");
82 
83  if (!m_monTool.empty())
84  ATH_CHECK(m_monTool.retrieve());
85 
91  ATH_CHECK( m_FPGAHitKey.initialize() );
94 
95  ATH_MSG_DEBUG("initialize() Finished");
96 
97  return StatusCode::SUCCESS;
98 }
99 
100 
102 // MAIN EXECUTE ROUTINE //
104 
106 {
107 #ifdef BENCHMARK_LOGICALHITSALG
108  std::chrono::time_point<std::chrono::steady_clock> t_0, t_1;
110 #endif
111  const EventContext& ctx = getContext();
112 
113  // Get reference to hits from StoreGate.
114  // Hits have been procesed by the DataPrep algorithm. Now, we need to read them.
115  // If they aren't passed, assume this means we are done.
117  if (!FPGAHits.isValid()) {
118  if (m_evt == 0) {
119  ATH_MSG_WARNING("Didn't receive FPGAHits_1st on first event; assuming no input events.");
120  }
121  SmartIF<IEventProcessor> appMgr{service("ApplicationMgr")};
122  if (!appMgr) {
123  ATH_MSG_ERROR("Failed to retrieve ApplicationMgr as IEventProcessor");
124  return StatusCode::FAILURE;
125  }
126  return appMgr->stopRun();
127  }
128 
129  // Set up write handles.
132 
133  ATH_CHECK( FPGARoads_1st.record (std::make_unique<FPGATrackSimRoadCollection>()));
134  ATH_CHECK( FPGAHitsInRoads_1st.record (std::make_unique<FPGATrackSimHitContainer>()));
135 
137  ATH_CHECK(FPGATracks_1stHandle.record (std::make_unique<FPGATrackSimTrackCollection>()));
138 
140  ATH_CHECK( FPGAHitsFiltered_1st.record (std::make_unique<FPGATrackSimHitCollection>()));
141 
142  // Query the event selection service to make sure this event passed cuts.
143  if (!m_evtSel->getSelectedEvent()) {
144  ATH_MSG_DEBUG("Event skipped by: " << m_evtSel->name());
145  return StatusCode::SUCCESS;
146  }
147 
148  // Event passes cuts, count it. technically, DataPrep does this now.
149  m_evt++;
150 
151  // If we get here, FPGAHits_1st is valid, copy it over.
152  std::vector<std::shared_ptr<const FPGATrackSimHit>> phits_1st;
153  phits_1st.reserve(FPGAHits->size());
154  for (const auto& hit : *FPGAHits) {
155  phits_1st.push_back(std::make_shared<const FPGATrackSimHit>(hit));
156  }
157 
158  // Get truth tracks from DataPrep as well.
160  if (!FPGATruthTracks.isValid()) {
161  ATH_MSG_ERROR("Could not find FPGA Truth Track Collection with key " << FPGATruthTracks.key());
162  return StatusCode::FAILURE;
163  }
164 
165  // Same for offline tracks.
167  if (!FPGAOfflineTracks.isValid()) {
168  ATH_MSG_ERROR("Could not find FPGA Offline Track Collection with key " << FPGAOfflineTracks.key());
169  return StatusCode::FAILURE;
170  }
171 
172  // Get roads
173  std::vector<std::shared_ptr<const FPGATrackSimRoad>> prefilter_roads;
174  std::vector<std::shared_ptr<const FPGATrackSimRoad>> roads_1st = prefilter_roads;
175  ATH_CHECK(m_roadFinderTool->getRoads(phits_1st, roads_1st, *FPGATruthTracks));
176 
177  auto mon_nroads_1st = Monitored::Scalar<unsigned>("nroads_1st", roads_1st.size());
178  for (auto const &road : roads_1st) {
179  unsigned bitmask = road->getHitLayers();
180  for (size_t l = 0; l < m_FPGATrackSimMapping->PlaneMap_1st(0)->getNLogiLayers(); l++) {
181  if (bitmask & (1 << l)) {
182  auto mon_layerIDs_1st = Monitored::Scalar<unsigned>("layerIDs_1st",l);
183  Monitored::Group(m_monTool,mon_layerIDs_1st);
184  }
185  }
186  }
187  Monitored::Group(m_monTool, mon_nroads_1st);
188 
189  TIME(m_troads);
190  // Standard road Filter
191  std::vector<std::shared_ptr<const FPGATrackSimRoad>> postfilter_roads;
192  if (m_filterRoads)
193  {
194  ATH_CHECK(m_roadFilterTool->filterRoads(roads_1st, postfilter_roads));
195  roads_1st = postfilter_roads;
196  }
197  if (m_doOverlapRemoval) ATH_CHECK(m_overlapRemovalTool_1st->runOverlapRemoval(roads_1st));
198  // Road Filter2
199  std::vector<std::shared_ptr<const FPGATrackSimRoad>> postfilter2_roads;
200  if (m_filterRoads2) {
201  ATH_CHECK(m_roadFilterTool2->filterRoads(roads_1st, postfilter2_roads));
202  roads_1st = postfilter2_roads;
203  }
204 
205  auto mon_nroads_1st_postfilter = Monitored::Scalar<unsigned>("nroads_1st_postfilter", roads_1st.size());
206  Monitored::Group(m_monTool, mon_nroads_1st_postfilter);
207 
208  TIME(m_troad_filter);
209  // Get tracks
210  std::vector<FPGATrackSimTrack> tracks_1st;
211  if (m_doTracking) {
212  if (m_doNNTrack) {
213  ATH_MSG_DEBUG("Performing NN tracking");
214  ATH_CHECK(m_NNTrackTool->getTracks(roads_1st, tracks_1st));
215  }
216  else {
217  ATH_MSG_DEBUG("Performing Linear tracking");
218  ATH_CHECK(m_trackFitterTool_1st->getTracks(roads_1st, tracks_1st));
219  float bestchi2 = 1.e15;
220  for (const FPGATrackSimTrack& track : tracks_1st) {
221  float chi2 = track.getChi2ndof();
222  if (chi2 < bestchi2) bestchi2 = chi2;
223  auto mon_chi2_1st = Monitored::Scalar<float>("chi2_1st_all", chi2);
224  Monitored::Group(m_monTool, mon_chi2_1st);
225  }
226  auto mon_best_chi2_1st = Monitored::Scalar<float>("best_chi2_1st",bestchi2);
227  Monitored::Group(m_monTool,mon_best_chi2_1st);
228  }
229  }
230  else { // we are not doing tracking so get the number of combinations for monitoring
231  ATH_MSG_DEBUG("No tracking. Adding dummy tracks...");
232  int ntrackDummy = 0;
233  for (const std::shared_ptr<const FPGATrackSimRoad>& road : roads_1st) {
234  ntrackDummy += road->getNHitCombos();
235  }
236  tracks_1st.resize(ntrackDummy); // just filled with dummy tracks for monitoring
237  }
238 
239  // loop over roads and store them in SG (This better be done after track finding to also copy the sector information)
240  for (auto const &road:roads_1st){
241  std::vector<FPGATrackSimHit> road_hits;
242  ATH_MSG_DEBUG("Hough Road X Y: " << road->getX() << " " << road->getY());
243  for (size_t l = 0; l < road->getNLayers(); ++l) {
244  for (const auto &layerH : road->getHits(l)) {
245  road_hits.push_back(*layerH);
246  }
247  }
248  FPGAHitsInRoads_1st->push_back(road_hits);
249  FPGARoads_1st->push_back(*road);
250  }
251 
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  if (m_doOverlapRemoval) 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, phits_1st, m_writeOutNonSPStripHits, m_trackScoreCut, m_NumOfHitPerGrouping));
355  }
356 
357  // Reset data pointers
360 
361  TIME(m_tfin);
362 
363  return StatusCode::SUCCESS;
364 }
365 
366 
368 // INPUT PASSING, READING AND PROCESSING //
370 
371 StatusCode FPGATrackSimLogicalHitsProcessAlg::writeOutputData( const std::vector<std::shared_ptr<const FPGATrackSimRoad>>& roads_1st,
372  std::vector<FPGATrackSimTrack> const& tracks_1st,
373  FPGATrackSimDataFlowInfo const* dataFlowInfo)
374 {
376 
377  ATH_MSG_DEBUG("NFPGATrackSimRoads_1st = " << roads_1st.size() << ", NFPGATrackSimTracks_1st = " << tracks_1st.size());
378 
379  if (!m_writeOutputData) return StatusCode::SUCCESS;
382  if (m_doTracking) {
385  }
386 
387 
390 
391  // It would be nice to rearrange this so both algorithms use one instance of this tool, I think.
392  // Which means that dataprep can't call writeData because that does Fill().
393  ATH_CHECK(m_writeOutputTool->writeData());
394 
395 
396 
397  return StatusCode::SUCCESS;
398 }
399 
400 
402 // Finalize
403 
405 {
406 #ifdef BENCHMARK_LOGICALHITSALG
407  ATH_MSG_INFO("Timings:" <<
408  "\nroads: " << std::setw(10) << m_troads <<
409  "\nroad filter: " << std::setw(10) << m_troad_filter <<
410  "\nllp: " << std::setw(10) << m_tlrt <<
411  "\ntracks: " << std::setw(10) << m_ttracks <<
412  "\nOR: " << std::setw(10) << m_tOR <<
413  (m_runSecondStage ? : ("\n2ndStage: " << std::setw(10) << m_t2ndStage) : "") <<
414  "\nmon: " << std::setw(10) << m_tmon <<
415  "\nfin: " << std::setw(10) << m_tfin
416  );
417 #endif
418 
419 
420  ATH_MSG_INFO("PRINTING FPGATRACKSIM SIMPLE STATS");
421  ATH_MSG_INFO("========================================================================================");
422  ATH_MSG_INFO("Inclusive efficiency to find a road = " << m_nRoadsFound/m_evt_truth);
423  ATH_MSG_INFO("Inclusive efficiency to find a track = " << m_nTracksFound/m_evt_truth);
424  ATH_MSG_INFO("Inclusive efficiency to find a track passing chi2 = " << m_nTracksChi2Found/m_evt_truth);
425  ATH_MSG_INFO("Inclusive efficiency to find a track passing chi2 and OLR = " << m_nTracksChi2OLRFound/m_evt_truth);
426 
427 
428  ATH_MSG_INFO("Number of 1st stage roads/event = " << m_nRoadsTot/m_evt);
429  ATH_MSG_INFO("Number of 1st stage track combinations/event = " << m_nTracksTot/m_evt);
430  ATH_MSG_INFO("Number of 1st stage tracks passing chi2/event = " << m_nTracksChi2Tot/m_evt);
431  ATH_MSG_INFO("Number of 1st stage tracks passing chi2 and OLR/event = " << m_nTracksChi2OLRTot/m_evt);
432  ATH_MSG_INFO("========================================================================================");
433 
434  return StatusCode::SUCCESS;
435 }
436 
437 
439 // Helpers
440 
441 void FPGATrackSimLogicalHitsProcessAlg::printHitSubregions(std::vector<FPGATrackSimHit> const & hits)
442 {
443  ATH_MSG_WARNING("Hit regions:");
444  for (auto hit : hits)
445  {
446  std::vector<uint32_t> regions = m_FPGATrackSimMapping->SubRegionMap()->getRegions(hit);
447  std::stringstream ss;
448  for (auto r : regions)
449  ss << r << ",";
450  ATH_MSG_WARNING("\t[" << ss.str() << "]");
451  }
452 }
FPGATrackSimLogicalHitsProcessAlg::m_doSpacepoints
Gaudi::Property< bool > m_doSpacepoints
Definition: FPGATrackSimLogicalHitsProcessAlg.h:95
FPGATrackSimLogicalHitsProcessAlg::m_filterRoads
Gaudi::Property< bool > m_filterRoads
Definition: FPGATrackSimLogicalHitsProcessAlg.h:99
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:90
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:82
TRTCalib_Extractor.hits
hits
Definition: TRTCalib_Extractor.py:35
FPGATrackSimLogicalHitsProcessAlg::m_description
std::string m_description
Definition: FPGATrackSimLogicalHitsProcessAlg.h:77
PowhegControl_ttHplus_NLO.ss
ss
Definition: PowhegControl_ttHplus_NLO.py:83
FPGATrackSimLogicalHitsProcessAlg::m_logicEventOutputHeader
FPGATrackSimLogicalEventOutputHeader * m_logicEventOutputHeader
Definition: FPGATrackSimLogicalHitsProcessAlg.h:118
FPGATrackSimLogicalHitsProcessAlg::m_FPGARoadKey
SG::WriteHandleKey< FPGATrackSimRoadCollection > m_FPGARoadKey
Definition: FPGATrackSimLogicalHitsProcessAlg.h:150
FPGATrackSimLogicalHitsProcessAlg::m_slicedHitHeader
FPGATrackSimLogicalEventInputHeader * m_slicedHitHeader
Definition: FPGATrackSimLogicalHitsProcessAlg.h:117
ATH_MSG_INFO
#define ATH_MSG_INFO(x)
Definition: AthMsgStreamMacros.h:31
FPGATrackSimLogicalHitsProcessAlg::m_nTracksTot
long m_nTracksTot
Definition: FPGATrackSimLogicalHitsProcessAlg.h:126
FPGATrackSimLogicalHitsProcessAlg::m_FPGAHitInRoadsKey
SG::WriteHandleKey< FPGATrackSimHitContainer > m_FPGAHitInRoadsKey
Definition: FPGATrackSimLogicalHitsProcessAlg.h:149
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:81
FPGATrackSimLogicalHitsProcessAlg::m_doTracking
Gaudi::Property< bool > m_doTracking
Definition: FPGATrackSimLogicalHitsProcessAlg.h:96
FPGATrackSimLogicalHitsProcessAlg::m_writeOutNonSPStripHits
Gaudi::Property< bool > m_writeOutNonSPStripHits
Definition: FPGATrackSimLogicalHitsProcessAlg.h:108
FPGATrackSimLogicalHitsProcessAlg::FPGATrackSimLogicalHitsProcessAlg
FPGATrackSimLogicalHitsProcessAlg(const std::string &name, ISvcLocator *pSvcLocator)
Definition: FPGATrackSimLogicalHitsProcessAlg.cxx:42
FPGATrackSimLogicalHitsProcessAlg::m_FPGATruthTrackKey
SG::ReadHandleKey< FPGATrackSimTruthTrackCollection > m_FPGATruthTrackKey
Definition: FPGATrackSimLogicalHitsProcessAlg.h:154
FPGATrackSimLogicalHitsProcessAlg::m_evtSel
ServiceHandle< IFPGATrackSimEventSelectionSvc > m_evtSel
Definition: FPGATrackSimLogicalHitsProcessAlg.h:92
FPGATrackSimLogicalEventOutputHeader::reset
void reset()
Definition: FPGATrackSimLogicalEventOutputHeader.cxx:12
FPGATrackSimLogicalHitsProcessAlg::m_writeOutputData
Gaudi::Property< bool > m_writeOutputData
Definition: FPGATrackSimLogicalHitsProcessAlg.h:105
UploadAMITag.l
list l
Definition: UploadAMITag.larcaf.py:158
FPGATrackSimReadRawRandomHitsTool.h
FPGATrackSimLogicalHitsProcessAlg::m_overlapRemovalTool_1st
ToolHandle< FPGATrackSimOverlapRemovalTool > m_overlapRemovalTool_1st
Definition: FPGATrackSimLogicalHitsProcessAlg.h:89
FPGATrackSimLogicalHitsProcessAlg::m_FPGAHitFilteredKey
SG::WriteHandleKey< FPGATrackSimHitCollection > m_FPGAHitFilteredKey
Definition: FPGATrackSimLogicalHitsProcessAlg.h:148
FPGATrackSimLogicalHitsProcessAlg::m_FPGAOfflineTrackKey
SG::ReadHandleKey< FPGATrackSimOfflineTrackCollection > m_FPGAOfflineTrackKey
Definition: FPGATrackSimLogicalHitsProcessAlg.h:155
FPGATrackSimLogicalHitsProcessAlg::m_doNNTrack
Gaudi::Property< bool > m_doNNTrack
Definition: FPGATrackSimLogicalHitsProcessAlg.h:102
FPGATrackSimLogicalHitsProcessAlg::m_FPGATrackKey
SG::WriteHandleKey< FPGATrackSimTrackCollection > m_FPGATrackKey
Definition: FPGATrackSimLogicalHitsProcessAlg.h:151
FPGATrackSimLogicalHitsProcessAlg::m_evt_truth
double m_evt_truth
Definition: FPGATrackSimLogicalHitsProcessAlg.h:130
FPGATrackSimLogicalHitsProcessAlg::m_monTool
ToolHandle< GenericMonitoringTool > m_monTool
Definition: FPGATrackSimLogicalHitsProcessAlg.h:142
FPGATrackSimLogicalEventOutputHeader::getDataFlowInfo
FPGATrackSimDataFlowInfo const & getDataFlowInfo() const
Definition: FPGATrackSimLogicalEventOutputHeader.h:47
FPGATrackSimLogicalHitsProcessAlg::m_runOnRDO
Gaudi::Property< bool > m_runOnRDO
Definition: FPGATrackSimLogicalHitsProcessAlg.h:106
FPGATrackSimLogicalHitsProcessAlg::m_doHoughRootOutput
Gaudi::Property< bool > m_doHoughRootOutput
Definition: FPGATrackSimLogicalHitsProcessAlg.h:101
FPGATrackSimLogicalHitsProcessAlg::m_evt
double m_evt
Definition: FPGATrackSimLogicalHitsProcessAlg.h:124
FPGATrackSimRegionMap.h
Maps ITK module indices to FPGATrackSim regions.
FPGATrackSimLogicalHitsProcessAlg::m_trackScoreCut
Gaudi::Property< float > m_trackScoreCut
Definition: FPGATrackSimLogicalHitsProcessAlg.h:107
FPGATrackSimLogicalHitsProcessAlg::m_doLRTHitFiltering
Gaudi::Property< bool > m_doLRTHitFiltering
Definition: FPGATrackSimLogicalHitsProcessAlg.h:104
FPGATrackSimLogicalHitsProcessAlg::m_roadFilterTool2
ToolHandle< IFPGATrackSimRoadFilterTool > m_roadFilterTool2
Definition: FPGATrackSimLogicalHitsProcessAlg.h:84
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< FPGATrackSimRoadUnionTool > m_roadFinderTool
Definition: FPGATrackSimLogicalHitsProcessAlg.h:80
FPGATrackSimLogicalEventOutputHeader.h
FPGATrackSimLogicalHitsProcessAlg::execute
virtual StatusCode execute() override
Definition: FPGATrackSimLogicalHitsProcessAlg.cxx:105
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
FPGATrackSimLogicalHitsProcessAlg::m_doOverlapRemoval
Gaudi::Property< bool > m_doOverlapRemoval
Definition: FPGATrackSimLogicalHitsProcessAlg.h:97
chi2
double chi2(TH1 *h0, TH1 *h1)
Definition: comparitor.cxx:523
ATH_CHECK
#define ATH_CHECK
Definition: AthCheckMacros.h:40
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:371
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
FPGATrackSimLogicalHitsProcessAlg::m_sliceBranch
Gaudi::Property< std::string > m_sliceBranch
Definition: FPGATrackSimLogicalHitsProcessAlg.h:113
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?
FPGATrackSimLogicalEventInputHeader::reset
void reset()
Definition: FPGATrackSimLogicalEventInputHeader.cxx:10
FPGATrackSimLogicalHitsProcessAlg::m_nTracksFound
long m_nTracksFound
Definition: FPGATrackSimLogicalHitsProcessAlg.h:132
FPGATrackSimLogicalHitsProcessAlg::m_nTracksChi2Tot
long m_nTracksChi2Tot
Definition: FPGATrackSimLogicalHitsProcessAlg.h:127
FPGATrackSimLogicalHitsProcessAlg::m_nTracksChi2OLRFound
long m_nTracksChi2OLRFound
Definition: FPGATrackSimLogicalHitsProcessAlg.h:134
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:228
FPGATrackSimLogicalHitsProcessAlg::m_spRoadFilterTool
ToolHandle< IFPGATrackSimRoadFilterTool > m_spRoadFilterTool
Definition: FPGATrackSimLogicalHitsProcessAlg.h:85
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:153
TIME
#define TIME(name)
Definition: FPGATrackSimLogicalHitsProcessAlg.cxx:35
FPGATrackSimLogicalHitsProcessAlg::printHitSubregions
void printHitSubregions(std::vector< FPGATrackSimHit > const &hits)
Definition: FPGATrackSimLogicalHitsProcessAlg.cxx:441
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:404
FPGATrackSimLogicalHitsProcessAlg.h
FPGATrackSimLogicalHitsProcessAlg::m_trackFitterTool_1st
ToolHandle< FPGATrackSimTrackFitterTool > m_trackFitterTool_1st
Definition: FPGATrackSimLogicalHitsProcessAlg.h:88
FPGATrackSimLogicalHitsProcessAlg::m_nTracksChi2Found
long m_nTracksChi2Found
Definition: FPGATrackSimLogicalHitsProcessAlg.h:133
SG::WriteHandle
Definition: StoreGate/StoreGate/WriteHandle.h:76
FPGATrackSimLogicalHitsProcessAlg::m_nRoadsTot
long m_nRoadsTot
Definition: FPGATrackSimLogicalHitsProcessAlg.h:125
FPGATrackSimLogicalHitsProcessAlg::m_nTracksChi2OLRTot
long m_nTracksChi2OLRTot
Definition: FPGATrackSimLogicalHitsProcessAlg.h:128
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:83
ATH_MSG_WARNING
#define ATH_MSG_WARNING(x)
Definition: AthMsgStreamMacros.h:32
FPGATrackSimLogicalHitsProcessAlg::m_doLRT
Gaudi::Property< bool > m_doLRT
Definition: FPGATrackSimLogicalHitsProcessAlg.h:103
FPGATrackSimLogicalHitsProcessAlg::m_nRoadsFound
long m_nRoadsFound
Definition: FPGATrackSimLogicalHitsProcessAlg.h:131
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:100
FPGATrackSimLogicalHitsProcessAlg::m_NumOfHitPerGrouping
Gaudi::Property< int > m_NumOfHitPerGrouping
Definition: FPGATrackSimLogicalHitsProcessAlg.h:109
FPGATrackSimLogicalHitsProcessAlg::m_outputBranch
Gaudi::Property< std::string > m_outputBranch
Definition: FPGATrackSimLogicalHitsProcessAlg.h:114
FPGATrackSimLogicalHitsProcessAlg::m_FPGAHitKey
SG::ReadHandleKeyArray< FPGATrackSimHitCollection > m_FPGAHitKey
Definition: FPGATrackSimLogicalHitsProcessAlg.h:145
FPGATrackSimLogicalHitsProcessAlg::m_NNTrackTool
ToolHandle< FPGATrackSimNNTrackTool > m_NNTrackTool
Definition: FPGATrackSimLogicalHitsProcessAlg.h:86
FPGATrackSimTrackFitterTool.h
FPGATrackSimTrackPars.h
Structs that store the 5 track parameters.
FPGATrackSimLogicalHitsProcessAlg::m_houghRootOutputTool
ToolHandle< FPGATrackSimHoughRootOutputTool > m_houghRootOutputTool
Definition: FPGATrackSimLogicalHitsProcessAlg.h:87
FPGATrackSimTrack.h
FPGATrackSimCluster.h
FPGATrackSimLogicalHitsProcessAlg::m_FPGATrackSimMapping
ServiceHandle< IFPGATrackSimMappingSvc > m_FPGATrackSimMapping
Definition: FPGATrackSimLogicalHitsProcessAlg.h:91