Writes a .root file with some objects that can be used to check the calibration.
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() ;
vector< SuperModule * > getSuperModules()
Get the SuperModules in the DU.
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...
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...
TCanvas * c1
Global variables to handle mouse events.
TH2D * tgts_th2(NBRun *Run)
Produces a TH2 to be interpreted as a table that summarizes which modules were targets for each sourc...
TCanvas * RooCanvas(RooWorkspace w, TH1D *h)
Produces a TCanvas with the nanobeacon peak and the fit performed with Roofit.
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...