rivet is hosted by Hepforge, IPPP Durham
Rivet 3.1.6
MC_ParticleAnalysis.hh
1// -*- C++ -*-
2#ifndef RIVET_MC_ParticleAnalysis_HH
3#define RIVET_MC_ParticleAnalysis_HH
4
5#include "Rivet/Analysis.hh"
6#include "Rivet/Projections/FinalState.hh"
7
8namespace Rivet {
9
10
13 public:
14
17 size_t nparticles,
18 const string& particle_name);
19
20
22
23
25 virtual void init();
26
28 virtual void analyze(const Event& event) = 0;
29
31 virtual void finalize();
32
34 virtual void _analyze(const Event& event, const Particles& particles);
36
37
38 protected:
39
41 size_t _nparts;
42
44 std::string _pname;
45
47
48 std::vector<Histo1DPtr> _h_pt;
49 std::vector<Histo1DPtr> _h_eta;
50 std::vector<Histo1DPtr> _h_eta_plus, _h_eta_minus;
51 std::vector<Histo1DPtr> _h_rap;
52 std::vector<Histo1DPtr> _h_rap_plus, _h_rap_minus;
53 std::vector<Scatter2DPtr> tmpeta, tmprap;
54
55 std::map<std::pair<size_t, size_t>, Histo1DPtr> _h_deta;
56 std::map<std::pair<size_t, size_t>, Histo1DPtr> _h_dphi;
57 std::map<std::pair<size_t, size_t>, Histo1DPtr> _h_dR;
58 Histo1DPtr _h_multi_exclusive, _h_multi_inclusive;
59 Histo1DPtr _h_multi_exclusive_prompt, _h_multi_inclusive_prompt;
60 Scatter2DPtr _h_multi_ratio, _h_multi_ratio_prompt;
62
63 };
64
65}
66
67#endif
This is the base class of all analysis classes in Rivet.
Definition: Analysis.hh:64
Representation of a HepMC event, and enabler of Projection caching.
Definition: Event.hh:22
Base class providing common functionality for MC particle species validation analyses.
Definition: MC_ParticleAnalysis.hh:12
virtual void analyze(const Event &event)=0
To be implemented by derived classes, making particle selection then calling _analyze.
virtual void init()
Bookings as usual, using the particle name specified by the derived classe.
virtual void finalize()
Normalization, division, etc.
MC_ParticleAnalysis(const string &name, size_t nparticles, const string &particle_name)
Default constructor.
Specialised vector of Particle objects.
Definition: Particle.hh:25
virtual std::string name() const
Get the name of the analysis.
Definition: Analysis.hh:127
Definition: MC_Cent_pPb.hh:10