Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2026-08-06 09:38:28

0001 // -*- C++ -*-
0002 //
0003 // PartonBin.h is a part of ThePEG - Toolkit for HEP Event Generation
0004 // Copyright (C) 1999-2019 Leif Lonnblad
0005 //
0006 // ThePEG 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 ThePEG_PartonBin_H
0010 #define ThePEG_PartonBin_H
0011 // This is the declaration of the PartonBin class.
0012 
0013 #include "ThePEG/Config/ThePEG.h"
0014 #include "ThePEG/Utilities/ClassDescription.h"
0015 #include "ThePEG/Utilities/Maths.h"
0016 #include "ThePEG/PDF/PDFBase.h"
0017 #include "ThePEG/PDF/PDFCuts.h"
0018 #include "ThePEG/Vectors/Transverse.h"
0019 #include "ThePEG/EventRecord/Particle.h"
0020 #include "PartonBin.fh"
0021 
0022 namespace ThePEG {
0023 
0024 /**
0025  * The PartonBin class is used by the PartonExtractor class to store
0026  * information about the extraction of a parton from a
0027  * particle. Several PartonBin objects can be used to specify a whole
0028  * chain of partons extracted from particles extracted from other
0029  * particles. A PartonBin without an incoming() PartonBin represents
0030  * the incoming particle itself and is used to stop recursion.
0031  *
0032  * After the extraction of a parton, the kinematical variables of that
0033  * extraction is stored in a orresponding PartonBinInfo object.
0034  *
0035  * @see PartonExtractor
0036  * 
0037  */
0038 class PartonBin: public Base {
0039 
0040 public:
0041 
0042   /** A vector of pointers to PartonBin objects. */
0043 typedef vector<PBPtr> PBVector;
0044 
0045 public:
0046 
0047   /** @name Standard constructors, assignment and destructors. */
0048   //@{
0049   /**
0050    * Standard constructor.
0051 
0052    * @param p the incoming particle type. Possibly null if this bin
0053    * represents the incoming particle itself.
0054    * @param prev the PartonBin of the incoming particle. Possibly null
0055    * if this bin represents the incoming particle itself.
0056    * @param pi the parton to be extracted.
0057    * @param pdf the density function to be used. Possibly null if this
0058    * bin represents the incoming particle itself.
0059    * @param newCuts the kinematical cuts on the extraction.
0060    */
0061   PartonBin(tcPDPtr p, tPBPtr prev, tcPDPtr pi, tcPDFPtr pdf,
0062         const PDFCuts & newCuts);
0063 
0064   /**
0065    * Default constructor.
0066    */
0067   PartonBin();
0068 
0069   /**
0070    * Destructor.
0071    */
0072   virtual ~PartonBin();
0073   //@}
0074 
0075 public:
0076 
0077   /** @name Access the information in this ParticleBin. */
0078   //@{
0079   /**
0080    * The incoming particle type.
0081    */
0082   tcPDPtr particle() const { return theParticle; }
0083 
0084   /**
0085    * In the case the incoming particle in turn is extracted from
0086    * another particle, return the PartonBin for that extraction.
0087    */
0088   tPBPtr incoming() const { return theIncomingBin; }
0089 
0090   /**
0091    * The parton bins corresponding to the extracted parton if it in
0092    * turn can be extracted from.
0093    */
0094   const PBVector & outgoing() const { return theOutgoing; }
0095 
0096   /**
0097    * Add a parton bin corresponding to the extracted parton if it in
0098    * turn can be extracted from.
0099    */
0100   void addOutgoing(tPBPtr pb) { theOutgoing.push_back(pb); }
0101 
0102   /**
0103    * The extracted parton type.
0104    */
0105   tcPDPtr parton() const { return theParton; }
0106 
0107   /**
0108    * The PDFBase object describing the momentum distribution of the
0109    * parton within the particle in this PartonBin.
0110    */
0111   tcPDFPtr pdf() const { return thePDF; }
0112 
0113   /**
0114    * The remnant handler associated with the pdf().
0115    */
0116   tcRemHPtr remnantHandler() const { return theRemnantHandler; }
0117 
0118   /**
0119    * Detemine the number of degrees of freedom needed to generate the
0120    * phase space of this and parent partons. If doscale is true this
0121    * bin is expected to generate the scale in addition to the momentum
0122    * fraction.
0123    */
0124   int nDim(bool doscale);
0125 
0126   /**
0127    * Return the number of degrees of freedom used by the parton
0128    * density and remnant handler.
0129    */
0130   int pdfDim() const { return thePDFDim; }
0131 
0132   /**
0133    * Return the number of degrees of freedom used by the parton
0134    * density and remnant handler.
0135    */
0136   int remDim() const { return theRemDim; }
0137   //@}
0138 
0139   /** @name Functions used in the generation. */
0140   //@{
0141   /**
0142    * Return the cuts specified for this bin.
0143    */
0144   const PDFCuts & cuts() const { return theCuts; }
0145 
0146   /**
0147    * Return the parton bin corresponding to the first incoming particle.
0148    */
0149   tPBPtr getFirst();
0150   //@}
0151 
0152 public:
0153 
0154   /** @name Functions used by the persistent I/O system. */
0155   //@{
0156   /**
0157    * Function used to write out object persistently.
0158    * @param os the persistent output stream written to.
0159    */
0160   void persistentOutput(PersistentOStream & os) const;
0161 
0162   /**
0163    * Function used to read in object persistently.
0164    * @param is the persistent input stream read from.
0165    * @param version the version number of the object when written.
0166    */
0167   void persistentInput(PersistentIStream & is, int version);
0168   //@}
0169 
0170   /**
0171    * Standard Init function used to initialize the interface.
0172    */
0173   static void Init();
0174 
0175 private:
0176 
0177   /**
0178    * The incoming particle type.
0179    */
0180   cPDPtr theParticle;
0181 
0182   /**
0183    * In the case the incoming particle in turn is extracted from
0184    * another particle, return the PartonBin for that extraction.
0185    */
0186   tPBPtr theIncomingBin;
0187 
0188   /**
0189    * The parton bins corresponding to the extracted parton if it
0190    * itself can be extracted from.
0191    */
0192   PBVector theOutgoing;
0193 
0194   /**
0195    * The extracted parton type.
0196    */
0197   cPDPtr theParton;
0198 
0199   /**
0200    * The PDFBase object describing the momentum distribution of the
0201    * parton within the particle in this PartonBin.
0202    */
0203   cPDFPtr thePDF;
0204 
0205   /**
0206    * The remnant handler associated with the pdf().
0207    */
0208   cRemHPtr theRemnantHandler;
0209 
0210   /**
0211    * The number of degrees of freedom needed to generate the phase
0212    * space for this parton for the parton density.
0213    */
0214   int thePDFDim;
0215 
0216   /**
0217    * The number of degrees of freedom needed to generate the phase
0218    * space for this parton for the remnant handler.
0219    */
0220   int theRemDim;
0221 
0222   /**
0223    * The cuts specified for this bin.
0224    */
0225   PDFCuts theCuts;
0226 
0227 private:
0228 
0229   /**
0230    * Describe a concrete class with persistent data.
0231    */
0232   static ClassDescription<PartonBin> initPartonBin;
0233 
0234   /**
0235    *  Private and non-existent assignment operator.
0236    */
0237   PartonBin & operator=(const PartonBin &) = delete;
0238 
0239 };
0240 
0241 /** @cond TRAITSPECIALIZATIONS */
0242 
0243 /** This template specialization informs ThePEG about the base classes
0244  *  of PartonBin. */
0245 template <>
0246 struct BaseClassTrait<PartonBin,1>: public ClassTraitsType {
0247   /** Typedef of the first base class of PartonBin. */
0248   typedef Base NthBase;
0249 };
0250 
0251 /** This template specialization informs ThePEG about the name of the
0252  *  PartonBin class. */
0253 template <>
0254 struct ClassTraits<PartonBin>: public ClassTraitsBase<PartonBin> {
0255   /** Return a platform-independent class name */
0256   static string className() { return "ThePEG::PartonBin"; }
0257 };
0258 
0259 /** @endcond */
0260 
0261 }
0262 
0263 #endif /* ThePEG_PartonBin_H */