@@ -298,8 +298,8 @@ void HHAnalyzer::analyze(const edm::Event& event, const edm::EventSetup&, const
298298 std::cout << " This is not a ttbar event" << std::endl;
299299#endif
300300 gen_ttbar_decay_type = NotTT;
301- return ;
302301 }
302+ if (gen_ttbar_decay_type != NotTT) {
303303
304304 if ((gen_jet1_t != 0 ) && (gen_jet2_t != 0 ) && (gen_jet1_tbar != 0 ) && (gen_jet2_tbar != 0 )) {
305305#if TT_GEN_DEBUG
@@ -361,7 +361,6 @@ void HHAnalyzer::analyze(const edm::Event& event, const edm::EventSetup&, const
361361 } else {
362362 std::cout << " Error: unknown dileptonic ttbar decay." << std::endl;
363363 gen_ttbar_decay_type = NotTT;
364- return ;
365364 }
366365 } else {
367366 std::cout << " Error: unknown ttbar decay." << std::endl;
@@ -376,6 +375,7 @@ void HHAnalyzer::analyze(const edm::Event& event, const edm::EventSetup&, const
376375 gen_ttbar_lepton_t_beforeFSR_p4 = gp->pruned_p4 [gen_lepton_t_beforeFSR];
377376 if (gen_lepton_tbar_beforeFSR != 0 )
378377 gen_ttbar_lepton_tbar_beforeFSR_p4 = gp->pruned_p4 [gen_lepton_tbar_beforeFSR];
378+ }
379379 } // end of if isMC
380380
381381 // float mh = event.isRealData() ? 125.02 : 125.0;
@@ -432,7 +432,6 @@ void HHAnalyzer::analyze(const edm::Event& event, const edm::EventSetup&, const
432432 return index;
433433 };
434434
435-
436435 // **********
437436 // Leptons and dileptons
438437 // **********
@@ -607,6 +606,7 @@ void HHAnalyzer::analyze(const edm::Event& event, const edm::EventSetup&, const
607606 muons.push_back (imuon);
608607 leptons.push_back (mu);
609608 }// end of loop on muons
609+
610610 if (leptons.size () < 2 )
611611 return ;
612612 nMuons = muons.size ();
@@ -694,6 +694,7 @@ void HHAnalyzer::analyze(const edm::Event& event, const edm::EventSetup&, const
694694 ll.push_back (dilep);
695695 }
696696 }
697+
697698 if (ll.size ()<1 )
698699 return ;
699700 std::sort (ll.begin (), ll.end (), [](const HH::Dilepton& ll1, const HH::Dilepton& ll2) { return ll1.ht_l_l > ll2.ht_l_l ; });
@@ -902,6 +903,7 @@ void HHAnalyzer::analyze(const edm::Event& event, const edm::EventSetup&, const
902903 jets.push_back (myjet);
903904 }
904905 nJets = jets.size ();
906+
905907 if (nJets < 2 )
906908 return ;
907909
0 commit comments