diff --git a/README.md b/README.md index 6add68bba5b1cf7a86a3b3dc5b55d29e9c698b61..7cfd34465ecf3536f2d4d0bdaa62988bc5a446d9 100644 --- a/README.md +++ b/README.md @@ -13,7 +13,7 @@ for Electron Ion Collider. **Software:** - Standalone framework independent code - Clean C++ API to embed in analysis scripts and/or frameworks -- Convenient Command Line Interface (CLI) HepMC2/3 converter, that adds crossing_angle and beam effects +- Convenient Command Line Interface (CLI) HepMC2/3 converter, that adds crossing_angle_hor and beam effects - Configurable beam parameters interface (yaml files) @@ -92,13 +92,18 @@ converter. - eAu \[GeV\]: 110x18, 110x10, 110x5, 41x5 - One can [the exact beam parameters](https://eicweb.phy.anl.gov/monte_carlo/afterburner/-/blob/main/cpp/afterburner/EicConfigurator.cc) that correspond to EIC CDR tables 3.3, 3.4, 3.5 -- Using `-c/--config` flag one can select a profile: - - 0: High Divergence (higher luminosity) - default, - - 1: High Acceptance - - 2: eAu +- Using `-p/--preset` flag one can select a profile: + - 0: IP6 High Divergence (higher luminosity) - default, + - 1: IP6 High Acceptance + - 2: IP6 eAu + - 3: IP8 High Divergence (higher luminosity) - default, + - 4: IP8 High Acceptance + - 5: IP8 eAu - Crossing angle is given in horizontal and vertical components - [Afterburner configuration](https://eicweb.phy.anl.gov/monte_carlo/afterburner/-/blob/main/cpp/afterburner/AfterburnerConfig.hh) +> (!) For now IP8 is a copy of IP6 parameters with 35 mrad crossing angle. It will be populated with IP8 own parameters as +> soon as they are officially published. ### Input file requirements @@ -118,7 +123,7 @@ converter. | -h,--help | Print this help message and exit| | -v,--version | Shows package version number | | -o,--output TEXT | Base name for Output files ((!) no extension)| -| -c,--config TEXT | Beams configuration 0: High divergence\[default\], 1: High acceptance, 2: eAu| +| -p,--preset TEXT | Beams configuration 0: IP6 High divergence\[default\], 1: IP6 High acceptance, 2: IP6 eAu| | -i,--in-format TEXT | Input format: auto \[default\], hepmc2, hepmc3, hpe, lhef, gz, treeroot, root| | -f,--out-format TEXT | Output format: hepmc3 \[default\], hepmc2, dot, none (no events file is saved)| | -s,--ev-start INT | Start event index (all previous are skipped)| @@ -135,11 +140,14 @@ converter. > This method is very coarse as if in a source file the crossing angle is 0 but all beam effects do exist, > beam effects will be applied twice --c,--config flag, values [0,1,2] set config and auto determine energy from source file: +-p,--preset flag, values \[0,1,2,3,4,5\] set config and auto determine energy from source file: - "0": IP6, High divergence, auto read energy [default], - "1": IP6, High acceptance, auto read energy - "2": IP6, eAu, auto read energy +- "3": IP8, High divergence, auto read energy [default], +- "4": IP8, High acceptance, auto read energy +- "5": IP8, eAu, auto read energy The other options sets energy settings manually, not checking the source file: @@ -147,14 +155,20 @@ The other options sets energy settings manually, not checking the source file: <tr><td>ip6_hidiv_41x5</td><td>ip6_hidiv_100x5</td><td>ip6_hidiv_100x10</td><td>ip6_hidiv_275x10</td><td>ip6_hidiv_275x18</td></tr> <tr><td>ip6_hiacc_41x5</td><td>ip6_hiacc_100x5</td><td>ip6_hiacc_100x10</td><td>ip6_hiacc_275x10</td><td>ip6_hiacc_275x18</td></tr> <tr><td>ip6_eau_41x5 </td><td>ip6_eau_110x5 </td><td>ip6_eau_110x10 </td><td>ip6_eau_110x18 </td><td>-</td></tr> + <tr><td>ip8_hidiv_41x5</td><td>ip8_hidiv_100x5</td><td>ip8_hidiv_100x10</td><td>ip8_hidiv_275x10</td><td>ip8_hidiv_275x18</td></tr> + <tr><td>ip8_hiacc_41x5</td><td>ip8_hiacc_100x5</td><td>ip8_hiacc_100x10</td><td>ip8_hiacc_275x10</td><td>ip8_hiacc_275x18</td></tr> + <tr><td>ip8_eau_41x5 </td><td>ip8_eau_110x5 </td><td>ip8_eau_110x10 </td><td>ip8_eau_110x18 </td><td>-</td></tr> </table> Example of manual configuration setting: ```bash -abconv -c ip6_hidiv_100x5 source_file.hepmc +abconv -p ip6_hidiv_100x5 source_file.hepmc ``` +> (!) For now IP8 is a copy of IP6 parameters with 35 mrad crossing angle. It will be populated with IP8 own parameters as +> soon as they are officially published. +> ## Validation diff --git a/cpp/abconv/ArgumentProcessor.cc b/cpp/abconv/ArgumentProcessor.cc index 191874d4fc5f45ecd5dc81e7f4b93e46a0d8e0b2..ed46ed36d937894fb161b2373a624eaea25d3003 100644 --- a/cpp/abconv/ArgumentProcessor.cc +++ b/cpp/abconv/ArgumentProcessor.cc @@ -25,7 +25,7 @@ UserArguments ArgumentProcessor::Process(int argc, char **argv) long ev_end = 0; app.add_option("-o, --output", output_base_name, "Base name for Output files ((!) no extension)"); - app.add_option("-p, --preset", preset, "0: High divergence[default], 1: High acceptance, 2: eAu; More - see below"); + app.add_option("-p, --preset", preset, "0: IP6 High divergence[default], 1: IP6 High acceptance, 2: IP6 eAu; 3: IP8 Hight divergence..., More - see below"); app.add_option("-i, --in-format", input_format, "Input format: auto [default], hepmc2, hepmc3, hpe, lhef, gz, treeroot, root"); app.add_option("-f, --out-format", output_format, "Output format: hepmc3 [default], hepmc2, dot, none (no events file is saved)"); @@ -92,14 +92,20 @@ std::string ArgumentProcessor::get_description() { } std::string ArgumentProcessor::get_footer() { - return "-c,--config flag, values [0,1,2] set config and auto determine energy from source file: \n" + return "-p,--preset flag, values [0,1,2] set config and auto determine energy from source file: \n" " 0: IP6, High divergence, auto read energy [default], \n" " 1: IP6, High acceptance, auto read energy\n" " 2: IP6, eAu, auto read energy\n" + " 3: IP8, High divergence, auto read energy [default], \n" + " 4: IP8, High acceptance, auto read energy\n" + " 5: IP8, eAu, auto read energy\n" "The other options sets energy settings manually, not checking the source file:\n" " ip6_hidiv_41x5, ip6_hidiv_100x5, ip6_hidiv_100x10, ip6_hidiv_275x10, ip6_hidiv_275x18\n" " ip6_hiacc_41x5, ip6_hiacc_100x5, ip6_hiacc_100x10, ip6_hiacc_275x10, ip6_hiacc_275x18\n" " ip6_eau_41x5, ip6_eau_110x5, ip6_eau_110x10, ip6_eau_110x18\n" + " ip8_hidiv_41x5, ip8_hidiv_100x5, ip8_hidiv_100x10, ip8_hidiv_275x10, ip8_hidiv_275x18\n" + " ip8_hiacc_41x5, ip8_hiacc_100x5, ip8_hiacc_100x10, ip8_hiacc_275x10, ip8_hiacc_275x18\n" + " ip8_eau_41x5, ip8_eau_110x5, ip8_eau_110x10, ip8_eau_110x18\n" "Example of manual configuration setting: \n" - " abconv -c ip6_hidiv_100x5 source_file.hepmc\n"; + " abconv -p ip6_hidiv_100x5 source_file.hepmc\n"; } diff --git a/cpp/abconv/ConfigProvider.cc b/cpp/abconv/ConfigProvider.cc index e77c18fac3445184d6478e92b910e89d6c7a975b..fea3fc9d5d5b70efa7c724bebf72cb36562dd805 100644 --- a/cpp/abconv/ConfigProvider.cc +++ b/cpp/abconv/ConfigProvider.cc @@ -45,15 +45,27 @@ ab::AfterburnerConfig ab::convert::ConfigProvider::from_user_args(UserArguments auto reader = ab::convert::generate_reader(arg.InputFormat, arg.InputFileName); if(arg.preset_name == "0") { - return from_hepmc_file(reader, ab::EicBeamPresets::HighDivergence); + return from_hepmc_file(reader, ab::EicBeamPresets::Ip6HighDivergence); } if(arg.preset_name == "1") { - return from_hepmc_file(reader, ab::EicBeamPresets::HighAcceptance); + return from_hepmc_file(reader, ab::EicBeamPresets::Ip6HighAcceptance); } if(arg.preset_name == "2") { - return from_hepmc_file(reader, ab::EicBeamPresets::ElectronAurum); + return from_hepmc_file(reader, ab::EicBeamPresets::Ip6ElectronAurum); + } + + if(arg.preset_name == "3") { + return from_hepmc_file(reader, ab::EicBeamPresets::Ip8HighDivergence); + } + + if(arg.preset_name == "4") { + return from_hepmc_file(reader, ab::EicBeamPresets::Ip8HighAcceptance); + } + + if(arg.preset_name == "5") { + return from_hepmc_file(reader, ab::EicBeamPresets::Ip8ElectronAurum); } // If it is not 0, 1, or 2, it is a manual config diff --git a/cpp/abconv/Converter.cc b/cpp/abconv/Converter.cc index 4efeda7a99b0759cf1dddce51b96e918f7029357..1af7a54751b0fd892be089d08101ae4f3699599d 100644 --- a/cpp/abconv/Converter.cc +++ b/cpp/abconv/Converter.cc @@ -201,7 +201,7 @@ HepMC3::ConstGenParticles ab::abconv::Converter::get_beam_particles(const HepMC3 void ab::abconv::Converter::ab_config_to_run_info(const std::shared_ptr<HepMC3::GenRunInfo>& run_info, ab::AfterburnerConfig cfg) { using namespace HepMC3; run_info->add_attribute("ab_afterburner_is_used", std::make_shared<BoolAttribute>(true)); - run_info->add_attribute("ab_crossing_angle", std::make_shared<DoubleAttribute>(cfg.crossing_angle)); + run_info->add_attribute("ab_crossing_angle", std::make_shared<DoubleAttribute>(cfg.crossing_angle_hor)); run_info->add_attribute("ab_use_beam_bunch_sim", std::make_shared<BoolAttribute>(cfg.use_beam_bunch_sim)); run_info->add_attribute("ab_hadron_divergence_hor", std::make_shared<DoubleAttribute>(cfg.hadron_beam.divergence_hor)); diff --git a/cpp/afterburner/Afterburner.cc b/cpp/afterburner/Afterburner.cc index ddddb29229d10095adb34b0712cbaaa7d5c2c5b0..51e4a69b793461ce7bf9507be1927679a332b9d2 100644 --- a/cpp/afterburner/Afterburner.cc +++ b/cpp/afterburner/Afterburner.cc @@ -58,7 +58,7 @@ ab::BunchInteractionResult ab::Afterburner::generate_vertx_with_bunch_interactio // Set particle positions double hadron_z = _smear.gauss(_cfg.hadron_beam.rms_bunch_length); double lepton_z = _smear.gauss(_cfg.lepton_beam.rms_bunch_length); - double crossing_angle = _cfg.crossing_angle; + double crossing_angle = _cfg.crossing_angle_hor; double had_bunch_rms_hor = sqrt(_cfg.hadron_beam.beta_star_hor * _cfg.hadron_beam.rms_emittance_hor); double had_bunch_rms_ver = sqrt(_cfg.hadron_beam.beta_star_ver * _cfg.hadron_beam.rms_emittance_ver); @@ -274,7 +274,7 @@ ab::AfterburnerEventResult ab::Afterburner::process_event(const CLHEP::HepLorent //CLHEP::Hep3Vector ideal_hadron_dir = spherical_to_cartesian(_cfg.hadron_beam.direction_theta, _cfg.hadron_beam.direction_phi); //CLHEP::Hep3Vector ideal_lepton_dir = spherical_to_cartesian(_cfg.lepton_beam.direction_theta, _cfg.lepton_beam.direction_phi); CLHEP::Hep3Vector ideal_lepton_dir(0, 0, -1); - CLHEP::Hep3Vector ideal_hadron_dir = CLHEP::Hep3Vector(z_axis).rotateY(_cfg.crossing_angle).rotateX(_cfg.crossing_angle_ver); + CLHEP::Hep3Vector ideal_hadron_dir = CLHEP::Hep3Vector(z_axis).rotateY(_cfg.crossing_angle_hor).rotateX(_cfg.crossing_angle_ver); //double crossing_angle = acos(ideal_hadron_dir.unit().dot(-ideal_lepton_dir.unit())); @@ -282,7 +282,7 @@ ab::AfterburnerEventResult ab::Afterburner::process_event(const CLHEP::HepLorent cout << __PRETTY_FUNCTION__ << ": " << endl; cout << "ideal_hadron_dir = " << ideal_hadron_dir << endl; cout << "ideal_lepton_dir = " << ideal_lepton_dir << endl; - cout << "crossing_angle_hor = " << _cfg.crossing_angle << endl; + cout << "crossing_angle_hor = " << _cfg.crossing_angle_hor << endl; cout << "crossing_angle_ver = " << _cfg.crossing_angle_ver << endl; } @@ -301,10 +301,10 @@ ab::AfterburnerEventResult ab::Afterburner::process_event(const CLHEP::HepLorent } // Calculate angular deflection - double hadron_crab_hor = _cfg.crossing_angle/2.0/sqrt(_cfg.hadron_beam.beta_crab_hor * _cfg.hadron_beam.beta_star_hor); + double hadron_crab_hor = _cfg.crossing_angle_hor / 2.0 / sqrt(_cfg.hadron_beam.beta_crab_hor * _cfg.hadron_beam.beta_star_hor); double hadron_crab_ver = 0; - double lepton_crab_hor = _cfg.crossing_angle/2.0/sqrt(_cfg.lepton_beam.beta_crab_hor * _cfg.lepton_beam.beta_star_hor); + double lepton_crab_hor = _cfg.crossing_angle_hor / 2.0 / sqrt(_cfg.lepton_beam.beta_crab_hor * _cfg.lepton_beam.beta_star_hor); double lepton_crab_ver = 0; CLHEP::Hep3Vector real_hadron_dir = smear_beam_divergence(ideal_hadron_dir, _cfg.hadron_beam, bunch_one_z, hadron_crab_hor, hadron_crab_ver); @@ -450,7 +450,7 @@ void ab::Afterburner::print() const { cout << "AFTERBURNER CONFIGURATION\n"; cout << "=========================\n"; - cout << "Crossing angle hor: " << _cfg.crossing_angle << endl; + cout << "Crossing angle hor: " << _cfg.crossing_angle_hor << endl; cout << "Crossing angle ver: " << _cfg.crossing_angle_ver << endl; cout << "Vertex distribution width" diff --git a/cpp/afterburner/AfterburnerConfig.hh b/cpp/afterburner/AfterburnerConfig.hh index d34e6f5659b91f1f0a30f59d64f8fd410f3b6016..9a969c6a4d1e53e004714f91a9eac1fce56e9bdc 100644 --- a/cpp/afterburner/AfterburnerConfig.hh +++ b/cpp/afterburner/AfterburnerConfig.hh @@ -34,10 +34,10 @@ namespace ab { /** * Crossing angle in horizontal plane [rad] */ - double crossing_angle = 25e-3; + double crossing_angle_hor = 25e-3; /** - * Crossing angle in vertical plane + * Crossing angle in vertical plane [rad] */ double crossing_angle_ver = 100e-6; diff --git a/cpp/afterburner/EicConfigurator.cc b/cpp/afterburner/EicConfigurator.cc index ae69d27918897c21d90ad8372c00f30daffd8ac1..d42d48f91937acf0773078504eb90d22cc5d5661 100644 --- a/cpp/afterburner/EicConfigurator.cc +++ b/cpp/afterburner/EicConfigurator.cc @@ -4,10 +4,17 @@ using namespace CLHEP; +// ------------------------------------------------------------------ +// ========================== IP 6 ================================== +// ------------------------------------------------------------------ -ab::AfterburnerConfig ab::EicConfigurator::config_eau_110x18() { +ab::AfterburnerConfig ab::EicConfigurator::preset_ip6_eau_110x18() { ab::AfterburnerConfig cfg; - + + // Crossing angle + cfg.crossing_angle_hor = 25e-3; // Crossing angle in horizontal plane [rad] + cfg.crossing_angle_ver = 100e-6; // Crossing angle in vertical plane [rad] + cfg.hadron_beam.beta_crab_hor = 500000.0; cfg.lepton_beam.beta_crab_hor = 150000.0; @@ -37,9 +44,13 @@ ab::AfterburnerConfig ab::EicConfigurator::config_eau_110x18() { } -ab::AfterburnerConfig ab::EicConfigurator::config_eau_110x10() { +ab::AfterburnerConfig ab::EicConfigurator::preset_ip6_eau_110x10() { ab::AfterburnerConfig cfg; - + + // Crossing angle + cfg.crossing_angle_hor = 25e-3; // Crossing angle in horizontal plane [rad] + cfg.crossing_angle_ver = 100e-6; // Crossing angle in vertical plane [rad] + cfg.hadron_beam.beta_crab_hor = 500000.0; cfg.lepton_beam.beta_crab_hor = 150000.0; @@ -69,10 +80,13 @@ ab::AfterburnerConfig ab::EicConfigurator::config_eau_110x10() { } - -ab::AfterburnerConfig ab::EicConfigurator::config_eau_110x5() { +ab::AfterburnerConfig ab::EicConfigurator::preset_ip6_eau_110x5() { ab::AfterburnerConfig cfg; - + + // Crossing angle + cfg.crossing_angle_hor = 25e-3; // Crossing angle in horizontal plane [rad] + cfg.crossing_angle_ver = 100e-6; // Crossing angle in vertical plane [rad] + cfg.hadron_beam.beta_crab_hor = 500000.0; cfg.lepton_beam.beta_crab_hor = 150000.0; @@ -102,9 +116,12 @@ ab::AfterburnerConfig ab::EicConfigurator::config_eau_110x5() { } -ab::AfterburnerConfig ab::EicConfigurator::config_eau_41x5() { +ab::AfterburnerConfig ab::EicConfigurator::preset_ip6_eau_41x5() { ab::AfterburnerConfig cfg; - + + // Crossing angle + cfg.crossing_angle_hor = 25e-3; // Crossing angle in horizontal plane [rad] + cfg.crossing_angle_ver = 100e-6; // Crossing angle in vertical plane [rad] //βcrabm1300/500/200beta function at crab cavity, cfg.hadron_beam.beta_crab_hor = 200000.0; @@ -135,10 +152,13 @@ ab::AfterburnerConfig ab::EicConfigurator::config_eau_41x5() { } - -ab::AfterburnerConfig ab::EicConfigurator::config_hiacc_41x5() { +ab::AfterburnerConfig ab::EicConfigurator::preset_ip6_hiacc_41x5() { ab::AfterburnerConfig cfg; - + + // Crossing angle + cfg.crossing_angle_hor = 25e-3; // Crossing angle in horizontal plane [rad] + cfg.crossing_angle_ver = 100e-6; // Crossing angle in vertical plane [rad] + cfg.hadron_beam.beta_crab_hor = 200000.0; cfg.lepton_beam.beta_crab_hor = 150000.0; @@ -166,8 +186,13 @@ ab::AfterburnerConfig ab::EicConfigurator::config_hiacc_41x5() { return cfg; } -ab::AfterburnerConfig ab::EicConfigurator::config_hiacc_100x5() { + +ab::AfterburnerConfig ab::EicConfigurator::preset_ip6_hiacc_100x5() { ab::AfterburnerConfig cfg; + + // Crossing angle + cfg.crossing_angle_hor = 25e-3; // Crossing angle in horizontal plane [rad] + cfg.crossing_angle_ver = 100e-6; // Crossing angle in vertical plane [rad] cfg.hadron_beam.beta_crab_hor = 500000.0; cfg.lepton_beam.beta_crab_hor = 150000.0; @@ -196,8 +221,13 @@ ab::AfterburnerConfig ab::EicConfigurator::config_hiacc_100x5() { return cfg; } -ab::AfterburnerConfig ab::EicConfigurator::config_hiacc_100x10() { + +ab::AfterburnerConfig ab::EicConfigurator::preset_ip6_hiacc_100x10() { ab::AfterburnerConfig cfg; + + // Crossing angle + cfg.crossing_angle_hor = 25e-3; // Crossing angle in horizontal plane [rad] + cfg.crossing_angle_ver = 100e-6; // Crossing angle in vertical plane [rad] cfg.hadron_beam.beta_crab_hor = 500000.0; cfg.lepton_beam.beta_crab_hor = 150000.0; @@ -226,8 +256,13 @@ ab::AfterburnerConfig ab::EicConfigurator::config_hiacc_100x10() { return cfg; } -ab::AfterburnerConfig ab::EicConfigurator::config_hiacc_275x10() { + +ab::AfterburnerConfig ab::EicConfigurator::preset_ip6_hiacc_275x10() { ab::AfterburnerConfig cfg; + + // Crossing angle + cfg.crossing_angle_hor = 25e-3; // Crossing angle in horizontal plane [rad] + cfg.crossing_angle_ver = 100e-6; // Crossing angle in vertical plane [rad] cfg.hadron_beam.beta_crab_hor = 1300000.0; cfg.lepton_beam.beta_crab_hor = 150000.0; @@ -256,8 +291,13 @@ ab::AfterburnerConfig ab::EicConfigurator::config_hiacc_275x10() { return cfg; } -ab::AfterburnerConfig ab::EicConfigurator::config_hiacc_275x18() { + +ab::AfterburnerConfig ab::EicConfigurator::preset_ip6_hiacc_275x18() { ab::AfterburnerConfig cfg; + + // Crossing angle + cfg.crossing_angle_hor = 25e-3; // Crossing angle in horizontal plane [rad] + cfg.crossing_angle_ver = 100e-6; // Crossing angle in vertical plane [rad] cfg.hadron_beam.beta_crab_hor = 1300000.0; cfg.lepton_beam.beta_crab_hor = 150000.0; @@ -287,8 +327,13 @@ ab::AfterburnerConfig ab::EicConfigurator::config_hiacc_275x18() { return cfg; } -ab::AfterburnerConfig ab::EicConfigurator::config_hidiv_41x5() { + +ab::AfterburnerConfig ab::EicConfigurator::preset_ip6_hidiv_41x5() { ab::AfterburnerConfig cfg; + + // Crossing angle + cfg.crossing_angle_hor = 25e-3; // Crossing angle in horizontal plane [rad] + cfg.crossing_angle_ver = 100e-6; // Crossing angle in vertical plane [rad] cfg.hadron_beam.beta_crab_hor = 200000.0; cfg.lepton_beam.beta_crab_hor = 150000.0; @@ -317,8 +362,13 @@ ab::AfterburnerConfig ab::EicConfigurator::config_hidiv_41x5() { return cfg; } -ab::AfterburnerConfig ab::EicConfigurator::config_hidiv_100x5() { + +ab::AfterburnerConfig ab::EicConfigurator::preset_ip6_hidiv_100x5() { ab::AfterburnerConfig cfg; + + // Crossing angle + cfg.crossing_angle_hor = 25e-3; // Crossing angle in horizontal plane [rad] + cfg.crossing_angle_ver = 100e-6; // Crossing angle in vertical plane [rad] cfg.hadron_beam.beta_crab_hor = 500000.0; cfg.lepton_beam.beta_crab_hor = 150000.0; @@ -347,8 +397,13 @@ ab::AfterburnerConfig ab::EicConfigurator::config_hidiv_100x5() { return cfg; } -ab::AfterburnerConfig ab::EicConfigurator::config_hidiv_100x10() { + +ab::AfterburnerConfig ab::EicConfigurator::preset_ip6_hidiv_100x10() { ab::AfterburnerConfig cfg; + + // Crossing angle + cfg.crossing_angle_hor = 25e-3; // Crossing angle in horizontal plane [rad] + cfg.crossing_angle_ver = 100e-6; // Crossing angle in vertical plane [rad] cfg.hadron_beam.beta_crab_hor = 500000.0; cfg.lepton_beam.beta_crab_hor = 150000.0; @@ -377,8 +432,13 @@ ab::AfterburnerConfig ab::EicConfigurator::config_hidiv_100x10() { return cfg; } -ab::AfterburnerConfig ab::EicConfigurator::config_hidiv_275x10() { + +ab::AfterburnerConfig ab::EicConfigurator::preset_ip6_hidiv_275x10() { ab::AfterburnerConfig cfg; + + // Crossing angle + cfg.crossing_angle_hor = 25e-3; // Crossing angle in horizontal plane [rad] + cfg.crossing_angle_ver = 100e-6; // Crossing angle in vertical plane [rad] cfg.hadron_beam.beta_crab_hor = 1300000.0; cfg.lepton_beam.beta_crab_hor = 150000.0; @@ -407,8 +467,13 @@ ab::AfterburnerConfig ab::EicConfigurator::config_hidiv_275x10() { return cfg; } -ab::AfterburnerConfig ab::EicConfigurator::config_hidiv_275x18() { + +ab::AfterburnerConfig ab::EicConfigurator::preset_ip6_hidiv_275x18() { ab::AfterburnerConfig cfg; + + // Crossing angle + cfg.crossing_angle_hor = 25e-3; // Crossing angle in horizontal plane [rad] + cfg.crossing_angle_ver = 100e-6; // Crossing angle in vertical plane [rad] cfg.hadron_beam.beta_crab_hor = 1300000.0; cfg.lepton_beam.beta_crab_hor = 150000.0; @@ -437,6 +502,491 @@ ab::AfterburnerConfig ab::EicConfigurator::config_hidiv_275x18() { return cfg; } +// ------------------------------------------------------------------ +// ========================== IP 8 ================================== +// ------------------------------------------------------------------ + +ab::AfterburnerConfig ab::EicConfigurator::preset_ip8_eau_110x18() { + ab::AfterburnerConfig cfg; + + cfg.crossing_angle_hor = -35e-3; // Crossing angle in horizontal plane [rad] + cfg.crossing_angle_ver = 0; // Crossing angle in vertical plane [rad] + + cfg.hadron_beam.beta_crab_hor = 500000.0; + cfg.lepton_beam.beta_crab_hor = 150000.0; + + // Beam divergence + cfg.hadron_beam.divergence_hor = 218e-6; + cfg.hadron_beam.divergence_ver = 379e-6; + cfg.lepton_beam.divergence_hor = 101e-6; + cfg.lepton_beam.divergence_ver = 37e-6; + + // Beam beta star [mm] + cfg.hadron_beam.beta_star_hor = 910; + cfg.hadron_beam.beta_star_ver = 40; + cfg.lepton_beam.beta_star_hor = 1960; + cfg.lepton_beam.beta_star_ver = 410; + + // RMS emittance + cfg.hadron_beam.rms_emittance_hor = 43.2 * nm; + cfg.hadron_beam.rms_emittance_ver = 5.8 * nm; + cfg.lepton_beam.rms_emittance_hor = 20 * nm; + cfg.lepton_beam.rms_emittance_ver = 0.6 * nm; + + // RMS bunch length + cfg.hadron_beam.rms_bunch_length = 7 * cm; + cfg.lepton_beam.rms_bunch_length = 0.9 * cm; + + return cfg; +} + + +ab::AfterburnerConfig ab::EicConfigurator::preset_ip8_eau_110x10() { + ab::AfterburnerConfig cfg; + + cfg.crossing_angle_hor = -35e-3; // Crossing angle in horizontal plane [rad] + cfg.crossing_angle_ver = 0; // Crossing angle in vertical plane [rad] + + cfg.hadron_beam.beta_crab_hor = 500000.0; + cfg.lepton_beam.beta_crab_hor = 150000.0; + + // Beam divergence + cfg.hadron_beam.divergence_hor = 216e-6; + cfg.hadron_beam.divergence_ver = 274e-6; + cfg.lepton_beam.divergence_hor = 102e-6; + cfg.lepton_beam.divergence_ver = 92e-6; + + // Beam beta star [mm] [mm] + cfg.hadron_beam.beta_star_hor = 910; + cfg.hadron_beam.beta_star_ver = 40; + cfg.lepton_beam.beta_star_hor = 1930; + cfg.lepton_beam.beta_star_ver = 120; + + // RMS emittance + cfg.hadron_beam.rms_emittance_hor = 42.3 * nm; + cfg.hadron_beam.rms_emittance_ver = 3 * nm; + cfg.lepton_beam.rms_emittance_hor = 20 * nm; + cfg.lepton_beam.rms_emittance_ver = 1 * nm; + + // RMS bunch length + cfg.hadron_beam.rms_bunch_length = 7 * cm; + cfg.lepton_beam.rms_bunch_length = 0.7 * cm; + + return cfg; +} + + +ab::AfterburnerConfig ab::EicConfigurator::preset_ip8_eau_110x5() { + ab::AfterburnerConfig cfg; + + cfg.crossing_angle_hor = -35e-3; // Crossing angle in horizontal plane [rad] + cfg.crossing_angle_ver = 0; // Crossing angle in vertical plane [rad] + + cfg.hadron_beam.beta_crab_hor = 500000.0; + cfg.lepton_beam.beta_crab_hor = 150000.0; + + // Beam divergence + cfg.hadron_beam.divergence_hor = 215e-6; + cfg.hadron_beam.divergence_ver = 275e-6; + cfg.lepton_beam.divergence_hor = 102e-6; + cfg.lepton_beam.divergence_ver = 185e-6; + + // Beam beta star [mm] + cfg.hadron_beam.beta_star_hor = 910; + cfg.hadron_beam.beta_star_ver = 40; + cfg.lepton_beam.beta_star_hor = 1930; + cfg.lepton_beam.beta_star_ver = 60; + + // RMS emittance + cfg.hadron_beam.rms_emittance_hor = 42.3 * nm; + cfg.hadron_beam.rms_emittance_ver = 3 * nm; + cfg.lepton_beam.rms_emittance_hor = 20 * nm; + cfg.lepton_beam.rms_emittance_ver = 2 * nm; + + // RMS bunch length + cfg.hadron_beam.rms_bunch_length = 7 * cm; + cfg.lepton_beam.rms_bunch_length = 0.7 * cm; + + return cfg; +} + + +ab::AfterburnerConfig ab::EicConfigurator::preset_ip8_eau_41x5() { + ab::AfterburnerConfig cfg; + + cfg.crossing_angle_hor = -35e-3; // Crossing angle in horizontal plane [rad] + cfg.crossing_angle_ver = 0; // Crossing angle in vertical plane [rad] + + + //βcrabm1300/500/200beta function at crab cavity, + cfg.hadron_beam.beta_crab_hor = 200000.0; + cfg.lepton_beam.beta_crab_hor = 150000.0; + + // Beam divergence + cfg.hadron_beam.divergence_hor = 275e-6; + cfg.hadron_beam.divergence_ver = 377e-6; + cfg.lepton_beam.divergence_hor = 81e-6; + cfg.lepton_beam.divergence_ver = 136e-6; + + // Beam beta star [mm] + cfg.hadron_beam.beta_star_hor = 900; + cfg.hadron_beam.beta_star_ver = 40; + cfg.lepton_beam.beta_star_hor = 3070; + cfg.lepton_beam.beta_star_ver = 110; + + // RMS emittance + cfg.hadron_beam.rms_emittance_hor = 68.1 * nm; + cfg.hadron_beam.rms_emittance_ver = 5.7 * nm; + cfg.lepton_beam.rms_emittance_hor = 20 * nm; + cfg.lepton_beam.rms_emittance_ver = 2 * nm; + + // RMS bunch length + cfg.hadron_beam.rms_bunch_length = 11.6 * cm; + cfg.lepton_beam.rms_bunch_length = 0.7 * cm; + return cfg; +} + + +ab::AfterburnerConfig ab::EicConfigurator::preset_ip8_hiacc_41x5() { + ab::AfterburnerConfig cfg; + + cfg.crossing_angle_hor = -35e-3; // Crossing angle in horizontal plane [rad] + cfg.crossing_angle_ver = 0; // Crossing angle in vertical plane [rad] + + cfg.hadron_beam.beta_crab_hor = 200000.0; + cfg.lepton_beam.beta_crab_hor = 150000.0; + + // Beam divergence + cfg.hadron_beam.divergence_hor = 220e-6; + cfg.hadron_beam.divergence_ver = 380e-6; + cfg.lepton_beam.divergence_hor = 101e-6; + cfg.lepton_beam.divergence_ver = 129e-6; + + // Beam beta star [mm] + cfg.hadron_beam.beta_star_hor = 900; + cfg.hadron_beam.beta_star_ver = 71; + cfg.lepton_beam.beta_star_hor = 1960; + cfg.lepton_beam.beta_star_ver = 210; + + // RMS emittance + cfg.hadron_beam.rms_emittance_hor = 44 * nm; + cfg.hadron_beam.rms_emittance_ver = 10 * nm; + cfg.lepton_beam.rms_emittance_hor = 20 * nm; + cfg.lepton_beam.rms_emittance_ver = 3.5 * nm; + + // RMS bunch length + cfg.hadron_beam.rms_bunch_length = 7.5 * cm; + cfg.lepton_beam.rms_bunch_length = 0.7 * cm; + return cfg; +} + + +ab::AfterburnerConfig ab::EicConfigurator::preset_ip8_hiacc_100x5() { + ab::AfterburnerConfig cfg; + + cfg.crossing_angle_hor = -35e-3; // Crossing angle in horizontal plane [rad] + cfg.crossing_angle_ver = 0; // Crossing angle in vertical plane [rad] + + cfg.hadron_beam.beta_crab_hor = 500000.0; + cfg.lepton_beam.beta_crab_hor = 150000.0; + + // Beam divergence + cfg.hadron_beam.divergence_hor = 180e-6; + cfg.hadron_beam.divergence_ver = 180e-6; + cfg.lepton_beam.divergence_hor = 140e-6; + cfg.lepton_beam.divergence_ver = 140e-6; + + // Beam beta star [mm] + cfg.hadron_beam.beta_star_hor = 800; + cfg.hadron_beam.beta_star_ver = 72; + cfg.lepton_beam.beta_star_hor = 1030; + cfg.lepton_beam.beta_star_ver = 92; + + // RMS emittance + cfg.hadron_beam.rms_emittance_hor = 26 * nm; + cfg.hadron_beam.rms_emittance_ver = 2.3 * nm; + cfg.lepton_beam.rms_emittance_hor = 20 * nm; + cfg.lepton_beam.rms_emittance_ver = 1.8 * nm; + + // RMS bunch length + cfg.hadron_beam.rms_bunch_length = 7 * cm; + cfg.lepton_beam.rms_bunch_length = 0.7 * cm; + return cfg; +} + + +ab::AfterburnerConfig ab::EicConfigurator::preset_ip8_hiacc_100x10() { + ab::AfterburnerConfig cfg; + + cfg.crossing_angle_hor = -35e-3; // Crossing angle in horizontal plane [rad] + cfg.crossing_angle_ver = 0; // Crossing angle in vertical plane [rad] + + cfg.hadron_beam.beta_crab_hor = 500000.0; + cfg.lepton_beam.beta_crab_hor = 150000.0; + + // Beam divergence + cfg.hadron_beam.divergence_hor = 180e-6; + cfg.hadron_beam.divergence_ver = 180e-6; + cfg.lepton_beam.divergence_hor = 118e-6; + cfg.lepton_beam.divergence_ver = 86e-6; + + // Beam beta star [mm] + cfg.hadron_beam.beta_star_hor = 940; + cfg.hadron_beam.beta_star_ver = 85; + cfg.lepton_beam.beta_star_hor = 1430; + cfg.lepton_beam.beta_star_ver = 180; + + // RMS emittance + cfg.hadron_beam.rms_emittance_hor = 30 * nm; + cfg.hadron_beam.rms_emittance_ver = 2.7 * nm; + cfg.lepton_beam.rms_emittance_hor = 20 * nm; + cfg.lepton_beam.rms_emittance_ver = 1.3 * nm; + + // RMS bunch length + cfg.hadron_beam.rms_bunch_length = 7 * cm; + cfg.lepton_beam.rms_bunch_length = 0.7 * cm; + return cfg; +} + + +ab::AfterburnerConfig ab::EicConfigurator::preset_ip8_hiacc_275x10() { + ab::AfterburnerConfig cfg; + + cfg.crossing_angle_hor = -35e-3; // Crossing angle in horizontal plane [rad] + cfg.crossing_angle_ver = 0; // Crossing angle in vertical plane [rad] + + cfg.hadron_beam.beta_crab_hor = 1300000.0; + cfg.lepton_beam.beta_crab_hor = 150000.0; + + // Beam divergence + cfg.hadron_beam.divergence_hor = 65e-6; + cfg.hadron_beam.divergence_ver = 65e-6; + cfg.lepton_beam.divergence_hor = 116e-6; + cfg.lepton_beam.divergence_ver = 84e-6; + + // Beam beta star [mm] + cfg.hadron_beam.beta_star_hor = 2650; + cfg.hadron_beam.beta_star_ver = 240; + cfg.lepton_beam.beta_star_hor = 1490; + cfg.lepton_beam.beta_star_ver = 190; + + // RMS emittance + cfg.hadron_beam.rms_emittance_hor = 11 * nm; + cfg.hadron_beam.rms_emittance_ver = 1 * nm; + cfg.lepton_beam.rms_emittance_hor = 20 * nm; + cfg.lepton_beam.rms_emittance_ver = 1.3 * nm; + + // RMS bunch length + cfg.hadron_beam.rms_bunch_length = 6 * cm; + cfg.lepton_beam.rms_bunch_length = 0.7 * cm; + return cfg; +} + + +ab::AfterburnerConfig ab::EicConfigurator::preset_ip8_hiacc_275x18() { + ab::AfterburnerConfig cfg; + + cfg.crossing_angle_hor = -35e-3; // Crossing angle in horizontal plane [rad] + cfg.crossing_angle_ver = 0; // Crossing angle in vertical plane [rad] + + cfg.hadron_beam.beta_crab_hor = 1300000.0; + cfg.lepton_beam.beta_crab_hor = 150000.0; + + // Beam divergence + cfg.hadron_beam.divergence_hor = 65e-6; + cfg.hadron_beam.divergence_ver = 65e-6; + cfg.lepton_beam.divergence_hor = 89e-6; + cfg.lepton_beam.divergence_ver = 82e-6; + + // Beam beta star [mm] + cfg.hadron_beam.beta_star_hor = 4170; + cfg.hadron_beam.beta_star_ver = 380; + cfg.lepton_beam.beta_star_hor = 3060; + cfg.lepton_beam.beta_star_ver = 300; + + // RMS emittance + cfg.hadron_beam.rms_emittance_hor = 17.6 * nm; + cfg.hadron_beam.rms_emittance_ver = 1.6 * nm; + cfg.lepton_beam.rms_emittance_hor = 24 * nm; + cfg.lepton_beam.rms_emittance_ver = 2 * nm; + + // RMS bunch length + cfg.hadron_beam.rms_bunch_length = 6 * cm; + cfg.lepton_beam.rms_bunch_length = 0.9 * cm; + + return cfg; +} + + +ab::AfterburnerConfig ab::EicConfigurator::preset_ip8_hidiv_41x5() { + ab::AfterburnerConfig cfg; + + cfg.crossing_angle_hor = -35e-3; // Crossing angle in horizontal plane [rad] + cfg.crossing_angle_ver = 0; // Crossing angle in vertical plane [rad] + + cfg.hadron_beam.beta_crab_hor = 200000.0; + cfg.lepton_beam.beta_crab_hor = 150000.0; + + // Beam divergence + cfg.hadron_beam.divergence_hor = 220e-6; + cfg.hadron_beam.divergence_ver = 380e-6; + cfg.lepton_beam.divergence_hor = 101e-6; + cfg.lepton_beam.divergence_ver = 129e-6; + + // Beam beta star [mm] + cfg.hadron_beam.beta_star_hor = 900; + cfg.hadron_beam.beta_star_ver = 71; + cfg.lepton_beam.beta_star_hor = 1960; + cfg.lepton_beam.beta_star_ver = 210; + + // RMS emittance + cfg.hadron_beam.rms_emittance_hor = 44 * nm; + cfg.hadron_beam.rms_emittance_ver = 10 * nm; + cfg.lepton_beam.rms_emittance_hor = 20 * nm; + cfg.lepton_beam.rms_emittance_ver = 3.5 * nm; + + // RMS bunch length + cfg.hadron_beam.rms_bunch_length = 7.5 * cm; + cfg.lepton_beam.rms_bunch_length = 0.7 * cm; + return cfg; +} + + +ab::AfterburnerConfig ab::EicConfigurator::preset_ip8_hidiv_100x5() { + ab::AfterburnerConfig cfg; + + cfg.crossing_angle_hor = -35e-3; // Crossing angle in horizontal plane [rad] + cfg.crossing_angle_ver = 0; // Crossing angle in vertical plane [rad] + + cfg.hadron_beam.beta_crab_hor = 500000.0; + cfg.lepton_beam.beta_crab_hor = 150000.0; + + // Beam divergence + cfg.hadron_beam.divergence_hor = 206e-6; + cfg.hadron_beam.divergence_ver = 206e-6; + cfg.lepton_beam.divergence_hor = 160e-6; + cfg.lepton_beam.divergence_ver = 160e-6; + + // Beam beta star [mm] + cfg.hadron_beam.beta_star_hor = 610; + cfg.hadron_beam.beta_star_ver = 55; + cfg.lepton_beam.beta_star_hor = 780; + cfg.lepton_beam.beta_star_ver = 71; + + // RMS emittance + cfg.hadron_beam.rms_emittance_hor = 26 * nm; + cfg.hadron_beam.rms_emittance_ver = 2.3 * nm; + cfg.lepton_beam.rms_emittance_hor = 20 * nm; + cfg.lepton_beam.rms_emittance_ver = 1.8 * nm; + + // RMS bunch length + cfg.hadron_beam.rms_bunch_length = 7 * cm; + cfg.lepton_beam.rms_bunch_length = 0.7 * cm; + return cfg; +} + + +ab::AfterburnerConfig ab::EicConfigurator::preset_ip8_hidiv_100x10() { + ab::AfterburnerConfig cfg; + + cfg.crossing_angle_hor = -35e-3; // Crossing angle in horizontal plane [rad] + cfg.crossing_angle_ver = 0; // Crossing angle in vertical plane [rad] + + cfg.hadron_beam.beta_crab_hor = 500000.0; + cfg.lepton_beam.beta_crab_hor = 150000.0; + + // Beam divergence + cfg.hadron_beam.divergence_hor = 220e-6; + cfg.hadron_beam.divergence_ver = 220e-6; + cfg.lepton_beam.divergence_hor = 145e-6; + cfg.lepton_beam.divergence_ver = 105e-6; + + // Beam beta star [mm] + cfg.hadron_beam.beta_star_hor = 630; + cfg.hadron_beam.beta_star_ver = 57; + cfg.lepton_beam.beta_star_hor = 960; + cfg.lepton_beam.beta_star_ver = 120; + + // RMS emittance + cfg.hadron_beam.rms_emittance_hor = 30 * nm; + cfg.hadron_beam.rms_emittance_ver = 2.7 * nm; + cfg.lepton_beam.rms_emittance_hor = 20 * nm; + cfg.lepton_beam.rms_emittance_ver = 1.3 * nm; + + // RMS bunch length + cfg.hadron_beam.rms_bunch_length = 7 * cm; + cfg.lepton_beam.rms_bunch_length = 0.7 * cm; + return cfg; +} + + +ab::AfterburnerConfig ab::EicConfigurator::preset_ip8_hidiv_275x10() { + ab::AfterburnerConfig cfg; + + cfg.crossing_angle_hor = -35e-3; // Crossing angle in horizontal plane [rad] + cfg.crossing_angle_ver = 0; // Crossing angle in vertical plane [rad] + + cfg.hadron_beam.beta_crab_hor = 1300000.0; + cfg.lepton_beam.beta_crab_hor = 150000.0; + + // Beam divergence + cfg.hadron_beam.divergence_hor = 119e-6; + cfg.hadron_beam.divergence_ver = 119e-6; + cfg.lepton_beam.divergence_hor = 211e-6; + cfg.lepton_beam.divergence_ver = 152e-6; + + // Beam beta star [mm] + cfg.hadron_beam.beta_star_hor = 800; + cfg.hadron_beam.beta_star_ver = 72; + cfg.lepton_beam.beta_star_hor = 450; + cfg.lepton_beam.beta_star_ver = 56; + + // RMS emittance + cfg.hadron_beam.rms_emittance_hor = 11.3 * nm; + cfg.hadron_beam.rms_emittance_ver = 1 * nm; + cfg.lepton_beam.rms_emittance_hor = 20 * nm; + cfg.lepton_beam.rms_emittance_ver = 1.3 * nm; + + // RMS bunch length + cfg.hadron_beam.rms_bunch_length = 6 * cm; + cfg.lepton_beam.rms_bunch_length = 0.7 * cm; + return cfg; +} + + +ab::AfterburnerConfig ab::EicConfigurator::preset_ip8_hidiv_275x18() { + ab::AfterburnerConfig cfg; + + cfg.crossing_angle_hor = -35e-3; // Crossing angle in horizontal plane [rad] + cfg.crossing_angle_ver = 0; // Crossing angle in vertical plane [rad] + + cfg.hadron_beam.beta_crab_hor = 1300000.0; + cfg.lepton_beam.beta_crab_hor = 150000.0; + + // Beam divergence + cfg.hadron_beam.divergence_hor = 150e-6; + cfg.hadron_beam.divergence_ver = 150e-6; + cfg.lepton_beam.divergence_hor = 202e-6; + cfg.lepton_beam.divergence_ver = 187e-6; + + // Beam beta star [mm] + cfg.hadron_beam.beta_star_hor = 800; + cfg.hadron_beam.beta_star_ver = 71; + cfg.lepton_beam.beta_star_hor = 590; + cfg.lepton_beam.beta_star_ver = 57; + + // RMS emittance + cfg.hadron_beam.rms_emittance_hor = 18e-6; + cfg.hadron_beam.rms_emittance_ver = 1.6e-6; + cfg.lepton_beam.rms_emittance_hor = 24e-6; + cfg.lepton_beam.rms_emittance_ver = 2e-6; + + // RMS bunch length + cfg.hadron_beam.rms_bunch_length = 6 * cm; + cfg.lepton_beam.rms_bunch_length = 0.9 * cm; + return cfg; +} + ab::AfterburnerConfig ab::EicConfigurator::config(double hadron_energy, double lepton_energy, ab::EicBeamPresets beam_preset) { using namespace std; @@ -487,28 +1037,53 @@ ab::AfterburnerConfig ab::EicConfigurator::config(ab::EicBeamEnergies hadron, ab } // High Divergence setting - if(beam_preset == EicBeamPresets::HighDivergence) { - if(hadron == EicBeamEnergies::E275GeV && lepton == EicBeamEnergies::E18GeV) return config_hidiv_275x18(); - if(hadron == EicBeamEnergies::E275GeV && lepton == EicBeamEnergies::E10GeV) return config_hidiv_275x10(); - if(hadron == EicBeamEnergies::E100GeV && lepton == EicBeamEnergies::E10GeV) return config_hidiv_100x10(); - if(hadron == EicBeamEnergies::E100GeV && lepton == EicBeamEnergies::E5GeV) return config_hidiv_100x5(); - if(hadron == EicBeamEnergies::E41GeV && lepton == EicBeamEnergies::E5GeV) return config_hidiv_41x5(); + if(beam_preset == EicBeamPresets::Ip6HighDivergence) { + if(hadron == EicBeamEnergies::E275GeV && lepton == EicBeamEnergies::E18GeV) return preset_ip6_hidiv_275x18(); + if(hadron == EicBeamEnergies::E275GeV && lepton == EicBeamEnergies::E10GeV) return preset_ip6_hidiv_275x10(); + if(hadron == EicBeamEnergies::E100GeV && lepton == EicBeamEnergies::E10GeV) return preset_ip6_hidiv_100x10(); + if(hadron == EicBeamEnergies::E100GeV && lepton == EicBeamEnergies::E5GeV) return preset_ip6_hidiv_100x5(); + if(hadron == EicBeamEnergies::E41GeV && lepton == EicBeamEnergies::E5GeV) return preset_ip6_hidiv_41x5(); + } + + // High acceptance settings + if(beam_preset == EicBeamPresets::Ip6HighAcceptance) { + if(hadron == EicBeamEnergies::E275GeV && lepton == EicBeamEnergies::E18GeV) return preset_ip6_hiacc_275x18(); + if(hadron == EicBeamEnergies::E275GeV && lepton == EicBeamEnergies::E10GeV) return preset_ip6_hiacc_275x10(); + if(hadron == EicBeamEnergies::E100GeV && lepton == EicBeamEnergies::E10GeV) return preset_ip6_hiacc_100x10(); + if(hadron == EicBeamEnergies::E100GeV && lepton == EicBeamEnergies::E5GeV) return preset_ip6_hiacc_100x5(); + if(hadron == EicBeamEnergies::E41GeV && lepton == EicBeamEnergies::E5GeV) return preset_ip6_hiacc_41x5(); + } + + if(beam_preset == EicBeamPresets::Ip6ElectronAurum) { + if(hadron == EicBeamEnergies::E110GeV && lepton == EicBeamEnergies::E18GeV) return preset_ip6_eau_110x18(); + if(hadron == EicBeamEnergies::E110GeV && lepton == EicBeamEnergies::E10GeV) return preset_ip6_eau_110x10(); + if(hadron == EicBeamEnergies::E110GeV && lepton == EicBeamEnergies::E5GeV) return preset_ip6_eau_110x5(); + if(hadron == EicBeamEnergies::E41GeV && lepton == EicBeamEnergies::E5GeV) return preset_ip6_eau_41x5(); + } + + // High Divergence setting + if(beam_preset == EicBeamPresets::Ip8HighDivergence) { + if(hadron == EicBeamEnergies::E275GeV && lepton == EicBeamEnergies::E18GeV) return preset_ip8_hidiv_275x18(); + if(hadron == EicBeamEnergies::E275GeV && lepton == EicBeamEnergies::E10GeV) return preset_ip8_hidiv_275x10(); + if(hadron == EicBeamEnergies::E100GeV && lepton == EicBeamEnergies::E10GeV) return preset_ip8_hidiv_100x10(); + if(hadron == EicBeamEnergies::E100GeV && lepton == EicBeamEnergies::E5GeV) return preset_ip8_hidiv_100x5(); + if(hadron == EicBeamEnergies::E41GeV && lepton == EicBeamEnergies::E5GeV) return preset_ip8_hidiv_41x5(); } // High acceptance settings - if(beam_preset == EicBeamPresets::HighAcceptance) { - if(hadron == EicBeamEnergies::E275GeV && lepton == EicBeamEnergies::E18GeV) return config_hiacc_275x18(); - if(hadron == EicBeamEnergies::E275GeV && lepton == EicBeamEnergies::E10GeV) return config_hiacc_275x10(); - if(hadron == EicBeamEnergies::E100GeV && lepton == EicBeamEnergies::E10GeV) return config_hiacc_100x10(); - if(hadron == EicBeamEnergies::E100GeV && lepton == EicBeamEnergies::E5GeV) return config_hiacc_100x5(); - if(hadron == EicBeamEnergies::E41GeV && lepton == EicBeamEnergies::E5GeV) return config_hiacc_41x5(); + if(beam_preset == EicBeamPresets::Ip8HighAcceptance) { + if(hadron == EicBeamEnergies::E275GeV && lepton == EicBeamEnergies::E18GeV) return preset_ip8_hiacc_275x18(); + if(hadron == EicBeamEnergies::E275GeV && lepton == EicBeamEnergies::E10GeV) return preset_ip8_hiacc_275x10(); + if(hadron == EicBeamEnergies::E100GeV && lepton == EicBeamEnergies::E10GeV) return preset_ip8_hiacc_100x10(); + if(hadron == EicBeamEnergies::E100GeV && lepton == EicBeamEnergies::E5GeV) return preset_ip8_hiacc_100x5(); + if(hadron == EicBeamEnergies::E41GeV && lepton == EicBeamEnergies::E5GeV) return preset_ip8_hiacc_41x5(); } - if(beam_preset == EicBeamPresets::ElectronAurum) { - if(hadron == EicBeamEnergies::E110GeV && lepton == EicBeamEnergies::E18GeV) return config_eau_110x18(); - if(hadron == EicBeamEnergies::E110GeV && lepton == EicBeamEnergies::E10GeV) return config_eau_110x10(); - if(hadron == EicBeamEnergies::E110GeV && lepton == EicBeamEnergies::E5GeV) return config_eau_110x5(); - if(hadron == EicBeamEnergies::E41GeV && lepton == EicBeamEnergies::E5GeV) return config_eau_41x5(); + if(beam_preset == EicBeamPresets::Ip8ElectronAurum) { + if(hadron == EicBeamEnergies::E110GeV && lepton == EicBeamEnergies::E18GeV) return preset_ip8_eau_110x18(); + if(hadron == EicBeamEnergies::E110GeV && lepton == EicBeamEnergies::E10GeV) return preset_ip8_eau_110x10(); + if(hadron == EicBeamEnergies::E110GeV && lepton == EicBeamEnergies::E5GeV) return preset_ip8_eau_110x5(); + if(hadron == EicBeamEnergies::E41GeV && lepton == EicBeamEnergies::E5GeV) return preset_ip8_eau_41x5(); } cout << (int)lepton << "x" << (int)hadron << " is not a valid energy combination!!" << endl; @@ -518,20 +1093,34 @@ ab::AfterburnerConfig ab::EicConfigurator::config(ab::EicBeamEnergies hadron, ab } ab::AfterburnerConfig ab::EicConfigurator::from_string(const std::string &name) { - if(name == "ip6_eau_110x18") return config_eau_110x18(); - if(name == "ip6_eau_110x10") return config_eau_110x10(); - if(name == "ip6_eau_110x5") return config_eau_110x5(); - if(name == "ip6_eau_41x5") return config_eau_41x5(); - if(name == "ip6_hiacc_41x5") return config_hiacc_41x5(); - if(name == "ip6_hiacc_100x5") return config_hiacc_100x5(); - if(name == "ip6_hiacc_100x10") return config_hiacc_100x10(); - if(name == "ip6_hiacc_275x10") return config_hiacc_275x10(); - if(name == "ip6_hiacc_275x18") return config_hiacc_275x18(); - if(name == "ip6_hidiv_41x5") return config_hidiv_41x5(); - if(name == "ip6_hidiv_100x5") return config_hidiv_100x5(); - if(name == "ip6_hidiv_100x10") return config_hidiv_100x10(); - if(name == "ip6_hidiv_275x10") return config_hidiv_275x10(); - if(name == "ip6_hidiv_275x18") return config_hidiv_275x18(); + if(name == "ip6_eau_110x18") return preset_ip6_eau_110x18(); + if(name == "ip6_eau_110x10") return preset_ip6_eau_110x10(); + if(name == "ip6_eau_110x5") return preset_ip6_eau_110x5(); + if(name == "ip6_eau_41x5") return preset_ip6_eau_41x5(); + if(name == "ip6_hiacc_41x5") return preset_ip6_hiacc_41x5(); + if(name == "ip6_hiacc_100x5") return preset_ip6_hiacc_100x5(); + if(name == "ip6_hiacc_100x10") return preset_ip6_hiacc_100x10(); + if(name == "ip6_hiacc_275x10") return preset_ip6_hiacc_275x10(); + if(name == "ip6_hiacc_275x18") return preset_ip6_hiacc_275x18(); + if(name == "ip6_hidiv_41x5") return preset_ip6_hidiv_41x5(); + if(name == "ip6_hidiv_100x5") return preset_ip6_hidiv_100x5(); + if(name == "ip6_hidiv_100x10") return preset_ip6_hidiv_100x10(); + if(name == "ip6_hidiv_275x10") return preset_ip6_hidiv_275x10(); + if(name == "ip6_hidiv_275x18") return preset_ip6_hidiv_275x18(); + if(name == "ip8_eau_110x18") return preset_ip8_eau_110x18(); + if(name == "ip8_eau_110x10") return preset_ip8_eau_110x10(); + if(name == "ip8_eau_110x5") return preset_ip8_eau_110x5(); + if(name == "ip8_eau_41x5") return preset_ip8_eau_41x5(); + if(name == "ip8_hiacc_41x5") return preset_ip8_hiacc_41x5(); + if(name == "ip8_hiacc_100x5") return preset_ip8_hiacc_100x5(); + if(name == "ip8_hiacc_100x10") return preset_ip8_hiacc_100x10(); + if(name == "ip8_hiacc_275x10") return preset_ip8_hiacc_275x10(); + if(name == "ip8_hiacc_275x18") return preset_ip8_hiacc_275x18(); + if(name == "ip8_hidiv_41x5") return preset_ip8_hidiv_41x5(); + if(name == "ip8_hidiv_100x5") return preset_ip8_hidiv_100x5(); + if(name == "ip8_hidiv_100x10") return preset_ip8_hidiv_100x10(); + if(name == "ip8_hidiv_275x10") return preset_ip8_hidiv_275x10(); + if(name == "ip8_hidiv_275x18") return preset_ip8_hidiv_275x18(); std::string message = "Invalid configuration name. Name: '" + name + "' is not supported"; throw std::invalid_argument(message); diff --git a/cpp/afterburner/EicConfigurator.hh b/cpp/afterburner/EicConfigurator.hh index cec4e9b3990c9b6cff1be5577d7a11460f11b5f7..9b4e13b0d3ab81047e87ab3f56d93227a7ed8b5b 100644 --- a/cpp/afterburner/EicConfigurator.hh +++ b/cpp/afterburner/EicConfigurator.hh @@ -5,9 +5,12 @@ namespace ab { enum class EicBeamPresets { - HighDivergence=1, // High Divergence Config - CDR Table 3.3 - HighAcceptance=2, // High Acceptance Config - CDR Table 3.4 - ElectronAurum=3 // eA Config - CDR Table 3.5 + Ip6HighDivergence=1, // IP8 High Divergence Config - CDR Table 3.3 + Ip6HighAcceptance=2, // IP8 High Acceptance Config - CDR Table 3.4 + Ip6ElectronAurum=3, // IP8 eA Config - CDR Table 3.5 + Ip8HighDivergence=4, // IP6 (temporary) High Divergence Config - CDR Table 3.3 + Ip8HighAcceptance=5, // IP6 (temporary) High Acceptance Config - CDR Table 3.4 + Ip8ElectronAurum=6 // IP6 (temporary) eA Config - CDR Table 3.5 }; enum class EicBeamEnergies { @@ -22,20 +25,34 @@ namespace ab { class EicConfigurator { public: - static AfterburnerConfig config_eau_41x5(); - static AfterburnerConfig config_eau_110x5(); - static AfterburnerConfig config_eau_110x10(); - static AfterburnerConfig config_eau_110x18(); - static AfterburnerConfig config_hiacc_41x5(); - static AfterburnerConfig config_hiacc_100x5(); - static AfterburnerConfig config_hiacc_100x10(); - static AfterburnerConfig config_hiacc_275x10(); - static AfterburnerConfig config_hiacc_275x18(); - static AfterburnerConfig config_hidiv_41x5(); - static AfterburnerConfig config_hidiv_100x5(); - static AfterburnerConfig config_hidiv_100x10(); - static AfterburnerConfig config_hidiv_275x10(); - static AfterburnerConfig config_hidiv_275x18(); + static AfterburnerConfig preset_ip6_eau_41x5(); + static AfterburnerConfig preset_ip6_eau_110x5(); + static AfterburnerConfig preset_ip6_eau_110x10(); + static AfterburnerConfig preset_ip6_eau_110x18(); + static AfterburnerConfig preset_ip6_hiacc_41x5(); + static AfterburnerConfig preset_ip6_hiacc_100x5(); + static AfterburnerConfig preset_ip6_hiacc_100x10(); + static AfterburnerConfig preset_ip6_hiacc_275x10(); + static AfterburnerConfig preset_ip6_hiacc_275x18(); + static AfterburnerConfig preset_ip6_hidiv_41x5(); + static AfterburnerConfig preset_ip6_hidiv_100x5(); + static AfterburnerConfig preset_ip6_hidiv_100x10(); + static AfterburnerConfig preset_ip6_hidiv_275x10(); + static AfterburnerConfig preset_ip6_hidiv_275x18(); + static AfterburnerConfig preset_ip8_eau_41x5(); + static AfterburnerConfig preset_ip8_eau_110x5(); + static AfterburnerConfig preset_ip8_eau_110x10(); + static AfterburnerConfig preset_ip8_eau_110x18(); + static AfterburnerConfig preset_ip8_hiacc_41x5(); + static AfterburnerConfig preset_ip8_hiacc_100x5(); + static AfterburnerConfig preset_ip8_hiacc_100x10(); + static AfterburnerConfig preset_ip8_hiacc_275x10(); + static AfterburnerConfig preset_ip8_hiacc_275x18(); + static AfterburnerConfig preset_ip8_hidiv_41x5(); + static AfterburnerConfig preset_ip8_hidiv_100x5(); + static AfterburnerConfig preset_ip8_hidiv_100x10(); + static AfterburnerConfig preset_ip8_hidiv_275x10(); + static AfterburnerConfig preset_ip8_hidiv_275x18(); static AfterburnerConfig from_string(const std::string& name); static AfterburnerConfig config(double hadron_energy, double lepton_energy, EicBeamPresets beam_preset);