Time Event Builder - PNapi90/DESPEC-Analysis-Framework GitHub Wiki

The Time Event Builder (TEB) will store all events of the different detector system in the Event_Store class object Event_Storage. The basic philosophy behind TEB can be seen in the flow chart below.


images/TEB.png


Data input

The data of each unpacked event (including WR) is sent to TEB using the Raw_Event object RAW. To store the new event, RAW is sent to the Event Store, where a new event (of the responding detector system type) is created at a unique address.

Matching

Using the WR, a comparison to all relevant previous events is made using the Match class's objects Matches. In here, all event addresses relevant for the user defined coincidences are stored.

  • If the WR time difference is inside the user defined windows, the new event is added to the existing Match(es), and it is checked if all relevant coincidences are already found. If they are, the data is written and the Match is deleted. If not, the program caries on.
  • If the WR time difference doesn't fit, a new Match is created.

Overflow prevention

To prevent the program from crashing due to limited memory, events and corresponding Matches which are too old (difference of WR to current WR too big) are deleted. The time windows for this have to be set by the user.


Be careful: small time windows won't yield any coincidences. large time windows will slow down the program significantly.


User defined coincidences

The Matches, meaning the user defined coincidences between different detector systems, can be defined in the file Configuration_Files/Coincidences_of_Interest.txt. For all different kinds of coincidences, a predefined set of histograms (for each system) can be created and saved in a specific folder in the created root file. However, it is not recommended to create those histograms for each run. To increase the program's speed, only the data for each built event is written into a root file, which can be analyzed further later.

Below is an example for the Coincidences_of_Interest.txt file:

#Define coincidences between an arbitrary amount of Detector_Systems
#Coincidences can only be between at least 2 Detector Systems
#
#==========================================================================================
#DO NOT DEFINE COINCIDENCES WITH ONLY 1 DETECTOR SYSTEM. THE PROGRAM MIGHT CRASH OTHERWISE
#==========================================================================================
#
#Define coincidences between the different systems (lines with # at the beginning will be ignored)
#(FRS = 0,AIDA = 1,PLASTIC = 2,FATIMA = 3,GALILEO = 4,FINGER = 5) 
#
2   3
0   2   3
0   1   2   3   4   5