Changeset 18 in huonglan
Legend:
- Unmodified
- Added
- Removed
-
ANA2011/CutFlow.C
r6 r18 1 1 { 2 TFile *f = TFile::Open(" res.root");2 TFile *f = TFile::Open("./CUTFLOW/res180710Muons_satisfyCutFlow.root"); 3 3 4 4 TString s[6] = {"","E","M","Sig","ESig","MSig"}; -
ANA2011/ana2011.C
r16 r18 723 723 724 724 //Before selecting jets, look if there is a muon coming from jet 725 cout << "1" << endl; 725 726 std::vector<std::pair<TLorentzVector,TLorentzVector> > MuonJetPairs = AddMuonJet(RealData,m_smearMC,indGoodMuon); 726 //cout << "Number of pair muon and jet that overlap " << MuonJetPairs.size() << endl;727 cout << "Number of pair muon and jet that overlap " << MuonJetPairs.size() << endl; 727 728 728 729 vector<TLorentzVector> vMuon, vJet; 729 for (unsigned int i = 0; i < MuonJetPairs.size(); i++){ 730 pair<TLorentzVector,TLorentzVector> MuonJet = MuonJetPairs.at(i); 731 vMuon.push_back(MuonJet.first); 732 vJet.push_back(MuonJet.second); 733 } 730 if (MuonJetPairs.size() > 0){ 731 for (unsigned int i = 0; i < MuonJetPairs.size(); i++){ 732 pair<TLorentzVector,TLorentzVector> MuonJet = MuonJetPairs.at(i); 733 vMuon.push_back(MuonJet.first); 734 vJet.push_back(MuonJet.second); 735 } 736 } 737 738 cout << "MuonJetPairs.size() " << MuonJetPairs.size() << endl; 734 739 735 740 //SELECTION OF JETS … … 747 752 for (unsigned int iJ = 0; iJ < vJet.size(); iJ++){ 748 753 TLorentzVector vJ = vJet.at(iJ); 749 if (v4j==vJ) v4j += vMuon.at(iJ); 754 if (v4j==vJ){ 755 cout << "jet_pt before adding " << jet_pt->at(i) << endl; 756 cout << "vJ pt " << vJ.Pt() << endl; 757 cout << "vM pt " << vMuon.at(iJ).Pt() << endl; 758 v4j += vMuon.at(iJ); 759 } 750 760 } 761 jet_pt->at(i) = v4j.Pt(); 762 jet_E->at(i) = v4j.E(); 763 764 //cout << "jet_pt after adding " << jet_pt->at(i) << endl; 751 765 } 752 766 753 jet_pt->at(i) = v4j.Pt(); 754 jet_E->at(i) = v4j.E(); 767 cout << "before GoodJets" << endl; 755 768 756 769 if(GoodJets(i)) { … … 798 811 m_weiSV0Max[0]->Fill(sv0Max,weight); 799 812 813 cout << "2" << endl; 814 800 815 bool askbtagged = false; 801 816 … … 831 846 } 832 847 HT += topMET_et; 848 849 cout << "3" << endl; 833 850 834 851 //pt leading jet : C15 : add for u4 … … 1146 1163 // #### The Naive analysis : no fit, test all combinations, ########### 1147 1164 // #### take the one minimizing the difference between the two tops ########### 1165 1166 cout << "begin first analysis" << endl; 1148 1167 1149 1168 //###### RECONSTRUCT the LEPTONIC W ###### … … 1435 1454 if (!doChi2Ana) return kTRUE; 1436 1455 1456 cout << "begin chi2" << endl; 1457 1437 1458 //Here I have to add this condition cause my chi2 method is happy 1438 1459 //just in the case I have one Lepton (e or mu) … … 1476 1497 vector<TLorentzVector> vecpars2; 1477 1498 vector<int> index = indjets.at(id); 1478 //cout << "index size : " << index.size() << endl;1499 cout << "index size : " << index.size() << endl; 1479 1500 1480 1501 vector<TLorentzVector> vJetsUseForChi2; … … 1484 1505 } 1485 1506 1507 cout << "vJetsUseForChi2 " << vJetsUseForChi2.size() << endl; 1508 1486 1509 //in case we ask for b-tagging 1487 1510 //we have to force the bjets to be in the jets used to calculate chi2 first … … 1506 1529 if (!bjetusedforchi2) continue; 1507 1530 1531 cout << "before case 3 b-jet in 4 good jets" << endl; 1532 1508 1533 if (vGoodJets.size()==4 && bjetsInd.size()==3){ 1534 cout << "threebjets4GoodJets" << endl; 1535 1509 1536 threebjets4GoodJets = true; 1510 1537 TVector2 IndSV0; … … 1513 1540 vj1.SetPtEtaPhiM(jet_pt->at(inew),jet_eta->at(inew),jet_phi->at(inew),jet_m->at(inew)); 1514 1541 double SV0j = jet_flavor_weight_SV0->at(inew); 1542 if (vJet.size()>0){ 1543 cout << "back to add muon prob" << endl; 1544 for (unsigned int iJ = 0; iJ < vJet.size(); iJ++){ 1545 TLorentzVector vJ = vJet.at(iJ); 1546 if (vj1==vJ){ 1547 cout << "find one bjet" << endl; 1548 vj1 += vMuon.at(iJ); 1549 } 1550 } 1551 } 1515 1552 for (unsigned int jnew = 0; jnew < vJetsUseForChi2.size(); jnew++){ 1516 1553 TLorentzVector vj2 = vJetsUseForChi2.at(jnew); … … 1522 1559 } 1523 1560 } 1561 1562 cout << "now here?" << endl; 1563 1524 1564 sort(IndSV0jets34.begin(),IndSV0jets34.end(),sortdecreaseSV0); 1565 cout << "IndSV0jets34 size " << IndSV0jets34.size() << endl; 1566 1525 1567 bjetsInd34.push_back((int)IndSV0jets34.at(0).X()); 1568 cout << "IndSV0jets34.at(0).X() " << IndSV0jets34.at(0).X() << endl; 1569 1526 1570 bjetsInd34.push_back((int)IndSV0jets34.at(1).X()); 1571 cout << "IndSV0jets34.at(1).X() " << IndSV0jets34.at(1).X() << endl; 1527 1572 } 1528 1573 }//end of (askbtagged) 1529 1574 1530 /*for (unsigned int j=0; j < index.size(); j++){ 1531 if (PRINT) cout << "index : " << index.at(j) << endl; 1532 TLorentzVector vp4 = vGoodJets.at(index.at(j)); 1533 if (isMuonJet && vp4 == vJetOverlapNotGoodMuon) 1534 vp4 += vMuonJet; 1535 vecpars2.push_back(vp4); 1536 } 1537 vecpars2.push_back(goodLepton.at(0).vector4()); 1538 */ //comment for 26 August 1539 1575 cout << "come here ? " << endl; 1576 1540 1577 for (unsigned int j=0; j < index.size(); j++){ 1541 1578 if (PRINT) cout << "index : " << index.at(j) << endl; … … 1544 1581 } 1545 1582 vecpars2.push_back(goodLepton.at(0).vector4()); 1583 1584 cout << "vecpars2 size " << vecpars2.size() << endl; 1546 1585 1547 1586 //############################################################## … … 3326 3365 bool ana2011::GoodJets(int ij) 3327 3366 { 3367 //cout << "jet_pt in GoodJet loop " << jet_pt->at(ij) << endl; 3328 3368 3329 3369 // Acceptance (remove crack also):
Note: See TracChangeset
for help on using the changeset viewer.