55 #include "TLorentzVector.h"
76 thePFMETCollectionToken =
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));
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));
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());
~SUSYDQMAnalyzer() override
double pt() const final
transverse momentum
virtual void setCurrentFolder(std::string const &fullpath)
bool getByToken(EDGetToken token, Handle< PROD > &result) const
void bookHistograms(DQMStore::IBooker &, edm::Run const &, edm::EventSetup const &) override
Abs< T >::type abs(const T &t)
Log< level::Info, false > LogInfo
T const * product() const
static const char * messageLoggerCatregory
SUSYDQMAnalyzer(const edm::ParameterSet &)
void analyze(const edm::Event &, const edm::EventSetup &) override
MonitorElement * book1D(TString const &name, TString const &title, int const nchX, double const lowX, double const highX, FUNC onbooking=NOOP())