Back to home page

EIC code displayed by LXR

 
 

    


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

0001 // -*- C++ -*-
0002 //
0003 // SubProcessGroup.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_SubProcessGroup_H
0011 #define ThePEG_SubProcessGroup_H
0012 // This is the declaration of the SubProcessGroup class.
0013 
0014 #include "ThePEG/EventRecord/SubProcess.h"
0015 
0016 namespace ThePEG {
0017 
0018 /**
0019  * A SubProcessGroup object represents a group of SubProcess
0020  * objects in dependence of a head SubProcess object.
0021  *
0022  * @see StdXCombGroup
0023  * @see MEGroup
0024  */
0025 class SubProcessGroup: public SubProcess {
0026 
0027 public:
0028 
0029   /**
0030    * Standard constructor.
0031    * @param newIncoming the two incoming partons.
0032    * @param newCollision the Collision to which this SubProcessGroup belongs.
0033    * @param newHandler the MEBase object which generated this SubProcessGroup.
0034    */
0035   SubProcessGroup(const PPair & newIncoming,
0036           tCollPtr newCollision = tCollPtr(),
0037           tcEventBasePtr newHandler = tcEventBasePtr());
0038 
0039   /**
0040    * Destructor.
0041    */
0042   virtual ~SubProcessGroup();
0043 
0044   /**
0045    * Return a clone of this sub process group.
0046    */
0047   virtual SubProPtr clone() const;
0048 
0049 protected:
0050 
0051   /**
0052    * Rebind to cloned objects. When a SubProcessGroup is cloned, a shallow
0053    * copy is done first, then all <code>Particle</code>s etc, are
0054    * cloned, and finally this method is used to see to that the
0055    * pointers in the cloned SubProcessGroup points to the cloned
0056    * <code>Particle</code>s etc.
0057    */
0058   virtual void rebind(const EventTranslationMap & trans);
0059 
0060 public:
0061 
0062   /**
0063    * Perform a LorentzTransformation of all particles in the sub
0064    * process.
0065    */
0066   virtual void transform(const LorentzRotation &);
0067 
0068   /**
0069    * Return the dependent SubProcess objects
0070    */
0071   const SubProcessVector& dependent() const { return theDependent; }
0072 
0073   /**
0074    * Access the dependent SubProcess objects
0075    */
0076   SubProcessVector& dependent() { return theDependent; }
0077 
0078   /**
0079    * Add a dependent SubProcess
0080    */
0081   void add(tSubProPtr sub) { dependent().push_back(sub); }
0082 
0083 public:
0084 
0085   /**
0086    * Standard function for writing to a persistent stream.
0087    */
0088   void persistentOutput(PersistentOStream &) const;
0089 
0090   /**
0091    * Standard function for reading from a persistent stream.
0092    */
0093   void persistentInput(PersistentIStream &, int);
0094 
0095   /**
0096    * Standard Init function. @see Base::Init().
0097    */
0098   static void Init();
0099 
0100 private:
0101 
0102   /**
0103    * The dependent subprocesses
0104    */
0105   SubProcessVector theDependent;
0106 
0107 public:
0108 
0109   /**
0110    * Put to ostream
0111    */
0112   virtual void printMe(ostream&) const;
0113 
0114 private:
0115 
0116   /**
0117    * Describe concrete class with persistent data.
0118    */
0119   static ClassDescription<SubProcessGroup> initSubProcessGroup;
0120 
0121   /**
0122    * Private default constructor must only be used by the
0123    * PersistentIStream class via the ClassTraits<SubProcessGroup> class .
0124    */
0125   SubProcessGroup() : SubProcess() {}
0126 
0127   /**
0128    * The ClassTraits<SubProcessGroup> class must be a friend to be able to
0129    * use the private default constructor.
0130    */
0131   friend struct ClassTraits<SubProcessGroup>;
0132 
0133   /**
0134    * Assignment is forbidden.
0135    */
0136   SubProcessGroup & operator=(const SubProcessGroup &) = delete;
0137 
0138 };
0139 
0140 
0141 /** @cond TRAITSPECIALIZATIONS */
0142 
0143 /** This template specialization informs ThePEG about the
0144  *  base class of Collision. */
0145 template <>
0146 struct BaseClassTrait<SubProcessGroup,1>: public ClassTraitsType {
0147   /** Typedef of the first base class of SubProcessGroup. */
0148   typedef EventRecordBase NthBase;
0149 };
0150 
0151 /** This template specialization informs ThePEG about the name of
0152  *  the SubProcessGroup class and how to create it. */
0153 template <>
0154 struct ClassTraits<SubProcessGroup>: public ClassTraitsBase<SubProcessGroup> {
0155   /** Return a platform-independent class name */
0156   static string className() { return "ThePEG::SubProcessGroup"; }
0157   /** Create a SubProcessGroup object. */
0158   static TPtr create() { return TPtr::Create(SubProcessGroup()); }
0159 };
0160 
0161 /** @endcond */
0162 
0163 }
0164 
0165 #endif /* ThePEG_SubProcessGroup_H */