Back to home page

EIC code displayed by LXR

 
 

    


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

0001 // -*- C++ -*-
0002 #ifndef THEPEG_NLORivetAnalysis_H
0003 #define THEPEG_NLORivetAnalysis_H
0004 //
0005 // This is the declaration of the NLORivetAnalysis class.
0006 //
0007 
0008 #include "ThePEG/Handlers/AnalysisHandler.h"
0009 #include "Rivet/AnalysisHandler.hh"
0010 
0011 namespace ThePEG {
0012 
0013 /**
0014  * Here is the documentation of the NLORivetAnalysis class.
0015  *
0016  * @see \ref NLORivetAnalysisInterfaces "The interfaces"
0017  * defined for NLORivetAnalysis.
0018  */
0019 class NLORivetAnalysis: public ThePEG::AnalysisHandler {
0020 
0021 public:
0022   
0023   /**
0024    * The default constructor.
0025    */
0026   NLORivetAnalysis();
0027   
0028 public:
0029   
0030   /** @name Virtual functions required by the AnalysisHandler class. */
0031   //@{
0032   /**
0033    * Analyze a given Event. Note that a fully generated event
0034    * may be presented several times, if it has been manipulated in
0035    * between. The default version of this function will call transform
0036    * to make a lorentz transformation of the whole event, then extract
0037    * all final state particles and call analyze(tPVector) of this
0038    * analysis object and those of all associated analysis objects. The
0039    * default version will not, however, do anything on events which
0040    * have not been fully generated, or have been manipulated in any
0041    * way.
0042    * @param event pointer to the Event to be analyzed.
0043    * @param ieve the event number.
0044    * @param loop the number of times this event has been presented.
0045    * If negative the event is now fully generated.
0046    * @param state a number different from zero if the event has been
0047    * manipulated in some way since it was last presented.
0048    */
0049   virtual void analyze(ThePEG::tEventPtr event, long ieve, int loop, int state);
0050 
0051   //@}
0052   
0053 public:
0054   
0055   /** @name Functions used by the persistent I/O system. */
0056   //@{
0057   /**
0058    * Function used to write out object persistently.
0059    * @param os the persistent output stream written to.
0060    */
0061   void persistentOutput(ThePEG::PersistentOStream & os) const;
0062   
0063   /**
0064    * Function used to read in object persistently.
0065    * @param is the persistent input stream read from.
0066    * @param version the version number of the object when written.
0067    */
0068   void persistentInput(ThePEG::PersistentIStream & is, int version);
0069   //@}
0070 
0071   /**
0072    * The standard Init function used to initialize the interfaces.
0073    * Called exactly once for each class by the class description system
0074    * before the main function starts or
0075    * when this class is dynamically loaded.
0076    */
0077   static void Init();
0078 
0079 protected:
0080 
0081   /** @name Clone Methods. */
0082   //@{
0083   /**
0084    * Make a simple clone of this object.
0085    * @return a pointer to the new object.
0086    */
0087   virtual ThePEG::IBPtr clone() const;
0088 
0089   /** Make a clone of this object, possibly modifying the cloned object
0090    * to make it sane.
0091    * @return a pointer to the new object.
0092    */
0093   virtual ThePEG::IBPtr fullclone() const;
0094   //@}
0095 
0096 protected:
0097 
0098   /** @name Standard Interfaced functions. */
0099   //@{
0100   /**
0101    * Initialize this object. Called in the read phase.
0102    */
0103   virtual void doinit();
0104 
0105   /**
0106    * Initialize this object. Called in the run phase just before
0107    * a run begins.
0108    */
0109   virtual void doinitrun();
0110 
0111   /**
0112    * Finalize this object. Called in the run phase just after a
0113    * run has ended. Used eg. to write out statistics.
0114    */
0115   virtual void dofinish();
0116   //@}
0117 
0118 private:
0119 
0120   /**
0121    * The static object used to initialize the description of this class.
0122    * Indicates that this is a concrete class with persistent data.
0123    */
0124   static ThePEG::ClassDescription<NLORivetAnalysis> initNLORivetAnalysis;
0125 
0126   /**
0127    * The assignment operator is private and must never be called.
0128    * In fact, it should not even be implemented.
0129    */
0130   NLORivetAnalysis & operator=(const NLORivetAnalysis &) = delete;
0131 
0132 private:
0133   /**
0134    * The PDG ID to be used for remnants
0135    */
0136   long _remnantId;
0137 
0138   /**
0139    * Selector for the choice of units
0140    */
0141   int _unitchoice;
0142 
0143   /**
0144    *  The Analyses to use
0145    */
0146   vector<string> _analyses;
0147 
0148   /**
0149    * The base name of the output file.
0150    */
0151   string filename;
0152 
0153   /**
0154    * Enable debugging information from NLORivet
0155    */
0156   bool debug;
0157 
0158   /**
0159    *  The NLORivetAnalysisHandler
0160    */
0161   Rivet::AnalysisHandler * _rivet;
0162 
0163   /**
0164    *  Event count
0165    */
0166   unsigned long _nevent;
0167 };
0168 
0169 }
0170 
0171 #include "ThePEG/Utilities/ClassTraits.h"
0172 
0173 namespace ThePEG {
0174 
0175 /** @cond TRAITSPECIALIZATIONS */
0176 
0177 /** This template specialization informs ThePEG about the
0178  *  base classes of NLORivetAnalysis. */
0179 template <>
0180 struct BaseClassTrait<NLORivetAnalysis,1> {
0181   /** Typedef of the first base class of NLORivetAnalysis. */
0182   typedef AnalysisHandler NthBase;
0183 };
0184 
0185 /** This template specialization informs ThePEG about the name of
0186  *  the NLORivetAnalysis class and the shared object where it is defined. */
0187 template <>
0188 struct ClassTraits<NLORivetAnalysis>
0189   : public ClassTraitsBase<NLORivetAnalysis> {
0190   /** Return a platform-independent class name */
0191   static string className() { return "ThePEG::NLORivetAnalysis"; }
0192   /**
0193    * The name of a file containing the dynamic library where the class
0194    * NLORivetAnalysis is implemented. It may also include several, space-separated,
0195    * libraries if the class NLORivetAnalysis depends on other classes (base classes
0196    * excepted). In this case the listed libraries will be dynamically
0197    * linked in the order they are specified.
0198    */
0199   static string library() { return "RivetAnalysis.so"; }
0200 };
0201 
0202 /** @endcond */
0203 
0204 }
0205 
0206 #endif /* THEPEG_NLORivetAnalysis_H */