CMS 3D CMS Logo

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 // }
l1JetRecoTree_cfi.maxJet
maxJet
Definition: l1JetRecoTree_cfi.py:9
edm::Handle< reco::CaloJetCollection >
singleTopDQM_cfi.setup
setup
Definition: singleTopDQM_cfi.py:37
L1Analysis::L1AnalysisRecoJet::L1AnalysisRecoJet
L1AnalysisRecoJet()
Definition: L1AnalysisRecoJet.cc:6
isolatedTracks_cfi.caloJets
caloJets
Definition: isolatedTracks_cfi.py:33
JetCorrector.h
edm::EventSetup
Definition: EventSetup.h:58
L1Analysis::L1AnalysisRecoJet::SetCaloJet
void SetCaloJet(const edm::Event &event, const edm::EventSetup &setup, const edm::Handle< reco::CaloJetCollection > caloJets, unsigned maxJet)
Definition: L1AnalysisRecoJet.cc:10
L1Analysis::L1AnalysisRecoJet::~L1AnalysisRecoJet
~L1AnalysisRecoJet()
Definition: L1AnalysisRecoJet.cc:8
event
Definition: event.py:1
edm::Event
Definition: Event.h:73
L1AnalysisRecoJet.h