Jpp
|
Auxiliary program to modify detector calibration. More...
#include <iostream>
#include <sstream>
#include <string>
#include <vector>
#include "TRandom3.h"
#include "JDetector/JDetector.hh"
#include "JDetector/JDetectorToolkit.hh"
#include "JDetector/JDetectorHeader.hh"
#include "JDetector/JModuleRouter.hh"
#include "JDetector/JPMTIdentifier.hh"
#include "JDetector/JPMTPhysicalAddress.hh"
#include "JDetector/JModuleAddressMap.hh"
#include "JDetector/JDetectorAddressMap.hh"
#include "JDetector/JDetectorAddressMapToolkit.hh"
#include "JGeometry3D/JVector3D.hh"
#include "JMath/JConstants.hh"
#include "JMath/JMath.hh"
#include "JTools/JRange.hh"
#include "JLang/JException.hh"
#include "JLang/JToken.hh"
#include "JSupport/JMeta.hh"
#include "Jeep/JeepToolkit.hh"
#include "Jeep/JPrint.hh"
#include "Jeep/JParser.hh"
#include "Jeep/JMessage.hh"
Go to the source code of this file.
Functions | |
int | main (int argc, char **argv) |
Auxiliary program to modify detector calibration.
Syntax:
-M "<module identifier> (set|add|sub|randset|randadd|randsub) x0 [x1 [x2]]" -S "<string number> (set|add|sub|randset|randadd|randsub) x0 [x1 [x2]]" -M "<module identifier> (rot|randrot) phi" -S "<string number> (rot|randrot) phi" -M "<module identifier> (mul|randmul) factor" -S "<string number> (mul|randmul) factor" -M "<module identifier> (via|randvia) factor" -S "<string number> (via|randvia) factor" -M "<module identifier> (reset)" -S "<string number> (reset)" -M "<module identifier> (assign) identifier" -M "<module identifier> (SET|ADD|SUB|) x0 [x1 x2 x3]" -S "<string number> (SET|ADD|SUB|) x0 [x1 x2 x3]" -M "<module identifier> (SET)" -S "<string number> (SET)" -P "<PMT identifier> (set|reset) (PMT_DISABLE|HIGH_RATE_VETO_DISABLE|FIFO_FULL_DISABLE|UDP_COUNTER_DISABLE|UDP_TRAILER_DISABLE|OUT_OF_SYNC)" -p "<PMT physical address> (set|reset) (PMT_DISABLE|HIGH_RATE_VETO_DISABLE|FIFO_FULL_DISABLE|UDP_COUNTER_DISABLE|UDP_TRAILER_DISABLE|OUT_OF_SYNC)" -k "<string number>[-<string number>" -r "<string number>[-<string number>" -m "<module identifier>" -D "<string number> <floor>" -@ "<key>=<value>[;<key>=<value>"
Options -M
and -S
refer to a module and a string, respectively.
The values provided for a string modification coherently apply to the modules of the specified string number.
The options randxxx
correspond to a randomisation of the specified option.
If the module identifier or string number is -1, the action is applied to all modules or strings in the detector, respectively.
For options [rand]set
, [rand]add
and [rand]sub
, the number of values apply to position or time calibration in the following way:
(t = x0)
(x = x0, y = x1, z = 0)
(x = x0, y = x1, z = x2)
For options [rand]rot
, the angle phi
refers to an anti-clockwise rotation around the z-axis.
The rotation angle is defined in radians.
For options [rand]mul
, the multiplication factor
(a.k.a. "stretching") applies to the z-coordinates of the optical modules and not to the base module (read anchor).
The factor is defined as a fraction; the actual multiplication factor is (1 + factor)
.
For options [rand]via
, the factor
is multiplied with the floor number and then added to the time calibration.
For options SET ADD SUB
, the number of values apply to time or quaternion calibration of the module in the following way:
(t = x0)
(qa = x0, qb = x1, qc = x2, qd = x3)
If no values are given at the option SET
, the time calibration of the module is set to the average time calibration of the PMTs in that module, corrected for the delay time of the pieze sensor (JDETECTOR::PIEZO_DELAYTIME_US).
For the base module, the time calibration is set to 0, corrected for the delay time of the hydrophone (JDETECTOR::HYDROPHONE_DELAYTIME_US).
The unit of time calibration is ns
.
Note that for string modifiers with option randxxx
, the action is coherently applied to the modules in the specified string.
Only one type of action (defined by xxx
and the number of values) is then allowed per string.
Option -@
refers to the header information.
The list of possible keys can be obtained using JPrintDetector.cc with option -O header
.
Multiple options -M
, -S
or -@
will be processed in order of appearance.
Options -k
and -r
can be used to keep and remove (a range of) string numbers, respectively.
The options -m
and -D
can be used to maintain a specific module (and remove all others) and to delete a floor from a string, respectively.
Note finally that if the output file name is the same as the input file name, the original file will be overwritten.
Definition in file JEditDetector.cc.
int main | ( | int | argc, |
char ** | argv | ||
) |
Definition at line 651 of file JEditDetector.cc.