Changeset 1092 in Sophya for trunk/SophyaLib/HiStats/hisprof.h


Ignore:
Timestamp:
Jul 26, 2000, 3:15:52 PM (25 years ago)
Author:
ansari
Message:

Histos/Hprof/Histo2D en r_8 cmv 26/7/00

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/SophyaLib/HiStats/hisprof.h

    r1089 r1092  
    1717  // CREATOR / DESTRUCTOR
    1818  HProf();
    19   HProf(float xMin, float xMax, int nBin=100, float yMin=1., float yMax=-1.);
     19  HProf(r_8 xMin, r_8 xMax, int_4 nBin=100, r_8 yMin=1., r_8 yMax=-1.);
     20  HProf(r_4 xMin, r_4 xMax, int_4 nBin=100, r_4 yMin=1., r_4 yMax=-1.);
    2021  HProf(const HProf& H);
    2122  virtual ~HProf();
     
    2728  void SetErrOpt(bool spread = true);
    2829  void Zero();
    29   void Add(float x, float y, float w = 1.);
    30   void AddBin(int numBin, float y, float w = 1.);
     30  void Add(r_8 x, r_8 y, r_8 w = 1.);
     31  void AddBin(int_4 numBin, r_8 y, r_8 w = 1.);
    3132 
    3233  // Acces a l information
     
    4445              {UpdateHisto(); Histo::GetError(v);}
    4546  //! Retourne le contenu du bin i
    46   inline float operator()(int i) const
    47                {UpdateHisto(); return data[i];}
     47  inline r_8 operator()(int_4 i) const
     48               {UpdateHisto(); return mData[i];}
    4849  //! Retourne le carre de la dispersion/erreur du bin i
    49   inline double Error2(int i) const
    50                 {UpdateHisto(); return (float) err2[i];}
     50  inline r_8 Error2(int_4 i) const
     51                {UpdateHisto(); return mErr2[i];}
    5152  //! Retourne la dispersion/erreur du bin i
    52   inline float Error(int i) const
     53  inline r_8 Error(int_4 i) const
    5354               {UpdateHisto();
    54                 return (err2[i]>0.) ? (float) sqrt(err2[i]) : 0.f;}
     55                return (mErr2[i]>0.) ? sqrt(mErr2[i]) : 0.;}
    5556
    5657  // Operators
     
    5960
    6061  // Info, statistique et calculs sur les histogrammes
    61   virtual void HRebin(int nbinew);
     62  virtual void HRebin(int_4 nbinew);
    6263
    6364  // Fit
    6465  //! Fit du profile par ``gfit''.
    65   inline int Fit(GeneralFit& gfit)
     66  inline int_4 Fit(GeneralFit& gfit)
    6667         {UpdateHisto(); return Histo::Fit(gfit,0);}
    6768  //! Retourne l'Histogramme des residus par ``gfit''.
     
    7475  // Print
    7576  //! Print, voir detail dans Histo::Print
    76   inline void Print(int dyn=100,float hmin=1.,float hmax=-1.
    77                    ,int pflag=0,int il=1,int ih=-1)
     77  inline void Print(int_4 dyn=100,r_8 hmin=1.,r_8 hmax=-1.
     78                   ,int_4 pflag=0,int_4 il=1,int_4 ih=-1)
    7879         {UpdateHisto(); Histo::Print(dyn,hmin,hmax,pflag,il,ih);}
    7980  //! PrintF, voir detail dans Histo::PrintF
    80   inline void PrintF(FILE * fp,int dyn=100,float hmin=1.,float hmax=-1.
    81                     ,int pflag=0,int il=1,int ih=-1)
     81  inline void PrintF(FILE * fp,int_4 dyn=100,r_8 hmin=1.,r_8 hmax=-1.
     82                    ,int_4 pflag=0,int_4 il=1,int_4 ih=-1)
    8283         {UpdateHisto(); Histo::PrintF(fp,dyn,hmin,hmax,pflag,il,ih);}
    8384
     
    8687  void updatehisto() const;
    8788
    88   double*        SumY;  //!< somme
    89   double*        SumY2; //!< somme des carres
    90   double*        SumW;  //!< somme des poids
    91   mutable bool   Ok;    //!< true if update fait
    92   float          YMin;  //!< limite minimum Y pour somme
    93   float          YMax;  //!< limite maximum Y pour somme
    94   uint_2         Opt;   //!< options pour les erreurs
     89  r_8*         SumY;  //!< somme
     90  r_8*         SumY2; //!< somme des carres
     91  r_8*         SumW;  //!< somme des poids
     92  mutable bool Ok;    //!< true if update fait
     93  r_8          YMin;  //!< limite minimum Y pour somme
     94  r_8          YMax;  //!< limite maximum Y pour somme
     95  uint_2       Opt;   //!< options pour les erreurs
    9596};
    9697
Note: See TracChangeset for help on using the changeset viewer.