DESY Hbb Analysis Framework
Composite.cc
Go to the documentation of this file.
1 // system include files
2 //
3 // user include files
7 
8 
9 //
10 // class declaration
11 //
12 
13 using namespace analysis;
14 using namespace analysis::tools;
15 
16 //
17 // constructors and destructor
18 //
19 template <class A, class B>
21 {
22 }
23 template <class A, class B>
24 Composite<A,B>::Composite(const A & a, const B & b)
25 {
26  a_ = &a;
27  b_ = &b;
28  p4_ = a_->p4()+ b_->p4();
29  q_ = a_->q() + b_->q();
30 
31 }
32 template <class A, class B>
34 {
35  // do anything here that needs to be done at desctruction time
36  // (e.g. close files, deallocate resources etc.)
37 }
38 
39 
40 //
41 // member functions
42 //
43 
44 // Gets
45 template <class A, class B>
47 {
48  return a_->deltaR(*b_);
49 }
50 
51 template <class A, class B>
53 {
54  return fabs(a_->eta()-b_->eta());
55 }
56 
57 
58 // ------------ methods ------------
59 
60 
61 template class Composite<Candidate,Candidate>;
62 template class Composite<Jet,Jet>;
63 template class Composite<Jet,Candidate>;
64 template class Composite<Muon,Muon>;
65 
Composite()
default constructor
Definition: Composite.cc:20
float deltaR() const
Definition: Composite.cc:46
float deltaEta() const
Definition: Composite.cc:52
float q_
the charge
Definition: Candidate.h:112
TLorentzVector p4_
the 4-momentum
Definition: Candidate.h:114
float B
Definition: PlotsCompare.cc:19