![]() |
|
|||
File indexing completed on 2025-04-19 09:09:59
0001 #ifndef BEAM_Main_Beam_Base_H 0002 #define BEAM_Main_Beam_Base_H 0003 0004 #include "BEAM/Main/Beam_Parameters.H" 0005 #include "ATOOLS/Phys/Flavour.H" 0006 #include "ATOOLS/Math/Vector.H" 0007 0008 namespace BEAM { 0009 0010 class Beam_Base { 0011 protected: 0012 beamspectrum::code m_type; 0013 ATOOLS::Flavour m_beam; 0014 ATOOLS::Vec4D m_lab, m_position; 0015 std::vector<ATOOLS::Flavour> m_bunches; 0016 std::vector<ATOOLS::Vec4D> m_vecouts; 0017 size_t m_Nbunches; 0018 int m_dir; 0019 double m_energy, m_polarisation; 0020 double m_x, m_Q2, m_weight; 0021 bool m_on; 0022 0023 public: 0024 Beam_Base(beamspectrum::code type,const ATOOLS::Flavour& _beam, 0025 const double _energy,const double _polarisation, 0026 const int _dir, int mode = 0); 0027 virtual ~Beam_Base() = default; 0028 0029 virtual Beam_Base * Copy() = 0; 0030 virtual bool CalculateWeight(const double,const double) = 0; 0031 virtual void FixPosition() {} 0032 virtual inline const beamspectrum::code & Type() const { return m_type; } 0033 virtual inline const size_t & NBunches() const { return m_Nbunches; } 0034 virtual inline const ATOOLS::Flavour & Beam() const { return m_beam; } 0035 virtual inline const ATOOLS::Flavour & Bunch(const size_t & i=0) const { return m_bunches[i]; } 0036 virtual inline const ATOOLS::Flavour & Remnant() const { return m_beam; } 0037 virtual inline const ATOOLS::Vec4D & OutMomentum(const size_t & i=0) const { return m_vecouts[i]; } 0038 virtual inline const ATOOLS::Vec4D & InMomentum() const { return m_lab; } 0039 virtual inline const ATOOLS::Vec4D & Position() const { return m_position; } 0040 virtual inline const std::vector<ATOOLS::Flavour> & Bunches() const { return m_bunches; } 0041 virtual inline const std::vector<ATOOLS::Vec4D> & OutMomenta() const { return m_vecouts; } 0042 0043 virtual inline const double & Energy() const { return m_energy; } 0044 virtual inline const double & Polarisation() const { return m_polarisation; } 0045 virtual inline double Weight(ATOOLS::Flavour fl=kf_none) { return m_weight; } 0046 virtual inline double Exponent() const { return 0.; } 0047 virtual inline double X() const { return m_x; } 0048 virtual inline double Xmin() const { return 0.; } 0049 virtual inline double Xmax() const { return 1.; } 0050 virtual inline double Peak() const { return 1.; } 0051 0052 virtual inline bool On() const { return m_on; } 0053 virtual inline bool PolarisationOn() const { return (m_polarisation!=0.); } 0054 0055 virtual inline void SetInMomentum(const ATOOLS::Vec4D &in) { m_lab = in; } 0056 virtual inline void SetOutMomentum(const ATOOLS::Vec4D &out, const size_t & i=0) { m_vecouts[i] = out; } 0057 0058 inline void SetX(const double &x) { m_x=x; } 0059 }; 0060 /*! 0061 \file 0062 \brief contains the class BEAM::Beam_Base. 0063 */ 0064 /*! 0065 \class Beam_Base 0066 \brief A mainly virtual class for different beam spectra. 0067 0068 This class is the base class for all possible beam spectra that are implemented and 0069 for interfaces to new beam spectra provided from outside the program. So far, two 0070 spectra have been implemented, one for monochromatic beams BEAM::Monochromatic, 0071 and one for Laser back scattering of an electron BEAM::Laser_Backscattering. 0072 \todo 0073 A number of beam spectra are still missing : 0074 Gaussian, Beamstrahlung and Weiszaecker-Williams off both electron and protons. 0075 */ 0076 /*! 0077 \var std::string Beam_Base::m_type 0078 The type of the Beam_Base, either "Monochromatic", "LaserBackScattering", 0079 "Gaussian", or "Beamstrahlung". The latter two have not been implemented yet. 0080 The handling of different beam types is closely related to the class Beam_Type. 0081 \sa ATOOLS::Beam_Type 0082 */ 0083 /*! 0084 \var ATOOLS::Flavour Beam_Base::m_beam 0085 The flavour of the incoming beam particle. 0086 */ 0087 /*! 0088 \var double Beam_Base::m_energy 0089 Energy of the incoming beam particle. 0090 */ 0091 /*! 0092 \var double Beam_Base::m_polarisation 0093 The polarization degree of the incoming particle. It should 0094 range between -1 and 1 and it should - preferably - be a helicity. 0095 */ 0096 /*! 0097 \var ATOOLS::Vec4D Beam_Base::m_lab 0098 The momentum of the incoming beam particle, i.e. before the spectrum becomes effective. 0099 */ 0100 /*! 0101 \var ATOOLS::Vec4D Beam_Base::m_vecouts 0102 The momentum of the outgoing bunch particle, i.e. after the spectrum becomes effective. 0103 */ 0104 /*! 0105 \var Beam_Base::m_dir 0106 A direction flag for the construction of the beam momentum. 0107 */ 0108 /*! 0109 \var double Beam_Base::m_weight 0110 The internal weight for the spectrum. It is calculated through the method 0111 CalculateWeight(const double,const double). 0112 */ 0113 /*! 0114 \var double Beam_Base::m_x 0115 The energy portion the outgoing bunch particle carries away from the beam particle. 0116 This is in the c.m. frame of the two incoming beams. 0117 */ 0118 /*! 0119 \var double Beam_Base::m_Q2 0120 The scale of the transition of the beams into bunches. This can - in principle - be set 0121 individually, for instance for Weizsaecker-Williams photons. This option has not been 0122 fully implemented yet because all beam spectra included so far depend on the energy fraction 0123 only. 0124 */ 0125 /*! 0126 \fn Beam_Base::Beam_Base(std::string,const ATOOLS::Flavour,const double,const double,const int) 0127 \brief The constructor, initializes the full structure of this beam spectrum. 0128 0129 In this constructor the incoming vectors are constructed from the direction flag, the energy of 0130 the beam in the lab frame and the mass of the beam particle. By default, also the outgonig momentum 0131 is set as the incoming one. 0132 */ 0133 /*! 0134 \fn Beam_Base * Beam_Base::Copy() 0135 This method produces an exact copy of the beam base in question. All internal parameters - 0136 excluding the actual weight, m_weight, are copied. 0137 */ 0138 /*! 0139 \fn bool Beam_Base::CalculateWeight(const double,const double) 0140 This is the method that will calculate the weight for a given beam spectrum in 0141 dependence on the energy fraction of the outgoing particle w.r.t. the incoming one 0142 and in dependence on the scale of the process. The scale might, for instance, become 0143 important once Weizsaecker-Williams type spectra are considered. 0144 */ 0145 /*! 0146 \fn double Beam_Base::Weight(ATOOLS::Flavour fl=Flavour(kf_none)) 0147 Returns the weight. A flavour checking could be included in the future. 0148 */ 0149 /*! 0150 \fn bool Beam_Base::On() 0151 Returns .false. if no beam-handling is necessary, i.e. for monochromatic beams and 0152 .true. in all other cases. 0153 */ 0154 /*! 0155 \fn double Beam_Base::Exponent() 0156 This is a helper for the phase space integration. It returns a characteristic value - 0157 usually an exponent - for simple channel structures. 0158 */ 0159 /*! 0160 \fn double Beam_Base::Xmax() 0161 The maximally accessible energy fraction an outgoing particle can have. 0162 */ 0163 /*! 0164 \fn double Beam_Base::Peak() 0165 The peak position for spectra. in most cases this will be 0 or 1; in contrast, for 0166 laser back scattering it has a different value. This is also needed for the construction 0167 of integration channels. 0168 */ 0169 } 0170 #endif
[ Source navigation ] | [ Diff markup ] | [ Identifier search ] | [ general search ] |
This page was automatically generated by the 2.3.7 LXR engine. The LXR team |
![]() ![]() |