Back to home page

EIC code displayed by LXR

 
 

    


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

0001 // -*- C++ -*-
0002 //
0003 // ShowerProgenitor.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_ShowerProgenitor_H
0010 #define HERWIG_ShowerProgenitor_H
0011 //
0012 // This is the declaration of the ShowerProgenitor struct.
0013 //
0014 
0015 #include "ThePEG/Config/ThePEG.h"
0016 #include "Herwig/Shower/QTilde/ShowerConfig.h"
0017 #include "Herwig/Shower/QTilde/Base/ShowerParticle.h"
0018 #include "ShowerProgenitor.fh"
0019 #include "ThePEG/PDF/BeamParticleData.h"
0020 
0021 namespace Herwig {
0022 
0023 using namespace ThePEG;
0024 
0025 /** \ingroup Shower
0026  *  A struct to store information on the perturbative particle which 
0027  *  initiates a shower
0028  */
0029 class ShowerProgenitor : public Base {
0030 
0031 public:
0032 
0033   /**
0034    *  Enum for the reconstruction state of this progentitor
0035    */
0036   enum Reconstructed { notReconstructed=0, done, dontReconstruct};
0037 
0038 
0039 /**
0040  *  Typedef for the BeamParticleData objects
0041  */
0042 typedef Ptr<BeamParticleData>::transient_const_pointer tcBeamPtr;
0043 
0044 public:
0045 
0046   /**
0047    *  Constructor for the class
0048    * @param original The original particle
0049    * @param copy The colour isolated copy
0050    * @param particle The ShowerPArticle copy
0051    * @param pT The \f$p_t\f$ of the hardest emission
0052    * @param emitted Whether or not the particle has radiated
0053    */
0054   ShowerProgenitor(PPtr original,PPtr copy, ShowerParticlePtr particle,
0055            Energy pT=ZERO,bool emitted=false)
0056     : _original(original), _copy(copy), _perturbative(true),
0057       _particle(particle), _highestpT(pT), 
0058       _maxHardPt(ZERO), _hardScale(ZERO), _hasEmitted(emitted),
0059       _reconstructed(notReconstructed) {
0060     // get the BeamParticleData object
0061     if ( original->parents().empty() ) {
0062       _beam=dynamic_ptr_cast<tcBeamPtr>(original->dataPtr());
0063     } 
0064     else {
0065       _beam=dynamic_ptr_cast<tcBeamPtr>(original->parents()[0]->dataPtr());
0066     }
0067   }
0068   
0069   /**
0070    *  Access to the particle
0071    */
0072   ShowerParticlePtr progenitor() const { return _particle; }
0073 
0074   /**
0075    *  Set the particle
0076    */
0077   void progenitor(ShowerParticlePtr in) { _particle=in; }
0078 
0079   /**
0080    *  Access to the original particle
0081    */
0082   PPtr original() const { return _original; }
0083 
0084   /**
0085    *  Access to the colour isolated copy
0086    */
0087   PPtr copy() const { return _copy; }
0088 
0089   /**
0090    * Set the copy
0091    */
0092   void copy(PPtr in) { _copy=in; }
0093 
0094   /**
0095    *  Whether the particle came from the hard process or was added by
0096    *  the matrix element correction
0097    */
0098   bool perturbative() const { return _perturbative; }
0099 
0100   /**
0101    *  Whether the particle came from the hard process or was added by
0102    *  the matrix element correction
0103    */
0104   void perturbative(bool in) { _perturbative=in; }
0105 
0106   /**
0107    *  Set/Get methods for the hardest \f$p_T\f$ so far
0108    */
0109   //@{
0110   /**
0111    *  Access the \f$p_T\f$ of the hardest emission so far
0112    */
0113   Energy highestpT() const { return _highestpT; }
0114 
0115   /**
0116    *  Set the \f$p_T\f$ of the hardest emission so far
0117    */
0118   void highestpT(Energy in) { _highestpT=in; }
0119   //@}
0120 
0121   /**
0122    *  Set/Get methods for the maximum \f$p_T\f$ 
0123    */
0124   //@{
0125   /**
0126    *  Access the maximum \f$p_T\f$ for radiation
0127    */
0128   Energy maximumpT(ShowerInteraction type) const {
0129     assert(type!=ShowerInteraction::QEDQCD && type!=ShowerInteraction::ALL && type!=ShowerInteraction::UNDEFINED);
0130     map<ShowerInteraction,Energy>::const_iterator it = _maxpT.find(type);
0131     return it !=_maxpT.end() ? it->second : Constants::MaxEnergy; 
0132   }
0133 
0134   /**
0135    *  Set the maximum \f$p_T\f$ for radiation
0136    */
0137   void maximumpT(Energy in,ShowerInteraction type) {
0138     _maxpT[type]=in; }
0139   //@}
0140 
0141   /**
0142    * Set/Get methods for whether the particle has radiated
0143    */
0144   //@{
0145   /**
0146    *  Access the maximum hard \f$p_T\f$, given by the hard process
0147    */
0148   Energy maxHardPt() const { return _maxHardPt; }
0149 
0150   /**
0151    *  Set the maximum hard \f$p_T\f$, given by the hard process
0152    */
0153   void maxHardPt(Energy in) { _maxHardPt = in; }
0154 
0155   /**
0156    *  Access the relevant hard scale to be used in profile scales; usually
0157    *  this is taken to be the maximum pt, except for other choices such as
0158    *  hfact.
0159    */
0160   Energy hardScale() const { return _hardScale; }
0161 
0162   /**
0163    *  Set the relevant hard scale to be used in profile scales; usually
0164    *  this is taken to be the maximum pt, except for other choices such as
0165    *  hfact.
0166    */
0167   void hardScale(Energy in) { _hardScale = in; }
0168 
0169   /**
0170    *  Has this particle radiated
0171    */
0172   bool hasEmitted() const { return _hasEmitted; }
0173 
0174   /**
0175    *  Set whether or not this particle has radiated
0176    */
0177   void hasEmitted(bool in) { _hasEmitted=in; }
0178   //@}
0179 
0180   /**
0181    *  The id of the particle
0182    */
0183   long id() const { return _particle->id(); }
0184 
0185   /**
0186    *  The BeamParticleData object
0187    */
0188   tcBeamPtr beam() { return _beam; }
0189 
0190   /**
0191    *  Whether or not the recon has been performed
0192    */
0193   Reconstructed reconstructed() const {return _reconstructed;}
0194 
0195   /**
0196    *  Whether or not the recon has been performed
0197    */
0198   void reconstructed(Reconstructed recon) {_reconstructed = recon;}
0199 
0200 private:
0201 
0202   /**
0203    *  Pointer to the original particle
0204    */
0205   PPtr _original;
0206 
0207   /**
0208    *  Pointer to the colour isolated copy of the original particle
0209    */
0210   PPtr _copy;
0211 
0212   /**
0213    *  Whether the particle came from the hard process or was added by
0214    *  the matrix element correction
0215    */
0216   bool _perturbative;
0217 
0218   /**
0219    *  Pointer to the ShowerParticle
0220    */
0221   ShowerParticlePtr _particle;
0222 
0223   /**
0224    *  Highest \f$p_T\f$ emitted in the shower from this particle
0225    */
0226   Energy _highestpT;
0227 
0228   /**
0229    *  Maximum allowed \f$p_T\f$ for emission from this particle
0230    */
0231   map<ShowerInteraction,Energy> _maxpT;
0232 
0233   /**
0234    *  maximum hard \f$p_T\f$ from the hard process
0235    */
0236   Energy _maxHardPt;
0237 
0238   /**
0239    *  The relevant hard scale to be used in profile scales; usually
0240    *  this is taken to be the maximum pt, except for other choices such as
0241    *  hfact.
0242    */
0243   Energy _hardScale;
0244 
0245   /**
0246    *  Has there been radiation
0247    */
0248   bool _hasEmitted;
0249 
0250   /**
0251    *  The BeamParticleData object
0252    */
0253   tcBeamPtr _beam;
0254 
0255   /**
0256    *  Whether or not the reconstruction has been performed
0257    */
0258   Reconstructed _reconstructed;
0259 
0260 };
0261 }
0262 
0263 #endif /* HERWIG_ShowerProgenitor_H */