Hideyuki

DAQ status for cosmic-ray test
Hideyuki Sakamoto
19th Sep 2007
Status on daq by DATE
• Tests was almost finished.
– Initializing AFE
– Readout VLSB of original firmware
– Same result as EXCEL
• Remaining tasks
– Test readout of VLSB with new firmware
– Test trigger logic
• Schedule
– Install package tested at IC during CM19.
– Starting remaining test after arrival of cassette/AFEIIt. 02Nov07?
Minutes of last meeting
VLPC readout: expect to ship at the end of Oct. So, anticipate 02Nov07 as
reasonable milestone for arrival in R12.
Comments on QA
• Now, we are considering Sr90 as source.
– Co57 (gamma-ray) is difficult to determine hit fiber,
while beta-ray allow us to take coincidence with 9 fibers.
• First result shows that
– Hot spot was actually observed, but smaller light yield was
observed on V view compared by MC. ( see next slide)
– Need to understand this behavior.
Too small statistics to check if dead or alive
• I will check by cosmic-ray data that this channel is alive.
• If James is ready, it’s very helpful to take another Sr90 data with
different location of Sr, (e.g. center of Station)
• Will be reported soon!
– First QA for 5 stations is needed to finish before assembly.
• We have 1 month…
MC (Sr90)
Data1
X view
PE
MeV
W view
V view
10pe
Data1 = Events for max. light yield
@V#90&W#157&&X#72
Data2
PE
Data2 = Data1 && 5 pe for all views
peak around 5 p.e. looks like signal..
Check 10 p.e line in MC
–Make PE distr. and comparing.
Analyze by another Sr90 run.
10pe
(Backup)
Short manual for DATE user
Startup
No need to setup dateNetwork…
dateNetwork –s –a”heppc55”
Valid only for 1 PC DAQ??
1.
Run setup.sh script
– source $DATE_ROOT/setup.sh
2.
Start dim/dns
1. source /opt/dim/setup.sh
2. /opt/dim/linux/dns &
3.
Start daemons
– dateSiteDaemons start
4.
Start info browser
– infoBrowser
5.
Start editor for MySQL
– editDb
6.
Run DAQ Control HI script
– $DATE_ROOT/runControl/DAQControl.sh
Restart
1.
Kill DAQCONTROL
–
–
2.
Click “close HI” from menu button, or
type kill -9 <process id named runControl HI>.
Kill other processes
–
–
3.
$DATE_ROOT/runControl/stop_daqDomains.sh
Note that user interfaces as DAQCONTROL, editDb,
infoBrowser are not killed by this script.
Start DAQCONTROL
–
$DATE_ROOT/runControl/DAQControl.sh
How to refresh infoBrowser
To remove previous message (used usually)
• Click “clean view” button on inforBrowser
To remove continuous long message (used for debug)
1. Delete fifo $DATE_SITE/logFiles/infoLoggerReader@$hostname.fifo
– rm /opt/date_site/logFiles/[email protected]
2. Restart daemons
– dateSiteDaemons restart
How to implement readout program
1.
Define structure for equipment parameter
–
–
To access parameters defined in MySQL
argument for all of 5 functions
2.
Implement 5 functions
– ArmXXX
– DisArmXX
– AsynchReadoutXXX
– EventArrivedXXX
– EventReadoutXXX
3.
Add the above 5 functions in DATE
– Add EQUIPMENTDESCR (XXX) macro in the structure
equipmentDescrType at the end of readout code.
4.
After compiled, make copy or link in the $DATE_SITE/$hostname directory
•
Make directory $DATE_SITE/$hogtname in advance
Procedure to setup equipment on DATE
This is the next step after preparing readout code.
Parameters to be defined/set in MySQL
1. EQUIP_TYPES
2. EQUIP_PARAMS_XXX
Setup by script
For defining parameters
$DATE_ROOT/readList/equip_table_maker.tcl
( no available @ ver.6.09)
Setup by hand
– See following page
To register equipment in DATE
editDb ($DATE_ROOT/editDb/edit.sh)
EQUIP_TYPES table
equipments
Need for specifing equipment as
read out
Define that EventArrivedXXX will
produce trigger or not
Define that ReadoutEventXXX will
produce data or not
The order calling AimXXX function
Name of readout function located in
$DATE_SITE/$hostname directory
Equipment_PARAM_XXX table
Parameters
1. For DATE
• LDC, EQUIPMENT_NAME, ACTIVE
2. For User
• Connected to the argument in readout functions
e.g. ArmVLSB (char *partype)
Example for AFEIIt & VLSB
DATE
USER
Setup by script (equip_table_maker.tcl)
Tool to make EQUIP_PARAM_XXX table
and add an equipment in EQUIP_TYPES
1. Click New button in Equipment tab
2. Select equipment you defined
3. Click create button
4. Input values
5. Click Add button
Setup equipment by hand
•
At first, connect to DATE_CONFIG table
mysql -u daq -p -h heppc55 DATE_CONFIG
user
hostname
database name
Just type –p to prevent typing password directly
•
use DATE_CONFIG;
show EQUIP_TYPES;
select * from EQUIP_TYPES;
Create table of EQUIP_PARAM_XXX
e.g. XXX=VLSB
– create table EQUIP_PARAM_VLSB ( LDC char(32),
EQUIPMENT_NAME char(32), ACTIVE tinyint(1), BaseAddress1
char(32), BaseAddress2 char(32) );
– (to delete table) drop table EQUIP_PARAM_VLSB;
•
Add our equipment field in EQUIP_TYPES
e.g. AFEIIt equipment
– insert into EQUIP_TYPES values('AFEIIt',80,1,0,80,'readout');
– (to delete field) delete from EQUIP_TYPES where NAME='AFEIIt';
Registration equipment in DATE (editDb)
Tool to register equipments using EQUIP_PARAM_XXX ( not made newly in MySQL )
1. Click New button in Equipment tab
2. Select equipment you defined
3. Click create button
4. Input values
1
2
5. Click Add button
3
4
5
DAQCONTROL
1
2
4
3
5
Both unchecked
LDC ON
Appear
after
step 2
1. lock
GDC OFF
2. define configuration
3. define run parameters (see next page)
4. star process (calling ArmXXX functions)
5. start run
Setup run parameters
4
#/events
1
2
1 select LDC
2 change parameters.
•#/events
File name
•File name
• # = run number
3 click Apply tagged values
4 click OK
•Or click Save for next time
3
Change time out limit for long AFE initialization
About 2 minutes is needed to initialize one AFEIIt board…
$DATE_ROOT/runControl/RunParameters.config (21st line)
#phaseTimeoutLimit "Max. time for SOR/EOR phases" 30 range 0 60 300
Max. time for SOR/EOF phases
Default 60 sec => 300 sec
Data format (for case of 1 LDC)
•
•
•
•
Defined in $DATE_ROOT/commonDefs/event.h
A run includes several type of events, identified by
“eventType” .
– SOR/EOR
• Every run has these type of events at the
beginning/ending of run.
• There is no data here
– PHYSICS_EVENT
•
There is data from each equipments
– (CALIBRAION_EVENT)
• Tagged at calibration run
Data stored at each ReadEventXXX function are
recorded sequentially in the PHYSICS_EVENT block
Headers
1. Event header
– Contains 17 words
– Follows blocks of equipment @PHYSICS
event
2. Equipment header
– Contains 7 words
– Follows equipment block
Example of PHYSCIS event
Event header (17 words)
Equipment A header (7 words)
Equipment A Data (X words)
Equipment B header (7 words)
Equipment B Data (X words)
Other equipments
Event header (17 words) format
parameters
#/words comments
eventSize (byte)
1
eventMagic
1
eventHeaderSize (byte) 1
Header (17 words) + Data
68(0x44) byte = 17 word
eventVersion
1
eventType
1
SOR/EOR, PHYSICS, …
eventRunNb
1
Run#
eventId
2
Event#
eventTriggerPattern
2
eventDetectorPattern
1
eventTypeAttribute
3
eventLdcId
1
Ldc# (=0x1 in case of 1 LDC)
eventGdcId
1
Gdc# (=0xffffffff in case of 0 GDC)
eventTimestamp
1
Timestamp
Equipment header (7 words) format
parameters
#/words comments
equipmentSize (byte)
1
equipmentType
1
equipmentID
1
equipmentTypeAttribute
3
equipmentBasicElementSize (byte) 1
Header (7 words) + Data
Values defined in MySQL
Real data sample
• Equipments (GENDATA)
– 2 AFEIIts & 1 VLSB (includes 2 boards)
• Events recorded
– SOR
– PHYSICS
– EOR (not seen here)
• Size of Equipments
– AFE = 23 words = 92(0x5c) bytes
SOR event Header
SOR event Header
PHYSICS event Header
LHB Header
LHB data
• 7(Header) + 8 (temp) + 8 (heater power)
– VLSB = 1167 words = 4668 (0x123c) bytes
RHB Header
• 7(Header) + 1160 (145 x 4 links x 2 boards)
• Size of PHYSICS event
– 1230 words = 4920 (0x1338) bytes
= 17(Header) + 23 x 2(2 AFE) + 1167(1 VLSB w/
2boards)
RHB data
VLSB header
VLSB data