void magbeam(){ gROOT->Reset(); // Double_t c = 299792458.0; // Speed of Light (m/s) Double_t e = 1.602176e-19; // Electron Charge (C) Double_t mec2 = 0.510998e+6; // Electron Mass (eV) Double_t kB = 8.617332e-5; // Boltzmann Constant (eV/K) Double_t Tc = 1000.0; // Effective Cathode Temperature (K) Double_t a0 = 0.003; // Sigma of Gaussian Beam at Cathode (m) Double_t B_cath = 0.2; // Cathode Solenoid Field (T) Double_t sigmae = 0.00095; // Beam Radius in Cooling Solenoid (m) Double_t B_cool = 2.0; // Cooling Solenoid Field (T) Double_t L = 30.0; // Cooling Solenoid Length (m) Double_t eOverme = 1.758820088e+11; // Electron Cyclotron Frequency/Field ( rad/(s T) ) Double_t GunHV = 350.0e+3; // Gun HV: 350 kV cout << " Gun HV = " << GunHV/1.0e+3 << " kV" << endl; Double_t E_beamline = GunHV + mec2; // Electron Total Energy in Beamline (eV) cout << " Beamline Total Energy = " << E_beamline << endl; Double_t gamma_beamline = E_beamline/mec2; Double_t beta_beamline = (1.0 - 1.0/gamma_beamline**2)**0.5; cout << " Electron Beam gamma in Beamline = " << gamma_beamline << endl; cout << " Electron Beam beta in Beamline = " << beta_beamline << endl; ////// cout << " -------------- " << endl; ////// Double_t E_cool = 55.0e+6; // Electron Total Energy in Cooler Section (eV) Double_t gamma_cool = E_cool/mec2; Double_t beta_cool = (1.0 - 1.0/gamma_cool**2)**0.5; cout << " Electron Beam gamma in Cooling Solenoid = " << gamma_cool << endl; cout << " Electron Beam beta in Cooling Solenoid = " << beta_cool << endl; ////// cout << " -------------- " << endl; ////// // Double_t th_energy = kB*Tc; // Thermal Energy (eV) cout << " Thermal Energy = " << th_energy << " eV" << endl; // Transverse Momentum (eV/c) Double_t P_transverse = (2.0 * mec2 * kB * Tc )**0.5; cout << " Cathode Transverse Momentum = " << P_transverse << " eV/c" << endl; // Thermal Emittance (um) Double_t emit_th = 1.0e+6 * a0 * (kB*Tc/(2.0*mec2) )**0.5; cout << " Thermal Emittance = " << emit_th << " um" << endl; ////// cout << " -------------- " << endl; ////// // Cathode Cyclotron Radius (um) Double_t rho_cath = 1.0e+6 * P_transverse/ (c * eOverme * mec2/c**2 * B_cath); cout << " Cathode Cycltron radius: rho_cath = " << rho_cath << " um" << endl; // Cooling Cyclotron Radius (um) Double_t rho_cool = 1.0e+6 * P_transverse/ (c * eOverme * mec2/c**2 * B_cool); cout << " Cooling Cyclotron radius: rho_cool = " << rho_cool << " um" << endl; ////// // Cathode Cyclotron Emittance (um) Double_t emit_cyc_cath = 1.0e+6 * th_energy/ (c * eOverme * mec2/c**2 * B_cath); cout << " Cathode Cyclotron Emittance: emit_cyc_cath = " << emit_cyc_cath << " um" << endl; // Cathode Cyclotron Angular Frequency (rad/s) Double_t omega_cath = eOverme * B_cath/gamma_beamline; ; cout << " Cathode Cyclotron Angular Frequency: omega_cath = " << omega_cath << " rad/sec" << endl; // Cathode Cyclotron Frequency (Hz) Double_t f_cath = omega_cath/(2.0*TMath::Pi()); cout << " Cathode Cyclotron Frequency: f_cath = " << f_cath << " Hz" << endl; ////// cout << " -------------- " << endl; ////// // Cooling Cyclotron Emittance (um) Double_t emit_cyc_cool = 1.0e+6 * th_energy/ (c * eOverme * mec2/c**2 * B_cool); cout << " Cooling Cyclotron Emittance: emit_cyc_cool = " << emit_cyc_cool << " um" << endl; // Cooling Cyclotron Angular Frequency (rad/s) Double_t omega_cool = eOverme * B_cool/gamma_cool; cout << " Cooling Cyclotron Angular Frequency: omega_cool = " << omega_cool << " rad/s" << endl; // Cooling Cyclotron Frequency (Hz) Double_t f_cool = omega_cool/(2.0*TMath::Pi()); cout << " Cooling Cyclotron Frequency: f_cool = " << f_cool << " Hz" << endl; // Number of periods of Cyclotron rotations in Cooling Solenoid Double_t nperiods = L/(beta_cool*c) * f_cool; cout << " Number of periods of Cyclotron rotations in Cooling Solenoid = " << nperiods << endl; ////// // Cathode Magnetic Emittance (um) Double_t mag_emit_cathode = 1.0e+6 * (eOverme * B_cath)/(2.0*c) * a0**2; cout << " Cathode Magnetic Emittance: mag_emit_cathode = " << mag_emit_cathode << " um" << endl; // Cooling Magnetic Emittance (um) Double_t mag_emit_cool = 1.0e+6 * (eOverme * B_cool)/(2.0*c) * sigmae**2; cout << " Cooling Magnetic Emittance: mag_emit_cool = " << mag_emit_cool << " um" << endl; ////// cout << " -------------- " << endl; ////// // Average Canonical Angular Momentum at Cathode (neV s) Double_t L_ave = 1.0e+9 * eOverme * mec2/c**2 * B_cath * a0**2; cout << " Average Canonical Angular Momentum at Cathode: L_ave = " << L_ave << " (neV s)" << endl; // Average Angular Velocity in Beamline (rad/s) Double_t phi_vel = (L_ave/1.0e+9) / (2.0*gamma_beamline*mec2/c**2 * a0**2); cout << " Average Angular Velocity in Beamline: phi_vel = " << phi_vel << " rad/s" << endl; // Average Phi momentum in Beamline (eV/c) Double_t phi_mom = TMath::Sqrt(TMath::Pi()/2.0) * c * gamma_beamline*mec2/c**2 * a0 * phi_vel; cout << " Average Phi Momentum in Beamline: phi_mom = " << phi_mom << " (eV/c)" << endl; // Average Rotational Phi Kinetic Energy (eV) Double_t phi_KE = (mec2**2 + phi_mom**2)**0.5 - mec2; cout << " Average Rotational Phi Kinetic Energy in Beamline: phi_KE = " << phi_KE << " (eV)" << endl; ////// cout << " -------------- " << endl; ////// // Longitudinal Momentum in Beamline, pz (eV/c) Double_t pz = beta_beamline*c*c*gamma_beamline*mec2/c**2; cout << " Longitudinal Momentum in Beamline: pz = " << pz << " eV/c" << endl; // How to measure the angular momentum: // 1. Measure the rotation angle Delta_phi. // 2. Compute the time: Delta_t = D/(beta_beamline*c) // 3. Compute phi_vel from: phi_vel = Delta_phi/Delta_t // 4. Compute L_ave from : L_ave = 2*gamma_beamline*me*a0**2*phi_vel // = 2*gamma_beamline*me*a0**2*beta_beamline*c/D * Delta_phi // = 2*pz*a0**2/D * Delta_phi // 5. Using: pz = beta_beamline*c*gamma_beamline*me // // 6. Finally: L_ave = 2*pz*a0**2/D * Delta_phi // ////// cout << " -------------- " << endl; ////// // Normalized Flat Beam Emittances: // Normalized Average Canonical Angular Momentum (um) Double_t nL_ave = 1.0e-3 * c * L_ave / (2.0*pz); cout << " Normalized Average Canonical Angular Momentum: nL_ave = " << nL_ave << " um" << endl; // Normalized Uncorrelated Emittance of Magnetized Beam prior to Transformer (um) Double_t e_norm_uncorrel = beta_beamline*gamma_beamline*emit_th; cout << " Normalized Uncorrelated Emittance of Magnetized Beam prior to Transformer = " << e_norm_uncorrel << " um" << endl; // Normalized Flat Beam Emittance enplus (um) Double_t enplus = ( e_norm_uncorrel**2 + (beta_beamline*gamma_beamline*nL_ave)**2 )**0.5 + beta_beamline*gamma_beamline*nL_ave; cout << " Normalized Flat Beam Emittance enplus: enplus = " << enplus << " um" << endl; // Normalized Flat Beam Emittance enminus (um) Double_t enminus = ( e_norm_uncorrel**2 + (beta_beamline*gamma_beamline*nL_ave)**2 )**0.5 - beta_beamline*gamma_beamline*nL_ave; cout << " Normalized Flat Beam Emittance enminus: enminus = " << enminus << " um" << endl; // Ratio of Flat Beam emittances Double_t ratio1 = enplus / enminus; cout << " Ratio of Flat Beam emittances: emit_x/emit_y = " << ratio1 << endl; // Or, Double_t ratio2 = mag_emit_cathode / emit_cyc_cath; cout << " Ratio of Flat Beam emittances: emit_x/emit_y = " << ratio1 << endl; ////// cout << " -------------- " << endl; ////// // Cooling Solenoid parallelism of magnetic field lines Double_t Beta_match = 0.18; // Beta Function in Cooler Solenoid (m) Double_t emit_norm_ion = 0.4; // Ion Normalized Emittance (um) Double_t DBOverB = ( emit_norm_ion/(beta_cool*gamma_cool*Beta_match*1.0e+6) )**0.5; cout << " Cooling Solenoid parallelism of magnetic field lines: DBOverB = " << DBOverB << endl; } /* root [0] .x magbeam.C Gun HV = 350 kV Beamline Total Energy = 860998 Electron Beam gamma in Beamline = 1.68493 Electron Beam beta in Beamline = 0.804838 -------------- Electron Beam gamma in Cooling Solenoid = 107.633 Electron Beam beta in Cooling Solenoid = 0.999957 -------------- Thermal Energy = 0.0861733 eV Cathode Transverse Momentum = 296.764 eV/c Thermal Emittance = 0.87113 um -------------- Cathode Cycltron radius: rho_cath = 4.9495 um Cooling Cyclotron radius: rho_cool = 0.49495 um Cathode Cyclotron Emittance: emit_cyc_cath = 0.00143722 um Cathode Cyclotron Angular Frequency: omega_cath = 2.0877e+10 rad/sec Cathode Cyclotron Frequency: f_cath = 3.32268e+09 Hz -------------- Cooling Cyclotron Emittance: emit_cyc_cool = 0.000143722 um Cooling Cyclotron Angular Frequency: omega_cool = 3.26819e+09 rad/s Cooling Cyclotron Frequency: f_cool = 5.20149e+08 Hz Number of periods of Cyclotron rotations in Cooling Solenoid = 52.0532 Cathode Magnetic Emittance: mag_emit_cathode = 528.011 um Cooling Magnetic Emittance: mag_emit_cool = 529.478 um -------------- Average Canonical Angular Momentum at Cathode: L_ave = 1800 (neV s) Average Angular Velocity in Beamline: phi_vel = 1.04385e+10 rad/s Average Phi Momentum in Beamline: phi_mom = 112720 (eV/c) Average Rotational Phi Kinetic Energy in Beamline: phi_KE = 12284.7 (eV) -------------- Longitudinal Momentum in Beamline: pz = 692964 eV/c -------------- Normalized Average Canonical Angular Momentum: nL_ave = 389.361 um Normalized Uncorrelated Emittance of Magnetized Beam prior to Transformer = 1.18134 um Normalized Flat Beam Emittance enplus: enplus = 1056.02 um Normalized Flat Beam Emittance enminus: enminus = 0.00132152 um Ratio of Flat Beam emittances: emit_x/emit_y = 799096 Ratio of Flat Beam emittances: emit_x/emit_y = 799096 -------------- Cooling Solenoid parallelism of magnetic field lines: DBOverB = 0.000143692 root [1] .q */