Back to home page

EIC code displayed by LXR

 
 

    


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

0001 // -*- C++ -*-
0002 //
0003 // TildeKinematics.h is a part of Herwig - A multi-purpose Monte Carlo event generator
0004 // Copyright (C) 2002-2019 The Herwig Collaboration
0005 //
0006 // Herwig is licenced under version 3 of the GPL, see COPYING for details.
0007 // Please respect the MCnet academic guidelines, see GUIDELINES for details.
0008 //
0009 #ifndef HERWIG_TildeKinematics_H
0010 #define HERWIG_TildeKinematics_H
0011 //
0012 // This is the declaration of the TildeKinematics class.
0013 //
0014 
0015 #include "ThePEG/Handlers/HandlerBase.h"
0016 #include "ThePEG/Handlers/StandardXComb.h"
0017 
0018 #include "Herwig/MatrixElement/Matchbox/Dipoles/SubtractionDipole.h"
0019 
0020 namespace Herwig {
0021 
0022 using namespace ThePEG;
0023 
0024 /**
0025  * \ingroup Matchbox
0026  * \author Simon Platzer
0027  *
0028  * \brief TildeKinematics is the base class for the 'tilde'
0029  * kinematics being used for subtraction terms in the
0030  * formalism of Catani and Seymour.
0031  *
0032  */
0033 class TildeKinematics: public HandlerBase {
0034 
0035 public:
0036 
0037   /**
0038    * Clone this object
0039    */
0040   Ptr<TildeKinematics>::ptr cloneMe() const {
0041     return dynamic_ptr_cast<Ptr<TildeKinematics>::ptr>(clone());
0042   }
0043 
0044   /** @name Access to kinematic quantities. */
0045   //@{
0046   /**
0047    * Return the momentum of the emitter in the real emission process
0048    */
0049   const Lorentz5Momentum& realEmitterMomentum() const {
0050     return theRealXComb->meMomenta()[theDipole->realEmitter()];
0051   }
0052 
0053   /**
0054    * Return the momentum of the emission in the real emission process
0055    */
0056   const Lorentz5Momentum& realEmissionMomentum() const {
0057     return theRealXComb->meMomenta()[theDipole->realEmission()];
0058   }
0059 
0060   /**
0061    * Return the momentum of the spectator in the real emission process
0062    */
0063   const Lorentz5Momentum& realSpectatorMomentum() const {
0064     return theRealXComb->meMomenta()[theDipole->realSpectator()];
0065   }
0066 
0067   /**
0068    * Return the momentum of the emitter in the underlying Born process
0069    */
0070   const Lorentz5Momentum& bornEmitterMomentum() const { return theBornEmitterMomentum; }
0071 
0072   /**
0073    * Return the momentum of the spectator in the underlying Born process
0074    */
0075   const Lorentz5Momentum& bornSpectatorMomentum() const { return theBornSpectatorMomentum; }
0076 
0077   /**
0078    * Return the vector of dimensionless variables calculated
0079    */
0080   const vector<double>& subtractionParameters() const { return theDipole->subtractionParameters(); }
0081 
0082   /**
0083    * Return true, if this TildeKinematics object needs to transform
0084    * all other particles in the process except the emitter and spectator
0085    */
0086   virtual bool doesTransform() const { return false; }
0087 
0088   /**
0089    * If this TildeKinematics object needs to transform all other particles
0090    * in the process except the emitter and spectator, return the transformed
0091    * momentum.
0092    */
0093   virtual Lorentz5Momentum transform(const Lorentz5Momentum& p) const { return p; }
0094   //@}
0095 
0096   /**
0097    * If this tilde kinematics is implementing a mapping different from
0098    * the baseline dipole mapping, determine the relevant shower
0099    * parameters and check for phase space boundaries. Note that real
0100    * emission kinematics only are available at this stage.
0101    */
0102   virtual void getShowerVariables() const {}
0103 
0104   /**
0105    * If this tilde kinematics is implementing a mapping different from
0106    * the baseline dipole mapping, return the ratio of phase space
0107    * factorization Jacobians for this and the nominal dipole
0108    * mapping. This is used for matching subtractions.
0109    */
0110   virtual double jacobianRatio() const { return 1.; }
0111 
0112 public:
0113 
0114   /** @name Access to process data. */
0115   //@{
0116   /**
0117    * Prepare given a dipole, and XCombs describing the real emission
0118    * and underlying Born processes, respectively.
0119    */
0120   void prepare(tcStdXCombPtr newRealXComb,
0121            tcStdXCombPtr newBornXComb) {
0122     theRealXComb = newRealXComb; theBornXComb = newBornXComb;
0123   }
0124 
0125   /**
0126    * Set the current dipole
0127    */
0128   void dipole(Ptr<SubtractionDipole>::tptr dip) { theDipole = dip; }
0129 
0130   /**
0131    * Return the current dipole
0132    */
0133   Ptr<SubtractionDipole>::tptr dipole() { return theDipole; }
0134 
0135   /**
0136    * Return the current dipole
0137    */
0138   Ptr<SubtractionDipole>::tcptr dipole() const { return theDipole; }
0139 
0140   /**
0141    * Perform the mapping to the tilde kinematics for the
0142    * last selected process and store all dimensionless
0143    * variables in the subtractionParameters() vector.
0144    * Return false, if the calculation of the tilde
0145    * kinematics was impossible for the selected configuration
0146    * and true on success.
0147    */
0148   virtual bool doMap() = 0;
0149 
0150   /**
0151    * Return the pt associated to the last merged splitting.
0152    */
0153   virtual Energy lastPt() const = 0;
0154   
0155   
0156   /**
0157    * Return the pt associated to emitter emission and sppectator momentum.
0158    */
0159   virtual Energy lastPt(Lorentz5Momentum,Lorentz5Momentum,Lorentz5Momentum) const =0 ;
0160 
0161 
0162   /**
0163    * Given a pt and a hard pt, return the boundaries on z; 
0164    */
0165   virtual pair<double,double> zBounds(Energy pt, Energy hardPt ) const = 0;
0166   
0167   
0168   /**
0169    * Return the momentum fraction associated to the last splitting.
0170    */
0171   virtual double lastZ() const = 0;
0172 
0173   /**
0174    * Return the relevant dipole scale
0175    */
0176   virtual Energy lastScale() const;
0177   
0178   virtual bool aboveAlpha() const {
0179     cerr<<"only implemented for light kinematics";
0180         assert(false);
0181     return false;
0182   }
0183 
0184   /**
0185    * Return the particle type of the emitter in the real emission process
0186    */
0187   cPDPtr realEmitterData() const { 
0188     return 
0189       (theDipole && theRealXComb) ? 
0190       theRealXComb->mePartonData()[theDipole->realEmitter()] :
0191       cPDPtr();
0192   }
0193 
0194   /**
0195    * Return the particle type of the emission in the real emission process
0196    */
0197   cPDPtr realEmissionData() const { 
0198     return 
0199       (theDipole && theRealXComb) ? 
0200       theRealXComb->mePartonData()[theDipole->realEmission()] :
0201       cPDPtr();
0202   }
0203 
0204   /**
0205    * Return the particle type of the spectator in the real emission process
0206    */
0207   cPDPtr realSpectatorData() const { 
0208     return 
0209       (theDipole && theRealXComb) ? 
0210       theRealXComb->mePartonData()[theDipole->realSpectator()] :
0211       cPDPtr();
0212   }
0213 
0214   /**
0215    * Return the particle type of the emitter in the underlying Born process
0216    */
0217   cPDPtr bornEmitterData() const { 
0218     return 
0219       (theDipole && theBornXComb) ? 
0220       theBornXComb->mePartonData()[theDipole->bornEmitter()] :
0221       cPDPtr();
0222   }
0223 
0224   /**
0225    * Return the particle type of the spectator in the underlying Born process
0226    */
0227   cPDPtr bornSpectatorData() const { 
0228     return 
0229       (theDipole && theBornXComb) ? 
0230       theBornXComb->mePartonData()[theDipole->bornSpectator()] :
0231       cPDPtr();
0232   }
0233   //@}
0234 
0235 protected:
0236 
0237   /**
0238    * Access the momentum of the emitter in the underlying Born process
0239    */
0240   Lorentz5Momentum& bornEmitterMomentum() { return theBornEmitterMomentum; }
0241 
0242   /**
0243    * Access the momentum of the spectator in the underlying Born process
0244    */
0245   Lorentz5Momentum& bornSpectatorMomentum() { return theBornSpectatorMomentum; }
0246 
0247   /**
0248    * Access the vector of dimensionless variables calculated
0249    */
0250   vector<double>& subtractionParameters() { return theDipole->subtractionParameters(); }
0251 
0252 public: 
0253   /**
0254    * Return the momentum fraction of the emitter
0255    */
0256   double emitterX() const {
0257     return
0258     theDipole->bornEmitter() == 0 ?
0259     theBornXComb->lastX1() :
0260     theBornXComb->lastX2();
0261   }
0262   
0263   
0264   /**
0265    * Return the momentum fraction of the spectator
0266    */
0267   double spectatorX() const {
0268     return
0269     theDipole->bornSpectator() == 0 ?
0270     theBornXComb->lastX1() :
0271     theBornXComb->lastX2();
0272   }
0273 
0274   
0275 public:
0276 
0277   /** @name Functions used by the persistent I/O system. */
0278   //@{
0279   /**
0280    * Function used to write out object persistently.
0281    * @param os the persistent output stream written to.
0282    */
0283   void persistentOutput(PersistentOStream & os) const;
0284 
0285   /**
0286    * Function used to read in object persistently.
0287    * @param is the persistent input stream read from.
0288    * @param version the version number of the object when written.
0289    */
0290   void persistentInput(PersistentIStream & is, int version);
0291   //@}
0292 
0293   /**
0294    * The standard Init function used to initialize the interfaces.
0295    * Called exactly once for each class by the class description system
0296    * before the main function starts or
0297    * when this class is dynamically loaded.
0298    */
0299   static void Init();
0300 
0301 
0302 // If needed, insert declarations of virtual function defined in the
0303 // InterfacedBase class here (using ThePEG-interfaced-decl in Emacs).
0304 
0305 
0306 protected:
0307 
0308   /** @name Standard Interfaced functions. */
0309   //@{
0310   /**
0311    * Rebind pointer to other Interfaced objects. Called in the setup phase
0312    * after all objects used in an EventGenerator has been cloned so that
0313    * the pointers will refer to the cloned objects afterwards.
0314    * @param trans a TranslationMap relating the original objects to
0315    * their respective clones.
0316    * @throws RebindException if no cloned object was found for a given
0317    * pointer.
0318    */
0319   virtual void rebind(const TranslationMap & trans);
0320 
0321   /**
0322    * Return a vector of all pointers to Interfaced objects used in this
0323    * object.
0324    * @return a vector of pointers.
0325    */
0326   virtual IVector getReferences();
0327   //@}
0328 
0329 
0330 private:
0331 
0332   /**
0333    * The last dipole this TildeKinematics has been selected for
0334    */
0335   Ptr<SubtractionDipole>::tptr theDipole;
0336 
0337   /**
0338    * The XComb object describing the real emission process
0339    */
0340   tcStdXCombPtr theRealXComb;
0341 
0342   /**
0343    * The XComb object describing the underlying Born process
0344    */
0345   tcStdXCombPtr theBornXComb;
0346 
0347   /**
0348    * The momentum of the emitter in the underlying Born process
0349    */
0350   Lorentz5Momentum theBornEmitterMomentum;
0351 
0352   /**
0353    * The momentum of the spectator in the underlying Born process
0354    */
0355   Lorentz5Momentum theBornSpectatorMomentum;
0356 
0357 private:
0358 
0359   /**
0360    * The assignment operator is private and must never be called.
0361    * In fact, it should not even be implemented.
0362    */
0363   TildeKinematics & operator=(const TildeKinematics &) = delete;
0364 
0365 };
0366 
0367 }
0368 
0369 #endif /* HERWIG_TildeKinematics_H */