Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2026-08-06 09:24:05

0001 // -*- C++ -*-
0002 #ifndef Herwig_TwoPionCzyzCurrent_H
0003 #define Herwig_TwoPionCzyzCurrent_H
0004 //
0005 // This is the declaration of the TwoPionCzyzCurrent class.
0006 //
0007 
0008 #include "WeakCurrent.h"
0009 #include "Herwig/Utilities/Interpolator.h"
0010 
0011 namespace Herwig {
0012 
0013 using namespace ThePEG;
0014 
0015 /**
0016  * The TwoPionCzyzCurrent class implements the current of PRD 81 094014 for
0017  * two pions.
0018  *
0019  * @see \ref TwoPionCzyzCurrentInterfaces "The interfaces"
0020  * defined for TwoPionCzyzCurrent.
0021  */
0022 class TwoPionCzyzCurrent: public WeakCurrent {
0023 
0024 public:
0025 
0026   /**
0027    * The default constructor.
0028    */
0029   TwoPionCzyzCurrent();
0030 
0031   /** @name Methods for the construction of the phase space integrator. */
0032   //@{
0033   /**
0034    * Complete the construction of the decay mode for integration.classes inheriting
0035    * from this one.
0036    * This method is purely virtual and must be implemented in the classes inheriting
0037    * from WeakCurrent.
0038    * @param icharge   The total charge of the outgoing particles in the current.
0039    * @param resonance If specified only include terms with this particle
0040    * @param flavour Information on the required flavours of the quarks
0041    * @param imode     The mode in the current being asked for.
0042    * @param mode      The phase space mode for the integration
0043    * @param iloc      The location of the of the first particle from the current in
0044    *                  the list of outgoing particles.
0045    * @param ires      The location of the first intermediate for the current.
0046    * @param phase     The prototype phase space channel for the integration.
0047    * @param upp       The maximum possible mass the particles in the current are
0048    *                  allowed to have.
0049    * @return Whether the current was sucessfully constructed.
0050    */
0051   virtual bool createMode(int icharge, tcPDPtr resonance,
0052               FlavourInfo flavour,
0053               unsigned int imode,PhaseSpaceModePtr mode,
0054               unsigned int iloc,int ires,
0055               PhaseSpaceChannel phase, Energy upp );
0056 
0057   /**
0058    * The particles produced by the current. This just returns the two pseudoscalar
0059    * mesons and the photon.
0060    * @param icharge The total charge of the particles in the current.
0061    * @param imode The mode for which the particles are being requested
0062    * @param iq The PDG code for the quark
0063    * @param ia The PDG code for the antiquark
0064    * @return The external particles for the current.
0065    */
0066   virtual tPDVector particles(int icharge, unsigned int imode, int iq, int ia);
0067   //@}
0068 
0069   /**
0070    * Hadronic current. This method is purely virtual and must be implemented in
0071    * all classes inheriting from this one.
0072    * @param resonance If specified only include terms with this particle
0073    * @param flavour Information on the required flavours of the quarks
0074    * @param imode The mode
0075    * @param ichan The phase-space channel the current is needed for.
0076    * @param scale The invariant mass of the particles in the current.
0077    * @param outgoing The particles produced in the decay
0078    * @param momenta  The momenta of the particles produced in the decay
0079    * @param meopt Option for the calculation of the matrix element
0080    * @return The current. 
0081    */
0082   virtual vector<LorentzPolarizationVectorE> 
0083   current(tcPDPtr resonance,
0084       FlavourInfo flavour,
0085       const int imode, const int ichan,Energy & scale,
0086       const tPDVector & outgoing,
0087       const vector<Lorentz5Momentum> & momenta,
0088       DecayIntegrator::MEOption meopt) const;
0089 
0090   /**
0091    * Accept the decay. Checks the particles are the allowed mode.
0092    * @param id The id's of the particles in the current.
0093    * @return Can this current have the external particles specified.
0094    */
0095   virtual bool accept(vector<int> id);
0096 
0097   /**
0098    * Return the decay mode number for a given set of particles in the current. 
0099    * @param id The id's of the particles in the current.
0100    * @return The number of the mode
0101    */
0102   virtual unsigned int decayMode(vector<int> id);
0103 
0104   /**
0105    * Output the setup information for the particle database
0106    * @param os The stream to output the information to
0107    * @param header Whether or not to output the information for MySQL
0108    * @param create Whether or not to add a statement creating the object
0109    */
0110   virtual void dataBaseOutput(ofstream & os,bool header,bool create) const;
0111 
0112   /**
0113    *  Calculation of the pion form factor
0114    */
0115   Complex Fpi(Energy2 q2,const int imode, const int ichan, tcPDPtr resonance,
0116           Energy ma, Energy mb) const;
0117 
0118   /**
0119    *  Calculation of the pion form factor
0120    */
0121   Complex FpiRemainder(Energy2 q2, Energy ma, Energy mb) const;
0122   
0123 public:
0124 
0125   /** @name Functions used by the persistent I/O system. */
0126   //@{
0127   /**
0128    * Function used to write out object persistently.
0129    * @param os the persistent output stream written to.
0130    */
0131   void persistentOutput(PersistentOStream & os) const;
0132 
0133   /**
0134    * Function used to read in object persistently.
0135    * @param is the persistent input stream read from.
0136    * @param version the version number of the object when written.
0137    */
0138   void persistentInput(PersistentIStream & is, int version);
0139   //@}
0140 
0141   /**
0142    * The standard Init function used to initialize the interfaces.
0143    * Called exactly once for each class by the class description system
0144    * before the main function starts or
0145    * when this class is dynamically loaded.
0146    */
0147   static void Init();
0148 
0149 protected:
0150 
0151   /** @name Clone Methods. */
0152   //@{
0153   /**
0154    * Make a simple clone of this object.
0155    * @return a pointer to the new object.
0156    */
0157   virtual IBPtr clone() const;
0158 
0159   /** Make a clone of this object, possibly modifying the cloned object
0160    * to make it sane.
0161    * @return a pointer to the new object.
0162    */
0163   virtual IBPtr fullclone() const;
0164   //@}
0165 
0166 protected:
0167 
0168   /** @name Standard Interfaced functions. */
0169   //@{
0170 
0171   /**
0172    * Initialize this object after the setup phase before saving and
0173    * EventGenerator to disk.
0174    * @throws InitException if object could not be initialized properly.
0175    */
0176   virtual void doinit();
0177   //@}
0178 
0179   /**
0180    *   Construct the interpolators
0181    */
0182   void constructInterpolators() const;
0183 
0184 private:
0185 
0186   /**
0187    * The assignment operator is private and must never be called.
0188    * In fact, it should not even be implemented.
0189    */
0190   TwoPionCzyzCurrent & operator=(const TwoPionCzyzCurrent &) = delete;
0191 
0192 private:
0193 
0194   /**
0195    * Weights for the different \f$\rho\f$ resonances in the current, \f$\alpha_k\f$.
0196    */
0197   //@{
0198   /**
0199    *  The Complex weight used in the calculation
0200    */
0201   vector<Complex> rhoWgt_;
0202 
0203   /**
0204    *  The magnitude for input
0205    */
0206   vector<double> rhoMag_;
0207 
0208   /**
0209    *  The phase for input
0210    */
0211   vector<double> rhoPhase_;
0212   //@}
0213 
0214   /**
0215    *  Weight for the omega resonance
0216    */
0217   Complex omegaWgt_;
0218 
0219   /**
0220    *  The magnitude for input
0221    */
0222   double omegaMag_;
0223 
0224   /**
0225    *   The phase for input
0226    */
0227   double omegaPhase_;
0228 
0229   /**
0230    * The masses of the \f$\rho\f$ resonances.
0231    */
0232   vector<Energy> rhoMasses_;
0233 
0234   /**
0235    * The widths of the \f$\rho\f$ resonances.
0236    */
0237   vector<Energy> rhoWidths_;
0238 
0239   /**
0240    * The mass of the \f$\omega\f$ resonance
0241    */
0242   Energy omegaMass_;
0243 
0244   /**
0245    * The width of the \f$\omega\f$ resonance
0246    */
0247   Energy omegaWidth_;
0248 
0249   /**
0250    *   Regge \f$\beta\f$ parameter
0251    */
0252   double beta_;
0253 
0254   /**
0255    *  Number of resonaces at which to trucated the series
0256    */
0257   unsigned int nMax_;
0258 
0259   /**
0260    *   Masses of the resonances
0261    */
0262   vector<Energy> mass_;
0263 
0264   /**
0265    *   Widths of the resonances
0266    */
0267   vector<Energy> width_;
0268 
0269   /**
0270    *   Couplings of the resonaces
0271    */
0272   vector<Complex> coup_;
0273 
0274   /**
0275    * The function \f$\frac{\\hat{H}}{dq^2}\f$ at \f$q^2=m^2\f$ for the GS form of the
0276    *  Breit-Wigner
0277    */
0278   vector<double> dh_;
0279 
0280   /**
0281    * The function \f$\\hat{H}\f$ at \f$q^2=m^2\f$ for the GS form of the
0282    *  Breit-Wigner
0283    */
0284   vector<Energy2> hres_;
0285 
0286   /**
0287    * The \f$H(0)\f$ parameter  for the GS form of the
0288    *  Breit-Wigner
0289    */
0290   vector<Energy2> h0_;
0291 
0292   /**
0293    *  The maximum energy
0294    */
0295   Energy eMax_;
0296 
0297   /**
0298    *  Interpolators for the higher resonance components for speed
0299    */
0300   mutable Interpolator<double,Energy2>::Ptr fpiRe_, fpiIm_;
0301 };
0302 
0303 }
0304 
0305 #endif /* Herwig_TwoPionCzyzCurrent_H */