Back to home page

EIC code displayed by LXR

 
 

    


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

0001 // -*- C++ -*-
0002 #ifndef HERWIG_CKKWTree_H
0003 #define HERWIG_CKKWTree_H
0004 //
0005 // This is the declaration of the CKKWTree class.
0006 //
0007 
0008 #include "Herwig/Shower/QTilde/Base/HardTree.h"
0009 #include "CKKWTree.fh"
0010 
0011 namespace Herwig {
0012 
0013 using namespace ThePEG;
0014 
0015 /**
0016  * Here is the documentation of the CKKWTree class.
0017  */
0018 class CKKWTree: public HardTree {
0019 
0020 public:
0021 
0022   /**
0023    * The default constructor.
0024    */
0025   CKKWTree(vector<HardBranchingPtr>, vector<HardBranchingPtr>, ShowerInteraction);
0026 
0027 public:
0028 
0029   /**
0030    * Returns true if all spacelike lines are ordered in x
0031    */
0032   bool checkXOrdering();
0033 
0034   /**
0035    *  Get lowest Pt in which ever jet definition from the hardtree momentum
0036    */
0037   Energy lowestPtMomentum( int jetMeasureMode, int cutOption );
0038 
0039   /**
0040    * Returns true if all lines in tree are ordered in /tilde(q)
0041    */
0042   bool checkHardOrdering();
0043 
0044   /**
0045    * Returns sum of pts of all branchings in tree
0046    */
0047   Energy totalPt() { return totalpT_; } 
0048 
0049   /**
0050    * Calls recursive function to fill externals and nodes
0051    * then finds the internal lines from the nodes
0052    */
0053   void findNodes();
0054 
0055   /**
0056    * Access the nodal branchings
0057    */
0058   map< HardBranchingPtr, Energy > & getNodes() { return nodes_; }
0059 
0060   /**
0061    *  Get LowestPt in which ever jet definition from the shower variables
0062    */
0063   Energy lowestPt( int jetMeasureMode, Energy2 s );
0064 
0065   /**
0066    *  Is the tree ordered?
0067    */
0068   bool ordered() const {return ordered_;}
0069 
0070 protected:
0071 
0072   /**
0073    * Recursive function to find the lowest jet measure in a hardtree from clustered momenta
0074    **/
0075   void getLowestJetMeasure( HardBranchingPtr branch, int jetMeasureMode, int cutOption );
0076 
0077   /**
0078    * Function for finding the hadronic jet measure of two partons
0079    **/
0080   Energy hadronJetMeasure( const Lorentz5Momentum & p1, 
0081                const Lorentz5Momentum & p2,
0082                bool final );
0083   /**
0084    * Function for finding the Durham or LUCLUS jet measures of two partons
0085    **/
0086   Energy getJetMeasure( const Lorentz5Momentum & p1,
0087             const Lorentz5Momentum & p2,
0088             int jetMeasureMode );
0089 
0090   /**
0091    * Function to determine whether a branching consists of external partons
0092    **/
0093   bool externalBranching( HardBranchingPtr a, HardBranchingPtr b );
0094 
0095   /**
0096    * Function to recursively find the hard line scales
0097    **/
0098   void fillHardScales( HardBranchingPtr branch, vector< pair< Energy, double > > & currentLine );
0099 
0100   /**
0101    * Recursive function to fill externals, nodes and intermediates from the time-like showers
0102    */
0103   bool fillNodes( HardBranchingPtr );
0104 
0105   /**
0106    * Recursive function to fix the parent assignments
0107    */
0108   bool fixParents( HardBranchingPtr );
0109 
0110 private:
0111 
0112   /**
0113    * Map containing all nodes with the ingoing partons and their scale 
0114    * (this is the the intermediates and their ending node).
0115    */
0116   map< HardBranchingPtr,  Energy > nodes_;
0117 
0118   /**
0119    * Scales and z along each hard line to check ordering
0120    */
0121   vector< vector< pair< Energy, double > > > hardLineScales_;
0122 
0123   /**
0124    * The lowest pt of the branchings in the hardtree in whatever
0125    * jet measure according to the hardtree momenta (not the shower variables)
0126    */
0127   Energy  lowestpTMomentum_;
0128 
0129   /**
0130    *  The sum of the pts of all branchings
0131    */
0132   Energy totalpT_;
0133 
0134   /**
0135    *  The hardBranching of softest branching
0136    *  This is found by looking at tree end points in fillNodes
0137    */
0138   HardBranchingPtr  lowestpT_;
0139 
0140   /**
0141    *  Is the tree ordered
0142    */
0143   bool ordered_;
0144   
0145 };
0146 
0147 }
0148 
0149 #endif /* HERWIG_CKKWTree_H */