Back to home page

EIC code displayed by LXR

 
 

    


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

0001 // -*- C++ -*-
0002 //
0003 // StdXCombGroup.h is a part of ThePEG - Toolkit for HEP Event Generation
0004 // Copyright (C) 1999-2019 Leif Lonnblad
0005 // Copyright (C) 2009-2019 Simon Platzer
0006 //
0007 // ThePEG is licenced under version 3 of the GPL, see COPYING for details.
0008 // Please respect the MCnet academic guidelines, see GUIDELINES for details.
0009 //
0010 #ifndef ThePEG_StdXCombGroup_H
0011 #define ThePEG_StdXCombGroup_H
0012 // This is the declaration of the StdXCombGroup class.
0013 
0014 #include "StandardXComb.h"
0015 #include "StdXCombGroup.fh"
0016 #include "ThePEG/MatrixElement/MEGroup.fh"
0017 
0018 namespace ThePEG {
0019 
0020 /**
0021  * The StdXCombGroup class represents a 'head' XComb object
0022  * in association with a group of dependent XComb objects.
0023  *
0024  * @see MEGroup
0025  */
0026 class StdXCombGroup: public StandardXComb {
0027 
0028   /** MEBase needs to be a friend. */
0029   friend class MEBase;
0030 
0031 public:
0032 
0033   /** @name Standard constructors and destructors. */
0034   //@{
0035   /**
0036    * Standard constructor.
0037    */
0038   StdXCombGroup(Energy newMaxEnergy, const cPDPair & inc,
0039         tEHPtr newEventHandler,tSubHdlPtr newSubProcessHandler,
0040         tPExtrPtr newExtractor, tCascHdlPtr newCKKW,
0041         const PBPair & newPartonBins, tCutsPtr newCuts, tMEGroupPtr newME,
0042         const DiagramVector & newDiagrams, bool mir,
0043         tStdXCombPtr newHead = tStdXCombPtr());
0044 
0045   /**
0046    * Default constructor.
0047    */
0048   StdXCombGroup();
0049 
0050   /**
0051    * Destructor.
0052    */
0053   virtual ~StdXCombGroup();
0054 
0055 public:
0056 
0057   /**
0058    * Reset all saved data about last generated phasespace point;
0059    */
0060   virtual void clean();
0061 
0062   /**
0063    * The number of dimensions of the phase space used to generate this
0064    * process.
0065    */
0066   virtual int nDim() const;
0067 
0068   /**
0069    * Generate a phase space point from a vector \a r of \a nr numbers
0070    * in the interval ]0,1[ and return the corresponding differential
0071    * cross section.
0072    */
0073   virtual CrossSection dSigDR(const pair<double,double> ll, int nr, const double * r);
0074 
0075   /**
0076    * Return the cross section calculated from the head matrix element
0077    */
0078   CrossSection lastHeadCrossSection() const { return theLastHeadCrossSection; }
0079 
0080   /**
0081    * Visit the dependent XComb objects
0082    */
0083   const vector<StdXCombPtr>& dependent() const { return theDependent; }
0084 
0085   /**
0086    * Return the matrix element group steered by this
0087    * XComb group.
0088    */
0089   tcMEGroupPtr meGroup() const { return theMEGroup; }
0090 
0091   /**
0092    * Initialize this XComb group
0093    */
0094   void build(const PartonPairVec& allPBins);
0095 
0096   /**
0097    * Construct a sub-process object from the information available.
0098    */
0099   virtual tSubProPtr construct();
0100 
0101   /**
0102    * Construct the corresponding SubProcess object if it hasn't been
0103    * done before.
0104    */
0105   virtual void newSubProcess(bool);
0106 
0107   /**
0108    * Set the cross section calculated from the head matrix element
0109    */
0110   void lastHeadCrossSection(CrossSection xs) { theLastHeadCrossSection = xs; }
0111 
0112 public:
0113 
0114   /** @name Functions used by the persistent I/O system. */
0115   //@{
0116   /**
0117    * Function used to write out object persistently.
0118    * @param os the persistent output stream written to.
0119    */
0120   void persistentOutput(PersistentOStream & os) const;
0121 
0122   /**
0123    * Function used to read in object persistently.
0124    * @param is the persistent input stream read from.
0125    * @param version the version number of the object when written.
0126    */
0127   void persistentInput(PersistentIStream & is, int version);
0128   //@}
0129 
0130   /**
0131    * Standard Init function used to initialize the interface.
0132    */
0133   static void Init();
0134 
0135 private:
0136 
0137   /**
0138    * The MEGroup object
0139    */
0140   MEGroupPtr theMEGroup;
0141 
0142   /**
0143    * The dependent XComb objects
0144    */
0145   vector<StdXCombPtr> theDependent;
0146 
0147   /**
0148    * The cross section calculated from the head matrix element
0149    */
0150   CrossSection theLastHeadCrossSection;
0151 
0152 private:
0153 
0154   /**
0155    * Describe a concrete class with persistent data.
0156    */
0157   static ClassDescription<StdXCombGroup> initStdXCombGroup;
0158  
0159   /**
0160    * Private and non-existent assignment operator.
0161    */
0162   StdXCombGroup & operator=(const StdXCombGroup &) = delete;
0163 
0164 };
0165 
0166 /** @cond TRAITSPECIALIZATIONS */
0167 
0168 /**
0169  * This template specialization informs ThePEG about the base class of
0170  * StdXCombGroup.
0171  */
0172 template <>
0173 struct BaseClassTrait<StdXCombGroup,1> {
0174   /** Typedef of the base class of StdXCombGroup. */
0175   typedef StandardXComb NthBase;
0176 };
0177 
0178 /**
0179  * This template specialization informs ThePEG about the name of the
0180  * StdXCombGroup class.
0181  */
0182 template <>
0183 struct ClassTraits<StdXCombGroup>:
0184     public ClassTraitsBase<StdXCombGroup> {
0185   /** Return the class name. */
0186   static string className() { return "ThePEG::StdXCombGroup"; }
0187 };
0188 
0189 /** @endcond */
0190 
0191 }
0192 
0193 #endif /* ThePEG_StdXCombGroup_H */