ViewVC Help
View File | Revision Log | Show Annotations | Root Listing
root/cvsroot/UserCode/VHbbAnalysis/HbbAnalyzer/plugins/HbbAnalyzerNew.cc
(Generate patch)

Comparing UserCode/VHbbAnalysis/HbbAnalyzer/plugins/HbbAnalyzerNew.cc (file contents):
Revision 1.41 by tboccali, Mon Sep 19 10:34:54 2011 UTC vs.
Revision 1.43 by bortigno, Mon Sep 19 12:55:29 2011 UTC

# Line 435 | Line 435 | BTagSFContainer btagSFs;
435        //genJet
436        const reco::GenJet *gJ = jet_iter->genJet();
437        //physical parton for mother info ONLY
438 <      if( (jet_iter->genParton())
439 <          and (jet_iter->genParton()->mother()) )
440 <        sj.bestMCmomid=jet_iter->genParton()->mother()->pdgId();
438 >      if( (jet_iter->genParton()) ){
439 >        sj.bestMCid = jet_iter->genParton()->pdgId();
440 >        if( (jet_iter->genParton()->mother()) )
441 >          sj.bestMCmomid=jet_iter->genParton()->mother()->pdgId();
442 >      }
443        TLorentzVector gJp4;
444        if(gJ){
445          gJp4.SetPtEtaPhiE(gJ->pt(),gJ->eta(),gJ->phi(),gJ->energy());
446 <        sj.bestMCp4mom = gJp4;
445 <        std::cout <<" KKKKK 1 "<< sj.bestMCp4mom.Pt() <<std::endl;
446 >        sj.bestMCp4 = gJp4;
447          if(verbose_){
448            std::clog << "genJet matched Pt = " << gJp4.Pt() << std::endl;
449            std::clog << "genJet matched eta = " << gJp4.Eta() << std::endl;
# Line 476 | Line 477 | BTagSFContainer btagSFs;
477        //genJet
478        const reco::GenJet *gJ = jet_iter->genJet();
479        //physical parton for mother info ONLY
480 <      if( (jet_iter->genParton())
481 <          and (jet_iter->genParton()->mother()) )
482 <        sj.bestMCmomid=jet_iter->genParton()->mother()->pdgId();
480 >      if( (jet_iter->genParton()) ){
481 >        sj.bestMCid = jet_iter->genParton()->pdgId();
482 >        if( (jet_iter->genParton()->mother()) )
483 >          sj.bestMCmomid=jet_iter->genParton()->mother()->pdgId();
484 >      }
485        TLorentzVector gJp4;
486        if(gJ){
487          gJp4.SetPtEtaPhiE(gJ->pt(),gJ->eta(),gJ->phi(),gJ->energy());
488 <        sj.bestMCp4mom = gJp4;
486 <        std::cout <<" KKKKK 2 "<< (sj.bestMCp4mom.Pt()) <<std::endl;
488 >        sj.bestMCp4 = gJp4;
489          if(verbose_){
490            std::clog << "genJet matched Pt = " << gJp4.Pt() << std::endl;
491            std::clog << "genJet matched eta = " << gJp4.Eta() << std::endl;
# Line 517 | Line 519 | BTagSFContainer btagSFs;
519        //genJet
520        const reco::GenJet *gJ = jet_iter->genJet();
521        //physical parton for mother info ONLY
522 <      if( (jet_iter->genParton())
523 <          and (jet_iter->genParton()->mother()) )
524 <        sj.bestMCmomid=jet_iter->genParton()->mother()->pdgId();
522 >      if( (jet_iter->genParton()) ){
523 >        sj.bestMCid = jet_iter->genParton()->pdgId();
524 >        if( (jet_iter->genParton()->mother()) )
525 >          sj.bestMCmomid=jet_iter->genParton()->mother()->pdgId();
526 >      }
527        TLorentzVector gJp4;
528        if(gJ){
529          gJp4.SetPtEtaPhiE(gJ->pt(),gJ->eta(),gJ->phi(),gJ->energy());
530 <        sj.bestMCp4mom = gJp4;
527 <        std::cout <<" KKKKK 3 "<< sj.bestMCp4mom.Pt() <<std::endl;
530 >        sj.bestMCp4 = gJp4;
531          if(verbose_){
532            std::clog << "genJet matched Pt = " << gJp4.Pt() << std::endl;
533            std::clog << "genJet matched eta = " << gJp4.Eta() << std::endl;
# Line 598 | Line 601 | BTagSFContainer btagSFs;
601        //genJet
602        const reco::GenJet *gJ = jet_iter->genJet();
603        //physical parton for mother info ONLY
604 <      if( (jet_iter->genParton())
605 <          and (jet_iter->genParton()->mother()) )
606 <        sj.bestMCmomid=jet_iter->genParton()->mother()->pdgId();
604 >      if( (jet_iter->genParton()) ){
605 >        sj.bestMCid = jet_iter->genParton()->pdgId();
606 >        if( (jet_iter->genParton()->mother()) )
607 >          sj.bestMCmomid=jet_iter->genParton()->mother()->pdgId();
608 >      }
609        TLorentzVector gJp4;
610        if(gJ){
611          gJp4.SetPtEtaPhiE(gJ->pt(),gJ->eta(),gJ->phi(),gJ->energy());
612 <        sj.bestMCp4mom = gJp4;
608 <        std::cout <<" KKKKK 4 "<< sj.bestMCp4mom.Pt() <<std::endl;
612 >        sj.bestMCp4 = gJp4;
613          if(verbose_){
614            std::clog << "genJet matched Pt = " << gJp4.Pt() << std::endl;
615            std::clog << "genJet matched eta = " << gJp4.Eta() << std::endl;

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines