Belle II Software  release-05-01-25
Hough3DUtility.h
1 #ifndef HOUGH3DUTILITY_H
2 #include <vector>
3 #include <TVectorD.h>
4 #define HOUGH3DUTILITY_H
5 
6 namespace Belle2 {
11  class TRGCDCJSignal;
12  class TRGCDCJLUT;
13  class TRGCDCJSignalData;
15 }
16 
19 public:
21  Hough3DFinder(void);
23  ~Hough3DFinder(void);
25  void setMode(int mode);
27  int getMode(void);
31  void initialize(TVectorD& geometryVariables , std::vector<float >& initVariables);
33  void destruct(void);
37  void runFinder(std::vector<double>& trackVariables, std::vector<std::vector<double> >& stTSs,
38  std::vector<std::vector<int> >& stTSDrift);
41  void initVersion1(std::vector<float >& initVariables);
43  void initVersion2(std::vector<float >& initVariables);
45  void initVersion3(std::vector<float >& initVariables);
47  void setInputFileName(std::string inputFileName);
49  void destVersion1(void);
51  void destVersion2(void);
53  void destVersion3(void);
55  void runFinderVersion1(std::vector<double>& trackVariables, std::vector<std::vector<double> >& stTSs, std::vector<double>& tsArcS,
56  std::vector<std::vector<double> >& tsZ);
58  void runFinderVersion2(std::vector<double>& trackVariables, std::vector<std::vector<double> >& stTSs,
59  std::vector<std::vector<int> >& stTSDrift);
61  void runFinderVersion3(std::vector<double>& trackVariables, std::vector<std::vector<double> >& stTSs,
62  std::vector<std::vector<int> >& stTSDrift);
64  void getValues(const std::string& input, std::vector<double>& result);
66  void getHoughMeshLayer(bool***& houghMeshLayer);
69  int m_mode;
71  int m_nWires[4];
73  double m_rr[4];
75  double m_ztostraw[4];
77  double m_anglest[4];
79  double m_Trg_PI;
82  double m_cotStart;
84  double m_cotEnd;
86  double m_z0Start;
88  double m_z0End;
94  double m_cotStepSize;
96  double m_z0StepSize;
102  int** m_houghMesh;
106  bool** m_hitMap;
108  int** m_driftMap;
111  std::vector< std::vector< int> >* m_geoCandidatesIndex;
113  std::vector< std::vector< double> >* m_geoCandidatesPhi;
115  std::vector< std::vector< double> >* m_geoCandidatesDiffStWires;
117  double m_stAxPhi[4];
120  double m_bestCot;
122  double m_bestZ0;
124  double m_houghMax;
128  double m_foundZ[4];
130  double m_foundPhiSt[4];
134  double m_bestTS[4];
137  std::string m_inputFileName;
140  std::vector<double> m_FPGAInput;
144  std::vector<double> m_FPGAOutput;
147  double m_findRhoMax;
149  double m_findRhoMin;
180  double m_rhoMax;
182  double m_rhoMin;
184  int m_rhoBit;
186  double m_phi0Max;
188  double m_phi0Min;
195  bool m_LUT;
197  int** m_arcCosLUT;
200 
202  std::map<std::string, Belle2::TRGCDCJSignal> m_mSignalStorage;
204  std::map<std::string, Belle2::TRGCDCJLUT*> m_mLutStorage;
208  std::map<std::string, std::vector<signed long long> > m_mSavedSignals;
210  std::map<std::string, std::vector<signed long long> > m_mSavedIoSignals;
212  std::map<std::string, bool> m_mBool;
214  std::string m_outputVhdlDirname;
216  std::string m_outputLutDirname;
217 
218 
219 };
220 
221 #ifdef __CINT__
222 #include "../src/Hough3DUtility.cc"
223 #endif
224 
225 #endif
Hough3DFinder::m_FPGAOutput
std::vector< double > m_FPGAOutput
[arcCos0, arcCos1, arcCos2, arcCos3, bestTSIndex0, bestTSIndex1, bestTSIndex2, bestTSIndex3] Holds ou...
Definition: Hough3DUtility.h:144
Hough3DFinder::m_phi0Max
double m_phi0Max
The phi0 max value for integer geo finder.
Definition: Hough3DUtility.h:186
Hough3DFinder::m_anglest
double m_anglest[4]
Holds the tan theta of streo super layer in radian.
Definition: Hough3DUtility.h:77
Hough3DFinder::destVersion2
void destVersion2(void)
Destructs the 3D finder for mode 2.
Definition: Hough3DUtility.cc:280
Hough3DFinder::runFinder
void runFinder(std::vector< double > &trackVariables, std::vector< std::vector< double > > &stTSs, std::vector< std::vector< int > > &stTSDrift)
Track variables.
Definition: Hough3DUtility.cc:128
Hough3DFinder::setInputFileName
void setInputFileName(std::string inputFileName)
Sets the config file for the GeoFinder.
Definition: Hough3DUtility.cc:255
Hough3DFinder::runFinderVersion3
void runFinderVersion3(std::vector< double > &trackVariables, std::vector< std::vector< double > > &stTSs, std::vector< std::vector< int > > &stTSDrift)
Uses the 3D finder for mode 3.
Definition: Hough3DUtility.cc:617
Hough3DFinder::runFinderVersion2
void runFinderVersion2(std::vector< double > &trackVariables, std::vector< std::vector< double > > &stTSs, std::vector< std::vector< int > > &stTSDrift)
Uses the 3D finder for mode 2.
Definition: Hough3DUtility.cc:516
Hough3DFinder::m_outputLutDirname
std::string m_outputLutDirname
Output directory for luts.
Definition: Hough3DUtility.h:216
Hough3DFinder::m_findPhi0IntMax
double m_findPhi0IntMax
Holds the maximum value for integer phi0.
Definition: Hough3DUtility.h:159
Hough3DFinder::m_rr
double m_rr[4]
Holds the radius for stereo super layer in cm.
Definition: Hough3DUtility.h:73
Hough3DFinder::m_mSavedIoSignals
std::map< std::string, std::vector< signed long long > > m_mSavedIoSignals
Array of I/O signals.
Definition: Hough3DUtility.h:210
Hough3DFinder::m_bestTS
double m_bestTS[4]
The phi location of the found TSs.
Definition: Hough3DUtility.h:134
Hough3DFinder::m_z0End
double m_z0End
Hough mesh z0 end range.
Definition: Hough3DUtility.h:88
Hough3DFinder::m_mBool
std::map< std::string, bool > m_mBool
Map to hold input options.
Definition: Hough3DUtility.h:212
Hough3DFinder::m_findRhoMin
double m_findRhoMin
Holds the minimum value for rho.
Definition: Hough3DUtility.h:149
Hough3DFinder::m_findPhiZMax
double m_findPhiZMax
Holds the maximum for fitted axial phi location between superlayers.
Definition: Hough3DUtility.h:171
Hough3DFinder::destVersion3
void destVersion3(void)
Destructs the 3D finder for mode 3.
Definition: Hough3DUtility.cc:293
Hough3DFinder::m_geoCandidatesDiffStWires
std::vector< std::vector< double > > * m_geoCandidatesDiffStWires
The number of wires difference from fitted axial phi location.
Definition: Hough3DUtility.h:115
Hough3DFinder::m_findArcCosMin
double m_findArcCosMin
Holds the minimum value for arc cos(radius/2/rho).
Definition: Hough3DUtility.h:165
Hough3DFinder::m_nWires
int m_nWires[4]
Holds the number of wires for stereo superlayer.
Definition: Hough3DUtility.h:71
Hough3DFinder::m_foundPhiSt
double m_foundPhiSt[4]
The phi location for streo superlayer using found z0 and cot values for track.
Definition: Hough3DUtility.h:130
Hough3DFinder::m_mode
int m_mode
Members.
Definition: Hough3DUtility.h:69
Hough3DFinder::m_findArcCosIntMin
double m_findArcCosIntMin
Holds the minimum value for intger arc cos(radius/2/rho).
Definition: Hough3DUtility.h:169
Hough3DFinder::getHoughMeshLayer
void getHoughMeshLayer(bool ***&houghMeshLayer)
Gets the Hough plane for the 3D finder.
Definition: Hough3DUtility.cc:1280
Hough3DFinder::m_geoCandidatesPhi
std::vector< std::vector< double > > * m_geoCandidatesPhi
The phi for stereo superlayer hits.
Definition: Hough3DUtility.h:113
Hough3DFinder::m_findArcCosMax
double m_findArcCosMax
Holds the maximum value for arc cos(radius/2/rho).
Definition: Hough3DUtility.h:163
Hough3DFinder::Hough3DFinder
Hough3DFinder(void)
3D finder constructor.
Definition: Hough3DUtility.cc:17
Hough3DFinder::m_cotStepSize
double m_cotStepSize
Holds the size of Hough mesh for cot.
Definition: Hough3DUtility.h:94
Hough3DFinder::m_findPhi0Min
double m_findPhi0Min
Holds the minimum value for phi0.
Definition: Hough3DUtility.h:157
Hough3DFinder::m_findArcCosIntMax
double m_findArcCosIntMax
Holds the maximum value for intger arc cos(radius/2/rho).
Definition: Hough3DUtility.h:167
Hough3DFinder::m_findPhiZIntMin
double m_findPhiZIntMin
Holds the minimum value for fitted integer axial phi location between superlayers.
Definition: Hough3DUtility.h:177
Hough3DFinder::m_findPhi0IntMin
double m_findPhi0IntMin
Holds the minimum value for integer phi0.
Definition: Hough3DUtility.h:161
Hough3DFinder::m_minDiffHough
double m_minDiffHough
The minimum z diff between all Hough votes that have maximum vote number.
Definition: Hough3DUtility.h:126
Hough3DFinder::initialize
void initialize(TVectorD &geometryVariables, std::vector< float > &initVariables)
Geometry variables.
Definition: Hough3DUtility.cc:63
Hough3DFinder::m_wireConvertLUT
int ** m_wireConvertLUT
Memory for wire convert LUT.
Definition: Hough3DUtility.h:199
Hough3DFinder::m_findPhiZIntMax
double m_findPhiZIntMax
Holds the maximum value for fitted integer axial phi location between superlayers.
Definition: Hough3DUtility.h:175
Hough3DFinder::m_houghMesh
int ** m_houghMesh
Map that combines the number of Hough votes for all stereo superlayers.
Definition: Hough3DUtility.h:102
Hough3DFinder::m_foundZ
double m_foundZ[4]
The z location for stereo superlayer using found z0 and cot values for track.
Definition: Hough3DUtility.h:128
Hough3DFinder::m_stAxWireFactor
int m_stAxWireFactor
A factor that changes phi space to wire space.
Definition: Hough3DUtility.h:192
Hough3DFinder::m_FPGAInput
std::vector< double > m_FPGAInput
[rho, phi0, sign] Holds input values of the GeoFinder.
Definition: Hough3DUtility.h:140
Belle2::TRGCDCJSignalData
A class to hold common data for JSignals.
Definition: JSignalData.h:34
Hough3DFinder::m_houghMeshLayerDiff
float *** m_houghMeshLayerDiff
Hold the minimum z differences for the Hough vote in a stereo superlayer.
Definition: Hough3DUtility.h:98
Hough3DFinder::m_mSavedSignals
std::map< std::string, std::vector< signed long long > > m_mSavedSignals
Array of saved signals.
Definition: Hough3DUtility.h:208
Hough3DFinder::m_bestZ0
double m_bestZ0
The found z0 value for track.
Definition: Hough3DUtility.h:122
Hough3DFinder::m_findRhoIntMax
double m_findRhoIntMax
Holds the maximum value for integer rho.
Definition: Hough3DUtility.h:151
Hough3DFinder::m_cotStart
double m_cotStart
Hough finder variables.
Definition: Hough3DUtility.h:82
Hough3DFinder::getMode
int getMode(void)
Gets which 3D finder is used.
Definition: Hough3DUtility.cc:58
Hough3DFinder::m_houghMax
double m_houghMax
The maximum vote number for track.
Definition: Hough3DUtility.h:124
Hough3DFinder
A class to finded stereo TS hits related to 2D tracks.
Definition: Hough3DUtility.h:18
Belle2
Abstract base class for different kinds of events.
Definition: MillepedeAlgorithm.h:19
Hough3DFinder::m_cotEnd
double m_cotEnd
Hough mesh cot end range.
Definition: Hough3DUtility.h:84
Hough3DFinder::m_bestCot
double m_bestCot
Finder results.
Definition: Hough3DUtility.h:120
Hough3DFinder::m_phi0Min
double m_phi0Min
The phi0 min value for integer geo finder.
Definition: Hough3DUtility.h:188
Hough3DFinder::m_findPhiZMin
double m_findPhiZMin
Holds the minimum value for fitted axial phi location between superlayers.
Definition: Hough3DUtility.h:173
Hough3DFinder::initVersion3
void initVersion3(std::vector< float > &initVariables)
Initializes the 3D finder for mode 3.
Definition: Hough3DUtility.cc:219
Hough3DFinder::runFinderVersion1
void runFinderVersion1(std::vector< double > &trackVariables, std::vector< std::vector< double > > &stTSs, std::vector< double > &tsArcS, std::vector< std::vector< double > > &tsZ)
Uses the 3D finder for mode 1.
Definition: Hough3DUtility.cc:321
Hough3DFinder::m_outputVhdlDirname
std::string m_outputVhdlDirname
Output directory for vhdl.
Definition: Hough3DUtility.h:214
Hough3DFinder::destruct
void destruct(void)
Destructs the 3D finder.
Definition: Hough3DUtility.cc:111
Hough3DFinder::destVersion1
void destVersion1(void)
Destructs the 3D finder for mode 1.
Definition: Hough3DUtility.cc:260
Hough3DFinder::~Hough3DFinder
~Hough3DFinder(void)
3D finder destructor.
Definition: Hough3DUtility.cc:48
Hough3DFinder::m_nZ0Steps
int m_nZ0Steps
Number of Hough meshes for z0.
Definition: Hough3DUtility.h:92
Hough3DFinder::m_stAxPhi
double m_stAxPhi[4]
The fitted axial phi for stereo superlayers.
Definition: Hough3DUtility.h:117
Hough3DFinder::m_commonData
Belle2::TRGCDCJSignalData * m_commonData
For VHDL code.
Definition: Hough3DUtility.h:206
Hough3DFinder::m_geoCandidatesIndex
std::vector< std::vector< int > > * m_geoCandidatesIndex
GeoFinder Variables.
Definition: Hough3DUtility.h:111
Hough3DFinder::m_phi0Bit
int m_phi0Bit
The number of bits of phi0 for integer geo finder.
Definition: Hough3DUtility.h:190
Hough3DFinder::m_LUT
bool m_LUT
FPGA LUTs A flag to check if acos LUT and wire convert LUT was set for geo finder.
Definition: Hough3DUtility.h:195
Hough3DFinder::m_ztostraw
double m_ztostraw[4]
Holds the length of for stereo super layer from center in cm.
Definition: Hough3DUtility.h:75
Hough3DFinder::m_mLutStorage
std::map< std::string, Belle2::TRGCDCJLUT * > m_mLutStorage
Map to hold JLuts.
Definition: Hough3DUtility.h:204
Hough3DFinder::m_houghMeshLayer
bool *** m_houghMeshLayer
Map to check if there is a Hough vote in a stereo superlayer.
Definition: Hough3DUtility.h:100
Hough3DFinder::m_rhoMin
double m_rhoMin
The rho min value for integer geo finder.
Definition: Hough3DUtility.h:182
Hough3DFinder::m_inputFileName
std::string m_inputFileName
Version3 (GeoFinder Integer space) GeoFinder input file for parameters.
Definition: Hough3DUtility.h:137
Hough3DFinder::m_z0StepSize
double m_z0StepSize
Holds the size of Hough mesh for z0.
Definition: Hough3DUtility.h:96
Hough3DFinder::m_findPhi0Max
double m_findPhi0Max
Holds the maximum value for phi0.
Definition: Hough3DUtility.h:155
Hough3DFinder::m_hitMap
bool ** m_hitMap
Hit map for all streo superlayers.
Definition: Hough3DUtility.h:106
Hough3DFinder::m_rhoMax
double m_rhoMax
Integer space The rho max value for integer geo finder.
Definition: Hough3DUtility.h:180
Hough3DFinder::m_z0Start
double m_z0Start
Hough mesh z0 start range.
Definition: Hough3DUtility.h:86
Hough3DFinder::m_Trg_PI
double m_Trg_PI
Hold the PI value.
Definition: Hough3DUtility.h:79
Hough3DFinder::setMode
void setMode(int mode)
Sets which 3D finder to use.
Definition: Hough3DUtility.cc:53
Hough3DFinder::m_bestTSIndex
int m_bestTSIndex[4]
The hit index of the found TSs.
Definition: Hough3DUtility.h:132
Hough3DFinder::initVersion2
void initVersion2(std::vector< float > &initVariables)
Initializes the 3D finder for mode 2.
Definition: Hough3DUtility.cc:204
Hough3DFinder::m_arcCosLUT
int ** m_arcCosLUT
Memory for acos LUT.
Definition: Hough3DUtility.h:197
Hough3DFinder::m_rhoBit
int m_rhoBit
The number of bits of rho for integer geo finder.
Definition: Hough3DUtility.h:184
Hough3DFinder::m_nCotSteps
int m_nCotSteps
Number of Hough meshes for cot.
Definition: Hough3DUtility.h:90
Hough3DFinder::m_findRhoIntMin
double m_findRhoIntMin
Holds the minimum value for integer rho.
Definition: Hough3DUtility.h:153
Hough3DFinder::getValues
void getValues(const std::string &input, std::vector< double > &result)
Gets results from the 3D finder.
Definition: Hough3DUtility.cc:1132
Hough3DFinder::m_houghMeshDiff
float ** m_houghMeshDiff
Map that combines the z differences for all stereo superlayers.
Definition: Hough3DUtility.h:104
Hough3DFinder::initVersion1
void initVersion1(std::vector< float > &initVariables)
Init variables.
Definition: Hough3DUtility.cc:173
Hough3DFinder::m_findRhoMax
double m_findRhoMax
Find min and max values Holds the maximum value for rho.
Definition: Hough3DUtility.h:147
Hough3DFinder::m_driftMap
int ** m_driftMap
Drift map for all streo superlayers.
Definition: Hough3DUtility.h:108
Hough3DFinder::m_mSignalStorage
std::map< std::string, Belle2::TRGCDCJSignal > m_mSignalStorage
Map to hold JSignals.
Definition: Hough3DUtility.h:202