Back to home page

EIC code displayed by LXR

 
 

    


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

0001 // -*- C++ -*-
0002 //
0003 // JetFinder.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_JetFinder_H
0011 #define THEPEG_JetFinder_H
0012 //
0013 // This is the declaration of the JetFinder class.
0014 //
0015 
0016 #include "ThePEG/Interface/Interfaced.h"
0017 #include "ThePEG/PDT/MatcherBase.h"
0018 #include "Cuts.fh"
0019 
0020 namespace ThePEG {
0021 
0022 /**
0023  * JetFinder defines an interface to jet finders to be used when cuts
0024  * should actually be defined on the level of reconstructed jets such
0025  * as typically encountered in higher order corrections.
0026  *
0027  * @see \ref JetFinderInterfaces "The interfaces"
0028  * defined for JetFinder.
0029  */
0030 class JetFinder: public Interfaced {
0031 
0032 public:
0033 
0034   /**
0035    * The default constructor.
0036    */
0037   JetFinder();
0038 
0039 public:
0040 
0041   /**
0042    * Perform jet clustering on the given outgoing particles.
0043    * Optionally, information on the incoming particles is provided.
0044    * Return true, if a clustering has been performed.
0045    */
0046   virtual bool cluster(tcPDVector & ptype, vector<LorentzMomentum> & p,
0047                tcCutsPtr parent, tcPDPtr t1 = tcPDPtr(),
0048                tcPDPtr t2 = tcPDPtr()) const = 0;
0049 
0050   /**
0051    * Return the matcher for unresolved partons.
0052    */
0053   Ptr<MatcherBase>::tptr unresolvedMatcher() const { return theUnresolvedMatcher; }
0054 
0055   /**
0056    * Set the minimum number of outgoing partons on which clustering
0057    * should be performed.
0058    */
0059   void minOutgoing(unsigned int n) { theMinOutgoing = n; }
0060 
0061   /**
0062    * Return the minimum number of outgoing partons on which clustering
0063    * should be performed.
0064    */
0065   unsigned int minOutgoing() const { return theMinOutgoing; }
0066 
0067   /**
0068    * Return true, if jets should only be constructed from matching
0069    * objects inside a given rapidity interval.
0070    */
0071   bool restrictConsitutents() const { return theRestrictConstituents; }
0072 
0073   /**
0074    * Jets should only be constructed from matching
0075    * objects inside a given rapidity interval.
0076    */
0077   void restrictConsitutents(bool on) { theRestrictConstituents = on; }
0078 
0079   /**
0080    * Return the rapidity interval within objects should be considered
0081    * for clustering, if appropriate
0082    */
0083   const pair<double,double>& constituentRapidityRange() const { return theConstituentRapidityRange; }
0084 
0085   /**
0086    * Set the rapidity interval within objects should be considered
0087    * for clustering, if appropriate
0088    */
0089   void constituentRapidityRange(const pair<double,double>& r) { theConstituentRapidityRange = r; }
0090 
0091   /**
0092    * Describe this jet finder
0093    */
0094   virtual void describe() const = 0;
0095 
0096 public:
0097 
0098   /** @name Functions used by the persistent I/O system. */
0099   //@{
0100   /**
0101    * Function used to write out object persistently.
0102    * @param os the persistent output stream written to.
0103    */
0104   void persistentOutput(PersistentOStream & os) const;
0105 
0106   /**
0107    * Function used to read in object persistently.
0108    * @param is the persistent input stream read from.
0109    * @param version the version number of the object when written.
0110    */
0111   void persistentInput(PersistentIStream & is, int version);
0112   //@}
0113 
0114   /**
0115    * The standard Init function used to initialize the interfaces.
0116    * Called exactly once for each class by the class description system
0117    * before the main function starts or
0118    * when this class is dynamically loaded.
0119    */
0120   static void Init();
0121 
0122 
0123 // If needed, insert declarations of virtual function defined in the
0124 // InterfacedBase class here (using ThePEG-interfaced-decl in Emacs).
0125 
0126 
0127 private:
0128 
0129   /**
0130    * Command to insert a rapidity range
0131    */
0132   string doYRange(string);
0133 
0134   /**
0135    * A matcher for unresolved partons.
0136    */
0137   Ptr<MatcherBase>::ptr theUnresolvedMatcher;
0138 
0139   /**
0140    * The minimum number of outgoing partons on which clustering
0141    * should be performed.
0142    */
0143   unsigned int theMinOutgoing;
0144 
0145   /**
0146    * True, if jets should only be constructed from matching
0147    * objects inside a given rapidity interval.
0148    */
0149   bool theRestrictConstituents;
0150 
0151   /**
0152    * The rapidity interval within objects should be considered
0153    * for clustering, if appropriate
0154    */
0155   pair<double,double> theConstituentRapidityRange;
0156 
0157   /**
0158    * The assignment operator is private and must never be called.
0159    * In fact, it should not even be implemented.
0160    */
0161   JetFinder & operator=(const JetFinder &) = delete;
0162 
0163 };
0164 
0165 }
0166 
0167 #endif /* THEPEG_JetFinder_H */