DAS  3.0
Das Analysis System
Di< Obj1, Obj2 >

Description

template<typename Obj1, typename Obj2>
struct DAS::Di< Obj1, Obj2 >

Generic template class to store of a system of 2 objects and facilitate the handling of the variations as well as the calculation of frequent variables.

Obj1 and Obj2 are expected to be either derivated from PhysicsObjects or other specialisations of Di<> itself. Such nesting allows for complex objects such as Z+jets or ttbar systems.

The components of the system are not stored directly but are pointers to existing objects to avoid redundancy / inconsistencies and keep the object light.

To obtain variations of the composite system, an instance of DAS::Uncertainties::Variation may be given as argument of all relevant methods. This object is passed over to the components of the system.

#include <Di.h>

+ Inheritance diagram for Di< Obj1, Obj2 >:
+ Collaboration diagram for Di< Obj1, Obj2 >:

Public Types

using base = std::pair< Obj1 *, Obj2 * >
 

Public Member Functions

 operator bool () const
 
void clear ()
 
FourVector CorrP4 (const Uncertainties::Variation &v=Uncertainties::nominal) const override
 
float CorrPt (const Uncertainties::Variation &v=Uncertainties::nominal) const override
 
float Rapidity (const Uncertainties::Variation &v=Uncertainties::nominal) const
 
float AbsRap (const Uncertainties::Variation &v=Uncertainties::nominal) const
 
float DeltaEta (const Uncertainties::Variation &v=Uncertainties::nominal) const
 
float DeltaPhi (const Uncertainties::Variation &v=Uncertainties::nominal) const
 
float DeltaR (const Uncertainties::Variation &v=Uncertainties::nominal) const
 
float Yboost (const Uncertainties::Variation &v=Uncertainties::nominal) const
 
float Ystar (const Uncertainties::Variation &v=Uncertainties::nominal) const
 
float Ymax (const Uncertainties::Variation &v=Uncertainties::nominal) const
 
float HT (const Uncertainties::Variation &v=Uncertainties::nominal) const
 
double Weight (const Uncertainties::Variation &v=Uncertainties::nominal) const override
 
- Public Member Functions inherited from AbstractPhysicsObject
 AbstractPhysicsObject ()=default
 
virtual ~AbstractPhysicsObject ()=default
 

Member Typedef Documentation

◆ base

using base = std::pair<Obj1*, Obj2*>

Member Function Documentation

◆ AbsRap()

float AbsRap ( const Uncertainties::Variation v = Uncertainties::nominal) const
inline
54  { return std::abs(Rapidity(v)); }

◆ clear()

void clear ( )
inline
44 { first = nullptr; second = nullptr; }

◆ CorrP4()

FourVector CorrP4 ( const Uncertainties::Variation v = Uncertainties::nominal) const
inlineoverridevirtual

Implements AbstractPhysicsObject.

47  { return first->CorrP4(v) + second->CorrP4(v); }

◆ CorrPt()

float CorrPt ( const Uncertainties::Variation v = Uncertainties::nominal) const
inlineoverridevirtual

Implements AbstractPhysicsObject.

49  { return CorrP4(v).Pt(); }

◆ DeltaEta()

float DeltaEta ( const Uncertainties::Variation v = Uncertainties::nominal) const
inline
57  { return second->CorrP4(v).Eta() - first->CorrP4(v).Eta(); }

◆ DeltaPhi()

float DeltaPhi ( const Uncertainties::Variation v = Uncertainties::nominal) const
inline
59  { return ROOT::Math::VectorUtil::DeltaPhi(first->CorrP4(v), second->CorrP4(v)); }

◆ DeltaR()

float DeltaR ( const Uncertainties::Variation v = Uncertainties::nominal) const
inline
61  { return ROOT::Math::VectorUtil::DeltaR (first->CorrP4(v), second->CorrP4(v)); }

◆ HT()

float HT ( const Uncertainties::Variation v = Uncertainties::nominal) const
inline
71  { return (first->CorrPt(v) + second->CorrPt(v))/2; }

◆ operator bool()

operator bool ( ) const
inlineexplicit

< Second particle in the pair (field imported from std::pair)

42 { return first && second; }

◆ Rapidity()

float Rapidity ( const Uncertainties::Variation v = Uncertainties::nominal) const
inline
52  { return CorrP4(v).Rapidity(); }

◆ Weight()

double Weight ( const Uncertainties::Variation v = Uncertainties::nominal) const
inlineoverridevirtual

Implements AbstractPhysicsObject.

74  { return first->Weight(v) * second->Weight(v); }

◆ Yboost()

float Yboost ( const Uncertainties::Variation v = Uncertainties::nominal) const
inline
64  { return (first->Rapidity(v) + second->Rapidity(v))/2; }

◆ Ymax()

float Ymax ( const Uncertainties::Variation v = Uncertainties::nominal) const
inline
69  { return std::max(first->AbsRap(), second->AbsRap()); }

◆ Ystar()

float Ystar ( const Uncertainties::Variation v = Uncertainties::nominal) const
inline
66  { return (first->Rapidity(v) - second->Rapidity(v))/2; }

The documentation for this struct was generated from the following file:
DAS::Di::Rapidity
float Rapidity(const Uncertainties::Variation &v=Uncertainties::nominal) const
Definition: Di.h:51
DAS::Di::CorrP4
FourVector CorrP4(const Uncertainties::Variation &v=Uncertainties::nominal) const override
Definition: Di.h:46