Go to the documentation of this file.00001 #include "ForIA/L2J7Jet.hh"
00002
00003 #include <cmath>
00004
00005 namespace ForIA {
00006
00007 L2J7Jet::L2J7Jet(): IFourMomentum(), m_haveTheta(false), m_haveET(false), m_havePT(false),
00008 m_gotpx(false), m_gotpy(false), m_gotpz(false){
00009
00010 }
00011
00012 double L2J7Jet::eta()const{
00013 return m_eta;
00014 }
00015
00016 double L2J7Jet::theta()const{
00017 if(m_haveTheta) return m_theta;
00018
00019 m_theta = 2. * atan(exp(-eta()));
00020 m_haveTheta = true;
00021 return m_theta;
00022 }
00023
00024 double L2J7Jet::phi()const{
00025 return m_phi;
00026 }
00027
00028 double L2J7Jet::E() const{
00029 return m_e;
00030 }
00031
00032 double L2J7Jet::ET()const{
00033
00034 if(m_haveET) return m_et;
00035
00036 m_et = E() * fabs(sin(theta()));
00037
00038 m_haveET = true;
00039 return m_et;
00040 }
00041
00042 double L2J7Jet::mass()const{
00043 return m_mass;
00044 }
00045
00046 double L2J7Jet::px()const{
00047 if(m_gotpx) return m_px;
00048 m_px = PT() * sin(phi());
00049 m_gotpx = true;
00050 return m_px;
00051 }
00052
00054 double L2J7Jet::py()const{
00055 if(m_gotpy) return m_py;
00056 m_py = PT() * cos(phi());
00057 m_gotpy = true;
00058 return m_py;
00059 }
00060
00062 double L2J7Jet::pz()const{
00063 if(m_gotpz) return m_pz;
00064 double tanp = tan(theta());
00065
00066 if(fabs(tanp) < 1.e-12){
00067 m_pz = sqrt(E()*E() - mass()*mass());
00068 }else{
00069 m_pz = PT() / tanp;
00070 }
00071
00072 m_gotpz = true;
00073 return m_pz;
00074 }
00075
00077
00078 double L2J7Jet::PT()const{
00079 if(m_havePT) return m_pt;
00080
00081 double p2 = E() * E() - mass() * mass();
00082 m_pt = sqrt(p2) * fabs(sin(theta()));
00083
00084 m_havePT = true;
00085 return m_pt;
00086 }
00087
00088 double L2J7Jet::EHad()const{
00089 return m_eHad;
00090 }
00091
00092 double L2J7Jet::EEM()const{
00093 return m_eEM;
00094 }
00095
00096 unsigned int L2J7Jet::L1ROIWord()const{
00097 return m_l1Word;
00098 }
00099
00100 }
00101
00102