41 int main(
int argc,
char **argv)
55 JParser<> zap(
"Example program to compare dynamic position calibrations.");
58 zap[
'f'] =
make_field(calibrationFile1,
"output of JKatoomba[.sh]");
59 zap[
'F'] =
make_field(calibrationFile2,
"output of JKatoomba[.sh]");
66 catch(
const exception &error) {
67 FATAL(error.what() << endl);
82 STATUS(
"loading input from file " << calibrationFile1 <<
"... " << flush);
84 dynamics1.
load(calibrationFile1);
88 Double_t xmin1 = numeric_limits<Double_t>::max();
89 Double_t xmax1 = numeric_limits<Double_t>::lowest();
93 if (!string->second.empty()) {
94 xmin1 = min(xmin1, string->second.getXmin());
95 xmax1 = max(xmax1, string->second.getXmax());
101 STATUS(
"loading input from file " << calibrationFile1 <<
"... " << flush);
103 dynamics2.
load(calibrationFile2);
107 Double_t xmin2 = numeric_limits<Double_t>::max();
108 Double_t xmax2 = numeric_limits<Double_t>::lowest();
112 if (!string->second.empty()) {
113 xmin2 = min(xmin2, string->second.getXmin());
114 xmax2 = max(xmax2, string->second.getXmax());
118 Double_t
xmin = numeric_limits<Double_t>::max();
119 Double_t
xmax = numeric_limits<Double_t>::lowest();
122 xmin = max(xmin1, xmin2);
123 xmax = min(xmax1, xmax2);
125 const JFormat_t format(4, 0, std::ios_base::fmtflags(),
'0');
135 if (string1->first == string2->first) {
137 TH1D* hc = HC[string1->first];
138 TH1D* hd = HD[string1->first];
140 for (Double_t t =
xmin; t <=
xmax; t = t + Tstep_s) {
142 HO[string1->first].put(t, (string1->second(t).tx - string2->second(t).tx) * 1000);
143 HA[string1->first].put(t, (string1->second(t).ty - string2->second(t).ty) * 1000);
144 hc->Fill((string1->second(t).tx - string2->second(t).tx) * 1000);
145 hd->Fill((string1->second(t).ty - string2->second(t).ty) * 1000);
ROOT TTree parameter settings.
int main(int argc, char **argv)
Example program to compare dynamic position calibrations.
Data structure for detector geometry and calibration.
Dynamic detector calibration.
Dynamic ROOT object management.
General purpose messaging.
Scanning of objects from multiple files according a format that follows from the extension of each fi...
Utility class to parse command line options.
#define make_field(A,...)
macro to convert parameter to JParserTemplateElement object
I/O formatting auxiliaries.
#define MAKE_CSTRING(A)
Make C-string.
ROOT TTree parameter settings of various packages.
Utility class to parse command line options.
Auxiliary class to manage set of compatible ROOT objects (e.g. histograms) using unique keys.
General purpose class for object reading from a list of file names.
void load(const std::string &file_name, JDetector &detector)
Load detector from input file.
This name space includes all other name spaces (except KM3NETDAQ, KM3NET and ANTARES).
data_type::const_iterator const_iterator
const_iterator end() const
end of calibration data
const_iterator begin() const
begin of calibration data
Dynamic detector calibration.
JPosition position
position calibration
void load(JObjectIterator_t &input)
Load calibration data.
Auxiliary data structure to build TGraph.