CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
L1AnalysisRecoJet.cc
Go to the documentation of this file.
2 
3 //#include "JetMETCorrections/Objects/interface/JetCorrector.h"
5 
7 
9 
11  const edm::EventSetup& setup,
13  unsigned maxJet) {
14  recoJet_.nJets = 0;
15 
16  for (reco::CaloJetCollection::const_iterator it = caloJets->begin(); it != caloJets->end() && recoJet_.nJets < maxJet;
17  ++it) {
18  recoJet_.et.push_back(it->et());
19  // recoJet_.etCorr.push_back(it->et());// * scale);
20  // recoJet_.corrFactor.push_back(1.);//scale);
21  recoJet_.eta.push_back(it->eta());
22  recoJet_.phi.push_back(it->phi());
23  recoJet_.e.push_back(it->energy());
24  recoJet_.eEMF.push_back(it->emEnergyFraction());
25  recoJet_.eEmEB.push_back(it->emEnergyInEB());
26  recoJet_.eEmEE.push_back(it->emEnergyInEE());
27  recoJet_.eEmHF.push_back(it->emEnergyInHF());
28  recoJet_.eHadHB.push_back(it->hadEnergyInHB());
29  recoJet_.eHadHE.push_back(it->hadEnergyInHE());
30  recoJet_.eHadHO.push_back(it->hadEnergyInHO());
31  recoJet_.eHadHF.push_back(it->hadEnergyInHF());
32  recoJet_.eMaxEcalTow.push_back(it->maxEInEmTowers());
33  recoJet_.eMaxHcalTow.push_back(it->maxEInHadTowers());
34  recoJet_.towerArea.push_back(it->towersArea());
35  // recoJet_.towerSize.push_back(static_cast<int>(it->getCaloConstituents().size()));
36  // recoJet_.n60.push_back(it->n60());
37  // recoJet_.n90.push_back(it->n90());
38 
39  // recoJet_.n90hits.push_back(1.); //int((*jetsID)[jetRef].n90Hits));
40  // recoJet_.fHPD.push_back(1.); //(*jetsID)[jetRef].fHPD);
41  // recoJet_.fRBX.push_back(1.); //(*jetsID)[jetRef].fRBX);
42 
43  recoJet_.nJets++;
44  }
45 }
46 
47 // void L1Analysis::L1AnalysisRecoJet::SetPFJet(const edm::Event& event,
48 // const edm::EventSetup& setup,
49 // edm::Handle<reco::PFJetCollection> caloJets,
50 // unsigned maxJet)
51 // {
52 
53 // recoPFJet_.nJets=0;
54 
55 // for(reco::CaloJetCollection::const_iterator it=caloJets->begin();
56 // it!=caloJets->end() && recoJet_.nJets < maxJet;
57 // ++it) {
58 
59 // recoJet_.et.push_back(it->et());
60 // // recoJet_.etCorr.push_back(it->et());// * scale);
61 // // recoJet_.corrFactor.push_back(1.);//scale);
62 // recoJet_.eta.push_back(it->eta());
63 // recoJet_.phi.push_back(it->phi());
64 // recoJet_.e.push_back(it->energy());
65 // // recoJet_.eEMF.push_back(it->emEnergyFraction());
66 // // recoJet_.eEmEB.push_back(it->emEnergyInEB());
67 // // recoJet_.eEmEE.push_back(it->emEnergyInEE());
68 // // recoJet_.eEmHF.push_back(it->emEnergyInHF());
69 // // recoJet_.eHadHB.push_back(it->hadEnergyInHB());
70 // // recoJet_.eHadHE.push_back(it->hadEnergyInHE());
71 // // recoJet_.eHadHO.push_back(it->hadEnergyInHO());
72 // // recoJet_.eHadHF.push_back(it->hadEnergyInHF());
73 // // recoJet_.eMaxEcalTow.push_back(it->maxEInEmTowers());
74 // // recoJet_.eMaxHcalTow.push_back(it->maxEInHadTowers());
75 // // recoJet_.towerArea.push_back(it->towersArea());
76 // // recoJet_.towerSize.push_back(static_cast<int>(it->getCaloConstituents().size()));
77 // // recoJet_.n60.push_back(it->n60());
78 // // recoJet_.n90.push_back(it->n90());
79 
80 // // recoJet_.n90hits.push_back(1.); //int((*jetsID)[jetRef].n90Hits));
81 // // recoJet_.fHPD.push_back(1.); //(*jetsID)[jetRef].fHPD);
82 // // recoJet_.fRBX.push_back(1.); //(*jetsID)[jetRef].fRBX);
83 
84 // recoJet_.nJets++;
85 
86 // }
87 // }
void SetCaloJet(const edm::Event &event, const edm::EventSetup &setup, const edm::Handle< reco::CaloJetCollection > caloJets, unsigned maxJet)