This section describes how to setup the logic required for a particular experiment:
Introduction to the Logic "Philosophy"
The TDC Electronics is characterized by the fact that, in addition to the pile-up gate conditions, all the necessary coincidence or veto conditions (i.e. logic conditions) are fully performed by software. If on one side such principle can appear as a "black box" without possibility to hardware checks, on the other side it permits a large flexibility and a very much reduced hardware.
Based on a first version of the front-end software, written by Thomas Prokscha, to control the CAEN TDC, Andrea Raselli has written a new version characterized by the capability to change all the logic conditions by a so-called setup logic file. Hence, between runs, it is possible to switch the logic conditions just by loading another setup logic file which contains all the necessary conditions and parameters.
Such setup logic files are usually mantained by the Instrument Scientist but can also be modified by the users. To prevent any loss of information, a so-called template file containing the "master copy" of the setup logic file can be created. It can then be loaded at any time and cannot be overwritten by the users.
The Setup Logic File (Syntax and Examples)
Location
The Setup Logic Files have the extension .v1190
and must be stored in the backend computer in the directory /userdisk0/musr/exp/td_musr/dat/tdcv1190
.
Syntax of the Setup Logic File
The following typographic convention is adapted in this manual.
<...>
represents an mandatory argument.
[<...>]
represents an optional argument.
<...>|<...>
represents a choice between different arguments.
In the following, we briefly describe the syntax of the setput logic file.
- Preamble Block:
Any line beginning with "#" is considered as a comment. Note that "!" has the same effect in the preamble block (note that this sign has another meaning in the TDC Channels Description Block).
INSTRUMENT=<name-of-the-instrument>
With this command, the name of the instrument (e.g. GPS) can be defined. It is used....
DESCRIPTION=<description-of-the-logic>
The description of the setup logic file will for example be used in the GUI deltat. For a normal user, this name should unambiguously describe the logic used by the TDC software (see example below).
TYPE=<type-of-TDC>
RESOLUTION=200
These two entries define the type of CAEN TDC (usually TDCV1190, but could also be TDV1290) and the TDC resolution. For TDCV1190 RESOLUTION is usually 200 (here 200 means actually 195.3125 ps).
For TDCV1290 RESOLUTION is usually 25.
TYPE and RESOLUTION are used to verify if the setup file and the currently running TDC frontend are compatible (i.e. same TYPE and RESOLUTION). If they do not match, the new setup will not be loaded.
MDELAY=<muon-delay-value>
PDELAY=<positron-delay-value>
These two entries define delays to be added to muons (MDELAY) and positrons (PDELAY) counters. Usually MDELAY is set to zero. By having a reasonable PDELAY, the "negative" time region can be well defined allowing a proper determination of the background.
MCOINCIDENCEW=<time-window-for-M-coincidences>
PCOINCIDENCEW=<time-window-for-P-coincidences>
VCOINCIDENCEW=<time-window-for-VETO-anticoincidences>
These entries define the time width (in TDC channel units, i.e. 195.3125 ps/channel) given to the analysis software to find muons, positron coincidences, as well as veto anti.coincidences.
- TDC Channels Description Block:
The next block of the setup file contains the description of the TDC channels as well as the coincidence conditions:
- Muon Channel:
Channel_Number; "Name"; M; Time_offset; [Coinc_chan] [-Anti_chan];
- The parameter "Channel_Number" is the channel number (starting from 0 and max. 31) of the TDC.
- "Name" represents the name given to this channel (max. 31 characters, use double quotes when a space is included in the name).
- The letter "M" indicates that we have to deal with a muon channel being used as started channel.
- The "Time_offset" represents a time offset in TDC channel units (usually set to 2000 for the muon channel, see also below).
- The optional parameters "Coinc_chan" and "Anti_chan" (preceeded by a minus sign) represent the numbers of the channels which have to be in coincidence or in anticoincidence, respectively. An event will be valid only if these conditions are fulfilled. The channels in coincidence are of type "K" (see below) and the one in anticoincidence are of type "V" (see below).
- Example:
0; "M up"; M; 2000; 1 -10 -11 -12 -13;
The TDC channel is here 0, its name is "M up", its is a muon channel with a time offset of 2000 TDC channels. An event is good if it is in coincidence with the channel number 1 and in anticoincidence with the channel numbers 10, 11, 12 and 13.
- Positron Channel:
Chan_Num;"Name";P;t_offs;[C_ch] [-A_ch]; Name_his; t_0;first;last; [Add_to]; [Final_name];
- The parameter "Chan_Numb" is the channel number (starting from 0 and max. 31) of the TDC.
- "Name" represents the name given to this channel (max. 31 characters, use double quotes when a space is included in the name).
- The letter "P" indicates that we have to deal with a positron channel with histogram information.
- The "t_offs" represents a time offset in in TDC channel units. For a positron detector, this number differs from the value of 2000 set for the muon channel. The difference corresponds to the time difference between a same event recorded by this channel and by the muon channel.
For example, if this channel records an event 20 ns after that it has been recorded by the muon channel, a value of 1898 (=2000-int(20/.1953125)) has to be set for the "Time_offset" parameter of this channel.
- The optional parameters "Coinc_chan" and "Anti_chan" (preceeded by a minus sign) represent the numbers of the channels which have to be in coincidence or in anticoincidence, respectively. An event will be valid only if these conditions are fulfilled. The channels in coincidence are of type "K" (see below) and the one in anticoincidence are of type "V" (see below).
- The parameter "Name_his" represent the name of the saved histogram.
- The parameters "t_0", "first" and "last" represent the time-zero, first and last good bins in TDC units, respectively.
- The optional parameter "Add_to" indicates that the present histogram will be added to histogram built from the positron channel number "Add_to" to form a final histogram. The optional parameter "Final_name" is the final name of the composed histogram.
Note that the bins of the histograms are added relative to the define time-zeros and that histogram bins not present in both channels are set to 0.
- Example:
14; "F center"; P; 2073; -10 -11 -12 -13; F_cntr; 720; 750; 50230; 2; Forw
The TDC channel is here 14, its name is "F center", its is a positron channel with a time offset of 2073 TDC channels. An event is good if it is in anticoincidence with the channel numbers 10, 11, 12 and 13. The histogram name is "F_cntr". The first, time-zero and last good bins are 720, 750, and 50230, respectively. This histogram will be added to the histogram formed by the channel 2 and the final histogram will have the name "Forw".
- Coincidence or Veto (anticoincidence) Channels (for muons or positrons):
Channel_Number; "Name"; Type; Time_offset;
- The parameter "Channel_Number" is the channel number (starting from 0 and max. 31) of the TDC.
- "Name" represents the name given to this channel (max. 31 characters, use double quotes when a space is included in the name).
- The parameter "Type" is either the letter "K", "A" or "V".
"K" indicates that we have to deal with a channel which has to be in coincidence with a muon or a positron channel.
"A" is similar to the normal coincidence and might be used if there is a single coincidence. However in this case the event time will be the averaged TDC event time between both events in coincidence.
"V" indicates that we have to deal with a channel which has to be in anticoincidence with a muon or a positron channel.
- The "Time_offset" represents a time offset in TDC channel units. This number differs from the value of 2000 set for the muon channel. The difference corresponds to the time difference between a same event recorded by this channel and by the muon channel.
For example, if this channel records an event 20 ns after that it has been recorded by the muon channel, a value of 1898 (=2000-int(20/.1953125)) has to be set for the "Time_offset" parameter of this channel.
- Example:
0; "M up"; M; 2000; 1 -2;
1; "M down"; K; 2005;
2; "Veto"; V; 2020;
The TDC channel 0 is a muon channel (see also above). We have a good event for this channel if it is in coincidence with the channel number 1 and in anticoincidence with the channel number 2.
The TDC channel 1 is therefore a coincidence channel (note the letter "K").
The TDC channel 2 is therefore a veto (anticoincidence channel (note the letter "V").
Note also the different time offset to allow proper software coincidences.
- On/Off Channels
ON_Channel_Number; "ON_Name"; O; Time_offset; OFF_Channel_Number
OFF_Channel_Number; "OFF_Name"; O; Time_offset
- The parameters "ON_Channel_Number" and "OFF_Channel_Number" are the corresponding channel numbers of the ON and OFF signals (starting from 0 and max. 31) of the TDC.
- "ON_Name" and "OFF_Name" represent the names given to these channels (max. 31 characters, use double quotes when a space is included in the name).
- The letter "O" indicates that we have to deal with either an ON or OFF channel.
- The "Time_offset" represents a time offset in TDC channel units. As the detector signals and the ON/OFF signals are not correlated, this parameter should be kept to a value of 2000.
- Finally, the corresponding OFF channel number must be specified as last parameter of the ON channel. -Timing scheme:
On channel........^.......
Off channel...................................^.......
On interval.......:<-SwTi[On]->|start.. ..end|.......
Off interval...end|...........................:<-SwTi[Off]->|start..
- The switching time interval of each On/Off channel must be specified on a separate line in the TDC setup file.
SWTI[<Ch>]=Number_TDC_Channels
- Clock Channel:
The TDC software need a periodic clock signal (usually 10 kHz) to find roll-over events, which has to be listed of the list of channels in the setup file.
Channel_Number; "Name"; C;
- The parameter "Channel_Number" is the channel number (starting from 0 and max. 31) of the TDC.
- "Name" represents the name given to this channel (max. 31 characters, use double quotes when a space is included in the name).
- The letter "C" indicates that we have to deal with a clock channel.
- Example:
The TDC channel 15 is a clock channel with the name "Clock".
Channel of Rejected Events:
The TDC software needs a pseudo channel where it transfers the rejected TDC events (for example events which are not fulfilling required coincidence logics).
Note that this channel cannot be used physically to feed the TDC (i.e. it is disabled).
Channel_Number; "Name"; R;
- The parameter "Channel_Number" is the channel number (starting from 0 and max. 31) of the TDC.
Note that this channel number must correspond to a physically empty or disabled TDC channel .
- "Name" represents the name given to this channel (max. 31 characters, use double quotes when a space is included in the name).
- The letter "R" indicates that we have to deal with a channel of rejected events.
- Example:
The TDC channel 16 is allocated to the rejected events with the name "Rejected".
Disabled and Optional Channels:
A "!" character at the beginning of the line or an event of type "N" indicate that the channel is not used.
For Positron channels of type "P", a "!" may be used to disable optionally selectable channel.
A "!" character before "Name_his" disables the histogramming of this channel.
A "!" character before "Add_to" disables the addition of this channel to the "Add_to" channel.
Examples:
!17; Veto_1; V;
18; Chan_18; N;
The first line indicates that the channel #17 (which is a veto -- note the type "V") with name "Veto_1" is disabled.
The second line indicates that the channel #18 (whose type is undefined) with name "Chan_18" is disabled.
- End of Section:
This character signals the end of the section. Examples:
The first example is a logic file for GPS with the "without Veto" configuration.
Note, for example, that the "F left" must be in coincidence with the "F right" but in anticoincidence with all the Backward vetos (channel 10, 11, 12 and 13). The resulting histogram is "F_out". The Channel 14 ("F center"), which is also in anticoincidence with all the Backward vetos builds the histogram "F_cntr" which is then added to the "F_out" histogram to finally form the histogram "Forw".
# TDC V1190 Set up file generated by Deltat : 16-Apr-2008 10:30:27
# bins are always in TDC channel units (195.3125 ps/channel)
INSTRUMENT=GPS
DESCRIPTION=No Veto -- 1port
TYPE=TDCV1190
RESOLUTION=200
MDELAY=0
PDELAY=800
MCOINCIDENCEW=50
PCOINCIDENCEW=50
VCOINCIDENCEW=100
0; "M up"; M; 2000; 1 -10 -11 -12 -13;
1; "M down"; K; 2005;
2; "F left"; P; 1306; 3 -10 -11 -12 -13; F_out; 1485; 1515; 50995;
3; "F right"; K; 1263;
4; "B left"; P; 1311; 5 -10 -11 -12 -13; Back; 1485; 1515; 50995;
5; "B right"; K; 1262;
6; Up; P; 1306; -10 -11 -12 -13; Up; 1490; 1520; 51000;
7; Down; P; 1264; -10 -11 -12 -13; Down; 1525; 1555; 51035;
8; "R int"; P; 1309; -10 -11 -12 -13; R_int; 1480; 1510; 50990;
9; "R ext"; P; 1267; -10 -11 -12 -13; R_ext; 1520; 1550; 51020; 8; Rite
10; "Bveto up"; V; 2085;
11; "Bveto down"; V; 2089;
12; "Bveto left"; V; 2080;
13; "Bveto right"; V; 2079;
14; "F center"; P; 2073; -10 -11 -12 -13; F_cntr; 720; 750; 50230; 2; Forw
15; Clock; C;
16; Rejected; R;
!17; Ch17; N;
!18; Ch18; N;
!19; Ch19; N;
!20; Ch20; N;
!21; Ch21; N;
!22; Ch22; N;
!23; Ch23; N;
!24; Ch24; N;
!25; Ch25; N;
!26; Ch26; N;
!27; Ch27; N;
!28; Ch28; N;
!29; Ch29; N;
!30; Ch30; N;
!31; Ch31; N;
$
The second example is a logic file for GPS with an ON/OFF condition (Channels 17 and 18) and with the "without Veto" configuration.
Note the SWTI[NN] lines at the end of the file defining the switching time interval of each ON/OFF channel in TDC bins.
# TDC V1190 Set up file generated by Deltat : 21-Nov-2010 19:07:22
# bins are always in TDC channel units (195.3125 ps/channel)
INSTRUMENT=GPS
DESCRIPTION=No Veto -- 1port -- ON-OFF
TYPE=TDCV1190
RESOLUTION=200
MDELAY=0
PDELAY=800
MCOINCIDENCEW=50
PCOINCIDENCEW=50
VCOINCIDENCEW=100
0; "M up"; M; 2000; 1 -10 -11 -12 -13;
1; "M down"; K; 2005;
2; "F left"; P; 1306; 3 -10 -11 -12 -13; F_out; 1485; 1515; 24524;
3; "F right"; K; 1263;
4; "B left"; P; 1311; 5 -10 -11 -12 -13; Back; 1485; 1515; 24524;
5; "B right"; K; 1262;
6; Up; P; 1306; -10 -11 -12 -13; Up; 1490; 1520; 24524;
7; Down; P; 1264; -10 -11 -12 -13; Down; 1525; 1555; 24524;
! 8; "R int"; P; 1309; -10 -11 -12 -13; !R_int; 0; 0; 0;
! 9; "R ext"; P; 1267; -10 -11 -12 -13; !R_ext; 0; 0; 0;
10; "Bveto up"; V; 2085;
11; "Bveto down"; V; 2089;
12; "Bveto left"; V; 2080;
13; "Bveto right"; V; 2079;
!14; "F center"; P; 2073; -10 -11 -12 -13; !F_center; 0; 0; 0;
15; Clock; C;
16; Rejected; R;
17; Ch17; O; 2000; 18;
18; Ch18; O; 2000;
!19; Ch19; N;
!20; Ch20; N;
!21; Ch21; N;
!22; Ch22; N;
!23; Ch23; N;
!24; Ch24; N;
!25; Ch25; N;
!26; Ch26; N;
!27; Ch27; N;
!28; Ch28; N;
!29; Ch29; N;
!30; Ch30; N;
!31; Ch31; N;
SWTI[17]=25000
SWTI[18]=25000
$
Setting Up a Template Logic File
The Instrument Scientist can set up a template for a logic file, which can be loaded by a user, modified, but not saved under the same name. Hence, this allows us to have "master copies" of the logic files, which can be loaded in case that the normal logic files have been screwed up.
These files have an extension: v1190_template
. In the deltat
application, they are available on the drop-down menu which appears by pressing the Modify Settings
button on the TDC Settings
tab.
Note that these files cannot be saved on the same name by a normal users. When using the "Instrument Scientist Flag", they can be overwritten, although they do not appear on the List of existing TDC Set-Up Files
.