Jpp
17.2.1-pre0
the software that should make you happy
|
Auxiliary program to modify detector calibration. More...
#include <iostream>
#include <sstream>
#include <string>
#include <vector>
#include <map>
#include <algorithm>
#include "TRandom3.h"
#include "JDetector/JDetector.hh"
#include "JDetector/JDetectorToolkit.hh"
#include "JDetector/JDetectorHeader.hh"
#include "JDetector/JModuleStatus.hh"
#include "JDetector/JModuleRouter.hh"
#include "JDetector/JPMTIdentifier.hh"
#include "JDetector/JPMTPhysicalAddress.hh"
#include "JDetector/JPMTStatus.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 "JLang/JComparator.hh"
#include "JLang/JComparison.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|s) "<string number> (set|add|sub|randset|randadd|randsub) x0 [x1 x2]" -M "<module identifier> (setx|addx|subx|sety|addy|suby|setz|addz|subz) value" -(S|s) "<string number> (setx|addx|subx|sety|addy|suby|setz|addz|subz) value" -M "<module identifier> (rot|randrot) phi" -(S|s) "<string number> (rot|randrot) phi" -M "<module identifier> (mul|randmul) factor" -(S|s) "<string number> (mul|randmul) factor" -M "<module identifier> (div|randdiv) factor" -(S|s) "<string number> (div|randdiv) factor" -M "<module identifier> (reset)" -(S|s) "<string number> (reset)" -M "<module identifier> (assign) identifier" -M "<module identifier> (locate) <string> <floor>" -M "<module identifier> (swap) <PMT> <PMT>" -M "<module identifier> (SET|ADD|SUB|) x0 [x1 x2 x3]" -(S|s) "<string number> (SET|ADD|SUB|) x0 [x1 x2 x3]" -M "<module identifier> (ROT) phi" -(S|s) "<string number> (ROT) phi" -(S|s) "<string number> (tilt|randtilt) Tx Ty" -W "<module identifier> (set|reset) (MODULE_DISABLE|COMPASS_DISABLE|HYDROPHONE_DISABLE|PIEZO_DISABLE|MODULE_OUT_OF_SYNC)" -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 option -s
is equivalent to option -S
except that the action applies only to the optical modules in the string and not the base module.
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 = x2)
For options (set|add|sub)(x|y|z)
, the value corresponds to last character of the the quoted action.
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
and [rand]div
, the multiplication/division factor
(a.k.a. "stretching") applies to the z-coordinates of the modules.
The factor is defined as a fraction; the actual multiplication/division factor is (1 + factor)
.
For options SET
, ADD
and 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)
For options ROT
, the angle phi
refers to an anti-clockwise rotation around the z-axis of the quaternion calibration of the compass.
The rotation angle is defined in radians.
Note that to correct the time calibration for the delay time of the piezo sensor and hydrophone, application JDetectorDB.cc can be used (option -WW
).
The units of all positions and time values are m
and ns
, respectively.
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
, -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 913 of file JEditDetector.cc.