{ #include #include gROOT->LoadMacro("AtlasUtils.C"); c1 = new TCanvas("c1","A Simple Graph",0,0,280,450); c1->SetFillStyle(4100); //c1->SetGrid(); double ymax=1.0; double ymin=0.0; ///////////////////////////////////////////////////////// double x= 5.,y,q; //---m2-------------------------------------------------- TH1F *g0 = new TH1F("g0","induced chargei strip 0",57, 0., 285.); for (y = 2.5; y<285; y+=5.){ int istrip = -2 ; q = induced( istrip, x/10000., y/10000.); g0->Fill(y, q); } gStyle->SetOptStat(0); g0->SetMaximum(ymax);g0->SetMinimum(ymin); g0->GetXaxis()->SetTitle("y [#mum]"); g0->GetXaxis()->SetTitleOffset(1.1); g0->GetYaxis()->SetTitle("Induced charge"); g0->GetYaxis()->SetTitleOffset(1.3); g0->Draw("L"); //t=new TLatex(100., 0.87,"Induced charge"); //t->SetTextSize(0.06); t->Draw(); //cid = new char[15]; sprintf(cid,"x = %d #mum",x);cid[14]=0; //t=new TLatex(120., 0.80,cid); t->SetTextSize(0.06); t->Draw(); // leg = new TLegend(0.30,0.85,0.93,0.90); leg->SetHeader("Strip -2 : x= 5 #mum"); leg->SetBorderSize(0);leg->SetFillColor(10); leg->SetTextSize(0.06); leg->Draw(); c1.Print("InducedCharge_1_m2_0.png"); //---m1-------------------------------------------------- TH1F *g0 = new TH1F("g0","induced chargei strip 0",57, 0., 285.); for (y = 2.5; y<285; y+=5.){ int istrip = -1 ; q = induced( istrip, x/10000., y/10000.); g0->Fill(y, q); } gStyle->SetOptStat(0); g0->SetMaximum(ymax);g0->SetMinimum(ymin); g0->GetXaxis()->SetTitle("y [#mum]"); g0->GetXaxis()->SetTitleOffset(1.1); g0->Draw("L"); //t=new TLatex(100., 0.87,"Induced charge"); //t->SetTextSize(0.06); t->Draw(); //cid = new char[15]; sprintf(cid,"x = %d #mum",x);cid[14]=0; //t=new TLatex(120., 0.80,cid); t->SetTextSize(0.06); t->Draw(); // leg = new TLegend(0.30,0.85,0.93,0.90); leg->SetHeader("Strip -1 : x= 5 #mum"); leg->SetBorderSize(0);leg->SetFillColor(10); leg->SetTextSize(0.06); leg->Draw(); c1.Print("InducedCharge_1_m1_0.png"); //---00-------------------------------------------------- TH1F *g0 = new TH1F("g0","induced chargei strip 0",57, 0., 285.); for (y = 2.5; y<285; y+=5.){ int istrip = 0 ; q = induced( istrip, x/10000., y/10000.); g0->Fill(y, q); } gStyle->SetOptStat(0); g0->SetMaximum(ymax);g0->SetMinimum(ymin); g0->GetXaxis()->SetTitle("y [#mum]"); g0->GetXaxis()->SetTitleOffset(1.1); g0->Draw("L"); //t=new TLatex(100., 0.87,"Induced charge"); //t->SetTextSize(0.06); t->Draw(); //cid = new char[15]; sprintf(cid,"x = %d #mum",x);cid[14]=0; //t=new TLatex(120., 0.80,cid); t->SetTextSize(0.06); t->Draw(); // leg = new TLegend(0.30,0.85,0.93,0.90); leg->SetHeader("Strip 0 : x= 5 #mum"); leg->SetBorderSize(0);leg->SetFillColor(10); leg->SetTextSize(0.06); leg->Draw(); c1.Print("InducedCharge_1_00_0.png"); //---p1-------------------------------------------------- TH1F *g0 = new TH1F("g0","induced chargei strip 0",57, 0., 285.); for (y = 2.5; y<285; y+=5.){ int istrip = 1 ; q = induced( istrip, x/10000., y/10000.); g0->Fill(y, q); } gStyle->SetOptStat(0); g0->SetMaximum(ymax);g0->SetMinimum(ymin); g0->GetXaxis()->SetTitle("y [#mum]"); g0->GetXaxis()->SetTitleOffset(1.1); g0->Draw("L"); //t=new TLatex(100., 0.87,"Induced charge"); //t->SetTextSize(0.06); t->Draw(); //cid = new char[15]; sprintf(cid,"x = %d #mum",x);cid[14]=0; //t=new TLatex(120., 0.80,cid); t->SetTextSize(0.06); t->Draw(); // leg = new TLegend(0.30,0.85,0.93,0.90); leg->SetHeader("Strip +1 : x= 5 #mum"); leg->SetBorderSize(0);leg->SetFillColor(10); leg->SetTextSize(0.06); leg->Draw(); c1.Print("InducedCharge_1_p1_0.png"); //---p2-------------------------------------------------- TH1F *g0 = new TH1F("g0","induced chargei strip 0",57, 0., 285.); for (y = 2.5; y<285; y+=5.){ int istrip = 2; q = induced( istrip, x/10000., y/10000.); g0->Fill(y, q); } gStyle->SetOptStat(0); g0->SetMaximum(ymax);g0->SetMinimum(ymin); g0->GetXaxis()->SetTitle("y [#mum]"); g0->GetXaxis()->SetTitleOffset(1.1); g0->Draw("L"); //t=new TLatex(100., 0.87,"Induced charge"); //t->SetTextSize(0.06); t->Draw(); //cid = new char[15]; sprintf(cid,"x = %d #mum",x);cid[14]=0; //t=new TLatex(120., 0.80,cid); t->SetTextSize(0.06); t->Draw(); // leg = new TLegend(0.30,0.85,0.93,0.90); leg->SetHeader("Strip +2 : x= 5 #mum"); leg->SetBorderSize(0);leg->SetFillColor(10); leg->SetTextSize(0.06); leg->Draw(); c1.Print("InducedCharge_1_p2_0.png"); ///////////////////////////////////////////////////////// x= 40.; //---m2-------------------------------------------------- TH1F *g0 = new TH1F("g0","induced chargei strip 0",57, 0., 285.); for (y = 2.5; y<285; y+=5.){ int istrip = -2 ; q = induced( istrip, x/10000., y/10000.); g0->Fill(y, q); } gStyle->SetOptStat(0); g0->SetMaximum(ymax);g0->SetMinimum(ymin); g0->GetXaxis()->SetTitle("y [#mum]"); g0->GetXaxis()->SetTitleOffset(1.1); g0->GetYaxis()->SetTitle("Induced charge"); g0->GetYaxis()->SetTitleOffset(1.3); g0->Draw("L"); //t=new TLatex(100., 0.87,"Induced charge"); //t->SetTextSize(0.06); t->Draw(); //cid = new char[15]; sprintf(cid,"x = %d #mum",x);cid[14]=0; //t=new TLatex(120., 0.80,cid); t->SetTextSize(0.06); t->Draw(); // leg = new TLegend(0.30,0.85,0.93,0.90); leg->SetHeader("Strip -2 : x= 40 #mum"); leg->SetBorderSize(0);leg->SetFillColor(10); leg->SetTextSize(0.06); leg->Draw(); c1.Print("InducedCharge_2_m2_0.png"); //---m1-------------------------------------------------- TH1F *g0 = new TH1F("g0","induced chargei strip 0",57, 0., 285.); for (y = 2.5; y<285; y+=5.){ int istrip = -1 ; q = induced( istrip, x/10000., y/10000.); g0->Fill(y, q); } gStyle->SetOptStat(0); g0->SetMaximum(ymax);g0->SetMinimum(ymin); g0->GetXaxis()->SetTitle("y [#mum]"); g0->GetXaxis()->SetTitleOffset(1.1); g0->Draw("L"); //t=new TLatex(100., 0.87,"Induced charge"); //t->SetTextSize(0.06); t->Draw(); //cid = new char[15]; sprintf(cid,"x = %d #mum",x);cid[14]=0; //t=new TLatex(120., 0.80,cid); t->SetTextSize(0.06); t->Draw(); // leg = new TLegend(0.30,0.85,0.93,0.90); leg->SetHeader("Strip -1 : x= 40 #mum"); leg->SetBorderSize(0);leg->SetFillColor(10); leg->SetTextSize(0.06); leg->Draw(); c1.Print("InducedCharge_2_m1_0.png"); //---00-------------------------------------------------- TH1F *g0 = new TH1F("g0","induced chargei strip 0",57, 0., 285.); for (y = 2.5; y<285; y+=5.){ int istrip = 0 ; q = induced( istrip, x/10000., y/10000.); g0->Fill(y, q); } gStyle->SetOptStat(0); g0->SetMaximum(ymax);g0->SetMinimum(ymin); g0->GetXaxis()->SetTitle("y [#mum]"); g0->GetXaxis()->SetTitleOffset(1.1); g0->Draw("L"); //t=new TLatex(100., 0.87,"Induced charge"); //t->SetTextSize(0.06); t->Draw(); //cid = new char[15]; sprintf(cid,"x = %d #mum",x);cid[14]=0; //t=new TLatex(120., 0.80,cid); t->SetTextSize(0.06); t->Draw(); // leg = new TLegend(0.30,0.85,0.93,0.90); leg->SetHeader("Strip 0 : x= 40 #mum"); leg->SetBorderSize(0);leg->SetFillColor(10); leg->SetTextSize(0.06); leg->Draw(); c1.Print("InducedCharge_2_00_0.png"); //---p1-------------------------------------------------- TH1F *g0 = new TH1F("g0","induced chargei strip 0",57, 0., 285.); for (y = 2.5; y<285; y+=5.){ int istrip = 1 ; q = induced( istrip, x/10000., y/10000.); g0->Fill(y, q); } gStyle->SetOptStat(0); g0->SetMaximum(ymax);g0->SetMinimum(ymin); g0->GetXaxis()->SetTitle("y [#mum]"); g0->GetXaxis()->SetTitleOffset(1.1); g0->Draw("L"); //t=new TLatex(100., 0.87,"Induced charge"); //t->SetTextSize(0.06); t->Draw(); //cid = new char[15]; sprintf(cid,"x = %d #mum",x);cid[14]=0; //t=new TLatex(120., 0.80,cid); t->SetTextSize(0.06); t->Draw(); // leg = new TLegend(0.30,0.85,0.93,0.90); leg->SetHeader("Strip +1 : x= 40 #mum"); leg->SetBorderSize(0);leg->SetFillColor(10); leg->SetTextSize(0.06); leg->Draw(); c1.Print("InducedCharge_2_p1_0.png"); //---p2-------------------------------------------------- TH1F *g0 = new TH1F("g0","induced chargei strip 0",57, 0., 285.); for (y = 2.5; y<285; y+=5.){ int istrip = 2; q = induced( istrip, x/10000., y/10000.); g0->Fill(y, q); } gStyle->SetOptStat(0); g0->SetMaximum(ymax);g0->SetMinimum(ymin); g0->GetXaxis()->SetTitle("y [#mum]"); g0->GetXaxis()->SetTitleOffset(1.1); g0->Draw("L"); //t=new TLatex(100., 0.87,"Induced charge"); //t->SetTextSize(0.06); t->Draw(); //cid = new char[15]; sprintf(cid,"x = %d #mum",x);cid[14]=0; //t=new TLatex(120., 0.80,cid); t->SetTextSize(0.06); t->Draw(); // leg = new TLegend(0.30,0.85,0.93,0.90); leg->SetHeader("Strip +2 : x= 40 #mum"); leg->SetBorderSize(0);leg->SetFillColor(10); leg->SetTextSize(0.06); leg->Draw(); c1.Print("InducedCharge_2_p2_0.png"); }