herwig is hosted by Hepforge, IPPP Durham
Herwig++  2.7.0
SingleParticleAnalysis.h
00001 // -*- C++ -*-
00002 //
00003 // SingleParticleAnalysis.h is a part of Herwig++ - A multi-purpose Monte Carlo event generator
00004 // Copyright (C) 2002-2011 The Herwig Collaboration
00005 //
00006 // Herwig++ is licenced under version 2 of the GPL, see COPYING for details.
00007 // Please respect the MCnet academic guidelines, see GUIDELINES for details.
00008 //
00009 #ifndef HERWIG_SingleParticleAnalysis_H
00010 #define HERWIG_SingleParticleAnalysis_H
00011 //
00012 // This is the declaration of the SingleParticleAnalysis class.
00013 //
00014 
00015 #include "ThePEG/Repository/CurrentGenerator.h"
00016 #include "ThePEG/Handlers/AnalysisHandler.h"
00017 #include "ThePEG/Repository/EventGenerator.h"
00018 #include "Herwig++/Utilities/Histogram.h"
00019 #include "EventShapes.h"
00020 
00021 namespace Herwig {
00022 
00023 using namespace ThePEG;
00024 
00033 class SingleParticleAnalysis: public AnalysisHandler {
00034 
00035 public:
00036 
00039 
00045   virtual void analyze(const tPVector & particles);
00047 
00048 public:
00049 
00056   void persistentOutput(PersistentOStream & os) const;
00057 
00063   void persistentInput(PersistentIStream & is, int version);
00065 
00072   static void Init();
00073 
00074 protected:
00075 
00082   virtual IBPtr clone() const {return new_ptr(*this);}
00083 
00088   virtual IBPtr fullclone() const {return new_ptr(*this);}
00090 
00091 protected:
00092 
00099   virtual void doinitrun();
00100 
00105   virtual void dofinish();
00107 
00108 private:
00109 
00114   static ClassDescription<SingleParticleAnalysis> initSingleParticleAnalysis;
00115 
00120   SingleParticleAnalysis & operator=(const SingleParticleAnalysis &);
00121 
00122 private:
00123 
00127   HistogramPtr _yT;
00128 
00132   HistogramPtr _yS;
00133 
00137   HistogramPtr _ptinT;
00138 
00142   HistogramPtr _ptoutT;
00143 
00147   HistogramPtr _ptinS;
00148 
00152   HistogramPtr _ptoutS;
00153 
00157   HistogramPtr _nch;
00158 
00162   EventShapesPtr _shapes;
00163 };
00164 
00165 }
00166 
00167 #include "ThePEG/Utilities/ClassTraits.h"
00168 
00169 namespace ThePEG {
00170 
00175 template <>
00176 struct BaseClassTrait<Herwig::SingleParticleAnalysis,1> {
00178   typedef AnalysisHandler NthBase;
00179 };
00180 
00183 template <>
00184 struct ClassTraits<Herwig::SingleParticleAnalysis>
00185   : public ClassTraitsBase<Herwig::SingleParticleAnalysis> {
00187   static string className() { return "Herwig::SingleParticleAnalysis"; }
00191   static string library() { return "HwAnalysis.so HwLEPAnalysis.so"; }
00192 };
00193 
00196 }
00197 
00198 #endif /* HERWIG_SingleParticleAnalysis_H */