Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-04-06 12:21:16

0001 #include "L1Trigger/L1TNtuples/interface/L1AnalysisRecoJet.h"
0002 
0003 //#include "JetMETCorrections/Objects/interface/JetCorrector.h"
0004 #include "JetMETCorrections/JetCorrector/interface/JetCorrector.h"
0005 
0006 L1Analysis::L1AnalysisRecoJet::L1AnalysisRecoJet() {}
0007 
0008 L1Analysis::L1AnalysisRecoJet::~L1AnalysisRecoJet() {}
0009 
0010 void L1Analysis::L1AnalysisRecoJet::SetCaloJet(const edm::Event& event,
0011                                                const edm::EventSetup& setup,
0012                                                edm::Handle<reco::CaloJetCollection> caloJets,
0013                                                unsigned maxJet) {
0014   recoJet_.nJets = 0;
0015 
0016   for (reco::CaloJetCollection::const_iterator it = caloJets->begin(); it != caloJets->end() && recoJet_.nJets < maxJet;
0017        ++it) {
0018     recoJet_.et.push_back(it->et());
0019     // recoJet_.etCorr.push_back(it->et());// * scale);
0020     // recoJet_.corrFactor.push_back(1.);//scale);
0021     recoJet_.eta.push_back(it->eta());
0022     recoJet_.phi.push_back(it->phi());
0023     recoJet_.e.push_back(it->energy());
0024     recoJet_.eEMF.push_back(it->emEnergyFraction());
0025     recoJet_.eEmEB.push_back(it->emEnergyInEB());
0026     recoJet_.eEmEE.push_back(it->emEnergyInEE());
0027     recoJet_.eEmHF.push_back(it->emEnergyInHF());
0028     recoJet_.eHadHB.push_back(it->hadEnergyInHB());
0029     recoJet_.eHadHE.push_back(it->hadEnergyInHE());
0030     recoJet_.eHadHO.push_back(it->hadEnergyInHO());
0031     recoJet_.eHadHF.push_back(it->hadEnergyInHF());
0032     recoJet_.eMaxEcalTow.push_back(it->maxEInEmTowers());
0033     recoJet_.eMaxHcalTow.push_back(it->maxEInHadTowers());
0034     recoJet_.towerArea.push_back(it->towersArea());
0035     //    recoJet_.towerSize.push_back(static_cast<int>(it->getCaloConstituents().size()));
0036     // recoJet_.n60.push_back(it->n60());
0037     // recoJet_.n90.push_back(it->n90());
0038 
0039     // recoJet_.n90hits.push_back(1.); //int((*jetsID)[jetRef].n90Hits));
0040     // recoJet_.fHPD.push_back(1.); //(*jetsID)[jetRef].fHPD);
0041     // recoJet_.fRBX.push_back(1.); //(*jetsID)[jetRef].fRBX);
0042 
0043     recoJet_.nJets++;
0044   }
0045 }
0046 
0047 // void L1Analysis::L1AnalysisRecoJet::SetPFJet(const edm::Event& event,
0048 //                  const edm::EventSetup& setup,
0049 //                  edm::Handle<reco::PFJetCollection> caloJets,
0050 //                  unsigned maxJet)
0051 // {
0052 
0053 //   recoPFJet_.nJets=0;
0054 
0055 //   for(reco::CaloJetCollection::const_iterator it=caloJets->begin();
0056 //       it!=caloJets->end() && recoJet_.nJets < maxJet;
0057 //       ++it) {
0058 
0059 //     recoJet_.et.push_back(it->et());
0060 //     // recoJet_.etCorr.push_back(it->et());// * scale);
0061 //     // recoJet_.corrFactor.push_back(1.);//scale);
0062 //     recoJet_.eta.push_back(it->eta());
0063 //     recoJet_.phi.push_back(it->phi());
0064 //     recoJet_.e.push_back(it->energy());
0065 //     // recoJet_.eEMF.push_back(it->emEnergyFraction());
0066 //     // recoJet_.eEmEB.push_back(it->emEnergyInEB());
0067 //     // recoJet_.eEmEE.push_back(it->emEnergyInEE());
0068 //     // recoJet_.eEmHF.push_back(it->emEnergyInHF());
0069 //     // recoJet_.eHadHB.push_back(it->hadEnergyInHB());
0070 //     // recoJet_.eHadHE.push_back(it->hadEnergyInHE());
0071 //     // recoJet_.eHadHO.push_back(it->hadEnergyInHO());
0072 //     // recoJet_.eHadHF.push_back(it->hadEnergyInHF());
0073 //     // recoJet_.eMaxEcalTow.push_back(it->maxEInEmTowers());
0074 //     // recoJet_.eMaxHcalTow.push_back(it->maxEInHadTowers());
0075 //     // recoJet_.towerArea.push_back(it->towersArea());
0076 //     //    recoJet_.towerSize.push_back(static_cast<int>(it->getCaloConstituents().size()));
0077 //     // recoJet_.n60.push_back(it->n60());
0078 //     // recoJet_.n90.push_back(it->n90());
0079 
0080 //     // recoJet_.n90hits.push_back(1.); //int((*jetsID)[jetRef].n90Hits));
0081 //     // recoJet_.fHPD.push_back(1.); //(*jetsID)[jetRef].fHPD);
0082 //     // recoJet_.fRBX.push_back(1.); //(*jetsID)[jetRef].fRBX);
0083 
0084 //     recoJet_.nJets++;
0085 
0086 //   }
0087 // }