CMS 3D CMS Logo

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