From 723f64eec4ef5c899903952e7bd570fa76934677 Mon Sep 17 00:00:00 2001 From: hinger_v Date: Fri, 20 May 2022 19:27:36 +0200 Subject: [PATCH] Adapt thresholds and axis ranges for SC CalibWriter --- CuFluo_analysis_sc_singlethread_fits.cpp | 1 - JFMC_CalibWriter_wBP_sc.cpp | 34 ++++++++++++++---------- 2 files changed, 20 insertions(+), 15 deletions(-) diff --git a/CuFluo_analysis_sc_singlethread_fits.cpp b/CuFluo_analysis_sc_singlethread_fits.cpp index adfc23d..7b39d77 100644 --- a/CuFluo_analysis_sc_singlethread_fits.cpp +++ b/CuFluo_analysis_sc_singlethread_fits.cpp @@ -21,7 +21,6 @@ #include "TPaveStats.h" #include "TLegend.h" #include "TPaveText.h" -//#include "TObjArray.h" #include #include diff --git a/JFMC_CalibWriter_wBP_sc.cpp b/JFMC_CalibWriter_wBP_sc.cpp index 89018fc..23f6903 100644 --- a/JFMC_CalibWriter_wBP_sc.cpp +++ b/JFMC_CalibWriter_wBP_sc.cpp @@ -74,9 +74,9 @@ int main(int argc, char* argv[]) { cout << "Did not find HG0 file for storage cell " << sci << endl; } else { sprintf( savename, "gain_ADUper1keV_2d_sc%d", sci ); - FL_HG0_gain_map = (TH2F*)FL_HG0_file->Get(savename); + FL_HG0_gain_map = (TH2F*)FL_HG0_file->Get( savename ); sprintf( savename, "gainerr_ADUper1keV_2d_sc%d", sci ); - FL_HG0_gainer_map = (TH2F*)FL_HG0_file->Get(savename); + FL_HG0_gainer_map = (TH2F*)FL_HG0_file->Get( savename ); } // CuFluo G0 dataset @@ -88,9 +88,9 @@ int main(int argc, char* argv[]) { cout << "Did not find G0 file for storage cell " << sci << endl; } else { sprintf( savename, "gain_ADUper1keV_2d_sc%d", sci ); - FL_G0_gain_map = (TH2F*)FL_G0_file->Get("gain_ADUper1keV_2d"); + FL_G0_gain_map = (TH2F*)FL_G0_file->Get( savename ); sprintf( savename, "gainerr_ADUper1keV_2d_sc%d", sci ); - FL_G0_gainer_map = (TH2F*)FL_G0_file->Get("gainerr_ADUper1keV_2d"); + FL_G0_gainer_map = (TH2F*)FL_G0_file->Get( savename ); } // Backplane pulsing dataset @@ -126,7 +126,7 @@ int main(int argc, char* argv[]) { TH2F* DB_HGX_ratio_map = 0; TH2F* DB_HGX_ratioer_map = 0; if ( DB_HGX_file->IsZombie() ) { - cout << "Did not find BP file" << endl; } + cout << "Did not find HG0 BP file" << endl; } else { cout << "loading G0/G1 from BP" << endl; DB_HGX_ratio_map = (TH2F*)DB_HGX_file->Get("g0overg1_map"); @@ -154,7 +154,7 @@ int main(int argc, char* argv[]) { TH2F* CS_HGX_ratioer_map = 0; if ( CS_HGX_file->IsZombie() ) { hasHGX=false; - cout << "Did not find CS file" << endl; + cout << "Did not find HG0 CS file" << endl; } else { if (hasHGX) hasHGX=true; CS_HGX_ratio_map = (TH2F*)CS_HGX_file->Get("g1overg2map"); @@ -413,7 +413,7 @@ int main(int argc, char* argv[]) { defaultvalmap_hg2->Fill( i%NC, i/NC, 1 ); } - if ( mapsObject->g0VALs[i] < 30 || mapsObject->g0VALs[i] > 56 || isnan( mapsObject->g0VALs[i] ) ) { + if ( mapsObject->g0VALs[i] < 22 || mapsObject->g0VALs[i] > 56 || isnan( mapsObject->g0VALs[i] ) ) { // had to change this from 30 to 22 (think about defaults!) mapsObject->g0VALs[i] = defaultG0; defaultvalmap_g0->Fill( i%NC, i/NC, 1 ); } @@ -496,7 +496,7 @@ int main(int argc, char* argv[]) { pave->Clear(); pave->AddText("G0 [ADU/keV]"); pave->Draw(); - g0mapall->GetZaxis()->SetRangeUser(38,46); + g0mapall->GetZaxis()->SetRangeUser(27,37); // was 38,46 sprintf( savename, "plots/M%s/Calib_%s/gain0_all_M%s_sc%d.png", module_str.c_str(), date, module_str.c_str(), sci ); mapcanvas->SaveAs( (const char *)(savename) ); @@ -520,7 +520,8 @@ int main(int argc, char* argv[]) { pave->AddText("G1 [ADU/keV]"); pave->Draw(); //g1mapall->GetZaxis()->SetRangeUser(-1.56,-1.36); - g1mapall->GetZaxis()->SetRangeUser(-1.56,-1.16); // VH 2022-04-26 + //g1mapall->GetZaxis()->SetRangeUser(-1.56,-1.16); // VH 2022-04-26 + g1mapall->GetZaxis()->SetRangeUser(-1.26,-0.96); // VH 2022-05-20 sprintf( savename, "plots/M%s/Calib_%s/gain1_all_M%s_sc%d.png", module_str.c_str(), date, module_str.c_str(), sci ); mapcanvas->SaveAs( (const char *)(savename) ); @@ -557,7 +558,8 @@ int main(int argc, char* argv[]) { pave->AddText("G2 [ADU/keV]"); pave->Draw(); //g2mapall->GetZaxis()->SetRangeUser(-0.122,-0.108); - g2mapall->GetZaxis()->SetRangeUser(-0.122,-0.088); // VH 2022-04-26 + //g2mapall->GetZaxis()->SetRangeUser(-0.122,-0.088); // VH 2022-04-26 + g2mapall->GetZaxis()->SetRangeUser(-0.098,-0.076); // VH 2022-05-20 sprintf( savename, "plots/M%s/Calib_%s/gain2_all_M%s_sc%d.png", module_str.c_str(), date, module_str.c_str(), sci ); mapcanvas->SaveAs( (const char *)(savename) ); @@ -606,7 +608,7 @@ int main(int argc, char* argv[]) { pave->Clear(); pave->AddText("G0 [ADU/keV]"); pave->Draw(); - g0mapcut->GetZaxis()->SetRangeUser(38,46); + g0mapcut->GetZaxis()->SetRangeUser(27,37); // was 38,46 sprintf( savename, "plots/M%s/Calib_%s/gain0_cut_M%s_sc%d.png", module_str.c_str(), date, module_str.c_str(), sci ); mapcanvas->SaveAs( (const char *)(savename) ); @@ -620,7 +622,8 @@ int main(int argc, char* argv[]) { pave->AddText("G1 [ADU/keV]"); pave->Draw(); //g1mapcut->GetZaxis()->SetRangeUser(-1.56,-1.36); - g1mapcut->GetZaxis()->SetRangeUser(-1.56,-1.16); // VH 2022-04-26 + //g1mapcut->GetZaxis()->SetRangeUser(-1.56,-1.16); // VH 2022-04-26 + g1mapcut->GetZaxis()->SetRangeUser(-1.26,-0.96); // VH 2022-05-20 sprintf( savename, "plots/M%s/Calib_%s/gain1_cut_M%s_sc%d.png", module_str.c_str(), date, module_str.c_str(), sci ); mapcanvas->SaveAs( (const char *)(savename) ); @@ -647,7 +650,8 @@ int main(int argc, char* argv[]) { pave->AddText("G2 [ADU/keV]"); pave->Draw(); //g2mapcut->GetZaxis()->SetRangeUser(-0.122,-0.108); - g2mapcut->GetZaxis()->SetRangeUser(-0.122,-0.088); // VH 2022-04-26 + //g2mapcut->GetZaxis()->SetRangeUser(-0.122,-0.088); // VH 2022-04-26 + g2mapcut->GetZaxis()->SetRangeUser(-0.098,-0.076); // VH 2022-05-20 sprintf( savename, "plots/M%s/Calib_%s/gain2_cut_M%s_sc%d.png", module_str.c_str(), date, module_str.c_str(), sci ); mapcanvas->SaveAs( (const char *)(savename) ); @@ -818,6 +822,8 @@ int main(int argc, char* argv[]) { sprintf( savename, "plots/M%s/Calib_%s/missingvalmap_hg1_M%s_sc%d.png", module_str.c_str(), date, module_str.c_str(), sci ); mapcanvas->SaveAs((const char *)(savename)); + missingvalmap_hg1->Delete(); + missingvalmap_hg2->GetXaxis()->SetTitle("Column"); missingvalmap_hg2->GetYaxis()->SetTitle("Row"); missingvalmap_hg2->GetYaxis()->SetTitleOffset(0.7); @@ -915,7 +921,7 @@ int main(int argc, char* argv[]) { c1->SetLogy(0); g1histcut->Delete(); - g1histcut->Delete(); + g1histall->Delete(); hg1histall->GetXaxis()->SetTitle("Gain HG1 [ADU / keV]"); hg1histall->Draw();