DESY Hbb Analysis Framework
Public Member Functions | Private Attributes | List of all members
analysis::tools::Composite< A, B > Class Template Reference

#include <Composite.h>

Inheritance diagram for analysis::tools::Composite< A, B >:
analysis::tools::Candidate

Public Member Functions

float btag (const std::string &) const
 
 Composite ()
 default constructor More...
 
 Composite (const A &, const B &)
 constructor from other objects More...
 
float deltaEta () const
 
float deltaR () const
 
A * objecA ()
 
BobjecB ()
 
void objectA (const A &)
 
void objectB (const B &)
 
 ~Composite ()
 destructor More...
 
- Public Member Functions inherited from analysis::tools::Candidate
 Candidate ()
 default constructor More...
 
 Candidate (const float &pt, const float &eta, const float &phi, const float &e, const float &q)
 constructor from 4-momentum information More...
 
 Candidate (const float &px, const float &py, const float &pz)
 constructor from 3-momentum information More...
 
 Candidate (const float &px, const float &py, const float &pz, const float &q)
 constructor from 3-momentum and charge information More...
 
float deltaPhi (const Candidate &) const
 returns the deltaPhi between this and another candidate More...
 
float deltaR (const Candidate &) const
 returns the deltaR between this and another candidate More...
 
float e () const
 returns the energy More...
 
void e (const float &)
 sets the energy More...
 
float eta () const
 returns the pseudorapidity More...
 
float m () const
 returns the mass More...
 
float mass () const
 returns the mass More...
 
const Candidatematched (const std::string &name)
 returns the pointer to the matched candidate object More...
 
const Candidatematched (const std::string &name) const
 returns the pointer to the matched candidate object More...
 
virtual bool matchTo (const std::vector< Candidate > *cands, const std::string &name, const float &deltaR=0.5)
 function to match this candidate to another object from a list of pointers with a name More...
 
virtual bool matchTo (const std::vector< Candidate > *cands, const std::string &name, const float &delta_pT, const float &deltaR)
 
TVector3 p3 () const
 returns the 4-momentum (TVector3) More...
 
TLorentzVector p4 () const
 returns the 4-momentum (TLorentzVector) More...
 
void p4 (const TLorentzVector &)
 sets the 4-momentum (TLorentzVector) More...
 
float phi () const
 returns the azimuthal angle More...
 
float pt () const
 returns the transverse momentum More...
 
float px () const
 returns the x component of the momentum More...
 
void px (const float &)
 sets the x component of the momentum More...
 
float py () const
 returns the y component of the momentum More...
 
void py (const float &)
 sets the y component of the momentum More...
 
float pz () const
 returns the z component of the momentum More...
 
void pz (const float &)
 sets the z component of the momentum More...
 
int q () const
 returns the charge More...
 
void q (const float &)
 sets the charge More...
 
void unmatch (const std::string &)
 unmatch a matched candidate object, i.e. set it to nullptr, useful to remove possible duplicated matching More...
 
virtual ~Candidate ()
 destructor More...
 

Private Attributes

A const * a_
 
B const * b_
 

Additional Inherited Members

- Protected Attributes inherited from analysis::tools::Candidate
std::map< std::string, const Candidate * > matched_
 map of matched candidates More...
 
TLorentzVector p4_
 the 4-momentum More...
 
float q_
 the charge More...
 

Detailed Description

template<class A, class B>
class analysis::tools::Composite< A, B >

Definition at line 36 of file Composite.h.

Constructor & Destructor Documentation

template<class A , class B >
Composite::Composite ( )

default constructor

Definition at line 20 of file Composite.cc.

20  : Candidate()
21 {
22 }
Candidate()
default constructor
Definition: Candidate.cc:18
template<class A , class B >
Composite::Composite ( const A &  a,
const B b 
)

constructor from other objects

Definition at line 24 of file Composite.cc.

References analysis::tools::Composite< A, B >::a_, analysis::tools::Composite< A, B >::b_, analysis::tools::Candidate::p4_, and analysis::tools::Candidate::q_.

25 {
26  a_ = &a;
27  b_ = &b;
28  p4_ = a_->p4()+ b_->p4();
29  q_ = a_->q() + b_->q();
30 
31 }
float q_
the charge
Definition: Candidate.h:112
TLorentzVector p4_
the 4-momentum
Definition: Candidate.h:114
template<class A , class B >
Composite::~Composite ( )

destructor

Definition at line 33 of file Composite.cc.

34 {
35  // do anything here that needs to be done at desctruction time
36  // (e.g. close files, deallocate resources etc.)
37 }

Member Function Documentation

template<class A, class B>
float analysis::tools::Composite< A, B >::btag ( const std::string &  ) const
template<class A , class B >
float Composite::deltaEta ( ) const

Definition at line 52 of file Composite.cc.

References analysis::tools::Composite< A, B >::a_, and analysis::tools::Composite< A, B >::b_.

Referenced by analysis::tools::JetAnalyser::fillJetHistograms().

53 {
54  return fabs(a_->eta()-b_->eta());
55 }
template<class A , class B >
float Composite::deltaR ( ) const
template<class A, class B>
A* analysis::tools::Composite< A, B >::objecA ( )
template<class A, class B>
B* analysis::tools::Composite< A, B >::objecB ( )
template<class A, class B>
void analysis::tools::Composite< A, B >::objectA ( const A &  )
template<class A, class B>
void analysis::tools::Composite< A, B >::objectB ( const B )

Member Data Documentation

template<class A, class B>
A const* analysis::tools::Composite< A, B >::a_
private
template<class A, class B>
B const* analysis::tools::Composite< A, B >::b_
private

The documentation for this class was generated from the following files: