Back to home page

EIC code displayed by LXR

 
 

    


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

0001 // -*- C++ -*-
0002 //
0003 // TTbarAnalysis.h is a part of Herwig - A multi-purpose Monte Carlo event generator
0004 // Copyright (C) 2002-2019 The Herwig Collaboration
0005 //
0006 // Herwig is licenced under version 3 of the GPL, see COPYING for details.
0007 // Please respect the MCnet academic guidelines, see GUIDELINES for details.
0008 //
0009 #ifndef HERWIG_TTbarAnalysis_H
0010 #define HERWIG_TTbarAnalysis_H
0011 //
0012 // This is the declaration of the TTbarAnalysis class.
0013 //
0014        
0015 #include "ThePEG/Repository/CurrentGenerator.h"
0016 #include "ThePEG/Handlers/AnalysisHandler.h"
0017 #include "Herwig/Utilities/Histogram.h"
0018 
0019 namespace Herwig {
0020 
0021 using namespace ThePEG;
0022 
0023 /** \ingroup Analysis
0024  * The TTbarAnalysis class tries to find a top antitop pair in the final
0025  * state and books a number of histograms.  It only makes sense if
0026  * hadronization and decays are switched off.  However, if there is is
0027  * no top quark pair in the final state then a warning is printed and
0028  * nothing is booked.  Some of the histograms will be sensitive to the
0029  * initial state shower.
0030  *
0031  * @see \ref TTbarAnalysisInterfaces "The interfaces"
0032  * defined for TTbarAnalysis.
0033  */
0034 class TTbarAnalysis: public AnalysisHandler {
0035 
0036 public:
0037 
0038   /**
0039    * The default constructor.
0040    */
0041   TTbarAnalysis();
0042 
0043   /** @name Virtual functions required by the AnalysisHandler class. */
0044   //@{
0045   /**
0046    * Analyze a given Event. Note that a fully generated event
0047    * may be presented several times, if it has been manipulated in
0048    * between. The default version of this function will call transform
0049    * to make a lorentz transformation of the whole event, then extract
0050    * all final state particles and call analyze(tPVector) of this
0051    * analysis object and those of all associated analysis objects. The
0052    * default version will not, however, do anything on events which
0053    * have not been fully generated, or have been manipulated in any
0054    * way.
0055    * @param event pointer to the Event to be analyzed.
0056    * @param ieve the event number.
0057    * @param loop the number of times this event has been presented.
0058    * If negative the event is now fully generated.
0059    * @param state a number different from zero if the event has been
0060    * manipulated in some way since it was last presented.
0061    */
0062   virtual void analyze(tEventPtr event, long ieve, int loop, int state);
0063   //@}
0064 
0065 public:
0066 
0067   /**
0068    * The standard Init function used to initialize the interfaces.
0069    * Called exactly once for each class by the class description system
0070    * before the main function starts or
0071    * when this class is dynamically loaded.
0072    */
0073   static void Init();
0074 
0075 protected:
0076 
0077   /** @name Clone Methods. */
0078   //@{
0079   /**
0080    * Make a simple clone of this object.
0081    * @return a pointer to the new object.
0082    */
0083   virtual IBPtr clone() const {return new_ptr(*this);}
0084 
0085   /** Make a clone of this object, possibly modifying the cloned object
0086    * to make it sane.
0087    * @return a pointer to the new object.
0088    */
0089   virtual IBPtr fullclone() const {return new_ptr(*this);}
0090   //@}
0091 
0092 protected:
0093 
0094   /** @name Standard Interfaced functions. */
0095   //@{
0096   /**
0097    * Finalize this object. Called in the run phase just after a
0098    * run has ended. Used eg. to write out statistics.
0099    */
0100   virtual void dofinish();
0101 
0102 private:
0103 
0104   /**
0105    * The assignment operator is private and must never be called.
0106    * In fact, it should not even be implemented.
0107    */
0108   TTbarAnalysis & operator=(const TTbarAnalysis &) = delete;
0109 
0110 private:
0111   /**
0112    *   \f$p_T\f$ of the tops
0113    */
0114   Histogram _pttop;
0115   Histogram _pttbar;
0116   Histogram _ptpair;
0117 
0118   /**
0119    *   \f$E_T\f$ of the tops
0120    */
0121   Histogram _ettop;
0122   Histogram _ettbar;
0123   Histogram _etpair;
0124 
0125   /**
0126    *   Energy of the tops
0127    */
0128   Histogram _etop;
0129   Histogram _etbar;
0130   Histogram _epair;
0131 
0132   /**
0133    *  Rapidity of the tops
0134    */
0135   Histogram _raptop;
0136   Histogram _raptbar;
0137   Histogram _rappair;
0138 
0139   /**
0140    *  Azimuth of the tops
0141    */
0142   Histogram _phitop;
0143   Histogram _phitbar;
0144   Histogram _deltaphi;
0145   
0146   /**
0147    *  Invariant mass of the pair
0148    */
0149   Histogram _mpair;
0150 
0151   /**
0152    *  scalar sums of Et, pt
0153    */
0154   Histogram _etsum;
0155   Histogram _ptsum;
0156 };
0157 
0158 }
0159 
0160 #endif /* HERWIG_TTbarAnalysis_H */