00001 #ifndef ANP_COUNTHIST_H
00002 #define ANP_COUNTHIST_H
00003
00004
00005
00006
00007
00008
00009
00010 #include <string>
00011
00012
00013 #include "PhysicsNtuple/Handle.h"
00014 #include "PhysicsNtuple/Hist1d.h"
00015 #include "PhysicsNtuple/Particle.h"
00016
00017 class TH1;
00018
00019 namespace Anp
00020 {
00021 class CountHist: public Base
00022 {
00023 public:
00024
00025 CountHist(int iactn_, int reson_, Particle::Particle_t particle_);
00026 virtual ~CountHist();
00027
00028 void Fill(double value, double weight_all, double weight_sel);
00029
00030 TH1* ComputeRatio(const std::string &option = "");
00031
00032 bool SetRatio(TH1 *hN, TH1 *hD, TH1 *hR);
00033
00034 TH1* Refill(Hist1d<double> &hist, TH1 *hO);
00035
00036 bool Valid() const;
00037
00038 Particle::Particle_t GetParticle() const;
00039
00040 int GetInteraction() const;
00041 int GetReson() const;
00042
00043 public:
00044
00045 TH1 *hall;
00046 TH1 *hsel;
00047 TH1 *hrat;
00048
00049 double nmin;
00050
00051 Particle::Particle_t particle;
00052
00053 int iactn;
00054 int reson;
00055
00056 bool verbose;
00057 };
00058
00059 bool operator==(const Anp::Handle<Anp::CountHist> &lhs, const Anp::Handle<Anp::CountHist> &rhs);
00060 }
00061
00062 #endif