MC_ParticleAnalysis.hh
Go to the documentation of this file.
00001 // -*- C++ -*- 00002 #ifndef RIVET_MC_ParticleAnalysis_HH 00003 #define RIVET_MC_ParticleAnalysis_HH 00004 00005 #include "Rivet/Analysis.hh" 00006 #include "Rivet/Projections/FinalState.hh" 00007 00008 namespace Rivet { 00009 00010 00011 /// @brief Base class providing common functionality for MC particle species validation analyses 00012 class MC_ParticleAnalysis : public Analysis { 00013 public: 00014 00015 /// Default constructor. 00016 MC_ParticleAnalysis(const string& name, 00017 size_t nparticles, 00018 const string& particle_name); 00019 00020 00021 /// @name Analysis methods 00022 //@{ 00023 00024 /// Bookings as usual, using the particle name specified by the derived classe 00025 virtual void init(); 00026 00027 /// To be implemented by derived classes, making particle selection then calling _analyze 00028 virtual void analyze(const Event& event) = 0; 00029 00030 /// Normalization, division, etc. 00031 virtual void finalize(); 00032 00033 /// For derived classes to call, passing the sorted particle collection that they wish to analyse 00034 virtual void _analyze(const Event& event, const Particles& particles); 00035 //@} 00036 00037 00038 protected: 00039 00040 /// The number of particles for which histograms are to be initialised 00041 size_t _nparts; 00042 00043 /// The name of the particle species/group being analysed 00044 std::string _pname; 00045 00046 /// @name Histograms 00047 //@{ 00048 std::vector<Histo1DPtr> _h_pt; 00049 std::vector<Histo1DPtr> _h_eta; 00050 std::vector<Histo1DPtr> _h_eta_plus, _h_eta_minus; 00051 std::vector<Histo1DPtr> _h_rap; 00052 std::vector<Histo1DPtr> _h_rap_plus, _h_rap_minus; 00053 std::map<std::pair<size_t, size_t>, Histo1DPtr> _h_deta; 00054 std::map<std::pair<size_t, size_t>, Histo1DPtr> _h_dphi; 00055 std::map<std::pair<size_t, size_t>, Histo1DPtr> _h_dR; 00056 Histo1DPtr _h_multi_exclusive, _h_multi_inclusive; 00057 Histo1DPtr _h_multi_exclusive_prompt, _h_multi_inclusive_prompt; 00058 Scatter2DPtr _h_multi_ratio, _h_multi_ratio_prompt; 00059 //@} 00060 00061 }; 00062 00063 } 00064 00065 #endif Generated on Wed Oct 7 2015 12:09:13 for The Rivet MC analysis system by ![]() |