00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013 #include "TObjString.h"
00014
00015 #include "MyHtoWWAnalysis/MyHtoWWAnalysis.h"
00016 #include "NtupleReader/MyPileUpExtractedEvent.h"
00017
00018
00019
00020
00021
00022 using namespace std;
00023
00024
00025
00026
00027
00028
00029 void MyHtoWWAnalysis::init(void) {
00030
00031 filename = "testfile";
00032 outputpath = "";
00033 addon = "";
00034 m_decay_mode = "";
00035 m_cutfile = "";
00036 m_cutstring = "";
00037 overwrite = true;
00038
00039 return;
00040
00041 }
00042
00043
00044
00045
00046
00047
00048
00049 void MyHtoWWAnalysis::destruct(void) {
00050
00051 return;
00052
00053 }
00054
00055
00056
00057
00058
00059
00060
00061 void MyHtoWWAnalysis::initialize(void) {
00062
00063
00064
00065
00066
00067 if(m_cutfile==""){
00068 m_cutfile = "cut_values.txt";
00069 }
00070
00071 cout << "\ncutval file: " << m_cutfile << endl;
00072
00073 MyTextFileReader m_reader(m_cutfile);
00074
00075 if(m_decay_mode==""){
00076 TString decay_mode = m_reader.retrieve_from_file<TString>("decay_mode");
00077 m_decay_mode = decay_mode;
00078 }
00079
00080 cout << "Decay mode: " << m_decay_mode << endl;
00081
00082 if ( m_decay_mode!="ee" && m_decay_mode!="mumu" &&
00083 m_decay_mode!="emu" && m_decay_mode!="ll" ){
00084
00085 cerr << "ERROR: Unknown decay mode!" << endl;
00086 exit(1);
00087 }
00088
00089
00090 Bool_t truth_ana_flag = m_reader.retrieve_from_file<Bool_t>("truth_ana_flag");
00091 m_truth_ana_flag = truth_ana_flag;
00092
00093 cout << "Truth ana flag: " << m_truth_ana_flag << endl;
00094
00095 TString file_addon = m_reader.retrieve_from_file<TString>("filename_addon");
00096
00097 if(file_addon!="none"){
00098 if(addon==""){
00099 addon = file_addon;
00100 }
00101 else{
00102 addon = file_addon + "_" + addon;
00103 }
00104 }
00105
00106 cout << "addon: " << addon << endl;
00107
00108 TObjArray* TOarray = filename.Tokenize("_");
00109 TString filename_cleaned = "";
00110
00111 for(int k=0; k<TOarray->GetEntries(); k++){
00112 TString string = ((TObjString*)TOarray->At(k))->GetString();
00113 if(!string.Contains("tid")){
00114 if(k!=0){
00115 filename_cleaned += "_";
00116 }
00117 filename_cleaned += string;
00118 }
00119 }
00120
00121
00122 TString output_filename = filename_cleaned.ReplaceAll(".aan",".selection");
00123
00124
00125 output_filename =
00126 output_filename.Insert( output_filename.Index(".root"), "_"+m_decay_mode);
00127
00128 if(truth_ana_flag){
00129 output_filename =
00130 output_filename.Insert( output_filename.Index(".root"), "_truthvectors");
00131 }
00132
00133 if(addon!=""){
00134 output_filename =
00135 output_filename.Insert( output_filename.Index(".root"), "_"+addon);
00136 }
00137
00138 if(outputpath!="" && !outputpath.EndsWith("/")){
00139 outputpath += "/";
00140 }
00141
00142 cout << "outputfile: " << outputpath + output_filename << endl;
00143
00144
00145 TString file_openstring = "CREATE";
00146 if(overwrite){
00147 file_openstring = "RE" + file_openstring;
00148 }
00149
00150 m_tfile = new TFile( outputpath + output_filename, file_openstring);
00151
00152
00153
00154 if (!m_tfile->IsOpen()){
00155 cerr << endl
00156 << "ERROR: file exists already " << endl
00157 << " (" << outputpath + output_filename << ")" << endl
00158 << endl;
00159 exit(1);
00160 }
00161
00162
00163
00164
00165
00166
00167 MyDatasetInfo &m_dataset_info = MyDatasetInfo::Instance();
00168
00169
00170 TTree *new_aodfilenames_tree = m_dataset_info.get_tree("aod_file_collection")->CloneTree();
00171 TTree *new_aodcontainer_tree = m_dataset_info.get_tree("aod_container_keys")->CloneTree();
00172
00173 m_AtlFastFlag = m_dataset_info.get_AtlFastFlag();
00174
00175 m_1mmFix_flag = false;
00176 TBranch* b_1mmFix_flag = new_aodcontainer_tree->GetBranch("doAODFix1mm");
00177 b_1mmFix_flag->SetAddress(&m_1mmFix_flag);
00178 b_1mmFix_flag->GetEntry(0);
00179
00180 m_trackjet_flag = m_dataset_info.get_trackjet_flag();
00181
00182
00183
00184
00185 cout << "m_AtlFastFlag: " << m_AtlFastFlag << endl;
00186 cout << "m_1mmFix_flag: " << m_1mmFix_flag << endl;
00187 cout << "m_trackjet_flag: " << m_trackjet_flag << endl;
00188
00189 m_generator = m_dataset_info.get_generator();
00190 cout << "\nGenerator: " << m_generator << endl;
00191
00192 m_release = m_dataset_info.get_release();
00193
00194
00195
00196
00197
00198 nb_cuts = 0;
00199
00200 for(int k=0; k<nb_cuts_max; k++){
00201 cuts[k] = "";
00202 }
00203
00204 m_reader.fill_cutvalue_map("cut_order");
00205
00206 cuts[(int)(m_reader.get_cutvalue("trigger"))] = "trigger";
00207 cuts[(int)(m_reader.get_cutvalue("nb_objects"))] = "nb_objects";
00208 cuts[(int)(m_reader.get_cutvalue("nb_leptons"))] = "nb_leptons";
00209 cuts[(int)(m_reader.get_cutvalue("nb_jets"))] = "nb_jets";
00210 cuts[(int)(m_reader.get_cutvalue("bjet_veto"))] = "bjet_veto";
00211 cuts[(int)(m_reader.get_cutvalue("tagjet_no_bjet"))] = "tagjet_no_bjet";
00212 cuts[(int)(m_reader.get_cutvalue("etmiss"))] = "etmiss";
00213 cuts[(int)(m_reader.get_cutvalue("lepton_pt"))] = "lepton_pt";
00214 cuts[(int)(m_reader.get_cutvalue("leptons_charge"))] = "leptons_charge";
00215 cuts[(int)(m_reader.get_cutvalue("leptons_dphi"))] = "leptons_dphi";
00216 cuts[(int)(m_reader.get_cutvalue("leptons_dr"))] = "leptons_dr";
00217 cuts[(int)(m_reader.get_cutvalue("leptons_theta"))] = "leptons_theta";
00218 cuts[(int)(m_reader.get_cutvalue("leptons_mass"))] = "leptons_mass";
00219 cuts[(int)(m_reader.get_cutvalue("leptons_pt"))] = "leptons_pt";
00220 cuts[(int)(m_reader.get_cutvalue("tau_veto"))] = "tau_veto";
00221 cuts[(int)(m_reader.get_cutvalue("jets_pt"))] = "jets_pt";
00222 cuts[(int)(m_reader.get_cutvalue("jets_hemisphere"))] = "jets_hemisphere";
00223 cuts[(int)(m_reader.get_cutvalue("jets_deta"))] = "jets_deta";
00224 cuts[(int)(m_reader.get_cutvalue("jets_dphi"))] = "jets_dphi";
00225 cuts[(int)(m_reader.get_cutvalue("jets_mass"))] = "jets_mass";
00226 cuts[(int)(m_reader.get_cutvalue("central_jet_veto"))] = "central_jet_veto";
00227 cuts[(int)(m_reader.get_cutvalue("leptons_jets_deta"))] = "leptons_jets_deta";
00228 cuts[(int)(m_reader.get_cutvalue("transverse_mass"))] = "transverse_mass";
00229 cuts[(int)(m_reader.get_cutvalue("pt_balance"))] = "pt_balance";
00230
00231 for(int k=1; k<nb_cuts_max; k++){
00232 if((cuts[k])!=""){
00233 nb_cuts++;
00234 }
00235 if( ((cuts[k])!="") && (nb_cuts!=k) ){
00236 cerr << "ERROR: check cut settings!" << endl;
00237 nb_cuts = 0;
00238 exit(1);
00239 break;
00240 }
00241 }
00242
00243 cout << "total number of cuts: " << nb_cuts <<endl;
00244
00245
00246
00247
00248
00249
00250 m_cut_order_tree = new TTree("cut_order","cut_order");
00251
00252 string str_helper;
00253 char char_helper[50] = "";
00254
00255 for(int k=1; k<nb_cuts+1; k++){
00256
00257 str_helper=cuts[k];
00258 strcpy(char_helper,str_helper.c_str());
00259
00260 m_cut_order_tree->Branch(Form("cut_%2.2i",k), &char_helper, Form("cut_%2.2i/C",k));
00261 m_cut_order_tree->Fill();
00262 }
00263
00264 m_cut_order_tree->Branch("nb_cuts", &nb_cuts, "nb_cuts/I");
00265 m_cut_order_tree->Fill();
00266
00267
00268
00269
00270
00271
00272
00273 m_reader.fill_cutvalue_map("cutvalues_ll");
00274
00275 m_cutvalue_etmiss_min = get_cutvalue("cutvalue_etmiss_min", &m_reader);
00276 m_cutvalue_bjet_weight_max = get_cutvalue("cutvalue_bjet_weight_max", &m_reader);
00277 m_cutvalue_lepton1_pt_min = get_cutvalue("cutvalue_lepton1_pt_min", &m_reader);
00278 m_cutvalue_lepton2_pt_min = get_cutvalue("cutvalue_lepton2_pt_min", &m_reader);
00279 m_cutvalue_lepton_pt_max = get_cutvalue("cutvalue_lepton_pt_max", &m_reader);
00280 m_cutvalue_leptons_dphi_max = get_cutvalue("cutvalue_leptons_dphi_max", &m_reader);
00281 m_cutvalue_leptons_dr_max = get_cutvalue("cutvalue_leptons_dr_max", &m_reader);
00282 m_cutvalue_leptons_costheta_min = get_cutvalue("cutvalue_leptons_costheta_min", &m_reader);
00283 m_cutvalue_leptons_mass_max = get_cutvalue("cutvalue_leptons_mass_max", &m_reader);
00284 m_cutvalue_leptons_pt_max = get_cutvalue("cutvalue_leptons_pt_max", &m_reader);
00285
00286 m_cutvalue_jet_eta_max = get_cutvalue("cutvalue_jet_eta_max", &m_reader);
00287 m_cutvalue_jet_pt_min = get_cutvalue("cutvalue_jet_pt_min", &m_reader);
00288 m_cutvalue_jet_pt_max = get_cutvalue("cutvalue_jet_pt_max", &m_reader);
00289 m_cutvalue_trackjet_pt_min = get_cutvalue("cutvalue_trackjet_pt_min", &m_reader);
00290 m_cutvalue_trackjet_pt_max = get_cutvalue("cutvalue_trackjet_pt_max", &m_reader);
00291 m_cutvalue_jet1_pt_min = get_cutvalue("cutvalue_jet1_pt_min", &m_reader);
00292 m_cutvalue_jet2_pt_min = get_cutvalue("cutvalue_jet2_pt_min", &m_reader);
00293 m_cutvalue_jets_absdeta_min = get_cutvalue("cutvalue_jets_absdeta_min", &m_reader);
00294 m_cutvalue_jets_absdphi_max = get_cutvalue("cutvalue_jets_absdphi_max", &m_reader);
00295 m_cutvalue_jets_mass_min = get_cutvalue("cutvalue_jets_mass_min", &m_reader);
00296 m_cutvalue_jets_mass_max = get_cutvalue("cutvalue_jets_mass_max", &m_reader);
00297 m_cutvalue_cjet_eta_max = get_cutvalue("cutvalue_cjet_eta_max", &m_reader);
00298 m_switch_cjet_between_fwdjets = get_cutvalue("switch_cjet_between_fwdjets", &m_reader);
00299 m_flag_cjv_track_jets = (int)get_cutvalue("flag_cjv_track_jets", &m_reader);
00300 m_flag_cjv_stdjet_corrpt = (int)get_cutvalue("flag_cjv_stdjet_corrpt", &m_reader);
00301 m_flag_cjv_trkstdjet_match = (int)get_cutvalue("flag_cjv_trkstdjet_match", &m_reader);
00302 m_cutvalue_cjv_stdjet_pt_min = get_cutvalue("cutvalue_cjv_stdjet_pt_min", &m_reader);
00303 m_cutvalue_cjv_trkjet_pt_min = get_cutvalue("cutvalue_cjv_trkjet_pt_min", &m_reader);
00304 m_cutvalue_cjv_ptratio_min = get_cutvalue("cutvalue_cjv_ptratio_min", &m_reader);
00305 m_cutvalue_cjv_cmsptratio_min = get_cutvalue("cutvalue_cjv_cmsptratio_min", &m_reader);
00306 m_cutvalue_mtllnu_min = get_cutvalue("cutvalue_mtllnu_min", &m_reader);
00307 m_cutvalue_pt_balance_max = get_cutvalue("cutvalue_pt_balance_max", &m_reader);
00308
00309 m_cutvalue_x1_max = get_cutvalue("cutvalue_x1_max", &m_reader);
00310 m_cutvalue_x2_max = get_cutvalue("cutvalue_x2_max", &m_reader);
00311 m_cutvalue_tautau_Z_dm_min = get_cutvalue("cutvalue_tautau_Z_dm_min", &m_reader);
00312
00313 m_cutvalue_mt_min = get_cutvalue("cutvalue_mt_min", &m_reader);
00314 m_cutvalue_mt_max = get_cutvalue("cutvalue_mt_max", &m_reader);
00315
00316 m_cutvalue_jet_match_dR = get_cutvalue("cutvalue_jet_match_dR", &m_reader);
00317
00318 m_cutvalue_nb_vertices_min = (int)get_cutvalue("cutvalue_nb_vertices_min", &m_reader);
00319 m_cutvalue_nb_vertices_max = (int)get_cutvalue("cutvalue_nb_vertices_max", &m_reader);
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
00354
00355
00356
00357
00358
00359
00360
00361 m_config_tree = new TTree("analysis_config","analysis_config");
00362
00363 m_config_tree->Branch("cutvalue_etmiss_min", &m_cutvalue_etmiss_min, "cutvalue_etmiss_min/D");
00364 m_config_tree->Branch("cutvalue_bjet_weight_max", &m_cutvalue_bjet_weight_max, "cutvalue_bjet_weight_max/D");
00365
00366 m_config_tree->Branch("cutvalue_lepton1_pt_min", &m_cutvalue_lepton1_pt_min, "cutvalue_lepton1_pt_min/D");
00367 m_config_tree->Branch("cutvalue_lepton2_pt_min", &m_cutvalue_lepton2_pt_min, "cutvalue_lepton2_pt_min/D");
00368 m_config_tree->Branch("cutvalue_lepton_pt_max", &m_cutvalue_lepton_pt_max, "cutvalue_lepton_pt_max/D");
00369 m_config_tree->Branch("cutvalue_leptons_dphi_max", &m_cutvalue_leptons_dphi_max, "cutvalue_leptons_dphi_max/D");
00370 m_config_tree->Branch("cutvalue_leptons_dr_max", &m_cutvalue_leptons_dr_max, "cutvalue_leptons_dr_max/D");
00371 m_config_tree->Branch("cutvalue_leptons_costheta_min", &m_cutvalue_leptons_costheta_min, "cutvalue_leptons_costheta_min/D");
00372 m_config_tree->Branch("cutvalue_leptons_mass_max", &m_cutvalue_leptons_mass_max, "cutvalue_leptons_mass_max/D");
00373 m_config_tree->Branch("cutvalue_leptons_pt_max", &m_cutvalue_leptons_pt_max, "cutvalue_leptons_pt_max/D");
00374
00375 m_config_tree->Branch("cutvalue_jet_eta_max", &m_cutvalue_jet_eta_max, "cutvalue_jet_eta_max/D");
00376 m_config_tree->Branch("cutvalue_jet_pt_min", &m_cutvalue_jet_pt_min, "cutvalue_jet_pt_min/D");
00377 m_config_tree->Branch("cutvalue_jet_pt_max", &m_cutvalue_jet_pt_max, "cutvalue_jet_pt_max/D");
00378 m_config_tree->Branch("cutvalue_trackjet_pt_min", &m_cutvalue_trackjet_pt_min, "cutvalue_trackjet_pt_min/D");
00379 m_config_tree->Branch("cutvalue_trackjet_pt_max", &m_cutvalue_trackjet_pt_max, "cutvalue_trackjet_pt_max/D");
00380
00381 m_config_tree->Branch("cutvalue_jet1_pt_min", &m_cutvalue_jet1_pt_min, "cutvalue_jet1_pt_min/D");
00382 m_config_tree->Branch("cutvalue_jet2_pt_min", &m_cutvalue_jet2_pt_min, "cutvalue_jet2_pt_min/D");
00383
00384 m_config_tree->Branch("cutvalue_jets_absdeta_min", &m_cutvalue_jets_absdeta_min, "cutvalue_jets_absdeta_min/D");
00385 m_config_tree->Branch("cutvalue_jets_absdphi_max", &m_cutvalue_jets_absdphi_max, "cutvalue_jets_absdphi_max/D");
00386 m_config_tree->Branch("cutvalue_jets_mass_min", &m_cutvalue_jets_mass_min, "cutvalue_jets_mass_min/D");
00387 m_config_tree->Branch("cutvalue_jets_mass_max", &m_cutvalue_jets_mass_max, "cutvalue_jets_mass_max/D");
00388 m_config_tree->Branch("cutvalue_cjet_eta_max", &m_cutvalue_cjet_eta_max, "cutvalue_cjet_eta_max/D");
00389 m_config_tree->Branch("switch_cjet_between_fwdjets", &m_switch_cjet_between_fwdjets, "switch_cjet_between_fwdjets/O");
00390 m_config_tree->Branch("flag_cjv_track_jets", &m_flag_cjv_track_jets, "flag_cjv_track_jets/I");
00391 m_config_tree->Branch("flag_cjv_stdjet_corrpt", &m_flag_cjv_stdjet_corrpt, "flag_cjv_stdjet_corrpt/I");
00392 m_config_tree->Branch("flag_cjv_trkstdjet_match", &m_flag_cjv_trkstdjet_match, "flag_cjv_trkstdjet_match/I");
00393 m_config_tree->Branch("cutvalue_cjv_stdjet_pt_min", &m_cutvalue_cjv_stdjet_pt_min, "cutvalue_cjv_stdjet_pt_min/D");
00394 m_config_tree->Branch("cutvalue_cjv_trkjet_pt_min", &m_cutvalue_cjv_trkjet_pt_min, "cutvalue_cjv_trkjet_pt_min/D");
00395 m_config_tree->Branch("cutvalue_cjv_ptratio_min", &m_cutvalue_cjv_ptratio_min, "cutvalue_cjv_ptratio_min/D");
00396 m_config_tree->Branch("cutvalue_cjv_cmsptratio_min", &m_cutvalue_cjv_cmsptratio_min, "cutvalue_cjv_cmsptratio_min/D");
00397 m_config_tree->Branch("cutvalue_mtllnu_min", &m_cutvalue_mtllnu_min, "cutvalue_mtllnu_min/D");
00398 m_config_tree->Branch("cutvalue_pt_balance_max", &m_cutvalue_pt_balance_max, "cutvalue_pt_balance_max/D");
00399 m_config_tree->Branch("truth_ana_flag", &m_truth_ana_flag, "truth_ana_flag/O");
00400 m_config_tree->Branch("cutvalue_x1_max", &m_cutvalue_x1_max, "cutvalue_x1_max/D");
00401 m_config_tree->Branch("cutvalue_x2_max", &m_cutvalue_x1_max, "cutvalue_x2_max/D");
00402 m_config_tree->Branch("cutvalue_tautau_Z_dm_min", &m_cutvalue_tautau_Z_dm_min, "cutvalue_tautau_Z_dm_min/D");
00403
00404 m_config_tree->Branch("cutvalue_mt_min", &m_cutvalue_mt_min, "cutvalue_mt_min/D");
00405 m_config_tree->Branch("cutvalue_mt_max", &m_cutvalue_mt_max, "cutvalue_mt_max/D");
00406
00407 m_config_tree->Branch("cutvalue_jet_match_dR", &m_cutvalue_jet_match_dR, "cutvalue_jet_match_dR/D");
00408
00409 m_config_tree->Branch("cutvalue_nb_vertices_min", &m_cutvalue_nb_vertices_min, "cutvalue_nb_vertices_min/I");
00410 m_config_tree->Branch("cutvalue_nb_vertices_max", &m_cutvalue_nb_vertices_max, "cutvalue_nb_vertices_max/I");
00411
00412
00413 str_helper = m_decay_mode;
00414 strcpy(char_helper,str_helper.c_str());
00415 m_config_tree->Branch("decay_mode", &char_helper, "decay_mode/C");
00416
00417
00418 TDatime time;
00419 char char_helper2[50] = "";
00420 str_helper = string( Form("%i-%i-%i/%i:%i:%i",
00421 time.GetDay(), time.GetMonth(), time.GetYear(),
00422 time.GetHour(), time.GetMinute(), time.GetSecond())
00423 );
00424
00425 strcpy(char_helper2,str_helper.c_str());
00426 m_config_tree->Branch("date", &char_helper2, "date/C");
00427
00428 m_config_tree->Fill();
00429
00430
00431
00432
00433
00434
00435 #include "HtoWWHistos.cxx"
00436
00437
00438
00439
00440
00441
00442 for(int k=0; k<nb_cuts_max; k++){
00443 nb_events[k] = 0;
00444 nb_candidates[k] = 0;
00445 }
00446
00447
00448 v_cut_candidates = vector< vector<MyVBFCandidate> >(nb_cuts_max+2);
00449
00450 for (unsigned int k=0; k<v_cut_candidates.size(); k++) {
00451 v_cut_candidates[k] = vector<MyVBFCandidate>(0);
00452 }
00453
00454 m_event=0;
00455 m_entry=0;
00456
00457 return;
00458
00459 }
00460
00461
00462
00463
00464
00465
00466
00467 void MyHtoWWAnalysis::end_of_analysis(void) {
00468
00469
00470
00471
00472
00473
00474 h_e_reco_efficiency_pt=(TH1F*)h_e_truth_matched_pt->Clone("e_reco_efficiency_pt");
00475 h_e_reco_efficiency_eta=(TH1F*)h_e_truth_matched_eta->Clone("e_reco_efficiency_eta");
00476 h_e_reco_efficiency_phi=(TH1F*)h_e_truth_matched_phi->Clone("e_reco_efficiency_phi");
00477
00478 h_e_reco_efficiency_pt->Sumw2();
00479 h_e_reco_efficiency_eta->Sumw2();
00480 h_e_reco_efficiency_phi->Sumw2();
00481
00482 h_e_reco_efficiency_pt->Divide(h_e_truth_matched_pt,h_e_truth_presel_pt,1,1,"b");
00483 h_e_reco_efficiency_eta->Divide(h_e_truth_matched_eta,h_e_truth_presel_eta,1,1,"b");
00484 h_e_reco_efficiency_phi->Divide(h_e_truth_matched_phi,h_e_truth_presel_phi,1,1,"b");
00485
00486 h_e_reco_efficiency_pt->SetTitle("EFFICIENCY ELECTRON RECONSTRUCTION VS. PT");
00487 h_e_reco_efficiency_eta->SetTitle("EFFICIENCY ELECTRON RECONSTRUCTION VS. ETA");
00488 h_e_reco_efficiency_phi->SetTitle("EFFICIENCY ELECTRON RECONSTRUCTION VS. PHI");
00489
00490
00491 h_e_reco_fakerate_pt=(TH1F*)h_e_reco_fake_pt->Clone("e_reco_fakerate_pt");
00492 h_e_reco_fakerate_eta=(TH1F*)h_e_reco_fake_eta->Clone("e_reco_fakerate_eta");
00493 h_e_reco_fakerate_phi=(TH1F*)h_e_reco_fake_phi->Clone("e_reco_fakerate_phi");
00494
00495 h_e_reco_fakerate_pt->Sumw2();
00496 h_e_reco_fakerate_eta->Sumw2();
00497 h_e_reco_fakerate_phi->Sumw2();
00498
00499 h_e_reco_fakerate_pt->Divide(h_e_reco_fake_pt,h_e_reco_presel_pt,1,1,"b");
00500 h_e_reco_fakerate_eta->Divide(h_e_reco_fake_eta,h_e_reco_presel_eta,1,1,"b");
00501 h_e_reco_fakerate_phi->Divide(h_e_reco_fake_phi,h_e_reco_presel_phi,1,1,"b");
00502
00503 h_e_reco_fakerate_pt->SetTitle("FAKERATE ELECTRON RECONSTRUCTION VS. PT");
00504 h_e_reco_fakerate_eta->SetTitle("FAKERATE ELECTRON RECONSTRUCTION VS. ETA");
00505 h_e_reco_fakerate_phi->SetTitle("FAKERATE ELECTRON RECONSTRUCTION VS. PHI");
00506
00507
00508
00509 h_mu_reco_efficiency_pt=(TH1F*)h_mu_truth_matched_pt->Clone("mu_reco_efficiency_pt");
00510 h_mu_reco_efficiency_eta=(TH1F*)h_mu_truth_matched_eta->Clone("mu_reco_efficiency_eta");
00511 h_mu_reco_efficiency_phi=(TH1F*)h_mu_truth_matched_phi->Clone("mu_reco_efficiency_phi");
00512
00513 h_mu_reco_efficiency_pt->Sumw2();
00514 h_mu_reco_efficiency_eta->Sumw2();
00515 h_mu_reco_efficiency_phi->Sumw2();
00516
00517 h_mu_reco_efficiency_pt->Divide(h_mu_truth_matched_pt,h_mu_truth_presel_pt,1,1,"b");
00518 h_mu_reco_efficiency_eta->Divide(h_mu_truth_matched_eta,h_mu_truth_presel_eta,1,1,"b");
00519 h_mu_reco_efficiency_phi->Divide(h_mu_truth_matched_phi,h_mu_truth_presel_phi,1,1,"b");
00520
00521 h_mu_reco_efficiency_pt->SetTitle("EFFICIENCY MUON RECONSTRUCTION VS. PT");
00522 h_mu_reco_efficiency_eta->SetTitle("EFFICIENCY MUON RECONSTRUCTION VS. ETA");
00523 h_mu_reco_efficiency_phi->SetTitle("EFFICIENCY MUON RECONSTRUCTION VS. PHI");
00524
00525
00526 h_mu_reco_fakerate_pt=(TH1F*)h_mu_reco_fake_pt->Clone("mu_reco_fakerate_pt");
00527 h_mu_reco_fakerate_eta=(TH1F*)h_mu_reco_fake_eta->Clone("mu_reco_fakerate_eta");
00528 h_mu_reco_fakerate_phi=(TH1F*)h_mu_reco_fake_phi->Clone("mu_reco_fakerate_phi");
00529
00530 h_mu_reco_fakerate_pt->Sumw2();
00531 h_mu_reco_fakerate_eta->Sumw2();
00532 h_mu_reco_fakerate_phi->Sumw2();
00533
00534 h_mu_reco_fakerate_pt->Divide(h_mu_reco_fake_pt,h_mu_reco_presel_pt,1,1,"b");
00535 h_mu_reco_fakerate_eta->Divide(h_mu_reco_fake_eta,h_mu_reco_presel_eta,1,1,"b");
00536 h_mu_reco_fakerate_phi->Divide(h_mu_reco_fake_phi,h_mu_reco_presel_phi,1,1,"b");
00537
00538 h_mu_reco_fakerate_pt->SetTitle("FAKERATE MUON RECONSTRUCTION VS. PT");
00539 h_mu_reco_fakerate_eta->SetTitle("FAKERATE MUON RECONSTRUCTION VS. ETA");
00540 h_mu_reco_fakerate_phi->SetTitle("FAKERATE MUON RECONSTRUCTION VS. PHI");
00541
00542
00543
00544 h_jet_reco_efficiency_pt=(TH1F*)h_jet_truth_matched_pt->Clone("jet_reco_efficiency_pt");
00545 h_jet_reco_efficiency_eta=(TH1F*)h_jet_truth_matched_eta->Clone("jet_reco_efficiency_eta");
00546 h_jet_reco_efficiency_phi=(TH1F*)h_jet_truth_matched_phi->Clone("jet_reco_efficiency_phi");
00547
00548 h_jet_reco_efficiency_pt->Sumw2();
00549 h_jet_reco_efficiency_eta->Sumw2();
00550 h_jet_reco_efficiency_phi->Sumw2();
00551
00552 h_jet_reco_efficiency_pt->Divide(h_jet_truth_matched_pt,h_jet_truth_presel_pt,1,1,"b");
00553 h_jet_reco_efficiency_eta->Divide(h_jet_truth_matched_eta,h_jet_truth_presel_eta,1,1,"b");
00554 h_jet_reco_efficiency_phi->Divide(h_jet_truth_matched_phi,h_jet_truth_presel_phi,1,1,"b");
00555
00556 h_jet_reco_efficiency_pt->SetTitle("EFFICIENCY JET RECONSTRUCTION VS. PT");
00557 h_jet_reco_efficiency_eta->SetTitle("EFFICIENCY JET RECONSTRUCTION VS. ETA");
00558 h_jet_reco_efficiency_phi->SetTitle("EFFICIENCY JET RECONSTRUCTION VS. PHI");
00559
00560
00561 h_jet_reco_fakerate_pt=(TH1F*)h_jet_reco_fake_pt->Clone("jet_reco_fakerate_pt");
00562 h_jet_reco_fakerate_eta=(TH1F*)h_jet_reco_fake_eta->Clone("jet_reco_fakerate_eta");
00563 h_jet_reco_fakerate_phi=(TH1F*)h_jet_reco_fake_phi->Clone("jet_reco_fakerate_phi");
00564
00565 h_jet_reco_fakerate_pt->Sumw2();
00566 h_jet_reco_fakerate_eta->Sumw2();
00567 h_jet_reco_fakerate_phi->Sumw2();
00568
00569 h_jet_reco_fakerate_pt->Divide(h_jet_reco_fake_pt,h_jet_reco_presel_pt,1,1,"b");
00570 h_jet_reco_fakerate_eta->Divide(h_jet_reco_fake_eta,h_jet_reco_presel_eta,1,1,"b");
00571 h_jet_reco_fakerate_phi->Divide(h_jet_reco_fake_phi,h_jet_reco_presel_phi,1,1,"b");
00572
00573 h_jet_reco_fakerate_pt->SetTitle("FAKERATE JET RECONSTRUCTION VS. PT");
00574 h_jet_reco_fakerate_eta->SetTitle("FAKERATE JET RECONSTRUCTION VS. ETA");
00575 h_jet_reco_fakerate_phi->SetTitle("FAKERATE JET RECONSTRUCTION VS. PHI");
00576
00577
00578
00579 h_track_jet_reco_efficiency_pt=(TH1F*)h_track_jet_truth_matched_pt->Clone("track_jet_reco_efficiency_pt");
00580 h_track_jet_reco_efficiency_eta=(TH1F*)h_track_jet_truth_matched_eta->Clone("track_jet_reco_efficiency_eta");
00581 h_track_jet_reco_efficiency_phi=(TH1F*)h_track_jet_truth_matched_phi->Clone("track_jet_reco_efficiency_phi");
00582
00583 h_track_jet_reco_efficiency_pt->Sumw2();
00584 h_track_jet_reco_efficiency_eta->Sumw2();
00585 h_track_jet_reco_efficiency_phi->Sumw2();
00586
00587 h_track_jet_reco_efficiency_pt->Divide(h_track_jet_truth_matched_pt,h_track_jet_truth_presel_pt,1,1,"b");
00588 h_track_jet_reco_efficiency_eta->Divide(h_track_jet_truth_matched_eta,h_track_jet_truth_presel_eta,1,1,"b");
00589 h_track_jet_reco_efficiency_phi->Divide(h_track_jet_truth_matched_phi,h_track_jet_truth_presel_phi,1,1,"b");
00590
00591 h_track_jet_reco_efficiency_pt->SetTitle("EFFICIENCY TRACK_JET RECONSTRUCTION VS. PT");
00592 h_track_jet_reco_efficiency_eta->SetTitle("EFFICIENCY TRACK_JET RECONSTRUCTION VS. ETA");
00593 h_track_jet_reco_efficiency_phi->SetTitle("EFFICIENCY TRACK_JET RECONSTRUCTION VS. PHI");
00594
00595
00596 h_track_jet_reco_fakerate_pt=(TH1F*)h_track_jet_reco_fake_pt->Clone("track_jet_reco_fakerate_pt");
00597 h_track_jet_reco_fakerate_eta=(TH1F*)h_track_jet_reco_fake_eta->Clone("track_jet_reco_fakerate_eta");
00598 h_track_jet_reco_fakerate_phi=(TH1F*)h_track_jet_reco_fake_phi->Clone("track_jet_reco_fakerate_phi");
00599
00600 h_track_jet_reco_fakerate_pt->Sumw2();
00601 h_track_jet_reco_fakerate_eta->Sumw2();
00602 h_track_jet_reco_fakerate_phi->Sumw2();
00603
00604 h_track_jet_reco_fakerate_pt->Divide(h_track_jet_reco_fake_pt,h_track_jet_reco_presel_pt,1,1,"b");
00605 h_track_jet_reco_fakerate_eta->Divide(h_track_jet_reco_fake_eta,h_track_jet_reco_presel_eta,1,1,"b");
00606 h_track_jet_reco_fakerate_phi->Divide(h_track_jet_reco_fake_phi,h_track_jet_reco_presel_phi,1,1,"b");
00607
00608 h_track_jet_reco_fakerate_pt->SetTitle("FAKERATE TRACK_JET RECONSTRUCTION VS. PT");
00609 h_track_jet_reco_fakerate_eta->SetTitle("FAKERATE TRACK_JET RECONSTRUCTION VS. ETA");
00610 h_track_jet_reco_fakerate_phi->SetTitle("FAKERATE TRACK_JET RECONSTRUCTION VS. PHI");
00611
00612
00613
00614
00615 h_track_jet_truth_efficiency_pt=(TH1F*)h_track_jet_reco_matched_pt->Clone("track_jet_truth_efficiency_pt");
00616 h_track_jet_truth_efficiency_eta=(TH1F*)h_track_jet_reco_matched_eta->Clone("track_jet_truth_efficiency_eta");
00617 h_track_jet_truth_efficiency_phi=(TH1F*)h_track_jet_reco_matched_phi->Clone("track_jet_truth_efficiency_phi");
00618
00619 h_track_jet_truth_efficiency_pt->Sumw2();
00620 h_track_jet_truth_efficiency_eta->Sumw2();
00621 h_track_jet_truth_efficiency_phi->Sumw2();
00622
00623 h_track_jet_truth_efficiency_pt->Divide(h_track_jet_reco_matched_pt,h_track_jet_reco_presel_pt,1,1,"b");
00624 h_track_jet_truth_efficiency_eta->Divide(h_track_jet_reco_matched_eta,h_track_jet_reco_presel_eta,1,1,"b");
00625 h_track_jet_truth_efficiency_phi->Divide(h_track_jet_reco_matched_phi,h_track_jet_reco_presel_phi,1,1,"b");
00626
00627 h_track_jet_truth_efficiency_pt->SetTitle("EFFICIENCY TRACK_JET RECONSTRUCTION VS. PT");
00628 h_track_jet_truth_efficiency_eta->SetTitle("EFFICIENCY TRACK_JET RECONSTRUCTION VS. ETA");
00629 h_track_jet_truth_efficiency_phi->SetTitle("EFFICIENCY TRACK_JET RECONSTRUCTION VS. PHI");
00630
00631
00632
00633 h_track_std_jet_efficiency_pt =(TH1F*)h_track_std_jet_matched_pt->Clone("track_std_jet_efficiency_pt");
00634 h_track_std_jet_efficiency_eta =(TH1F*)h_track_std_jet_matched_eta->Clone("track_std_jet_efficiency_eta");
00635 h_track_std_jet_efficiency_phi =(TH1F*)h_track_std_jet_matched_phi->Clone("track_std_jet_efficiency_phi");
00636
00637 h_track_std_jet_efficiency_pt->Sumw2();
00638 h_track_std_jet_efficiency_eta->Sumw2();
00639 h_track_std_jet_efficiency_phi->Sumw2();
00640
00641 h_track_std_jet_efficiency_pt->Divide(h_track_std_jet_matched_pt,h_track_jet_reco_presel_pt,1,1,"b");
00642 h_track_std_jet_efficiency_eta->Divide(h_track_std_jet_matched_eta,h_track_jet_reco_presel_eta,1,1,"b");
00643 h_track_std_jet_efficiency_phi->Divide(h_track_std_jet_matched_phi,h_track_jet_reco_presel_phi,1,1,"b");
00644
00645 h_track_std_jet_efficiency_pt->SetTitle("EFFICIENCY TRACK_STD_JET VS. PT");
00646 h_track_std_jet_efficiency_eta->SetTitle("EFFICIENCY TRACK_STD_JET VS. ETA");
00647 h_track_std_jet_efficiency_phi->SetTitle("EFFICIENCY TRACK_STD_JET VS. PHI");
00648
00649
00650 h_std_track_jet_efficiency_pt =(TH1F*)h_std_track_jet_matched_pt->Clone("std_track_jet_efficiency_pt");
00651 h_std_track_jet_efficiency_eta =(TH1F*)h_std_track_jet_matched_eta->Clone("std_track_jet_efficiency_eta");
00652 h_std_track_jet_efficiency_phi =(TH1F*)h_std_track_jet_matched_phi->Clone("std_track_jet_efficiency_phi");
00653
00654 h_std_track_jet_efficiency_pt->Sumw2();
00655 h_std_track_jet_efficiency_eta->Sumw2();
00656 h_std_track_jet_efficiency_phi->Sumw2();
00657
00658 h_std_track_jet_efficiency_pt->Divide(h_std_track_jet_matched_pt,h_jet_reco_central_pt,1,1,"b");
00659 h_std_track_jet_efficiency_eta->Divide(h_std_track_jet_matched_eta,h_jet_reco_central_eta,1,1,"b");
00660 h_std_track_jet_efficiency_phi->Divide(h_std_track_jet_matched_phi,h_jet_reco_central_phi,1,1,"b");
00661
00662 h_std_track_jet_efficiency_pt->SetTitle("EFFICIENCY STD_TRACK_JET VS. PT");
00663 h_std_track_jet_efficiency_eta->SetTitle("EFFICIENCY STD_TRACK_JET VS. ETA");
00664 h_std_track_jet_efficiency_phi->SetTitle("EFFICIENCY STD_TRACK_JET VS. PHI");
00665
00666
00667
00668
00669
00670
00671
00672
00673
00674
00675
00676 cout << "writing file: " << m_tfile->GetName() << endl;
00677 m_tfile->Write();
00678
00679
00680
00681
00682
00683
00684 cout << endl
00685 << "**********************************************" << endl
00686 << "**************** Output ****************" << endl
00687 << "**********************************************" << endl
00688 << endl;
00689
00690
00691
00692
00693
00694
00695
00696 double tot_eff=1;
00697
00698 cout << " nb \t cut \t\t nb_events eff(%) tot_eff(%)" << endl
00699 << " _____________________________________________________" << endl;
00700
00701 for(int k=0; k<nb_cuts+1; k++){
00702 double eff=1;
00703 if(k>0){
00704 eff=(double)(nb_events[k])/(double)(nb_events[k-1]);
00705
00706 tot_eff *= eff;
00707
00708 }
00709
00710 cout.width(5);
00711 cout << right << k << " ";
00712 cout.width(20);
00713 if(k==0){
00714 cout << left << "w/o cut";
00715 }
00716 else {
00717 cout << left << cuts[k];
00718 }
00719 cout.width(7);
00720 cout << right << nb_events[k];
00721 cout.width(9);
00722 cout << right << Form("%.2f",eff*100);
00723 cout.width(9);
00724 cout << right << Form("%.2f",tot_eff*100) << endl;
00725
00726 }
00727 cout << endl;
00728
00729 TDatime time;
00730
00731 cout << "cut_flow: " << m_decay_mode << ", "
00732 << Form("%i/%i/%i, %i:%i:%i",
00733 time.GetDay(), time.GetMonth(), time.GetYear(),
00734 time.GetHour(), time.GetMinute(), time.GetSecond())
00735 << endl;
00736
00737
00738
00739
00740
00741
00742
00743
00744
00745
00746
00747
00748
00749 cout << "**********************************************" << endl
00750 << endl;
00751
00752 return;
00753
00754 }
00755
00756
00757
00758
00759
00760
00761
00762 void MyHtoWWAnalysis::analyse_event(const MyEvent & event) {
00763
00764
00765
00766
00767
00768
00769
00770
00771 nb_cuts_applied = 0;
00772
00773 for(int k=0; k<(nb_cuts_max+2); k++){
00774 flag_evt_selected[k] = false;
00775 }
00776 flag_evt_selected[0] = true;
00777
00778 for(unsigned int k=0; k<v_cut_candidates.size(); k++) {
00779 v_cut_candidates[k].clear();
00780 }
00781
00782 v_track_jet_reco_fake.clear();
00783
00784
00785 m_truth_manager = MyTruthParticleManager(event.truth_particles());
00786 m_truth_manager.set_generator(m_generator);
00787
00788
00789 weight = event.event_weight();
00790
00791 if(m_release>12){
00792 weight = 1;
00793 }
00794
00795 m_event = event.event_number();
00796 m_entry++;
00797
00798
00799
00800
00801
00802
00803
00804
00805
00806 h_event_weight->Fill(weight,1.0);
00807
00808
00809 h_cut_events->Fill(-2,weight);
00810
00811
00812
00813
00814
00815
00816
00817 h_cut_events->Fill(-1,weight);
00818
00819
00820
00821
00822
00823
00824 MyPileUpExtractedEvent pu_event(event);
00825
00826 const MyVertex* vertex = pu_event.vertex();
00827 const MyVertex* truth_vertex = pu_event.truth_vertex();
00828
00829 if(m_trackjet_flag && (!vertex || !truth_vertex)){
00830 cout << "Warning: no vertex found in this event: " << m_event << endl;
00831 return;
00832 }
00833
00834 if(m_trackjet_flag){
00835 m_primary_vertex_index = vertex->index();
00836 m_primary_truth_vertex_index = truth_vertex->index();
00837 }
00838 else{
00839 m_primary_vertex_index = -1;
00840 m_primary_truth_vertex_index = -1;
00841 }
00842
00843
00844
00845
00846
00847
00848
00849
00850
00851 vector<MyParticle*> v_e_reco_aod, v_mu_reco_aod, v_jet_reco_aod;
00852 vector<MyParticle*> v_e_truth_aod, v_mu_truth_aod, v_jet_truth_aod;
00853
00854 vector<MyParticle*> v_e_reco_presel, v_mu_reco_presel, v_jet_reco_presel;
00855 vector<MyParticle*> v_e_truth_presel, v_mu_truth_presel, v_jet_truth_presel;
00856
00857 vector<MyParticle*> v_mu_reco_orm, v_jet_reco_orm;
00858 vector<MyParticle*> v_mu_truth_orm, v_jet_truth_orm;
00859
00860
00861
00862
00863
00864
00865
00866
00867
00868
00869
00870
00871
00872
00873 v_e_reco_aod = pu_event.reco_electrons();
00874 v_mu_reco_aod = pu_event.reco_muons();
00875 v_jet_reco_aod = event.reco_jets();
00876
00877 v_e_truth_aod = m_truth_manager.getParticles_with_ID(11);
00878 v_e_truth_aod = m_truth_manager.remove_multiples(v_e_truth_aod);
00879
00880
00881
00882
00883
00884
00885
00886
00887
00888
00889
00890
00891
00892
00893 v_e_truth_aod = m_tools.pt_eta_cut(v_e_truth_aod, 15.*GeV, -1, 0.0, 2.6);
00894
00895 v_mu_truth_aod = m_truth_manager.getParticles_with_ID(13);
00896 v_mu_truth_aod = m_truth_manager.remove_multiples(v_mu_truth_aod);
00897
00898
00899
00900
00901
00902
00903
00904
00905
00906
00907
00908
00909
00910
00911 v_mu_truth_aod = m_tools.pt_eta_cut(v_mu_truth_aod, 15.*GeV, -1, 0.0, 2.6);
00912
00913 v_jet_truth_aod = event.truth_jets();
00914
00915
00916 fill_raw_aod_content_histos( v_e_reco_aod, v_mu_reco_aod, v_jet_reco_aod,
00917 v_e_truth_aod, v_mu_truth_aod, v_jet_truth_aod);
00918
00919 if(m_trackjet_flag){
00920 fill_vertex_histos(event.primary_vertices(), event.truth_vertices());
00921 }
00922
00923
00924
00925 if(m_cutvalue_nb_vertices_min>-1){
00926 if((int)event.primary_vertices()->size()<m_cutvalue_nb_vertices_min){
00927 return;
00928 }
00929 }
00930 if(m_cutvalue_nb_vertices_max>-1){
00931 if((int)event.primary_vertices()->size()>m_cutvalue_nb_vertices_max){
00932 return;
00933 }
00934 }
00935
00936
00937 MyMissingEt missinget;
00938
00939 if(!m_1mmFix_flag){
00940 missinget = pu_event.met_manager().get_missinget("MET_RefFinal");
00941 }
00942 else{
00943 missinget = pu_event.met_manager().get_missinget("MET_RefFinal_1mmCorrection");
00944 }
00945
00946 h_etmiss_aod->Fill(missinget.met()*invGeV,weight);
00947
00948
00949 truth_missinget = pu_event.met_manager().get_missinget("TruthMET_NonInt");
00950
00951
00952
00953
00954
00955
00956 lepton_isolation_study(v_e_reco_aod, &m_truth_manager);
00957 lepton_isolation_study(v_mu_reco_aod, &m_truth_manager);
00958
00959
00960
00961
00962
00963
00964
00965 v_e_reco_presel = preselect_electrons(v_e_reco_aod, 15*GeV);
00966 v_e_truth_presel = preselect_truth_electrons(v_e_truth_aod, 15*GeV);
00967 v_e_reco_presel = m_tools.delete_doubles(v_e_reco_presel);
00968
00969 vector<MyParticle*> v_e_reco_presel_for_orm = preselect_electrons_for_orm(v_e_reco_aod, 15*GeV);
00970 v_e_reco_presel_for_orm = m_tools.delete_doubles(v_e_reco_presel_for_orm);
00971
00972
00973 v_mu_reco_orm = v_mu_reco_aod;
00974
00975 v_mu_reco_orm = m_tools.pt_eta_cut(v_mu_reco_orm, 15.0*GeV, -1, 0.0, 2.5);
00976
00977
00978
00979 v_jet_reco_orm = v_jet_reco_aod;
00980
00981 v_jet_reco_orm = m_tools.pt_eta_cut(v_jet_reco_orm, m_cutvalue_jet_pt_min*GeV, m_cutvalue_jet_pt_max*GeV, 0.0, m_cutvalue_jet_eta_max);
00982 v_jet_reco_orm = m_tools.remove_overlap(v_jet_reco_orm,v_e_reco_presel_for_orm,0.4);
00983
00984 vector<MyParticle*> v_jet_reco_central = m_tools.pt_eta_cut(v_jet_reco_orm, -1, -1, -1, 2.5);
00985 vector<MyParticle*> v_jet_reco_aod_orm = m_tools.remove_overlap(v_jet_reco_aod,v_e_reco_presel_for_orm,0.4);
00986
00987
00988 v_mu_reco_presel = preselect_muons(v_mu_reco_orm, 15*GeV);
00989 vector<MyParticle*> tmp_muons(v_mu_reco_presel);
00990 v_mu_truth_presel = preselect_truth_muons(v_mu_truth_aod, 15*GeV);
00991
00992 v_mu_reco_presel = m_tools.delete_doubles(v_mu_reco_presel);
00993
00994
00995
00996
00997
00998
00999
01000
01001
01002
01003
01004
01005
01006
01007
01008
01009
01010
01011
01012
01013
01014
01015
01016
01017
01018
01019
01020 h_jet_reco_orm_nb->Fill(v_jet_reco_orm.size(),weight);
01021 for (unsigned int k=0; k<v_jet_reco_orm.size(); k++) {
01022 h_jet_reco_orm_pt->Fill((v_jet_reco_orm[k])->tlv().Pt()*invGeV,weight);
01023 h_jet_reco_orm_eta->Fill((v_jet_reco_orm[k])->tlv().Eta(),weight);
01024 h_jet_reco_orm_phi->Fill((v_jet_reco_orm[k])->tlv().Phi(),weight);
01025 }
01026
01027 h_jet_reco_central_nb->Fill(v_jet_reco_central.size(),weight);
01028 for (unsigned int k=0; k<v_jet_reco_central.size(); k++) {
01029 h_jet_reco_central_pt->Fill((v_jet_reco_central[k])->tlv().Pt()*invGeV,weight);
01030 h_jet_reco_central_eta->Fill((v_jet_reco_central[k])->tlv().Eta(),weight);
01031 h_jet_reco_central_phi->Fill((v_jet_reco_central[k])->tlv().Phi(),weight);
01032 h_jet_reco_central_ptratio->Fill( ((MyParticleJet*)(v_jet_reco_central[k]))
01033 ->tracks_ptratio(m_primary_vertex_index),weight);
01034 h_jet_reco_central_cmsptratio->Fill( ((MyParticleJet*)(v_jet_reco_central[k]))
01035 ->tracks_cmsptratio(m_primary_vertex_index),weight);
01036 h_jet_reco_central_ptcorr->Fill( ((MyParticleJet*)(v_jet_reco_central[k]))
01037 ->pt_pucorr(m_primary_vertex_index),weight);
01038
01039 if(((MyParticleJet*)(v_jet_reco_central[k]))
01040 ->tracks_ptratio(m_primary_vertex_index)>m_cutvalue_cjv_ptratio_min){
01041 h_jet_reco_central_pt_ptratiocut->Fill((v_jet_reco_central[k])->tlv().Pt()*invGeV,weight);
01042 }
01043 if(((MyParticleJet*)(v_jet_reco_central[k]))
01044 ->tracks_cmsptratio(m_primary_vertex_index)>m_cutvalue_cjv_cmsptratio_min){
01045 h_jet_reco_central_pt_cmsptratiocut->Fill((v_jet_reco_central[k])->tlv().Pt()*invGeV,weight);
01046 }
01047 }
01048
01049
01050
01051
01052
01053 v_jet_reco_presel = v_jet_reco_orm;
01054
01055
01056
01057
01058
01059
01060 v_jet_truth_orm = v_jet_truth_aod;
01061 v_jet_truth_orm = m_tools.remove_overlap(v_jet_truth_orm,v_e_truth_presel,0.4);
01062
01063
01064
01065
01066
01067 vector<MyParticle*> v_jet_truth_aod_orm = m_tools.remove_overlap(v_jet_truth_aod,v_e_truth_presel,0.4);
01068
01069 v_jet_truth_presel
01070 = m_tools.pt_eta_cut(v_jet_truth_orm, m_cutvalue_jet_pt_min*GeV, m_cutvalue_jet_pt_max*GeV, 0.0, m_cutvalue_jet_eta_max);
01071
01072 vector<MyParticle*> v_jet_truth_central = m_tools.pt_eta_cut(v_jet_truth_presel, m_cutvalue_jet_pt_min*GeV, m_cutvalue_jet_pt_max*GeV, 0.0, 2.5);
01073
01074
01075
01076
01077
01078
01079
01080
01081
01082
01083
01084 if(v_jet_reco_presel.size()>0){
01085 h_jet_reco_presel_pt1->Fill((v_jet_reco_presel[0])->tlv().Pt()*invGeV,weight);
01086 h_jet_reco_presel_eta1->Fill((v_jet_reco_presel[0])->tlv().Eta(),weight);
01087 }
01088 if(v_jet_reco_presel.size()>1){
01089 h_jet_reco_presel_pt2->Fill((v_jet_reco_presel[1])->tlv().Pt()*invGeV,weight);
01090 h_jet_reco_presel_eta2->Fill((v_jet_reco_presel[1])->tlv().Eta(),weight);
01091 }
01092 if(v_jet_reco_presel.size()>2){
01093 h_jet_reco_presel_pt3->Fill((v_jet_reco_presel[2])->tlv().Pt()*invGeV,weight);
01094 h_jet_reco_presel_eta3->Fill((v_jet_reco_presel[2])->tlv().Eta(),weight);
01095 }
01096
01097 h_jet_reco_presel_nb->Fill(v_jet_reco_presel.size(),weight);
01098 for (unsigned int k=0; k<v_jet_reco_presel.size(); k++) {
01099
01100
01101
01102 h_jet_reco_presel_pt->Fill((v_jet_reco_presel[k])->tlv().Pt()*invGeV,weight);
01103 h_jet_reco_presel_eta->Fill((v_jet_reco_presel[k])->tlv().Eta(),weight);
01104 h_jet_reco_presel_phi->Fill((v_jet_reco_presel[k])->tlv().Phi(),weight);
01105 h_jet_reco_presel_ptratio->Fill( ((MyParticleJet*)(v_jet_reco_presel[k]))
01106 ->tracks_ptratio(m_primary_vertex_index),weight);
01107 h_jet_reco_presel_cmsptratio->Fill( ((MyParticleJet*)(v_jet_reco_presel[k]))
01108 ->tracks_cmsptratio(m_primary_vertex_index),weight);
01109 h_jet_reco_presel_ptcorr->Fill( ((MyParticleJet*)(v_jet_reco_presel[k]))
01110 ->pt_pucorr(m_primary_vertex_index),weight);
01111 }
01112
01113 h_jet_truth_presel_nb->Fill(v_jet_truth_presel.size(),weight);
01114 for (unsigned int k=0; k<v_jet_truth_presel.size(); k++) {
01115 h_jet_truth_presel_pt->Fill((v_jet_truth_presel[k])->tlv().Pt()*invGeV,weight);
01116 h_jet_truth_presel_eta->Fill((v_jet_truth_presel[k])->tlv().Eta(),weight);
01117 h_jet_truth_presel_phi->Fill((v_jet_truth_presel[k])->tlv().Phi(),weight);
01118 }
01119
01120 h_jet_truth_central_nb->Fill(v_jet_truth_central.size(),weight);
01121 for (unsigned int k=0; k<v_jet_truth_central.size(); k++) {
01122 h_jet_truth_central_pt->Fill((v_jet_truth_central[k])->tlv().Pt()*invGeV,weight);
01123 h_jet_truth_central_eta->Fill((v_jet_truth_central[k])->tlv().Eta(),weight);
01124 h_jet_truth_central_phi->Fill((v_jet_truth_central[k])->tlv().Phi(),weight);
01125 }
01126
01127 v_jet_reco_presel = m_tools.sort_particles(v_jet_reco_presel);
01128 v_jet_truth_presel = m_tools.sort_particles(v_jet_truth_presel);
01129
01130 m_tools.check_order(v_jet_reco_presel);
01131 m_tools.check_order(v_jet_truth_presel);
01132
01133
01134
01135
01136
01137
01138 vector<MyParticle*> v_track_jet_reco_aod(*event.track_jets());
01139 vector<MyParticle*> v_track_jet_truth_aod(*event.truth_track_jets());
01140
01141
01142
01143
01144
01145
01146
01147
01148
01149
01150
01151
01152
01153
01154
01155
01156
01157
01158
01159
01160 vector<MyParticle*> v_track_jet_reco_presel;
01161 vector<MyParticle*> v_track_jet_truth_presel;
01162
01163
01164
01165
01166 v_track_jet_reco_presel = m_tools.pt_eta_cut( v_track_jet_reco_aod, m_cutvalue_trackjet_pt_min*GeV, m_cutvalue_trackjet_pt_max*GeV, 0.0, 2.5);
01167 v_track_jet_truth_presel = m_tools.pt_eta_cut( v_track_jet_truth_aod, m_cutvalue_trackjet_pt_min*GeV, m_cutvalue_trackjet_pt_max*GeV, 0.0, 2.5);
01168
01169
01170
01171 h_track_jet_reco_aod_nb->Fill(v_track_jet_reco_aod.size(), weight);
01172 for (unsigned int k=0; k<v_track_jet_reco_aod.size(); k++) {
01173
01174 h_track_jet_reco_aod_eta->Fill(v_track_jet_reco_aod[k]->tlv().Eta(), weight);
01175 h_track_jet_reco_aod_phi->Fill(v_track_jet_reco_aod[k]->tlv().Phi(), weight);
01176 h_track_jet_reco_aod_pt->Fill(v_track_jet_reco_aod[k]->tlv().Pt(), weight);
01177 h_track_jet_reco_aod_pt_vs_eta->Fill(v_track_jet_reco_aod[k]->tlv().Eta(),
01178 v_track_jet_reco_aod[k]->tlv().Pt(), weight);
01179 }
01180
01181 h_track_jet_truth_aod_nb->Fill(v_track_jet_truth_aod.size(), weight);
01182 for (unsigned int k=0; k<v_track_jet_truth_aod.size(); k++) {
01183
01184 h_track_jet_truth_aod_eta->Fill(v_track_jet_truth_aod[k]->tlv().Eta(), weight);
01185 h_track_jet_truth_aod_phi->Fill(v_track_jet_truth_aod[k]->tlv().Phi(), weight);
01186 h_track_jet_truth_aod_pt->Fill(v_track_jet_truth_aod[k]->tlv().Pt(), weight);
01187 h_track_jet_truth_aod_pt_vs_eta->Fill(v_track_jet_truth_aod[k]->tlv().Eta(),
01188 v_track_jet_truth_aod[k]->tlv().Pt(), weight);
01189 }
01190
01191 h_track_jet_reco_presel_nb->Fill(v_track_jet_reco_presel.size(), weight);
01192 for (unsigned int k=0; k<v_track_jet_reco_presel.size(); k++) {
01193
01194 h_track_jet_reco_presel_eta->Fill(v_track_jet_reco_presel[k]->tlv().Eta(), weight);
01195 h_track_jet_reco_presel_phi->Fill(v_track_jet_reco_presel[k]->tlv().Phi(), weight);
01196 h_track_jet_reco_presel_pt->Fill(v_track_jet_reco_presel[k]->tlv().Pt(), weight);
01197 h_track_jet_reco_presel_pt_vs_eta->Fill(v_track_jet_reco_presel[k]->tlv().Eta(),
01198 v_track_jet_reco_presel[k]->tlv().Pt(), weight);
01199 }
01200
01201 h_track_jet_truth_presel_nb->Fill(v_track_jet_truth_presel.size(), weight);
01202 for (unsigned int k=0; k<v_track_jet_truth_presel.size(); k++) {
01203
01204 h_track_jet_truth_presel_eta->Fill(v_track_jet_truth_presel[k]->tlv().Eta(), weight);
01205 h_track_jet_truth_presel_phi->Fill(v_track_jet_truth_presel[k]->tlv().Phi(), weight);
01206 h_track_jet_truth_presel_pt->Fill(v_track_jet_truth_presel[k]->tlv().Pt(), weight);
01207 h_track_jet_truth_presel_pt_vs_eta->Fill(v_track_jet_truth_presel[k]->tlv().Eta(),
01208 v_track_jet_truth_presel[k]->tlv().Pt(), weight);
01209 }
01210
01211
01212 vector<MyParticle*> v_track_jet_reco_orm_e(0);
01213 vector<MyParticle*> v_track_jet_reco_orm(0);
01214
01215 v_track_jet_reco_orm_e = m_tools.remove_overlap(v_track_jet_reco_presel,v_e_reco_presel_for_orm,0.4);
01216 v_track_jet_reco_orm = m_tools.remove_overlap(v_track_jet_reco_orm_e,tmp_muons,0.4);
01217
01218 int nb_e_overlaps = v_track_jet_reco_aod.size() - v_track_jet_reco_orm_e.size();
01219 int nb_mu_overlaps = v_track_jet_reco_orm_e.size() - v_track_jet_reco_orm.size();
01220
01221 h_track_jet_reco_orm_nb->Fill(v_track_jet_reco_orm.size(), weight);
01222 for (unsigned int k=0; k<v_track_jet_reco_orm.size(); k++) {
01223
01224 h_track_jet_reco_orm_eta->Fill(v_track_jet_reco_orm[k]->tlv().Eta(), weight);
01225 h_track_jet_reco_orm_phi->Fill(v_track_jet_reco_orm[k]->tlv().Phi(), weight);
01226 h_track_jet_reco_orm_pt->Fill(v_track_jet_reco_orm[k]->tlv().Pt(), weight);
01227 h_track_jet_reco_orm_pt_vs_eta->Fill(v_track_jet_reco_orm[k]->tlv().Eta(),
01228 v_track_jet_reco_orm[k]->tlv().Pt(), weight);
01229
01230 }
01231
01232 h_trj_nb_electron_overlaps->Fill(nb_e_overlaps, weight);
01233 h_trj_nb_muon_overlaps->Fill(nb_mu_overlaps, weight);
01234
01235
01236
01237
01238
01239
01240 double dR, Et, eta, phi, truth_Et, truth_eta, truth_phi;
01241 for (unsigned int k=0; k<v_track_jet_reco_aod.size(); k++) {
01242
01243 dR = -1.0e99;
01244 Et = v_track_jet_reco_aod[k]->tlv().Et();
01245 eta = v_track_jet_reco_aod[k]->tlv().Eta();
01246 phi = v_track_jet_reco_aod[k]->tlv().Phi();
01247
01248
01249 for (unsigned int l=0; l<v_track_jet_truth_aod.size(); l++) {
01250
01251 if (v_track_jet_reco_aod[k]
01252 ->tlv().DeltaR(v_track_jet_truth_aod[l]->tlv())<TMath::Abs(dR)) {
01253
01254 dR = v_track_jet_reco_aod[k]->tlv().DeltaR(v_track_jet_truth_aod[l]->tlv());
01255 truth_Et = v_track_jet_truth_aod[l]->tlv().Et();
01256 truth_eta = v_track_jet_truth_aod[l]->tlv().Eta();
01257 truth_phi = v_track_jet_truth_aod[l]->tlv().Phi();
01258 }
01259 }
01260
01261 t_trj_ntuple->Fill(weight,
01262 vertex->numberOfTracks(),
01263 truth_vertex->numberOfTracks(),
01264 v_track_jet_reco_aod.size(), v_track_jet_truth_aod.size(),
01265 Et, eta, phi, dR,
01266 truth_Et, truth_eta, truth_phi);
01267 }
01268
01269
01270 double Et_min(1.0e99);
01271 for (unsigned int l=0; l<v_track_jet_reco_aod.size(); l++) {
01272
01273 if (v_track_jet_reco_aod[l]->tlv().Et()<Et_min) {
01274 Et_min = v_track_jet_reco_aod[l]->tlv().Et();
01275 }
01276 }
01277 t_trj_ntuple_2->Fill(weight, Et_min, v_track_jet_reco_aod.size());
01278
01279 for (unsigned int l=0; l<v_track_jet_truth_aod.size(); l++) {
01280
01281 dR = -1.0e99;
01282 truth_Et = v_track_jet_truth_aod[l]->tlv().Et();
01283 truth_eta = v_track_jet_truth_aod[l]->tlv().Eta();
01284 truth_phi = v_track_jet_truth_aod[l]->tlv().Phi();
01285
01286 for (unsigned int k=0; k<v_track_jet_reco_aod.size(); k++) {
01287
01288 if (v_track_jet_reco_aod[k]
01289 ->tlv().DeltaR(v_track_jet_truth_aod[l]->tlv())<fabs(dR)) {
01290
01291 dR = v_track_jet_reco_aod[k]
01292 ->tlv().DeltaR(v_track_jet_truth_aod[l]->tlv());
01293 Et = v_track_jet_reco_aod[k]->tlv().Et();
01294 eta = v_track_jet_reco_aod[k]->tlv().Eta();
01295 phi = v_track_jet_reco_aod[k]->tlv().Phi();
01296 }
01297 }
01298
01299 t_truth_trj_ntuple->Fill(weight,
01300 vertex->numberOfTracks(),
01301 truth_vertex->numberOfTracks(),
01302 v_track_jet_reco_aod.size(), v_track_jet_truth_aod.size(),
01303 Et, eta, phi, dR,
01304 truth_Et, truth_eta, truth_phi);
01305
01306 }
01307 int nbstdj(0);
01308 Et_min = 1.0e99;
01309 double Et_mincentral = 1.0e99;
01310 for (unsigned int l=0; l<v_jet_reco_aod_orm.size(); l++) {
01311 if ((v_jet_reco_aod_orm)[l]->tlv().Et()<Et_min) {
01312 Et_min = (v_jet_reco_aod_orm)[l]->tlv().Et();
01313 }
01314 if ((v_jet_reco_aod_orm)[l]->tlv().Et()<Et_mincentral && fabs((v_jet_reco_aod_orm)[l]->tlv().Eta())<2.5) {
01315 Et_mincentral = (v_jet_reco_aod_orm)[l]->tlv().Et();
01316 }
01317 }
01318 for (unsigned int l=0; l<v_jet_reco_aod_orm.size(); l++) {
01319 if (fabs((v_jet_reco_aod_orm)[l]->tlv().Eta())<2.5){
01320
01321
01322 nbstdj++;
01323 }
01324 }
01325 t_std_ntuple_2->Fill(weight, Et_mincentral, nbstdj);
01326 t_std_ntuple_3->Fill(weight, Et_min, v_jet_reco_aod_orm.size());
01327
01328
01329
01330
01331
01332
01333
01334
01335
01336
01337
01338
01339
01340
01341
01342
01343
01344
01345
01346
01347
01348
01349
01350
01351
01352
01353
01354
01355
01356
01357
01358
01359
01360
01361
01362
01363
01364
01365
01366
01367
01368
01369
01370
01371
01372
01373 v_trackjet_forcjvmatch = m_tools.pt_eta_cut( v_track_jet_reco_presel,
01374 m_cutvalue_cjv_trkjet_pt_min*GeV, -1,
01375 0.0, 2.5);
01376
01377 match_electrons(v_e_reco_presel, v_e_truth_presel);
01378 match_muons(v_mu_reco_presel, v_mu_truth_presel);
01379 match_jets(v_jet_reco_presel, v_jet_truth_presel);
01380
01381 match_track_jets(v_track_jet_reco_presel, v_track_jet_truth_presel);
01382 match_track_with_std_jets(v_track_jet_reco_presel, v_jet_reco_central);
01383 match_truth_track_with_std_jets(v_track_jet_truth_presel, v_jet_truth_central);
01384
01385
01386 match_fake_track_jets(v_e_reco_aod, v_mu_reco_aod);
01387
01388
01389
01390
01391
01392
01393 jet_btag_eff(v_jet_reco_presel, &m_truth_manager);
01394
01395
01396
01397
01398
01399
01400
01401
01402
01403
01404
01405
01406
01407 if(!m_truth_ana_flag){
01408
01409 v_centraljet_ana = build_centraljet_vector(v_jet_reco_aod_orm, v_track_jet_reco_aod);
01410
01411
01412 cut_based_analysis( v_e_reco_presel,
01413 v_mu_reco_presel,
01414 v_jet_reco_presel,
01415 v_track_jet_reco_presel,
01416 missinget,
01417 event.trigger());
01418 }
01419 else{
01420
01421 v_centraljet_ana = build_centraljet_vector(v_jet_truth_aod_orm, v_track_jet_truth_aod);
01422
01423
01424 cut_based_analysis( v_e_truth_presel,
01425 v_mu_truth_presel,
01426 v_jet_truth_presel,
01427 v_track_jet_truth_presel,
01428 truth_missinget,
01429 event.trigger());
01430 }
01431
01432
01433
01434
01435
01436
01437 flag_evt_selected[nb_cuts_max] = flag_evt_selected[nb_cuts];
01438 flag_evt_selected[nb_cuts_max+1] = flag_evt_selected[nb_cuts];
01439
01440 for (unsigned int k=0; k<v_cut_candidates.size(); k++) {
01441 fill_all_ana_histos(k,missinget);
01442 }
01443
01444
01445 return;
01446
01447 }
01448
01449
01450
01451
01452
01453
01454
01455
01456
01457
01458
01459
01460
01461
01462
01463
01464
01465
01466
01467
01468
01469
01470
01471
01472
01473
01474
01475
01476
01477
01478
01479
01480
01481
01482
01483
01484
01485
01486
01487
01488
01489
01490
01491
01492
01493
01494
01495
01496
01497
01498
01499
01500
01501
01502
01503 vector<MyParticle*>
01504 MyHtoWWAnalysis::build_centraljet_vector(vector<MyParticle*> vec_std_jets,
01505 vector<MyParticle*> vec_trk_jets){
01506
01507
01508 vector<MyParticle*> vec_central_jets(0);
01509
01510 vec_trk_jets = m_tools.sort_particles(vec_trk_jets);
01511 vec_std_jets = m_tools.sort_particles(vec_std_jets);
01512
01513
01514
01515 if(m_switch_cjet_between_fwdjets){
01516 m_cutvalue_cjet_eta_max = 5.0;
01517 }
01518
01519 if(m_flag_cjv_track_jets==0){
01520 vec_central_jets = m_tools.pt_eta_cut( vec_std_jets,
01521 m_cutvalue_cjv_stdjet_pt_min*GeV, -1,
01522 0.0, m_cutvalue_cjet_eta_max);
01523 }
01524 else if(m_flag_cjv_track_jets==1){
01525 vec_central_jets = m_tools.pt_eta_cut( vec_std_jets,
01526 m_cutvalue_cjv_stdjet_pt_min*GeV, -1,
01527 0.0, 2.5);
01528 }
01529 else if(m_flag_cjv_track_jets==2){
01530 vec_central_jets = m_tools.pt_eta_cut( vec_trk_jets,
01531 m_cutvalue_cjv_trkjet_pt_min*GeV, -1,
01532 0.0, 2.5);
01533 }
01534 else if(m_flag_cjv_track_jets==3){
01535 vec_central_jets = m_tools.pt_eta_cut( vec_trk_jets,
01536 m_cutvalue_cjv_trkjet_pt_min*GeV, -1,
01537 0.0, 2.5);
01538
01539 vector<MyParticle*>
01540 tmp_std_jets = m_tools.pt_eta_cut( vec_std_jets,
01541 m_cutvalue_cjv_stdjet_pt_min*GeV, -1,
01542 2.5, m_cutvalue_cjet_eta_max);
01543
01544 vec_central_jets = m_tools.append_vector(vec_central_jets, tmp_std_jets);
01545 }
01546 else if(m_flag_cjv_track_jets==4){
01547 vec_central_jets = m_tools.pt_eta_cut( vec_std_jets,
01548 m_cutvalue_cjv_stdjet_pt_min*GeV, -1,
01549 2.5, m_cutvalue_cjet_eta_max);
01550
01551 }
01552 else if(m_flag_cjv_track_jets==5){
01553 vec_central_jets = m_tools.pt_eta_cut( vec_trk_jets,
01554 m_cutvalue_cjv_trkjet_pt_min*GeV, -1,
01555 0.0, 2.5);
01556
01557 vector<MyParticle*>
01558 tmp_std_jets = m_tools.pt_eta_cut( vec_std_jets,
01559 m_cutvalue_cjv_stdjet_pt_min*GeV, -1,
01560 0.0, m_cutvalue_cjet_eta_max);
01561
01562 vec_central_jets = m_tools.append_vector(vec_central_jets, tmp_std_jets);
01563
01564 }
01565 else if(m_flag_cjv_track_jets==-1){
01566
01567 vec_central_jets = m_tools.pt_eta_cut( vec_trk_jets, -1, -1, 0.0, 2.5);
01568
01569
01570 vector<MyParticle*>
01571 tmp_std_jets = m_tools.pt_eta_cut( vec_std_jets, -1, -1, 0.0, 2.5);
01572
01573 vec_central_jets = m_tools.append_vector(vec_central_jets, tmp_std_jets);
01574 }
01575 else{
01576 cerr << "Error: in build_centraljet_vector()" << endl
01577 << " wrong option: flag_cjv_track_jets = "
01578 << m_flag_cjv_track_jets
01579 << endl;
01580 }
01581
01582 return vec_central_jets;
01583
01584 }
01585
01586
01587
01588
01589
01590
01591
01592
01593 void
01594 MyHtoWWAnalysis::cut_based_analysis( vector<MyParticle*> vec_e_in,
01595 vector<MyParticle*> vec_mu_in,
01596 vector<MyParticle*> vec_jet_in,
01597 vector<MyParticle*> vec_track_jet_in,
01598 MyMissingEt missinget_in,
01599 MyTrigger trigger) {
01600
01601
01602
01603
01604
01605
01606
01607 nb_events[0]++;
01608
01609
01610
01611
01612
01613
01614 vector<MyParticle*> vec_leptons;
01615
01616
01617 vec_leptons = m_tools.append_vector(vec_e_in,vec_mu_in);
01618 vec_leptons = m_tools.sort_particles(vec_leptons);
01619 m_tools.check_order(vec_leptons);
01620
01621
01622 if(vec_leptons.size()>2){
01623 vec_leptons.resize(2);
01624 }
01625
01626 if(vec_leptons.size()>2){
01627 cout << "ERROR: vector vec_leptons to long" << endl;
01628 }
01629
01630
01631
01632
01633
01634
01635
01636
01637
01638
01639
01640
01641
01642
01643
01644
01645
01646
01647
01648
01649
01650
01651
01652
01653 vector<MyVBFCandidate>
01654 vec_candidates = build_candidates(vec_jet_in, vec_leptons, missinget_in);
01655
01656
01657 for (unsigned iCand=0; iCand<vec_candidates.size(); iCand++){
01658 v_cut_candidates[0].push_back( vec_candidates[iCand] );
01659 }
01660
01661
01662
01663
01664
01665
01666 bool return_value;
01667
01668 for(int k=1; k<=nb_cuts; k++) {
01669
01670 return_value=0;
01671
01672 if((cuts[k])=="trigger"){
01673
01674 return_value = cut_offline_trigger(vec_e_in, vec_mu_in);
01675
01676
01677 }
01678 else if((cuts[k])=="nb_objects"){
01679
01680 return_value = cut_nb_objects(vec_e_in, vec_mu_in, vec_jet_in);
01681 }
01682 else if((cuts[k])=="nb_leptons"){
01683
01684 return_value = cut_nb_leptons(vec_e_in, vec_mu_in);
01685 }
01686 else if((cuts[k])=="nb_jets"){
01687
01688 return_value = cut_nb_jets(vec_jet_in);
01689 }
01690 else if((cuts[k])=="bjet_veto"){
01691
01692 return_value = cut_bjet_veto(vec_jet_in);
01693 }
01694
01695
01696
01697
01698 else{
01699 continue;
01700 }
01701
01702 if(return_value==false){
01703 return;
01704 }
01705
01706
01707
01708
01709
01710
01711
01712 nb_cuts_applied++;
01713 nb_events[k]++;
01714 flag_evt_selected[k]=true;
01715
01716 for (unsigned iCand=0; iCand<vec_candidates.size(); iCand++){
01717 v_cut_candidates[k].push_back( vec_candidates[iCand] );
01718 }
01719
01720 }
01721
01722
01723
01724
01725
01726
01727 vector<MyVBFCandidate> selected_candidates;
01728
01729 for (unsigned int iCand=0; iCand<vec_candidates.size(); iCand++){
01730
01731 if( !select_candidate(vec_candidates[iCand]) ){
01732 continue;
01733 }
01734
01735 selected_candidates.push_back(vec_candidates[iCand]);
01736 }
01737
01738
01739
01740
01741
01742
01743 MyVBFCandidate final_candidate;
01744
01745 if(selected_candidates.size()<1){
01746 return;
01747 }
01748 else if(selected_candidates.size()==1){
01749 final_candidate = selected_candidates[0];
01750 }
01751 else if(selected_candidates.size()>1){
01752 final_candidate = choose_candidate( selected_candidates );
01753 }
01754 else{
01755 cerr << "ERROR: in method cut_based_analysis" << endl
01756 << " something got screwed in selected_candidates vector"
01757 << endl;
01758 }
01759
01760 v_cut_candidates[nb_cuts_max+1].push_back( final_candidate );
01761
01762
01763
01764
01765
01766
01767
01768
01769
01770 return;
01771 }
01772
01773
01774
01775
01776
01777
01778
01779 MyVBFCandidate
01780 MyHtoWWAnalysis::choose_candidate(vector<MyVBFCandidate> candidates){
01781
01782 if(candidates.size()<2){
01783 cerr << "ERROR: in method choose_candidate"
01784 << " couldn't choose between less than 2 candiddates" << endl;
01785 exit(1);
01786 }
01787
01788 MyMissingEt missinget = candidates[0].get_missinget();
01789
01790
01791 vector<MyParticlePair> vec_tagjet_pairs = get_tagjet_pairs( candidates );
01792 vector<MyParticlePair> vec_lepton_pairs = get_lepton_pairs( candidates );
01793
01794 h_multi_tagjet_pairs_nb->Fill(vec_tagjet_pairs.size(),weight);
01795 h_multi_lepton_pairs_nb->Fill(vec_lepton_pairs.size(),weight);
01796
01797
01798 MyParticlePair chosen_tagjet_pair;
01799 MyParticlePair chosen_lepton_pair;
01800
01801
01802
01803
01804 if(vec_tagjet_pairs.size()==1){
01805 chosen_tagjet_pair = vec_tagjet_pairs[0];
01806 }
01807 else if(vec_tagjet_pairs.size()>1){
01808
01809 double pt_max = 0;
01810 int index_max = -1;
01811
01812 for (unsigned int k=0; k<vec_tagjet_pairs.size(); k++) {
01813
01814 double pt = TMath::Abs(vec_tagjet_pairs[k].get_particle1()->tlv().Pt())
01815 + TMath::Abs(vec_tagjet_pairs[k].get_particle2()->tlv().Pt());
01816
01817 if(k==0){
01818 index_max = k;
01819 pt_max = pt;
01820 }
01821 else if(pt > pt_max){
01822 index_max = k;
01823 pt_max = pt;
01824 }
01825 }
01826
01827 chosen_tagjet_pair = vec_tagjet_pairs[index_max];
01828 }
01829 else{
01830 cerr << "ERROR: in method choose_candidate" << endl
01831 << " something got screwed in selected_candidates vector"
01832 << endl;
01833 }
01834
01835
01836
01837
01838 if(vec_lepton_pairs.size()==1){
01839 chosen_lepton_pair = vec_lepton_pairs[0];
01840 }
01841 else if(vec_lepton_pairs.size()>1){
01842
01843 double pt_max = 0;
01844 int index_max = -1;
01845
01846 for (unsigned int k=0; k<vec_lepton_pairs.size(); k++) {
01847
01848 double pt = TMath::Abs(vec_lepton_pairs[k].get_particle1()->tlv().Pt())
01849 + TMath::Abs(vec_lepton_pairs[k].get_particle2()->tlv().Pt());
01850
01851 if(k==0){
01852 index_max = k;
01853 pt_max = pt;
01854 }
01855 else if(pt > pt_max){
01856 index_max = k;
01857 pt_max = pt;
01858 }
01859 }
01860
01861 chosen_lepton_pair = vec_lepton_pairs[index_max];
01862 }
01863 else{
01864 cerr << "ERROR: in method choose_candidate" << endl
01865 << " something got screwed in selected_candidates vector"
01866 << endl;
01867 }
01868
01869 MyVBFCandidate chosen_candidate( chosen_tagjet_pair,
01870 chosen_lepton_pair,
01871 missinget );
01872
01873 return chosen_candidate;
01874
01875 }
01876
01877
01878
01879
01880
01881
01882
01883 vector<MyVBFCandidate>
01884 MyHtoWWAnalysis::build_candidates( vector<MyParticle*> vec_jets,
01885 vector<MyParticle*> vec_leptons,
01886 MyMissingEt missing_et) {
01887
01888
01889
01890 vector<MyVBFCandidate> vec_candidates(0);
01891
01892
01893
01894
01895
01896
01897 if(vec_leptons.size()!=2){
01898
01899 return vec_candidates;
01900 }
01901
01902 if(vec_jets.size()<2){
01903 return vec_candidates;
01904 }
01905
01906 vector<MyParticlePair> vec_jet_pairs;
01907 vector<MyParticlePair> vec_lepton_pairs;
01908
01909
01910
01911
01912
01913
01914 vec_jet_pairs.push_back( MyParticlePair(vec_jets[0],
01915 vec_jets[1]) );
01916
01917
01918
01919
01920
01921
01922
01923
01924
01925
01926
01927
01928
01929 for (unsigned int i=0; i<vec_leptons.size(); i++){
01930 for (unsigned int j=i+1; j<vec_leptons.size(); j++){
01931
01932 if( m_decay_mode=="emu" ){
01933
01934 int pdgId_1 = TMath::Abs( vec_leptons[i]->pdgId() );
01935 int pdgId_2 = TMath::Abs( vec_leptons[j]->pdgId() );
01936
01937 if(pdgId_1 == pdgId_2){
01938 continue;
01939 }
01940
01941
01942
01943 }
01944
01945 vec_lepton_pairs.push_back( MyParticlePair(vec_leptons[i],
01946 vec_leptons[j]) );
01947 }
01948 }
01949
01950
01951
01952
01953 for (unsigned int i=0; i<vec_jet_pairs.size(); i++){
01954 for (unsigned int j=0; j<vec_lepton_pairs.size(); j++){
01955
01956 vec_candidates.push_back( MyVBFCandidate( vec_jet_pairs[i],
01957 vec_lepton_pairs[j],
01958 missing_et)
01959 );
01960 }
01961 }
01962
01963 return vec_candidates;
01964
01965 }
01966
01967
01968
01969
01970
01971
01972
01973 Bool_t
01974 MyHtoWWAnalysis::select_candidate(MyVBFCandidate candidate){
01975
01976
01977
01978 bool return_value;
01979
01980
01981 for(int k=nb_cuts_applied+1; k<=nb_cuts; k++) {
01982
01983
01984
01985 return_value=true;
01986
01987 if((cuts[k])=="lepton_pt"){
01988
01989 return_value = cut_lepton_pt(candidate);
01990 }
01991 else if((cuts[k])=="etmiss"){
01992
01993 return_value = cut_etmiss(candidate);
01994 }
01995 else if((cuts[k])=="leptons_charge"){
01996
01997 return_value = cut_leptons_charge(candidate);
01998 }
01999 else if((cuts[k])=="leptons_dphi"){
02000
02001 return_value = cut_leptons_dphi(candidate);
02002 }
02003 else if((cuts[k])=="leptons_dr"){
02004
02005 return_value = cut_leptons_dr(candidate);
02006 }
02007 else if((cuts[k])=="leptons_theta"){
02008
02009 return_value = cut_leptons_theta(candidate);
02010 }
02011 else if((cuts[k])=="leptons_mass"){
02012
02013 return_value = cut_leptons_mass(candidate);
02014 }
02015 else if((cuts[k])=="leptons_pt"){
02016
02017 return_value = cut_leptons_pt(candidate);
02018 }
02019 else if((cuts[k])=="tau_veto"){
02020
02021 return_value = cut_tau_veto(candidate);
02022 }
02023 else if((cuts[k])=="tagjet_no_bjet"){
02024
02025 return_value = cut_tagjet_no_bjet(candidate);
02026 }
02027 else if((cuts[k])=="jets_pt"){
02028
02029 return_value = cut_jets_pt(candidate);
02030 }
02031 else if((cuts[k])=="jets_hemisphere"){
02032
02033 return_value = cut_jets_hemisphere(candidate);
02034 }
02035 else if((cuts[k])=="jets_deta"){
02036
02037 return_value = cut_jets_deta(candidate);
02038 }
02039 else if((cuts[k])=="jets_dphi"){
02040
02041 return_value = cut_jets_dphi(candidate);
02042 }
02043 else if((cuts[k])=="jets_mass"){
02044
02045 return_value = cut_jets_mass(candidate);
02046 }
02047 else if((cuts[k])=="central_jet_veto"){
02048
02049 return_value = cut_central_jet_veto(candidate);
02050 }
02051 else if((cuts[k])=="leptons_jets_deta"){
02052
02053 return_value = cut_leptons_jets_deta(candidate);
02054 }
02055 else if((cuts[k])=="transverse_mass"){
02056
02057 return_value = cut_transverse_mass(candidate);
02058 }
02059 else if((cuts[k])=="pt_balance"){
02060
02061 return_value = cut_pt_balance(candidate);
02062 }
02063 else {
02064 cout << "ERROR: Cut "<< cuts[k] << " unknown!" <<endl;
02065 }
02066
02067 if(return_value==false){
02068 return false;
02069 }
02070
02071
02072
02073
02074
02075
02076
02077 nb_candidates[k]++;
02078
02079 if(!flag_evt_selected[k]){
02080 nb_events[k]++;
02081 flag_evt_selected[k]=true;
02082 }
02083
02084 v_cut_candidates[k].push_back( candidate );
02085
02086 }
02087
02088 v_cut_candidates[nb_cuts_max].push_back( candidate );
02089
02090 return true;
02091 }
02092
02093
02094
02095
02096
02097
02098
02099
02100 bool
02101 MyHtoWWAnalysis::cut_online_trigger( std::vector<MyParticle*> vec_e,
02102 std::vector<MyParticle*> vec_mu,
02103 MyTrigger trigger ){
02104
02105 int event_flavour(0);
02106
02107
02108
02109
02110 bool triggerdecision_EF_mu20i;
02111 bool triggerdecision_EF_e25i;
02112
02113 bool triggerdecisionsinglemuon;
02114 bool triggerdecisionsingleelectron;
02115 bool triggerdecisiondimuon;
02116 bool triggerdecisiondielectron;
02117 bool triggerdecisionelectronmuon;
02118 bool triggerdecisionfinal;
02119
02120 double pt_e(0);
02121 double pt_mu(0);
02122
02123 triggerdecision_EF_mu20i = trigger.isTriggered("EF_mu20i",3);
02124 triggerdecision_EF_e25i = trigger.isTriggered("EF_e25i",3);
02125
02126
02127
02128
02129 triggerdecisionsinglemuon=false;
02130 if ((m_tools.pt_eta_cut(vec_mu, 20.0/GeV, -1.0, 0.0, 3.5)).size()>=1
02131
02132 ){
02133 triggerdecisionsinglemuon=true;
02134 pt_mu = (vec_mu[0])->tlv().Pt();
02135 }
02136
02137 triggerdecisiondimuon=false;
02138 if ((m_tools.pt_eta_cut(vec_mu, 10.0/GeV, -1.0, 0.0, 3.5)).size()>=2){
02139 triggerdecisiondimuon=true;
02140 }
02141
02142 triggerdecisionsingleelectron=false;
02143 if ((m_tools.pt_eta_cut(vec_e, 25.0/GeV, -1.0, 0.0, 3.5)).size()>=1
02144
02145 ){
02146 if(TMath::Abs((vec_e[0])->tlv().Et()-(vec_e[0])->tlv().Pt())>0.1){
02147 cerr<<" ET: "<< (vec_e[0])->tlv().Et()<<" pt: "<<(vec_e[0])->tlv().Pt()<<endl;
02148
02149 }
02150 triggerdecisionsingleelectron=true;
02151 pt_e = (vec_e[0])->tlv().Pt();
02152 }
02153
02154 triggerdecisiondielectron=false;
02155 if ((m_tools.pt_eta_cut(vec_e, 15.0/GeV, -1.0, 0.0, 3.5)).size()>=2){
02156 triggerdecisiondielectron=true;
02157 }
02158
02159 triggerdecisionelectronmuon=false;
02160 if ((m_tools.pt_eta_cut(vec_e, 15.0/GeV, -1.0, 0.0, 3.5)).size()>=1
02161 && (m_tools.pt_eta_cut(vec_mu, 10.0/GeV, -1.0, 0.0, 3.5)).size()>=1){
02162 triggerdecisionelectronmuon=true;
02163 }
02164
02165 triggerdecisionfinal = triggerdecisionsingleelectron
02166 || triggerdecisionsinglemuon
02167
02168
02169
02170 ;
02171
02172 if(!triggerdecision_EF_mu20i && !triggerdecision_EF_e25i){
02173 h_trigger_online->Fill(0., weight);
02174 h_trigger_combined->Fill(0., weight);
02175 event_flavour=0;
02176 }
02177 else if(triggerdecision_EF_mu20i && !triggerdecision_EF_e25i){
02178 h_trigger_online->Fill(2., weight);
02179 if(triggerdecisionsinglemuon){
02180 h_trigger_combined->Fill(2., weight);
02181 event_flavour=2;
02182 }
02183 else{
02184 h_trigger_combined->Fill(0., weight);
02185 event_flavour=0;
02186 }
02187 }
02188 else if(!triggerdecision_EF_mu20i && triggerdecision_EF_e25i){
02189 h_trigger_online->Fill(1., weight);
02190 if(triggerdecisionsingleelectron){
02191 h_trigger_combined->Fill(1., weight);
02192 event_flavour=1;
02193 }
02194 else{
02195 h_trigger_combined->Fill(0., weight);
02196 event_flavour=0;
02197 }
02198 }
02199 else if(triggerdecision_EF_mu20i && triggerdecision_EF_e25i){
02200 if(vec_mu.size()>0)pt_mu = (vec_mu[0])->tlv().Pt();
02201 if(vec_e.size()>0)pt_e = (vec_e[0])->tlv().Et();
02202 h_trigger_online->Fill(3., weight);
02203
02204
02205
02206 if(triggerdecisionsingleelectron && triggerdecisionsinglemuon){
02207 h_trigger_combined->Fill(3., weight);
02208 if(pt_e>pt_mu){
02209 event_flavour=1;
02210 }
02211 else{
02212 event_flavour=2;
02213 }
02214 }
02215 else if(triggerdecisionsingleelectron && !triggerdecisionsinglemuon){
02216 h_trigger_combined->Fill(1., weight);
02217 event_flavour=1;
02218 }
02219 else if(!triggerdecisionsingleelectron && triggerdecisionsinglemuon){
02220 h_trigger_combined->Fill(2., weight);
02221 event_flavour=2;
02222 }
02223 else{
02224 h_trigger_combined->Fill(0., weight);
02225 event_flavour=0;
02226 }
02227
02228 }
02229
02230
02231
02232
02233
02234
02235
02236
02237
02238
02239
02240
02241
02242
02243
02244
02245 else{
02246 cout<<"Error in trigger "<<endl;
02247 }
02248
02249
02250
02251
02252
02253
02254
02255
02256
02257
02258
02259
02260
02261
02262 if(event_flavour==0){
02263 return false;
02264 }
02265
02266
02267 if (!triggerdecisionfinal){
02268 return false;
02269 }
02270
02271
02272 return true;
02273 }
02274
02275
02276
02277
02278
02279
02280
02281
02282
02283
02284 bool
02285 MyHtoWWAnalysis::cut_offline_trigger( std::vector<MyParticle*> vec_e,
02286 std::vector<MyParticle*> vec_mu){
02287
02288 bool trigger_singlemuon;
02289 bool trigger_singleelectron;
02290 bool trigger_dimuon;
02291 bool trigger_dielectron;
02292 bool trigger_electronmuon;
02293 bool trigger_final;
02294
02295
02296 trigger_singlemuon=false;
02297 if ((m_tools.pt_eta_cut(vec_mu, 20.0*GeV, -1, 0.0, 2.5)).size()>=1){
02298 trigger_singlemuon=true;
02299 h_offline_trigger->Fill(0.);
02300 }
02301
02302
02303 trigger_dimuon=false;
02304 if ((m_tools.pt_eta_cut(vec_mu, 10.0*GeV, -1, 0.0, 2.5)).size()>=2){
02305 trigger_dimuon=true;
02306 h_offline_trigger->Fill(1.);
02307 }
02308
02309
02310 trigger_singleelectron=false;
02311 if ((m_tools.pt_eta_cut(vec_e, 25.0*GeV, -1, 0.0, 2.5)).size()>=1){
02312 trigger_singleelectron=true;
02313 h_offline_trigger->Fill(2.);
02314 }
02315
02316
02317 trigger_dielectron=false;
02318 if ((m_tools.pt_eta_cut(vec_e, 15.0*GeV, -1, 0.0, 2.5)).size()>=2){
02319 trigger_dielectron=true;
02320 h_offline_trigger->Fill(3.);
02321 }
02322
02323
02324 trigger_electronmuon=false;
02325 if ((m_tools.pt_eta_cut(vec_e, 15.0*GeV, -1, 0.0, 2.5)).size()>=1
02326 && (m_tools.pt_eta_cut(vec_mu, 10.0*GeV, -1, 0.0, 2.5)).size()>=1){
02327 trigger_electronmuon=true;
02328 h_offline_trigger->Fill(4.);
02329 }
02330
02331 trigger_final = (trigger_singleelectron || trigger_singlemuon ||
02332 trigger_dielectron || trigger_dimuon ||
02333 trigger_electronmuon
02334 );
02335
02336
02337
02338 if (!trigger_final){
02339 return false;
02340 }
02341
02342 h_offline_trigger->Fill(5.);
02343 return true;
02344 }
02345
02346
02347
02348
02349
02350
02351
02352
02353 bool
02354 MyHtoWWAnalysis::cut_nb_objects( vector<MyParticle*> vec_e,
02355 vector<MyParticle*> vec_mu,
02356 vector<MyParticle*> vec_jet){
02357
02358 if (m_decay_mode=="ee"){
02359 if (vec_e.size()<2) return false;
02360 }
02361 else if (m_decay_mode=="mumu"){
02362 if (vec_mu.size()<2) return false;
02363 }
02364 else if (m_decay_mode=="emu"){
02365 if (vec_e.size()<1 || vec_mu.size()<1) return false;
02366 }
02367 else if (m_decay_mode=="ll"){
02368
02369 if ((vec_e.size() + vec_mu.size())<2) return false;
02370 }
02371 else {
02372 cerr << "ERROR: in method cut_nb_objects: "
02373 << "unknown decay mode: "<< m_decay_mode <<endl;
02374 return false;
02375 }
02376
02377 if(vec_jet.size()<2){
02378 return false;
02379 }
02380
02381 return true;
02382 }
02383
02384
02385
02386
02387
02388
02389
02390
02391 bool
02392 MyHtoWWAnalysis::cut_nb_leptons( vector<MyParticle*> vec_e,
02393 vector<MyParticle*> vec_mu){
02394
02395
02396
02397
02398
02399
02400
02401
02402
02403
02404
02405
02406
02407
02408
02409
02410
02411
02412
02413
02414
02415
02416
02417
02418
02419
02420
02421
02422
02423
02424
02425
02426
02427
02428
02429
02430
02431
02432
02433
02434 vector<MyParticle*> vec_leptons;
02435 vec_leptons=m_tools.append_vector(vec_e,vec_mu);
02436 vec_leptons = m_tools.sort_particles(vec_leptons);
02437 m_tools.check_order(vec_leptons);
02438
02439
02440
02441
02442
02443 if(vec_leptons.size()!=2){
02444 return false;
02445 }
02446
02447 MyParticlePair leptonpair(vec_leptons[0], vec_leptons[1]);
02448
02449 if(m_decay_mode!="ll" && m_decay_mode!=leptonpair.get_lepton_flavors()){
02450 return false;
02451 }
02452
02453
02454 return true;
02455 }
02456
02457
02458
02459
02460
02461
02462
02463 bool
02464 MyHtoWWAnalysis::cut_nb_jets(vector<MyParticle*> vec_jet){
02465
02466 if(vec_jet.size()<2){
02467 return false;
02468 }
02469
02470 return true;
02471 }
02472
02473
02474
02475
02476
02477
02478
02479 bool
02480 MyHtoWWAnalysis::cut_bjet_veto( vector<MyParticle*> vec_jet ){
02481
02482 vector<MyParticle*> vec_bjet_cands =
02483 m_tools.pt_eta_cut(vec_jet, 20.0*GeV, -1, 0.0, 2.5);
02484
02485 for (unsigned int k=0; k<vec_bjet_cands.size(); k++) {
02486
02487 double bweight = ((MyParticleJet*)(vec_bjet_cands[k]))->b_tag_weight();
02488
02489 if( bweight > m_cutvalue_bjet_weight_max ){
02490 return false;
02491 }
02492 }
02493
02494
02495 return true;
02496
02497 }
02498
02499
02500
02501
02502
02503
02504
02505 bool
02506 MyHtoWWAnalysis::cut_etmiss(MyMissingEt missing_et){
02507
02508 if (missing_et.met() < m_cutvalue_etmiss_min){
02509 return false;
02510 }
02511
02512 return true;
02513 }
02514
02515 bool
02516 MyHtoWWAnalysis::cut_etmiss(MyVBFCandidate candidate){
02517
02518 TString type = candidate.get_lepton_pair().get_lepton_flavors();
02519
02520 if( type!="ee" && type !="mumu" ){
02521 return true;
02522 }
02523
02524
02525 if (candidate.get_missinget().met() < m_cutvalue_etmiss_min){
02526 return false;
02527 }
02528
02529 return true;
02530 }
02531
02532
02533
02534
02535
02536
02537
02538
02539 bool
02540 MyHtoWWAnalysis::cut_lepton_pt(MyVBFCandidate candidate){
02541
02542 double pt1 = candidate.get_lepton_pair().get_particle1()->tlv().Pt();
02543 double pt2 = candidate.get_lepton_pair().get_particle2()->tlv().Pt();
02544
02545
02546 if(m_cutvalue_lepton1_pt_min > -1){
02547 if( TMath::Max(pt1,pt2) < m_cutvalue_lepton1_pt_min){
02548 return false;
02549 }
02550 }
02551
02552 if(m_cutvalue_lepton2_pt_min > -1){
02553 if( TMath::Min(pt1,pt2) < m_cutvalue_lepton2_pt_min){
02554 return false;
02555 }
02556 }
02557
02558 if(m_cutvalue_lepton_pt_max > -1){
02559 if( pt1 > m_cutvalue_lepton_pt_max ||
02560 pt2 > m_cutvalue_lepton_pt_max ){
02561
02562 return false;
02563 }
02564 }
02565
02566 return true;
02567 }
02568
02569
02570
02571
02572
02573
02574
02575 bool
02576 MyHtoWWAnalysis::cut_leptons_charge(MyVBFCandidate candidate){
02577
02578 double charge1 = candidate.get_lepton_pair().get_particle1()->charge();
02579 double charge2 = candidate.get_lepton_pair().get_particle2()->charge();
02580
02581 if((charge1*charge2) > 0){
02582 return false;
02583 }
02584
02585 return true;
02586 }
02587
02588
02589
02590
02591
02592
02593
02594
02595 bool
02596 MyHtoWWAnalysis::cut_leptons_dphi(MyVBFCandidate candidate){
02597
02598 double dphi = TMath::Abs( candidate.get_lepton_pair().DeltaPhi() );
02599
02600
02601 if( dphi > m_cutvalue_leptons_dphi_max ){
02602 return false;
02603 }
02604
02605 return true;
02606 }
02607
02608
02609
02610
02611
02612
02613
02614 bool
02615 MyHtoWWAnalysis::cut_leptons_dr(MyVBFCandidate candidate){
02616
02617 double dr = TMath::Abs( candidate.get_lepton_pair().DeltaR() );
02618
02619 if( dr > m_cutvalue_leptons_dr_max ){
02620 return false;
02621 }
02622
02623 return true;
02624 }
02625
02626
02627
02628
02629
02630
02631
02632 bool
02633 MyHtoWWAnalysis::cut_leptons_theta(MyVBFCandidate candidate){
02634
02635 double costheta = TMath::Abs( candidate.get_lepton_pair().tlv().CosTheta() );
02636
02637 if( costheta < m_cutvalue_leptons_costheta_min ){
02638 return false;
02639 }
02640
02641 return true;
02642 }
02643
02644
02645
02646
02647
02648
02649
02650 bool
02651 MyHtoWWAnalysis::cut_leptons_mass(MyVBFCandidate candidate){
02652
02653 double mass = candidate.get_lepton_pair().M();
02654 TString type = candidate.get_lepton_pair().get_lepton_flavors();
02655
02656 double cutvalue = m_cutvalue_leptons_mass_max;
02657
02658
02659 if( type=="ee" || type =="mumu" ){
02660 cutvalue = 75.0;
02661 }
02662
02663 if( mass > cutvalue ){
02664 return false;
02665 }
02666
02667 return true;
02668 }
02669
02670
02671
02672
02673
02674
02675
02676 bool
02677 MyHtoWWAnalysis::cut_leptons_pt(MyVBFCandidate candidate){
02678
02679 double pt = candidate.get_lepton_pair().tlv().Pt();
02680
02681 if( pt > m_cutvalue_leptons_pt_max ){
02682 return false;
02683 }
02684
02685 return true;
02686 }
02687
02688
02689
02690
02691
02692
02693
02694 bool
02695 MyHtoWWAnalysis::cut_tagjet_no_bjet(MyVBFCandidate candidate){
02696
02697 double bweight1 = ((MyParticleJet*)(candidate.get_tagjet_pair().get_particle1()))->b_tag_weight();
02698 double bweight2 = ((MyParticleJet*)(candidate.get_tagjet_pair().get_particle2()))->b_tag_weight();
02699
02700 if( bweight1 > m_cutvalue_bjet_weight_max ||
02701 bweight2 > m_cutvalue_bjet_weight_max ){
02702
02703 return false;
02704 }
02705
02706 return true;
02707 }
02708
02709
02710
02711
02712
02713
02714
02715 bool
02716 MyHtoWWAnalysis::cut_jets_pt(MyVBFCandidate candidate){
02717
02718 double pt1 = candidate.get_tagjet_pair().get_particle1()->tlv().Pt();
02719 double pt2 = candidate.get_tagjet_pair().get_particle2()->tlv().Pt();
02720
02721 if( TMath::Max(pt1,pt2) < m_cutvalue_jet1_pt_min ||
02722 TMath::Min(pt1,pt2) < m_cutvalue_jet2_pt_min ){
02723
02724 return false;
02725 }
02726
02727 return true;
02728 }
02729
02730
02731
02732
02733
02734
02735
02736 bool
02737 MyHtoWWAnalysis::cut_jets_hemisphere(MyVBFCandidate candidate){
02738
02739 double etaprod = candidate.get_tagjet_pair().EtaProd();
02740
02741 if(etaprod > 0){
02742 return false;
02743 }
02744
02745 return true;
02746
02747 }
02748
02749
02750
02751
02752
02753
02754
02755 bool
02756 MyHtoWWAnalysis::cut_jets_deta(MyVBFCandidate candidate){
02757
02758 double deta = candidate.get_tagjet_pair().AbsDeltaEta();
02759
02760 if(deta < m_cutvalue_jets_absdeta_min){
02761 return false;
02762 }
02763
02764 return true;
02765
02766 }
02767
02768
02769
02770
02771
02772
02773
02774 bool
02775 MyHtoWWAnalysis::cut_jets_dphi(MyVBFCandidate candidate){
02776
02777 double dphi = TMath::Abs(candidate.get_tagjet_pair().DeltaPhi());
02778
02779 if(dphi > m_cutvalue_jets_absdphi_max){
02780 return false;
02781 }
02782
02783 return true;
02784
02785 }
02786
02787
02788
02789
02790
02791
02792
02793 bool
02794 MyHtoWWAnalysis::cut_jets_mass(MyVBFCandidate candidate){
02795
02796 double mass = candidate.get_tagjet_pair().M();
02797
02798 if(m_cutvalue_jets_mass_min > -1){
02799 if(mass < m_cutvalue_jets_mass_min){
02800 return false;
02801 }
02802 }
02803
02804 if(m_cutvalue_jets_mass_max > -1){
02805 if(mass > m_cutvalue_jets_mass_max){
02806 return false;
02807 }
02808 }
02809
02810 return true;
02811
02812 }
02813
02814
02815
02816
02817
02818
02819
02820
02821 bool
02822 MyHtoWWAnalysis::cut_central_jet_veto(MyVBFCandidate candidate){
02823
02824 int id_jet3;
02825 int centraljetcount = 0;
02826
02827 double dr1(1000.);
02828 double dr2(1000.);
02829
02830 bool centraljet = false;
02831 bool centraljet_at_all = false;
02832 bool cj_between_fwdjets = false;
02833
02834 TLorentzVector tlv_central_jet;
02835
02836
02837
02838 if(m_switch_cjet_between_fwdjets){
02839
02840 m_cutvalue_cjet_eta_max = 5.0;
02841 }
02842
02843
02844 vector<MyParticle*> vec_centraljets
02845 = m_tools.pt_eta_cut( v_centraljet_ana, 5.0*GeV, -1,
02846 0.0, m_cutvalue_cjet_eta_max);
02847
02848 int id_jet1 = candidate.get_tagjet_pair().get_particle1()->index();
02849 int id_jet2 = candidate.get_tagjet_pair().get_particle2()->index();
02850
02851 TLorentzVector tlv_fwd_jet1 = candidate.get_tagjet_pair().get_particle1()->tlv();
02852 TLorentzVector tlv_fwd_jet2 = candidate.get_tagjet_pair().get_particle2()->tlv();
02853
02854 double fwd_jet_eta_min = TMath::Min(tlv_fwd_jet1.Eta(),tlv_fwd_jet2.Eta());
02855 double fwd_jet_eta_max = TMath::Max(tlv_fwd_jet1.Eta(),tlv_fwd_jet2.Eta());
02856
02857
02858
02859
02860 int nb_std_cjet_cands(0);
02861 int nb_trk_cjet_cands(0);
02862
02863 for (unsigned int k=0; k<vec_centraljets.size(); k++){
02864
02865 tlv_central_jet = (vec_centraljets[k])->tlv();
02866 dr1 = tlv_central_jet.DeltaR(tlv_fwd_jet1);
02867 dr2 = tlv_central_jet.DeltaR(tlv_fwd_jet2);
02868
02869 h_fwj_cj_dr_nocut->Fill(dr1);
02870 h_fwj_cj_dr_nocut->Fill(dr2);
02871
02872
02873 if ( TString(vec_centraljets[k]->type()).Contains("particle_jet") ){
02874
02875 id_jet3 = (vec_centraljets[k])->index();
02876 if (id_jet3==id_jet1 || id_jet3==id_jet2){
02877 continue;
02878 }
02879 nb_std_cjet_cands++;
02880 }
02881 else if( vec_centraljets[k]->type() == "track_jet" ){
02882
02883 double dr_match(0.1);
02884 if ( dr1<dr_match || dr2<dr_match ){
02885 continue;
02886 }
02887 nb_trk_cjet_cands++;
02888 }else{
02889 cerr << "Error: in cut_central_jet_veto" << endl
02890 << " object \'" << vec_centraljets[k]->type()
02891 << "\' is not a jet" << endl;
02892 exit(1);
02893 }
02894
02895
02896
02897
02898 if ( TString(vec_centraljets[k]->type()).Contains("particle_jet") ){
02899 int n_trks_from_primvert = 0;
02900 MyParticleJet *cjet = (MyParticleJet*)(vec_centraljets[k]);
02901
02902 for (int itrk=0; itrk<cjet->nb_tracks(); itrk++) {
02903
02904 if(cjet->tracks_vertex_index(itrk) == m_primary_vertex_index){
02905 n_trks_from_primvert++;
02906 }
02907 }
02908
02909 t_cutopt_std_jet->Fill( weight,
02910 nb_std_cjet_cands,
02911 tlv_central_jet.Pt(),
02912 tlv_central_jet.Eta(),
02913 tlv_central_jet.Phi(),
02914 cjet->nb_tracks(),
02915 n_trks_from_primvert,
02916 cjet->tracks_ptratio(m_primary_vertex_index),
02917 cjet->tracks_cmsptratio(m_primary_vertex_index));
02918 }
02919
02920 if ( vec_centraljets[k]->type() == "track_jet" ){
02921
02922 t_cutopt_trk_jet->Fill(weight,
02923 nb_trk_cjet_cands,
02924 tlv_central_jet.Pt(),
02925 tlv_central_jet.Eta(),
02926 tlv_central_jet.Phi());
02927 }
02928
02929
02930 if( TString(vec_centraljets[k]->type()).Contains("particle_jet")
02931 && TMath::Abs(vec_centraljets[k]->tlv().Eta())<2.5 ){
02932
02933 if(m_cutvalue_cjv_ptratio_min>-1){
02934
02935 double tracks_ptratio = ((MyParticleJet*)(vec_centraljets[k]))->tracks_ptratio(m_primary_vertex_index);
02936 if(tracks_ptratio<m_cutvalue_cjv_ptratio_min){
02937 continue;
02938 }
02939 }
02940
02941 if(m_cutvalue_cjv_cmsptratio_min>-1){
02942
02943 double tracks_cmsptratio = ((MyParticleJet*)(vec_centraljets[k]))->tracks_cmsptratio(m_primary_vertex_index);
02944 if(tracks_cmsptratio<m_cutvalue_cjv_cmsptratio_min){
02945 continue;
02946 }
02947 }
02948
02949
02950 if(m_flag_cjv_stdjet_corrpt){
02951
02952 double cj_corrpt = ((MyParticleJet*)(vec_centraljets[k]))->pt_pucorr(m_primary_vertex_index);
02953 if(cj_corrpt<m_cutvalue_cjv_stdjet_pt_min*GeV){
02954 continue;
02955 }
02956 }
02957
02958 if(m_flag_cjv_trkstdjet_match){
02959
02960 MyParticle* tmp_jet = NULL;
02961 tmp_jet = m_tools.find_matching_particle(vec_centraljets[k],
02962 v_trackjet_forcjvmatch,
02963 m_cutvalue_jet_match_dR,0,0);
02964
02965 if(tmp_jet == NULL){
02966 continue;
02967 }
02968 }
02969 }
02970
02971
02972
02973
02974
02975
02976 h_centraljet_cand_pt->Fill(tlv_central_jet.Pt()*invGeV,weight);
02977 h_centraljet_cand_eta->Fill(tlv_central_jet.Eta(),weight);
02978 h_centraljet_cand_phi->Fill(tlv_central_jet.Phi(),weight);
02979
02980 if ( TString(vec_centraljets[k]->type()).Contains("particle_jet") ){
02981 h_centraljet_std_cand_pt->Fill(tlv_central_jet.Pt()*invGeV,weight);
02982 h_centraljet_std_cand_eta->Fill(tlv_central_jet.Eta(),weight);
02983 h_centraljet_std_cand_phi->Fill(tlv_central_jet.Phi(),weight);
02984 h_centraljet_std_cand_ntrks->Fill(tlv_central_jet.Phi(),weight);
02985 }
02986 else if( vec_centraljets[k]->type() == "track_jet" ){
02987 h_centraljet_trk_cand_pt->Fill(tlv_central_jet.Pt()*invGeV,weight);
02988 h_centraljet_trk_cand_eta->Fill(tlv_central_jet.Eta(),weight);
02989 h_centraljet_trk_cand_phi->Fill(tlv_central_jet.Phi(),weight);
02990 }
02991
02992 centraljet = false;
02993 cj_between_fwdjets = false;
02994
02995
02996
02997
02998
02999 h_fwj_cj_dr->Fill(dr1,weight);
03000 h_fwj_cj_dr->Fill(dr2,weight);
03001
03002
03003 if ( (fwd_jet_eta_min < tlv_central_jet.Eta()) &&
03004 (fwd_jet_eta_max > tlv_central_jet.Eta()) ){
03005
03006 cj_between_fwdjets = true;
03007 }
03008
03009
03010 if( m_switch_cjet_between_fwdjets && cj_between_fwdjets ){
03011 centraljet = true;
03012 }
03013 else if( !m_switch_cjet_between_fwdjets ){
03014 centraljet = true;
03015 }
03016 else {
03017 centraljet = false;
03018 }
03019
03020
03021 if(centraljet){
03022
03023
03024
03025 centraljet_at_all = true;
03026 centraljetcount++;
03027
03028 h_centraljet_ana_pt->Fill(tlv_central_jet.Pt()*invGeV,weight);
03029 h_centraljet_ana_eta->Fill(tlv_central_jet.Eta(),weight);
03030 h_centraljet_ana_phi->Fill(tlv_central_jet.Phi(),weight);
03031
03032 h_centraljet_ana_zeppvar->Fill( tlv_central_jet.Eta()
03033 - ( tlv_fwd_jet1.Eta()+
03034 tlv_fwd_jet2.Eta())/2,weight);
03035
03036 if( ((TString)(vec_centraljets[k]->type())).Contains("particle_jet") ){
03037 h_centraljet_ana_ntrks->Fill(((MyParticleJet*)(vec_centraljets[k]))->nb_tracks(), weight);
03038 }
03039
03040 }
03041
03042 }
03043
03044
03045 if ( nb_std_cjet_cands==0 ){
03046 t_cutopt_std_jet->Fill(0.,0,0.,0.,0.,0,0,0.);
03047 }
03048 if ( nb_trk_cjet_cands==0 ){
03049 t_cutopt_trk_jet->Fill(0.,0,0.,0.,0.);
03050 }
03051
03052 h_centraljet_cand_nb->Fill(nb_std_cjet_cands+nb_trk_cjet_cands,weight);
03053 h_centraljet_std_cand_nb->Fill(nb_std_cjet_cands,weight);
03054 h_centraljet_trk_cand_nb->Fill(nb_trk_cjet_cands,weight);
03055 h_centraljet_ana_nb->Fill(centraljetcount,weight);
03056
03057
03058 if (centraljet_at_all==true){
03059 return false;
03060 }
03061
03062 return true;
03063 }
03064
03065
03066
03067
03068
03069
03070
03071
03072 bool
03073 MyHtoWWAnalysis::cut_leptons_jets_deta(MyVBFCandidate candidate){
03074
03075 double lepton1_eta = candidate.get_lepton_pair().get_particle1()->tlv().Eta();
03076 double lepton2_eta = candidate.get_lepton_pair().get_particle2()->tlv().Eta();
03077
03078 double jet1_eta = candidate.get_tagjet_pair().get_particle1()->tlv().Eta();
03079 double jet2_eta = candidate.get_tagjet_pair().get_particle2()->tlv().Eta();
03080
03081 double jet_eta_min = TMath::Min(jet1_eta,jet2_eta);
03082 double jet_eta_max = TMath::Max(jet1_eta,jet2_eta);
03083
03084 h_jl_mineta->Fill(TMath::Min(lepton1_eta, lepton2_eta)
03085 - TMath::Min(jet1_eta,jet2_eta),weight);
03086
03087 h_jl_maxeta->Fill(TMath::Max(jet1_eta,jet2_eta)
03088 - TMath::Max(lepton1_eta, lepton2_eta),weight);
03089
03090
03091 if ( (lepton1_eta < jet_eta_min) ||
03092 (lepton2_eta < jet_eta_min) ||
03093 (lepton1_eta > jet_eta_max) ||
03094 (lepton2_eta > jet_eta_max)
03095 ){
03096
03097 return false;
03098 }
03099
03100 return true;
03101
03102 }
03103
03104
03105
03106
03107
03108
03109
03110
03111 bool
03112 MyHtoWWAnalysis::cut_transverse_mass(MyVBFCandidate candidate){
03113
03114 MyParticlePair tagjet_pair = candidate.get_tagjet_pair();
03115 MyParticlePair lepton_pair = candidate.get_lepton_pair();
03116
03117 TLorentzVector met_tlv;
03118 TLorentzVector ll_tlv;
03119
03120 MyMissingEt missinget = candidate.get_missinget();
03121
03122 met_tlv = missinget.tlv();
03123
03124 double pt_miss = missinget.met();
03125
03126
03127 double Et_ll = lepton_pair.tlv().Et();
03128 double Et_nunu = TMath::Sqrt( pow(pt_miss,2) + lepton_pair.tlv().M2() );
03129
03130 TVector3 pt_sum_tlv = lepton_pair.tlv().Vect() + met_tlv.Vect();
03131
03132 double mt = TMath::Sqrt( pow(Et_ll+Et_nunu,2) - pt_sum_tlv.Mag2() );
03133
03134
03135
03136 ll_tlv = lepton_pair.tlv();
03137
03138 double pt_lepton = ll_tlv.Pt();
03139
03140 double dphi = met_tlv.DeltaPhi( ll_tlv );
03141
03142 double mtllnu = TMath::Sqrt(2*pt_lepton*pt_miss
03143 * (1-(TMath::Cos(dphi))) );
03144
03145
03146 if(m_cutvalue_mtllnu_min>-1){
03147 if( mtllnu < m_cutvalue_mtllnu_min ){
03148
03149 return false;
03150 }
03151 }
03152
03153 if(m_cutvalue_mt_min>-1){
03154
03155 if( mt < m_cutvalue_mt_min ){
03156 return false;
03157 }
03158 }
03159
03160 if(m_cutvalue_mt_max>-1){
03161
03162 if( mt > m_cutvalue_mt_max ){
03163 return false;
03164 }
03165 }
03166
03167
03168 return true;
03169 }
03170
03171
03172
03173
03174
03175
03176
03177
03178 bool
03179 MyHtoWWAnalysis::cut_pt_balance(MyVBFCandidate candidate){
03180
03181 MyMissingEt missinget = candidate.get_missinget();
03182
03183 TLorentzVector jet1 = candidate.get_tagjet_pair().get_particle1()->tlv();
03184 TLorentzVector jet2 = candidate.get_tagjet_pair().get_particle2()->tlv();
03185
03186 TLorentzVector lepton1 = candidate.get_lepton_pair().get_particle1()->tlv();
03187 TLorentzVector lepton2 = candidate.get_lepton_pair().get_particle2()->tlv();
03188
03189 double pt_x = missinget.met_x()
03190 + jet1.Px() + jet2.Px() + lepton1.Px() + lepton2.Px();
03191
03192 double pt_y = missinget.met_y()
03193 + jet1.Py() + jet2.Py() + lepton1.Py() + lepton2.Py();
03194
03195 double pt_tot = TMath::Sqrt( pt_x*pt_x + pt_y*pt_y );
03196
03197
03198 if( pt_tot > m_cutvalue_pt_balance_max){
03199
03200 return false;
03201 }
03202
03203
03204 return true;
03205 }
03206
03207
03208
03209
03210
03211
03212
03213 bool
03214 MyHtoWWAnalysis::cut_tau_veto(MyVBFCandidate candidate){
03215
03216 MyCollinearApproximation
03217 collapp( candidate.get_lepton_pair().get_particle1(),
03218 candidate.get_lepton_pair().get_particle2(),
03219 candidate.get_missinget().tlv() );
03220
03221
03222 double m_tautau = collapp.get_M_comp_part();
03223 double m_Z = 91.1876*GeV;
03224
03225 double dm = TMath::Abs(m_tautau - m_Z);
03226
03227 if( collapp.get_x1() > m_cutvalue_x1_max &&
03228 collapp.get_x2() > m_cutvalue_x2_max &&
03229 dm < m_cutvalue_tautau_Z_dm_min ){
03230
03231 return false;
03232 }
03233
03234 return true;
03235
03236 }
03237
03238
03239
03240
03241
03242
03243
03244 vector<MyParticle*>
03245 MyHtoWWAnalysis::preselect_electrons(vector<MyParticle*> vec_particle, double pt_min) {
03246
03247
03248
03249
03250
03251 vector<MyParticle*> vec_tmp1;
03252 vector<MyParticle*> vec_tmp2(0);
03253
03254
03255
03256 vec_tmp1 = m_tools.pt_eta_cut(vec_particle, pt_min, -1.0, 0.0, 2.5);
03257
03258
03259 for (unsigned int k=0; k<vec_tmp1.size(); k++){
03260
03261 if(vec_tmp1[k]->type()!="electron"){
03262 cerr << "ERROR: wrong input particle in method "
03263 << "preselect_electrons()" << endl;
03264 exit(1);
03265 }
03266
03267
03268
03269
03270
03271
03272
03273 if(m_release>12){
03274 if (((MyElectron*)(vec_tmp1[k]))->id_flag()>1){
03275 continue;
03276 }
03277 }
03278 else{
03279 if ((((MyElectron*)(vec_tmp1[k]))->is_em() & 0x3FF) != 0){
03280 continue;
03281 }
03282 }
03283
03284
03285
03286
03287
03288
03289
03290
03291 if ( ((MyElectron*)(vec_tmp1[k]))->track_Et_in_cone(0) > 5.0*GeV ){
03292 continue;
03293 }
03294
03295 vec_tmp2.push_back( vec_tmp1[k] );
03296 }
03297
03298
03299
03300 h_e_reco_presel_nb->Fill(vec_tmp2.size(),weight);
03301
03302 for (unsigned int k=0; k<vec_tmp2.size(); k++) {
03303
03304 h_e_reco_presel_pt->Fill(vec_tmp2[k]->tlv().Pt()*invGeV,weight);
03305 h_e_reco_presel_eta->Fill(vec_tmp2[k]->tlv().Eta(),weight);
03306 h_e_reco_presel_phi->Fill(vec_tmp2[k]->tlv().Phi(),weight);
03307 h_e_reco_presel_isem->Fill(((MyElectron*)vec_tmp2[k])->is_em(),weight);
03308 }
03309
03310 return vec_tmp2;
03311 }
03312
03313
03314
03315
03316
03317
03318
03319 vector<MyParticle*>
03320 MyHtoWWAnalysis::preselect_electrons_for_orm(vector<MyParticle*> vec_particle, double pt_min) {
03321
03322 vector<MyParticle*> vec_tmp1;
03323 vector<MyParticle*> vec_tmp2(0);
03324
03325
03326
03327 vec_tmp1 = m_tools.pt_eta_cut(vec_particle, pt_min, -1.0, 0.0, 2.5);
03328
03329
03330 for (unsigned int k=0; k<vec_tmp1.size(); k++){
03331
03332 if(vec_tmp1[k]->type()!="electron"){
03333 cerr << "ERROR: wrong input particle in method "
03334 << "preselect_electrons()" << endl;
03335 exit(1);
03336 }
03337
03338 if(m_release>12){
03339 if (((MyElectron*)(vec_tmp1[k]))->id_flag() > 0 ){
03340 continue;
03341 }
03342 }
03343 else{
03344 if ((((MyElectron*)(vec_tmp1[k]))->is_em() & 0x7) != 0){
03345 continue;
03346 }
03347 }
03348
03349
03350
03351
03352 if ( ((MyElectron*)(vec_tmp1[k]))->track_Et_in_cone(0) > 5.0*GeV ){
03353 continue;
03354 }
03355
03356 vec_tmp2.push_back( vec_tmp1[k] );
03357 }
03358
03359 return vec_tmp2;
03360 }
03361
03362
03363
03364
03365
03366
03367
03368 vector<MyParticle*>
03369 MyHtoWWAnalysis::preselect_truth_electrons(vector<MyParticle*> vec_particle, double pt_min) {
03370
03371
03372
03373
03374
03375 vector<MyParticle*> vec_tmp;
03376
03377
03378
03379
03380
03381 vec_tmp = m_tools.pt_eta_cut(vec_particle, pt_min, -1, 0.0, 2.5);
03382
03383
03384
03385
03386 h_e_truth_presel_nb->Fill(vec_tmp.size(),weight);
03387
03388 for (unsigned int k=0; k<vec_tmp.size(); k++) {
03389
03390 if(vec_tmp[k]->type()!="truth_particle"){
03391 cerr << "ERROR: wrong input particle in method "
03392 << "preselect_truth_electrons()" << endl;
03393 exit(1);
03394 }
03395
03396
03397
03398 h_e_truth_presel_pt->Fill( vec_tmp[k]->tlv().Pt()*invGeV,weight);
03399 h_e_truth_presel_eta->Fill(vec_tmp[k]->tlv().Eta(),weight);
03400 h_e_truth_presel_phi->Fill(vec_tmp[k]->tlv().Phi(),weight);
03401 h_e_truth_presel_status
03402 ->Fill( ((MyTruthParticle*)(vec_tmp[k]))->status(),weight);
03403 }
03404
03405 return vec_tmp;
03406 }
03407
03408
03409
03410
03411
03412
03413
03414 vector<MyParticle*>
03415 MyHtoWWAnalysis::preselect_muons(vector<MyParticle*> vec_particle, double pt_min) {
03416
03417
03418
03419
03420
03421
03422 vector<MyParticle*> vec_tmp1;
03423 vector<MyParticle*> vec_tmp2(0);
03424
03425
03426
03427 vec_tmp1 = m_tools.pt_eta_cut(vec_particle, pt_min, -1, 0.0, 2.5);
03428
03429
03430 for (unsigned int k=0; k<vec_tmp1.size(); k++){
03431
03432 MyMuon* muon = (MyMuon*)(vec_tmp1[k]);
03433
03434 if(vec_tmp1[k]->type()!="muon"){
03435 cerr << "ERROR: wrong input particle in method "
03436 << "preselect_muons()" << endl;
03437 exit(1);
03438 }
03439
03440
03441
03442
03443 if ( ((MyMuon*)(vec_tmp1[k]))->track_Et_in_cone(1) > 5.0*GeV ){
03444 continue;
03445 }
03446
03447
03448
03449
03450 if(!m_AtlFastFlag){
03451
03452
03453
03454
03455
03456
03457
03458
03459
03460
03461
03462
03463
03464
03465
03466 }
03467
03468
03469
03470 vec_tmp2.push_back( vec_tmp1[k] );
03471 }
03472
03473
03474
03475 h_mu_reco_presel_nb->Fill(vec_tmp2.size(),weight);
03476
03477 for (unsigned int k=0; k<vec_tmp2.size(); k++) {
03478
03479 h_mu_reco_presel_pt->Fill(vec_tmp2[k]->tlv().Pt()*invGeV,weight);
03480 h_mu_reco_presel_eta->Fill(vec_tmp2[k]->tlv().Eta(),weight);
03481 h_mu_reco_presel_phi->Fill(vec_tmp2[k]->tlv().Phi(),weight);
03482
03483 h_mu_reco_presel_fitChi2OverDoF
03484 ->Fill(((MyMuon*)(vec_tmp2[k]))->fitChi2OverDoF(),weight);
03485
03486 h_mu_reco_presel_fitChi2OverDoFvsphi
03487 ->Fill( vec_tmp2[k]->tlv().Phi(),
03488 ((MyMuon*)(vec_tmp2[k]))->fitChi2OverDoF(),weight);
03489
03490 }
03491
03492 return vec_tmp2;
03493 }
03494
03495
03496
03497
03498
03499
03500
03501 vector<MyParticle*>
03502 MyHtoWWAnalysis::preselect_truth_muons(vector<MyParticle*> vec_particle, double pt_min) {
03503
03504
03505
03506
03507
03508 vector<MyParticle*> vec_tmp;
03509
03510
03511
03512
03513
03514 vec_tmp = m_tools.pt_eta_cut(vec_particle, pt_min, -1, 0.0, 2.5);
03515
03516
03517
03518
03519 h_mu_truth_presel_nb->Fill(vec_tmp.size(),weight);
03520
03521 for (unsigned int k=0; k<vec_tmp.size(); k++) {
03522
03523 if(vec_tmp[k]->type()!="truth_particle"){
03524 cerr << "ERROR: wrong input particle in method "
03525 << "preselect_truth_muons()" << endl;
03526 exit(1);
03527 }
03528
03529 h_mu_truth_presel_pt->Fill( vec_tmp[k]->tlv().Pt()*invGeV,weight);
03530 h_mu_truth_presel_eta->Fill(vec_tmp[k]->tlv().Eta(),weight);
03531 h_mu_truth_presel_phi->Fill(vec_tmp[k]->tlv().Phi(),weight);
03532 h_mu_truth_presel_status
03533 ->Fill( ((MyTruthParticle*)(vec_tmp[k]))->status(),weight);
03534 }
03535
03536 return vec_tmp;
03537 }
03538
03539
03540
03541
03542
03543
03544
03545 void
03546 MyHtoWWAnalysis::match_electrons( vector<MyParticle*> vec_e_reco,
03547 vector<MyParticle*> vec_e_truth) {
03548
03549 int nb_matched(0);
03550 int nb_notmatched(0);
03551 int nb_fakes(0);
03552
03553
03554 for (unsigned int k=0; k<vec_e_truth.size(); k++) {
03555
03556 MyParticle* tmp_electron = NULL;
03557
03558 tmp_electron = m_tools.find_matching_particle( vec_e_truth[k],
03559 vec_e_reco, 0.1 );
03560
03561 if(tmp_electron!=NULL){
03562
03563 nb_matched++;
03564 h_e_eff->Fill(1.,weight);
03565
03566 h_e_reco_matched_pt->Fill(tmp_electron->tlv().Pt()*invGeV, weight);
03567 h_e_reco_matched_eta->Fill(tmp_electron->tlv().Eta(), weight);
03568 h_e_reco_matched_phi->Fill(tmp_electron->tlv().Phi(), weight);
03569
03570 h_e_truth_matched_pt->Fill(vec_e_truth[k]->tlv().Pt()*invGeV, weight);
03571 h_e_truth_matched_eta->Fill(vec_e_truth[k]->tlv().Eta(), weight);
03572 h_e_truth_matched_phi->Fill(vec_e_truth[k]->tlv().Phi(), weight);
03573
03574 h_e_reco_matched_isem->Fill(((MyElectron*)tmp_electron)->is_em(), weight);
03575 h_e_reco_matched_NN->Fill(((MyElectron*)tmp_electron)->NeuralNet(), weight);
03576
03577 h_e_matched_dpt->Fill((tmp_electron->tlv().Pt()-vec_e_truth[k]->tlv().Pt())*invGeV, weight);
03578 h_e_matched_deta->Fill(tmp_electron->tlv().Eta()-vec_e_truth[k]->tlv().Eta(), weight );
03579 h_e_matched_dphi->Fill(tmp_electron->tlv().DeltaPhi(vec_e_truth[k]->tlv()),weight);
03580 h_e_matched_dr->Fill(tmp_electron->tlv().DeltaR(vec_e_truth[k]->tlv()),weight);
03581
03582 h_e_matched_resolution_pt->Fill(vec_e_truth[k]->tlv().Pt()*invGeV,
03583 (tmp_electron->tlv().Pt()-vec_e_truth[k]->tlv().Pt())/
03584 (vec_e_truth[k]->tlv().Pt()),weight);
03585
03586 h_e_matched_resolution_eta->Fill(vec_e_truth[k]->tlv().Eta(),
03587 (tmp_electron->tlv().Eta()-vec_e_truth[k]->tlv().Eta())/
03588 (vec_e_truth[k]->tlv().Eta()),weight);
03589
03590 h_e_matched_resolution_phi->Fill(vec_e_truth[k]->tlv().Phi(),
03591 (tmp_electron->tlv().DeltaPhi(vec_e_truth[k]->tlv()))/
03592 (vec_e_truth[k]->tlv().Phi()),weight);
03593
03594 }
03595 else{
03596
03597 h_e_eff->Fill(0.,weight);
03598 nb_notmatched++;
03599 h_e_truth_notmatched_pt->Fill(vec_e_truth[k]->tlv().Pt()*invGeV, weight);
03600 h_e_truth_notmatched_eta->Fill(vec_e_truth[k]->tlv().Eta(), weight);
03601 h_e_truth_notmatched_phi->Fill(vec_e_truth[k]->tlv().Phi(), weight);
03602 }
03603 }
03604
03605 h_e_reco_matched_nb->Fill(nb_matched,weight);
03606 h_e_truth_notmatched_nb->Fill(nb_notmatched,weight);
03607
03608
03609 for (unsigned int k=0; k<vec_e_reco.size(); k++) {
03610
03611 MyParticle* tmp_electron = NULL;
03612
03613 tmp_electron = m_tools.find_matching_particle( vec_e_reco[k],
03614 vec_e_truth, 0.1);
03615
03616 if (tmp_electron==NULL) {
03617
03618
03619 nb_fakes++;
03620 h_e_fake->Fill(1.,weight);
03621
03622 h_e_reco_fake_pt->Fill(vec_e_reco[k]->tlv().Pt()*invGeV, weight);
03623 h_e_reco_fake_eta->Fill(vec_e_reco[k]->tlv().Eta(), weight);
03624 h_e_reco_fake_phi->Fill(vec_e_reco[k]->tlv().Phi(), weight);
03625 h_e_reco_fake_isem->Fill(((MyElectron*)vec_e_reco[k])->is_em(), weight);
03626 }
03627 else{
03628 h_e_fake->Fill(0.,weight);
03629 }
03630 }
03631
03632 h_e_reco_fake_nb->Fill(nb_fakes,weight);
03633
03634 return;
03635 }
03636
03637
03638
03639
03640
03641
03642
03643 void
03644 MyHtoWWAnalysis::match_muons( vector<MyParticle*> vec_mu_reco,
03645 vector<MyParticle*> vec_mu_truth) {
03646
03647
03648
03649
03650 int nb_matched(0);
03651 int nb_notmatched(0);
03652 int nb_fakes(0);
03653
03654
03655 for (unsigned int k=0; k<vec_mu_truth.size(); k++) {
03656
03657 MyParticle* tmp_muon = NULL;
03658
03659 tmp_muon = m_tools.find_matching_particle( vec_mu_truth[k],
03660 vec_mu_reco, 0.1);
03661
03662 if(tmp_muon!=NULL){
03663
03664 nb_matched++;
03665 h_mu_eff->Fill(1.,weight);
03666
03667
03668
03669 h_mu_reco_matched_pt->Fill(tmp_muon->tlv().Pt()*invGeV, weight);
03670 h_mu_reco_matched_eta->Fill(tmp_muon->tlv().Eta(), weight);
03671 h_mu_reco_matched_phi->Fill(tmp_muon->tlv().Phi(), weight);
03672
03673 h_mu_truth_matched_pt->Fill(vec_mu_truth[k]->tlv().Pt()*invGeV, weight);
03674 h_mu_truth_matched_eta->Fill(vec_mu_truth[k]->tlv().Eta(), weight);
03675 h_mu_truth_matched_phi->Fill(vec_mu_truth[k]->tlv().Phi(), weight);
03676
03677 h_mu_reco_matched_fitChi2OverDoF
03678 ->Fill(((MyMuon*)(tmp_muon))->fitChi2OverDoF(),weight);
03679
03680
03681 h_mu_matched_dpt->Fill((tmp_muon->tlv().Pt()-
03682 vec_mu_truth[k]->tlv().Pt())*invGeV, weight);
03683 h_mu_matched_deta->Fill(tmp_muon->tlv().Eta()-
03684 vec_mu_truth[k]->tlv().Eta(), weight);
03685 h_mu_matched_dphi->Fill(tmp_muon->tlv().DeltaPhi(vec_mu_truth[k]->tlv()),weight);
03686
03687 h_mu_matched_dr->Fill(tmp_muon->tlv().DeltaR(vec_mu_truth[k]->tlv()),weight);
03688
03689 h_mu_matched_resolution_pt
03690 ->Fill(vec_mu_truth[k]->tlv().Pt()*invGeV,
03691 (tmp_muon->tlv().Pt()-vec_mu_truth[k]->tlv().Pt())/
03692 (vec_mu_truth[k]->tlv().Pt()),weight);
03693
03694 h_mu_matched_resolution_ptvsphi
03695 ->Fill(vec_mu_truth[k]->tlv().Phi(),
03696 (tmp_muon->tlv().Pt()-vec_mu_truth[k]->tlv().Pt())/
03697 (vec_mu_truth[k]->tlv().Pt()),weight);
03698
03699 h_mu_matched_resolution_ptvseta
03700 ->Fill(vec_mu_truth[k]->tlv().Eta(),
03701 (tmp_muon->tlv().Pt()-vec_mu_truth[k]->tlv().Pt())/
03702 (vec_mu_truth[k]->tlv().Pt()),weight);
03703
03704 h_mu_matched_resolution_eta
03705 ->Fill(vec_mu_truth[k]->tlv().Eta(),
03706 (tmp_muon->tlv().Eta()-vec_mu_truth[k]->tlv().Eta())/
03707 (vec_mu_truth[k]->tlv().Eta()),weight);
03708
03709 h_mu_matched_resolution_phi
03710 ->Fill(vec_mu_truth[k]->tlv().Phi(),
03711 (tmp_muon->tlv().DeltaPhi(vec_mu_truth[k]->tlv()))/
03712 (vec_mu_truth[k]->tlv().Phi()),weight);
03713 }
03714 else{
03715
03716 h_mu_eff->Fill(0.,weight);
03717 nb_notmatched++;
03718 h_mu_truth_notmatched_pt->Fill(vec_mu_truth[k]->tlv().Pt()*invGeV, weight);
03719 h_mu_truth_notmatched_eta->Fill(vec_mu_truth[k]->tlv().Eta(), weight);
03720 h_mu_truth_notmatched_phi->Fill(vec_mu_truth[k]->tlv().Phi(), weight);
03721 }
03722 }
03723
03724 h_mu_reco_matched_nb->Fill(nb_matched,weight);
03725 h_mu_truth_notmatched_nb->Fill(nb_notmatched,weight);
03726
03727
03728 for (unsigned int k=0; k<vec_mu_reco.size(); k++) {
03729
03730 MyParticle* tmp_muon = NULL;
03731
03732 tmp_muon = m_tools.find_matching_particle(vec_mu_reco[k],
03733 vec_mu_truth, 0.1);
03734 if (tmp_muon==NULL) {
03735
03736 nb_fakes++;
03737 h_mu_fake->Fill(1.,weight);
03738 h_mu_reco_fake_pt->Fill(vec_mu_reco[k]->tlv().Pt()*invGeV, weight);
03739 h_mu_reco_fake_eta->Fill(vec_mu_reco[k]->tlv().Eta(), weight);
03740 h_mu_reco_fake_phi->Fill(vec_mu_reco[k]->tlv().Phi(), weight);
03741 h_mu_reco_fake_fitChi2OverDoF
03742 ->Fill(((MyMuon*)(vec_mu_reco[k]))->fitChi2OverDoF(),weight);
03743
03744 }
03745 else{
03746 h_mu_fake->Fill(0.,weight);
03747 }
03748 }
03749
03750 h_mu_reco_fake_nb->Fill(nb_fakes,weight);
03751
03752 return;
03753 }
03754
03755
03756
03757
03758
03759
03760
03761
03762 void
03763 MyHtoWWAnalysis::match_jets( vector<MyParticle*> vec_jet_reco,
03764 vector<MyParticle*> vec_jet_truth) {
03765
03766 int nb_matched(0);
03767 int nb_notmatched(0);
03768 int nb_fakes(0);
03769
03770
03771
03772
03773
03774
03775
03776
03777
03778
03779
03780
03781
03782
03783
03784
03785
03786
03787
03788 double deltaR_jetmatching_cut = m_cutvalue_jet_match_dR;
03789
03790
03791 for (unsigned int k=0; k<vec_jet_truth.size(); k++) {
03792
03793 MyParticle* tmp_jet = NULL;
03794
03795 tmp_jet = m_tools.find_matching_particle( vec_jet_truth[k],
03796 vec_jet_reco, deltaR_jetmatching_cut );
03797 if(tmp_jet!=NULL){
03798
03799 nb_matched++;
03800 h_jet_eff->Fill(1.,weight);
03801
03802 h_jet_reco_matched_pt->Fill(tmp_jet->tlv().Pt()*invGeV, weight);
03803 h_jet_reco_matched_eta->Fill(tmp_jet->tlv().Eta(), weight);
03804 h_jet_reco_matched_phi->Fill(tmp_jet->tlv().Phi(), weight);
03805 h_jet_reco_matched_E->Fill(tmp_jet->tlv().E()*invGeV, weight);
03806
03807 h_jet_truth_matched_pt->Fill(vec_jet_truth[k]->tlv().Pt()*invGeV, weight);
03808 h_jet_truth_matched_eta->Fill(vec_jet_truth[k]->tlv().Eta(), weight);
03809 h_jet_truth_matched_phi->Fill(vec_jet_truth[k]->tlv().Phi(), weight);
03810 h_jet_truth_matched_E->Fill(vec_jet_truth[k]->tlv().E()*invGeV, weight);
03811
03812 h_jet_matched_dpt->Fill((tmp_jet->tlv().Pt()-
03813 vec_jet_truth[k]->tlv().Pt())*invGeV,weight);
03814 h_jet_matched_deta->Fill(tmp_jet->tlv().Eta()-
03815 vec_jet_truth[k]->tlv().Eta(),weight );
03816 h_jet_matched_dphi->Fill(tmp_jet->tlv().DeltaPhi(vec_jet_truth[k]->tlv()),weight);
03817 h_jet_matched_dr->Fill(tmp_jet->tlv().DeltaR(vec_jet_truth[k]->tlv()),weight);
03818 h_jet_matched_dE->Fill((tmp_jet->tlv().E()-
03819 vec_jet_truth[k]->tlv().E())*invGeV,weight);
03820
03821
03822 h_jet_matched_ptratio_recoovertruth
03823 ->Fill(tmp_jet->tlv().Pt()/(vec_jet_truth[k]->tlv().Pt()),weight);
03824 h_jet_matched_ptratio_truthoverreco
03825 ->Fill((vec_jet_truth[k]->tlv().Pt())/tmp_jet->tlv().Pt(),weight);
03826
03827 h_jet_matched_ptratio_recoovertruth_corr
03828 ->Fill(((MyParticleJet*)(tmp_jet))->pt_pucorr(m_primary_vertex_index)/
03829 (vec_jet_truth[k]->tlv().Pt()),weight);
03830 h_jet_matched_ptratio_truthoverreco_corr
03831 ->Fill((vec_jet_truth[k]->tlv().Pt())/
03832 ((MyParticleJet*)(tmp_jet))->pt_pucorr(m_primary_vertex_index),weight);
03833
03834 double bweight = ((MyParticleJet*)(tmp_jet))->b_tag_weight();
03835 if(bweight < m_cutvalue_bjet_weight_max){
03836 h_jet_matched_bweightcut_ptratio_recoovertruth
03837 ->Fill(tmp_jet->tlv().Pt()/(vec_jet_truth[k]->tlv().Pt()),weight);
03838 h_jet_matched_bweightcut_ptratio_truthoverreco
03839 ->Fill((vec_jet_truth[k]->tlv().Pt())/tmp_jet->tlv().Pt(),weight);
03840
03841 h_jet_matched_bweightcut_ptratio_recoovertruth_corr
03842 ->Fill(((MyParticleJet*)(tmp_jet))->pt_pucorr(m_primary_vertex_index)/
03843 (vec_jet_truth[k]->tlv().Pt()),weight);
03844 h_jet_matched_bweightcut_ptratio_truthoverreco_corr
03845 ->Fill((vec_jet_truth[k]->tlv().Pt())/
03846 ((MyParticleJet*)(tmp_jet))->pt_pucorr(m_primary_vertex_index),weight);
03847 }
03848
03849
03850 h_jet_matched_resolution_pt
03851 ->Fill(vec_jet_truth[k]->tlv().Pt()*invGeV,
03852 (tmp_jet->tlv().Pt()-vec_jet_truth[k]->tlv().Pt())/
03853 (vec_jet_truth[k]->tlv().Pt()),weight);
03854
03855 h_jet_matched_resolution_eta
03856 ->Fill(vec_jet_truth[k]->tlv().Eta(),
03857 (tmp_jet->tlv().Eta()-vec_jet_truth[k]->tlv().Eta())/
03858 (vec_jet_truth[k]->tlv().Eta()),weight);
03859
03860 h_jet_matched_resolution_phi
03861 ->Fill(vec_jet_truth[k]->tlv().Phi(),
03862 (tmp_jet->tlv().DeltaPhi(vec_jet_truth[k]->tlv()))/
03863 (vec_jet_truth[k]->tlv().Phi()),weight);
03864
03865 h_jet_matched_Eresolution
03866 ->Fill( (vec_jet_truth[k]->tlv().E()-tmp_jet->tlv().E())*invGeV,weight );
03867
03868 h_jet_matched_Eresolution_vs_pt
03869 ->Fill( vec_jet_truth[k]->tlv().Pt()*invGeV,
03870 (tmp_jet->tlv().E()-vec_jet_truth[k]->tlv().E())*invGeV,weight );
03871
03872 h_jet_matched_Eresolution_vs_eta
03873 ->Fill( vec_jet_truth[k]->tlv().Eta(),
03874 (tmp_jet->tlv().E()-vec_jet_truth[k]->tlv().E())*invGeV,weight );
03875
03876 h_jet_matched_Eresolution_vs_phi
03877 ->Fill( vec_jet_truth[k]->tlv().Phi(),
03878 (tmp_jet->tlv().E()-vec_jet_truth[k]->tlv().E())*invGeV,weight );
03879
03880 h_jet_matched_Eresolution_vs_E
03881 ->Fill( vec_jet_truth[k]->tlv().E()*invGeV,
03882 (tmp_jet->tlv().E()-vec_jet_truth[k]->tlv().E())*invGeV,weight);
03883
03884 h_jet_matched_invptresolution->Fill((1/tmp_jet->tlv().Pt()-
03885 1/vec_jet_truth[k]->tlv().Pt())*1/invGeV,weight);
03886 h_jet_matched_relinvptresolution->Fill((1/tmp_jet->tlv().Pt()-
03887 1/vec_jet_truth[k]->tlv().Pt())
03888 *vec_jet_truth[k]->tlv().Pt(),weight);
03889 h_jet_matched_invEresolution->Fill((1./tmp_jet->tlv().E()-
03890 1./vec_jet_truth[k]->tlv().E())*1./invGeV,weight);
03891 h_jet_matched_relinvEresolution->Fill((1./tmp_jet->tlv().E()-
03892 1./vec_jet_truth[k]->tlv().E())
03893 *vec_jet_truth[k]->tlv().E(),weight);
03894
03895 h_jet_matched_invptresolution_vs_pt->Fill(tmp_jet->tlv().Pt(),
03896 (1/tmp_jet->tlv().Pt()-1/vec_jet_truth[k]->tlv().Pt())
03897 *1/invGeV,weight);
03898 h_jet_matched_relinvptresolution_vs_pt->Fill(tmp_jet->tlv().Pt(),
03899 (1/tmp_jet->tlv().Pt()-1/vec_jet_truth[k]->tlv().Pt())
03900 *vec_jet_truth[k]->tlv().Pt(),weight);
03901 h_jet_matched_invEresolution_vs_E->Fill(tmp_jet->tlv().E(),
03902 (1./tmp_jet->tlv().E()-1./vec_jet_truth[k]->tlv().E())
03903 *1./invGeV,weight);
03904 h_jet_matched_relinvEresolution_vs_E->Fill(tmp_jet->tlv().E(),
03905 (1./tmp_jet->tlv().E()-1./vec_jet_truth[k]->tlv().E())
03906 *vec_jet_truth[k]->tlv().E(),weight);
03907
03908 h_jet_matched_relEresolution
03909 ->Fill( (tmp_jet->tlv().E()-vec_jet_truth[k]->tlv().E())/
03910 vec_jet_truth[k]->tlv().E(),weight );
03911
03912 h_jet_matched_relEresolution_vs_pt
03913 ->Fill( vec_jet_truth[k]->tlv().Pt()*invGeV,
03914 (tmp_jet->tlv().E()-vec_jet_truth[k]->tlv().E())/
03915 vec_jet_truth[k]->tlv().E(),weight );
03916
03917 h_jet_matched_relEresolution_vs_eta
03918 ->Fill( vec_jet_truth[k]->tlv().Eta(),
03919 (tmp_jet->tlv().E()-vec_jet_truth[k]->tlv().E())/
03920 vec_jet_truth[k]->tlv().E(),weight );
03921
03922 h_jet_matched_relEresolution_vs_phi
03923 ->Fill( vec_jet_truth[k]->tlv().Phi(),
03924 (tmp_jet->tlv().E()-vec_jet_truth[k]->tlv().E())/
03925 vec_jet_truth[k]->tlv().E(),weight );
03926
03927 h_jet_matched_relEresolution_vs_E
03928 ->Fill( vec_jet_truth[k]->tlv().E()*invGeV,
03929 (tmp_jet->tlv().E()-vec_jet_truth[k]->tlv().E())/
03930 vec_jet_truth[k]->tlv().E(),weight );
03931
03932
03933 }
03934 else{
03935
03936 nb_notmatched++;
03937 h_jet_eff->Fill(0.,weight);
03938
03939 h_jet_truth_notmatched_pt->Fill(vec_jet_truth[k]->tlv().Pt()*invGeV, weight);
03940 h_jet_truth_notmatched_eta->Fill(vec_jet_truth[k]->tlv().Eta(), weight);
03941 h_jet_truth_notmatched_phi->Fill(vec_jet_truth[k]->tlv().Phi(), weight);
03942 }
03943 }
03944
03945 h_jet_reco_matched_nb->Fill(nb_matched,weight);
03946 h_jet_truth_notmatched_nb->Fill(nb_notmatched,weight);
03947
03948
03949 nb_fakes = 0;
03950
03951 for (unsigned int k=0; k<vec_jet_reco.size(); k++) {
03952
03953 MyParticle* tmp_jet = NULL;
03954
03955 tmp_jet = m_tools.find_matching_particle(vec_jet_reco[k],
03956 vec_jet_truth, deltaR_jetmatching_cut);
03957
03958 if (tmp_jet==NULL) {
03959
03960 nb_fakes++;
03961 h_jet_fake->Fill(1.,weight);
03962
03963 h_jet_reco_fake_pt->Fill(vec_jet_reco[k]->tlv().Pt()*invGeV,weight);
03964 h_jet_reco_fake_eta->Fill(vec_jet_reco[k]->tlv().Eta(),weight);
03965 h_jet_reco_fake_phi->Fill(vec_jet_reco[k]->tlv().Phi(),weight);
03966 }
03967 else{
03968 h_jet_fake->Fill(0.,weight);
03969 }
03970 }
03971
03972 h_jet_reco_fake_nb->Fill(nb_fakes,weight);
03973
03974 m_tools.clear_vector(vec_jet_reco);
03975 m_tools.clear_vector(vec_jet_truth);
03976
03977 return;
03978 }
03979
03980
03981
03982
03983
03984
03985
03986 void
03987 MyHtoWWAnalysis::match_track_jets( vector<MyParticle*> vec_track_jet_reco,
03988 vector<MyParticle*> vec_track_jet_truth) {
03989
03990 int nb_matched(0);
03991 int nb_notmatched(0);
03992 int nb_fakes(0);
03993
03994
03995
03996
03997
03998
03999
04000
04001
04002
04003
04004
04005
04006
04007
04008
04009
04010
04011
04012
04013 double deltaR_jetmatching_cut = m_cutvalue_jet_match_dR;
04014
04015
04016 for (unsigned int k=0; k<vec_track_jet_truth.size(); k++) {
04017
04018 MyParticle* tmp_track_jet = NULL;
04019
04020 tmp_track_jet = m_tools.find_matching_particle( vec_track_jet_truth[k],
04021 vec_track_jet_reco, deltaR_jetmatching_cut );
04022 if(tmp_track_jet!=NULL){
04023
04024 nb_matched++;
04025 h_track_jet_eff->Fill(1.,weight);
04026
04027
04028
04029
04030
04031
04032 h_track_jet_truth_matched_pt->Fill(vec_track_jet_truth[k]->tlv().Pt()*invGeV, weight);
04033 h_track_jet_truth_matched_eta->Fill(vec_track_jet_truth[k]->tlv().Eta(), weight);
04034 h_track_jet_truth_matched_phi->Fill(vec_track_jet_truth[k]->tlv().Phi(), weight);
04035 h_track_jet_truth_matched_E->Fill(vec_track_jet_truth[k]->tlv().E()*invGeV, weight);
04036
04037 h_track_jet_matched_dpt->Fill((tmp_track_jet->tlv().Pt()-
04038 vec_track_jet_truth[k]->tlv().Pt())*invGeV,weight);
04039 h_track_jet_matched_deta->Fill(tmp_track_jet->tlv().Eta()-
04040 vec_track_jet_truth[k]->tlv().Eta(),weight );
04041 h_track_jet_matched_dphi->Fill(tmp_track_jet->tlv().DeltaPhi(vec_track_jet_truth[k]->tlv()),weight);
04042 h_track_jet_matched_dr->Fill(tmp_track_jet->tlv().DeltaR(vec_track_jet_truth[k]->tlv()),weight);
04043 h_track_jet_matched_dE->Fill((tmp_track_jet->tlv().E()-
04044 vec_track_jet_truth[k]->tlv().E())*invGeV,weight);
04045
04046 h_track_jet_matched_resolution_pt
04047 ->Fill(vec_track_jet_truth[k]->tlv().Pt()*invGeV,
04048 (tmp_track_jet->tlv().Pt()-vec_track_jet_truth[k]->tlv().Pt())/
04049 (vec_track_jet_truth[k]->tlv().Pt()),weight);
04050
04051 h_track_jet_matched_resolution_eta
04052 ->Fill(vec_track_jet_truth[k]->tlv().Eta(),
04053 (tmp_track_jet->tlv().Eta()-vec_track_jet_truth[k]->tlv().Eta())/
04054 (vec_track_jet_truth[k]->tlv().Eta()),weight);
04055
04056 h_track_jet_matched_resolution_phi
04057 ->Fill(vec_track_jet_truth[k]->tlv().Phi(),
04058 (tmp_track_jet->tlv().DeltaPhi(vec_track_jet_truth[k]->tlv()))/
04059 (vec_track_jet_truth[k]->tlv().Phi()),weight);
04060
04061 h_track_jet_matched_invptresolution->Fill((1/tmp_track_jet->tlv().Pt()-
04062 1/vec_track_jet_truth[k]->tlv().Pt())*1/invGeV,weight);
04063 h_track_jet_matched_relinvptresolution->Fill((1/tmp_track_jet->tlv().Pt()-
04064 1/vec_track_jet_truth[k]->tlv().Pt())
04065 *vec_track_jet_truth[k]->tlv().Pt(),weight);
04066 h_track_jet_matched_invEresolution->Fill((1./tmp_track_jet->tlv().E()-
04067 1./vec_track_jet_truth[k]->tlv().E())*1./invGeV,weight);
04068 h_track_jet_matched_relinvEresolution->Fill((1./tmp_track_jet->tlv().E()-
04069 1./vec_track_jet_truth[k]->tlv().E())
04070 *vec_track_jet_truth[k]->tlv().E(),weight);
04071
04072
04073 h_track_jet_matched_invptresolution_vs_pt->Fill(tmp_track_jet->tlv().Pt(),
04074 (1/tmp_track_jet->tlv().Pt()-1/vec_track_jet_truth[k]->tlv().Pt())
04075 *1/invGeV,weight);
04076 h_track_jet_matched_relinvptresolution_vs_pt->Fill(tmp_track_jet->tlv().Pt(),
04077 (1/tmp_track_jet->tlv().Pt()-1/vec_track_jet_truth[k]->tlv().Pt())
04078 *vec_track_jet_truth[k]->tlv().Pt(),weight);
04079 h_track_jet_matched_invEresolution_vs_E->Fill(tmp_track_jet->tlv().E(),
04080 (1./tmp_track_jet->tlv().E()-1./vec_track_jet_truth[k]->tlv().E())
04081 *1./invGeV,weight);
04082 h_track_jet_matched_relinvEresolution_vs_E->Fill(tmp_track_jet->tlv().E(),
04083 (1./tmp_track_jet->tlv().E()-1./vec_track_jet_truth[k]->tlv().E())
04084 *vec_track_jet_truth[k]->tlv().E(),weight);
04085
04086
04087 h_track_jet_matched_Eresolution
04088 ->Fill( (vec_track_jet_truth[k]->tlv().E()-tmp_track_jet->tlv().E())*invGeV,weight );
04089
04090 h_track_jet_matched_Eresolution_vs_pt
04091 ->Fill( vec_track_jet_truth[k]->tlv().Pt()*invGeV,
04092 (tmp_track_jet->tlv().E()-vec_track_jet_truth[k]->tlv().E())*invGeV,weight );
04093
04094 h_track_jet_matched_Eresolution_vs_eta
04095 ->Fill( vec_track_jet_truth[k]->tlv().Eta(),
04096 (tmp_track_jet->tlv().E()-vec_track_jet_truth[k]->tlv().E())*invGeV,weight );
04097
04098 h_track_jet_matched_Eresolution_vs_phi
04099 ->Fill( vec_track_jet_truth[k]->tlv().Phi(),
04100 (tmp_track_jet->tlv().E()-vec_track_jet_truth[k]->tlv().E())*invGeV,weight );
04101
04102 h_track_jet_matched_Eresolution_vs_E
04103 ->Fill( vec_track_jet_truth[k]->tlv().E()*invGeV,
04104 (tmp_track_jet->tlv().E()-vec_track_jet_truth[k]->tlv().E())*invGeV,weight);
04105
04106
04107 h_track_jet_matched_relEresolution
04108 ->Fill( (tmp_track_jet->tlv().E()-vec_track_jet_truth[k]->tlv().E())/
04109 vec_track_jet_truth[k]->tlv().E(),weight );
04110
04111 h_track_jet_matched_relEresolution_vs_pt
04112 ->Fill( vec_track_jet_truth[k]->tlv().Pt()*invGeV,
04113 (tmp_track_jet->tlv().E()-vec_track_jet_truth[k]->tlv().E())/
04114 vec_track_jet_truth[k]->tlv().E(),weight );
04115
04116 h_track_jet_matched_relEresolution_vs_eta
04117 ->Fill( vec_track_jet_truth[k]->tlv().Eta(),
04118 (tmp_track_jet->tlv().E()-vec_track_jet_truth[k]->tlv().E())/
04119 vec_track_jet_truth[k]->tlv().E(),weight );
04120
04121 h_track_jet_matched_relEresolution_vs_phi
04122 ->Fill( vec_track_jet_truth[k]->tlv().Phi(),
04123 (tmp_track_jet->tlv().E()-vec_track_jet_truth[k]->tlv().E())/
04124 vec_track_jet_truth[k]->tlv().E(),weight );
04125
04126 h_track_jet_matched_relEresolution_vs_E
04127 ->Fill( vec_track_jet_truth[k]->tlv().E()*invGeV,
04128 (tmp_track_jet->tlv().E()-vec_track_jet_truth[k]->tlv().E())/
04129 vec_track_jet_truth[k]->tlv().E(),weight );
04130
04131
04132 }
04133 else{
04134
04135 nb_notmatched++;
04136 h_track_jet_eff->Fill(0.,weight);
04137
04138 h_track_jet_truth_notmatched_pt->Fill(vec_track_jet_truth[k]->tlv().Pt()*invGeV, weight);
04139 h_track_jet_truth_notmatched_eta->Fill(vec_track_jet_truth[k]->tlv().Eta(), weight);
04140 h_track_jet_truth_notmatched_phi->Fill(vec_track_jet_truth[k]->tlv().Phi(), weight);
04141 }
04142 }
04143
04144 h_track_jet_reco_matched_nb->Fill(nb_matched,weight);
04145 h_track_jet_truth_notmatched_nb->Fill(nb_notmatched,weight);
04146
04147
04148
04149
04150 nb_fakes = 0;
04151
04152 for (unsigned int k=0; k<vec_track_jet_reco.size(); k++) {
04153
04154 MyParticle* tmp_track_jet = NULL;
04155
04156 tmp_track_jet = m_tools.find_matching_particle(vec_track_jet_reco[k],
04157 vec_track_jet_truth, deltaR_jetmatching_cut);
04158
04159 if (tmp_track_jet==NULL) {
04160
04161 nb_fakes++;
04162 h_track_jet_fake->Fill(1.,weight);
04163 v_track_jet_reco_fake.push_back(vec_track_jet_reco[k]);
04164
04165 h_track_jet_reco_fake_pt->Fill(vec_track_jet_reco[k]->tlv().Pt()*invGeV,weight);
04166 h_track_jet_reco_fake_eta->Fill(vec_track_jet_reco[k]->tlv().Eta(),weight);
04167 h_track_jet_reco_fake_phi->Fill(vec_track_jet_reco[k]->tlv().Phi(),weight);
04168
04169 h_track_jet_reco_fake_vs_pt->Fill(vec_track_jet_reco[k]->tlv().Pt()*invGeV,1.,weight);
04170 h_track_jet_reco_fake_vs_eta->Fill(vec_track_jet_reco[k]->tlv().Eta(),1.,weight);
04171
04172 }
04173 else{
04174
04175 h_track_jet_fake->Fill(0.,weight);
04176
04177 h_track_jet_reco_fake_vs_pt->Fill(vec_track_jet_reco[k]->tlv().Pt()*invGeV,0.,weight);
04178 h_track_jet_reco_fake_vs_eta->Fill(vec_track_jet_reco[k]->tlv().Eta(),0.,weight);
04179
04180 h_track_jet_reco_matched_pt->Fill(vec_track_jet_reco[k]->tlv().Pt()*invGeV, weight);
04181 h_track_jet_reco_matched_eta->Fill(vec_track_jet_reco[k]->tlv().Eta(), weight);
04182 h_track_jet_reco_matched_phi->Fill(vec_track_jet_reco[k]->tlv().Phi(), weight);
04183
04184
04185
04186 }
04187 }
04188
04189 h_track_jet_reco_fake_nb->Fill(nb_fakes,weight);
04190
04191
04192
04193 m_tools.clear_vector(vec_track_jet_reco);
04194 m_tools.clear_vector(vec_track_jet_truth);
04195
04196 return;
04197 }
04198
04199
04200
04201
04202
04203
04204
04205 void
04206 MyHtoWWAnalysis::match_fake_track_jets( std::vector<MyParticle*> vec_e,
04207 std::vector<MyParticle*> vec_mu) {
04208
04209 bool is_e;
04210 bool is_mu;
04211
04212 MyParticle* tmp_particle1;
04213 MyParticle* tmp_particle2;
04214
04215 for(unsigned int k=0; k<v_track_jet_reco_fake.size(); k++){
04216
04217 is_e = false;
04218 is_mu = false;
04219
04220
04221
04222
04223 tmp_particle1
04224 = m_tools.find_matching_particle(v_track_jet_reco_fake[k],
04225 vec_e, 0.4, false, false);
04226
04227 if(tmp_particle1!=NULL){
04228 is_e = true;
04229 h_track_jet_fake_id->Fill(11);
04230 }
04231
04232 tmp_particle2
04233 = m_tools.find_matching_particle(v_track_jet_reco_fake[k],
04234 vec_mu, 0.4, false, false);
04235
04236 if(tmp_particle2!=NULL){
04237 is_mu = true;
04238 h_track_jet_fake_id->Fill(13);
04239 }
04240
04241 if(is_e || is_mu){
04242 h_track_jet_fake_id->Fill(1);
04243 }
04244 else{
04245 h_track_jet_fake_id->Fill(0);
04246 }
04247
04248 }
04249
04250 return;
04251
04252 }
04253
04254
04255
04256
04257
04258
04259 void
04260 MyHtoWWAnalysis::match_track_with_std_jets( std::vector<MyParticle*> vec_track_jet,
04261 std::vector<MyParticle*> vec_std_jet) {
04262
04263
04264
04265
04266 double match_window = m_cutvalue_jet_match_dR;
04267
04268
04269 for (unsigned int k=0; k<vec_track_jet.size(); k++) {
04270
04271 MyParticle* tmp_std_jet = NULL;
04272 tmp_std_jet = m_tools.find_matching_particle( vec_track_jet[k],
04273 vec_std_jet, match_window );
04274
04275 if(tmp_std_jet!=NULL){
04276
04277 h_track_std_jet_match->Fill(1.,weight);
04278
04279 h_track_std_jet_matched_pt->Fill(vec_track_jet[k]->tlv().Pt()*invGeV, weight);
04280 h_track_std_jet_matched_eta->Fill(vec_track_jet[k]->tlv().Eta(), weight);
04281 h_track_std_jet_matched_phi->Fill(vec_track_jet[k]->tlv().Phi(), weight);
04282 h_track_std_jet_matched_E->Fill(vec_track_jet[k]->tlv().E()*invGeV, weight);
04283
04284 h_track_std_jet_matched_dpt->Fill((tmp_std_jet->tlv().Pt()-
04285 vec_track_jet[k]->tlv().Pt())*invGeV,weight);
04286 h_track_std_jet_matched_deta->Fill(tmp_std_jet->tlv().Eta()-
04287 vec_track_jet[k]->tlv().Eta(),weight );
04288 h_track_std_jet_matched_dphi->Fill(tmp_std_jet->tlv().DeltaPhi(vec_track_jet[k]->tlv()),weight);
04289 h_track_std_jet_matched_dr->Fill(tmp_std_jet->tlv().DeltaR(vec_track_jet[k]->tlv()),weight);
04290 h_track_std_jet_matched_dE->Fill((tmp_std_jet->tlv().E()-
04291 vec_track_jet[k]->tlv().E())*invGeV,weight);
04292
04293
04294 h_track_std_jet_matched_vs_eta
04295 ->Fill(vec_track_jet[k]->tlv().Eta(), 1., weight);
04296 h_track_std_jet_matched_vs_pt
04297 ->Fill(vec_track_jet[k]->tlv().Pt(), 1., weight);
04298
04299
04300 h_track_std_jet_matched_resolution_pt
04301 ->Fill(vec_track_jet[k]->tlv().Pt()*invGeV,
04302 (tmp_std_jet->tlv().Pt()-vec_track_jet[k]->tlv().Pt())/
04303 (vec_track_jet[k]->tlv().Pt()),weight);
04304
04305 h_track_std_jet_matched_resolution_eta
04306 ->Fill(vec_track_jet[k]->tlv().Eta(),
04307 (tmp_std_jet->tlv().Eta()-vec_track_jet[k]->tlv().Eta())/
04308 (vec_track_jet[k]->tlv().Eta()),weight);
04309
04310 h_track_std_jet_matched_resolution_phi
04311 ->Fill(vec_track_jet[k]->tlv().Phi(),
04312 (tmp_std_jet->tlv().DeltaPhi(vec_track_jet[k]->tlv()))/
04313 (vec_track_jet[k]->tlv().Phi()),weight);
04314
04315
04316
04317
04318
04319
04320
04321
04322
04323
04324
04325
04326
04327
04328
04329
04330
04331 h_track_std_jet_matched_jetptratio->Fill(vec_track_jet[k]->tlv().Pt()/
04332 tmp_std_jet->tlv().Pt(),weight);
04333
04334 h_track_std_jet_matched_jetptratio_corr->Fill(vec_track_jet[k]->tlv().Pt()/
04335 ((MyParticleJet*)(tmp_std_jet))
04336 ->pt_pucorr(m_primary_vertex_index),weight);
04337
04338
04339 h_track_std_jet_matched_pt_vs_jetptratio->Fill( (vec_track_jet[k])->tlv().Pt(),
04340 (vec_track_jet[k])->tlv().Pt()/tmp_std_jet->tlv().Pt(),weight);
04341
04342 h_track_std_jet_matched_pt_vs_jetptratio_corr
04343 ->Fill( (vec_track_jet[k])->tlv().Pt(),
04344 (vec_track_jet[k])->tlv().Pt()/((MyParticleJet*)(tmp_std_jet))
04345 ->pt_pucorr(m_primary_vertex_index),weight);
04346
04347 h_track_std_jet_matched_pt_vs_stdjetpt->Fill( (vec_track_jet[k])->tlv().Pt(),
04348 tmp_std_jet->tlv().Pt(),weight);
04349
04350 h_track_std_jet_matched_pt_vs_stdjetpt_corr->Fill( (vec_track_jet[k])->tlv().Pt(),
04351 ((MyParticleJet*)(tmp_std_jet))
04352 ->pt_pucorr(m_primary_vertex_index),weight);
04353
04354
04355 }
04356 else{
04357 h_track_std_jet_match->Fill(0.,weight);
04358
04359 h_track_std_jet_notmatched_pt->Fill(vec_track_jet[k]->tlv().Pt()*invGeV, weight);
04360 h_track_std_jet_notmatched_eta->Fill(vec_track_jet[k]->tlv().Eta(), weight);
04361 h_track_std_jet_notmatched_phi->Fill(vec_track_jet[k]->tlv().Phi(), weight);
04362 h_track_std_jet_notmatched_E->Fill(vec_track_jet[k]->tlv().E()*invGeV, weight);
04363
04364
04365 h_track_std_jet_matched_vs_eta
04366 ->Fill(vec_track_jet[k]->tlv().Eta(), 0., weight);
04367 h_track_std_jet_matched_vs_pt
04368 ->Fill(vec_track_jet[k]->tlv().Pt(), 0., weight);
04369 }
04370 }
04371
04372
04373 for (unsigned int k=0; k<vec_std_jet.size(); k++) {
04374
04375 MyParticle* tmp_track_jet = NULL;
04376 tmp_track_jet = m_tools.find_matching_particle( vec_std_jet[k],
04377 vec_track_jet, match_window );
04378
04379 if(tmp_track_jet!=NULL){
04380
04381 h_std_track_jet_match->Fill(1.,weight);
04382
04383 h_std_track_jet_matched_pt->Fill(vec_std_jet[k]->tlv().Pt()*invGeV, weight);
04384 h_std_track_jet_matched_eta->Fill(vec_std_jet[k]->tlv().Eta(), weight);
04385 h_std_track_jet_matched_phi->Fill(vec_std_jet[k]->tlv().Phi(), weight);
04386 h_std_track_jet_matched_E->Fill(vec_std_jet[k]->tlv().E()*invGeV, weight);
04387
04388 h_std_track_jet_matched_dpt->Fill((tmp_track_jet->tlv().Pt()-
04389 vec_std_jet[k]->tlv().Pt())*invGeV,weight);
04390 h_std_track_jet_matched_deta->Fill(tmp_track_jet->tlv().Eta()-
04391 vec_std_jet[k]->tlv().Eta(),weight );
04392 h_std_track_jet_matched_dphi->Fill(tmp_track_jet->tlv().DeltaPhi(vec_std_jet[k]->tlv()),weight);
04393 h_std_track_jet_matched_dr->Fill(tmp_track_jet->tlv().DeltaR(vec_std_jet[k]->tlv()),weight);
04394 h_std_track_jet_matched_dE->Fill((tmp_track_jet->tlv().E()-
04395 vec_std_jet[k]->tlv().E())*invGeV,weight);
04396
04397 h_std_track_jet_matched_resolution_pt
04398 ->Fill(vec_std_jet[k]->tlv().Pt()*invGeV,
04399 (tmp_track_jet->tlv().Pt()-vec_std_jet[k]->tlv().Pt())/
04400 (vec_std_jet[k]->tlv().Pt()),weight);
04401
04402 h_std_track_jet_matched_resolution_eta
04403 ->Fill(vec_std_jet[k]->tlv().Eta(),
04404 (tmp_track_jet->tlv().Eta()-vec_std_jet[k]->tlv().Eta())/
04405 (vec_std_jet[k]->tlv().Eta()),weight);
04406
04407 h_std_track_jet_matched_resolution_phi
04408 ->Fill(vec_std_jet[k]->tlv().Phi(),
04409 (tmp_track_jet->tlv().DeltaPhi(vec_std_jet[k]->tlv()))/
04410 (vec_std_jet[k]->tlv().Phi()),weight);
04411
04412
04413 h_std_track_jet_matched_vs_eta
04414 ->Fill(vec_std_jet[k]->tlv().Eta(), 1., weight);
04415 h_std_track_jet_matched_vs_pt
04416 ->Fill(vec_std_jet[k]->tlv().Pt(), 1., weight);
04417
04418
04419
04420 h_std_track_jet_matched_pt_corr->Fill( ((MyParticleJet*)(vec_std_jet[k]))
04421 ->pt_pucorr(m_primary_vertex_index),weight);
04422
04423 h_std_track_jet_matched_trkptratio->Fill( ((MyParticleJet*)(vec_std_jet[k]))
04424 ->tracks_ptratio(m_primary_vertex_index),weight );
04425
04426 h_std_track_jet_matched_cmstrkptratio->Fill( ((MyParticleJet*)(vec_std_jet[k]))
04427 ->tracks_cmsptratio(m_primary_vertex_index),weight );
04428
04429
04430 h_std_track_jet_matched_pt_vs_jetptratio->Fill( (vec_std_jet[k])->tlv().Pt(),
04431 tmp_track_jet->tlv().Pt()/(vec_std_jet[k])->tlv().Pt(),weight);
04432
04433 h_std_track_jet_matched_pt_vs_jetptratio_corr
04434 ->Fill( ((MyParticleJet*)(vec_std_jet[k]))->pt_pucorr(m_primary_vertex_index),
04435 tmp_track_jet->tlv().Pt()/((MyParticleJet*)(vec_std_jet[k]))
04436 ->pt_pucorr(m_primary_vertex_index),weight);
04437
04438 h_std_track_jet_matched_pt_vs_trackjetpt->Fill( (vec_std_jet[k])->tlv().Pt(),
04439 tmp_track_jet->tlv().Pt(),weight);
04440
04441 h_std_track_jet_matched_pt_vs_trackjetpt_corr->Fill( ((MyParticleJet*)(vec_std_jet[k]))
04442 ->pt_pucorr(m_primary_vertex_index),
04443 tmp_track_jet->tlv().Pt(),weight);
04444
04445 }
04446 else{
04447
04448 h_std_track_jet_match->Fill(0.,weight);
04449
04450 h_std_track_jet_notmatched_pt->Fill(vec_std_jet[k]->tlv().Pt()*invGeV, weight);
04451 h_std_track_jet_notmatched_eta->Fill(vec_std_jet[k]->tlv().Eta(), weight);
04452 h_std_track_jet_notmatched_phi->Fill(vec_std_jet[k]->tlv().Phi(), weight);
04453 h_std_track_jet_notmatched_E->Fill(vec_std_jet[k]->tlv().E()*invGeV, weight);
04454 h_std_track_jet_notmatched_ntrks->Fill(((MyParticleJet*)(vec_std_jet[k]))->nb_tracks(),weight);
04455
04456 h_std_track_jet_matched_vs_eta
04457 ->Fill(vec_std_jet[k]->tlv().Eta(), 0., weight);
04458 h_std_track_jet_matched_vs_pt
04459 ->Fill(vec_std_jet[k]->tlv().Pt(), 0., weight);
04460
04461 }
04462 }
04463
04464
04465
04466
04467 m_tools.clear_vector(vec_std_jet);
04468 m_tools.clear_vector(vec_track_jet);
04469
04470
04471 }
04472
04473
04474
04475
04476
04477
04478
04479 void
04480 MyHtoWWAnalysis::match_truth_track_with_std_jets( std::vector<MyParticle*> vec_truth_track_jet,
04481 std::vector<MyParticle*> vec_truth_std_jet) {
04482
04483
04484
04485
04486 double match_window = m_cutvalue_jet_match_dR;
04487
04488
04489 for (unsigned int k=0; k<vec_truth_track_jet.size(); k++) {
04490
04491 MyParticle* tmp_std_jet = NULL;
04492 tmp_std_jet = m_tools.find_matching_particle( vec_truth_track_jet[k],
04493 vec_truth_std_jet, match_window );
04494
04495 if(tmp_std_jet!=NULL){
04496
04497 h_truth_track_std_jet_match->Fill(1.,weight);
04498
04499 h_truth_track_std_jet_matched_pt->Fill(vec_truth_track_jet[k]->tlv().Pt()*invGeV, weight);
04500 h_truth_track_std_jet_matched_eta->Fill(vec_truth_track_jet[k]->tlv().Eta(), weight);
04501 h_truth_track_std_jet_matched_phi->Fill(vec_truth_track_jet[k]->tlv().Phi(), weight);
04502 h_truth_track_std_jet_matched_E->Fill(vec_truth_track_jet[k]->tlv().E()*invGeV, weight);
04503
04504 h_truth_track_std_jet_matched_vs_eta
04505 ->Fill(vec_truth_track_jet[k]->tlv().Eta(), 1., weight);
04506 h_truth_track_std_jet_matched_vs_pt
04507 ->Fill(vec_truth_track_jet[k]->tlv().Pt(), 1., weight);
04508
04509
04510
04511 h_truth_track_std_jet_matched_jetptratio->Fill(vec_truth_track_jet[k]->tlv().Pt()/
04512 tmp_std_jet->tlv().Pt(),weight);
04513
04514
04515
04516
04517
04518
04519
04520
04521
04522
04523
04524
04525
04526
04527
04528
04529
04530
04531
04532
04533
04534 h_truth_track_std_jet_matched_pt_vs_jetptratio->Fill( (vec_truth_track_jet[k])->tlv().Pt(),
04535 (vec_truth_track_jet[k])->tlv().Pt()/tmp_std_jet->tlv().Pt(),weight);
04536
04537
04538
04539
04540
04541
04542 h_truth_track_std_jet_matched_pt_vs_stdjetpt->Fill( (vec_truth_track_jet[k])->tlv().Pt(),
04543 tmp_std_jet->tlv().Pt(),weight);
04544
04545
04546
04547
04548
04549
04550 }
04551 else{
04552 h_truth_track_std_jet_match->Fill(0.,weight);
04553
04554 h_truth_track_std_jet_notmatched_pt->Fill(vec_truth_track_jet[k]->tlv().Pt()*invGeV, weight);
04555 h_truth_track_std_jet_notmatched_eta->Fill(vec_truth_track_jet[k]->tlv().Eta(), weight);
04556 h_truth_track_std_jet_notmatched_phi->Fill(vec_truth_track_jet[k]->tlv().Phi(), weight);
04557 h_truth_track_std_jet_notmatched_E->Fill(vec_truth_track_jet[k]->tlv().E()*invGeV, weight);
04558
04559
04560 h_truth_track_std_jet_matched_vs_eta
04561 ->Fill(vec_truth_track_jet[k]->tlv().Eta(), 0., weight);
04562 h_truth_track_std_jet_matched_vs_pt
04563 ->Fill(vec_truth_track_jet[k]->tlv().Pt(), 0., weight);
04564 }
04565 }
04566
04567
04568 for (unsigned int k=0; k<vec_truth_std_jet.size(); k++) {
04569
04570 MyParticle* tmp_track_jet = NULL;
04571 tmp_track_jet = m_tools.find_matching_particle( vec_truth_std_jet[k],
04572 vec_truth_track_jet, match_window );
04573
04574 if(tmp_track_jet!=NULL){
04575
04576 h_truth_std_track_jet_match->Fill(1.,weight);
04577
04578 h_truth_std_track_jet_matched_pt->Fill(vec_truth_std_jet[k]->tlv().Pt()*invGeV, weight);
04579 h_truth_std_track_jet_matched_eta->Fill(vec_truth_std_jet[k]->tlv().Eta(), weight);
04580 h_truth_std_track_jet_matched_phi->Fill(vec_truth_std_jet[k]->tlv().Phi(), weight);
04581 h_truth_std_track_jet_matched_E->Fill(vec_truth_std_jet[k]->tlv().E()*invGeV, weight);
04582
04583 h_truth_std_track_jet_matched_vs_eta
04584 ->Fill(vec_truth_std_jet[k]->tlv().Eta(), 1., weight);
04585 h_truth_std_track_jet_matched_vs_pt
04586 ->Fill(vec_truth_std_jet[k]->tlv().Pt(), 1., weight);
04587
04588
04589
04590 h_truth_std_track_jet_matched_jetptratio->Fill(tmp_track_jet->tlv().Pt()/
04591 (vec_truth_std_jet[k])->tlv().Pt(),weight);
04592
04593 h_truth_std_track_jet_matched_pt_vs_jetptratio
04594 ->Fill( (vec_truth_std_jet[k])->tlv().Pt(),
04595 tmp_track_jet->tlv().Pt()/(vec_truth_std_jet[k])->tlv().Pt(),weight);
04596
04597
04598
04599
04600
04601
04602 h_truth_std_track_jet_matched_pt_vs_trackjetpt->Fill( (vec_truth_std_jet[k])->tlv().Pt(),
04603 tmp_track_jet->tlv().Pt(),weight);
04604
04605
04606
04607
04608
04609
04610
04611 }
04612 else{
04613
04614 h_truth_std_track_jet_match->Fill(0.,weight);
04615
04616 h_truth_std_track_jet_notmatched_pt->Fill(vec_truth_std_jet[k]->tlv().Pt()*invGeV, weight);
04617 h_truth_std_track_jet_notmatched_eta->Fill(vec_truth_std_jet[k]->tlv().Eta(), weight);
04618 h_truth_std_track_jet_notmatched_phi->Fill(vec_truth_std_jet[k]->tlv().Phi(), weight);
04619 h_truth_std_track_jet_notmatched_E->Fill(vec_truth_std_jet[k]->tlv().E()*invGeV, weight);
04620
04621
04622 h_truth_std_track_jet_matched_vs_eta
04623 ->Fill(vec_truth_std_jet[k]->tlv().Eta(), 0., weight);
04624 h_truth_std_track_jet_matched_vs_pt
04625 ->Fill(vec_truth_std_jet[k]->tlv().Pt(), 0., weight);
04626
04627 }
04628 }
04629
04630 m_tools.clear_vector(vec_truth_std_jet);
04631 m_tools.clear_vector(vec_truth_track_jet);
04632
04633
04634 }
04635
04636
04637
04638
04639
04640
04641 void
04642 MyHtoWWAnalysis::jet_btag_eff( vector<MyParticle*> vec_reco_jets,
04643 MyTruthParticleManager *truth_manager) {
04644
04645 vector<MyParticle*> vec_bjet_cands(0);
04646 vector<MyParticle*> vec_truth_bs_selected(0);
04647
04648
04649
04650 vector<MyParticle*> vec_truth_bs = truth_manager->getParticles_with_ID(5);
04651
04652 for (unsigned int k=0; k<vec_truth_bs.size(); k++) {
04653
04654 MyTruthParticle* truthpart = (MyTruthParticle*)vec_truth_bs[k];
04655
04656 MyTruthParticle* mother = truth_manager->get_mother(truthpart);
04657
04658 if(mother==NULL){
04659 continue;
04660 }
04661
04662 int motherId = TMath::Abs(mother->pdgId());
04663
04664 if( motherId!=6 ){
04665 continue;
04666 }
04667
04668 h_b_truth_mother_pdgID->Fill(motherId);
04669 h_b_truth_status->Fill(truthpart->status());
04670
04671
04672
04673
04674 vec_truth_bs_selected.push_back( vec_truth_bs[k] );
04675
04676 }
04677
04678
04679
04680
04681 vector<MyParticle*> vec_jets =
04682 m_tools.pt_eta_cut(vec_reco_jets, 20.0*GeV, -1, 0.0, 2.5);
04683
04684
04685 for (unsigned int k=0; k<vec_jets.size(); k++) {
04686
04687 double bweight = ((MyParticleJet*)(vec_jets[k]))->b_tag_weight();
04688
04689 if( bweight > m_cutvalue_bjet_weight_max ){
04690
04691 vec_bjet_cands.push_back( vec_jets[k] );
04692 h_bjet_ratio->Fill(1.,weight);
04693 }
04694 else{
04695 h_bjet_ratio->Fill(0.,weight);
04696 }
04697 }
04698
04699 h_b_truth_nb->Fill(vec_truth_bs_selected.size(),weight);
04700
04701
04702
04703
04704 for (unsigned int k=0; k<vec_truth_bs_selected.size(); k++) {
04705
04706 h_b_truth_pt->Fill(vec_truth_bs_selected[k]->tlv().Pt()*invGeV,weight);
04707
04708 MyParticle* tmp_jet = NULL;
04709
04710 tmp_jet = m_tools.find_matching_particle( vec_truth_bs_selected[k],
04711 vec_bjet_cands, 0.3 );
04712
04713 if(tmp_jet!=NULL){
04714 h_b_eff->Fill(1.,weight);
04715 }
04716 else{
04717 h_b_eff->Fill(0.,weight);
04718 }
04719 }
04720
04721
04722
04723
04724 for (unsigned int k=0; k<vec_bjet_cands.size(); k++) {
04725
04726 MyParticle* tmp_b = NULL;
04727
04728 tmp_b = m_tools.find_matching_particle( vec_bjet_cands[k],
04729 vec_truth_bs_selected, 0.3 );
04730
04731 if(tmp_b!=NULL){
04732 h_b_fake->Fill(0.,weight);
04733 }
04734 else{
04735 h_b_fake->Fill(1.,weight);
04736 }
04737 }
04738
04739
04740
04741
04742 m_tools.clear_vector(vec_bjet_cands);
04743 m_tools.clear_vector(vec_truth_bs_selected);
04744
04745
04746
04747
04748
04749 return;
04750 }
04751
04752
04753
04754
04755
04756
04757
04758 void
04759 MyHtoWWAnalysis::lepton_isolation_study( vector<MyParticle*> vec_leptons,
04760 MyTruthParticleManager *truth_manager) {
04761
04762 if(vec_leptons.size()==0){
04763 return;
04764 }
04765
04766 TString type = TString(vec_leptons[0]->type());
04767 int pdgId = TMath::Abs(vec_leptons[0]->pdgId());
04768
04769 vector<MyParticle*> vec_truth_leptons(0);
04770 vec_truth_leptons = truth_manager->getParticles_with_ID(pdgId);
04771
04772
04773
04774 vector<MyParticle*> vec_truth_leptons_isol(0);
04775 vector<MyParticle*> vec_truth_leptons_nonisol(0);
04776
04777 for (unsigned int k=0; k<vec_truth_leptons.size(); k++) {
04778
04779 int mother_pdgId(-1);
04780
04781 MyTruthParticle* mother = truth_manager->get_mother((MyTruthParticle*)vec_truth_leptons[k]);
04782 if (mother!=NULL ) {
04783 mother_pdgId = mother->pdgId();
04784 }
04785
04786 if( TMath::Abs(mother_pdgId)==pdgId || mother_pdgId==-1 ){
04787 continue;
04788 }
04789
04790 if(TMath::Abs(mother_pdgId)==24){
04791 vec_truth_leptons_isol.push_back(vec_truth_leptons[k]);
04792
04793 }
04794 else{
04795 vec_truth_leptons_nonisol.push_back(vec_truth_leptons[k]);
04796 }
04797 }
04798
04799 for (unsigned int k=0; k<vec_leptons.size(); k++) {
04800
04801 MyParticle* tmp_truth_lepton_isol = NULL;
04802
04803 tmp_truth_lepton_isol = m_tools.find_matching_particle( vec_leptons[k],
04804 vec_truth_leptons_isol, 0.1 );
04805
04806 if(tmp_truth_lepton_isol!=NULL){
04807 if(type=="electron"){
04808 t_cutopt_e_isol->Fill( weight,
04809 ((MyElectron*)vec_leptons[k])->track_Et_in_cone(0),
04810 ((MyElectron*)vec_leptons[k])->track_Et_in_cone(1),
04811 ((MyElectron*)vec_leptons[k])->track_Et_in_cone(2),
04812 ((MyElectron*)vec_leptons[k])->track_Et_in_cone(3)
04813 );
04814 }
04815 if(type=="muon"){
04816 t_cutopt_mu_isol->Fill( weight,
04817 ((MyMuon*)vec_leptons[k])->track_Et_in_cone(0),
04818 ((MyMuon*)vec_leptons[k])->track_Et_in_cone(1),
04819 ((MyMuon*)vec_leptons[k])->track_Et_in_cone(2),
04820 ((MyMuon*)vec_leptons[k])->track_Et_in_cone(3),
04821 ((MyMuon*)vec_leptons[k])->track_Et_in_cone(4),
04822 ((MyMuon*)vec_leptons[k])->track_Et_in_cone(5),
04823 ((MyMuon*)vec_leptons[k])->track_Et_in_cone(6),
04824 ((MyMuon*)vec_leptons[k])->track_Et_in_cone(7)
04825 );
04826 }
04827 }
04828 }
04829
04830 m_tools.clear_vector(vec_truth_leptons_isol);
04831
04832
04833 for (unsigned int k=0; k<vec_leptons.size(); k++) {
04834
04835 MyParticle* tmp_truth_lepton_nonisol = NULL;
04836
04837 tmp_truth_lepton_nonisol = m_tools.find_matching_particle( vec_leptons[k],
04838 vec_truth_leptons_nonisol, 0.1 );
04839
04840 if(tmp_truth_lepton_nonisol!=NULL){
04841 if(type=="electron"){
04842 t_cutopt_e_nonisol->Fill( weight,
04843 ((MyElectron*)vec_leptons[k])->track_Et_in_cone(0),
04844 ((MyElectron*)vec_leptons[k])->track_Et_in_cone(1),
04845 ((MyElectron*)vec_leptons[k])->track_Et_in_cone(2),
04846 ((MyElectron*)vec_leptons[k])->track_Et_in_cone(3)
04847 );
04848 }
04849 if(type=="muon"){
04850 t_cutopt_mu_nonisol->Fill( weight,
04851 ((MyMuon*)vec_leptons[k])->track_Et_in_cone(0),
04852 ((MyMuon*)vec_leptons[k])->track_Et_in_cone(1),
04853 ((MyMuon*)vec_leptons[k])->track_Et_in_cone(2),
04854 ((MyMuon*)vec_leptons[k])->track_Et_in_cone(3),
04855 ((MyMuon*)vec_leptons[k])->track_Et_in_cone(4),
04856 ((MyMuon*)vec_leptons[k])->track_Et_in_cone(5),
04857 ((MyMuon*)vec_leptons[k])->track_Et_in_cone(6),
04858 ((MyMuon*)vec_leptons[k])->track_Et_in_cone(7)
04859 );
04860 }
04861 }
04862 }
04863
04864 m_tools.clear_vector(vec_truth_leptons_nonisol);
04865
04866 return;
04867 }
04868
04869
04870
04871
04872
04873
04874
04875
04876 void
04877 MyHtoWWAnalysis::fill_vertex_histos(const vector<MyVertex*> *vertices,
04878 const vector<MyVertex*> *truth_vertices){
04879
04880
04881
04882 h_nb_vertices->Fill(vertices->size(), weight);
04883
04884 int rec_vert_id(0);
04885 TVector3 sel_vert;
04886
04887
04888 if (vertices->size()>0) {
04889
04890 double Et_1((*vertices)[0]->Et());
04891 sel_vert = (*vertices)[0]->position();
04892
04893 for (unsigned int k=1; k<vertices->size(); k++) {
04894 if (Et_1<(*vertices)[k]->Et()) {
04895 Et_1 = (*vertices)[k]->Et();
04896 sel_vert = (*vertices)[k]->position();
04897 rec_vert_id = k;
04898 }
04899 }
04900
04901 h_Et_selected_vertex->Fill(Et_1, weight);
04902
04903
04904 if (vertices->size()>1) {
04905 double Et_2(0.0);
04906
04907 for (unsigned int k=0; k<vertices->size(); k++) {
04908 if ((*vertices)[k]->Et()<Et_1 &&
04909 (*vertices)[k]->Et()>Et_2) {
04910 Et_2 = (*vertices)[k]->Et();
04911 }
04912 }
04913
04914 h_Et_v2_vs_Et_v1->Fill(Et_1, Et_2, weight);
04915 }
04916 }
04917
04918 double min_delta(1.0e99);
04919
04920
04921 for (unsigned int k=0; k<vertices->size(); k++) {
04922
04923 if ((*vertices)[k]->position()!=sel_vert) {
04924
04925 TVector3 delta_vert((*vertices)[k]->position()-sel_vert);
04926
04927 if (delta_vert.Mag()<min_delta) {
04928 min_delta = delta_vert.Mag();
04929 }
04930 }
04931 }
04932
04933 h_delta_vertices->Fill(min_delta, weight);
04934
04935
04936 h_rec_nb_tracks_from_vertex
04937 ->Fill((*vertices)[rec_vert_id]->numberOfTracks(), weight);
04938
04939
04940
04941 h_nb_truth_vertices->Fill(truth_vertices->size(), weight);
04942
04943 int truth_vert_id(0);
04944 TVector3 sel_truth_vert;
04945
04946
04947 if (truth_vertices->size()>0) {
04948
04949 double Et_1((*truth_vertices)[0]->Et());
04950
04951 sel_truth_vert=(*truth_vertices)[0]->position();
04952
04953 for (unsigned int k=1; k<truth_vertices->size(); k++) {
04954 if (Et_1<(*truth_vertices)[k]->Et()) {
04955 Et_1 = (*truth_vertices)[k]->Et();
04956 sel_truth_vert=(*truth_vertices)[k]->position();
04957 truth_vert_id = k;
04958 }
04959 }
04960
04961 h_Et_selected_truth_vertex->Fill(Et_1, weight);
04962
04963
04964 if (truth_vertices->size()>1) {
04965 double Et_2(0.0);
04966 for (unsigned int k=0; k<truth_vertices->size(); k++) {
04967 if ((*truth_vertices)[k]->Et()<Et_1 &&
04968 (*truth_vertices)[k]->Et()>Et_2) {
04969 Et_2 = (*truth_vertices)[k]->Et();
04970 }
04971 }
04972
04973 h_truth_Et_v2_vs_Et_v1->Fill(Et_1, Et_2, weight);
04974 }
04975 }
04976
04977
04978 h_delta_selected_vertices->Fill(sel_vert.z()-sel_truth_vert.z(), weight);
04979
04980
04981 h_truth_nb_tracks_from_vertex
04982 ->Fill((*truth_vertices)[truth_vert_id]->numberOfTracks(), weight);
04983
04984
04985 h_vertex_ratio_number_of_tracks
04986 ->Fill((*vertices)[rec_vert_id]->numberOfTracks()/
04987 static_cast<double>((*truth_vertices)[truth_vert_id]->numberOfTracks()),
04988 weight);
04989
04990 h_vertex_ratio_Et
04991 ->Fill((*vertices)[rec_vert_id]->Et()/(*truth_vertices)[truth_vert_id]->Et(),
04992 weight);
04993
04994
04995 t_vertex_ntuple->Fill( weight,
04996 vertices->size(),
04997 (*vertices)[rec_vert_id]->chi2(),
04998 (*vertices)[rec_vert_id]->numberOfTracks(),
04999 (*vertices)[rec_vert_id]->Et(),
05000 (*vertices)[rec_vert_id]->position().x(),
05001 (*vertices)[rec_vert_id]->position().y(),
05002 (*vertices)[rec_vert_id]->position().z(),
05003 truth_vertices->size(),
05004 (*truth_vertices)[truth_vert_id]->numberOfTracks(),
05005 (*truth_vertices)[truth_vert_id]->Et(),
05006 (*truth_vertices)[truth_vert_id]->position().x(),
05007 (*truth_vertices)[truth_vert_id]->position().y(),
05008 (*truth_vertices)[truth_vert_id]->position().z());
05009
05010
05011
05012 }
05013
05014
05015
05016
05017
05018
05019
05020 void
05021 MyHtoWWAnalysis::fill_raw_aod_content_histos( vector<MyParticle*> v_e_reco_aod,
05022 vector<MyParticle*> v_mu_reco_aod,
05023 vector<MyParticle*> v_jet_reco_aod,
05024 vector<MyParticle*> v_e_truth_aod,
05025 vector<MyParticle*> v_mu_truth_aod,
05026 vector<MyParticle*> v_jet_truth_aod) {
05027
05028
05029 h_e_reco_aod_nb->Fill(v_e_reco_aod.size(), weight);
05030 for (unsigned int k=0; k<v_e_reco_aod.size(); k++) {
05031 h_e_reco_aod_pt->Fill( (v_e_reco_aod[k])->tlv().Pt() * invGeV,weight);
05032 h_e_reco_aod_eta->Fill((v_e_reco_aod[k])->tlv().Eta(),weight);
05033 h_e_reco_aod_phi->Fill((v_e_reco_aod[k])->tlv().Phi(),weight);
05034 }
05035 h_e_truth_aod_nb->Fill(v_e_truth_aod.size(), weight);
05036 for (unsigned int k=0; k<v_e_truth_aod.size(); k++) {
05037 h_e_truth_aod_pt->Fill( (v_e_truth_aod[k])->tlv().Pt() * invGeV,weight);
05038 h_e_truth_aod_eta->Fill((v_e_truth_aod[k])->tlv().Eta(),weight);
05039 h_e_truth_aod_phi->Fill((v_e_truth_aod[k])->tlv().Phi(),weight);
05040 }
05041
05042
05043 h_mu_reco_aod_nb->Fill(v_mu_reco_aod.size(), weight);
05044 for (unsigned int k=0; k<v_mu_reco_aod.size(); k++) {
05045 h_mu_reco_aod_pt->Fill( (v_mu_reco_aod[k])->tlv().Pt() * invGeV,weight);
05046 h_mu_reco_aod_eta->Fill((v_mu_reco_aod[k])->tlv().Eta(),weight);
05047 h_mu_reco_aod_phi->Fill((v_mu_reco_aod[k])->tlv().Phi(),weight);
05048 h_mu_reco_aod_fitChi2->Fill(((MyMuon*)(v_mu_reco_aod[k]))->fitChi2(),weight);
05049 h_mu_reco_aod_fitChi2OverDoF->Fill(((MyMuon*)(v_mu_reco_aod[k]))->fitChi2OverDoF(),weight);
05050 h_mu_reco_aod_matchChi2->Fill(((MyMuon*)(v_mu_reco_aod[k]))->matchChi2(),weight);
05051 h_mu_reco_aod_matchChi2OverDoF->Fill(((MyMuon*)(v_mu_reco_aod[k]))->matchChi2OverDoF(),weight);
05052 }
05053 h_mu_truth_aod_nb->Fill(v_mu_truth_aod.size(), weight);
05054 for (unsigned int k=0; k<v_mu_truth_aod.size(); k++) {
05055 h_mu_truth_aod_pt->Fill( (v_mu_truth_aod[k])->tlv().Pt() * invGeV,weight);
05056 h_mu_truth_aod_eta->Fill((v_mu_truth_aod[k])->tlv().Eta(),weight);
05057 h_mu_truth_aod_phi->Fill((v_mu_truth_aod[k])->tlv().Phi(),weight);
05058 }
05059
05060
05061
05062 h_jet_reco_aod_nb->Fill(v_jet_reco_aod.size(), weight);
05063 for (unsigned int k=0; k<v_jet_reco_aod.size(); k++) {
05064 h_jet_reco_aod_pt->Fill( (v_jet_reco_aod[k])->tlv().Pt() * invGeV,weight);
05065 h_jet_reco_aod_eta->Fill((v_jet_reco_aod[k])->tlv().Eta(),weight);
05066 h_jet_reco_aod_phi->Fill((v_jet_reco_aod[k])->tlv().Phi(),weight);
05067 }
05068 h_jet_truth_aod_nb->Fill(v_jet_truth_aod.size(), weight);
05069 for (unsigned int k=0; k<v_jet_truth_aod.size(); k++) {
05070 h_jet_truth_aod_pt->Fill( (v_jet_truth_aod[k])->tlv().Pt() * invGeV,weight);
05071 h_jet_truth_aod_eta->Fill((v_jet_truth_aod[k])->tlv().Eta(),weight);
05072 h_jet_truth_aod_phi->Fill((v_jet_truth_aod[k])->tlv().Phi(),weight);
05073 }
05074
05075 return;
05076 }
05077
05078
05079
05080
05081
05082
05083
05084 vector<MyParticlePair>
05085 MyHtoWWAnalysis::get_tagjet_pairs(vector<MyVBFCandidate> vec_candidates){
05086
05087 vector<MyParticlePair> vec_tagjet_pairs(0);
05088
05089 for(unsigned int iCand=0; iCand<vec_candidates.size(); iCand++){
05090
05091 bool bool_add_tagjet_pair = true;
05092
05093 MyParticlePair tagjet_pair
05094 = vec_candidates[iCand].get_tagjet_pair();
05095
05096 MyParticle* jet1 = tagjet_pair.get_particle1();
05097 MyParticle* jet2 = tagjet_pair.get_particle2();
05098
05099 for(unsigned int iJP=0; iJP<vec_tagjet_pairs.size(); iJP++){
05100
05101 if( jet1->index() == vec_tagjet_pairs[iJP].get_particle1()->index() &&
05102 jet2->index() == vec_tagjet_pairs[iJP].get_particle2()->index() ){
05103
05104 bool_add_tagjet_pair = false;
05105 break;
05106 }
05107 }
05108
05109 if(bool_add_tagjet_pair){
05110 vec_tagjet_pairs.push_back( tagjet_pair );
05111 }
05112
05113 }
05114
05115 return vec_tagjet_pairs;
05116
05117 }
05118
05119
05120
05121
05122
05123
05124
05125 vector<MyParticlePair>
05126 MyHtoWWAnalysis::get_lepton_pairs(vector<MyVBFCandidate> vec_candidates){
05127
05128 vector<MyParticlePair> vec_lepton_pairs(0);
05129
05130 for(unsigned int iCand=0; iCand<vec_candidates.size(); iCand++){
05131
05132 bool bool_add_lepton_pair = true;
05133
05134 MyParticlePair lepton_pair
05135 = vec_candidates[iCand].get_lepton_pair();
05136
05137 MyParticle* lepton1 = lepton_pair.get_particle1();
05138 MyParticle* lepton2 = lepton_pair.get_particle2();
05139
05140 for(unsigned int iLP=0; iLP<vec_lepton_pairs.size(); iLP++){
05141
05142
05143
05144
05145
05146
05147 if( lepton1->pdgId() == vec_lepton_pairs[iLP].get_particle1()->pdgId() &&
05148 lepton2->pdgId() == vec_lepton_pairs[iLP].get_particle2()->pdgId() &&
05149 lepton1->index() == vec_lepton_pairs[iLP].get_particle1()->index() &&
05150 lepton2->index() == vec_lepton_pairs[iLP].get_particle2()->index() ){
05151
05152 bool_add_lepton_pair = false;
05153 break;
05154 }
05155 }
05156
05157 if(bool_add_lepton_pair){
05158 vec_lepton_pairs.push_back( lepton_pair );
05159 }
05160 }
05161
05162 return vec_lepton_pairs;
05163
05164 }
05165
05166
05167
05168
05169
05170
05171
05172 vector<MyParticle*>
05173 MyHtoWWAnalysis::get_tagjets(vector<MyParticlePair> vec_tagjet_pairs){
05174
05175 vector<MyParticle*> vec_tagjets(0);
05176
05177 for(unsigned int k=0; k<vec_tagjet_pairs.size(); k++){
05178
05179 bool bool_add1 = true;
05180 bool bool_add2 = true;
05181
05182 MyParticle* jet1 = vec_tagjet_pairs[k].get_particle1();
05183 MyParticle* jet2 = vec_tagjet_pairs[k].get_particle2();
05184
05185
05186
05187 for(unsigned int iJet=0; iJet<vec_tagjets.size(); iJet++){
05188
05189
05190 if( jet1->index() == vec_tagjets[iJet]->index() ){
05191 bool_add1 = false;
05192 break;
05193 }
05194 }
05195
05196 if(bool_add1) vec_tagjets.push_back(jet1);
05197
05198 for(unsigned int iJet=0; iJet<vec_tagjets.size(); iJet++){
05199
05200 if( jet2->index() == vec_tagjets[iJet]->index() ){
05201 bool_add2 = false;
05202 break;
05203 }
05204 }
05205
05206 if(bool_add2) vec_tagjets.push_back(jet2);
05207
05208 }
05209
05210 return vec_tagjets;
05211
05212 }
05213
05214
05215
05216
05217
05218
05219
05220 vector<MyParticle*>
05221 MyHtoWWAnalysis::get_leptons(vector<MyParticlePair> vec_lepton_pairs){
05222
05223 vector<MyParticle*> vec_leptons(0);
05224
05225 for(unsigned int k=0; k<vec_lepton_pairs.size(); k++){
05226
05227 bool bool_add1 = true;
05228 bool bool_add2 = true;
05229
05230 MyParticle* lepton1 = vec_lepton_pairs[k].get_particle1();
05231 MyParticle* lepton2 = vec_lepton_pairs[k].get_particle2();
05232
05233 for(unsigned int iLep=0; iLep<vec_leptons.size(); iLep++){
05234
05235 if( lepton1->pdgId() == vec_leptons[iLep]->pdgId() &&
05236 lepton1->index() == vec_leptons[iLep]->index() ){
05237
05238 bool_add1 = false;
05239 break;
05240 }
05241 }
05242
05243 if(bool_add1) vec_leptons.push_back(lepton1);
05244
05245 for(unsigned int iLep=0; iLep<vec_leptons.size(); iLep++){
05246
05247 if( lepton2->pdgId() == vec_leptons[iLep]->pdgId() &&
05248 lepton2->index() == vec_leptons[iLep]->index() ){
05249
05250 bool_add2 = false;
05251 break;
05252 }
05253 }
05254
05255 if(bool_add2) vec_leptons.push_back(lepton2);
05256
05257 }
05258
05259 return vec_leptons;
05260
05261 }
05262
05263
05264
05265
05266
05267
05268
05269 void
05270 MyHtoWWAnalysis::fill_all_ana_histos(int iCut, MyMissingEt missinget){
05271
05272
05273 if(!flag_evt_selected[iCut]){
05274 return;
05275 }
05276
05277
05278
05279
05280
05281 vector<MyParticlePair>
05282 vec_tagjet_pairs = get_tagjet_pairs(v_cut_candidates[iCut]);
05283
05284 vector<MyParticlePair>
05285 vec_lepton_pairs = get_lepton_pairs(v_cut_candidates[iCut]);
05286
05287 vector<MyParticle*> vec_tagjets = get_tagjets(vec_tagjet_pairs);
05288 vector<MyParticle*> vec_leptons = get_leptons(vec_lepton_pairs);
05289
05290
05291 vector<MyParticle*> vec_electrons(0);
05292 vector<MyParticle*> vec_muons(0);
05293
05294 for(unsigned int k=0; k<vec_leptons.size(); k++){
05295
05296 if(TMath::Abs(vec_leptons[k]->pdgId()) == 11){
05297 vec_electrons.push_back(vec_leptons[k]);
05298 }
05299 }
05300
05301 for(unsigned int k=0; k<vec_leptons.size(); k++){
05302
05303 if(TMath::Abs(vec_leptons[k]->pdgId()) == 13){
05304 vec_muons.push_back(vec_leptons[k]);
05305 }
05306 }
05307
05308
05309
05310
05311
05312
05313
05314
05315
05316
05317
05318
05319
05320
05321
05322
05323
05324
05325
05326
05327
05328
05329
05330
05331
05332
05333
05334
05335
05336
05337
05338
05339
05340
05341
05342
05343
05344
05345
05346
05347
05348
05349
05350
05351
05352
05353
05354
05355
05356
05357
05358
05359
05360
05361
05362
05363
05364 (v_h_centraljet_all_nb[iCut])->Fill(v_centraljet_ana.size(),weight);
05365
05366 for (unsigned int k=0; k<v_centraljet_ana.size(); k++){
05367 (v_h_centraljet_all_pt[iCut])->Fill((v_centraljet_ana[k])->tlv().Pt()*invGeV,weight);
05368 (v_h_centraljet_all_eta[iCut])->Fill((v_centraljet_ana[k])->tlv().Eta(),weight);
05369 (v_h_centraljet_all_phi[iCut])->Fill((v_centraljet_ana[k])->tlv().Phi(),weight);
05370 }
05371
05372
05373
05374 h_cut_events->Fill(iCut,weight);
05375 v_h_candidates_nb[iCut]->Fill( v_cut_candidates[iCut].size(),weight );
05376
05377 for(unsigned int iCand=0; iCand<v_cut_candidates[iCut].size(); iCand++){
05378 h_cut_candidates->Fill(iCut,weight);
05379 }
05380
05381
05382
05383
05384 (v_h_2j_ana_nb[iCut])->Fill(vec_tagjet_pairs.size(),weight);
05385
05386 for (unsigned int k=0; k<vec_tagjet_pairs.size(); k++){
05387
05388 (v_h_2j_ana_eta[iCut]) ->Fill((vec_tagjet_pairs[k]).tlv().Eta(),weight);
05389 (v_h_2j_ana_phi[iCut]) ->Fill((vec_tagjet_pairs[k]).tlv().Phi(),weight);
05390 (v_h_2j_ana_pt[iCut]) ->Fill((vec_tagjet_pairs[k]).tlv().Pt()*invGeV,weight);
05391 (v_h_2j_ana_deta[iCut]) ->Fill((vec_tagjet_pairs[k]).AbsDeltaEta(),weight);
05392 (v_h_2j_ana_dphi[iCut]) ->Fill(TMath::Abs((vec_tagjet_pairs[k]).DeltaPhi()),weight);
05393 (v_h_2j_ana_dpt[iCut]) ->Fill(TMath::Abs((vec_tagjet_pairs[k]).get_particle1()->tlv().Pt()
05394 -(vec_tagjet_pairs[k]).get_particle2()->tlv().Pt())*invGeV,weight);
05395 (v_h_2j_ana_dr[iCut]) ->Fill((vec_tagjet_pairs[k]).DeltaR(),weight);
05396 (v_h_2j_ana_m[iCut]) ->Fill((vec_tagjet_pairs[k]).M()*invGeV,weight);
05397 }
05398
05399
05400
05401
05402 (v_h_2l_ana_nb[iCut])->Fill(vec_lepton_pairs.size(),weight);
05403
05404
05405 for (unsigned int k=0; k<vec_lepton_pairs.size(); k++){
05406
05407 (v_h_2l_ana_eta[iCut]) ->Fill((vec_lepton_pairs[k]).tlv().Eta(),weight);
05408 (v_h_2l_ana_phi[iCut]) ->Fill((vec_lepton_pairs[k]).tlv().Phi(),weight);
05409 (v_h_2l_ana_pt[iCut]) ->Fill((vec_lepton_pairs[k]).tlv().Pt()*invGeV,weight);
05410 (v_h_2l_ana_deta[iCut]) ->Fill((vec_lepton_pairs[k]).AbsDeltaEta(),weight);
05411 (v_h_2l_ana_dphi[iCut]) ->Fill(TMath::Abs((vec_lepton_pairs[k]).DeltaPhi()),weight);
05412 (v_h_2l_ana_dpt[iCut]) ->Fill(TMath::Abs((vec_lepton_pairs[k]).get_particle1()->tlv().Pt()
05413 -(vec_lepton_pairs[k]).get_particle2()->tlv().Pt())*invGeV,weight);
05414 (v_h_2l_ana_dr[iCut]) ->Fill((vec_lepton_pairs[k]).DeltaR(),weight);
05415 (v_h_2l_ana_m[iCut]) ->Fill((vec_lepton_pairs[k]).M()*invGeV,weight);
05416
05417 (v_h_2l_ana_costheta[iCut])->Fill( (vec_lepton_pairs[k]).tlv().CosTheta(),weight);
05418 }
05419
05420
05421
05422
05423 (v_h_jet_ana_nb[iCut])->Fill(vec_tagjets.size(),weight);
05424
05425 for (unsigned int k=0; k<vec_tagjets.size(); k++){
05426 (v_h_jet_ana_pt[iCut])->Fill((vec_tagjets[k])->tlv().Pt()*invGeV,weight);
05427 (v_h_jet_ana_eta[iCut])->Fill((vec_tagjets[k])->tlv().Eta(),weight);
05428 (v_h_jet_ana_phi[iCut])->Fill((vec_tagjets[k])->tlv().Phi(),weight);
05429 (v_h_jet_ana_bweight[iCut])->Fill(((MyParticleJet*)(vec_tagjets[k]))->b_tag_weight(),weight);
05430 }
05431
05432
05433
05434
05435 (v_h_lepton_ana_nb[iCut])->Fill(vec_leptons.size(),weight);
05436
05437 for (unsigned int k=0; k<vec_leptons.size(); k++){
05438 (v_h_lepton_ana_pt[iCut])->Fill((vec_leptons[k])->tlv().Pt()*invGeV,weight);
05439 (v_h_lepton_ana_eta[iCut])->Fill((vec_leptons[k])->tlv().Eta(),weight);
05440 (v_h_lepton_ana_phi[iCut])->Fill((vec_leptons[k])->tlv().Phi(),weight);
05441 }
05442
05443
05444
05445
05446 (v_h_e_ana_nb[iCut])->Fill(vec_electrons.size(),weight);
05447
05448 for (unsigned int k=0; k<vec_electrons.size(); k++){
05449 (v_h_e_ana_pt[iCut])->Fill((vec_electrons[k])->tlv().Pt()*invGeV,weight);
05450 (v_h_e_ana_eta[iCut])->Fill((vec_electrons[k])->tlv().Eta(),weight);
05451 (v_h_e_ana_phi[iCut])->Fill((vec_electrons[k])->tlv().Phi(),weight);
05452 }
05453
05454
05455
05456
05457 (v_h_mu_ana_nb[iCut])->Fill(vec_muons.size(),weight);
05458
05459 for (unsigned int k=0; k<vec_muons.size(); k++){
05460 (v_h_mu_ana_pt[iCut])->Fill((vec_muons[k])->tlv().Pt()*invGeV,weight);
05461 (v_h_mu_ana_eta[iCut])->Fill((vec_muons[k])->tlv().Eta(),weight);
05462 (v_h_mu_ana_phi[iCut])->Fill((vec_muons[k])->tlv().Phi(),weight);
05463
05464 (v_h_mu_ana_fitChi2[iCut])->Fill(((MyMuon*)(vec_muons[k]))->fitChi2(),weight);
05465 (v_h_mu_ana_fitChi2OverDoF[iCut])->Fill(((MyMuon*)(vec_muons[k]))->fitChi2OverDoF(),weight);
05466 (v_h_mu_ana_matchChi2[iCut])->Fill(((MyMuon*)(vec_muons[k]))->matchChi2(),weight);
05467 (v_h_mu_ana_matchChi2OverDoF[iCut])->Fill(((MyMuon*)(vec_muons[k]))->matchChi2OverDoF(),weight);
05468
05469 }
05470
05471
05472
05473
05474
05475
05476
05477
05478 TLorentzVector met_tlv;
05479 met_tlv = missinget.tlv();
05480
05481
05482
05483
05484 for(unsigned int iCand=0; iCand<v_cut_candidates[iCut].size(); iCand++){
05485
05486
05487
05488 MyParticlePair tagjet_pair
05489 = v_cut_candidates[iCut][iCand].get_tagjet_pair();
05490
05491 MyParticlePair lepton_pair
05492 = v_cut_candidates[iCut][iCand].get_lepton_pair();
05493
05494 TLorentzVector jet1 = tagjet_pair.get_particle1()->tlv();
05495 TLorentzVector jet2 = tagjet_pair.get_particle2()->tlv();
05496
05497 TLorentzVector lepton1 = lepton_pair.get_particle1()->tlv();
05498 TLorentzVector lepton2 = lepton_pair.get_particle2()->tlv();
05499
05500 double pt_x = missinget.met_x()
05501 + jet1.Px() + jet2.Px() + lepton1.Px() + lepton2.Px();
05502
05503 double pt_y = missinget.met_y()
05504 + jet1.Py() + jet2.Py() + lepton1.Py() + lepton2.Py();
05505
05506
05507 double pt_tot = TMath::Sqrt( pt_x*pt_x + pt_y*pt_y );
05508
05509 (v_h_ana_pttot[iCut])->Fill( pt_tot*invGeV,weight );
05510
05511
05512
05513
05514 double pt_miss = missinget.met();
05515
05516
05517
05518 double pt_lepton = lepton_pair.tlv().Pt();
05519
05520 double dphi = met_tlv.DeltaPhi( lepton_pair.tlv() );
05521
05522 double mt_llnu = TMath::Sqrt(2*pt_lepton*pt_miss
05523 * (1-(TMath::Cos(dphi))) );
05524
05525 (v_h_ana_mt_llnu[iCut])->Fill( mt_llnu*invGeV,weight );
05526
05527
05528
05529
05530 double Et_ll = lepton_pair.tlv().Et();
05531 double Et_nunu = TMath::Sqrt( pow(pt_miss,2) + lepton_pair.tlv().M2() );
05532
05533 TVector3 pt_sum_tlv = lepton_pair.tlv().Vect() + met_tlv.Vect();
05534
05535 double mt = TMath::Sqrt( pow(Et_ll+Et_nunu,2) - pt_sum_tlv.Mag2() );
05536
05537 (v_h_ana_mt[iCut])->Fill( mt*invGeV,weight );
05538
05539
05540
05541 MyCollinearApproximation
05542 collapp( v_cut_candidates[iCut][iCand].get_lepton_pair().get_particle1(),
05543 v_cut_candidates[iCut][iCand].get_lepton_pair().get_particle2(),
05544 missinget.tlv() );
05545
05546
05547 (v_h_2l_x_tau1[iCut])->Fill(collapp.get_x1(),weight);
05548 (v_h_2l_x_tau2[iCut])->Fill(collapp.get_x2(),weight);
05549 (v_h_2l_x_tau12[iCut])->Fill(collapp.get_x1(),weight);
05550 (v_h_2l_x_tau12[iCut])->Fill(collapp.get_x2(),weight);
05551 (v_h_2l_x_tau1vs2[iCut])->Fill(collapp.get_x1(),collapp.get_x2(),weight);
05552
05553 double m_tautau = collapp.get_M_comp_part();
05554 double m_Z = 91.1876*GeV;
05555
05556 double dm = TMath::Abs(m_tautau - m_Z);
05557
05558 (v_h_2l_tautau_Z_dm[iCut])->Fill(dm*invGeV,weight);
05559
05560 }
05561
05562
05563
05564 (v_h_etmiss_ana[iCut])->Fill(missinget.met()*invGeV,weight);
05565 (v_h_etmiss_x_ana[iCut])->Fill(missinget.met_x()*invGeV,weight);
05566 (v_h_etmiss_y_ana[iCut])->Fill(missinget.met_y()*invGeV,weight);
05567
05568 (v_h_etmiss_ana_truth[iCut])->Fill(truth_missinget.met()*invGeV,weight);
05569 (v_h_etmiss_ana_reco_truth_dpt[iCut])->Fill((missinget.met() - truth_missinget.met())*invGeV,weight);
05570 (v_h_etmiss_ana_reco_truth_dx[iCut])->Fill((missinget.met_x() - truth_missinget.met_x())*invGeV,weight);
05571 (v_h_etmiss_ana_reco_truth_dy[iCut])->Fill((missinget.met_y() - truth_missinget.met_y())*invGeV,weight);
05572
05573
05574
05575
05576 return;
05577 }
05578
05579
05580
05581
05582
05583
05584
05585
05586
05587 Double_t
05588 MyHtoWWAnalysis::get_cutvalue(TString variable, MyTextFileReader *txtfile_reader){
05589
05590
05591
05592 Double_t value = txtfile_reader->get_cutvalue(variable);
05593
05594 if(m_cutstring!=""){
05595
05596 TString cutstring = m_cutstring.ReplaceAll(" ","");
05597 TObjArray* cuts_array = cutstring.Tokenize(",");
05598
05599 for(int k=0; k<cuts_array->GetEntries(); k++){
05600
05601 TString string = ((TObjString*)cuts_array->At(k))->GetString();
05602
05603 if(string.CountChar('=')!=1){
05604 cout << "Warning: wrong cutstring given \""
05605 << string << "\"" << endl;
05606 continue;
05607 }
05608
05609 TObjArray* cutvalue_array = string.Tokenize("=");
05610
05611 TString cut_variable = ((TObjString*)cutvalue_array->First())->GetString();
05612
05613 Double_t dummy = txtfile_reader->get_cutvalue(cut_variable); dummy = dummy +1;
05614 if( variable == cut_variable){
05615
05616 value = ((TObjString*)cutvalue_array->Last())->GetString().Atof();
05617
05618 }
05619 }
05620 }
05621
05622
05623
05624
05625
05626 return value;
05627
05628 }
05629
05630
05631
05632
05633
05634
05635
05636
05637
05638
05639
05640
05641
05642
05643
05644
05645
05646
05647
05648
05649
05650
05651
05652
05653
05654
05655
05656
05657
05658
05659
05660
05661
05662
05663
05664
05665
05666
05667
05668
05669
05670
05671
05672
05673
05674
05675
05676
05677
05678
05679
05680
05681
05682
05683
05684
05685
05686
05687
05688
05689
05690
05691
05692
05693
05694
05695
05696
05697
05698
05699
05700
05701
05702
05703
05704
05705
05706
05707
05708
05709
05710
05711
05712
05713
05714
05715
05716
05717
05718
05719
05720
05721
05722
05723
05724
05725
05726
05727
05728
05729
05730
05731
05732
05733
05734
05735
05736
05737
05738
05739
05740
05741
05742
05743
05744
05745
05746
05747
05748
05749
05750
05751
05752
05753
05754
05755
05756
05757
05758
05759
05760
05761
05762
05763
05764
05765
05766
05767
05768
05769
05770
05771
05772
05773
05774
05775
05776
05777
05778
05779
05780
05781
05782
05783
05784
05785
05786
05787
05788
05789
05790
05791
05792
05793
05794
05795
05796
05797
05798
05799
05800
05801
05802
05803
05804
05805
05806
05807
05808
05809
05810
05811
05812
05813
05814
05815
05816
05817
05818
05819
05820
05821
05822
05823
05824
05825
05826
05827
05828
05829
05830
05831
05832
05833
05834
05835
05836
05837
05838
05839
05840
05841
05842
05843
05844
05845
05846
05847
05848
05849
05850
05851
05852
05853
05854
05855
05856
05857
05858
05859
05860
05861
05862
05863
05864
05865
05866
05867
05868
05869
05870
05871
05872
05873
05874
05875
05876
05877
05878
05879
05880
05881
05882
05883
05884
05885
05886
05887
05888
05889
05890
05891
05892
05893
05894
05895
05896
05897
05898
05899
05900
05901
05902
05903
05904
05905
05906
05907
05908
05909
05910
05911
05912
05913
05914
05915
05916
05917
05918
05919
05920
05921
05922
05923
05924
05925
05926
05927
05928
05929
05930
05931
05932
05933
05934
05935
05936
05937
05938
05939
05940
05941
05942
05943
05944
05945
05946
05947
05948
05949
05950
05951
05952
05953
05954
05955
05956
05957
05958
05959
05960
05961
05962
05963
05964
05965
05966
05967
05968
05969
05970
05971
05972
05973
05974
05975
05976
05977
05978
05979
05980
05981
05982
05983
05984
05985
05986
05987
05988
05989
05990
05991
05992
05993
05994
05995
05996
05997
05998
05999
06000
06001
06002
06003
06004
06005
06006
06007
06008
06009
06010
06011
06012
06013
06014
06015
06016
06017
06018
06019
06020
06021