Main Page
Namespaces
Classes
Package Documentation
PhysicsTools
Utilities
interface
ParametricTrait.h
Go to the documentation of this file.
1
#ifndef PhysicsTools_Utilities_ParametricTrait_h
2
#define PhysicsTools_Utilities_ParametricTrait_h
3
4
#include "
PhysicsTools/Utilities/interface/Functions.h
"
5
#include "
PhysicsTools/Utilities/interface/Fraction.h
"
6
#include "
PhysicsTools/Utilities/interface/Operations.h
"
7
8
namespace
funct
{
9
10
template
<
typename
F>
11
struct
Parametric
{
12
static
const
int
value
= 1;
13
};
14
15
template
<
int
n>
16
struct
Parametric
<
Numerical
<
n
> > {
17
static
const
int
value
= 0;
18
};
19
20
template
<
int
n,
int
m>
21
struct
Parametric
<
FractionStruct
<
n
,
m
> > {
22
static
const
int
value
= 0;
23
};
24
25
#define NON_PARAMETRIC( FUN ) \
26
template<> struct Parametric<FUN> { \
27
static const int value = 0; \
28
}
29
30
#define NON_PARAMETRIC_UNARY(FUN) \
31
template<typename A> \
32
struct Parametric<FUN<A> > { \
33
static const int value = Parametric<A>::value; \
34
}
35
36
NON_PARAMETRIC_UNARY
(
AbsStruct
);
37
NON_PARAMETRIC_UNARY
(
SgnStruct
);
38
NON_PARAMETRIC_UNARY
(
ExpStruct
);
39
NON_PARAMETRIC_UNARY
(
LogStruct
);
40
NON_PARAMETRIC_UNARY
(
SinStruct
);
41
NON_PARAMETRIC_UNARY
(
CosStruct
);
42
NON_PARAMETRIC_UNARY
(
TanStruct
);
43
NON_PARAMETRIC_UNARY
(
MinusStruct
);
44
45
#define NON_PARAMETRIC_BINARY(FUN) \
46
template<typename A, typename B> \
47
struct Parametric<FUN<A, B> > { \
48
static const int value = Parametric<A>::value || Parametric<A>::value; \
49
}
50
51
NON_PARAMETRIC_BINARY
(
SumStruct
);
52
NON_PARAMETRIC_BINARY
(
ProductStruct
);
53
NON_PARAMETRIC_BINARY
(
RatioStruct
);
54
NON_PARAMETRIC_BINARY
(
PowerStruct
);
55
56
#undef NON_PARAMETRIC_UNARY
57
#undef NON_PARAMETRIC_BINARY
58
59
}
60
61
62
#endif
funct::ExpStruct
Definition:
Exp.h:9
Fraction.h
funct
Definition:
Abs.h:5
Operations.h
NON_PARAMETRIC_BINARY
#define NON_PARAMETRIC_BINARY(FUN)
Definition:
ParametricTrait.h:45
funct::SinStruct
Definition:
Sin.h:9
Functions.h
funct::PowerStruct
Definition:
Power.h:8
funct::Parametric
Definition:
ParametricTrait.h:11
funct::Numerical
Definition:
Numerical.h:6
funct::CosStruct
Definition:
Cos.h:9
funct::FractionStruct
Definition:
Fraction.h:12
value
Definition:
value.py:1
funct::TanStruct
Definition:
Tan.h:8
funct::ProductStruct
Definition:
Product.h:7
funct::SumStruct
Definition:
Sum.h:7
funct::MinusStruct
Definition:
Minus.h:7
funct::m
m
Definition:
Factorize.h:55
gen::n
int n
Definition:
Cascade2Hadronizer.cc:79
NON_PARAMETRIC_UNARY
#define NON_PARAMETRIC_UNARY(FUN)
Definition:
ParametricTrait.h:30
funct::RatioStruct
Definition:
Ratio.h:7
funct::AbsStruct
Definition:
Abs.h:8
funct::SgnStruct
Definition:
Sgn.h:7
funct::LogStruct
Definition:
Log.h:9
Generated for CMSSW Reference Manual by
1.8.11