 |
Belle II Software
release-05-02-19
|
2 #include <framework/core/Module.h>
3 #include <trg/cdc/Cosim.h>
14 #include "trg/cdc/modules/houghtracking/xsi_loader.h"
22 class CDCTriggerSegmentHit;
25 using tsOut = std::array<unsigned, 4>;
68 void event()
override;
99 using tsVector = std::array<char, m_tsVectorWidth>;
129 auto toTSSLV(
const std::bitset<m_tsVectorWidth>);
140 std::string
cwd = getcurrentdir();
int m_nClockPerEvent
how many clocks to simulate per event
s_xsi_setup_info info
s_xsi_setup_info from Xilinx software
std::vector< std::bitset< m_tsVectorWidth > > tsArrayPerSL
TS array per SL.
static const int m_nOutTracksPerClock
number of output tracks per clock
std::string design_libname
path to the simulation snapshot
int out
output signal port handle.
static const int m_nInTSPerClock
number of input ts hits per clock
char t2d_out[width_out]
char array holding 2D output data
TRGFinderTrack decodeTrack(std::string trackIn)
decode the 2D track info
void initializeFastSim()
initialize fast TSIM function
std::string lib_extension
extension of lib
static constexpr int nAxialSuperLayer
number of axial SL
std::array< tsOut, 5 > tsOutArray
TS array.
This class is the interface between the 2D finder fast simulation module and the firmware simulation ...
int localSegmentID(int globalID)
Calculate local segment ID from global ID.
void loadFromFirmware(int iclock)
load data from firmware
auto toTSSLV(const std::bitset< m_tsVectorWidth >)
Turn TS bitset into char array.
auto encodeTSHit(CDCTriggerSegmentHit const *)
Encode a TS hit into std_logic_vector.
std::string cwd
current diretory
std::string m_outputCollectionName
Name of the StoreArray containing the tracks found by the Hough tracking.
double omega
omega of a 2D track
tsArray m_tsHitVector
TS array.
static const int m_tsVectorWidth
width of TS hit input signal vector
std::string m_hitCollectionName
Name of the StoreArray containing the input track segment hits.
CDCTrigger2DFinderFirmwareModule()
Constructor.
Abstract base class for different kinds of events.
static const int width_in
width of (half-speed) input data width
int m_debugLevel
debug level: better description needed.
virtual ~CDCTrigger2DFinderFirmwareModule()
Destructor.
std::vector< tsArrayPerClock > tsArray
TS array.
std::array< unsigned, 4 > tsOut
TS.
bool m_fromFastSim
flag to read TS hits from the output of TSF firmware simulation
void loadFromFastSim(unsigned iclock)
load data from fast TSIM function
int clk
clock signal port handle.
void decodeOutput(short latency)
decode the output info
Note: VHDL std_logic value is stored in a byte (char).
int tsfPort[5]
input signal port handle.
Xsi::Loader * Xsi_Instance
Xsi loader from Xilinx software.
std::array< char, width_in > inputVector
input array
tsOutArray ts
TS array of a 2D track.
std::string m_bitstreamNameTo2D
Name of the StoreArray holding the raw bit content to 2D trackers
std::array< inputVector, 5 > tsfInput
array holding 5 axial TSF input data
void initialize() override
Load the design snapshot and register the signal ports.
std::array< char, width_out > finderOutput
array holding 2D output data
static const int width_out
width of output data width, not including the clock counter
double phi0
phi0 of a 2D track
Combination of several CDCHits to a track segment hit for the trigger.
std::array< tsArrayPerSL, nAxialSuperLayer > tsArrayPerClock
TS array per clock.
std::string simengine_libname
path to the simulation engine
std::array< char, m_tsVectorWidth > tsVector
array of TS
void event() override
Things to do for each event.