// T. Kondo, 2010.4.19 updated 2020.8.7 void plot_VFD_Neff() { TCanvas *c1=new TCanvas("c1","canvas",0,0,700,500); c1->SetGrid(); c1->SetTopMargin(0.08); c1->SetBottomMargin(0.12); int n=0; char line[200]; double VFD[9]={-70.,-30.,30.,70.}, X[9], Ey[3][9], Rho[9]={}; double Neff[9]={-1.105e12,-0.471e12, 0.414e12, 0.968e12}; double xmin=-80., xmax=80.; double ymin=-1.2e12, ymax=1.2e12; double VFDM[50], NeffFDM[50]; for (int i=0; i<15; i++){ VFDM[i] = i*10. - 70.; // Neff = = VFD*2*iepsilon(Si)*epsilon0/(q0*d**2) NeffFDM[i]= 1.592e10*VFDM[i]; } TGraph *h1, *h2, *h3; TLegend *leg; h1 = new TGraph(4,VFD,Neff); h2 = new TGraph(15,VFDM,NeffFDM); h2->SetLineStyle(2); h1->GetXaxis()->SetTitle("Full Depletion Voltage V_{FD} [V]"); h1->GetXaxis()->SetTitleOffset(1.0); h1->GetYaxis()->SetTitle("Space charge density Neff [cm^{-3}]"); h1->GetXaxis()->SetLimits(xmin,xmax); h1->SetMaximum(ymax); h1->SetMinimum(ymin); h1->Draw("ALP"); h2->Draw("SAME L"); leg=new TLegend(0.20,0.70,0.65,0.8); leg->AddEntry(h1,"Finite Element Model","lp"); leg->AddEntry(h2,"Flat Diode Model","l"); leg->SetBorderSize(0); leg->Draw(); c1->Print("VFD_Neff.png"); return; }