13#include "TFitResult.h"
60 JSetup(
const string& file_name) :
63 fp = TFile::Open(file_name.c_str(),
"read");
85 location =
JLocation_t(parameters.DUID, parameters.FLOORID, parameters.PMTINTID);
87 location =
JLocation_t(parameters.DUID, parameters.FLOORID, parameters.CABLEPOS);
89 HV[location] = parameters.HV_VALUE;
101 TH2D* get(
const string& key)
const
103 return (
TH2D*) fp->Get(
key.c_str());
156 zap[
'f'] =
make_field(inputFile,
"pair of input files (output of JCalibrateK40)");
158 zap[
'e'] =
make_field(precision,
"precision for HV comparison") = 0.5;
161 zap[
'O'] =
make_field(option,
"ROOT fit option, see TH1::Fit.") =
"";
167 catch(
const exception &error) {
175 catch(
const exception& error) {
184 for (
int i = 0; i != 2; ++i) {
197 if (option.find(
'S') == string::npos) { option +=
'S'; }
204 TF1 f1(
"f1",
"[0]*TMath::Gaus(x,[1],[2]) + [3]");
245 for (
int i = 0; i != 2; ++i) {
257 for (
int iy = 1;
iy <= h1.GetNbinsX(); ++
iy) {
262 h1.SetBinContent(
iy, y);
263 h1.SetBinError (
iy, sqrt(y));
279 f1.SetParameter(0,
ymax);
280 f1.SetParameter(1, mean);
281 f1.SetParameter(2, sigma);
282 f1.SetParameter(3,
ymin);
284 for (
Int_t i = 0; i != f1.GetNpar(); ++i) {
285 f1.SetParError(i, 0.0);
291 FATAL(
"Invalid TFitResultPtr " << h1.GetName() <<
endl);
295 cout <<
"Histogram slice: "
297 <<
FIXED(7,3) << f1.GetParameter(1) <<
" +/- "
298 <<
FIXED(7,3) << f1.GetParError(1) <<
' '
301 << (
result->IsValid() ?
"" :
"failed") <<
endl;
304 t1[i] = f1.GetParameter(1);
324 cout <<
setw(10) <<
module->getID() << "." << FILL(2,'0') << p2.first << FILL() << ' ';
325 cout <<
"(" <<
FILL(2,
'0') << p2.second <<
FILL() <<
")" <<
' ';
329 Q[p2.first].put(
combinatorics.getSign(p2) * (t1[1] - t1[0]));
336 H1[
module->getID()]->SetBinContent(i+1, Q[i].getMean());
337 H1[
module->getID()]->SetBinError (i+1, Q[i].getSTDev());
int main(int argc, char **argv)
KM3NeT DAQ constants, bit handling, etc.
ROOT TTree parameter settings.
Data structure for detector geometry and calibration.
#define THROW(JException_t, A)
Marco for throwing exception with std::ostream compatible message.
Dynamic ROOT object management.
General purpose messaging.
#define DEBUG(A)
Message macros.
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.
Utility class to parse parameter values.
#define gmake_property(A)
macros to convert (template) parameter to JPropertiesElement object
Auxiliary class to define a range between two values.
Utility class to parse parameter values.
Template definition of a multi-dimensional oscillation probability interpolation table.
static const char *const _2S
Name extension for 2D counts.
ResultSet & getResultSet(const std::string &query)
Get result set.
JDetectorsHelper & getDetector()
Auxiliary function for helper object initialisation.
std::vector< JServer > getServernames()
Get list of names of available database servers.
void load(const std::string &file_name, JDetector &detector)
Load detector from input file.
size_t getCount(const array_type< T > &buffer, const JCompare_t &compare)
Count number of unique values.
This name space includes all other name spaces (except KM3NETDAQ, KM3NET and ANTARES).
KM3NeT DAQ data structures and auxiliaries.
static const int NUMBER_OF_PMTS
Total number of PMTs in module.
Auxiliary data structure for sequence of same character.
Auxiliary data structure for floating point format specification.
Type definition of range.
Auxiliary data structure for setup of complete system.
Auxiliary class to sort pairs of PMT addresses within optical module.
Auxiliary data structure for location of product in detector.
Wrapper class for server name.
Empty structure for specification of parser element that is initialised (i.e. does not require input)...