DESY Hbb Analysis Framework
Public Member Functions | Protected Attributes | Static Protected Attributes | List of all members
analysis::tools::PhysicsObjectTreeBase< Object > Class Template Reference

#include <PhysicsObjectTreeBase.h>

Inheritance diagram for analysis::tools::PhysicsObjectTreeBase< Object >:
analysis::tools::TreeBase analysis::tools::PhysicsObjectTree< Object >

Public Member Functions

 PhysicsObjectTreeBase ()
 
 PhysicsObjectTreeBase (TChain *tree, const std::string &name)
 
 ~PhysicsObjectTreeBase ()
 
- Public Member Functions inherited from analysis::tools::TreeBase
void event (const int &event)
 
TChain * tree ()
 
 TreeBase ()
 
 TreeBase (TChain *tree, const std::string &name)
 
 ~TreeBase ()
 

Protected Attributes

float e_ [max_]
 
float eta_ [max_]
 
int n_
 
float phi_ [max_]
 
float pt_ [max_]
 
float px_ [max_]
 
float py_ [max_]
 
float pz_ [max_]
 
int q_ [max_]
 
- Protected Attributes inherited from analysis::tools::TreeBase
std::vector< std::string > branches_
 
std::string className_
 
std::string inputTag_
 
std::string name_
 
TChain * tree_
 

Static Protected Attributes

static const int max_ = 1000
 

Detailed Description

template<typename Object>
class analysis::tools::PhysicsObjectTreeBase< Object >

Definition at line 53 of file PhysicsObjectTreeBase.h.

Constructor & Destructor Documentation

template<class Object >
PhysicsObjectTreeBase::PhysicsObjectTreeBase ( )
template<class Object >
PhysicsObjectTreeBase::PhysicsObjectTreeBase ( TChain *  tree,
const std::string &  name 
)

Definition at line 23 of file PhysicsObjectTreeBase.cc.

References analysis::tools::TreeBase::branches_, analysis::tools::PhysicsObjectTreeBase< Object >::e_, analysis::tools::PhysicsObjectTreeBase< Object >::eta_, analysis::tools::PhysicsObjectTreeBase< Object >::n_, analysis::tools::PhysicsObjectTreeBase< Object >::phi_, analysis::tools::PhysicsObjectTreeBase< Object >::pt_, analysis::tools::PhysicsObjectTreeBase< Object >::px_, analysis::tools::PhysicsObjectTreeBase< Object >::py_, analysis::tools::PhysicsObjectTreeBase< Object >::pz_, analysis::tools::PhysicsObjectTreeBase< Object >::q_, and analysis::tools::TreeBase::tree_.

23  : TreeBase(tree, name)
24 {
25  tree_ -> SetBranchAddress( "n" , &n_ );
26  tree_ -> SetBranchAddress( "pt" , pt_ );
27  tree_ -> SetBranchAddress( "eta", eta_ );
28  tree_ -> SetBranchAddress( "phi", phi_ );
29 // tree_ -> SetBranchAddress( "e" , e_ );
30  std::vector<std::string>::iterator it;
31  it = std::find(branches_.begin(),branches_.end(),"e") ; if ( it != branches_.end() ) tree_ -> SetBranchAddress( (*it).c_str() , e_ );
32  it = std::find(branches_.begin(),branches_.end(),"q") ; if ( it != branches_.end() ) tree_ -> SetBranchAddress( (*it).c_str() , q_ );
33  it = std::find(branches_.begin(),branches_.end(),"px"); if ( it != branches_.end() ) tree_ -> SetBranchAddress( (*it).c_str() , px_ );
34  it = std::find(branches_.begin(),branches_.end(),"py"); if ( it != branches_.end() ) tree_ -> SetBranchAddress( (*it).c_str() , py_ );
35  it = std::find(branches_.begin(),branches_.end(),"pz"); if ( it != branches_.end() ) tree_ -> SetBranchAddress( (*it).c_str() , pz_ );
36 
37 }
std::vector< std::string > branches_
Definition: TreeBase.h:58
template<class Object >
PhysicsObjectTreeBase::~PhysicsObjectTreeBase ( )

Member Data Documentation

template<typename Object>
float analysis::tools::PhysicsObjectTreeBase< Object >::e_[max_]
protected
template<typename Object>
float analysis::tools::PhysicsObjectTreeBase< Object >::eta_[max_]
protected
template<typename Object>
const int analysis::tools::PhysicsObjectTreeBase< Object >::max_ = 1000
staticprotected

Definition at line 61 of file PhysicsObjectTreeBase.h.

template<typename Object>
int analysis::tools::PhysicsObjectTreeBase< Object >::n_
protected
template<typename Object>
float analysis::tools::PhysicsObjectTreeBase< Object >::phi_[max_]
protected
template<typename Object>
float analysis::tools::PhysicsObjectTreeBase< Object >::pt_[max_]
protected
template<typename Object>
float analysis::tools::PhysicsObjectTreeBase< Object >::px_[max_]
protected
template<typename Object>
float analysis::tools::PhysicsObjectTreeBase< Object >::py_[max_]
protected
template<typename Object>
float analysis::tools::PhysicsObjectTreeBase< Object >::pz_[max_]
protected
template<typename Object>
int analysis::tools::PhysicsObjectTreeBase< Object >::q_[max_]
protected

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