00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013 #include "NtupleReader/MyVBFCandidate.h"
00014
00015
00016
00017
00018
00019
00020 using namespace std;
00021
00022
00023
00024
00025
00026
00027
00028
00029 void MyVBFCandidate::init( MyParticlePair tagjet_pair,
00030 MyParticlePair lepton_pair,
00031 const MyMissingEt & missing_et) {
00032
00033 has_tagjets=true;
00034 has_leptons=true;
00035 cut_map=0;
00036 m_tagjet_pair = tagjet_pair;
00037 m_lepton_pair = lepton_pair;
00038 m_missing_et = missing_et;
00039
00040 }
00041
00042
00043
00044
00045
00046
00047
00048 void MyVBFCandidate::destruct(void) {
00049
00050 return;
00051
00052 }
00053
00054
00055
00056
00057
00058
00059
00060 void
00061 MyVBFCandidate::set_has_tagjet_pair(bool tagjet_pair_exists) {
00062
00063 has_tagjets = tagjet_pair_exists;
00064 return ;
00065
00066 }
00067
00068
00069
00070
00071
00072
00073
00074 void
00075 MyVBFCandidate::set_has_lepton_pair(bool lepton_pair_exists) {
00076
00077 has_leptons = lepton_pair_exists;
00078 return ;
00079
00080 }
00081
00082
00083
00084
00085
00086
00087
00088 bool
00089 MyVBFCandidate::has_tagjet_pair(void) const {
00090
00091 return has_tagjets;
00092
00093 }
00094
00095
00096
00097
00098
00099
00100
00101 bool
00102 MyVBFCandidate::has_lepton_pair(void) const {
00103
00104 return has_leptons;
00105
00106 }
00107
00108
00109
00110
00111
00112
00113
00114 void
00115 MyVBFCandidate::set_cut_map(long bitmap){
00116
00117 cut_map = bitmap;
00118 return ;
00119
00120 }
00121
00122
00123
00124
00125
00126
00127
00128 long
00129 MyVBFCandidate::get_cut_map(void) const {
00130
00131 return cut_map;
00132
00133 }
00134
00135
00136
00137
00138
00139
00140
00141 MyParticlePair
00142 MyVBFCandidate::get_tagjet_pair(void) const {
00143
00144 return m_tagjet_pair;
00145
00146 }
00147
00148
00149
00150
00151
00152
00153
00154 MyParticlePair
00155 MyVBFCandidate::get_lepton_pair(void) const {
00156
00157 return m_lepton_pair;
00158
00159 }
00160
00161
00162
00163
00164
00165
00166
00167 MyMissingEt
00168 MyVBFCandidate::get_missinget(void) const {
00169
00170 return m_missing_et;
00171
00172 }
00173
00174
00175
00176
00177
00178
00179
00180 MyCollinearApproximation
00181 MyVBFCandidate::get_collinear_approximation(void)
00182 const {MyCollinearApproximation colap;
00183 if ( has_leptons ) {
00184 colap = MyCollinearApproximation(m_lepton_pair.get_particle1(),
00185 m_lepton_pair.get_particle2(),
00186 m_missing_et.tlv());
00187 }
00188
00189 return colap;
00190
00191 }
00192
00193
00194
00195
00196
00197
00198
00199 TLorentzVector
00200 MyVBFCandidate::get_pt_sum(void) const {
00201
00202 TLorentzVector tmp_tlv;
00203 tmp_tlv = m_lepton_pair.get_particle1()->tlv();
00204 tmp_tlv += m_lepton_pair.get_particle2()->tlv();
00205 tmp_tlv += m_tagjet_pair.get_particle1()->tlv();
00206 tmp_tlv += m_tagjet_pair.get_particle2()->tlv();
00207 tmp_tlv += m_missing_et.tlv();
00208
00209 return tmp_tlv;
00210
00211 }
00212
00213
00214
00215
00216
00217
00218
00219 double
00220 MyVBFCandidate::get_lj_DeltaEta1(void) const {
00221 if ( !has_tagjets || !has_leptons ){
00222 cerr<<"Error in MyVBFCandidate::get_lj_AbsDeltaEta1: "<<endl
00223 <<"You can not call this function "
00224 <<"if the candidate has no tagjet or lepton pair!"<<endl;
00225 return -9999.;
00226 }
00227
00228 double jet1_eta = m_tagjet_pair.get_particle1()->tlv().Eta();
00229 double jet2_eta = m_tagjet_pair.get_particle2()->tlv().Eta();
00230 double lepton1_eta = m_lepton_pair.get_particle1()->tlv().Eta();
00231 double lepton2_eta = m_lepton_pair.get_particle2()->tlv().Eta();
00232
00233 return ( TMath::Min(lepton1_eta, lepton2_eta) - TMath::Min(jet1_eta,jet2_eta) );
00234
00235 }
00236
00237
00238
00239
00240
00241
00242
00243 double
00244 MyVBFCandidate::get_lj_DeltaEta2(void) const {
00245 if ( !has_tagjets || !has_leptons ){
00246 cerr<<"Error in MyVBFCandidate::get_lj_AbsDeltaEta2: "<<endl
00247 <<"You can not call this function "
00248 <<"if the candidate has no tagjet or lepton pair!"<<endl;
00249 return -9999.;
00250 }
00251
00252 double jet1_eta = m_tagjet_pair.get_particle1()->tlv().Eta();
00253 double jet2_eta = m_tagjet_pair.get_particle2()->tlv().Eta();
00254 double lepton1_eta = m_lepton_pair.get_particle1()->tlv().Eta();
00255 double lepton2_eta = m_lepton_pair.get_particle2()->tlv().Eta();
00256
00257 return ( TMath::Max(jet1_eta,jet2_eta) - TMath::Max(lepton1_eta, lepton2_eta) );
00258
00259 }
00260
00261
00262
00263
00264
00265
00266
00267 double
00268 MyVBFCandidate::get_lj_DeltaEtaMin(void) const {
00269
00270 return TMath::Min(get_lj_DeltaEta1(),get_lj_DeltaEta2());
00271
00272 }
00273
00274
00275
00276
00277
00278
00279
00280 double
00281 MyVBFCandidate::get_lj_DeltaEtaMax(void) const {
00282
00283 return TMath::Max(get_lj_DeltaEta1(),get_lj_DeltaEta2());
00284
00285 }
00286
00287
00288
00289
00290
00291
00292
00293 void
00294 MyVBFCandidate::Print(string option) {
00295
00296 cout << "VBFCandidate: " << endl;
00297 m_tagjet_pair.Print(option);
00298 m_lepton_pair.Print(option);
00299 if(option=="v"){
00300 m_missing_et.Print(option);
00301 }
00302
00303 }
00304
00305
00306
00307
00308
00309
00310
00311
00312
00313
00314
00315
00316
00317
00318
00319
00320
00321
00322
00323
00324
00325
00326
00327
00328
00329
00330
00331
00332
00333
00334
00335
00336
00337
00338
00339
00340
00341
00342
00343
00344
00345
00346
00347
00348
00349
00350
00351
00352
00353