43 #include <TLorentzVector.h> 145 edm::LogError(
"HLTPhotonJetVal") <<
"Initialization of HLTConfigProvider failed!!";
160 nvertices_ = iBooker.
book1D(
"nvertices",
"Number of vertices", 100, 0, 100);
162 nphotons_ = iBooker.
book1D(
"nphotons",
"Number of photons", 100, 0, 10);
168 pfmet_ = iBooker.
book1D(
"pfmet",
"PF MET", 100, 0, 250);
170 pfmetphi_ = iBooker.
book1D(
"pfmetphi",
"PF MET phi;#phi_{PFMET}", 100, -4, 4);
171 delphiphomet_reco_ = iBooker.
book1D(
"delphiphomet_reco",
"Reco: #Delta#phi(photon, MET);#Delta#phi(#gamma,MET)", 100, 0, 4);
172 delphiphomet_ = iBooker.
book1D(
"delphiphomet",
"#Delta#phi(photon, MET);#Delta#phi(#gamma,MET)", 100, 0, 4);
174 npfjets_ = iBooker.
book1D(
"npfjets",
"Number of PF Jets", 100, 0, 20);
175 delphijetmet_reco_ = iBooker.
book1D(
"delphijetmet_reco",
"Reco: #Delta#phi(PFJet, MET);#Delta#phi(Jet,MET)", 100, 0, 4);
176 delphijetmet_ = iBooker.
book1D(
"delphijetmet",
"#Delta#phi(PFJet, MET);#Delta#phi(Jet,MET)", 100, 0, 4);
177 invmassjj_reco_ = iBooker.
book1D(
"invmassjj_reco",
"Reco: Inv mass two leading jets;M_{jj}[GeV]", 100, 0, 2000);
178 invmassjj_ = iBooker.
book1D(
"invmassjj",
"Inv mass two leading jets;M_{jj}[GeV]", 100, 0, 2000);
179 deletajj_reco_ = iBooker.
book1D(
"deletajj_reco",
"Reco: #Delta#eta(jj);|#Delta#eta_{jj}|", 100, 0, 6);
180 deletajj_ = iBooker.
book1D(
"deletajj",
"#Delta#eta(jj);|#Delta#eta_{jj}|", 100, 0, 6);
197 if(!triggerResults.
isValid()) {
198 edm::LogError(
"HigPhotonJetHLT")<<
"Missing triggerResults collection" << std::endl;
214 if(!vertices.
isValid())
return;
216 std::cout <<
"xshi:: N vertices : " << vertices->size() << std::endl;
224 for (
unsigned int itrig = 0; itrig < triggerResults->
size(); itrig++){
247 std::cout <<
"xshi:: number of pfmets: " << pfmets->size() << std::endl;
257 for(reco::PhotonCollection::const_iterator phoIter=photons->begin();
258 phoIter!=photons->end();++phoIter){
265 double tmp_delphiphomet = fabs(
deltaPhi(phoIter->phi(), pfmet.
phi()));
277 std::cout <<
"xshi:: N pfjets : " << pfjets->size() << std::endl;
279 double min_delphijetmet = 6.0;
280 TLorentzVector p4jet1, p4jet2, p4jj;
282 double etajet1(0), etajet2(0);
284 for(reco::PFJetCollection::const_iterator jetIter=pfjets->begin();
285 jetIter!=pfjets->end();++jetIter){
289 double tmp_delphijetmet = fabs(
deltaPhi(jetIter->phi(), pfmet.
phi()));
290 if (tmp_delphijetmet < min_delphijetmet)
291 min_delphijetmet = tmp_delphijetmet;
294 p4jet1.SetXYZM(jetIter->px(), jetIter->py(), jetIter->pz(), jetIter->mass());
295 etajet1 = jetIter->eta();
298 p4jet2.SetXYZM(jetIter->px(), jetIter->py(), jetIter->pz(), jetIter->mass());
299 etajet2 = jetIter->eta();
307 p4jj = p4jet1 + p4jet2;
308 double deletajj = etajet1 - etajet2 ;
310 std::cout <<
"xshi:: invmass jj " << p4jj.M() << std::endl;
330 <<
", integral = " << h->Integral()
331 <<
", norm = " << norm << std::endl;
339 for (
unsigned int itrig = 0; itrig < triggerResults->
size(); itrig++){
std::string hltProcessName_
MonitorElement * deletajj_
T getParameter(std::string const &) const
T getUntrackedParameter(std::string const &, T const &) const
edm::EDGetTokenT< reco::PFJetCollection > pfJetsToken_
MonitorElement * pfmetphi_reco_
virtual void dqmBeginRun(const edm::Run &, const edm::EventSetup &) override
MonitorElement * nphotons_reco_
MonitorElement * photonpt_
MonitorElement * invmassjj_
MonitorElement * nvertices_
bool isMonitoredTriggerAccepted(const edm::TriggerNames, const edm::Handle< edm::TriggerResults >)
bool getByToken(EDGetToken token, Handle< PROD > &result) const
#define DEFINE_FWK_MODULE(type)
virtual void bookHistograms(DQMStore::IBooker &, edm::Run const &, edm::EventSetup const &) override
MonitorElement * npfjets_
MonitorElement * pfmet_reco_
MonitorElement * deletajj_reco_
edm::EDGetTokenT< reco::PFMETCollection > pfMetToken_
void setBinLabel(int bin, const std::string &label, int axis=1)
set bin label for x, y or z axis (axis=1, 2, 3 respectively)
edm::EDGetTokenT< edm::TriggerResults > triggerResultsToken_
MonitorElement * nvertices_reco_
edm::EDGetTokenT< reco::VertexCollection > pvToken_
MonitorElement * nphotons_
bool accept(const edm::Event &event, const edm::TriggerResults &triggerTable, const std::string &triggerPath)
virtual void endRun(const edm::Run &, const edm::EventSetup &) override
virtual double phi() const final
momentum azimuthal angle
virtual double et() const final
transverse energy
edm::EDGetTokenT< reco::PhotonCollection > photonsToken_
MonitorElement * trigvsnvtx_
unsigned int size() const
Get number of paths stored.
virtual void analyze(const edm::Event &, const edm::EventSetup &) override
MonitorElement * book1D(Args &&...args)
MonitorElement * photonpt_reco_
MonitorElement * pfmetphi_
static std::string const triggerResults
MonitorElement * delphijetmet_
MonitorElement * trigvsnvtx_reco_
MonitorElement * triggers_reco_
Integral< F, X >::type integral(const F &f)
HigPhotonJetHLTOfflineSource(const edm::ParameterSet &)
MonitorElement * delphiphomet_
MonitorElement * delphiphomet_reco_
MonitorElement * photonrapidity_reco_
void setCurrentFolder(const std::string &fullpath)
MonitorElement * book2D(Args &&...args)
MonitorElement * invmassjj_reco_
std::string const & triggerName(unsigned int index) const
bool init(const edm::Run &iRun, const edm::EventSetup &iSetup, const std::string &processName, bool &changed)
d'tor
MonitorElement * photonrapidity_
std::vector< std::string > hltPathsToCheck_
MonitorElement * npfjets_reco_
TH2F * getTH2F(void) const
MonitorElement * triggers_
virtual edm::TriggerNames const & triggerNames(edm::TriggerResults const &triggerResults) const override
MonitorElement * delphijetmet_reco_