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));
|
||||
|
||||
|
||||
Reference in New Issue
Block a user