Changeset 8322 for trunk/MagicSoft/Mars/macros
- Timestamp:
- 02/15/07 13:24:47 (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/macros/tutorials/mirrordelay.C
r8321 r8322 30 30 Double_t F = 4.92; // Fokallaenge = 1/4a 31 31 Double_t D = 4.5; // Mirror Diameter 32 Double_t x = 1.85; 32 Double_t x = 1.85; // incident point for photon 33 33 34 34 fsph.SetRange(-D*0.55, D*0.55); … … 68 68 m.DrawMarker(0, F); 69 69 70 // Plot run-time different versus distance 71 70 72 c = new TCanvas; 71 73 c->SetBorderMode(0); … … 75 77 c->SetGridy(); 76 78 79 TLegend leg(0.40, 0.6, 0.60, 0.85);//, "NDC"); 80 77 81 TF1 fdel("Diff", "(Sphere-Parab+TMath::Hypot(x-0, Parab-[0])-[0])/3e8*1e9"); 78 fdel.SetParameter(0, F); 82 fdel.SetRange(-D*0.55, D*0.55); 83 fdel.SetLineWidth(2); 79 84 80 f del.SetRange(-D*0.55, D*0.55);81 f = (TF1*)fdel.DrawClone();85 for (int i=-2; i<3; i++) 86 { 82 87 83 f->GetXaxis()->SetTitle("x [m]"); 84 f->GetYaxis()->SetTitle("Delay \\Delta t [ns]"); 85 f->GetXaxis()->CenterTitle(); 88 fdel.SetParameter(0, F+i*0.10*F); 89 fdel.SetLineColor(kBlack+(abs(i)==2?3:abs(i))); 90 if (i<0) 91 fdel.SetLineStyle(2); 92 if (i==0) 93 fdel.SetLineStyle(kSolid); 94 if (i>0) 95 fdel.SetLineStyle(7); 96 97 f = (TF1*)fdel.DrawClone(i==-2?"":"same"); 98 99 f->GetXaxis()->SetTitle("x [m]"); 100 f->GetYaxis()->SetTitle("Delay \\Delta t [ns]"); 101 f->GetXaxis()->CenterTitle(); 102 103 leg.AddEntry(f, Form("F=%.1fm", F+i*0.10*F)); 104 } 105 106 leg.DrawClone(); 86 107 }
Note:
See TracChangeset
for help on using the changeset viewer.