ATLAS Offline Software
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 
27 #include "StoreGate/StoreGateSvc.h"
39 
42 
44 class FPGATrackSimHit;
45 class FPGATrackSimRoad;
46 class FPGATrackSimTrack;
47 
49 {
50  public:
51  FPGATrackSimLayerStudyAlg(const std::string& name, ISvcLocator* pSvcLocator);
52  virtual ~FPGATrackSimLayerStudyAlg() = default;
53 
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 
76  // Event storage
78 
79  // internal counters
80  double m_evt = 0; // number of events passing event selection, independent of truth
81 
82  // Read hits from data prep algorithm-- note, not regonalized.
83  SG::ReadHandleKey<FPGATrackSimHitCollection> m_FPGAHitKey {this, "FPGATrackSimHitKey","FPGAHits", "FPGATrackSim hits key"};
84 
85  // We do also need to pull truth tracks. I don't think we need offline tracks.
86  SG::ReadHandleKey<FPGATrackSimTruthTrackCollection> m_FPGATruthTrackKey {this, "FPGATrackSimTruthTrackKey", "FPGATruthTracks", "FPGATrackSim truth tracks"};
87 };
88 
89 
90 #endif // FPGATrackSimLOGICALHITSTOALGORITHMS_h
ReadHandleKeyArray.h
ReadHandleKey.h
Property holding a SG store/key/clid from which a ReadHandle is made.
FPGATrackSimOfflineTrackCollection.h
FPGATrackSimLayerStudyAlg::m_tracks_2nd_guessedcheck
std::vector< FPGATrackSimTrack > m_tracks_2nd_guessedcheck
Definition: FPGATrackSimLayerStudyAlg.h:77
FPGATrackSimLayerStudyAlg::m_stage
Gaudi::Property< int > m_stage
Definition: FPGATrackSimLayerStudyAlg.h:73
FPGATrackSimLayerStudyAlg::m_FPGAHitKey
SG::ReadHandleKey< FPGATrackSimHitCollection > m_FPGAHitKey
Definition: FPGATrackSimLayerStudyAlg.h:83
FPGATrackSimCluster
Definition: FPGATrackSimCluster.h:24
FPGATrackSimHitCollection.h
FPGATrackSimTrack
Definition: FPGATrackSimTrack.h:18
FPGATrackSimLayerStudyAlg::m_threshold
Gaudi::Property< unsigned > m_threshold
Definition: FPGATrackSimLayerStudyAlg.h:74
initialize
void initialize()
Definition: run_EoverP.cxx:894
IFPGATrackSimMappingSvc.h
TruthParticleContainer.h
FPGATrackSimLayerStudyAlg
Definition: FPGATrackSimLayerStudyAlg.h:49
FPGATrackSimLayerStudyAlg::~FPGATrackSimLayerStudyAlg
virtual ~FPGATrackSimLayerStudyAlg()=default
FPGATrackSimLayerStudyTool.h
FPGATrackSimLayerStudyAlg::m_hitBinningTool
ToolHandle< FPGATrackSimBinnedHits > m_hitBinningTool
Definition: FPGATrackSimLayerStudyAlg.h:63
FPGATrackSimLayerStudyAlg::m_chrono
ServiceHandle< IChronoStatSvc > m_chrono
Definition: FPGATrackSimLayerStudyAlg.h:70
SG::ReadHandleKey< FPGATrackSimHitCollection >
FPGATrackSimBinnedHits.h
Binning Classes for GenScanTool.
FPGATrackSimRoadCollection.h
FPGATrackSimLayerStudyAlg::ATLAS_NOT_THREAD_SAFE
virtual StatusCode execute ATLAS_NOT_THREAD_SAFE() override
FPGATrackSimHit
Definition: FPGATrackSimHit.h:41
LArG4FSStartPointFilterLegacy.execute
execute
Definition: LArG4FSStartPointFilterLegacy.py:20
AthAlgorithm.h
FPGATrackSimLayerStudyAlg::m_evt
double m_evt
Definition: FPGATrackSimLayerStudyAlg.h:80
FPGATrackSimTrackCollection.h
FPGATrackSimClusterCollection.h
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
FPGATrackSimLayerStudyAlg::m_tracks_1st_nomiss
std::vector< FPGATrackSimTrack > m_tracks_1st_nomiss
Definition: FPGATrackSimLayerStudyAlg.h:77
Monitored.h
Header file to be included by clients of the Monitored infrastructure.
AthAlgorithm
Definition: AthAlgorithm.h:47
FPGATrackSimLayerStudyAlg::m_tracks_1st_guessedcheck
std::vector< FPGATrackSimTrack > m_tracks_1st_guessedcheck
Definition: FPGATrackSimLayerStudyAlg.h:77
WriteHandleKey.h
Property holding a SG store/key/clid from which a WriteHandle is made.
WriteHandleKeyArray.h
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:240
FPGATrackSimLayerStudyAlg::finalize
virtual StatusCode finalize() override
Definition: FPGATrackSimLayerStudyAlg.cxx:198
FPGATrackSimLayerStudyAlg::m_FPGATrackSimMapping
ServiceHandle< IFPGATrackSimMappingSvc > m_FPGATrackSimMapping
Definition: FPGATrackSimLayerStudyAlg.h:66
FPGATrackSimLayerStudyAlg::ATLAS_NOT_THREAD_SAFE
virtual StatusCode initialize ATLAS_NOT_THREAD_SAFE() override
FPGATrackSimHitContainer.h
FPGATrackSimTruthTrackCollection.h
FPGATrackSimSpacePointsToolI.h
Declares an abstract class that implements an interface for spacepoint formation. This class is imple...
IFPGATrackSimEventSelectionSvc.h
IFPGATrackSimBankSvc.h
FPGATrackSimLayerStudyAlg::m_description
std::string m_description
Definition: FPGATrackSimLayerStudyAlg.h:60
FPGATrackSimLayerStudyAlg::m_evtSel
ServiceHandle< IFPGATrackSimEventSelectionSvc > m_evtSel
Definition: FPGATrackSimLayerStudyAlg.h:67
FPGATrackSimLayerStudyAlg::m_FPGATruthTrackKey
SG::ReadHandleKey< FPGATrackSimTruthTrackCollection > m_FPGATruthTrackKey
Definition: FPGATrackSimLayerStudyAlg.h:86
FPGATrackSimLayerStudyAlg::m_binMonitoring
ToolHandle< FPGATrackSimLayerStudyTool > m_binMonitoring
Definition: FPGATrackSimLayerStudyAlg.h:64
StoreGateSvc.h
FPGATrackSimLayerStudyAlg::FPGATrackSimLayerStudyAlg
FPGATrackSimLayerStudyAlg(const std::string &name, ISvcLocator *pSvcLocator)
Definition: FPGATrackSimLayerStudyAlg.cxx:39
FPGATrackSimRoad
Definition: FPGATrackSimRoad.h:31
ServiceHandle< IFPGATrackSimMappingSvc >
FPGATrackSimLayerStudyAlg::m_tracks_2nd_nomiss
std::vector< FPGATrackSimTrack > m_tracks_2nd_nomiss
Definition: FPGATrackSimLayerStudyAlg.h:77