ATLAS Offline Software
Loading...
Searching...
No Matches
FPGATrackSimLayerStudyAlg.h
Go to the documentation of this file.
1// Copyright (C) 2002-2025 CERN for the benefit of the ATLAS collaboration
2
3#ifndef FPGATrackSim_LAYERSTUDYALG_H
4#define FPGATrackSim_LAYERSTUDYALG_H
5
6/*
7 * Layer study algorithm: runs data preparation and then dumps all the hits
8 * into FPGATrackSimBinning, to produce a "layer study" tree.
9 *
10 * Pulled out of the genscan/inside out pattern recognition block, to facilitate
11 * running layer studies with either the first stage or second stage hits (or both).
12 */
13
15#include "GaudiKernel/ToolHandle.h"
22
24
25#include <fstream>
26
39
42
44class FPGATrackSimHit;
47
49{
50 public:
51 FPGATrackSimLayerStudyAlg(const std::string& name, ISvcLocator* pSvcLocator);
52 virtual ~FPGATrackSimLayerStudyAlg() = default;
53
54 virtual StatusCode initialize ATLAS_NOT_THREAD_SAFE() override;
55 virtual StatusCode execute ATLAS_NOT_THREAD_SAFE() override;
56 virtual StatusCode finalize() override;
57
58 private:
59
60 std::string m_description;
61
62 // Handles
63 ToolHandle<FPGATrackSimBinnedHits> m_hitBinningTool {this, "BinningTool", "FPGATrackSimBinning/FPGATrackSimBinnedHits"};
64 ToolHandle<FPGATrackSimLayerStudyTool> m_binMonitoring {this, "BinMonitoringTool", "FPGATrackSimBinning/FPGATrackSimLayerStudyTool"};
65
66 ServiceHandle<IFPGATrackSimMappingSvc> m_FPGATrackSimMapping {this, "FPGATrackSimMapping", "FPGATrackSimMappingSvc", "FPGATrackSimMappingSvc"};
67 ServiceHandle<IFPGATrackSimEventSelectionSvc> m_evtSel {this, "eventSelector", "FPGATrackSimEventSelectionSvc", "Event selection Svc"};
68
69 // chrono service
70 ServiceHandle<IChronoStatSvc> m_chrono{this,"ChronoStatSvc","ChronoStatSvc"};
71
72 // Flags
73 Gaudi::Property<int> m_stage {this, "stage", 0, "0 for all hits; 1 for pmap-indicated first stage; 2 for pmap-indicated second stage"};
74 Gaudi::Property<unsigned> m_threshold {this, "threshold", 0, "Threshold to apply for selecting bins with hits, defaults to not used (0)"};
75 Gaudi::Property<bool> m_requireTruth {this, "requireTruth", true, "require output bins to be the true bin, defaults to true"};
76
77 // Event storage
79
80 // internal counters
81 double m_evt = 0; // number of events passing event selection, independent of truth
82
83 // Read hits from data prep algorithm-- note, not regonalized.
84 SG::ReadHandleKey<FPGATrackSimHitCollection> m_FPGAHitKey {this, "FPGATrackSimHitKey","FPGAHits", "FPGATrackSim hits key"};
85
86 // We do also need to pull truth tracks. I don't think we need offline tracks.
87 SG::ReadHandleKey<FPGATrackSimTruthTrackCollection> m_FPGATruthTrackKey {this, "FPGATrackSimTruthTrackKey", "FPGATruthTracks", "FPGATrackSim truth tracks"};
88};
89
90
91#endif // FPGATrackSimLOGICALHITSTOALGORITHMS_h
Binning Classes for GenScanTool.
Declares an abstract class that implements an interface for spacepoint formation. This class is imple...
Header file to be included by clients of the Monitored infrastructure.
Property holding a SG store/key/clid from which a ReadHandle is made.
Property holding a SG store/key/clid from which a WriteHandle is made.
AthAlgorithm(const std::string &name, ISvcLocator *pSvcLocator)
Constructor with parameters:
virtual StatusCode finalize() override
ServiceHandle< IFPGATrackSimEventSelectionSvc > m_evtSel
FPGATrackSimLayerStudyAlg(const std::string &name, ISvcLocator *pSvcLocator)
std::vector< FPGATrackSimTrack > m_tracks_2nd_guessedcheck
std::vector< FPGATrackSimTrack > m_tracks_1st_guessedcheck
virtual StatusCode initialize ATLAS_NOT_THREAD_SAFE() override
Gaudi::Property< bool > m_requireTruth
SG::ReadHandleKey< FPGATrackSimHitCollection > m_FPGAHitKey
ToolHandle< FPGATrackSimBinnedHits > m_hitBinningTool
ServiceHandle< IFPGATrackSimMappingSvc > m_FPGATrackSimMapping
ToolHandle< FPGATrackSimLayerStudyTool > m_binMonitoring
std::vector< FPGATrackSimTrack > m_tracks_1st_nomiss
virtual StatusCode execute ATLAS_NOT_THREAD_SAFE() override
virtual ~FPGATrackSimLayerStudyAlg()=default
std::vector< FPGATrackSimTrack > m_tracks_2nd_nomiss
SG::ReadHandleKey< FPGATrackSimTruthTrackCollection > m_FPGATruthTrackKey
Gaudi::Property< unsigned > m_threshold
ServiceHandle< IChronoStatSvc > m_chrono
Property holding a SG store/key/clid from which a ReadHandle is made.
void initialize()