Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-04-19 09:09:42

0001 #ifndef Analysis_Observables_Normalized_Observable_H
0002 #define Analysis_Observables_Normalized_Observable_H
0003 
0004 #include "AddOns/Analysis/Observables/Primitive_Observable_Base.H"
0005 
0006 namespace ANALYSIS {
0007 
0008   class Normalized_Observable: public Primitive_Observable_Base {  
0009   protected:
0010     
0011     ATOOLS::Histogram *p_obs, *p_norm;
0012 
0013     int m_mode;
0014 
0015   public:
0016 
0017     // constructors
0018     Normalized_Observable();
0019     Normalized_Observable(int type,double xmin,double xmax,int nbins,
0020               const std::string &name="",const int mode=0);
0021     Normalized_Observable(const Normalized_Observable & old);
0022 
0023     // destructor
0024     ~Normalized_Observable();
0025 
0026     // member functions
0027     Primitive_Observable_Base &
0028     operator+=(const Primitive_Observable_Base &obs);
0029 
0030     void Reset();
0031     void Restore(double scale=1.0);
0032     void EndEvaluation(double scale=1.0);
0033 
0034     void Fill(const double &x,const double &y,
0035           const double &weight,const double &ntrial);
0036     void FillMCB(const double &x,const double &y,
0037          const double &weight,const double &ntrial);
0038     void FinishMCB();
0039 
0040     Primitive_Observable_Base *Copy() const;
0041 
0042     inline const std::string &Name() const { return p_obs->Name(); }
0043 
0044   };// end of class Normalized_Observable
0045 
0046 }// end of namespace ANALYSIS
0047 
0048 #endif