55 #include "TLorentzVector.h"
76 thePFMETCollectionToken =
77 consumes<reco::PFMETCollection>(iConfig.getParameter<
edm::InputTag>(
"PFMETCollectionLabel"));
78 theCaloMETCollectionToken =
79 consumes<reco::CaloMETCollection>(iConfig.getParameter<
edm::InputTag>(
"CaloMETCollectionLabel"));
84 theCaloJetCollectionToken =
85 consumes<reco::CaloJetCollection>(iConfig.getParameter<
edm::InputTag>(
"CaloJetCollectionLabel"));
87 thePFJetCollectionToken =
88 consumes<std::vector<reco::PFJet> >(iConfig.getParameter<
edm::InputTag>(
"PFJetCollectionLabel"));
90 _ptThreshold = iConfig.getParameter<
double>(
"ptThreshold");
91 _maxNJets = iConfig.getParameter<
double>(
"maxNJets");
92 _maxAbsEta = iConfig.getParameter<
double>(
"maxAbsEta");
104 hCaloHT = ibooker.
book1D(
"Calo_HT",
"", 500, 0., 2000);
105 hPFHT = ibooker.
book1D(
"PF_HT",
"", 500, 0., 2000);
113 hCaloMET = ibooker.
book1D(
"Calo_MET",
"", 500, 0., 1000);
114 hPFMET = ibooker.
book1D(
"PF_MET",
"", 500, 0., 1000);
123 hCaloMHT = ibooker.
book1D(
"Calo_MHT",
"", 500, 0., 1000);
124 hPFMHT = ibooker.
book1D(
"PF_MHT",
"", 500, 0., 1000);
133 hCaloAlpha_T = ibooker.
book1D(
"Calo_AlphaT",
"", 100, 0., 1.);
135 hPFAlpha_T = ibooker.
book1D(
"PF_AlphaT",
"", 100, 0., 1.);
148 iEvent.getByToken(theCaloJetCollectionToken, CaloJetcoll);
153 std::vector<math::XYZTLorentzVector> Ps;
154 for (reco::CaloJetCollection::const_iterator
jet = CaloJetcoll->begin();
jet != CaloJetcoll->end(); ++
jet) {
155 if ((
jet->pt() > _ptThreshold) && (
abs(
jet->eta()) < _maxAbsEta)) {
156 if (Ps.size() > _maxNJets) {
157 edm::LogInfo(messageLoggerCatregory) <<
"NMax Jets exceded..";
160 Ps.push_back(
jet->p4());
164 hCaloAlpha_T->Fill(
alpha_T()(Ps));
168 hCaloHT->Fill(
CaloHT.ScalarSum);
169 hCaloMHT->Fill(
CaloHT.v.Mod());
176 iEvent.getByToken(thePFJetCollectionToken, PFjetcoll);
182 for (reco::PFJetCollection::const_iterator
jet = PFjetcoll->begin();
jet != PFjetcoll->end(); ++
jet) {
183 if ((
jet->pt() > _ptThreshold) && (
abs(
jet->eta()) < _maxAbsEta)) {
184 if (Ps.size() > _maxNJets) {
185 edm::LogInfo(messageLoggerCatregory) <<
"NMax Jets exceded..";
188 Ps.push_back(
jet->p4());
191 hPFAlpha_T->Fill(
alpha_T()(Ps));
195 hPFHT->Fill(
PFHT.ScalarSum);
196 hPFMHT->Fill(
PFHT.v.Mod());
231 iEvent.getByToken(theCaloMETCollectionToken, calometcoll);
238 calomet = &(calometcol->front());
240 hCaloMET->Fill(calomet->
pt());
246 iEvent.getByToken(thePFMETCollectionToken, pfmetcoll);
253 pfmet = &(pfmetcol->front());
255 hPFMET->Fill(pfmet->
pt());