fastjet 2.4.5
|
00001 #ifndef D0RunIIconeJets_HepEntity_class 00002 #define D0RunIIconeJets_HepEntity_class 00003 00004 #include "inline_maths.h" 00005 00006 #include <fastjet/internal/base.hh> 00007 00008 FASTJET_BEGIN_NAMESPACE 00009 00010 namespace d0{ 00011 00012 //Author: Lars Sonnenschein 28/Mar/2007 00013 //This is an example class fulfilling the minimal requirements needed by the 00014 //D0 RunII cone jet algorithm implementation, which is an inlined template class 00015 00016 class HepEntity { 00017 00018 public: 00019 00020 HepEntity() { 00021 E=0.; 00022 px=0.; 00023 py=0.; 00024 pz=0.; 00025 index = -1; 00026 return; 00027 } 00028 00029 00030 HepEntity(double E_in, double px_in, double py_in, double pz_in, int index_in = -1) : 00031 E(E_in), px(px_in), py(py_in), pz(pz_in), index(index_in) { 00032 return; 00033 } 00034 00035 00036 HepEntity(const HepEntity& in) : E(in.E), px(in.px), py(in.py), pz(in.pz), index(in.index) { 00037 return; 00038 } 00039 00040 00041 inline double y() const { 00042 return inline_maths::y(E,pz); 00043 } 00044 00045 00046 inline double phi() const { 00047 return inline_maths::phi(px,py); 00048 } 00049 00050 00051 inline double pT() const { 00052 return sqrt(inline_maths::sqr(px)+inline_maths::sqr(py)); 00053 } 00054 00055 00056 inline void p4vec(float* p) const { 00057 p[0] = px; 00058 p[1] = py; 00059 p[2] = pz; 00060 p[3] = E; 00061 return; 00062 } 00063 00064 inline void Add(const HepEntity el) { 00065 E += el.E; 00066 px += el.px; 00067 py += el.py; 00068 pz += el.pz; 00069 return; 00070 } 00071 00072 inline void Fill(double E_in, double px_in, double py_in, double pz_in, int index_in = -1) { 00073 E = E_in; 00074 px = px_in; 00075 py = py_in; 00076 pz = pz_in; 00077 index = index_in; 00078 return; 00079 } 00080 00081 00082 double E; 00083 double px; 00084 double py; 00085 double pz; 00086 int index; 00087 00088 private: 00089 00090 00091 00092 }; 00093 //end of class HepEntity; 00094 00095 00096 } // namespace d0 00097 00098 FASTJET_END_NAMESPACE 00099 00100 #endif