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:
35  virtual ~PuncturedSmearedExp();
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:
42  Parameter & lifetime();
43  const Parameter & lifetime() const;
44 
45  // Width of the gaussian:
46  Parameter & sigma();
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
a
@ a
Definition: testCategories.cc:125
Parameter.hh
Genfun::PuncturedSmearedExp::max
Parameter & max(unsigned int i)
Definition: PuncturedSmearedExp.cc:41
AbsFunction.hh
CLHEP::detail::n
n
Definition: Ranlux64Engine.cc:85
Genfun::PuncturedSmearedExp::min
Parameter & min(unsigned int i)
Definition: PuncturedSmearedExp.cc:32
Genfun::PuncturedSmearedExp::sigma
Parameter & sigma()
Definition: PuncturedSmearedExp.cc:62
Genfun::Argument
Definition: CLHEP/GenericFunctions/Argument.hh:17
Genfun::PuncturedSmearedExp
Definition: CLHEP/GenericFunctions/PuncturedSmearedExp.hh:22
Genfun::PuncturedSmearedExp::PuncturedSmearedExp
PuncturedSmearedExp()
Definition: PuncturedSmearedExp.cc:9
Genfun::PuncturedSmearedExp::puncture
void puncture(double min, double max)
Definition: PuncturedSmearedExp.cc:23
i
long i
Definition: JamesRandomSeeding.txt:27
Genfun::PuncturedSmearedExp::lifetime
Parameter & lifetime()
Definition: PuncturedSmearedExp.cc:54
Genfun::PuncturedSmearedExp::~PuncturedSmearedExp
virtual ~PuncturedSmearedExp()
Definition: PuncturedSmearedExp.cc:51
Genfun::Parameter
Definition: CLHEP/GenericFunctions/Parameter.hh:35
Genfun::PuncturedSmearedExp::operator()
virtual double operator()(double argument) const
Definition: PuncturedSmearedExp.cc:71
x
any side effects of that construction would occur twice The semantics of throw x
Definition: whyZMthrowRethrows.txt:37
FUNCTION_OBJECT_DEF
#define FUNCTION_OBJECT_DEF(classname)
Definition: CLHEP/GenericFunctions/AbsFunction.hh:144
Genfun
Definition: CLHEP/GenericFunctions/Abs.hh:14