|
ATLAS Offline Software
|
Go to the documentation of this file.
3 #ifndef FPGATrackSimConstGenAlgo_h
4 #define FPGATrackSimConstGenAlgo_h
27 #include "GaudiKernel/ITHistSvc.h"
51 std::vector<double>
Vd0;
54 std::vector<double>
Vz0;
107 Gaudi::Property<std::string>
m_cfpath{
this,
"merged_file_path",
"",
"merged file"};
108 Gaudi::Property<std::string>
m_skipFile{
this,
"skip_sectors",
"File with list of sectors to skip"};
109 Gaudi::Property<bool>
m_Monitor{
this,
"Monitor",
false,
"flag to enable the monitor"};
110 Gaudi::Property<int>
m_region{
this,
"region",0,
"region to run"};
111 Gaudi::Property<bool>
m_CheckGood2ndStage{
this,
"CheckGood2ndStage",
true,
"Check goodness of 2nd stage fit constants?"};
113 Gaudi::Property<bool>
m_isSecondStage{
this,
"IsSecondStage",
false,
"If false, we're doing a 1st stage fit, otherwise 2nd stage"};
114 Gaudi::Property<bool>
m_dumpMissingHitsConstants{
this,
"missHitsConsts",
false,
"if this is true we dump constants assuming a missing hit in each layer, too"};
177 std::vector<double>
const & inv_covariance,
179 std::vector<double>
matrix_multiply(std::vector<double>
const &
A, std::vector<double>
const &
b);
180 void eigen(
size_t n_redu,
size_t n_full, TMatrixD &mtx, std::vector<bool>
const & usable, std::vector<double> & eigvals_v,
vector2D<double> & eigvecs_v);
181 std::vector<double>
invert(
size_t n_full, TMatrixD mtx, std::vector<bool>
const & usable);
182 TMatrixD
getReducedMatrix(
size_t n, std::vector<double>
const & mtx_v, std::vector<bool>
const & usable,
size_t nDimToUse);
184 double dot(
const double* vec1,
const double*
vec2,
size_t size);
191 #endif // FPGATrackSimConstGenAlgo_h
void generate_constants()
std::vector< D3PDTest::MyVec2 > vec2
Gaudi::Property< bool > m_CheckGood2ndStage
vector2D< double > kernel
geo_constants calculate_gcorth(geo_constants geo, int nCoords, std::vector< bool > const &usable)
virtual ~FPGATrackSimConstGenAlgo()=default
void eigen(size_t n_redu, size_t n_full, TMatrixD &mtx, std::vector< bool > const &usable, std::vector< double > &eigvals_v, vector2D< double > &eigvecs_v)
Maps physical layers to logical layers.
bool isNAN(double value, const char *name)
Gaudi::Property< std::string > m_skipFile
double dot(const double *vec1, const double *vec2, size_t size)
StatusCode execute() override
Gaudi::Property< bool > m_Monitor
void DumpConstants(std::vector< geo_constants > &geo_consts, std::string &filename)
FPGATrackSimTrackPars m_sliceMax
ServiceHandle< ITHistSvc > m_tHistSvc
StatusCode initialize() override
Gaudi::Property< int > m_region
bool GetConstants(FPGATrackSimMatrixAccumulator const &acc_norm, geo_constants &geo, int entryNumber)
std::vector< bool > m_skipList
const FPGATrackSimPlaneMap * m_pmap
Gaudi::Property< bool > m_isSecondStage
std::vector< double > matrix_multiply(std::vector< double > const &A, std::vector< double > const &b)
TMatrixD getReducedMatrix(size_t n, std::vector< double > const &mtx_v, std::vector< bool > const &usable, size_t nDimToUse)
Removes the rows/columns specified by !usable.
FPGATrackSimMatrixAccumulator normalize(FPGATrackSimMatrixAccumulator const &acc_raw)
StatusCode finalize() override
Defines several vector wrappers for homogenous multi-dimensional vectors, declared as 1D arrays for l...
Gaudi::Property< bool > m_useHitScaleFactor
FPGATrackSimTrackParsI m_sliceNBins
::StatusCode StatusCode
StatusCode definition for legacy code.
std::vector< double > Vcurvature
std::vector< std::vector< geo_constants > > m_geo_consts_with_missinghit
std::vector< double > Vd0
std::vector< geo_constants > m_geo_consts
FPGATrackSimConstGenAlgo(const std::string &name, ISvcLocator *pSvcLocator)
FPGATrackSimTrackPars pars
bool failedConstants(geo_constants const &geo, std::vector< bool > const &usable)
FPGATrackSimTrackPars m_sliceMin
Helper struct for accumulating sector information for matrix generation.
bool isSingular(TMatrixD mtx)
geo_constants(size_t nCoords)
std::vector< double > Vz0
void createMissingHitsConstants(FPGATrackSimMatrixAccumulator const &acc_norm, size_t entry)
geo_constants makeConsts(FPGATrackSimMatrixAccumulator const &acc, std::vector< bool > const &usable, std::vector< double > const &inv_covariance, std::vector< double > const &eigvals, vector2D< double > const &eigvecs)
std::vector< double > Veta
std::vector< double > invert(size_t n_full, TMatrixD mtx, std::vector< bool > const &usable)
Inverts a reduced matrix, then pads with zeros to recover a full-sized matrix.
StatusCode bookHistograms()
ServiceHandle< IFPGATrackSimMappingSvc > m_FPGATrackSimMapping
def TH1F(name, title, nxbins, bins_par2, bins_par3=None, path='', **kwargs)
void readSkipList(size_t nEntries)
Gaudi::Property< bool > m_dumpMissingHitsConstants
std::vector< double > Vphi
StatusCode prepareOutputTree()
std::vector< double > kaverages
StatusCode copySliceTree(TFile *file)
Gaudi::Property< std::string > m_cfpath
void fillConstTree(std::vector< module_t > &modules, FPGATrackSimMatrixAccumulator &acc, geo_constants &geo)