#include <string>
#include <iostream>
#include <sstream>
#include <iomanip>
#include "TCanvas.h"
#include "RooPlot.h"
#include "RooDerivative.h"
#include "TLine.h"
#include "TF1.h"
#include "NBRun.hh"
#include "Detector.hh"
#include "pulse_classification_IO.hh"
#include "Control_utils.hh"
Go to the source code of this file.
|
void | write_output (string filename, NBRun &run) |
| Writes a .root file with some objects that can be used to check the calibration. More...
|
|
int | main (int argc, char **argv) |
|
◆ write_output()
void write_output |
( |
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 29 of file pulse_classification.cc.
31 if (filename.length()==0){
33 cout <<
"Omitting calibration checks..." << endl ;
39 cout <<
"Writing pulses to file: " << endl ;
41 cout << filename << endl ;
43 cout <<
"------------------------------------" << endl << endl ;
45 TFile outfile(filename.c_str() ,
"recreate") ;
49 outfile.mkdir(
"REF/Good") ;
50 outfile.mkdir(
"REF/Weak") ;
51 outfile.mkdir(
"REF/Saturated") ;
53 outfile.mkdir(
"TGT/Good") ;
54 outfile.mkdir(
"TGT/Weak") ;
55 outfile.mkdir(
"TGT/Saturated") ;
60 for (
auto & sm : SuperMods){
62 for (
auto & spm : sm->get_ref_pmts()){
64 if (spm->getNBPulse()->IsGood()==
true) outfile.cd(
"REF/Good") ;
66 if (spm->getNBPulse()->IsSaturatedHit()==
true) outfile.cd(
"REF/Saturated") ;
68 if (spm->getNBPulse()->IsWeak()==
true) outfile.cd(
"REF/Weak") ;
70 spm->getNBPulse()->getHtime_full()->Write() ;
72 if (spm->getNBPulse()->IsFitted()==
true){
74 RooWorkspace
w = spm->getNBPulse()->getWorkspace() ;
76 TH1D* h = spm->getNBPulse()->getHtime_full() ;
90 for (
auto & sms : sm->get_sources()){
92 for (
auto & spm : sms.second){
94 if (spm->getNBPulse()->IsGood()==
true) outfile.cd(
"TGT/Good") ;
96 if (spm->getNBPulse()->IsSaturatedHit()==
true) outfile.cd(
"TGT/Saturated") ;
98 if (spm->getNBPulse()->IsWeak()==
true) outfile.cd(
"TGT/Weak") ;
100 spm->getNBPulse()->getHtime_full()->Write() ;
102 if (spm->getNBPulse()->IsFitted()==
true){
104 RooWorkspace
w = spm->getNBPulse()->getWorkspace() ;
106 TH1D* h = spm->getNBPulse()->getHtime_full() ;
◆ main()
int main |
( |
int |
argc, |
|
|
char ** |
argv |
|
) |
| |