12 #include <Math/VectorUtil.h> 
   36 template<
typename Obj1, 
typename Obj2> 
struct Di : 
public std::pair<Obj1*, Obj2*>,
 
   40     using std::pair<Obj1*, Obj2*>::pair;   
 
   41     using std::pair<Obj1*, Obj2*>::first,  
 
   42           std::pair<Obj1*, Obj2*>::second; 
 
   44     explicit operator bool ()
 const { 
return first && second; }
 
   46     inline void Clear () { first = 
nullptr; second = 
nullptr; }
 
   61     inline float Ystar  (
const Variation& v = 
nominal)
 const { 
return (first->Rapidity(v) - second->Rapidity(v))/2; }
 
   63     inline float Ymax (
const Variation& v = 
nominal)
 const { 
return std::max(first->AbsRap(v), second->AbsRap(v)); }
 
   64     inline float HT   (
const Variation& v = 
nominal)
 const { 
return (first->CorrPt(v) + second->CorrPt(v))/2; }
 
   69     virtual ~Di () = 
default;
 
   86 template<
typename Obj1, 
typename Obj2,
 
   87     class = 
typename std::enable_if_t<std::is_base_of_v<Darwin::Physics::ScaledObject, Obj1>>,
 
   88     class = typename std::enable_if_t<std::is_base_of_v<Darwin::Physics::ScaledObject, Obj2>>>
 
   89 inline auto operator+ (Obj1& o1, Obj2& o2)
 
   94 template<
typename Obj1, 
typename Obj2>
 
   98         return s << 
'[' << *di.first << 
", " << *di.second << 
"] = " << di.
CorrP4();
 
  100         return s << 
red << 
"invalid system" << 
normal;