Introduction:
The main objective of XFTSim is to emulate XFT Finder and Linker algorithm.
XFTSim finds Finder track segment and Linker track information from XTC
prompt, delayed COT hit information. It also provides monitoring tool to compare
simulated XFT data to data from real hardware XFT.
Its simluated data can be provided to TrigMon to be compared with
real data as well as used for stand-alone monitoring purpose.
Using the ability to access database, it can adjust itself to accomodate different
run environments such as different beam positions, different finder designs.
All these adjustment can be controlled by modifying .tcl file to operate XFTSim.
Code
The following classes have been designed and coded (package XFTSim):
-
XFTSim: public AppModule
is the main module (the implementation code is in XFTSim.cc and XFTMonitor.cc)
-
XFTSim.cc
contains beginRun/endRun/beginJob etc general methods;
-
XFTMonitor.cc
contains monitoring (comparing with real data) routines
-
XFTSys
contains whole XFT components. It is top level object of XFT system. You can access sub systems
of XFT from this class.
In the class XFTSim,
there are several methods implementing the various steps of the simulation.
The most important are:
-
XFTSim::beginRun(AbsEvent* Event) reads finder design flashram content,
deadwire info, linker road file for specific beam position from database,
and initializes XFTSys object.
-
XFTSim::event( AbsEvent* anEvent )
Simulates XFT System using execute( ) (or executeXXX( ) for different .tcl setup) methods in XFTSys class.
Write the result on XFFD or XFLD bank with diffenrent 'description tag' ("Simulated Trigger Bank")
and does comparison with real data by calling methods in XFTMonitor.cc (if applicable).
In the file XFTMonitor.cc,
there are several methods implementing the various steps of comparison for monitoring.
The most important are:
-
XFTSim::XFFD_monitor(AbsEvent* record) Compare XFFD contents between simulation and real data.
-
XFTSim::XFLD_monitor(AbsEvent* record) Compare XFLD contents between simulation and real data.
-
XFTSim::Input_Comp(AbsEvent* record) Compare XFFD pixel output and XFLD pixel input for checking connection between two.
XFTSim talk-to
If you want XFTSim to read configuration info from database, remember to include following talk-to to
"CalibrationManager" section of .tcl file.
-
add XftConfigDB OTL cdf_reader/reader@cdfonprd
An example of talk-to for "CalibrationManager"
is in here.
Always look in run_XFT.tcl for the latest on XFTSim talk-to's.
Following is description for talk-to variable for XFTSim section.
-
data_flag: 'true' for using real XFFD bank for prompt or delayed hit info as input.
'false' means that XTC data also be simluated from COTD bank. (default 'true')
-
dataLinker_flag: 'true' for using XFLD pixel data for input to Linker simluation.
'false' will uses pixel data simulated by XFTSim finder simulation. (default 'true')
-
monitoring: 'true' to start XFTMonitor for comparison between real and simulated data. (default 'true')
-
debug_level: set the fraction of error events to processed events under which error message
is printed for debug purpose. (default '0')
-
summaryFile: save summary file. (default 'true')
-
when database connected
-
databaseManager: always set 'false'
-
DataBase: always set 'online'
-
useOnlineDB: always set 'true'
-
when database NOT connected(when you want to read configuration files manually)
-
useOnlineDB: always set 'false'
-
minHitsReq: each 4 integers represent minimum required COT wire numbers
in a cell in four Axial Super layers to find pixels in a Finder.
(defaults is '10 10 10 10' so called 2 miss finder design)
-
shiftedBeam: true if you want to use linker road files for shifted beam offset.
-
beamOffset: beam offset file suffix.
-
startBrdShift: Linker board number which has offset direction
XFTSim input and output
XFTSim reads input from XFFD and XFLD.
XFFD bank has XTC prompt, delayed hit information and Finder pixel information.
XFLD bank has Finder pixel information and Linker track information.
XFTSim reads XTC hit information from XFFD bank, and simulates Finder algorithm and write Finder pixel
information into XFFD bank. (with description "Simulated Trigger Bank" to tell from real
data bank)
XFTSim Linker section reads XFLD pixel information and simluates Linker algorithm
and write Linker track information into XFLD (with description "Simulated Trigger Bank" to tell from real
data bank)
Finder simlution also can read XTC data simluated from COTD (if you set talk-to differently).
Linker simulation also can read pixel information from Finder simluation instead of reading XFLD
pixel data. (if you set talk-to differently)
As a results, XFTSim produces two set of XFFD and XFLD bank with different "description".
More detailed description for XFFD and XFLD bank can be found in
here
Here is a short description of
how to write AC++ code to read XFFD and XFLD bank
Questions? Send e-mail to XFTSim people
Last updated Oct. 19. 2001; Jong-young Chung