This page is about specifying a detector setup for use within AUSALIB.
The details of the experimental setup should be specified within a json file. This file should contain an entry for each detector specifying how that detector will appear within an unpacked data file. Additionally, details of the detector position and orientation can be provided. Additional files containing energy calibrations and detector specific properties, such as dead layer thickness and strip numbers, can also be provided.
This approach permits these parameters to be stored in an easy to read, plain text format. Furthermore, adjusting these parameters does not require any code recompilation. In cases where the detector geometry changes between runs, the exact same analysis code may be applied by simply providing different setup files as arguments.
The setup files are intended to be used both at the sorting and analysis stages.
__Please note: All lengths should be given as mm__
Example
=========================
The following shows an example of a setup json file.
```json
{
"name":"IFA003",
"detectors":[
{
"name":"SU",
"file":"S3_332um.json",
"calibration":"S3_332um.cal",
"position":{"x":"0mm","y":"0mm","z":"-43mm"},
"normal":{"x":"0mm","y":"0mm","z":"-1mm"},
"orientation":{"x":"0mm","y":"1mm","z":"0mm"},
"frontMapping":{
"prefix":"SU_S",
"multiplicity":"",
"segment":"I",
"adc":"_E",
"tdc":"-DEAD-"
},
"backMapping":{
"prefix":"SU_R",
"multiplicity":"",
"segment":"I",
"adc":"_E",
"tdc":"_T"
}
}
],
"signals":[
"CLOCK",
"CHARGE",
"ACCEPTED",
"TOTAL"
]
}
```
It consists of three things:
1.`detectors` an array of detector objects.
2.`signals` an array of names of scaler values.
3.`name` optional value. Just nice to keep track of things.
Detectors
---------
Each detector must have the following properties
*`name` The detector name
*`position` The central position of the detector.
*`normal` The normal vector to the detector surface.
*`orientation` A vector describing the orientation of the detector. The interpretation of this is detector specific.
*`file` A file containing detector specific information such a strip numbers, dead layer thickness etc.
* (optional) `calibration` A file containing calibration as two column separated by space, offset first.
* (optional) `frontmapping/backmapping/mapping` Json object describing mapping from ROOT file to detector. Front/back is for dssd.
`position`, `direction`, `orientation` can be specified in three different coordinate systems