Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-04-19 09:10:12

0001 #ifndef PHOTONS_Tools_Weight_Jacobian_H
0002 #define PHOTONS_Tools_Weight_Jacobian_H
0003 
0004 #include "ATOOLS/Math/Vector.H"
0005 #include "PHOTONS++/Tools/Weight_Base.H"
0006 
0007 namespace PHOTONS {
0008   class Weight_Jacobian: public Weight_Base {
0009     protected:
0010       ATOOLS::Vec4D CalculateMomentumSum(const ATOOLS::Particle_Vector&);
0011 
0012       virtual void CalculateWeight() = 0;
0013       virtual void CalculateMax() = 0;
0014 
0015     public:
0016       Weight_Jacobian();
0017       virtual ~Weight_Jacobian();
0018   };
0019 
0020 
0021   class Weight_Jacobian_Lorentz: public Weight_Jacobian {
0022     private:
0023       double    m_M;
0024       double    m_QC0;
0025       double    m_QN0;
0026       double    m_PC0;
0027       double    m_PN0;
0028       double    m_K0;
0029       double    m_mMQ;
0030       double    m_mMP;
0031 
0032       virtual void CalculateWeight();
0033       virtual void CalculateMax();
0034 
0035     public:
0036       Weight_Jacobian_Lorentz(const ATOOLS::Particle_Vector&,
0037                               const ATOOLS::Particle_Vector&,
0038                               const ATOOLS::Particle_Vector&,
0039                               const ATOOLS::Particle_Vector&,
0040                               const ATOOLS::Particle_Vector&,
0041                               Dipole_Type::code);
0042       virtual ~Weight_Jacobian_Lorentz();
0043   };
0044 
0045 
0046   class Weight_Jacobian_Mapping: public Weight_Jacobian {
0047     private:
0048       ATOOLS::Particle_Vector m_newdipole;
0049       ATOOLS::Particle_Vector m_olddipole;
0050       ATOOLS::Particle_Vector m_newspectator;
0051       ATOOLS::Particle_Vector m_oldspectator;
0052       double                  m_M;
0053       double                  m_u;
0054       ATOOLS::Vec3D           m_K;
0055 
0056       virtual void CalculateWeight();
0057       virtual void CalculateMax();
0058 
0059     public:
0060       Weight_Jacobian_Mapping(const ATOOLS::Particle_Vector&,
0061                               const ATOOLS::Particle_Vector&,
0062                               const ATOOLS::Particle_Vector&,
0063                               const ATOOLS::Particle_Vector&,
0064                               const ATOOLS::Vec4D&,
0065                               double, double, Dipole_Type::code);
0066       virtual ~Weight_Jacobian_Mapping();
0067   };
0068 
0069 
0070 
0071 
0072   /*!
0073     \file Weight_Jacobian.H
0074     \brief contains the classes Weight_Jacobian and its daughters Weight_Jacobian_Lorentz and Weight_Jacobian_Mapping
0075   */
0076 
0077   ////////////////////////////////////////////////////////////////////////////////////////////////////
0078 
0079   /*!
0080     \class Weight_Jacobian
0081     \brief base class for both Jacobian weights classes Weight_Jacobian_Lorentz and Weight_Jacobian_Mapping
0082   */
0083   ////////////////////////////////////////////////////////////////////////////////////////////////////
0084   // Description of member methods for Weight_Jacobian
0085   ////////////////////////////////////////////////////////////////////////////////////////////////////
0086   /*!
0087     \fn Weight_Jacobian::Weight_Jacobian()
0088     \brief contructor of purely virtual class
0089   */
0090 
0091   /*!
0092     \fn Vec4D Weight_Jacobian::CalculateMomentumSum(Particle_Vector)
0093     \brief calculates the sum of the momenta of the particles in the Particle_Vector given
0094   */
0095 
0096   /*!
0097     \fn void Weight_Jacobian::CalculateWeight()
0098     \brief purely virtual in Weight_Jacobian
0099   */
0100 
0101   /*!
0102     \fn void Weight_Jacobian::CalculateMax()
0103     \brief purely virtual in Weight_Jacobian
0104   */
0105 
0106   ////////////////////////////////////////////////////////////////////////////////////////////////////
0107 
0108   /*!
0109     \class Weight_Jacobian_Lorentz
0110     \brief calculates \f$ W_{J,L} \f$, the weight due to the Jacobian of the Lorentz transformation
0111   */
0112   ////////////////////////////////////////////////////////////////////////////////////////////////////
0113   // Description of member variables of Weight_Jacobian_Lorentz
0114   ////////////////////////////////////////////////////////////////////////////////////////////////////
0115   /*!
0116     \var double Weight_Jacobian_Lorentz::m_M
0117     \brief mass of the decaying particle (invariant mass of initial state)
0118   */
0119 
0120   /*!
0121     \var double Weight_Jacobian_Lorentz::m_QC0
0122     \brief energy of the charged final states in the \f$ Q_C \f$ rest frame before treatment (\f$ K=0 \f$ event)
0123   */
0124 
0125   /*!
0126     \var double Weight_Jacobian_Lorentz::m_QN0
0127     \brief energy of the neutral final states in the \f$ Q_C \f$ rest frame before treatment (\f$ K=0 \f$ event)
0128   */
0129 
0130   /*!
0131     \var double Weight_Jacobian_Lorentz::m_PC0
0132     \brief energy of the charged final states in the \f$ P_C \f$ rest frame after treatment
0133   */
0134 
0135   /*!
0136     \var double Weight_Jacobian_Lorentz::m_PN0
0137     \brief energy of the neutral final states in the \f$ P_C \f$ rest frame after treatment
0138   */
0139 
0140   /*!
0141     \var double Weight_Jacobian_Lorentz::m_K0
0142     \brief energy of the generated photons in the \f$ P_C \f$ rest frame
0143   */
0144 
0145   /*!
0146     \var double Weight_Jacobian_Lorentz::m_mMQ
0147     \brief invariant mass of \f$ Q_C \f$
0148   */
0149 
0150   /*!
0151     \var double Weight_Jacobian_Lorentz::m_mMP
0152     \brief invariant mass of \f$ P_C \f$
0153   */
0154   ////////////////////////////////////////////////////////////////////////////////////////////////////
0155   // Description of member methods of Weight_Jacobian_Lorentz
0156   ////////////////////////////////////////////////////////////////////////////////////////////////////
0157   /*!
0158     \fn Weight_Jacobian_Lorentz::Weight_Jacobian_Lorentz(Particle_Vector, Particle_Vector, Particle_Vector, Particle_Vector, Particle_Vector, double, Dipole_Type::code)
0159     \brief initialises all variables and calculates the weight
0160 
0161     The arguments to be passed are the multipole after treatment, the final state neutral particles after treatment, the multipole before treatment, the final state neutral particles before treatment, the generated photons the invariant mass of the initial state (mass of the decaying particle) and the Dipole_Type of the configuration.
0162 
0163     Calls <tt>Weight_Jacobian_Lorentz::CalculateWeight()</tt> and <tt>Weight_Jacobian_Lorentz::CalculateMax()</tt> to calculate the weight and its maximum. In case of a final state only multipole the latter value is the contribution to the maximum total weight as well as the maximum of \f$ W_{J,L} \f$ by itself, but this is not generally true if the initial state is charged as well.
0164   */
0165 
0166   /*!
0167     \fn void Weight_Jacobian_Lorentz::CalculateWeight()
0168     \brief calculates the weight of the event given
0169 
0170     The weight is \f$ W_{J,L} = \frac{m_C^3}{M^2(P^0+P_N^0+K^0)} \f$.
0171   */
0172 
0173   /*!
0174     \fn void Weight_Jacobian_Lorentz::CalculateMax()
0175     \brief calculates the maximum weight of the configuration
0176 
0177     The maximum weight is calculate at \f$ K=0 \f$, thus \f$ W_{J,L;max} = \frac{m_C^3}{M^2(Q^0+Q_N^0)} \f$.
0178   */
0179 
0180   ////////////////////////////////////////////////////////////////////////////////////////////////////
0181 
0182   /*!
0183     \class Weight_Jacobian_Mapping
0184     \brief calculates \f$ W_{J,M} \f$, the weight associated with the mapping procedure
0185   */
0186 
0187   ////////////////////////////////////////////////////////////////////////////////////////////////////
0188   // Description of the member variables of Weight_Jacobian_Mapping
0189   ////////////////////////////////////////////////////////////////////////////////////////////////////
0190   /*!
0191     \var Particle_Vector Weight_Jacobian_Mapping::m_newdipole
0192     \brief contains all charged particles after treatment
0193   */
0194 
0195   /*!
0196     \var Particle_Vector Weight_Jacobian_Mapping::m_olddipole
0197     \brief contains all neutral particles before treatment
0198   */
0199 
0200   /*!
0201     \var Particle_Vector Weight_Jacobian_Mapping::m_newspectator
0202     \brief contains all neutral final state particles after treatment
0203   */
0204 
0205   /*!
0206     \var Particle_Vector Weight_Jacobian_Mapping::m_oldspectator
0207     \brief conatins all neutral final state particles before treatment
0208   */
0209 
0210   /*!
0211     \var double Weight_Jacobian_Mapping::m_M
0212     \brief invariant mass of the initial state (mass of the decaying particle)
0213   */
0214 
0215   /*!
0216     \var double Weight_Jacobian_Mapping::m_u
0217     \brief scaling parameter
0218   */
0219 
0220   /*!
0221     \var Vec3D Weight_Jacobian_Mapping::m_K
0222     \brief total 3-momentum of the photons generated in the \f$ P_C \f$ rest frame
0223   */
0224   ////////////////////////////////////////////////////////////////////////////////////////////////////
0225   // Description of member methods for Weight_Jacobian_Mapping
0226   ////////////////////////////////////////////////////////////////////////////////////////////////////
0227   /*!
0228     \fn Weight_Jacobian_Mapping::Weight_Jacobian_Mapping(Particle_Vector, Particle_Vector, Particle_Vector, Particle_Vector, Vec4D, double, double, Dipole_Type::code)
0229     \brief initialises all variables and calculates the weight
0230 
0231     The arguments to be passed are the multipole after treatment, all final state neutral particles after treatment, the multipole before treatment, all final state neutral particles before treatment, the total momentum of the photons generated, the invariant mass of the initial state, the scaling parameter and the Dipole_Type.
0232 
0233     Calls <tt>Weight_Jacobian_Mapping::CalculateWeight()</tt> and <tt>Weight_Jacobian_Mapping::CalculateMax()</tt> to calculate the weight and its maximum. The latter value is the contribution to the maximum total weight as well as the maximum of \f$ W_{J,M} \f$ by itself.
0234   */
0235 
0236   /*!
0237     \fn void Weight_Jacobian_Mapping::CalculateWeight()
0238     \brief calculates the weight of the event given
0239 
0240     The weight is \f$ W_{J,M} = u^{3n-4}\prod\limits_{i=1}^n\left(\frac{q_i^0}{p_i^0}\right)\frac{\frac{\vec{p}^2}{p^0}-\sum_{C,N}\frac{\vec{q}_i^2}{q_i^0}}{\frac{\vec{p}^\prime\vec{p}}{p^{\prime 0}}-\sum_{C,N}\frac{\vec{p}_i\vec{q}_i}{p_i^0}} \f$.
0241   */
0242 
0243   /*!
0244     \fn void Weight_Jacobian_Mapping::CalculateMax()
0245     \brief calculates the maximum weight of the configuration given
0246 
0247     The maximum weight is 1.
0248   */
0249 }
0250 
0251 #endif