CLHEP VERSION Reference Documentation
CLHEP Home Page
CLHEP Documentation
CLHEP Bug Reports
GenericFunctions
CLHEP
GenericFunctions
CLHEP/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_
13
#include "
CLHEP/GenericFunctions/AbsFunction.hh
"
14
#include "
CLHEP/GenericFunctions/Parameter.hh
"
15
16
namespace
Genfun
{
17
22
class
PuncturedSmearedExp
:
public
AbsFunction
{
23
24
FUNCTION_OBJECT_DEF
(
PuncturedSmearedExp
)
25
26
public
:
27
28
// Constructor
29
PuncturedSmearedExp
();
30
31
// Copy constructor
32
PuncturedSmearedExp
(
const
PuncturedSmearedExp
&right);
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
AbsFunction.hh
FUNCTION_OBJECT_DEF
#define FUNCTION_OBJECT_DEF(classname)
Definition
CLHEP/GenericFunctions/AbsFunction.hh:144
Parameter.hh
Genfun::AbsFunction
Definition
CLHEP/GenericFunctions/AbsFunction.hh:48
Genfun::Argument
Definition
CLHEP/GenericFunctions/Argument.hh:17
Genfun::Parameter
Definition
CLHEP/GenericFunctions/Parameter.hh:35
Genfun::PuncturedSmearedExp
Definition
CLHEP/GenericFunctions/PuncturedSmearedExp.hh:22
Genfun::PuncturedSmearedExp::puncture
void puncture(double min, double max)
Definition
PuncturedSmearedExp.cc:23
Genfun::PuncturedSmearedExp::lifetime
Parameter & lifetime()
Definition
PuncturedSmearedExp.cc:54
Genfun::PuncturedSmearedExp::min
Parameter & min(unsigned int i)
Definition
PuncturedSmearedExp.cc:32
Genfun::PuncturedSmearedExp::operator()
virtual double operator()(double argument) const
Definition
PuncturedSmearedExp.cc:71
Genfun::PuncturedSmearedExp::sigma
Parameter & sigma()
Definition
PuncturedSmearedExp.cc:62
Genfun::PuncturedSmearedExp::PuncturedSmearedExp
PuncturedSmearedExp()
Definition
PuncturedSmearedExp.cc:9
Genfun::PuncturedSmearedExp::~PuncturedSmearedExp
virtual ~PuncturedSmearedExp()
Definition
PuncturedSmearedExp.cc:51
Genfun::PuncturedSmearedExp::max
Parameter & max(unsigned int i)
Definition
PuncturedSmearedExp.cc:41
Genfun
Definition
CLHEP/GenericFunctions/Abs.hh:14
a
@ a
Definition
testCategories.cc:125
Generated by
1.9.8