ATLAS Offline Software
Loading...
Searching...
No Matches
FPGATrackSimSlicingEngineTool.h
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2025 CERN for the benefit of the ATLAS collaboration
3
4 Implements the core logic of the "slicing engine", deciding whether hits fall
5 within region boundaries and splitting them by stage as appropriate.
6*/
7
8#ifndef FPGATrackSimSLICINGENGINETOOL_H
9#define FPGATrackSimSLICINGENGINETOOL_H
10
11#include <array>
12#include <vector>
13#include <map>
14
19
20class TH1I;
21
23public:
24 FPGATrackSimSlicingEngineTool(const std::string&, const std::string&, const IInterface*);
25 virtual ~FPGATrackSimSlicingEngineTool() = default;
26 virtual StatusCode initialize() override;
27
28 void readLayerMap();
29
30 void sliceHits(const std::vector<std::shared_ptr<const FPGATrackSimHit>>& hits,
31 std::vector<std::shared_ptr<const FPGATrackSimHit>>& firstHits,
32 std::vector<std::shared_ptr<const FPGATrackSimHit>>& secondHits);
33
34 // Helper function to hook up branches for output test vector creation.
36 FPGATrackSimLogicalEventInputHeader *slicedSecondPixelHeader,
37 FPGATrackSimLogicalEventInputHeader *slicedStripHeader) {
38 m_slicedFirstPixelHeader = slicedFirstPixelHeader;
39 m_slicedSecondPixelHeader = slicedSecondPixelHeader;
40 m_slicedStripHeader = slicedStripHeader;
41 };
42
43private:
44
45 // Properties
47
48 Gaudi::Property<bool> m_rootOutput {this, "RootOutput", true, "Wite output ROOT branches"};
49 Gaudi::Property<std::string> m_layerMap {this, "LayerMap", "", "Binning layer map file, only read if doSecondStage = true."};
50 Gaudi::Property<bool> m_doSecondStage {this, "doSecondStage", true, "Split hits between first and second stage. If set to false all hits are first stage" };
51
52 // Internal storage for the sliced hits (implemented as a LogicalEventInputHeader,
53 // so we can easily copy to the output ROOT file).
57
58 // Internal storage, these are the modules in the configured layer map that belong
59 // to the first stage.
60 std::set<unsigned> m_layerMapModules;
61
62};
63
64#endif // FPGATrackSimSLICINGENGINETOOL_H
: FPGATrackSim-specific class to represent an hit in the detector.
AthAlgTool(const std::string &type, const std::string &name, const IInterface *parent)
Constructor with parameters:
FPGATrackSimLogicalEventInputHeader * m_slicedSecondPixelHeader
void sliceHits(const std::vector< std::shared_ptr< const FPGATrackSimHit > > &hits, std::vector< std::shared_ptr< const FPGATrackSimHit > > &firstHits, std::vector< std::shared_ptr< const FPGATrackSimHit > > &secondHits)
virtual ~FPGATrackSimSlicingEngineTool()=default
void setupSlices(FPGATrackSimLogicalEventInputHeader *slicedFirstPixelHeader, FPGATrackSimLogicalEventInputHeader *slicedSecondPixelHeader, FPGATrackSimLogicalEventInputHeader *slicedStripHeader)
Gaudi::Property< std::string > m_layerMap
FPGATrackSimLogicalEventInputHeader * m_slicedFirstPixelHeader
FPGATrackSimLogicalEventInputHeader * m_slicedStripHeader
FPGATrackSimSlicingEngineTool(const std::string &, const std::string &, const IInterface *)
ServiceHandle< IFPGATrackSimMappingSvc > m_FPGATrackSimMapping