Jpp
Functions
JInterDomCal.cc File Reference
#include <string>
#include <iostream>
#include <sstream>
#include <iomanip>
#include <tuple>
#include "TCanvas.h"
#include "TTree.h"
#include "RooPlot.h"
#include "TLine.h"
#include "TF1.h"
#include "JDetector/JPMTRouter.hh"
#include "JLang/JObjectID.hh"
#include "JInterDomCal_IO.hh"
#include "JInterDomCal_utils.hh"
#include "Detector.hh"
#include "NBRun.hh"

Go to the source code of this file.

Functions

int main (int argc, char **argv)
 

Function Documentation

◆ main()

int main ( int  argc,
char **  argv 
)

Definition at line 28 of file JInterDomCal.cc.

28  {
29 
30  // Read user inputs
31 
32  IO options ;
33 
34  read_options(options, argc, argv) ;
35 
36  // Read the detector file. Compute the time of flight of the light from one DOM to the other based on their positions and the difference between their t0s.
37 
39 
40  NBRun run (options.ifname , detector , options.string_number , options.up_pmts , options.down_pmts , options.number_neighbors) ;
41 
42  cout << "Calibrating DOM t0s with run number: " << run.getRunNumber() << endl ;
43 
44  cout << options.ifname << endl ;
45 
46  run.analyze(options.analysis_level) ;
47 
48  JDetector new_det = Update_Detector(detector , run.getSuperModules()) ;
49 
50  write_output_det(options.ofname_detx , new_det) ;
51 
52  write_output_compare(options.ofname_txt , detector , new_det , options.string_number , options.ref_pmt , options.tgt_pmt) ;
53 
54  write_output_checks(options.ofname_checks , run) ;
55 
56 }
IO::analysis_level
int analysis_level
Definition: JInterDomCal_IO.hh:63
IO::ofname_checks
string ofname_checks
Definition: JInterDomCal_IO.hh:49
IO::down_pmts
int down_pmts
Definition: JInterDomCal_IO.hh:59
write_output_checks
void write_output_checks(string filename, NBRun &run)
Writes a .root file with some objects that can be used to check the calibration.
Definition: JInterDomCal_IO.hh:225
IO::ofname_detx
string ofname_detx
Definition: JInterDomCal_IO.hh:47
NBRun
Class dedicated to the nanobeacon analyses, where the Modules in the detector are not regarded as sin...
Definition: NBRun.hh:24
read_options
int read_options(IO &options, int argc, char **argv)
Parses the command line options and fills an IO structure with them.
Definition: JInterDomCal_IO.hh:82
IO
Structure to store the different command line arguments for JInterDomCal.
Definition: JInterDomCal_IO.hh:43
Update_Detector
JDetector Update_Detector(JDetector detector, const vector< SuperModule * > &SuperMods)
Produces a new detector file by updating the existing t0s of the PMTs.
Definition: JInterDomCal_utils.hh:76
write_output_det
void write_output_det(string filename, const JDetector &detector)
Writes a .detx file with a JDetector.
Definition: JInterDomCal_IO.hh:139
IO::ref_pmt
int ref_pmt
Definition: JInterDomCal_IO.hh:65
IO::ifname
string ifname
Definition: JInterDomCal_IO.hh:53
IO::up_pmts
int up_pmts
Definition: JInterDomCal_IO.hh:57
IO::ofname_txt
string ofname_txt
Definition: JInterDomCal_IO.hh:51
IO::string_number
int string_number
Definition: JInterDomCal_IO.hh:55
JDETECTOR::JDetector
Detector data structure.
Definition: JDetector.hh:80
IO::tgt_pmt
int tgt_pmt
Definition: JInterDomCal_IO.hh:67
JAANET::detector
Detector file.
Definition: JHead.hh:130
IO::detector_file
string detector_file
Definition: JInterDomCal_IO.hh:45
write_output_compare
void write_output_compare(string filename, const JDetector &old_detector, const JDetector &new_detector, int string_number, int ref_pmt, int tgt_pmt)
Writes a .txt with the comparison of the t0s in a given DU for two JDetectors.
Definition: JInterDomCal_IO.hh:163
loadDetector
JDetector loadDetector(string detectorFile)
Loads the content of a detector file in a JDetector object.
Definition: Detector.hh:28
IO::number_neighbors
int number_neighbors
Definition: JInterDomCal_IO.hh:61