npstat is hosted by Hepforge, IPPP Durham
NPStat  5.10.0
AsinhTransform1D.hh
Go to the documentation of this file.
1 #ifndef NPSTAT_ASINHTRANSFORM1D_HH_
2 #define NPSTAT_ASINHTRANSFORM1D_HH_
3 
4 /*!
5 // \file AsinhTransform1D.hh
6 //
7 // \brief Asinh 1-d coordinate transform, as in Johnson's S_U curve
8 //
9 // Author: I. Volobouev
10 //
11 // April 2015
12 */
13 
15 
16 namespace npstat {
18  {
19  public:
20  AsinhTransform1D(double delta, double lambda, double gamma, double xi);
21  inline virtual ~AsinhTransform1D() {}
22 
23  inline virtual AsinhTransform1D* clone() const
24  {return new AsinhTransform1D(*this);}
25 
26  double transformForward(double x, double* dydx) const;
27  double transformBack(double y) const;
28  inline bool isIncreasing() const {return true;}
29 
30  //@{
31  /** Prototype needed for I/O */
32  inline virtual gs::ClassId classId() const {return gs::ClassId(*this);}
33  virtual bool write(std::ostream&) const;
34  //@}
35 
36  static inline const char* classname()
37  {return "npstat::AsinhTransform1D";}
38  static inline unsigned version() {return 1;}
39  static AsinhTransform1D* read(const gs::ClassId& id, std::istream& is);
40 
41  protected:
42  virtual bool isEqual(const AbsDistributionTransform1D&) const;
43 
44  private:
45  inline void setParameterChecked(const unsigned which, const double value)
46  {params_[which] = value;}
47  inline void setAllParametersChecked(const double* p)
48  {for (unsigned i=0; i<4U; ++i) {params_[i] = p[i];}}
49  inline double getParameterChecked(const unsigned which) const
50  {return params_[which];}
51 
52  double params_[4];
53  };
54 }
55 
56 #endif // NPSTAT_ASINHTRANSFORM1D_HH_
Interface definition for 1-d coordinate transformations used to build statistical distributions.
Definition: AbsDistributionTransform1D.hh:29
Definition: AsinhTransform1D.hh:18
double transformForward(double x, double *dydx) const
virtual AsinhTransform1D * clone() const
Definition: AsinhTransform1D.hh:23
virtual gs::ClassId classId() const
Definition: AsinhTransform1D.hh:32
virtual bool isEqual(const AbsDistributionTransform1D &) const
bool isIncreasing() const
Definition: AsinhTransform1D.hh:28
Definition: AbsArrayProjector.hh:14