ATLAS Offline Software
Loading...
Searching...
No Matches
FPGATrackSimBankSvc.cxx
Go to the documentation of this file.
1// Copyright (C) 2002-2025 CERN for the benefit of the ATLAS collaboration
2
3
5
6
8// AthService Functions
10
11
12FPGATrackSimBankSvc::FPGATrackSimBankSvc(const std::string& name, ISvcLocator*svc) :
13 base_class(name,svc)
14{
15}
16
17
18
20{
21 ATH_MSG_DEBUG("-------------- FPGATrackSimBankSvc -------------------");
22 ATH_MSG_DEBUG("BankType Map = " << m_bankTypes);
23 ATH_MSG_DEBUG("Number of 1st stage coordinates = " << m_ncoords_1st);
24 ATH_MSG_DEBUG("Number of 2nd stage coordinates = " << m_ncoords_2nd);
25 ATH_MSG_DEBUG("-------------------------------------------------");
26
27 // resize this to the appropriate one and to be safe, set to nullptr to start
28 m_FitConstantBankNoGuess_1st.resize(m_FPGATrackSimMapping->PlaneMap_1st(0)->getNLogiLayers());
29 m_FitConstantBankNoGuess_2nd.resize(m_FPGATrackSimMapping->PlaneMap_2nd(0)->getNLogiLayers());
30 for (unsigned i = 0; i < m_FitConstantBankNoGuess_1st.size(); i++) m_FitConstantBankNoGuess_1st[i] = nullptr;
31 for (unsigned i = 0; i < m_FitConstantBankNoGuess_2nd.size(); i++) m_FitConstantBankNoGuess_2nd[i] = nullptr;
32
33 return StatusCode::SUCCESS;
34}
35
36
37
39// Load Functions
41
43{
44 if (missedPlane == -1)
45 m_FitConstantBank_1st = std::unique_ptr<FPGATrackSimFitConstantBank>(new FPGATrackSimFitConstantBank(m_FPGATrackSimMapping->PlaneMap_1st(0), m_ncoords_1st, m_path_constants_1st, true, m_phiShift));
46 else
47 m_FitConstantBankNoGuess_1st[missedPlane] = std::unique_ptr<FPGATrackSimFitConstantBank> (new FPGATrackSimFitConstantBank(m_FPGATrackSimMapping->PlaneMap_1st(0), m_ncoords_1st, m_path_constants_1st_noguess[missedPlane], true, m_phiShift, missedPlane)); // no check on the plane number
48
49 return true;
50}
51
52
54{
55 if (missedPlane == -1)
56 m_FitConstantBank_2nd = std::make_unique<FPGATrackSimFitConstantBank> (m_FPGATrackSimMapping->PlaneMap_2nd(0), m_ncoords_2nd, m_path_constants_2nd, false, m_phiShift);
57 else
58 m_FitConstantBankNoGuess_2nd[missedPlane] = std::make_unique<FPGATrackSimFitConstantBank> (m_FPGATrackSimMapping->PlaneMap_2nd(0), m_ncoords_2nd, m_path_constants_2nd_noguess[missedPlane], false, m_phiShift, missedPlane); // no check on the plane number
59
60 return true;
61}
62
63
65{
66 m_SectorBank_1st = std::unique_ptr<FPGATrackSimSectorBank> (new FPGATrackSimSectorBank(m_path_sectorbank_1st));
68 return true;
69}
70
71
73{
74 m_SectorBank_2nd = std::unique_ptr<FPGATrackSimSectorBank> (new FPGATrackSimSectorBank(m_path_sectorbank_2nd));
76 return true;
77}
78
79
81{
82 m_SectorSlices = std::unique_ptr<FPGATrackSimSectorSlice> (new FPGATrackSimSectorSlice(m_path_sectorslices));
83 return true;
84}
85
86
87
88
89
91// IFPGATrackSimBankSvc Functions
93
94
96{
97 if (missedPlane == -1) {
98 // Don't need to check the return actually, will return nullptr anyways
100
101 return m_FitConstantBank_1st.get();
102 }
103 else {
104 // Don't need to check the return actually, will return nullptr anyways
105 if (!m_FitConstantBankNoGuess_1st[missedPlane]) LoadFitConstantBank_1st(missedPlane);
106
107 return m_FitConstantBankNoGuess_1st[missedPlane].get();
108 }
109}
110
111
113{
114 if (missedPlane == -1) {
115 // Don't need to check the return actually, will return nullptr anyways
117
118 return m_FitConstantBank_2nd.get();
119 }
120 else {
121 // Don't need to check the return actually, will return nullptr anyways
122 if (!m_FitConstantBankNoGuess_2nd[missedPlane]) LoadFitConstantBank_2nd(missedPlane);
123
124 return m_FitConstantBankNoGuess_2nd[missedPlane].get();
125 }
126}
127
128
130{
131 // Don't need to check the return actually, will return nullptr anyways
133 return m_SectorBank_1st.get();
134}
135
137{
138 // Don't need to check the return actually, will return nullptr anyways
140
141 return m_SectorBank_2nd.get();
142}
143
144
146{
147 // Don't need to check the return actually, will return nullptr anyways
149
150 return m_SectorSlices.get();
151}
#define ATH_MSG_DEBUG(x)
std::unique_ptr< FPGATrackSimSectorBank > m_SectorBank_2nd
std::unique_ptr< FPGATrackSimFitConstantBank > m_FitConstantBank_2nd
FPGATrackSimBankSvc(const std::string &name, ISvcLocator *svc)
bool LoadFitConstantBank_1st(int missedPlane=-1)
Gaudi::Property< std::string > m_path_constants_2nd
std::unique_ptr< FPGATrackSimFitConstantBank > m_FitConstantBank_1st
Gaudi::Property< std::string > m_path_sectorslices
Gaudi::Property< int > m_ncoords_1st
Gaudi::Property< std::vector< double > > m_qOverPtBins
Gaudi::Property< std::string > m_path_constants_1st
Gaudi::Property< bool > m_absQOverPtBinning
virtual const FPGATrackSimSectorSlice * SectorSlice() override
virtual StatusCode initialize() override
Gaudi::Property< int > m_ncoords_2nd
Gaudi::Property< std::string > m_path_sectorbank_2nd
virtual const FPGATrackSimFitConstantBank * FitConstantBank_1st(int missedPlane=-1) override
Gaudi::Property< std::vector< std::string > > m_path_constants_2nd_noguess
Gaudi::Property< std::string > m_path_sectorbank_1st
ServiceHandle< IFPGATrackSimMappingSvc > m_FPGATrackSimMapping
std::unique_ptr< FPGATrackSimSectorSlice > m_SectorSlices
Gaudi::Property< std::vector< std::string > > m_path_constants_1st_noguess
virtual const FPGATrackSimSectorBank * SectorBank_2nd() override
bool LoadFitConstantBank_2nd(int missedPlane=-1)
std::vector< std::unique_ptr< FPGATrackSimFitConstantBank > > m_FitConstantBankNoGuess_2nd
std::unique_ptr< FPGATrackSimSectorBank > m_SectorBank_1st
virtual const FPGATrackSimFitConstantBank * FitConstantBank_2nd(int missedPlane=-1) override
std::vector< std::unique_ptr< FPGATrackSimFitConstantBank > > m_FitConstantBankNoGuess_1st
virtual const FPGATrackSimSectorBank * SectorBank_1st() override
Gaudi::Property< std::string > m_bankTypes
Gaudi::Property< float > m_phiShift