CLHEP 2.4.6.4
C++ Class Library for High Energy Physics
Loading...
Searching...
No Matches
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_
13#include "CLHEP/GenericFunctions/AbsFunction.hh"
14#include "CLHEP/GenericFunctions/Parameter.hh"
15
16namespace Genfun {
17
18 /**
19 * @author
20 * @ingroup genfun
21 */
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 override;
39 virtual double operator ()(const Argument & a) const override {return operator() (a[0]);}
40
41 // Lifetime of exponential:
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
#define FUNCTION_OBJECT_DEF(classname)
Definition: AbsFunction.hh:143
void puncture(double min, double max)
Parameter & min(unsigned int i)
Parameter & max(unsigned int i)
virtual double operator()(double argument) const override
Definition: Abs.hh:14