diff --git a/PARAM/SHMS/CAL/CALIB/KPP_Spring_2017/pcal_calib_488.param b/PARAM/SHMS/CAL/CALIB/KPP_Spring_2017/pcal_calib_488.param index 55c78b978e2361e164dd737f4245cb3acfe12036..494a6585867e68f87fdb2eaf89261c8eb81b6906 100644 --- a/PARAM/SHMS/CAL/CALIB/KPP_Spring_2017/pcal_calib_488.param +++ b/PARAM/SHMS/CAL/CALIB/KPP_Spring_2017/pcal_calib_488.param @@ -1,18 +1,18 @@ -; Calibration constants for run report_488, 174025 events processed +; Calibration constants for run 488_400000, 40002 events processed -pcal_neg_gain_cor = 0.423, 0.302, 0.231, 0.277, 0.200, 0.320, 0.359, 0.603, 0.475, 0.329, 0.333, 0.213, 0.342, 3.817, -pcal_pos_gain_cor = 1.674, 0.228, 0.205, 0.273, 0.228, 0.185, 0.174, 0.153, 0.458, 0.188, 0.371, 0.357, 0.724, 4.376, -pcal_arr_gain_cor = 0.000, 0.461, 0.000,-0.592, 1.140, 7.592, 0.000, 0.000, 0.000, 8.970, 0.000, 0.000, 0.000, 0.287, 0.000, 0.000, - 1.207,-1.024, 1.406, 0.552, 0.566, 0.352, 0.810, 0.868, 4.021, 3.374, 0.000,18.313, 0.000, 0.000, 0.000, 0.000, - -14.494, 1.336, 0.441, 0.529, 0.912, 0.848, 0.596, 1.069, 0.237, 1.229, 0.478, 0.000, 1.995, 0.000, 0.000, 0.000, - 2.308, 1.207, 0.505, 0.623, 0.558, 0.433, 1.152, 1.747, 2.441, 0.000, 2.967, 0.862, 0.858, 0.376, 2.133,12.337, - 1.026, 0.334, 0.408, 0.381, 0.891, 0.785, 0.657, 0.474, 1.059, 0.819, 0.353, 0.522, 0.514, 0.950, 1.068, 2.800, - 2.712, 0.402, 0.419, 0.964, 0.249, 0.555, 0.089, 0.115,-0.732, 0.000, 0.674, 0.701, 0.988, 0.240, 0.500, 1.659, - 2.477, 0.342, 0.715, 0.612, 0.353, 0.558, 0.107, 0.100, 0.100, 0.582, 0.466, 0.313, 0.562, 0.516, 0.106, 0.000, - 0.230, 0.035, 0.329, 0.185, 0.250, 0.175, 0.037, 0.073, 0.058, 0.000, 0.338, 0.283, 0.395, 0.234, 0.148, 1.184, - 0.908, 0.365, 0.434, 0.457, 0.655, 0.619, 0.351, 0.576, 0.651, 0.616, 0.339, 0.889, 0.381, 0.373, 0.456, 2.022, - 1.779,-0.199, 0.251, 0.575, 0.345, 0.850, 0.717, 0.953, 0.230, 0.265, 0.543, 0.524, 0.744, 0.478, 0.190, 5.730, - 1.655,-0.296, 0.000, 2.742, 0.310, 0.601, 0.221, 1.570, 0.396, 1.475, 0.309, 0.586, 0.496, 0.364, 0.108, 2.170, - 2.342, 1.485,-0.429, 1.523, 0.343, 0.791, 0.610,-1.725, 7.065, 1.522, 2.526,-0.132, 1.166, 0.601, 4.295, 6.234, - 2.451, 0.863, 1.189, 0.000, 0.000,-0.959,-1.476, 5.174, 0.000,-0.869, 0.994, 0.000, 0.000, 3.806, 0.000, 1.982, - 0.254, 2.304, 0.487, 0.641,-0.473,-0.373, 1.547, 3.782, 1.382, 0.000, 1.592,-3.079, 2.468, 0.000, 0.000,-0.275, \ No newline at end of file +pcal_neg_gain_cor = 0.285, 0.224, 0.231, 0.280, 0.201, 0.313, 0.397, 0.425, 0.510, 0.337, 0.334, 0.212, 0.528, 1.000, +pcal_pos_gain_cor = 2.040, 0.203, 0.209, 0.277, 0.230, 0.200, 0.217, 0.187, 0.437, 0.188, 0.373, 0.359, 0.953, 1.000, +pcal_arr_gain_cor = 1.000, 1.000, 1.000, 1.000, 1.000, 1.000, 1.000, 1.000, 1.000, 1.000, 1.000, 1.000, 1.000, 1.000, 1.000, 1.000, + 1.000, 1.000, 1.000, 1.000, 1.000, 1.000, 1.000, 1.000, 1.000, 1.000, 1.000, 1.000, 1.000, 1.000, 1.000, 1.000, + 1.000, 2.923, 0.473, 1.000, 1.000, 1.000, 4.898, 1.000, 1.000, 1.000, 1.000, 1.000, 1.695, 1.000, 1.000, 1.000, + 1.000,1.000, 0.627, 0.626, 0.537, 0.461, 1.253, 1.000, 1.000, 1.000, 1.000, 0.328,1.000, 0.895, 1.000, 1.000, + 1.239, 0.399, 0.404, 0.377, 0.887, 0.778, 0.635, 0.469, 2.950, 1.805, 0.285, 0.576, 0.522, 0.942, 1.063, 1.000, + 1.000, 0.301, 0.411, 0.963, 0.249, 0.549, 0.085, 0.104, 3.675, 1.000, 0.673, 0.695, 0.985, 0.241, 0.452, 1.000, + 1.000, 0.282, 0.705, 0.610, 0.352, 0.552, 0.099, 0.087, 0.085, 0.627, 0.466, 0.312, 0.556, 0.519,1.000, 1.000, + 1.000, 0.274, 0.328, 0.185, 0.249, 0.176, 0.041, 0.045, 0.025, 1.000, 0.326, 0.282, 0.395, 0.236, 0.115, 1.858, + 0.015, 0.413, 0.440, 0.460, 0.650, 0.624, 0.349, 0.651, 1.323, 0.529, 0.337, 0.885, 0.381, 0.378, 0.139, 1.000, + 1.000, 1.000, 0.210, 0.621, 0.339, 0.824, 0.774, 0.834, 0.545,1.000, 0.534, 0.519, 0.749, 0.479, 0.174, 1.000, + 5.112, 1.000, 1.000, 0.634,1.000, 4.243, 0.057, 1.000, 0.732, 1.000, 0.210, 0.552, 0.488, 0.366,1.000, 1.000, + 1.544, 1.000,1.000, 1.000, 1.000, 1.000,1.000, 1.000, 1.000, 3.663, 1.640, 1.000, 4.630,1.000, 1.000, 1.000, + 1.000,1.000,1.000, 1.000, 1.000, 1.000, 1.000, 1.000, 1.000, 1.000, 1.882, 1.000, 1.000, 4.770, 1.000, 1.000, + 1.000,1.000,1.000, 3.138, 1.000,1.000, 1.000, 1.000, 1.000, 1.000, 1.000, 1.000, 1.902, 1.000, 1.000, 1.000, diff --git a/onlineGUI/Config/SHMS/shms_cer_eff.cfg b/onlineGUI/Config/SHMS/shms_cer_eff.cfg new file mode 100644 index 0000000000000000000000000000000000000000..eb77569302294c7e258455a5ddbde4737166d7a7 --- /dev/null +++ b/onlineGUI/Config/SHMS/shms_cer_eff.cfg @@ -0,0 +1,15 @@ +protorootfile ../ROOTfiles/shms_replay_production_XXXXX_400000.root +guicolor lightblue +canvassize 800 800 +newpage 1 1 +title NG Sum 2d xy +macro Macros/cer_2d_ratio.C("hng_xy_sumphe") +newpage 1 1 +title HG Sum 2d xy +macro Macros/cer_2d_ratio.C("hhg_xy_sumphe") +newpage 1 1 +title NG Sum 2d xy +macro Macros/cer_2d_ratio.C("hng_xy_elec_eff") +newpage 1 1 +title HG Sum 2d xy +macro Macros/cer_2d_ratio.C("hhg_xy_elec_eff") diff --git a/onlineGUI/Macros/cer_2d_ratio.C b/onlineGUI/Macros/cer_2d_ratio.C new file mode 100644 index 0000000000000000000000000000000000000000..8fac162cdb7711174b7e529fa1b2bb8d644f145e --- /dev/null +++ b/onlineGUI/Macros/cer_2d_ratio.C @@ -0,0 +1,72 @@ +// UserScript.C +// +// Helper macro to build additional histograms +#include <TH2.h> +void UserScript() +{ + TTree *T=(TTree*)gDirectory->Get("T"); + Double_t ng_npesum; + T->SetBranchAddress("P.ngcer.npeSum", &ng_npesum); + Double_t hg_npesum; + T->SetBranchAddress("P.hgcer.npeSum", &hg_npesum); + Double_t etrack_norm; + T->SetBranchAddress("P.cal.etracknorm", &etrack_norm); + Double_t x_fp; + T->SetBranchAddress("P.dc.x_fp", &x_fp); + Double_t delta; + T->SetBranchAddress("P.gtr.dp", &delta); + Double_t y_fp; + T->SetBranchAddress("P.dc.y_fp", &y_fp); + Double_t xp_fp; + T->SetBranchAddress("P.dc.xp_fp", &xp_fp); + Double_t yp_fp; + T->SetBranchAddress("P.dc.yp_fp", &yp_fp); + TH2F* hng_xy_w_sumphe; + TH2F* hng_xy_sumphe; + TH2F* hng_xy; + hng_xy_w_sumphe = new TH2F("hng_xy_w_sumphe"," NG Cer; Y at NG (cm); X at NG (cm)",40,-40,40,40,-40,40); + hng_xy_sumphe = new TH2F("hng_xy_sumphe"," NG Cer (Z scale Total Npe); Y at NG (cm); X at NG (cm)",40,-40,40,40,-40,40); + hng_xy = new TH2F("hng_xy"," NG Cer; Y at NG (cm); X at NG (cm)",40,-40,40,40,-40,40); + hng_xy_elec = new TH2F("hng_xy_elec"," NG Cer; Y at NG (cm); X at NG (cm)",40,-40,40,40,-40,40); + hng_xy_elec_eff = new TH2F("hng_xy_elec_eff"," NG Cer Eff; Y at NG (cm); X at NG (cm)",40,-40,40,40,-40,40); + hhg_xy_w_sumphe = new TH2F("hhg_xy_w_sumphe"," HG Cer; Y at HG (cm); X at HG (cm)",60,-60,60,60,-60,60); + hhg_xy_sumphe = new TH2F("hhg_xy_sumphe"," HG Cer (Z scale Total Npe); Y at HG (cm); X at HG (cm)",60,-60,60,60,-60,60); + hhg_xy = new TH2F("hhg_xy"," HG Cer; Y at HG (cm); X at HG (cm)",60,-60,60,60,-60,60); + hhg_xy_elec = new TH2F("hhg_xy_elec"," HG Cer; Y at HG (cm); X at HG (cm)",60,-60,60,60,-60,60); + hhg_xy_elec_eff = new TH2F("hhg_xy_elec_eff"," HG Cer Eff; Y at HG (cm); X at HG (cm)",60,-60,60,60,-60,60); + for(UInt_t iev = 0, N = T->GetEntries(); iev < N; iev++) { + T->GetEntry(iev); + if (iev%10000==0) cout << " iev = " << iev << endl; + if ( etrack_norm > 0.8 && delta > -10 && delta < 22. ) { + hng_xy_w_sumphe->Fill(y_fp-90*yp_fp,x_fp-90*xp_fp,ng_npesum); + hng_xy->Fill(y_fp-90*yp_fp,x_fp-90*xp_fp,1); + if (ng_npesum > .5) hng_xy_elec->Fill(y_fp-90*yp_fp,x_fp-90*xp_fp,1); + hhg_xy_w_sumphe->Fill(y_fp+156*yp_fp,x_fp+156*xp_fp,hg_npesum); + hhg_xy->Fill(y_fp+156*yp_fp,x_fp+156*xp_fp,1); + if (hg_npesum > .5) hhg_xy_elec->Fill(y_fp+156*yp_fp,x_fp+156*xp_fp,1); + } + } + hng_xy_sumphe->Divide(hng_xy_w_sumphe,hng_xy,1,1,"B"); + hhg_xy_sumphe->Divide(hhg_xy_w_sumphe,hhg_xy,1,1,"B"); + hng_xy_elec_eff->Divide(hng_xy_elec,hng_xy,1,1,"B"); + hhg_xy_elec_eff->Divide(hhg_xy_elec,hhg_xy,1,1,"B"); +} +// +void cer_2d_ratio(TString histname){ + h2d = (TH2F*) gDirectory->Get(histname); + if(!h2d) { + UserScript(); + h2d = (TH2F*) gDirectory->Get(histname); + } + if (h2d) { + h2d->SetStats(0); + h2d->Draw("colz"); + // h2d->SetMinimum(0); + //h2d->SetMaximum(100); + h2d->GetXaxis()->SetTitleOffset(.6); + h2d->GetXaxis()->SetTitleSize(0.08); + h2d->GetYaxis()->SetTitleOffset(.6); + h2d->GetYaxis()->SetTitleSize(0.08); + } + // +}