ATLAS Offline Software
Public Member Functions | Private Member Functions | Private Attributes | List of all members
FPGATrackSimBankSvc Class Reference

#include <FPGATrackSimBankSvc.h>

Inheritance diagram for FPGATrackSimBankSvc:
Collaboration diagram for FPGATrackSimBankSvc:

Public Member Functions

 FPGATrackSimBankSvc (const std::string &name, ISvcLocator *svc)
 
virtual ~FPGATrackSimBankSvc ()=default
 
virtual StatusCode initialize () override
 
virtual const FPGATrackSimFitConstantBankFitConstantBank_1st (int missedPlane=-1) override
 
virtual const FPGATrackSimFitConstantBankFitConstantBank_2nd (int missedPlane=-1) override
 
virtual const FPGATrackSimSectorBankSectorBank_1st () override
 
virtual const FPGATrackSimSectorBankSectorBank_2nd () override
 
virtual const FPGATrackSimSectorSliceSectorSlice () override
 

Private Member Functions

bool LoadFitConstantBank_1st (int missedPlane=-1)
 
bool LoadFitConstantBank_2nd (int missedPlane=-1)
 
bool LoadSectorBank_1st ()
 
bool LoadSectorBank_2nd ()
 
bool LoadSectorSlice ()
 

Private Attributes

Gaudi::Property< float > m_phiShift {this, "phiShift", 0.0, "Amount to shift phi for fit cosntant banks"}
 
Gaudi::Property< std::string > m_path_constants_1st {this, "constants_1st", "", "Path of the 1st stage constants"}
 
Gaudi::Property< std::string > m_path_constants_2nd {this, "constants_2nd", "", "Path of the 2nd stage constants"}
 
Gaudi::Property< std::string > m_path_sectorbank_1st {this, "sectorBank_1st", "", "Path of the 1st stage sector bank"}
 
Gaudi::Property< std::string > m_path_sectorbank_2nd {this, "sectorBank_2nd", "", "Path of the 2nd stage sectorbank"}
 
Gaudi::Property< std::string > m_path_sectorslices {this, "sectorSlices", "", "Path of the sector slices"}
 
Gaudi::Property< std::string > m_bankTypes {this, "BankType", "FILE", "FILE or COOL (COOL/DB to be implemented)"}
 
Gaudi::Property< int > m_ncoords_1st {this, "NCoords_1st", 10, "Number of 1st stage coordinates"}
 
Gaudi::Property< int > m_ncoords_2nd {this, "NCoords_2nd", 18, "Number of 2nd stage coordinates"}
 
Gaudi::Property< std::string > m_path_NNconstants {this, "m_path_NNconstants", "", "Path for NN constants"}
 
Gaudi::Property< std::vector< std::string > > m_path_constants_1st_noguess {this, "constantsNoGuess_1st", {}, "Path of the 1st stage constants without guessing"}
 
Gaudi::Property< std::vector< std::string > > m_path_constants_2nd_noguess {this, "constantsNoGuess_2nd", {}, "Path of the 2nd stage constants without guessing"}
 
Gaudi::Property< bool > m_absQOverPtBinning { this, "qptAbsBinning", false, "Controls whether or not to interpret the bins as q/pt or |q/pt|"}
 
Gaudi::Property< std::vector< double > > m_qOverPtBins { this, "sectorQPtBins", {}, "q/pt bins for sector definition"}
 
ServiceHandle< IFPGATrackSimMappingSvcm_FPGATrackSimMapping
 
std::unique_ptr< FPGATrackSimFitConstantBankm_FitConstantBank_1st = nullptr
 
std::unique_ptr< FPGATrackSimFitConstantBankm_FitConstantBank_2nd = nullptr
 
std::vector< std::unique_ptr< FPGATrackSimFitConstantBank > > m_FitConstantBankNoGuess_1st
 
std::vector< std::unique_ptr< FPGATrackSimFitConstantBank > > m_FitConstantBankNoGuess_2nd
 
std::unique_ptr< FPGATrackSimSectorBankm_SectorBank_1st = nullptr
 
std::unique_ptr< FPGATrackSimSectorBankm_SectorBank_2nd = nullptr
 
std::unique_ptr< FPGATrackSimSectorSlicem_SectorSlices = nullptr
 

Detailed Description

Definition at line 15 of file FPGATrackSimBankSvc.h.

Constructor & Destructor Documentation

◆ FPGATrackSimBankSvc()

FPGATrackSimBankSvc::FPGATrackSimBankSvc ( const std::string &  name,
ISvcLocator *  svc 
)

Definition at line 12 of file FPGATrackSimBankSvc.cxx.

12  :
13  base_class(name,svc),
14  m_FPGATrackSimMapping("FPGATrackSimMappingSvc", name)
15 {
16 }

◆ ~FPGATrackSimBankSvc()

virtual FPGATrackSimBankSvc::~FPGATrackSimBankSvc ( )
virtualdefault

Member Function Documentation

◆ FitConstantBank_1st()

const FPGATrackSimFitConstantBank * FPGATrackSimBankSvc::FitConstantBank_1st ( int  missedPlane = -1)
overridevirtual

Definition at line 96 of file FPGATrackSimBankSvc.cxx.

97 {
98  if (missedPlane == -1) {
99  // Don't need to check the return actually, will return nullptr anyways
101 
102  return m_FitConstantBank_1st.get();
103  }
104  else {
105  // Don't need to check the return actually, will return nullptr anyways
106  if (!m_FitConstantBankNoGuess_1st[missedPlane]) LoadFitConstantBank_1st(missedPlane);
107 
108  return m_FitConstantBankNoGuess_1st[missedPlane].get();
109  }
110 }

◆ FitConstantBank_2nd()

const FPGATrackSimFitConstantBank * FPGATrackSimBankSvc::FitConstantBank_2nd ( int  missedPlane = -1)
overridevirtual

Definition at line 113 of file FPGATrackSimBankSvc.cxx.

114 {
115  if (missedPlane == -1) {
116  // Don't need to check the return actually, will return nullptr anyways
118 
119  return m_FitConstantBank_2nd.get();
120  }
121  else {
122  // Don't need to check the return actually, will return nullptr anyways
123  if (!m_FitConstantBankNoGuess_2nd[missedPlane]) LoadFitConstantBank_2nd(missedPlane);
124 
125  return m_FitConstantBankNoGuess_2nd[missedPlane].get();
126  }
127 }

◆ initialize()

StatusCode FPGATrackSimBankSvc::initialize ( )
overridevirtual

Definition at line 20 of file FPGATrackSimBankSvc.cxx.

21 {
22  ATH_MSG_DEBUG("-------------- FPGATrackSimBankSvc -------------------");
23  ATH_MSG_DEBUG("BankType Map = " << m_bankTypes);
24  ATH_MSG_DEBUG("Number of 1st stage coordinates = " << m_ncoords_1st);
25  ATH_MSG_DEBUG("Number of 2nd stage coordinates = " << m_ncoords_2nd);
26  ATH_MSG_DEBUG("-------------------------------------------------");
27 
28  // resize this to the appropriate one and to be safe, set to nullptr to start
29  m_FitConstantBankNoGuess_1st.resize(m_FPGATrackSimMapping->PlaneMap_1st(0)->getNLogiLayers());
30  m_FitConstantBankNoGuess_2nd.resize(m_FPGATrackSimMapping->PlaneMap_2nd(0)->getNLogiLayers());
31  for (unsigned i = 0; i < m_FitConstantBankNoGuess_1st.size(); i++) m_FitConstantBankNoGuess_1st[i] = nullptr;
32  for (unsigned i = 0; i < m_FitConstantBankNoGuess_2nd.size(); i++) m_FitConstantBankNoGuess_2nd[i] = nullptr;
33 
34  return StatusCode::SUCCESS;
35 }

◆ LoadFitConstantBank_1st()

bool FPGATrackSimBankSvc::LoadFitConstantBank_1st ( int  missedPlane = -1)
private

Definition at line 43 of file FPGATrackSimBankSvc.cxx.

44 {
45  if (missedPlane == -1)
46  m_FitConstantBank_1st = std::unique_ptr<FPGATrackSimFitConstantBank>(new FPGATrackSimFitConstantBank(m_FPGATrackSimMapping->PlaneMap_1st(0), m_ncoords_1st, m_path_constants_1st, true, m_phiShift));
47  else
48  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
49 
50  return true;
51 }

◆ LoadFitConstantBank_2nd()

bool FPGATrackSimBankSvc::LoadFitConstantBank_2nd ( int  missedPlane = -1)
private

Definition at line 54 of file FPGATrackSimBankSvc.cxx.

55 {
56  if (missedPlane == -1)
57  m_FitConstantBank_2nd = std::make_unique<FPGATrackSimFitConstantBank> (m_FPGATrackSimMapping->PlaneMap_2nd(0), m_ncoords_2nd, m_path_constants_2nd, false, m_phiShift);
58  else
59  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
60 
61  return true;
62 }

◆ LoadSectorBank_1st()

bool FPGATrackSimBankSvc::LoadSectorBank_1st ( )
private

Definition at line 65 of file FPGATrackSimBankSvc.cxx.

66 {
67  m_SectorBank_1st = std::unique_ptr<FPGATrackSimSectorBank> (new FPGATrackSimSectorBank(m_path_sectorbank_1st));
68  m_SectorBank_1st->storeQOverPtBinning(m_qOverPtBins, m_absQOverPtBinning);
69  return true;
70 }

◆ LoadSectorBank_2nd()

bool FPGATrackSimBankSvc::LoadSectorBank_2nd ( )
private

Definition at line 73 of file FPGATrackSimBankSvc.cxx.

74 {
75  m_SectorBank_2nd = std::unique_ptr<FPGATrackSimSectorBank> (new FPGATrackSimSectorBank(m_path_sectorbank_2nd));
76  m_SectorBank_2nd->storeQOverPtBinning(m_qOverPtBins, m_absQOverPtBinning);
77  return true;
78 }

◆ LoadSectorSlice()

bool FPGATrackSimBankSvc::LoadSectorSlice ( )
private

Definition at line 81 of file FPGATrackSimBankSvc.cxx.

82 {
83  m_SectorSlices = std::unique_ptr<FPGATrackSimSectorSlice> (new FPGATrackSimSectorSlice(m_path_sectorslices));
84  return true;
85 }

◆ SectorBank_1st()

const FPGATrackSimSectorBank * FPGATrackSimBankSvc::SectorBank_1st ( )
overridevirtual

Definition at line 130 of file FPGATrackSimBankSvc.cxx.

131 {
132  // Don't need to check the return actually, will return nullptr anyways
134  return m_SectorBank_1st.get();
135 }

◆ SectorBank_2nd()

const FPGATrackSimSectorBank * FPGATrackSimBankSvc::SectorBank_2nd ( )
overridevirtual

Definition at line 137 of file FPGATrackSimBankSvc.cxx.

138 {
139  // Don't need to check the return actually, will return nullptr anyways
141 
142  return m_SectorBank_2nd.get();
143 }

◆ SectorSlice()

const FPGATrackSimSectorSlice * FPGATrackSimBankSvc::SectorSlice ( )
overridevirtual

Definition at line 146 of file FPGATrackSimBankSvc.cxx.

147 {
148  // Don't need to check the return actually, will return nullptr anyways
150 
151  return m_SectorSlices.get();
152 }

Member Data Documentation

◆ m_absQOverPtBinning

Gaudi::Property<bool> FPGATrackSimBankSvc::m_absQOverPtBinning { this, "qptAbsBinning", false, "Controls whether or not to interpret the bins as q/pt or |q/pt|"}
private

Definition at line 51 of file FPGATrackSimBankSvc.h.

◆ m_bankTypes

Gaudi::Property<std::string> FPGATrackSimBankSvc::m_bankTypes {this, "BankType", "FILE", "FILE or COOL (COOL/DB to be implemented)"}
private

Definition at line 45 of file FPGATrackSimBankSvc.h.

◆ m_FitConstantBank_1st

std::unique_ptr<FPGATrackSimFitConstantBank> FPGATrackSimBankSvc::m_FitConstantBank_1st = nullptr
private

Definition at line 59 of file FPGATrackSimBankSvc.h.

◆ m_FitConstantBank_2nd

std::unique_ptr<FPGATrackSimFitConstantBank> FPGATrackSimBankSvc::m_FitConstantBank_2nd = nullptr
private

Definition at line 60 of file FPGATrackSimBankSvc.h.

◆ m_FitConstantBankNoGuess_1st

std::vector<std::unique_ptr <FPGATrackSimFitConstantBank> > FPGATrackSimBankSvc::m_FitConstantBankNoGuess_1st
private

Definition at line 61 of file FPGATrackSimBankSvc.h.

◆ m_FitConstantBankNoGuess_2nd

std::vector<std::unique_ptr <FPGATrackSimFitConstantBank> > FPGATrackSimBankSvc::m_FitConstantBankNoGuess_2nd
private

Definition at line 62 of file FPGATrackSimBankSvc.h.

◆ m_FPGATrackSimMapping

ServiceHandle<IFPGATrackSimMappingSvc> FPGATrackSimBankSvc::m_FPGATrackSimMapping
private

Definition at line 54 of file FPGATrackSimBankSvc.h.

◆ m_ncoords_1st

Gaudi::Property<int> FPGATrackSimBankSvc::m_ncoords_1st {this, "NCoords_1st", 10, "Number of 1st stage coordinates"}
private

Definition at line 46 of file FPGATrackSimBankSvc.h.

◆ m_ncoords_2nd

Gaudi::Property<int> FPGATrackSimBankSvc::m_ncoords_2nd {this, "NCoords_2nd", 18, "Number of 2nd stage coordinates"}
private

Definition at line 47 of file FPGATrackSimBankSvc.h.

◆ m_path_constants_1st

Gaudi::Property<std::string> FPGATrackSimBankSvc::m_path_constants_1st {this, "constants_1st", "", "Path of the 1st stage constants"}
private

Definition at line 40 of file FPGATrackSimBankSvc.h.

◆ m_path_constants_1st_noguess

Gaudi::Property<std::vector<std::string> > FPGATrackSimBankSvc::m_path_constants_1st_noguess {this, "constantsNoGuess_1st", {}, "Path of the 1st stage constants without guessing"}
private

Definition at line 49 of file FPGATrackSimBankSvc.h.

◆ m_path_constants_2nd

Gaudi::Property<std::string> FPGATrackSimBankSvc::m_path_constants_2nd {this, "constants_2nd", "", "Path of the 2nd stage constants"}
private

Definition at line 41 of file FPGATrackSimBankSvc.h.

◆ m_path_constants_2nd_noguess

Gaudi::Property<std::vector<std::string> > FPGATrackSimBankSvc::m_path_constants_2nd_noguess {this, "constantsNoGuess_2nd", {}, "Path of the 2nd stage constants without guessing"}
private

Definition at line 50 of file FPGATrackSimBankSvc.h.

◆ m_path_NNconstants

Gaudi::Property<std::string> FPGATrackSimBankSvc::m_path_NNconstants {this, "m_path_NNconstants", "", "Path for NN constants"}
private

Definition at line 48 of file FPGATrackSimBankSvc.h.

◆ m_path_sectorbank_1st

Gaudi::Property<std::string> FPGATrackSimBankSvc::m_path_sectorbank_1st {this, "sectorBank_1st", "", "Path of the 1st stage sector bank"}
private

Definition at line 42 of file FPGATrackSimBankSvc.h.

◆ m_path_sectorbank_2nd

Gaudi::Property<std::string> FPGATrackSimBankSvc::m_path_sectorbank_2nd {this, "sectorBank_2nd", "", "Path of the 2nd stage sectorbank"}
private

Definition at line 43 of file FPGATrackSimBankSvc.h.

◆ m_path_sectorslices

Gaudi::Property<std::string> FPGATrackSimBankSvc::m_path_sectorslices {this, "sectorSlices", "", "Path of the sector slices"}
private

Definition at line 44 of file FPGATrackSimBankSvc.h.

◆ m_phiShift

Gaudi::Property<float> FPGATrackSimBankSvc::m_phiShift {this, "phiShift", 0.0, "Amount to shift phi for fit cosntant banks"}
private

Definition at line 39 of file FPGATrackSimBankSvc.h.

◆ m_qOverPtBins

Gaudi::Property<std::vector<double> > FPGATrackSimBankSvc::m_qOverPtBins { this, "sectorQPtBins", {}, "q/pt bins for sector definition"}
private

Definition at line 52 of file FPGATrackSimBankSvc.h.

◆ m_SectorBank_1st

std::unique_ptr<FPGATrackSimSectorBank> FPGATrackSimBankSvc::m_SectorBank_1st = nullptr
private

Definition at line 63 of file FPGATrackSimBankSvc.h.

◆ m_SectorBank_2nd

std::unique_ptr<FPGATrackSimSectorBank> FPGATrackSimBankSvc::m_SectorBank_2nd = nullptr
private

Definition at line 64 of file FPGATrackSimBankSvc.h.

◆ m_SectorSlices

std::unique_ptr<FPGATrackSimSectorSlice> FPGATrackSimBankSvc::m_SectorSlices = nullptr
private

Definition at line 65 of file FPGATrackSimBankSvc.h.


The documentation for this class was generated from the following files:
FPGATrackSimBankSvc::m_path_constants_1st_noguess
Gaudi::Property< std::vector< std::string > > m_path_constants_1st_noguess
Definition: FPGATrackSimBankSvc.h:49
FPGATrackSimBankSvc::LoadFitConstantBank_2nd
bool LoadFitConstantBank_2nd(int missedPlane=-1)
Definition: FPGATrackSimBankSvc.cxx:54
FPGATrackSimBankSvc::m_SectorBank_1st
std::unique_ptr< FPGATrackSimSectorBank > m_SectorBank_1st
Definition: FPGATrackSimBankSvc.h:63
FPGATrackSimBankSvc::m_path_constants_2nd
Gaudi::Property< std::string > m_path_constants_2nd
Definition: FPGATrackSimBankSvc.h:41
FPGATrackSimBankSvc::m_FitConstantBank_1st
std::unique_ptr< FPGATrackSimFitConstantBank > m_FitConstantBank_1st
Definition: FPGATrackSimBankSvc.h:59
FPGATrackSimBankSvc::LoadSectorSlice
bool LoadSectorSlice()
Definition: FPGATrackSimBankSvc.cxx:81
FPGATrackSimBankSvc::m_SectorSlices
std::unique_ptr< FPGATrackSimSectorSlice > m_SectorSlices
Definition: FPGATrackSimBankSvc.h:65
FPGATrackSimBankSvc::m_path_sectorslices
Gaudi::Property< std::string > m_path_sectorslices
Definition: FPGATrackSimBankSvc.h:44
FPGATrackSimBankSvc::m_ncoords_2nd
Gaudi::Property< int > m_ncoords_2nd
Definition: FPGATrackSimBankSvc.h:47
FPGATrackSimBankSvc::m_FitConstantBankNoGuess_2nd
std::vector< std::unique_ptr< FPGATrackSimFitConstantBank > > m_FitConstantBankNoGuess_2nd
Definition: FPGATrackSimBankSvc.h:62
FPGATrackSimBankSvc::m_phiShift
Gaudi::Property< float > m_phiShift
Definition: FPGATrackSimBankSvc.h:39
FPGATrackSimBankSvc::m_SectorBank_2nd
std::unique_ptr< FPGATrackSimSectorBank > m_SectorBank_2nd
Definition: FPGATrackSimBankSvc.h:64
lumiFormat.i
int i
Definition: lumiFormat.py:85
FPGATrackSimSectorSlice
Definition: FPGATrackSimSectorSlice.h:32
ATH_MSG_DEBUG
#define ATH_MSG_DEBUG(x)
Definition: AthMsgStreamMacros.h:29
FPGATrackSimBankSvc::m_FitConstantBankNoGuess_1st
std::vector< std::unique_ptr< FPGATrackSimFitConstantBank > > m_FitConstantBankNoGuess_1st
Definition: FPGATrackSimBankSvc.h:61
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:50
FPGATrackSimSectorBank
Definition: FPGATrackSimSectorBank.h:32
FPGATrackSimBankSvc::m_FPGATrackSimMapping
ServiceHandle< IFPGATrackSimMappingSvc > m_FPGATrackSimMapping
Definition: FPGATrackSimBankSvc.h:54
FPGATrackSimBankSvc::m_path_constants_1st
Gaudi::Property< std::string > m_path_constants_1st
Definition: FPGATrackSimBankSvc.h:40
FPGATrackSimBankSvc::LoadSectorBank_2nd
bool LoadSectorBank_2nd()
Definition: FPGATrackSimBankSvc.cxx:73
FPGATrackSimBankSvc::m_ncoords_1st
Gaudi::Property< int > m_ncoords_1st
Definition: FPGATrackSimBankSvc.h:46
FPGATrackSimBankSvc::m_path_sectorbank_1st
Gaudi::Property< std::string > m_path_sectorbank_1st
Definition: FPGATrackSimBankSvc.h:42
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:228
FPGATrackSimFitConstantBank
Definition: FPGATrackSimFitConstantBank.h:24
FPGATrackSimBankSvc::m_FitConstantBank_2nd
std::unique_ptr< FPGATrackSimFitConstantBank > m_FitConstantBank_2nd
Definition: FPGATrackSimBankSvc.h:60
FPGATrackSimBankSvc::m_bankTypes
Gaudi::Property< std::string > m_bankTypes
Definition: FPGATrackSimBankSvc.h:45
FPGATrackSimBankSvc::m_path_sectorbank_2nd
Gaudi::Property< std::string > m_path_sectorbank_2nd
Definition: FPGATrackSimBankSvc.h:43
FPGATrackSimBankSvc::m_qOverPtBins
Gaudi::Property< std::vector< double > > m_qOverPtBins
Definition: FPGATrackSimBankSvc.h:52
FPGATrackSimBankSvc::LoadFitConstantBank_1st
bool LoadFitConstantBank_1st(int missedPlane=-1)
Definition: FPGATrackSimBankSvc.cxx:43
FPGATrackSimBankSvc::LoadSectorBank_1st
bool LoadSectorBank_1st()
Definition: FPGATrackSimBankSvc.cxx:65
FPGATrackSimBankSvc::m_absQOverPtBinning
Gaudi::Property< bool > m_absQOverPtBinning
Definition: FPGATrackSimBankSvc.h:51