10 #ifndef ROOT_Minuit2_ABSum
11 #define ROOT_Minuit2_ABSum
20 template<
class M1,
class M2>
29 template<
class MI1,
class MI2>
40 template<
class MI1,
class MI2>
43 const M1&
A()
const {
return fA;}
44 const M2&
B()
const {
return fB;}
53 template<
class atype,
class A,
class btype,
class B,
class T>
54 inline ABObj<typename AlgebraicSumType<atype, btype>::Type,
ABSum<ABObj<atype,A,T>,
ABObj<btype,B,T> >,
T>
operator+(
const ABObj<atype,A,T>&
a,
const ABObj<btype,B,T>& b) {
56 return ABObj<typename AlgebraicSumType<atype,btype>::Type, ABSum<ABObj<atype,A,T>, ABObj<btype,B,T> >,
T>(ABSum<ABObj<atype,A,T>, ABObj<btype,B,T> >(
a, b));
60 template<
class atype,
class A,
class btype,
class B,
class T>
61 inline ABObj<typename AlgebraicSumType<atype, btype>::Type, ABSum<ABObj<atype,A,T>, ABObj<btype,B,T> >,
T>
operator-(
const ABObj<atype,A,T>&
a,
const ABObj<btype,B,T>& b) {
63 return ABObj<typename AlgebraicSumType<atype,btype>::Type, ABSum<ABObj<atype,A,T>, ABObj<btype,B,T> >,
T>(ABSum<ABObj<atype,A,T>, ABObj<btype,B,T> >(
a, ABObj<btype,B,T>(b.
Obj(),
T(-1.)*b.
f())));
70 #endif // ROOT_Minuit2_ABSum
Namespace for new ROOT classes and functions.
ABSum & operator=(const ABSum< MI1, MI2 > &)
ABObj< mt, M, T > operator-(const M &obj)
ABSum(const ABSum< MI1, MI2 > &sum)
ABObj< typename AlgebraicSumType< atype, btype >::Type, ABSum< ABObj< atype, A, T >, ABObj< btype, B, T > >, T > operator+(const ABObj< atype, A, T > &a, const ABObj< btype, B, T > &b)
ABSum(const M1 &a, const M2 &b)
ABSum & operator=(const ABSum &)