60 #include "TLorentzVector.h"
73 using namespace trigger;
79 return c1.
pt() > c2.
pt();
89 edm::LogInfo(
"ExoticaDQM") <<
" Starting ExoticaDQM " <<
"\n" ;
92 bei_->setCurrentFolder(
"Physics/Exotica");
95 typedef std::vector<edm::InputTag> vtag;
128 mj_monojet_ptPFJet_ = ps.
getParameter<
double>(
"mj_monojet_ptPFJet");
129 mj_monojet_ptPFMuon_ = ps.
getParameter<
double>(
"mj_monojet_ptPFMuon");
130 mj_monojet_ptPFElectron_ = ps.
getParameter<
double>(
"mj_monojet_ptPFElectron");
143 edm::LogInfo(
"ExoticaDQM") <<
" Deleting ExoticaDQM " <<
"\n" ;
161 edm::LogInfo (
"ExoticaDQM") <<
"[ExoticaDQM]: Begining of Run";
164 bool isConfigChanged =
false;
168 const std::string hltProcessName = theTriggerResultsCollection.process();
169 isValidHltConfig_ = hltConfigProvider_.init( run, eSetup, hltProcessName, isConfigChanged );
192 mj_monojet_pfchef = bei->
book1D(
"mj_monojet_pfchef",
"PFJetID CHEF", 50, 0.0 , 1.0);
193 mj_monojet_pfnhef = bei->
book1D(
"mj_monojet_pfnhef",
"PFJetID NHEF", 50, 0.0 , 1.0);
194 mj_monojet_pfcemf = bei->
book1D(
"mj_monojet_pfcemf",
"PFJetID CEMF", 50, 0.0 , 1.0);
195 mj_monojet_pfnemf = bei->
book1D(
"mj_monojet_pfnemf",
"PFJetID NEMF", 50, 0.0 , 1.0);
196 mj_monojet_pfJet1_pt = bei->
book1D(
"mj_monojet_pfJet1_pt",
"Pt of PFJet-1 (GeV)", 40, 0.0 , 1000);
197 mj_monojet_pfJet2_pt = bei->
book1D(
"mj_monojet_pfJet2_pt",
"Pt of PFJet-2 (GeV)", 40, 0.0 , 1000);
198 mj_monojet_pfJet1_eta = bei->
book1D(
"mj_monojet_pfJet1_eta",
"#eta(PFJet-1)", 50, -5.0, 5.0);
199 mj_monojet_pfJet2_eta = bei->
book1D(
"mj_monojet_pfJet2_eta",
"#eta(PFJet-2)", 50, -5.0, 5.0);
200 mj_monojet_pfJetMulti = bei->
book1D(
"mj_monojet_pfJetMulti",
"No. of PFJets", 10, 0., 10.);
201 mj_monojet_deltaPhiPFJet1PFJet2 = bei->
book1D(
"mj_monojet_deltaPhiPFJet1PFJet2",
"#Delta#phi(PFJet1, PFJet2)", 40, 0., 4.);
202 mj_monojet_deltaRPFJet1PFJet2 = bei->
book1D(
"mj_monojet_deltaRPFJet1PFJet2",
"#DeltaR(PFJet1, PFJet2)", 50, 0., 10.);
203 mj_monojet_pfmetnomu = bei->
book1D(
"mj_monojet_pfmetnomu",
"PFMET no Mu", 100, 0.0 , 500.0);
204 mj_caloMet_et = bei->
book1D(
"mj_caloMet",
"Calo Missing E_{T}; GeV", 50, 0.0 , 500);
205 mj_caloMet_phi = bei->
book1D(
"mj_caloMet_phi",
"Calo Missing E_{T} #phi;#phi(MET)", 35, -3.5, 3.5 );
206 mj_pfMet_et = bei->
book1D(
"mj_pfMet",
"Pf Missing E_{T}; GeV", 50, 0.0 , 500);
207 mj_pfMet_phi = bei->
book1D(
"mj_pfMet_phi",
"Pf Missing E_{T} #phi;#phi(MET)", 35, -3.5, 3.5 );
214 ll_gammajet_sMajMajPhot = bei->
book1D(
"ll_gammajet_sMajMajPhot",
"sMajMajPhot", 50, 0.0 , 5.0);
215 ll_gammajet_sMinMinPhot = bei->
book1D(
"ll_gammajet_sMinMinPhot",
"sMinMinPhot", 50, 0.0 , 5.0);
222 ei_pfjet1_pt = bei->
book1D(
"ei_pfjet1_pt",
"Pt of PFJet-1 (EI) (GeV)", 40, 0.0 , 1000);
223 ei_pfmet_pt = bei->
book1D(
"ei_pfmet_pt",
"Pt of PFMET (EI) (GeV)", 40, 0.0 , 1000);
238 bool ValidCaloElectron = iEvent.
getByLabel(ElectronLabel_, ElectronCollection_);
239 if(!ValidCaloElectron)
return;
241 bool ValidCaloMuon = iEvent.
getByLabel(MuonLabel_, MuonCollection_);
242 if(!ValidCaloMuon)
return;
244 bool ValidCaloTau = iEvent.
getByLabel(TauLabel_, TauCollection_);
245 if(!ValidCaloTau)
return;
247 bool ValidCaloPhoton = iEvent.
getByLabel(PhotonLabel_, PhotonCollection_);
248 if(!ValidCaloPhoton)
return;
250 bool ValidCaloJet = iEvent.
getByLabel(CaloJetLabel_, caloJetCollection_);
251 if(!ValidCaloJet)
return;
252 calojets = *caloJetCollection_;
254 bool ValidCaloMET = iEvent.
getByLabel(CaloMETLabel_, caloMETCollection_);
255 if(!ValidCaloMET)
return;
260 bool ValidPFJet = iEvent.
getByLabel(PFJetLabel_, pfJetCollection_);
261 if(!ValidPFJet)
return;
262 pfjets = *pfJetCollection_;
264 bool ValidPFMET = iEvent.
getByLabel(PFMETLabel_, pfMETCollection_);
265 if(!ValidPFMET)
return;
270 for(
int i=0;
i<2;
i++){
292 CaloJetCollection::const_iterator calojet_ = calojets.begin();
293 for(; calojet_ != calojets.end(); ++calojet_){
295 jetID->calculate(iEvent, *calojet_);
297 if(scale*calojet_->pt()>CaloJetPt[0]){
298 CaloJetPt[1] = CaloJetPt[0];
299 CaloJetPx[1] = CaloJetPx[0];
300 CaloJetPy[1] = CaloJetPy[0];
301 CaloJetEta[1] = CaloJetEta[0];
302 CaloJetPhi[1] = CaloJetPhi[0];
303 CaloJetEMF[1] = CaloJetEMF[0];
304 CaloJetfHPD[1] = CaloJetfHPD[0];
305 CaloJetn90[1] = CaloJetn90[0];
307 CaloJetPt[0] = scale*calojet_->pt();
308 CaloJetPx[0] = scale*calojet_->px();
309 CaloJetPy[0] = scale*calojet_->py();
310 CaloJetEta[0] = calojet_->eta();
311 CaloJetPhi[0] = calojet_->phi();
312 CaloJetEMF[0] = calojet_->emEnergyFraction();
313 CaloJetfHPD[0] =
jetID->fHPD();
314 CaloJetn90[0] =
jetID->n90Hits();
316 else if(scale*calojet_->pt()<CaloJetPt[0] && scale*calojet_->pt()>CaloJetPt[1] ){
317 CaloJetPt[1] = scale*calojet_->pt();
318 CaloJetPx[1] = scale*calojet_->px();
319 CaloJetPy[1] = scale*calojet_->py();
320 CaloJetEta[1] = calojet_->eta();
321 CaloJetPhi[1] = calojet_->phi();
322 CaloJetEMF[1] = calojet_->emEnergyFraction();
323 CaloJetfHPD[1] =
jetID->fHPD();
324 CaloJetn90[1] =
jetID->n90Hits();
330 mj_monojet_countPFJet=0;
332 PFJetCollection::const_iterator pfjet_ = pfjets.begin();
333 for(; pfjet_ != pfjets.end(); ++pfjet_){
335 if(scale*pfjet_->pt()>PFJetPt[0]){
336 PFJetPt[1] = PFJetPt[0];
337 PFJetPx[1] = PFJetPx[0];
338 PFJetPy[1] = PFJetPy[0];
339 PFJetEta[1] = PFJetEta[0];
340 PFJetPhi[1] = PFJetPhi[0];
341 PFJetNHEF[1] = PFJetNHEF[0];
342 PFJetCHEF[1] = PFJetCHEF[0];
343 PFJetNEMF[1] = PFJetNEMF[0];
344 PFJetCEMF[1] = PFJetCEMF[0];
346 PFJetPt[0] = scale*pfjet_->pt();
347 PFJetPx[0] = scale*pfjet_->px();
348 PFJetPy[0] = scale*pfjet_->py();
349 PFJetEta[0] = pfjet_->eta();
350 PFJetPhi[0] = pfjet_->phi();
351 PFJetNHEF[0] = pfjet_->neutralHadronEnergyFraction();
352 PFJetCHEF[0] = pfjet_->chargedHadronEnergyFraction();
353 PFJetNEMF[0] = pfjet_->neutralEmEnergyFraction();
354 PFJetCEMF[0] = pfjet_->chargedEmEnergyFraction();
356 else if(scale*pfjet_->pt()<PFJetPt[0] && scale*pfjet_->pt()>PFJetPt[1] ){
357 PFJetPt[1] = scale*pfjet_->pt();
358 PFJetPx[1] = scale*pfjet_->px();
359 PFJetPy[1] = scale*pfjet_->py();
360 PFJetEta[1] = pfjet_->eta();
361 PFJetPhi[1] = pfjet_->phi();
362 PFJetNHEF[1] = pfjet_->neutralHadronEnergyFraction();
363 PFJetCHEF[1] = pfjet_->chargedHadronEnergyFraction();
364 PFJetNEMF[1] = pfjet_->neutralEmEnergyFraction();
365 PFJetCEMF[1] = pfjet_->chargedEmEnergyFraction();
368 if(scale*pfjet_->pt()>mj_monojet_ptPFJet_) mj_monojet_countPFJet++;
375 analyzeMultiJets(iEvent);
378 analyzeLongLived(iEvent);
381 analyzeEventInterpretation(iEvent, iSetup);
401 mj_monojet_pfJet1_pt->Fill(PFJetPt[0]);
402 mj_monojet_pfJet1_eta->Fill(PFJetEta[0]);
403 mj_monojet_pfchef->Fill(PFJetCHEF[0]);
404 mj_monojet_pfnhef->Fill(PFJetNHEF[0]);
405 mj_monojet_pfcemf->Fill(PFJetCEMF[0]);
406 mj_monojet_pfnemf->Fill(PFJetNEMF[0]);
407 mj_monojet_pfJetMulti->Fill(mj_monojet_countPFJet);
410 mj_monojet_pfJet2_pt->Fill(PFJetPt[1]);
411 mj_monojet_pfJet2_eta->Fill(PFJetEta[1]);
412 mj_monojet_deltaPhiPFJet1PFJet2->Fill(
deltaPhi(PFJetPhi[0],PFJetPhi[1]));
413 mj_monojet_deltaRPFJet1PFJet2->Fill(
deltaR(PFJetEta[0],PFJetPhi[0],
414 PFJetEta[1],PFJetPhi[1]));
420 mj_caloMet_et->Fill(met.
et());
421 mj_caloMet_phi->Fill(met.
phi());
425 const PFMET pfmet = pfmetcol->front();
426 mj_pfMet_et->Fill(pfmet.
et());
427 mj_pfMet_phi->Fill(pfmet.
phi());
438 iEvent.
getByLabel(
"reducedEcalRecHitsEB", ecalhitseb);
439 rhitseb = ecalhitseb.
product();
443 iEvent.
getByLabel(
"reducedEcalRecHitsEE", ecalhitsee);
444 rhitsee = ecalhitsee.
product();
447 reco::PhotonCollection::const_iterator photon = PhotonCollection_->begin();
448 for(; photon != PhotonCollection_->end(); ++photon){
449 if(photon->energy()<3.)
continue;
450 if(nPhot>=40)
continue;
461 ll_gammajet_sMajMajPhot->Fill(moments.
sMaj);
462 ll_gammajet_sMinMinPhot->Fill(moments.
sMin);
465 ll_gammajet_sMajMajPhot->Fill(-100.);
466 ll_gammajet_sMinMinPhot->Fill(-100.);
480 bool ValidPFElectronEI = iEvent.
getByLabel(PFElectronLabelEI_, pfElectronCollectionEI_);
481 if(!ValidPFElectronEI)
return;
482 pfelectronsEI = *pfElectronCollectionEI_;
485 bool ValidPFMuonEI = iEvent.
getByLabel(PFMuonLabelEI_, pfMuonCollectionEI_);
486 if(!ValidPFMuonEI)
return;
487 pfmuonsEI = *pfMuonCollectionEI_;
490 bool ValidPFJetEI = iEvent.
getByLabel(PFJetLabelEI_, pfJetCollectionEI_);
491 if(!ValidPFJetEI)
return;
492 pfjetsEI = *pfJetCollectionEI_;
495 bool ValidPFMETEI = iEvent.
getByLabel(PFMETLabelEI_, pfMETCollectionEI_);
496 if(!ValidPFMETEI)
return;
502 PFJetCollection::const_iterator pfjet_ = pfjetsEI.begin();
503 for(; pfjet_ != pfjetsEI.end(); ++pfjet_){
505 if(scale*pfjet_->pt()<PFJetEIPt)
continue;
506 PFJetEIPt = scale*pfjet_->pt();
507 PFJetEIPx = scale*pfjet_->px();
508 PFJetEIPy = scale*pfjet_->py();
509 PFJetEIEta = pfjet_->eta();
510 PFJetEIPhi = pfjet_->phi();
511 PFJetEINHEF = pfjet_->neutralHadronEnergyFraction();
512 PFJetEICHEF = pfjet_->chargedHadronEnergyFraction();
513 PFJetEINEMF = pfjet_->neutralEmEnergyFraction();
514 PFJetEICEMF = pfjet_->chargedEmEnergyFraction();
518 ei_pfjet1_pt->Fill(PFJetEIPt);
522 const PFMET pfmetEI = pfmetcolEI->front();
523 ei_pfmet_pt->Fill(pfmetEI.
et());
T getParameter(std::string const &) const
virtual double et() const GCC11_FINAL
transverse energy
virtual void analyzeLongLivedTrigger(edm::Event const &e)
virtual void beginLuminosityBlock(edm::LuminosityBlock const &lumiSeg, edm::EventSetup const &context)
virtual void analyzeMultiJetsTrigger(edm::Event const &e)
ExoticaDQM(const edm::ParameterSet &ps)
MonitorElement * book1D(const char *name, const char *title, int nchX, double lowX, double highX)
Book 1D histogram.
virtual void endLuminosityBlock(edm::LuminosityBlock const &lumiSeg, edm::EventSetup const &c)
virtual void analyzeEventInterpretation(edm::Event const &e, edm::EventSetup const &eSetup)
std::vector< std::string > vstring
void cd(void)
go to top directory (ie. root)
virtual double correction(const LorentzVector &fJet) const =0
get correction using Jet information only
virtual float phi() const GCC11_FINAL
momentum azimuthal angle
virtual float pt() const =0
transverse momentum
void bookHistos(DQMStore *bei)
virtual void beginRun(edm::Run const &run, edm::EventSetup const &eSetup)
bool getByLabel(InputTag const &tag, Handle< PROD > &result) const
double deltaR(double eta1, double eta2, double phi1, double phi2)
virtual void analyze(edm::Event const &e, edm::EventSetup const &eSetup)
static const JetCorrector * getJetCorrector(const std::string &fName, const edm::EventSetup &fSetup)
retrieve corrector from the event setup. troughs exception if something is missing ...
T const * product() const
virtual void analyzeMultiJets(edm::Event const &e)
virtual void analyzeLongLived(edm::Event const &e)
bool operator()(const Candidate &c1, const Candidate &c2) const
virtual void endRun(edm::Run const &run, edm::EventSetup const &eSetup)
void setCurrentFolder(const std::string &fullpath)