ATLAS Offline Software
FPGATrackSimBankSvc.h
Go to the documentation of this file.
1 // Copyright (C) 2002-2023 CERN for the benefit of the ATLAS collaboration
2 
3 #ifndef TRIGFPGATrackSimBANKSVC_H
4 #define TRIGFPGATrackSimBANKSVC_H
5 
7 #include "GaudiKernel/Service.h"
13 
14 
15 class FPGATrackSimBankSvc : public extends< AthService, IFPGATrackSimBankSvc >
16 {
17  public:
18 
20  // AthService
21 
22  FPGATrackSimBankSvc(const std::string& name, ISvcLocator* svc);
23  virtual ~FPGATrackSimBankSvc() = default;
24 
25  virtual StatusCode initialize() override;
26 
28  // IFPGATrackSimBankSvc
29 
30  virtual const FPGATrackSimFitConstantBank* FitConstantBank_1st(int missedPlane = -1) override;
31  virtual const FPGATrackSimFitConstantBank* FitConstantBank_2nd(int missedPlane = -1) override;
32  virtual const FPGATrackSimSectorBank* SectorBank_1st() override;
33  virtual const FPGATrackSimSectorBank* SectorBank_2nd() override;
34  virtual const FPGATrackSimSectorSlice* SectorSlice() override;
35 
36  private:
37  // Gaudi properties
38 
39  Gaudi::Property<std::string> m_path_constants_1st {this, "constants_1st", "", "Path of the 1st stage constants"};
40  Gaudi::Property<std::string> m_path_constants_2nd {this, "constants_2nd", "", "Path of the 2nd stage constants"};
41  Gaudi::Property<std::string> m_path_sectorbank_1st {this, "sectorBank_1st", "", "Path of the 1st stage sector bank"};
42  Gaudi::Property<std::string> m_path_sectorbank_2nd {this, "sectorBank_2nd", "", "Path of the 2nd stage sectorbank"};
43  Gaudi::Property<std::string> m_path_sectorslices {this, "sectorSlices", "", "Path of the sector slices"};
44  Gaudi::Property<std::string> m_bankTypes {this, "BankType", "FILE", "FILE or COOL (COOL/DB to be implemented)"};
45  Gaudi::Property<int> m_ncoords_1st {this, "NCoords_1st", 10, "Number of 1st stage coordinates"};
46  Gaudi::Property<int> m_ncoords_2nd {this, "NCoords_2nd", 18, "Number of 2nd stage coordinates"};
47  Gaudi::Property<std::string> m_path_NNconstants {this, "m_path_NNconstants", "", "Path for NN constants"};
48  Gaudi::Property<std::vector<std::string> > m_path_constants_1st_noguess {this, "constantsNoGuess_1st", {}, "Path of the 1st stage constants without guessing"};
49  Gaudi::Property<std::vector<std::string> > m_path_constants_2nd_noguess {this, "constantsNoGuess_2nd", {}, "Path of the 2nd stage constants without guessing"};
50  Gaudi::Property<bool> m_absQOverPtBinning { this, "qptAbsBinning", false, "Controls whether or not to interpret the bins as q/pt or |q/pt|"};
51  Gaudi::Property<std::vector<double> > m_qOverPtBins { this, "sectorQPtBins", {}, "q/pt bins for sector definition"};
52 
54 
55 
57  // Storage pointers
58  std::unique_ptr <FPGATrackSimFitConstantBank> m_FitConstantBank_1st = nullptr;
59  std::unique_ptr <FPGATrackSimFitConstantBank> m_FitConstantBank_2nd = nullptr;
60  std::vector<std::unique_ptr <FPGATrackSimFitConstantBank> > m_FitConstantBankNoGuess_1st;
61  std::vector<std::unique_ptr <FPGATrackSimFitConstantBank> > m_FitConstantBankNoGuess_2nd;
62  std::unique_ptr<FPGATrackSimSectorBank> m_SectorBank_1st = nullptr;
63  std::unique_ptr<FPGATrackSimSectorBank> m_SectorBank_2nd = nullptr;
64  std::unique_ptr<FPGATrackSimSectorSlice> m_SectorSlices = nullptr;
65 
67  // Methods for lazy loading.
68  // missedPlane = -1 means banks where we guess any missing hits
69  bool LoadFitConstantBank_1st(int missedPlane = -1);
70  bool LoadFitConstantBank_2nd(int missedPlane = -1);
71  bool LoadSectorBank_1st();
72  bool LoadSectorBank_2nd();
73  bool LoadSectorSlice();
74 
75 };
76 
77 #endif // TRIGFPGATrackSimBANKSVC_H
FPGATrackSimBankSvc::m_path_NNconstants
Gaudi::Property< std::string > m_path_NNconstants
Definition: FPGATrackSimBankSvc.h:47
FPGATrackSimBankSvc::SectorSlice
virtual const FPGATrackSimSectorSlice * SectorSlice() override
Definition: FPGATrackSimBankSvc.cxx:147
FPGATrackSimBankSvc::m_path_constants_1st_noguess
Gaudi::Property< std::vector< std::string > > m_path_constants_1st_noguess
Definition: FPGATrackSimBankSvc.h:48
FPGATrackSimBankSvc::LoadFitConstantBank_2nd
bool LoadFitConstantBank_2nd(int missedPlane=-1)
Definition: FPGATrackSimBankSvc.cxx:55
FPGATrackSimBankSvc::m_SectorBank_1st
std::unique_ptr< FPGATrackSimSectorBank > m_SectorBank_1st
Definition: FPGATrackSimBankSvc.h:62
FPGATrackSimBankSvc::m_path_constants_2nd
Gaudi::Property< std::string > m_path_constants_2nd
Definition: FPGATrackSimBankSvc.h:40
FPGATrackSimBankSvc::m_FitConstantBank_1st
std::unique_ptr< FPGATrackSimFitConstantBank > m_FitConstantBank_1st
Definition: FPGATrackSimBankSvc.h:58
IFPGATrackSimMappingSvc.h
FPGATrackSimSectorSlice.h
Stores the range of eta/phi/etc. of each sector.
FPGATrackSimFitConstantBank.h
FPGATrackSimBankSvc::SectorBank_2nd
virtual const FPGATrackSimSectorBank * SectorBank_2nd() override
Definition: FPGATrackSimBankSvc.cxx:138
FPGATrackSimBankSvc::LoadSectorSlice
bool LoadSectorSlice()
Definition: FPGATrackSimBankSvc.cxx:82
FPGATrackSimBankSvc::FitConstantBank_2nd
virtual const FPGATrackSimFitConstantBank * FitConstantBank_2nd(int missedPlane=-1) override
Definition: FPGATrackSimBankSvc.cxx:114
FPGATrackSimBankSvc::m_SectorSlices
std::unique_ptr< FPGATrackSimSectorSlice > m_SectorSlices
Definition: FPGATrackSimBankSvc.h:64
FPGATrackSimBankSvc::m_path_sectorslices
Gaudi::Property< std::string > m_path_sectorslices
Definition: FPGATrackSimBankSvc.h:43
FPGATrackSimBankSvc::m_ncoords_2nd
Gaudi::Property< int > m_ncoords_2nd
Definition: FPGATrackSimBankSvc.h:46
FPGATrackSimBankSvc::m_FitConstantBankNoGuess_2nd
std::vector< std::unique_ptr< FPGATrackSimFitConstantBank > > m_FitConstantBankNoGuess_2nd
Definition: FPGATrackSimBankSvc.h:61
FPGATrackSimBankSvc::~FPGATrackSimBankSvc
virtual ~FPGATrackSimBankSvc()=default
FPGATrackSimBankSvc::m_SectorBank_2nd
std::unique_ptr< FPGATrackSimSectorBank > m_SectorBank_2nd
Definition: FPGATrackSimBankSvc.h:63
FPGATrackSimSectorSlice
Definition: FPGATrackSimSectorSlice.h:32
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
FPGATrackSimBankSvc::m_FitConstantBankNoGuess_1st
std::vector< std::unique_ptr< FPGATrackSimFitConstantBank > > m_FitConstantBankNoGuess_1st
Definition: FPGATrackSimBankSvc.h:60
Handler::svc
AthROOTErrorHandlerSvc * svc
Definition: AthROOTErrorHandlerSvc.cxx:10
FPGATrackSimBankSvc::m_path_constants_2nd_noguess
Gaudi::Property< std::vector< std::string > > m_path_constants_2nd_noguess
Definition: FPGATrackSimBankSvc.h:49
FPGATrackSimSectorBank
Definition: FPGATrackSimSectorBank.h:30
FPGATrackSimBankSvc::m_FPGATrackSimMapping
ServiceHandle< IFPGATrackSimMappingSvc > m_FPGATrackSimMapping
Definition: FPGATrackSimBankSvc.h:53
FPGATrackSimBankSvc::m_path_constants_1st
Gaudi::Property< std::string > m_path_constants_1st
Definition: FPGATrackSimBankSvc.h:39
FPGATrackSimBankSvc::LoadSectorBank_2nd
bool LoadSectorBank_2nd()
Definition: FPGATrackSimBankSvc.cxx:74
FPGATrackSimBankSvc::m_ncoords_1st
Gaudi::Property< int > m_ncoords_1st
Definition: FPGATrackSimBankSvc.h:45
FPGATrackSimBankSvc::m_path_sectorbank_1st
Gaudi::Property< std::string > m_path_sectorbank_1st
Definition: FPGATrackSimBankSvc.h:41
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:195
FPGATrackSimFitConstantBank
Definition: FPGATrackSimFitConstantBank.h:24
FPGATrackSimBankSvc::FPGATrackSimBankSvc
FPGATrackSimBankSvc(const std::string &name, ISvcLocator *svc)
Definition: FPGATrackSimBankSvc.cxx:12
FPGATrackSimBankSvc::m_FitConstantBank_2nd
std::unique_ptr< FPGATrackSimFitConstantBank > m_FitConstantBank_2nd
Definition: FPGATrackSimBankSvc.h:59
FPGATrackSimBankSvc::m_bankTypes
Gaudi::Property< std::string > m_bankTypes
Definition: FPGATrackSimBankSvc.h:44
FPGATrackSimBankSvc::m_path_sectorbank_2nd
Gaudi::Property< std::string > m_path_sectorbank_2nd
Definition: FPGATrackSimBankSvc.h:42
IFPGATrackSimBankSvc.h
AthService.h
FPGATrackSimBankSvc::FitConstantBank_1st
virtual const FPGATrackSimFitConstantBank * FitConstantBank_1st(int missedPlane=-1) override
Definition: FPGATrackSimBankSvc.cxx:97
FPGATrackSimBankSvc::m_qOverPtBins
Gaudi::Property< std::vector< double > > m_qOverPtBins
Definition: FPGATrackSimBankSvc.h:51
FPGATrackSimBankSvc::initialize
virtual StatusCode initialize() override
Definition: FPGATrackSimBankSvc.cxx:20
FPGATrackSimBankSvc::SectorBank_1st
virtual const FPGATrackSimSectorBank * SectorBank_1st() override
Definition: FPGATrackSimBankSvc.cxx:131
FPGATrackSimBankSvc
Definition: FPGATrackSimBankSvc.h:16
FPGATrackSimBankSvc::LoadFitConstantBank_1st
bool LoadFitConstantBank_1st(int missedPlane=-1)
Definition: FPGATrackSimBankSvc.cxx:44
FPGATrackSimBankSvc::LoadSectorBank_1st
bool LoadSectorBank_1st()
Definition: FPGATrackSimBankSvc.cxx:66
FPGATrackSimSectorBank.h
This file declares a class that stores the module IDs of the sectors.
ServiceHandle< IFPGATrackSimMappingSvc >
FPGATrackSimBankSvc::m_absQOverPtBinning
Gaudi::Property< bool > m_absQOverPtBinning
Definition: FPGATrackSimBankSvc.h:50