00001 // -*- C++ -*- 00002 #ifndef RIVET_TestAnalysis_HH 00003 #define RIVET_TestAnalysis_HH 00004 00005 #include "Rivet/Analysis.hh" 00006 #include "Rivet/Projections/Multiplicity.hh" 00007 #include "Rivet/Projections/Thrust.hh" 00008 #include "Rivet/RivetAIDA.fhh" 00009 00010 00011 namespace Rivet { 00012 00013 /// This class just measures the charged multiplicity 00014 class TestAnalysis : public Analysis { 00015 00016 public: 00017 00018 /// Default constructor 00019 inline TestAnalysis() 00020 : _multproj(_fsproj), _thrustproj(_fsproj) 00021 { 00022 addProjection(_fsproj); 00023 addProjection(_multproj); 00024 addProjection(_thrustproj); 00025 } 00026 00027 /// Factory method 00028 static Analysis* create() { 00029 return new TestAnalysis(); 00030 } 00031 00032 /// Get the name of this analysis. 00033 inline string getName() const { 00034 return "Test"; 00035 } 00036 00037 void init(); 00038 00039 void analyze(const Event& event); 00040 00041 void finalize(); 00042 00043 private: 00044 00045 /// The final state projector. 00046 FinalState _fsproj; 00047 00048 /// The multiplicity projector. 00049 Multiplicity _multproj; 00050 00051 /// The thrust projector. 00052 Thrust _thrustproj; 00053 00054 private: 00055 00056 /// Hide the assignment operator 00057 TestAnalysis& operator=(const TestAnalysis&); 00058 00059 //@{ 00060 /// Histograms 00061 AIDA::IHistogram1D* _histTot; 00062 AIDA::IHistogram1D* _histChTot; 00063 AIDA::IHistogram1D* _histUnchTot; 00064 AIDA::IHistogram1D* _histHadrTot; 00065 AIDA::IHistogram1D* _histHadrChTot; 00066 AIDA::IHistogram1D* _histHadrUnchTot; 00067 AIDA::IHistogram1D* _histThrust; 00068 00069 //@} 00070 00071 }; 00072 00073 } 00074 00075 #endif