56 #include "TLorentzVector.h"
78 thePFMETCollectionToken = consumes<reco::PFMETCollection> (iConfig.getParameter<
edm::InputTag>(
"PFMETCollectionLabel"));
79 theCaloMETCollectionToken = consumes<reco::CaloMETCollection> (iConfig.getParameter<
edm::InputTag>(
"CaloMETCollectionLabel"));
84 theCaloJetCollectionToken = consumes<reco::CaloJetCollection> (iConfig.getParameter<
edm::InputTag>(
"CaloJetCollectionLabel"));
86 thePFJetCollectionToken = consumes<std::vector<reco::PFJet> > (iConfig.getParameter<
edm::InputTag>(
"PFJetCollectionLabel"));
88 _ptThreshold = iConfig.getParameter<
double>(
"ptThreshold");
89 _maxNJets = iConfig.getParameter<
double>(
"maxNJets");
90 _maxAbsEta = iConfig.getParameter<
double>(
"maxAbsEta");
106 hCaloHT = ibooker.
book1D(
"Calo_HT",
"", 500, 0., 2000);
107 hPFHT = ibooker.
book1D(
"PF_HT" ,
"", 500, 0., 2000);
115 hCaloMET = ibooker.
book1D(
"Calo_MET",
"", 500, 0., 1000);
116 hPFMET = ibooker.
book1D(
"PF_MET" ,
"", 500, 0., 1000);
125 hCaloMHT = ibooker.
book1D(
"Calo_MHT",
"", 500, 0., 1000);
126 hPFMHT = ibooker.
book1D(
"PF_MHT" ,
"", 500, 0., 1000);
135 hCaloAlpha_T = ibooker.
book1D(
"Calo_AlphaT",
"", 100, 0., 1.);
137 hPFAlpha_T = ibooker.
book1D(
"PF_AlphaT" ,
"", 100, 0., 1.);
151 iEvent.
getByToken(theCaloJetCollectionToken, CaloJetcoll);
153 if(!CaloJetcoll.
isValid())
return;
155 std::vector<math::XYZTLorentzVector> Ps;
156 for (reco::CaloJetCollection::const_iterator
jet = CaloJetcoll->begin();
jet!=CaloJetcoll->end(); ++
jet){
157 if ((
jet->pt()>_ptThreshold) && (
abs(
jet->eta()) < _maxAbsEta)){
158 if(Ps.size()>_maxNJets) {
159 edm::LogInfo(messageLoggerCatregory)<<
"NMax Jets exceded..";
162 Ps.push_back(
jet->p4());
166 hCaloAlpha_T->Fill(
alpha_T()(Ps));
171 hCaloMHT->Fill(CaloHT.
v.Mod());
178 iEvent.
getByToken(thePFJetCollectionToken, PFjetcoll);
180 if(!PFjetcoll.
isValid())
return;
183 for (reco::PFJetCollection::const_iterator
jet = PFjetcoll->begin();
jet!=PFjetcoll->end(); ++
jet){
184 if ((
jet->pt()>_ptThreshold) && (
abs(
jet->eta()) < _maxAbsEta)){
185 if(Ps.size()>_maxNJets) {
186 edm::LogInfo(messageLoggerCatregory)<<
"NMax Jets exceded..";
189 Ps.push_back(
jet->p4());
192 hPFAlpha_T->Fill(
alpha_T()(Ps));
197 hPFMHT->Fill(PFHT.
v.Mod());
232 iEvent.
getByToken(theCaloMETCollectionToken, calometcoll);
234 if(!calometcoll.
isValid())
return;
238 calomet = &(calometcol->front());
240 hCaloMET->Fill(calomet->
pt());
246 iEvent.
getByToken(thePFMETCollectionToken, pfmetcoll);
248 if(!pfmetcoll.
isValid())
return;
252 pfmet = &(pfmetcol->front());
254 hPFMET->Fill(pfmet->
pt());
T getParameter(std::string const &) const
bool getByToken(EDGetToken token, Handle< PROD > &result) const
void bookHistograms(DQMStore::IBooker &, edm::Run const &, edm::EventSetup const &) override
MonitorElement * book1D(Args &&...args)
Abs< T >::type abs(const T &t)
void setCurrentFolder(const std::string &fullpath)
T const * product() const
static const char * messageLoggerCatregory
SUSYDQMAnalyzer(const edm::ParameterSet &)
virtual void analyze(const edm::Event &, const edm::EventSetup &) override
virtual double pt() const final
transverse momentum