Difference between revisions of "Output data structure in CODA"

From PolWiki
Jump to navigationJump to search
Line 1: Line 1:
 
The electron detector readout boards(v1495) are currently outputting data in the following format:
 
The electron detector readout boards(v1495) are currently outputting data in the following format:
  
== Event types defined ==
+
== '''Event types defined''' ==
 
   Event type 1 : Helicity Reversal events
 
   Event type 1 : Helicity Reversal events
 
   Event type 2 : photon single events
 
   Event type 2 : photon single events
Line 7: Line 7:
 
   Event type 4 : coincidence of electron and photon single events
 
   Event type 4 : coincidence of electron and photon single events
  
== Sub banks used ==
+
 
 +
==''' Sub banks used''' ==
 
   Single Event Data from Slave-1: 0x201
 
   Single Event Data from Slave-1: 0x201
 
   Single Event Data from Slave-2: 0x202
 
   Single Event Data from Slave-2: 0x202
Line 20: Line 21:
 
   Parameter information about Slave-3 : 0x209
 
   Parameter information about Slave-3 : 0x209
  
If the TS2 did not receive either of the type-1 or type-4 triggers then the message logger will start printing "Event type and number are:" followed by the value assigned to the variable event_ty
 
  
== Structure inside Parameter info sub-bank ==
+
== '''Structure inside Parameter info sub-bank''' ==
 
   0x207: parameter information about slave-1
 
   0x207: parameter information about slave-1
 
   0x208: parameter information about slave-2
 
   0x208: parameter information about slave-2
Line 48: Line 48:
 
[[Image:EDet parameterInfo format.PNG]]
 
[[Image:EDet parameterInfo format.PNG]]
  
== Structure inside Accumulation sub-bank ==
+
 
 +
== '''Structure inside Accumulation sub-bank''' ==
  
 
The accumulation data from electron detector goes into three sub-banks
 
The accumulation data from electron detector goes into three sub-banks
Line 69: Line 70:
 
[[Image:EDet_accum_format.png‎]]
 
[[Image:EDet_accum_format.png‎]]
  
Hence you see 32 words, because each bank has information from each slave. Each slave carries information of 32 strips from all 4 planes.
+
One can see 32 words, because each bank has information from each slave. Each slave carries information of 32 strips from all 4 planes.
 +
 
  
== Structure inside single-event subbank==
+
== '''Structure inside single-event subbank'''==
 
The single event data from electron detector goes into three subbank  
 
The single event data from electron detector goes into three subbank  
 
   0x201: singles from slave-1
 
   0x201: singles from slave-1

Revision as of 21:53, 23 February 2011

The electron detector readout boards(v1495) are currently outputting data in the following format:

Event types defined

 Event type 1 : Helicity Reversal events
 Event type 2 : photon single events
 Event type 3 : electron single events
 Event type 4 : coincidence of electron and photon single events


Sub banks used

 Single Event Data from Slave-1: 0x201
 Single Event Data from Slave-2: 0x202
 Single Event Data from Slave-3: 0x203
 Accumulation Data from Slave-1 : 0x204
 Accumulation Data from Slave-2 : 0x205
 Accumulation Data from Slave-3 : 0x206
 Parameter information about Slave-1 : 0x207
 Parameter information about Slave-2 : 0x208
 Parameter information about Slave-3 : 0x209


Structure inside Parameter info sub-bank

 0x207: parameter information about slave-1
 0x208: parameter information about slave-2
 0x209: parameter information about slave-3

Each sub-bank has nine words, each 32 bit in the following order

Identifier beginning word
Firmware Revision Number
A mask
B mask
D mask
E mask
PWTL(8 bits) | PWDL(8 bits) | HOLDOFF(8 bits) | PL_Delay(8 bits)
Rejection Width(16 bits) | Accum trigger condition(8 bits) | Event trigger condition(8 bits)
Identifier ending word

The respective slave identifier words are:

 slave #    beginning         ending
 slave 1    0xb1000000       0xb100000f 
 slave 2    0xb2000000       0xb200000f 
 slave 3    0xb3000000       0xb300000f 

As a visual example, the sub-bank parameter information as saved in run # 4042(taken Feb 2011) is shown in the following image.

EDet parameterInfo format.PNG


Structure inside Accumulation sub-bank

The accumulation data from electron detector goes into three sub-banks

 0x204: accumulation from slave-1
 0x205: accumulation from slave-2
 0x206: accumulation from slave-3

Each sub-bank has thirty-two words of 32 bits. Each word has the following format.

Most significant byte(bits 32-23): no.of hits in plane-1
Next significant byte(bits 24-17): no.of hits in plane-2
Next significant byte(bits 16-09): no.of hits in plane-3
Least significant byte(bits 01-08): no.of hits in plane-4

The words are organized in order of increasing strips. For example in the following snapshot displaying data from bank 0x205(slave-2)

1st word has accumulation data of strip-1,
2nd word has accumulation data of strip-2,
... and so on

For this run, a dummy input was given to pin numbers which correspond to strip # 1, 3 and 5 of patch-2 at a rate of 2.4kHz, the MPS was @1 kHz.

EDet accum format.png

One can see 32 words, because each bank has information from each slave. Each slave carries information of 32 strips from all 4 planes.


Structure inside single-event subbank

The single event data from electron detector goes into three subbank

 0x201: singles from slave-1
 0x202: singles from slave-2
 0x203: singles from slave-3

Each sub-bank has five 32 bit words in the following format.

1st word: hit-map on plane-1 for strip 1 through 32
2nd word: hit-map on plane-2 for strip 1 through 32
3rd word: hit-map on plane-3 for strip 1 through 32 
4th word: hit-map on plane-4 for strip 1 through 32
5th word: (some redundant information) 0x00000(20 bits) | Helicity(1 bit) | raw_trig_CNT (11 bits)

Following is a snapshot of the data bank as seen through xcefdmp.

EDet singles format.png

Details:

  • The above snapshot displays the 32 bits in hexadecimal format. In the first 4 words, the least significant bit represent hit-information of strip-1 for all the 4 planes.
  • Successively, the higher order bits represent hit-information for each next strip. Thus the 32 bits word has the hit-information of the 32 strips in this patch of data.
  • The 5th word (currently) has the information whether this data correspond to positive or negative helicity. followed by the total number of trigger that were received during the previous helicity period.
  • (I intend to add the buffer status in the 5th word, which now has zero's)

Similarly, data from s2 and s3 contains the hit map of strip 33-64 and 65-96 on all planes respectively in the above order.


This pattern can be changed with ease, but this is the format in which the most recent data files are found.