File indexing completed on 2025-04-19 09:09:59
0001 #ifndef BEAM_Main_Beam_Parameters_H
0002 #define BEAM_Main_Beam_Parameters_H
0003
0004 #include "ATOOLS/Phys/Flavour.H"
0005 #include "ATOOLS/Math/Vector.H"
0006 #include "ATOOLS/Math/Poincare.H"
0007 #include "ATOOLS/Org/Scoped_Settings.H"
0008 #include "ATOOLS/Org/Settings.H"
0009 #include "ATOOLS/Org/Info_Key.H"
0010
0011 namespace BEAM {
0012 struct beammode {
0013 enum code {
0014 unknown = 0,
0015 relic_density = 1,
0016 collider = 2,
0017 DM_annihilation = 10,
0018 Fixed_Target = 12
0019 };
0020 };
0021 std::ostream& operator<<(std::ostream&,const beammode::code mode);
0022
0023 struct beamspectrum {
0024 enum code {
0025 monochromatic = 0,
0026 Gaussian = 1,
0027 laser_backscattering = 2,
0028 simple_Compton = 3,
0029 EPA = 4,
0030 DM = 10,
0031 Fixed_Target = 12,
0032 spectrum_reader = 20,
0033 unknown = 99
0034 };
0035 };
0036 std::ostream& operator<<(std::ostream&,const beamspectrum::code spect);
0037
0038 struct collidermode {
0039 enum code {
0040 monochromatic = 0,
0041 spectral_1 = 1,
0042 spectral_2 = 2,
0043 both_spectral = 3,
0044 unknown = 99
0045 };
0046 };
0047 std::ostream& operator<<(std::ostream&,const collidermode::code mode);
0048
0049
0050 class Beam_Base;
0051 class Beam_Parameters {
0052 private:
0053 beammode::code m_beammode;
0054 beamspectrum::code m_beamspec[2];
0055
0056 ATOOLS::Settings & m_settings;
0057
0058 void RegisterDefaults();
0059 void RegisterDefaultBeams();
0060 void RegisterLaserDefaults();
0061 void RegisterEPADefaults();
0062 void RegisterDarkMatterDefaults();
0063 void InitializeFlav(kf_code flav);
0064 void SetBeamMode();
0065 Beam_Base * InitializeSimpleCompton(int);
0066
0067
0068
0069
0070
0071
0072
0073 Beam_Base * InitializeLaserBackscattering(int);
0074 Beam_Base * InitializeSpectrumReader(int);
0075
0076
0077
0078
0079
0080 Beam_Base * InitializeMonochromatic(int);
0081 Beam_Base * InitializeEPA(int);
0082 Beam_Base * InitializeDM_beam(int);
0083 Beam_Base * InitializeFixed_Target(int);
0084 public:
0085 Beam_Parameters();
0086 ~Beam_Parameters();
0087
0088 bool SpecifyMode();
0089
0090
0091
0092
0093
0094
0095
0096
0097
0098 bool SpecifySpectra();
0099 Beam_Base * InitSpectrum(const size_t & num);
0100
0101 const ATOOLS::Flavour GetFlavour(const std::string & tag,const size_t & pos=-1);
0102 const std::string String(const std::string & tag,const int & pos=-1) const;
0103 const double operator()(const std::string & tag,const int & pos=-1) const;
0104 const int Switch(const std::string & tag,const int & pos=-1) const;
0105 const bool On(const std::string & tag) const;
0106
0107 const inline beammode::code GetMode() const { return m_beammode; }
0108 const inline beamspectrum::code GetSpectrum(const size_t & pos) const {
0109 if (pos==0 || pos==1) return m_beamspec[pos];
0110 return beamspectrum::unknown;
0111 }
0112 };
0113 }
0114
0115 #endif
0116