00001
00003
00004
00005
00007
00008 #include <iostream>
00009 #include <string>
00010 #include <iostream>
00011 #include <iomanip>
00012 #include <fstream>
00013 #include <sstream>
00014
00015 #include <cmath>
00016
00017 #include "tmb_tree/TMBMet.hpp"
00018
00019 using namespace std;
00020
00021 ClassImp(TMBMet)
00022
00023
00024
00025
00026 TMBMet::TMBMet():
00027 _Zvertex(999.)
00028 {};
00029
00030 TMBMet::~TMBMet() {}
00031
00032
00033 void TMBMet::print(std::ostream &os) const
00034 {
00035 print_vertex (os);
00036 print_MET (os);
00037 print_METnoeta(os);
00038 print_METC (os);
00039 print_METD (os);
00040 print_META (os);
00041 print_METB (os);
00042 os << "Size of MetQualInfo Vector : " << _metqualinfos.size() << endl;
00043 print_MetQualInfo(os);
00044 }
00045
00046 const std::vector<metid::BMetQualInfo>* TMBMet::getMetQualInfo() const
00047 {
00048 return &_metqualinfos;
00049 }
00050
00051 const metid::BMetQualInfo* TMBMet::getMetQualInfo(const std::string& algotype) const
00052 {
00053 const metid::BMetQualInfo* result = NULL;
00054
00055 for (vector<metid::BMetQualInfo>::size_type i = 0; i != _metqualinfos.size(); ++i) {
00056 string thisalgo = _metqualinfos[i].getJetAlgo();
00057 if ( strcmp(algotype.c_str(),thisalgo.c_str()) == 0 ) {
00058 result = &(_metqualinfos[i]);
00059 return result;
00060 }
00061 }
00062
00063 return result;
00064 }
00065
00066 void TMBMet::print_MetQualInfo(std::ostream& os) const
00067 {
00068 for (vector<metid::BMetQualInfo>::size_type i = 0; i != _metqualinfos.size(); ++i)
00069 _metqualinfos[i].Print(os);
00070 }
00071
00072 void TMBMet::print_MetQualInfo(std::ostream& os, const std::string& algotype) const
00073 {
00074 for (vector<metid::BMetQualInfo>::size_type i = 0; i != _metqualinfos.size(); ++i) {
00075 string thisalgo = _metqualinfos[i].getJetAlgo();
00076 if ( strcmp(algotype.c_str(),thisalgo.c_str()) == 0 ) {
00077 _metqualinfos[i].Print(os);
00078 }
00079 }
00080 }
00081
00082
00083
00084
00085
00086 float TMBMet::getScalarET() const {return _met.getset();}
00087 void TMBMet::getMExy(float &ETx, float &ETy) const {ETx = _met.getmex(); ETy = _met.getmey();}
00088 float TMBMet::get_MET() const {return _met.getmet();}
00089
00090 float TMBMet::getScalarET_noeta() const {return _metnoeta.getset();}
00091 void TMBMet::getMExy_noeta(float &ETx_noeta, float &ETy_noeta) const {ETx_noeta = _metnoeta.getmex(); ETy_noeta = _met.getmey();}
00092 float TMBMet::getMET_noeta() const {return _metnoeta.getmet();}
00093
00094 void TMBMet::getMETC (float &SETC, float &METCx, float &METCy, float &METC) const
00095 {
00096 SETC = _metC.getset();
00097 METCx = _metC.getmex();
00098 METCy = _metC.getmey();
00099 METC = _metC.getmet();
00100 }
00101
00102 void TMBMet::getMETD (float &SETD, float &METDx, float &METDy, float &METD) const
00103 {
00104 SETD = _metD.getset();
00105 METDx = _metD.getmex();
00106 METDy = _metD.getmey();
00107 METD = _metD.getmet();
00108 }
00109
00110 void TMBMet::getVETD (float &SETD, float &VETDx, float &VETDy, float &METD) const
00111 {
00112 SETD = _metD.getset();
00113 VETDx = -1. * _metD.getmex();
00114 VETDy = -1. * _metD.getmey();
00115 METD = _metD.getmet();
00116 }
00117
00118 void TMBMet::getVETC (float &SETC, float &VETCx, float &VETCy, float &METC) const
00119 {
00120 SETC = _metC.getset();
00121 VETCx = -1. * _metC.getmex();
00122 VETCy = -1. * _metC.getmey();
00123 METC = _metC.getmet();
00124 }
00125
00126