41 #include <TLorentzVector.h> 112 verbose_ =
pset.getUntrackedParameter<
bool>(
"verbose",
false);
130 edm::LogError(
"HLTPhotonJetVal") <<
"Initialization of HLTConfigProvider failed!!";
142 nvertices_ = iBooker.
book1D(
"nvertices",
"Number of vertices", 100, 0, 100);
144 nphotons_ = iBooker.
book1D(
"nphotons",
"Number of photons", 100, 0, 10);
150 pfmet_ = iBooker.
book1D(
"pfmet",
"PF MET", 100, 0, 250);
152 pfmetphi_ = iBooker.
book1D(
"pfmetphi",
"PF MET phi;#phi_{PFMET}", 100, -4, 4);
154 iBooker.
book1D(
"delphiphomet_reco",
"Reco: #Delta#phi(photon, MET);#Delta#phi(#gamma,MET)", 100, 0, 4);
155 delphiphomet_ = iBooker.
book1D(
"delphiphomet",
"#Delta#phi(photon, MET);#Delta#phi(#gamma,MET)", 100, 0, 4);
157 npfjets_ = iBooker.
book1D(
"npfjets",
"Number of PF Jets", 100, 0, 20);
159 iBooker.
book1D(
"delphijetmet_reco",
"Reco: #Delta#phi(PFJet, MET);#Delta#phi(Jet,MET)", 100, 0, 4);
160 delphijetmet_ = iBooker.
book1D(
"delphijetmet",
"#Delta#phi(PFJet, MET);#Delta#phi(Jet,MET)", 100, 0, 4);
161 invmassjj_reco_ = iBooker.
book1D(
"invmassjj_reco",
"Reco: Inv mass two leading jets;M_{jj}[GeV]", 100, 0, 2000);
162 invmassjj_ = iBooker.
book1D(
"invmassjj",
"Inv mass two leading jets;M_{jj}[GeV]", 100, 0, 2000);
163 deletajj_reco_ = iBooker.
book1D(
"deletajj_reco",
"Reco: #Delta#eta(jj);|#Delta#eta_{jj}|", 100, 0, 6);
164 deletajj_ = iBooker.
book1D(
"deletajj",
"#Delta#eta(jj);|#Delta#eta_{jj}|", 100, 0, 6);
169 "Reco: Trigger vs. # vertices;N_{vertices};Trigger",
177 "Trigger vs. # vertices;N_{vertices};Trigger",
193 edm::LogError(
"HigPhotonJetHLT") <<
"Missing triggerResults collection" << std::endl;
220 for (
unsigned int itrig = 0; itrig <
triggerResults->size(); itrig++) {
248 std::cout <<
"xshi:: number of pfmets: " << pfmets->size() << std::endl;
260 for (
auto const& phoIter : *
photons) {
270 double tmp_delphiphomet = fabs(
deltaPhi(phoIter.phi(), pfmet.
phi()));
285 std::cout <<
"xshi:: N pfjets : " << pfjets->size() << std::endl;
287 double min_delphijetmet = 6.0;
288 TLorentzVector p4jet1, p4jet2, p4jj;
290 double etajet1(0), etajet2(0);
292 for (
auto const& jetIter : *pfjets) {
297 double tmp_delphijetmet = fabs(
deltaPhi(jetIter.phi(), pfmet.
phi()));
298 if (tmp_delphijetmet < min_delphijetmet)
299 min_delphijetmet = tmp_delphijetmet;
302 p4jet1.SetXYZM(jetIter.px(), jetIter.py(), jetIter.pz(), jetIter.mass());
303 etajet1 = jetIter.eta();
306 p4jet2.SetXYZM(jetIter.px(), jetIter.py(), jetIter.pz(), jetIter.mass());
307 etajet2 = jetIter.eta();
317 p4jj = p4jet1 + p4jet2;
318 double deletajj = etajet1 - etajet2;
320 std::cout <<
"xshi:: invmass jj " << p4jj.M() << std::endl;
338 std::cout <<
"xshi:: endRun total number of events: " <<
evtsrun_ <<
", integral = " <<
h->Integral()
339 <<
", norm = " << norm << std::endl;
346 for (
unsigned int itrig = 0; itrig <
triggerResults->size(); itrig++) {
352 if (triggername.find(
i) != std::string::npos) {
std::string hltProcessName_
MonitorElement * deletajj_
edm::EDGetTokenT< reco::PFJetCollection > pfJetsToken_
MonitorElement * pfmetphi_reco_
void dqmBeginRun(const edm::Run &, const edm::EventSetup &) override
MonitorElement * nphotons_reco_
MonitorElement * photonpt_
MonitorElement * invmassjj_
MonitorElement * nvertices_
virtual void setCurrentFolder(std::string const &fullpath)
#define DEFINE_FWK_MODULE(type)
void bookHistograms(DQMStore::IBooker &, edm::Run const &, edm::EventSetup const &) override
MonitorElement * npfjets_
MonitorElement * pfmet_reco_
MonitorElement * deletajj_reco_
edm::EDGetTokenT< reco::PFMETCollection > pfMetToken_
edm::EDGetTokenT< edm::TriggerResults > triggerResultsToken_
MonitorElement * nvertices_reco_
edm::EDGetTokenT< reco::VertexCollection > pvToken_
Log< level::Error, false > LogError
MonitorElement * nphotons_
bool accept(const edm::Event &event, const edm::TriggerResults &triggerTable, const std::string &triggerPath)
edm::EDGetTokenT< reco::PhotonCollection > photonsToken_
MonitorElement * trigvsnvtx_
void analyze(const edm::Event &, const edm::EventSetup &) override
MonitorElement * photonpt_reco_
MonitorElement * pfmetphi_
static std::string const triggerResults
MonitorElement * delphijetmet_
virtual 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)
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_
bool isMonitoredTriggerAccepted(const edm::TriggerNames &, const edm::Handle< edm::TriggerResults > &)
MonitorElement * invmassjj_reco_
MonitorElement * book2D(TString const &name, TString const &title, int nchX, double lowX, double highX, int nchY, double lowY, double highY, FUNC onbooking=NOOP())
double et() const final
transverse energy
MonitorElement * photonrapidity_
std::vector< std::string > hltPathsToCheck_
MonitorElement * npfjets_reco_
MonitorElement * book1D(TString const &name, TString const &title, int const nchX, double const lowX, double const highX, FUNC onbooking=NOOP())
The Signals That Services Can Subscribe To This is based on ActivityRegistry h
Helper function to determine trigger accepts.
double phi() const final
momentum azimuthal angle
MonitorElement * triggers_
void dqmEndRun(const edm::Run &, const edm::EventSetup &) override
MonitorElement * delphijetmet_reco_