void ArcDiff(void) { gROOT->Reset(); double p = 1.0; // GeV/c double B1 = 2.0; // Tesla double B2 = 2.2; // Tesla double theta = 10.0*TMath::DegToRad(); // radians double qBr2p = 0.003; // convert from Tesla-cm to GeV/c double R1 = p*sin(theta)/(qBr2p*B1); double R2 = p*sin(theta)/(qBr2p*B2); double delta_z = 200.0; // cm double phi = tan(theta)/R1 * delta_z; phi/=2.0; double A = cos(phi) - (1.0 - B1/B2); double B = sin(phi); double delta = R1*(sqrt(A*A + B*B) - B1/B2); cout <<"phi = "<