Mapper Config File - nscl-hira/HiRAEVT GitHub Wiki

Config file parameters

The mapper config file is a JSON file that must specify the following key:value pairs. The type of the value is

  • "inputDirecotry":type(string): The directory to load the input root file
  • "outputDirecotry":type(string): The directory to output mapped root file
  • "experimentNumber":type(int): A unique number identifying the experiment (often NSCL exp number). The output and input TTrees are assumed to have the name Format("E%d", experimentNumber).
  • "modules":type(jsonArray): This is the list of RootModules to read from the tree. See below.
  • "detectors":type(jsonArray): This is the list of detectors to map. See below.

Important to note, all file paths in the config file must be full paths, enviroment variables and "~" will not be expanded.

Module list

This is an array of modules to read from the input TTree. Each object is required to define two key:value pairs

  • "moduleType":type(string): Type of the class stored in this branch. Must be part of HTRootModules
  • "moduleName":type(string): Name of the module. This should be the name of the branch in the input TTree and is used to refer to the module in the detector list

Detector list

This is an array of detectors to map. There are two required and one optional key:value pair that each detector must have:

  • "detectorType":type(string): Type of the detector class. Must be part of HTDetectors
  • "moduleName":type(string): Name of the detector. This will be the name of the branch in the output TTree
  • "calibrationFile":type(string): Path to the JSON file that contains the calibration data for this detector. The format of the calibration data is specified by the detector.
  • "calibration":type(JSON object): The JSON object containing the calibration data for this detector. The format of the calibration data is specified by the detector. Will replace the calibrationFile key if both are found.

The other key:value pairs are specified on the relevant detector page on the wiki.

Example file

{
    "inputDirectory":"~/HiRAEVT/",
    "outputDirectory":"~/HiRAEVT/",
    "experimentNumber":12014,
    "modules" : [
        {
            "moduleType":"HTRootAdc",
            "moduleName":"adc2"},
        {
            "moduleType":"HTRootCAEN1x90",
            "moduleName":"tdc1"}
    ],
    "detectors": [
        {
            "detectorType":"HTSimpleDetector",
            "detectorName":"HPGe",
            "fEnergy": {
                "moduleName":"adc2",
                "ch":2},
            "fTime": {
                "moduleName":"tdc1",
                "ch":7}},
        {
            "detectorType":"HTSimpleDetector",
            "detectorName":"Si.dE",
            "fEnergy": {
                "moduleName":"adc2",
                "ch":0},
            "fTime": {
                "moduleName":"tdc1",
                "ch":5}
        }
    ]
}