00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015 inline void MyMissingEt::init(TString name,
00016 const double & met_x,
00017 const double & met_y,
00018 const double & met_sum
00019 ) {
00020
00021 m_name = name;
00022 m_met_x = met_x;
00023 m_met_y = met_y;
00024 m_met_sum = met_sum;
00025 m_met = TMath::Sqrt( met_x*met_x + met_y*met_y );
00026
00027 m_met_tlv.SetPxPyPzE(met_x, met_y, 0., m_met);
00028
00029 return;
00030 }
00031
00032
00033
00034
00035
00036
00037
00038 inline TString MyMissingEt::name(void) const {
00039
00040 return m_name;
00041 }
00042
00043
00044
00045
00046
00047
00048
00049 inline double MyMissingEt::met_x(void) const {
00050
00051 return m_met_x;
00052 }
00053
00054
00055
00056
00057
00058
00059
00060 inline double MyMissingEt::met_y(void) const {
00061
00062 return m_met_y;
00063 }
00064
00065
00066
00067
00068
00069
00070
00071 inline double MyMissingEt::met_sum(void) const {
00072
00073 return m_met_sum;
00074 }
00075
00076
00077
00078
00079
00080
00081
00082 inline double MyMissingEt::met(void) const {
00083
00084 return m_met;
00085 }
00086
00087
00088
00089
00090
00091
00092
00093 inline TLorentzVector MyMissingEt::tlv(void) const {
00094
00095 return m_met_tlv;
00096 }
00097
00098
00099
00100
00101
00102
00103
00104 inline MyMissingEt
00105 MyMissingEt::add(TString name, MyMissingEt met1) const {
00106
00107 MyMissingEt met_add( name,
00108 this->met_x() + met1.met_x(),
00109 this->met_y() + met1.met_y(),
00110 this->met_sum() + met1.met_sum());
00111
00112 return met_add;
00113 }
00114
00115
00116
00117
00118
00119
00120 inline MyMissingEt
00121 MyMissingEt::add(TString name, MyMissingEt met1, MyMissingEt met2) const {
00122
00123 MyMissingEt met_add1 = this->add(name, met1);
00124 MyMissingEt met_add2 = met_add1.add(name, met2);
00125
00126
00127
00128
00129
00130
00131 return met_add2;
00132 }
00133
00134
00135
00136
00137
00138
00139
00140
00141 inline void MyMissingEt::set_met_x(const double & in_met_x) {
00142
00143 init(m_name, in_met_x, m_met_y, m_met_sum);
00144 return;
00145
00146 }
00147
00148
00149
00150
00151
00152
00153
00154 inline void MyMissingEt::set_met_y(const double & in_met_y) {
00155
00156 init(m_name, m_met_x, in_met_y, m_met_sum);
00157 return;
00158
00159 }
00160
00161
00162
00163
00164
00165
00166
00167 inline void MyMissingEt::set_met_sum(const double & in_met_sum) {
00168
00169 init(m_name, m_met_x, m_met_y, in_met_sum);
00170 return;
00171
00172 }
00173
00174
00175
00176
00177
00178
00179
00180 inline void MyMissingEt::Print(std::string option) {
00181
00182 if(option!="v"){
00183 std::cout << " met, met_x, met_y, name: "
00184 << Form("%.2f, %.2f, %.2f, \t" + this->name(),
00185 this->met(),
00186 this->met_x(),
00187 this->met_y())
00188 << std::endl;
00189 }
00190 else {
00191 std::cout << " met, x, y, sum, name: "
00192 << Form("%.2f, %.2f, %.2f, %.2f, \t" + this->name(),
00193 this->met(),
00194 this->met_x(),
00195 this->met_y(),
00196 this->met_sum())
00197 << std::endl;
00198
00199 }
00200
00201 return;
00202 }