Back to home page

EIC code displayed by LXR

 
 

    


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

0001 // -*- C++ -*-
0002 #ifndef Herwig_ShowerEventRecord_H
0003 #define Herwig_ShowerEventRecord_H
0004 //
0005 // This is the declaration of the ShowerEventRecord class.
0006 //
0007 
0008 #include "ThePEG/Config/ThePEG.h"
0009 #include "ThePEG/Handlers/StandardXComb.h"
0010 #include "ThePEG/PDF/PDF.h"
0011 #include "Herwig/MatrixElement/Matchbox/Matching/ShowerApproximation.h"
0012 
0013 namespace Herwig {
0014 
0015 using namespace ThePEG;
0016 
0017 /**
0018  * Here is the documentation of the ShowerEventRecord class.
0019  */
0020 class ShowerEventRecord: public Base {
0021 
0022 public:
0023 
0024   /** @name Standard constructors and destructors. */
0025   //@{
0026   /**
0027    * The default constructor.
0028    */
0029   ShowerEventRecord();
0030 
0031   /**
0032    * The destructor.
0033    */
0034   virtual ~ShowerEventRecord();
0035   //@}
0036 
0037 public:
0038 
0039   /**
0040    * Return the subprocess currently showered
0041    */
0042   tSubProPtr subProcess() const { return subProcess_; }
0043 
0044   /**
0045    * Return the XComb describing the hard process.
0046    */
0047   tStdXCombPtr xcombPtr() const { return XComb_; }
0048 
0049   /**
0050    * Set the XComb describing the hard process.
0051    */
0052   void xcombPtr(tStdXCombPtr in) { XComb_ = in; }
0053 
0054   /**
0055    * Return the XComb describing the hard process.
0056    */
0057   const StandardXComb& xcomb() const { return *XComb_; }
0058 
0059 public:
0060 
0061   /**
0062    * Return the incoming partons at the current 
0063    * stage of the evolution.
0064    */
0065   PPair& incoming() { return incoming_; }
0066 
0067   /**
0068    * Return the incoming partons at the current 
0069    * stage of the evolution.
0070    */
0071   const PPair& incoming() const { return incoming_; }
0072 
0073   /**
0074    * Return the outgoing partons at the current
0075    * stage of the evolution.
0076    */
0077   PList& outgoing() { return outgoing_; }
0078 
0079   /**
0080    * Return the outgoing partons at the current
0081    * stage of the evolution.
0082    */
0083   const PList& outgoing() const { return outgoing_; }
0084 
0085   /**
0086    * Return the intermediate particles at the current
0087    * stage of the evolution.
0088    */
0089   PList& intermediates() { return intermediates_; }
0090 
0091   /**
0092    * Return the intermediate particles at the current
0093    * stage of the evolution.
0094    */
0095   const PList& intermediates() const { return intermediates_; }
0096 
0097   /**
0098    * Return the momentum fractions.
0099    */
0100   const pair<double,double>& fractions() const { return fractions_; }
0101 
0102   /**
0103    * Return the momentum fractions.
0104    */
0105   pair<double,double>& fractions() { return fractions_; }
0106 
0107   /**
0108    * Return the PDFs
0109    */
0110   const pair<PDF,PDF>& pdfs() const { return PDFs_; }
0111 
0112 public:
0113 
0114   /** @name MC@NLO diagnostics */
0115   //@{
0116   /**
0117    * True, if Matchbox MC@NLO S-event
0118    */
0119   bool isMCatNLOSEvent() const { return isMCatNLOSEvent_; }
0120 
0121   /**
0122    * True, if matchbox MC@NLO H-event
0123    */
0124   bool isMCatNLOHEvent() const { return isMCatNLOHEvent_; }
0125 
0126   /**
0127    * True, if Matchbox MC@NLO S-event
0128    */
0129   bool isPowhegSEvent() const { return isPowhegSEvent_; }
0130 
0131   /**
0132    * True, if matchbox MC@NLO H-event
0133    */
0134   bool isPowhegHEvent() const { return isPowhegHEvent_; }
0135 
0136   /**
0137    * True, if Matchbox MC@NLO S-event
0138    */
0139   void isMCatNLOSEvent(bool in) { isMCatNLOSEvent_ = in; }
0140 
0141   /**
0142    * True, if matchbox MC@NLO H-event
0143    */
0144   void isMCatNLOHEvent(bool in) { isMCatNLOHEvent_ = in; }
0145 
0146   /**
0147    *  Access to the shower approximation
0148    */
0149   Ptr<ShowerApproximation>::tptr showerApproximation() {
0150     return showerApproximation_;
0151   }
0152 
0153   /**
0154    *  True if truncated shower required
0155    */
0156   bool truncatedShower() const { return truncatedShower_; }
0157 
0158   /**
0159    *  True if truncated shower required
0160    */
0161   void truncatedShower(bool in) { truncatedShower_=in; }
0162   //@}
0163 
0164 public:
0165 
0166   /**
0167    * Clear the event record: Give up ownership
0168    * on any object involved in the evolution.
0169    */
0170   virtual void clear();
0171 
0172 protected:
0173 
0174   /**
0175    *  Set the subprocess
0176    */
0177   void subProcess(tSubProPtr in) { subProcess_ = in; }
0178 
0179   /**
0180    * Return the PDFs
0181    */
0182   pair<PDF,PDF>& pdfs() { return PDFs_; }
0183 
0184 public:
0185 
0186   /**
0187    *  Identify the type of event
0188    */
0189   void identifyEventType();
0190 
0191 protected:
0192 
0193   /**
0194    *  Map of colour lines used to reset colours when inserted into the event
0195    */
0196   map<ColinePtr,ColinePtr> & colourLines() {return colourLines_;}
0197 
0198   /**
0199    * Isolate the colour of the process from the rest of the event.
0200    * Called in the constructor
0201    */
0202   void colourIsolate(const vector<PPtr> & original, const vector<PPtr> & copy);
0203 
0204   /**
0205    * Update the colour information of a particle prior to insertion into the
0206    * event record.
0207    */
0208   void updateColour(PPtr particle, bool recursive);
0209 
0210   /**
0211    *  Map the colours for a given particle
0212    */
0213   void mapColour(PPtr original, PPtr copy);
0214 
0215 private:
0216  
0217   /**
0218    *  Isolate a specific colour line
0219    */
0220   void isolateLine(vector<PPair>::const_iterator cit,
0221            vector<PPair> & particles,
0222            tcColinePtr oldline,
0223            tColinePtr newline);
0224 
0225 private:
0226 
0227   /**
0228    * The assignment operator is private and must never be called.
0229    * In fact, it should not even be implemented.
0230    */
0231   ShowerEventRecord & operator=(const ShowerEventRecord &) = delete;
0232 
0233 
0234 private:
0235 
0236   /**
0237    * The subprocess currently showered.
0238    */
0239   SubProPtr subProcess_;
0240 
0241   /**
0242    * Pointer to the XComb which generated the hard process.
0243    */
0244   StdXCombPtr XComb_;
0245 
0246   /**
0247    * The incoming partons at the current
0248    * stage of the evolution.
0249    */
0250   PPair incoming_;
0251 
0252   /**
0253    * The outgoing partons at the current stage of the evolution.
0254    */
0255   PList outgoing_;
0256 
0257   /**
0258    * The intermediate particles at the current
0259    * stage of the evolution.
0260    */
0261   PList intermediates_;
0262 
0263   /**
0264    * The PDFs to be considered.
0265    */
0266   pair<PDF,PDF> PDFs_;
0267 
0268   /**
0269    * Momentum fractions of the incoming partons.
0270    */
0271   pair<double,double> fractions_;
0272 
0273 private:
0274   
0275   /**
0276    *  Type of event
0277    */
0278   //@{
0279   /**
0280    * True, if Matchbox MC@NLO S-event
0281    */
0282   bool isMCatNLOSEvent_;
0283 
0284   /**
0285    * True, if matchbox MC@NLO H-event
0286    */
0287   bool isMCatNLOHEvent_;
0288 
0289   /**
0290    * True, if Matchbox Powheg S-event
0291    */
0292   bool isPowhegSEvent_;
0293 
0294   /**
0295    * True, if matchbox Powheg H-event
0296    */
0297   bool isPowhegHEvent_;
0298 
0299   /**
0300    * The shower approximation to provide the hard scale profile
0301    */
0302   Ptr<ShowerApproximation>::tptr showerApproximation_;
0303 
0304   /**
0305    *  Map of colour lines used to reset colours when inserted into the event
0306    */
0307   map<ColinePtr,ColinePtr> colourLines_;
0308 
0309   /**
0310    *  Whether or ont needs truncated shower
0311    */
0312   bool truncatedShower_;
0313   //@}
0314 
0315 };
0316 
0317 }
0318 
0319 #endif /* Herwig_ShowerEventRecord_H */