Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2026-08-06 09:23:57

0001 // -*- C++ -*-
0002 #ifndef Herwig_HJetsAnalysis_H
0003 #define Herwig_HJetsAnalysis_H
0004 //
0005 // This is the declaration of the HJetsAnalysis class.
0006 //
0007 
0008 #include "Herwig/Analysis/JetsPlusAnalysis.h"
0009 
0010 namespace Herwig {
0011 
0012 using namespace ThePEG;
0013 
0014 /**
0015  * Here is the documentation of the HJetsAnalysis class.
0016  *
0017  * @see \ref HJetsAnalysisInterfaces "The interfaces"
0018  * defined for HJetsAnalysis.
0019  */
0020 class HJetsAnalysis: public Herwig::JetsPlusAnalysis {
0021 
0022 public:
0023 
0024   /**
0025    * The default constructor.
0026    */
0027   HJetsAnalysis();
0028 
0029 public:
0030 
0031   /**
0032    * Reconstruct the desired electroweak objects and fill the
0033    * respective momenta. Remove the reconstructed particles from the
0034    * list.
0035    */
0036   virtual void reconstructHardObjects(ParticleVector&);
0037 
0038 protected:
0039 
0040   /**
0041    * Perform any additional analysis required
0042    */
0043   virtual void analyzeSpecial(long id, double weight);
0044 
0045   /**
0046    * Append any additional histograms to the given histogram element
0047    */
0048   virtual void finalize(XML::Element&);
0049 
0050 public:
0051 
0052   /** @name Functions used by the persistent I/O system. */
0053   //@{
0054   /**
0055    * Function used to write out object persistently.
0056    * @param os the persistent output stream written to.
0057    */
0058   void persistentOutput(PersistentOStream & os) const;
0059 
0060   /**
0061    * Function used to read in object persistently.
0062    * @param is the persistent input stream read from.
0063    * @param version the version number of the object when written.
0064    */
0065   void persistentInput(PersistentIStream & is, int version);
0066   //@}
0067 
0068   /**
0069    * The standard Init function used to initialize the interfaces.
0070    * Called exactly once for each class by the class description system
0071    * before the main function starts or
0072    * when this class is dynamically loaded.
0073    */
0074   static void Init();
0075 
0076 protected:
0077 
0078   /** @name Clone Methods. */
0079   //@{
0080   /**
0081    * Make a simple clone of this object.
0082    * @return a pointer to the new object.
0083    */
0084   virtual IBPtr clone() const;
0085 
0086   /** Make a clone of this object, possibly modifying the cloned object
0087    * to make it sane.
0088    * @return a pointer to the new object.
0089    */
0090   virtual IBPtr fullclone() const;
0091   //@}
0092 
0093 
0094 // If needed, insert declarations of virtual function defined in the
0095 // InterfacedBase class here (using ThePEG-interfaced-decl in Emacs).
0096 
0097 private:
0098 
0099   /**
0100    * Relative rapidity of the Higgs between the first two jets
0101    */
0102   Statistics::Histogram theHiggsYStar;
0103 
0104   /**
0105    * Relative rapidity of the third jet between the first two jets
0106    */
0107   Statistics::Histogram theThirdJetYStar;
0108 
0109   /**
0110    * Relative rapidity of the fourth jet between the first two jets
0111    */
0112   Statistics::Histogram theFourthJetYStar;
0113 
0114   /**
0115    * Delta phi between the Higgs and the two-jet system
0116    */
0117   Statistics::Histogram theJet12HiggsDeltaPhi;
0118 
0119   /**
0120    * Jeppe's delta phi
0121    */
0122   Statistics::Histogram theJeppeDeltaPhi;
0123 
0124 protected:
0125 
0126   /**
0127    * Calculate ystar given two jets and object of interest
0128    */
0129   double yStar(const LorentzMomentum& jet1, const LorentzMomentum& jet2,
0130            const LorentzMomentum& obj) const {
0131     double y1 = jet1.rapidity();
0132     double y2 = jet2.rapidity();
0133     double res =
0134       obj.rapidity() - 0.5*(y1+y2);
0135     return res/(y1-y2);
0136   }
0137 
0138   /**
0139    * Relative rapidity of the Higgs between the first two jets
0140    */
0141   Statistics::Histogram& higgsYStar() {
0142     if ( !theHiggsYStar.bins().empty() )
0143       return theHiggsYStar;
0144     return theHiggsYStar =
0145       Statistics::Histogram("HiggsYStar",Statistics::Histogram::regularBinEdges(-6,6,120),false,false);
0146   }
0147 
0148   /**
0149    * Relative rapidity of the third jet between the first two jets
0150    */
0151   Statistics::Histogram& thirdJetYStar() {
0152     if ( !theThirdJetYStar.bins().empty() )
0153       return theThirdJetYStar;
0154     return theThirdJetYStar =
0155       Statistics::Histogram("Jet3YStar",Statistics::Histogram::regularBinEdges(-6,6,120),false,false);
0156   }
0157 
0158   /**
0159    * Relative rapidity of the fourth jet between the first two jets
0160    */
0161   Statistics::Histogram& fourthJetYStar() {
0162     if ( !theFourthJetYStar.bins().empty() )
0163       return theFourthJetYStar;
0164     return theFourthJetYStar =
0165       Statistics::Histogram("Jet4YStar",Statistics::Histogram::regularBinEdges(-6,6,120),false,false);
0166   }
0167 
0168   /**
0169    * Delta phi between the Higgs and the two-jet system
0170    */
0171   Statistics::Histogram& jet12HiggsDeltaPhi() {
0172     if ( !theJet12HiggsDeltaPhi.bins().empty() )
0173       return theJet12HiggsDeltaPhi;
0174     return theJet12HiggsDeltaPhi =
0175       Statistics::Histogram("Jet12hDeltaPhi",
0176                 Statistics::Histogram::regularBinEdges(-Constants::pi,Constants::pi,32),
0177                 make_pair(-Constants::pi,Constants::pi));
0178   }
0179 
0180   /**
0181    * Delta phi between the Higgs and the two-jet system
0182    */
0183   Statistics::Histogram& jeppeDeltaPhi() {
0184     if ( !theJeppeDeltaPhi.bins().empty() )
0185       return theJeppeDeltaPhi;
0186     return theJeppeDeltaPhi =
0187       Statistics::Histogram("JeppeDeltaPhi",
0188                 Statistics::Histogram::regularBinEdges(-Constants::pi,Constants::pi,32),
0189                 make_pair(-Constants::pi,Constants::pi));
0190   }
0191 
0192 private:
0193 
0194   /**
0195    * The assignment operator is private and must never be called.
0196    * In fact, it should not even be implemented.
0197    */
0198   HJetsAnalysis & operator=(const HJetsAnalysis &) = delete;
0199 
0200 };
0201 
0202 }
0203 
0204 #endif /* Herwig_HJetsAnalysis_H */