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

Comparing UserCode/HbbAnalysis/plugins/HbbTreeMaker.cc (file contents):
Revision 1.46 by agilbert, Tue Oct 25 13:26:51 2011 UTC vs.
Revision 1.47 by agilbert, Sat Oct 29 08:04:37 2011 UTC

# Line 728 | Line 728 | void HbbTreeMaker::HbbElectrons(const ed
728      //lLep.dBeamspot = (*iter).dB(pat::Electron::BS2D);
729      lLep.dVertex = (*iter).dB(pat::Electron::PV2D);
730      if ((*iter).triggerObjectMatches().size() > 0){
731 <      lLep.hltMatchPaths = (*iter).triggerObjectMatches().at(0).pathNames(1,1);
731 >      lLep.hltMatchPaths = (*iter).triggerObjectMatches().at(0).pathNames(1,0);
732        lLep.hltMatchFilters = (*iter).triggerObjectMatches().at(0).filterLabels();
733      }
734      //Construct a GenParticle if processing MC and a match has been found by PAT
# Line 750 | Line 750 | void HbbTreeMaker::HbbElectrons(const ed
750  
751      
752      //TESTING CODE
753 <    /*
753 >    /*
754      std::cout << "-----------------------------------------------" << std::endl;
755      std::cout << "Electron: " << iEle << std::endl;
756      std::cout << "--Found " << (*iter).triggerObjectMatches().size() << " matched trigger objects" << std::endl;
757 +    std::cout << "--Path Names with Option (1,1): " << std::endl;
758      for (unsigned i = 0; i < (*iter).triggerObjectMatches().size(); ++i){
759 +      std::cout << "---Trigger object has pT: " << (*iter).triggerObjectMatches().at(i).pt() << std::endl;
760        std::vector<std::string> HLTpathNames = (*iter).triggerObjectMatches().at(i).pathNames(1,1);
761        std::cout << "---HLT Path Names:" << std::endl;
762        for (unsigned j = 0; j < HLTpathNames.size(); ++j){
763          std::cout << "----" << HLTpathNames.at(j) << std::endl;
764        }
765 +    }
766 +    std::cout << "--Path Names with Option (1,0): " << std::endl;
767 +    for (unsigned i = 0; i < (*iter).triggerObjectMatches().size(); ++i){
768 +      std::vector<std::string> HLTpathNames = (*iter).triggerObjectMatches().at(i).pathNames(1,0);
769 +      std::cout << "---HLT Path Names:" << std::endl;
770 +      for (unsigned j = 0; j < HLTpathNames.size(); ++j){
771 +        std::cout << "----" << HLTpathNames.at(j) << std::endl;
772 +      }
773 +    }
774 +    std::cout << "--Path Names with Option (0,1): " << std::endl;
775 +    for (unsigned i = 0; i < (*iter).triggerObjectMatches().size(); ++i){
776 +      std::vector<std::string> HLTpathNames = (*iter).triggerObjectMatches().at(i).pathNames(0,1);
777 +      std::cout << "---HLT Path Names:" << std::endl;
778 +      for (unsigned j = 0; j < HLTpathNames.size(); ++j){
779 +        std::cout << "----" << HLTpathNames.at(j) << std::endl;
780 +      }
781 +    }
782 +    std::cout << "--Path Names with Option (0,0): " << std::endl;
783 +    for (unsigned i = 0; i < (*iter).triggerObjectMatches().size(); ++i){
784 +      std::vector<std::string> HLTpathNames = (*iter).triggerObjectMatches().at(i).pathNames(0,0);
785 +      std::cout << "---HLT Path Names:" << std::endl;
786 +      for (unsigned j = 0; j < HLTpathNames.size(); ++j){
787 +        std::cout << "----" << HLTpathNames.at(j) << std::endl;
788 +      }
789 +    }
790 +    for (unsigned i = 0; i < (*iter).triggerObjectMatches().size(); ++i){
791        std::vector<std::string> HLTfilterLabels = (*iter).triggerObjectMatches().at(i).filterLabels();
792        std::cout << "---HLT FilterLabels:" << std::endl;
793        for (unsigned j = 0; j < HLTfilterLabels.size(); ++j){
# Line 769 | Line 797 | void HbbTreeMaker::HbbElectrons(const ed
797      */
798      
799      
800 +    
801 +    
802 +    
803      HbbAnalysis::SCVars lSC;
804            if ( (*iter).superCluster().isAvailable() && (*iter).superCluster().isNonnull() )
805              lSC.eta = (*iter).superCluster()->eta();
# Line 847 | Line 878 | void HbbTreeMaker::HbbMuons(const edm::H
878      lLep.dBeamspot = (*iter).dB(pat::Muon::BS2D);
879      lLep.dVertex = (*iter).dB(pat::Muon::PV2D);
880      if ((*iter).triggerObjectMatches().size() > 0){
881 <      lLep.hltMatchPaths = (*iter).triggerObjectMatches().at(0).pathNames(1,1);
881 >      lLep.hltMatchPaths = (*iter).triggerObjectMatches().at(0).pathNames(1,0);
882        lLep.hltMatchFilters = (*iter).triggerObjectMatches().at(0).filterLabels();
883      }
884      //Construct a GenParticle if processing MC and a match has been found by PAT
# Line 873 | Line 904 | void HbbTreeMaker::HbbMuons(const edm::H
904      std::cout << "-----------------------------------------------" << std::endl;
905      std::cout << "Muon: " << iEle << std::endl;
906      std::cout << "--Found " << (*iter).triggerObjectMatches().size() << " matched trigger objects" << std::endl;
907 +    
908 +    std::cout << "--Path Names with Option (1,1): " << std::endl;
909      for (unsigned i = 0; i < (*iter).triggerObjectMatches().size(); ++i){
910 <      std::vector<std::string> HLTpathNames = (*iter).triggerObjectMatches().at(i).pathNames(1,1);
911 <      std::cout << "---HLT Path Names:" << std::endl;
912 <      for (unsigned j = 0; j < HLTpathNames.size(); ++j){
913 <        std::cout << "----" << HLTpathNames.at(j) << std::endl;
910 >      std::vector<std::string> hltpathNames = (*iter).triggerObjectMatches().at(i).pathNames(1,1);
911 >      std::cout << "---hlt path names:" << std::endl;
912 >      for (unsigned j = 0; j < hltpathNames.size(); ++j){
913 >        std::cout << "----" << hltpathNames.at(j) << std::endl;
914 >      }
915 >    }
916 >    std::cout << "--Path Names with Option (1,0): " << std::endl;
917 >    for (unsigned i = 0; i < (*iter).triggerObjectMatches().size(); ++i){
918 >      std::vector<std::string> hltpathNames = (*iter).triggerObjectMatches().at(i).pathNames(1,0);
919 >      std::cout << "---hlt path names:" << std::endl;
920 >      for (unsigned j = 0; j < hltpathNames.size(); ++j){
921 >        std::cout << "----" << hltpathNames.at(j) << std::endl;
922        }
923 +    }
924 +    std::cout << "--Path Names with Option (0,1): " << std::endl;
925 +    for (unsigned i = 0; i < (*iter).triggerObjectMatches().size(); ++i){
926 +      std::vector<std::string> hltpathNames = (*iter).triggerObjectMatches().at(i).pathNames(0,1);
927 +      std::cout << "---hlt path names:" << std::endl;
928 +      for (unsigned j = 0; j < hltpathNames.size(); ++j){
929 +        std::cout << "----" << hltpathNames.at(j) << std::endl;
930 +      }
931 +    }
932 +    std::cout << "--Path Names with Option (0,0): " << std::endl;
933 +    for (unsigned i = 0; i < (*iter).triggerObjectMatches().size(); ++i){
934 +      std::vector<std::string> hltpathNames = (*iter).triggerObjectMatches().at(i).pathNames(0,0);
935 +      std::cout << "---hlt path names:" << std::endl;
936 +      for (unsigned j = 0; j < hltpathNames.size(); ++j){
937 +        std::cout << "----" << hltpathNames.at(j) << std::endl;
938 +      }
939 +    }
940 +
941 +    for (unsigned i = 0; i < (*iter).triggerObjectMatches().size(); ++i){
942        std::vector<std::string> HLTfilterLabels = (*iter).triggerObjectMatches().at(i).filterLabels();
943        std::cout << "---HLT FilterLabels:" << std::endl;
944        for (unsigned j = 0; j < HLTfilterLabels.size(); ++j){
# Line 887 | Line 947 | void HbbTreeMaker::HbbMuons(const edm::H
947      }
948      */
949      
950 +  
951 +    
952    
953      HbbAnalysis::MuTrkVars lTrk;
954            reco::TrackRef glmuon = recoMuon->globalTrack();

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines