Added linearity percentages.
This commit is contained in:
@ -457,25 +457,93 @@ int main(int argc, char* argv[]) {
|
||||
TF1* flat_g0 = new TF1("flat_g0","0",0,g0max);
|
||||
TF1* flat_g1 = new TF1("flat_gi","0",g1min,7000);
|
||||
|
||||
TF1* lin_g0_p1pc = new TF1("lin_g0_p1pc","[0]+[1]*x",0,g0max);
|
||||
lin_g0_p1pc->SetParameter(0,g0_fit->GetParameter(0)/100.);
|
||||
lin_g0_p1pc->SetParameter(1,g0_fit->GetParameter(1)/100.);
|
||||
lin_g0_p1pc->SetLineColor(kRed);
|
||||
|
||||
TF1* lin_g0_p05pc = new TF1("lin_g0_p05pc","[0]+[1]*x",0,g0max);
|
||||
lin_g0_p05pc->SetParameter(0,g0_fit->GetParameter(0)/200.);
|
||||
lin_g0_p05pc->SetParameter(1,g0_fit->GetParameter(1)/200.);
|
||||
lin_g0_p05pc->SetLineColor(kOrange+1);
|
||||
|
||||
TF1* lin_g0_p02pc = new TF1("lin_g0_p02pc","[0]+[1]*x",0,g0max);
|
||||
lin_g0_p02pc->SetParameter(0,g0_fit->GetParameter(0)/500.);
|
||||
lin_g0_p02pc->SetParameter(1,g0_fit->GetParameter(1)/500.);
|
||||
lin_g0_p02pc->SetLineColor(kOrange);
|
||||
|
||||
TF1* lin_g0_m1pc = new TF1("lin_g0_m1pc","[0]+[1]*x",0,g0max);
|
||||
lin_g0_m1pc->SetParameter(0,g0_fit->GetParameter(0)/-100.);
|
||||
lin_g0_m1pc->SetParameter(1,g0_fit->GetParameter(1)/-100.);
|
||||
lin_g0_m1pc->SetLineColor(kRed);
|
||||
|
||||
TF1* lin_g0_m05pc = new TF1("lin_g0_m05pc","[0]+[1]*x",0,g0max);
|
||||
lin_g0_m05pc->SetParameter(0,g0_fit->GetParameter(0)/-200.);
|
||||
lin_g0_m05pc->SetParameter(1,g0_fit->GetParameter(1)/-200.);
|
||||
lin_g0_m05pc->SetLineColor(kOrange+1);
|
||||
|
||||
TF1* lin_g0_m02pc = new TF1("lin_g0_m02pc","[0]+[1]*x",0,g0max);
|
||||
lin_g0_m02pc->SetParameter(0,g0_fit->GetParameter(0)/-500.);
|
||||
lin_g0_m02pc->SetParameter(1,g0_fit->GetParameter(1)/-500.);
|
||||
lin_g0_m02pc->SetLineColor(kOrange);
|
||||
|
||||
grap0_norm->SetMarkerColor(kBlue);
|
||||
grap0_norm->SetLineColor(kBlue);
|
||||
flat_g0->SetLineColor(kBlue);
|
||||
grap0_norm->GetXaxis()->SetRangeUser(0,g0max);
|
||||
grap0_norm->SetMinimum(1.5*lin_g0_m02pc->Eval(g0max));
|
||||
grap0_norm->SetMaximum(1.5*lin_g0_p02pc->Eval(g0max));
|
||||
grap0_norm->GetXaxis()->SetTitle("Signal generator voltage [mV]");
|
||||
grap0_norm->GetYaxis()->SetTitle("Normalised ADC [ADU]");
|
||||
grap0_norm->GetYaxis()->SetTitleOffset(0.9);
|
||||
grap0_norm->Draw("AP");
|
||||
flat_g0->Draw("same");
|
||||
lin_g0_p1pc->Draw("same");
|
||||
lin_g0_p05pc->Draw("same");
|
||||
lin_g0_p02pc->Draw("same");
|
||||
lin_g0_m1pc->Draw("same");
|
||||
lin_g0_m05pc->Draw("same");
|
||||
lin_g0_m02pc->Draw("same");
|
||||
grap0_norm->Draw("P");
|
||||
sprintf(savename,"plots/M%s/BackplanePulsing/pixel_%s_%d_g0norm_M%s.png", module_str.c_str(), pixel_type.c_str(), i, module_str.c_str());
|
||||
mapcanvas->SaveAs((const char *)(savename));
|
||||
|
||||
TF1* lin_g1_p02pc = new TF1("lin_g1_p02pc","[0]+[1]*x",g1min,7000);
|
||||
lin_g1_p02pc->SetParameter(0,g1_fit->GetParameter(0)/500.);
|
||||
lin_g1_p02pc->SetParameter(1,g1_fit->GetParameter(1)/500.);
|
||||
lin_g1_p02pc->SetLineColor(kOrange);
|
||||
|
||||
TF1* lin_g1_p01pc = new TF1("lin_g1_p01pc","[0]+[1]*x",g1min,7000);
|
||||
lin_g1_p01pc->SetParameter(0,g1_fit->GetParameter(0)/1000.);
|
||||
lin_g1_p01pc->SetParameter(1,g1_fit->GetParameter(1)/1000.);
|
||||
lin_g1_p01pc->SetLineColor(kYellow);
|
||||
|
||||
TF1* lin_g1_m02pc = new TF1("lin_g1_m02pc","[0]+[1]*x",g1min,7000);
|
||||
lin_g1_m02pc->SetParameter(0,g1_fit->GetParameter(0)/-500.);
|
||||
lin_g1_m02pc->SetParameter(1,g1_fit->GetParameter(1)/-500.);
|
||||
lin_g1_m02pc->SetLineColor(kOrange);
|
||||
|
||||
TF1* lin_g1_m01pc = new TF1("lin_g1_m01pc","[0]+[1]*x",g1min,7000);
|
||||
lin_g1_m01pc->SetParameter(0,g1_fit->GetParameter(0)/-1000.);
|
||||
lin_g1_m01pc->SetParameter(1,g1_fit->GetParameter(1)/-1000.);
|
||||
lin_g1_m01pc->SetLineColor(kYellow);
|
||||
|
||||
grap1_norm->SetMarkerColor(kGreen+2);
|
||||
grap1_norm->SetLineColor(kGreen+2);
|
||||
flat_g1->SetLineColor(kGreen+2);
|
||||
grap1_norm->GetXaxis()->SetRangeUser(g1min,7000);
|
||||
grap1_norm->SetMinimum(1.5*lin_g1_m02pc->Eval(g1min));
|
||||
grap1_norm->SetMaximum(1.5*lin_g1_p02pc->Eval(g1min));
|
||||
grap1_norm->GetXaxis()->SetTitle("Signal generator voltage [mV]");
|
||||
grap1_norm->GetYaxis()->SetTitle("Normalised ADC [ADU]");
|
||||
grap1_norm->GetYaxis()->SetTitleOffset(0.9);
|
||||
grap1_norm->Draw("AP");
|
||||
flat_g1->Draw("same");
|
||||
lin_g1_p02pc->Draw("same");
|
||||
lin_g1_p01pc->Draw("same");
|
||||
lin_g1_m02pc->Draw("same");
|
||||
lin_g1_m01pc->Draw("same");
|
||||
grap1_norm->Draw("P");
|
||||
sprintf(savename,"plots/M%s/BackplanePulsing/pixel_%s_%d_g1norm_M%s.png", module_str.c_str(), pixel_type.c_str(), i, module_str.c_str());
|
||||
mapcanvas->SaveAs((const char *)(savename));
|
||||
|
||||
|
@ -1109,13 +1109,39 @@ int main(int argc, char* argv[]) {
|
||||
TF1* flat_g1 = new TF1("flat_g1","0",rangemin_g1, rangemax_g1);
|
||||
flat_g1->SetLineColor(kGreen+2);
|
||||
|
||||
TF1* lin_g1_p02pc = new TF1("lin_g1_p02pc","[0]+[1]*x",rangemin_g1,rangemax_g1);
|
||||
lin_g1_p02pc->SetParameter(0,fit_g1->GetParameter(0)/500.);
|
||||
lin_g1_p02pc->SetParameter(1,fit_g1->GetParameter(1)/500.);
|
||||
lin_g1_p02pc->SetLineColor(kOrange);
|
||||
|
||||
TF1* lin_g1_p05pc = new TF1("lin_g1_p05pc","[0]+[1]*x",rangemin_g1,rangemax_g1);
|
||||
lin_g1_p05pc->SetParameter(0,fit_g1->GetParameter(0)/200.);
|
||||
lin_g1_p05pc->SetParameter(1,fit_g1->GetParameter(1)/200.);
|
||||
lin_g1_p05pc->SetLineColor(kOrange+1);
|
||||
|
||||
TF1* lin_g1_m02pc = new TF1("lin_g1_m02pc","[0]+[1]*x",rangemin_g1,rangemax_g1);
|
||||
lin_g1_m02pc->SetParameter(0,fit_g1->GetParameter(0)/-500.);
|
||||
lin_g1_m02pc->SetParameter(1,fit_g1->GetParameter(1)/-500.);
|
||||
lin_g1_m02pc->SetLineColor(kOrange);
|
||||
|
||||
TF1* lin_g1_m05pc = new TF1("lin_g1_m05pc","[0]+[1]*x",rangemin_g1,rangemax_g1);
|
||||
lin_g1_m05pc->SetParameter(0,fit_g1->GetParameter(0)/-200.);
|
||||
lin_g1_m05pc->SetParameter(1,fit_g1->GetParameter(1)/-200.);
|
||||
lin_g1_m05pc->SetLineColor(kOrange+1);
|
||||
|
||||
norm_g1->GetXaxis()->SetTitle("Integration time [#mus]");
|
||||
norm_g1->GetYaxis()->SetTitle("Normalised ADC [ADU]");
|
||||
norm_g1->GetYaxis()->SetTitleOffset(0.9);
|
||||
norm_g1->SetMinimum(-100);
|
||||
norm_g1->SetMaximum(100);
|
||||
norm_g1->GetXaxis()->SetRangeUser(r1_filter[0],rangemax_g1);
|
||||
norm_g1->SetMinimum(1.5*lin_g1_m05pc->Eval(rangemin_g1));
|
||||
norm_g1->SetMaximum(1.5*lin_g1_p05pc->Eval(rangemin_g1));
|
||||
norm_g1->Draw("AP");
|
||||
flat_g1->Draw("same");
|
||||
lin_g1_p02pc->Draw("same");
|
||||
lin_g1_p05pc->Draw("same");
|
||||
lin_g1_m02pc->Draw("same");
|
||||
lin_g1_m05pc->Draw("same");
|
||||
norm_g1->Draw("P");
|
||||
sprintf(savename,"plots/M%s/CurrentSource/pixel_%s_%d_g1norm_M%s.png", module_str.c_str(), pixel_type.c_str(), i, module_str.c_str());
|
||||
mapcanvas->SaveAs((const char *)(savename));
|
||||
|
||||
@ -1214,13 +1240,39 @@ int main(int argc, char* argv[]) {
|
||||
TF1* flat_g2 = new TF1("flat_g2","0",rangemin_g2, rangemax_g2);
|
||||
flat_g2->SetLineColor(kRed);
|
||||
|
||||
TF1* lin_g2_p02pc = new TF1("lin_g2_p02pc","[0]+[1]*x",rangemin_g2,rangemax_g2);
|
||||
lin_g2_p02pc->SetParameter(0,fit_g2->GetParameter(0)/500.);
|
||||
lin_g2_p02pc->SetParameter(1,fit_g2->GetParameter(1)/500.);
|
||||
lin_g2_p02pc->SetLineColor(kOrange);
|
||||
|
||||
TF1* lin_g2_p05pc = new TF1("lin_g2_p05pc","[0]+[1]*x",rangemin_g2,rangemax_g2);
|
||||
lin_g2_p05pc->SetParameter(0,fit_g2->GetParameter(0)/200.);
|
||||
lin_g2_p05pc->SetParameter(1,fit_g2->GetParameter(1)/200.);
|
||||
lin_g2_p05pc->SetLineColor(kOrange+1);
|
||||
|
||||
TF1* lin_g2_m02pc = new TF1("lin_g2_m02pc","[0]+[1]*x",rangemin_g2,rangemax_g2);
|
||||
lin_g2_m02pc->SetParameter(0,fit_g2->GetParameter(0)/-500.);
|
||||
lin_g2_m02pc->SetParameter(1,fit_g2->GetParameter(1)/-500.);
|
||||
lin_g2_m02pc->SetLineColor(kOrange);
|
||||
|
||||
TF1* lin_g2_m05pc = new TF1("lin_g2_m05pc","[0]+[1]*x",rangemin_g2,rangemax_g2);
|
||||
lin_g2_m05pc->SetParameter(0,fit_g2->GetParameter(0)/-200.);
|
||||
lin_g2_m05pc->SetParameter(1,fit_g2->GetParameter(1)/-200.);
|
||||
lin_g2_m05pc->SetLineColor(kOrange+1);
|
||||
|
||||
norm_g2->GetXaxis()->SetTitle("Integration time [#mus]");
|
||||
norm_g2->GetYaxis()->SetTitle("Normalised ADC [ADU]");
|
||||
norm_g2->GetYaxis()->SetTitleOffset(0.9);
|
||||
norm_g2->SetMinimum(-100);
|
||||
norm_g2->SetMaximum(100);
|
||||
norm_g2->GetXaxis()->SetRangeUser(rangemin_g2,rangemax_g2);
|
||||
norm_g2->SetMinimum(1.5*lin_g2_m05pc->Eval(rangemin_g2));
|
||||
norm_g2->SetMaximum(1.5*lin_g2_p05pc->Eval(rangemin_g2));
|
||||
norm_g2->Draw("AP");
|
||||
flat_g2->Draw("same");
|
||||
lin_g2_p02pc->Draw("same");
|
||||
lin_g2_p05pc->Draw("same");
|
||||
lin_g2_m02pc->Draw("same");
|
||||
lin_g2_m05pc->Draw("same");
|
||||
norm_g2->Draw("P");
|
||||
sprintf(savename,"plots/M%s/CurrentSource/pixel_%s_%d_g2norm_M%s.png", module_str.c_str(), pixel_type.c_str(), i, module_str.c_str());
|
||||
mapcanvas->SaveAs((const char *)(savename));
|
||||
|
||||
|
Reference in New Issue
Block a user