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(
auto const & phoIter : *photons){
264 double tmp_delphiphomet = fabs(
deltaPhi(phoIter.phi(), pfmet.
phi()));
276 std::cout <<
"xshi:: N pfjets : " << pfjets->size() << std::endl;
278 double min_delphijetmet = 6.0;
279 TLorentzVector p4jet1, p4jet2, p4jj;
281 double etajet1(0), etajet2(0);
283 for(
auto const & jetIter : *pfjets){
287 double tmp_delphijetmet = fabs(
deltaPhi(jetIter.phi(), pfmet.
phi()));
288 if (tmp_delphijetmet < min_delphijetmet)
289 min_delphijetmet = tmp_delphijetmet;
292 p4jet1.SetXYZM(jetIter.px(), jetIter.py(), jetIter.pz(), jetIter.mass());
293 etajet1 = jetIter.eta();
296 p4jet2.SetXYZM(jetIter.px(), jetIter.py(), jetIter.pz(), jetIter.mass());
297 etajet2 = jetIter.eta();
305 p4jj = p4jet1 + p4jet2;
306 double deletajj = etajet1 - etajet2 ;
308 std::cout <<
"xshi:: invmass jj " << p4jj.M() << std::endl;
328 <<
", integral = " << h->Integral()
329 <<
", norm = " << norm << std::endl;
337 for (
unsigned int itrig = 0; itrig < triggerResults->
size(); itrig++){
342 if ( triggername.find(
i) != std::string::npos) {
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_
void dqmBeginRun(const edm::Run &, const edm::EventSetup &) override
MonitorElement * nphotons_reco_
MonitorElement * photonpt_
MonitorElement * invmassjj_
MonitorElement * nvertices_
bool getByToken(EDGetToken token, Handle< PROD > &result) const
#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_
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)
void endRun(const edm::Run &, const edm::EventSetup &) override
edm::EDGetTokenT< reco::PhotonCollection > photonsToken_
MonitorElement * trigvsnvtx_
double et() const final
transverse energy
unsigned int size() const
Get number of paths stored.
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)
bool isMonitoredTriggerAccepted(const edm::TriggerNames &, const edm::Handle< edm::TriggerResults > &)
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
double phi() const final
momentum azimuthal angle
MonitorElement * triggers_
edm::TriggerNames const & triggerNames(edm::TriggerResults const &triggerResults) const override
MonitorElement * delphijetmet_reco_