Back to home page

EIC code displayed by LXR

 
 

    


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

0001 // -*- C++ -*-
0002 #ifndef HERWIG_HardBranching_H
0003 #define HERWIG_HardBranching_H
0004 //
0005 // This is the declaration of the HardBranching class.
0006 //
0007 
0008 #include "ThePEG/Config/ThePEG.h"
0009 #include "Herwig/Shower/QTilde/Base/ShowerProgenitor.h"
0010 #include "Herwig/Shower/QTilde/Base/ShowerTree.h"
0011 #include "Herwig/Shower/QTilde/SplittingFunctions/SudakovFormFactor.h"
0012 #include "HardBranching.fh"
0013 #include "HardTree.fh"
0014 
0015 namespace Herwig {
0016 
0017 using namespace ThePEG;
0018 
0019 /**
0020  * The HardBranching class is designed to contain the information needed for
0021  * an individual branching in the POWHEG approach
0022  */
0023 class HardBranching : public Base {
0024 
0025   /**
0026    *  The HardTree is friend
0027    */
0028   friend class HardTree;
0029 
0030 public:
0031 
0032   /**
0033    *  Enum for the status
0034    */
0035   enum Status {Outgoing=0,Incoming,Decay};
0036 
0037 public:
0038 
0039   /**
0040    * The default constructor
0041    * @param particle The particle which is branching
0042    * @param sudakov  The Sudakov form factor for the branching
0043    * @param parent   The parent for the branching
0044    * @param status Whether the particle is incoming or outgoing
0045    */
0046   HardBranching(ShowerParticlePtr particle, SudakovPtr sudakov,
0047         tHardBranchingPtr parent,Status status);
0048 
0049   /**
0050    * Add a child of the branching
0051    * @param child The child of the branching
0052    */
0053   void addChild(HardBranchingPtr child) {_children.push_back(child);} 
0054 
0055   /**
0056    *  Clear the children
0057    */
0058   void clearChildren() { _children.clear(); }
0059 
0060   /**
0061    *  Set the momenta of the particles
0062    */
0063   void setMomenta(LorentzRotation R, double alpha, Lorentz5Momentum pt,
0064           bool setMomentum=true);
0065 
0066   /**
0067    *  Set and get members for the private member variables
0068    */
0069   //@{
0070   /**
0071    * Return the branching particle.
0072    */
0073   tShowerParticlePtr branchingParticle() const {return _particle;}
0074 
0075   /**
0076    * Set the branching particle
0077    */
0078   void branchingParticle(ShowerParticlePtr in) {_particle=in;}
0079 
0080   /**
0081    * Get the original momentum
0082    */
0083   const Lorentz5Momentum & original() const {return _original;}
0084 
0085   /**
0086    * Set the original momentum
0087    */
0088   void original(const Lorentz5Momentum & in) {_original=in;}
0089 
0090   /**
0091    *  Get the p reference vector
0092    */
0093   const Lorentz5Momentum & pVector() const {return _p;}
0094 
0095   /**
0096    *  Set the p reference vector
0097    */
0098   void pVector(const Lorentz5Momentum & in) {_p=in;}
0099 
0100   /**
0101    *  Get the n reference vector
0102    */
0103   const Lorentz5Momentum & nVector() const {return _n;}
0104 
0105   /**
0106    *  Set the n reference vector
0107    */
0108   void nVector(const Lorentz5Momentum & in) {_n=in;}
0109 
0110   /**
0111    *  Get the transverse momentum vector
0112    */
0113   const Lorentz5Momentum & qPerp() const {return _qt;}
0114 
0115   /**
0116    *  Set the transverse momentum vector
0117    */
0118   void qPerp(const Lorentz5Momentum & in) {_qt=in;}
0119 
0120   /**
0121    *  Get the momentum the particle should have as the start of a shower
0122    */
0123   const Lorentz5Momentum & showerMomentum() const {return _shower;}
0124 
0125   /**
0126    *  Set the momentum the particle should have as the start of a shower
0127    */
0128   void showerMomentum(const Lorentz5Momentum & in ) {_shower=in;}
0129 
0130   /**
0131    *  Get the transverse momentum
0132    */
0133   Energy pT() const {return _pt;}
0134 
0135   /**
0136    *  Set the transverse momentum
0137    */
0138   void pT(Energy in) { _pt=in;}
0139 
0140   /**
0141    *  Get the fraction of beam momentum x
0142    */
0143   double x_frac() const {return _x_frac;}
0144 
0145   /**
0146    *  Set the fraction of beam momentum x
0147    */
0148   void x_frac( double x ) { _x_frac = x; }
0149 
0150   /**
0151    *  Get whether the branching is incoming, outgoing or decay
0152    */
0153   Status status() const {return _status;}
0154 
0155   /**
0156    *  Set whether the branching is incoming, outgoing or decay
0157    */
0158   void status(Status in) {_status=in;}
0159 
0160   /**
0161    *  The parent of the branching
0162    */
0163   tHardBranchingPtr parent() const {return _parent;}
0164 
0165   /**
0166    *  Set the parent of the branching
0167    */
0168   void parent(tHardBranchingPtr in) {_parent=in;}
0169 
0170   /**
0171    *  The Sudakov form-factor
0172    */
0173   SudakovPtr sudakov() const {return _sudakov;}
0174 
0175   /**
0176    *  The Sudakov form-factor
0177    */
0178   void sudakov(SudakovPtr in) {_sudakov=in;}
0179 
0180   /**
0181    *  Get the beam particle
0182    */
0183   PPtr beam() const {return _beam;}
0184 
0185   /**
0186    *  Set the beam particle
0187    */
0188   void beam(PPtr in) {_beam=in;}
0189 
0190   /**
0191    * The children
0192    */
0193   vector<HardBranchingPtr> & children() {return _children;}
0194   //@}
0195 
0196   /**
0197    *  Information on the Shower variables for the branching
0198    */
0199   //@{
0200   /**
0201    *  Get the evolution scale
0202    */
0203   Energy scale() const {return _scale;}
0204 
0205   /**
0206    *  The evolution scale
0207    */
0208   void scale(Energy in) {_scale=in;}
0209 
0210   /**
0211    *  The energy fraction
0212    */
0213   double z() const {return _z;}
0214 
0215   /**
0216    *  The energy fraction
0217    */
0218   void z(double in) {_z=in;}
0219 
0220   /**
0221    *  The azimthual angle
0222    */
0223   double phi() const {return _phi;}
0224 
0225   /**
0226    *  The azimthual angle
0227    */
0228   void phi(double in) {_phi=in;}
0229   //@}
0230 
0231   /**
0232    *  Colour partners
0233    */
0234   //@{
0235   /**
0236    *  Get the colour partner
0237    */
0238   tHardBranchingPtr colourPartner() const {return _partner;}
0239 
0240   /**
0241    *  The colour partner of the branching
0242    */
0243   void colourPartner(tHardBranchingPtr in) {_partner=in;}
0244 
0245   //@}
0246 
0247   /**
0248    *  Type of branching
0249    */
0250   ShowerPartnerType type() const {
0251     assert(type_!=ShowerPartnerType::Undefined);
0252     return type_;
0253   }
0254 
0255   /**
0256    *  Type of branching
0257    */
0258   void type(ShowerPartnerType in) {
0259     type_ = in;
0260     assert(type_!=ShowerPartnerType::Undefined);
0261   }
0262 
0263 private:
0264 
0265   /**
0266    *  The branching particle
0267    */
0268   ShowerParticlePtr _particle;
0269 
0270   /**
0271    *  The rescaled momentum
0272    */
0273   Lorentz5Momentum _original;
0274 
0275   /**
0276    *  The \f$p\f$ reference vector
0277    */
0278   Lorentz5Momentum _p;
0279 
0280   /**
0281    *  The \f$n\f$ reference vector
0282    */
0283   Lorentz5Momentum _n;
0284 
0285   /**
0286    *  The transverse momentum vector
0287    */
0288   Lorentz5Momentum _qt;
0289 
0290   /**
0291    *  The momentum the particle should have as the start of a shower
0292    */
0293   Lorentz5Momentum _shower;
0294 
0295   /**
0296    *  The transverse momentum
0297    */
0298   Energy _pt; 
0299 
0300   /**
0301    *  The beam momentum fraction carried by an incoming parton x
0302    */
0303   double _x_frac;
0304 
0305   /**
0306    *  Whether the branching is incoming, outgoing or a decay
0307    */
0308   Status _status;
0309 
0310   /**
0311    *  Information on the Shower variables for the branching
0312    */
0313   //@{
0314   /**
0315    *  The evolution scale
0316    */
0317   Energy _scale;
0318 
0319   /**
0320    *  The energy fraction
0321    */
0322   double _z;
0323 
0324   /**
0325    *  The azimthual angle
0326    */
0327   double _phi;
0328   //@}
0329 
0330   /**
0331    *  The parent of the branching
0332    */
0333   tHardBranchingPtr _parent;
0334 
0335   /**
0336    *  The Sudakov form-factor
0337    */
0338   SudakovPtr _sudakov;
0339 
0340   /**
0341    * The children
0342    */
0343   vector<HardBranchingPtr> _children;
0344 
0345   /**
0346    *  The beam particle
0347    */
0348   PPtr _beam;
0349 
0350   /**
0351    *  The colour partner
0352    */
0353   tHardBranchingPtr _partner;
0354 
0355   /**
0356    *  The type of branching
0357    */
0358   ShowerPartnerType type_;
0359 };
0360 
0361 }
0362 
0363 #endif /* HERWIG_HardBranching_H */