Go to the source code of this file.
 | 
| struct   | IO | 
|   | Structure to store the different command line arguments for JRunAnalyzer.  More...
  | 
|   | 
◆ read_options()
  
  
      
        
          | int read_options  | 
          ( | 
          IO &  | 
          options,  | 
         
        
           | 
           | 
          int  | 
          argc,  | 
         
        
           | 
           | 
          char **  | 
          argv  | 
         
        
           | 
          ) | 
           |  | 
         
       
   | 
  
inline   | 
  
 
Parses the command line options and fills an IO structure with them. 
- Parameters
 - 
  
    | options | an option structure  | 
    | argc | the number of command line arguments  | 
    | argv | the command line arguments | 
  
   
- Returns
 - 1 if works 2 if it doesn't work 
 
Definition at line 82 of file JInterDomCal_IO.hh.
  114     if (zap.
read(argc, argv) != 0)
 
  120   catch(
const exception &error) {
 
  122     ERROR(error.what() << endl);
 
 
 
 
◆ write_output_det()
  
  
      
        
          | void write_output_det  | 
          ( | 
          string  | 
          filename,  | 
         
        
           | 
           | 
          const JDetector &  | 
          detector  | 
         
        
           | 
          ) | 
           |  | 
         
       
   | 
  
inline   | 
  
 
Writes a .detx file with a JDetector. 
- Parameters
 - 
  
    | filename | path to the name of the .detx  | 
    | detector | the detector to be stored  | 
  
   
Definition at line 139 of file JInterDomCal_IO.hh.
  141   store(filename , detector) ;
 
  143   cout << endl << 
"New detector stored in file: " << endl ;
 
  145   cout << filename << endl ;
 
  147   cout << 
"------------------------------------" << endl << endl ;
 
 
 
 
◆ 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  | 
         
        
           | 
          ) | 
           |  | 
         
       
   | 
  
inline   | 
  
 
Writes a .txt with the comparison of the t0s in a given DU for two JDetectors. 
- Parameters
 - 
  
    | filename | path to the name of the .txt  | 
    | old_detector | one JDetector  | 
    | new_detector | the other JDetector  | 
    | string_number | the number of the DU to compare  | 
    | ref_pmt | pmt in upper hemisphere used for the comparison  | 
    | tgt_pmt | pmt in lower hemisphere used for the comparsion  | 
  
   
Definition at line 163 of file JInterDomCal_IO.hh.
  165   if (filename.length()==0){
 
  167     cout << 
"Omitting comparison with old detector" << endl ;
 
  173     cout << 
"Writing comparison between new and old detx in file: " << endl ;
 
  175     cout << filename << endl ;
 
  177     cout << 
"------------------------------------" << endl << endl ;
 
  189     txtfile.open (filename);
 
  191     txtfile << 
"# Comparison between detector files: column 1 = Delta_t0 new detx , column 2 = Delta_t0 old detx , column 3 = column1 - column 2" << endl;
 
  193     for(
int i=0 ; i<(int)t0_diff_new.size() ; i++){
 
  195       txtfile << t0_diff_new[i] << 
"\t" << t0_diff_old[i] << 
"\t" << t0_diff_new[i] - t0_diff_old[i] << endl;
 
  199     txtfile << 
"\n# t0 vs depth: column 1 = floor , columns 2,3,4 = depth_new, mean_centered_t0_new , error_new , columns 5,6,7 = depth_old, mean_centered_t0_old , error_old , column 8 = t0_old - t0_new " << endl ;
 
  201     for (
int i=0 ; i < (int)t0_vs_depth_new.size() ; i++){
 
  203       txtfile << i+1 << 
"\t"  
  204               << get<0>(t0_vs_depth_new[i]) << 
"\t"  
  205               << get<1>(t0_vs_depth_new[i]) << 
"\t"  
  206               << get<2>(t0_vs_depth_new[i]) << 
"\t"  
  207               << get<0>(t0_vs_depth_old[i]) << 
"\t"  
  208               << get<1>(t0_vs_depth_old[i]) << 
"\t"  
  209               << get<2>(t0_vs_depth_old[i]) << 
"\t" 
  210               << get<1>(t0_vs_depth_new[i]) - get<1>(t0_vs_depth_old[i]) << endl ; 
 
 
 
 
◆ write_output_checks()
  
  
      
        
          | void write_output_checks  | 
          ( | 
          string  | 
          filename,  | 
         
        
           | 
           | 
          NBRun &  | 
          run  | 
         
        
           | 
          ) | 
           |  | 
         
       
   | 
  
inline   | 
  
 
Writes a .root file with some objects that can be used to check the calibration. 
- Parameters
 - 
  
    | filename | path to the name of the .root  | 
    | run | The nanobeacon calibration run  | 
  
   
Definition at line 225 of file JInterDomCal_IO.hh.
  227   if (filename.length()==0){
 
  229     cout << 
"Omitting calibration checks..." << endl ;
 
  235     cout << 
"Writing calibration checks in file: " << endl ;
 
  237     cout << filename << endl ;
 
  239     cout << 
"------------------------------------" << endl << endl ;
 
  241     TFile outfile(filename.c_str() , 
"recreate") ;
 
  255     outfile.mkdir(
"REF/Good") ;
 
  256     outfile.mkdir(
"REF/Weak") ;
 
  257     outfile.mkdir(
"REF/Saturated") ;
 
  259     outfile.mkdir(
"TGT/Good") ;
 
  260     outfile.mkdir(
"TGT/Weak") ;
 
  261     outfile.mkdir(
"TGT/Saturated") ;
 
  266     for (
auto & sm : SuperMods){
 
  268       for (
auto & spm : sm->get_ref_pmts()){
 
  270         if (spm->getNBPulse()->IsGood()==
true) outfile.cd(
"REF/Good") ;
 
  272         if (spm->getNBPulse()->IsSaturatedHit()==
true) outfile.cd(
"REF/Saturated") ;
 
  274         if (spm->getNBPulse()->IsWeak()==
true) outfile.cd(
"REF/Weak") ;
 
  276         spm->getNBPulse()->getHtime_full()->Write() ;
 
  278         if (spm->getNBPulse()->IsFitted()==
true){
 
  280           RooWorkspace 
w = spm->getNBPulse()->getWorkspace() ;
 
  282           TH1D* h = spm->getNBPulse()->getHtime_full() ;
 
  296       for (
auto & sms : sm->get_sources()){
 
  298         for (
auto & spm : sms.second){
 
  300           if (spm->getNBPulse()->IsGood()==
true)  outfile.cd(
"TGT/Good") ;
 
  302           if (spm->getNBPulse()->IsSaturatedHit()==
true) outfile.cd(
"TGT/Saturated") ;
 
  304           if (spm->getNBPulse()->IsWeak()==
true) outfile.cd(
"TGT/Weak") ;
 
  306           spm->getNBPulse()->getHtime_full()->Write() ;
 
  308           if (spm->getNBPulse()->IsFitted()==
true){
 
  310             RooWorkspace 
w = spm->getNBPulse()->getWorkspace() ;
 
  312             TH1D* h = spm->getNBPulse()->getHtime_full() ;
 
 
 
 
 
TH2D * srcs_th2(NBRun *Run)
Produces a TH2 to be read as a table that summarizes which modules were used as good sources for each...
 
TCanvas * c1
Global variables to handle mouse events.
 
TH2D * good_tgt_pmts_th2(NBRun *Run)
Produces a TH2 to be read as a table that summarizes which pmts were used as good references for each...
 
vector< double > getDetFile_t0_differences(int strNr, JDetector detector, int ref_pmt, int tgt_pmt)
Loops over the floors in the string chosen by the user.
 
Utility class to parse command line options.
 
vector< tuple< double, double, double > > get_t0_offsets_vs_depth(int strNr, const JDetector &detector)
 
TH2D * good_refs_th2(NBRun *Run)
Produces a TH2 to be read as a table that summarizes which pmts were used as good references for each...
 
TCanvas * RooCanvas(RooWorkspace w, TH1D *h)
Produces a TCanvas with the nanobeacon peak and the fit performed with Roofit.
 
void store(const JString &file_name, const JDetector &detector)
Store detector to output file.
 
#define make_field(A,...)
macro to convert parameter to JParserTemplateElement object
 
TH2D * tgts_th2(NBRun *Run)
Produces a TH2 to be interpreted as a table that summarizes which modules were targets for each sourc...
 
vector< SuperModule * > getSuperModules()
Get the SuperModules in the DU.
 
int read(const int argc, const char *const argv[])
Parse the program's command line options.