CLHEP VERSION Reference Documentation
   
CLHEP Home Page     CLHEP Documentation     CLHEP Bug Reports

GenericFunctions/PuncturedSmearedExp.hh
Go to the documentation of this file.
1 // -*- C++ -*-
2 // $Id: PuncturedSmearedExp.hh,v 1.3 2010/06/16 18:22:01 garren Exp $
3 // ------------------------------------------------------------------------------//
4 // This function-object makes an exponential with acceptance holes ("punctures") //
5 // smeared by a resolution function. //
6 // //
7 // //
8 // Joe Boudreau. //
9 // //
10 // ------------------------------------------------------------------------------//
11 #ifndef _PuncturedSmearedExp_h_
12 #define _PuncturedSmearedExp_h_
15 
16 namespace Genfun {
17 
22  class PuncturedSmearedExp: public AbsFunction {
23 
25 
26  public:
27 
28  // Constructor
30 
31  // Copy constructor
33 
34  // Destructor:
36 
37  // Retreive function value
38  virtual double operator ()(double argument) const;
39  virtual double operator ()(const Argument & a) const {return operator() (a[0]);}
40 
41  // Lifetime of exponential:
43  const Parameter & lifetime() const;
44 
45  // Width of the gaussian:
47  const Parameter & sigma() const;
48 
49  // Puncture this thing:
50  void puncture(double min, double max);
51 
52  // Get the puncture parameters:
53  Parameter & min(unsigned int i);
54  Parameter & max(unsigned int i);
55  const Parameter & min(unsigned int i) const;
56  const Parameter & max(unsigned int i) const;
57 
58 
59  private:
60 
61  // These are for calculating mixing terms.
62  double pow(double x, int n) const ;
63  double erfc(double x) const ;
64 
65  // It is illegal to assign an adjustable constant
66  const PuncturedSmearedExp & operator=(const PuncturedSmearedExp &right);
67 
68  Parameter _lifetime;
69  Parameter _sigma;
70  std::vector<Parameter> _punctures;
71 
72  };
73 } // namespace Genfun
74 #endif
#define FUNCTION_OBJECT_DEF(classname)
void puncture(double min, double max)
Parameter & min(unsigned int i)
const Parameter & sigma() const
Parameter & max(unsigned int i)
Parameter & min(unsigned int i)
const Parameter & max(unsigned int i) const
virtual double operator()(double argument) const
const Parameter & min(unsigned int i) const
Parameter & max(unsigned int i)
PuncturedSmearedExp(const PuncturedSmearedExp &right)
const Parameter & lifetime() const
@ a