DAS  3.0
Das Analysis System
Di.h File Reference
#include <cmath>
#include <algorithm>
#include <iostream>
#include <type_traits>
#include <Math/VectorUtil.h>
#include <colours.h>
#include <Variation.h>
#include <GenericObject.h>
+ Include dependency graph for Di.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  Di< Obj1, Obj2 >
 

Namespaces

 Darwin
 
 Darwin::Physics
 

Functions

template<typename Obj1 , typename Obj2 , class = typename std::enable_if_t<std::is_base_of_v<Darwin::Physics::AbstractGenericObject, Obj1>>, class = typename std::enable_if_t<std::is_base_of_v<Darwin::Physics::AbstractGenericObject, Obj2>>>
auto operator+ (Obj1 &o1, Obj2 &o2)
 
template<typename Obj1 , typename Obj2 >
std::ostream & operator<< (std::ostream &s, const Darwin::Physics::Di< Obj1, Obj2 > &di)
 

Function Documentation

◆ operator+()

auto operator+ ( Obj1 &  o1,
Obj2 &  o2 
)
inline

Generic overload of operator+ to define composite objects as follows:

auto recdimuon = genmuons.at(0) + genmuons.at(1);
auto reczjet = recdimuon + genjets.at(0);
// or even
auto recW1 = recJet.at(1) + recJet.at(2),
recW2 = recJet.at(4) + recJet.at(5);
auto recT1 = recJet.at(0) + recW1,
recT2 = recJet.at(3) + recW2;
auto recTTbar = recT1 + recT2;
87 {
88  return Darwin::Physics::Di<Obj1,Obj2>{&o1,&o2};
89 }

◆ operator<<()

std::ostream& operator<< ( std::ostream &  s,
const Darwin::Physics::Di< Obj1, Obj2 > &  di 
)
93 {
94  if (di)
95  return s << '[' << *di.first << ", " << *di.second << "] = " << di.CorrP4();
96  else
97  return s << red << "invalid system" << normal;
98 }
Darwin::Physics::Di::CorrP4
FourVector CorrP4(const Variation &v=nominal) const override
Definition: Di.h:48
reczjet
DAS::RecZJet reczjet
Definition: classes.h:36
Ntupliser_cfg.genjets
genjets
Definition: Ntupliser_cfg.py:268
Step::red
static const char * red
Definition: Step.h:34
recdimuon
DAS::RecDimuon recdimuon
Definition: classes.h:35
Darwin::Physics::Di
Definition: Di.h:37
normal
static const char * normal
Definition: colours.h:8