5 #include <unordered_map> 39 #include "TLorentzVector.h" 45 std::pair<MonitorElement*,bool>
nME;
46 std::pair<MonitorElement*,bool>
etaME;
47 std::pair<MonitorElement*,bool>
phiME;
48 std::pair<MonitorElement*,bool>
ptME;
49 std::pair<MonitorElement*,bool>
massME;
51 std::pair<MonitorElement*,bool>
csvME;
55 std::pair<MonitorElement*,bool>
mrME;
56 std::pair<MonitorElement*,bool>
rsqME;
57 std::pair<MonitorElement*,bool>
dxyME;
58 std::pair<MonitorElement*,bool>
dzME;
60 std::pair<MonitorElement*,bool>
dRME;
62 std::pair<MonitorElement*,bool>
q1q2ME;
96 using std::unordered_map;
114 bool isHEP17(
double eta,
double phi);
115 bool isHEM17(
double eta,
double phi);
152 const double MASS_MU = .105658;
162 double MAX_PHI = 3.2;
165 N_PHI, -MAX_PHI, MAX_PHI
171 N_CSV, -MAX_CSV, MAX_CSV
181 double MAX_PHI_HEP17 = -0.52;
182 double MIN_PHI_HEP17 = -0.87;
185 N_PHI_HEP17, MIN_PHI_HEP17, MAX_PHI_HEP17
187 double MAX_ETA_HEP17 = 3.0;
188 double MIN_ETA_HEP17 = 1.3;
191 N_ETA_HEP17, MIN_ETA_HEP17, MAX_ETA_HEP17
195 N_ETA_HEP17, -MAX_ETA_HEP17, MIN_ETA_HEP17
211 std::make_pair<MonitorElement*,bool>(
nullptr,
false),
212 std::make_pair<MonitorElement*,bool>(
nullptr,pset.
getParameter<
bool>(
"displayInPrimary_eta") ),
213 std::make_pair<MonitorElement*,bool>(
nullptr,pset.
getParameter<
bool>(
"displayInPrimary_phi") ),
214 std::make_pair<MonitorElement*,bool>(
nullptr,pset.
getParameter<
bool>(
"displayInPrimary_pt") ),
215 std::make_pair<MonitorElement*,bool>(
nullptr,pset.
getParameter<
bool>(
"displayInPrimary_mass") ),
216 std::make_pair<MonitorElement*,bool>(
nullptr,pset.
getParameter<
bool>(
"displayInPrimary_energy") ),
217 std::make_pair<MonitorElement*,bool>(
nullptr,pset.
getParameter<
bool>(
"displayInPrimary_csv") ),
218 std::make_pair<MonitorElement*,bool>(
nullptr,pset.
getParameter<
bool>(
"displayInPrimary_etaVSphi") ),
219 std::make_pair<MonitorElement*,bool>(
nullptr,pset.
getParameter<
bool>(
"displayInPrimary_pt_HEP17") ),
220 std::make_pair<MonitorElement*,bool>(
nullptr,pset.
getParameter<
bool>(
"displayInPrimary_pt_HEM17") ),
221 std::make_pair<MonitorElement*,bool>(
nullptr,pset.
getParameter<
bool>(
"displayInPrimary_MR") ),
222 std::make_pair<MonitorElement*,bool>(
nullptr,pset.
getParameter<
bool>(
"displayInPrimary_RSQ") ),
223 std::make_pair<MonitorElement*,bool>(
nullptr,pset.
getParameter<
bool>(
"displayInPrimary_dxy") ),
224 std::make_pair<MonitorElement*,bool>(
nullptr,pset.
getParameter<
bool>(
"displayInPrimary_dz") ),
225 std::make_pair<MonitorElement*,bool>(
nullptr,pset.
getParameter<
bool>(
"displayInPrimary_dimass") ),
226 std::make_pair<MonitorElement*,bool>(
nullptr,
false),
227 std::make_pair<MonitorElement*,bool>(
nullptr,
false),
228 std::make_pair<MonitorElement*,bool>(
nullptr,
false),
237 pset.
getParameter<std::vector<double> >(
"massBINNING" ),
240 pset.
getParameter<std::vector<double> >(
"dimassBINNING" ),
260 for (
const auto &
pset : plotPSETS_ )
261 hltPlots_.push_back( getPlotPSet(
pset) );
265 if ( (eta >= MIN_ETA_HEP17 && eta <= MAX_ETA_HEP17) &&
266 (phi >= MIN_PHI_HEP17 && phi <= MAX_PHI_HEP17) )
return true;
271 if ( (eta >= -MAX_ETA_HEP17 && eta <= -MIN_ETA_HEP17) &&
272 (phi >= MIN_PHI_HEP17 && phi <= MAX_PHI_HEP17) )
return true;
280 : TopFolder_ ( iConfig.getParameter<
std::
string>(
"TopFolder") )
281 , label_ ( iConfig.getParameter<
std::
string>(
"label") )
282 , processName_ ( iConfig.getParameter<
std::
string>(
"processName") )
284 , debug_ ( iConfig.getUntrackedParameter<
bool>(
"debug",
false) )
285 , triggerResultsToken_ ( consumes<
edm::TriggerResults> (iConfig.getParameter<
edm::InputTag>(
"TriggerResults") ) )
286 , triggerEventToken_ ( consumes<
trigger::TriggerEvent>(iConfig.getParameter<
edm::InputTag>(
"TriggerSummary") ) )
287 , beamSpot_ ( iConfig.getParameter<
edm::InputTag>(
"beamspot") )
288 , beamSpotToken_ ( consumes<
reco::
BeamSpot>(beamSpot_) )
289 , caloJetBTagsToken_ ( consumes<
reco::
JetTagCollection>(iConfig.getParameter<
edm::InputTag>(
"caloJetBTags") ) )
291 , muCandidates_ ( iConfig.getParameter<
edm::InputTag>(
"muCandidates") )
292 , muCandidatesToken_ ( consumes<
std::vector<
reco::RecoChargedCandidate> >(muCandidates_) )
293 , eleCandidates_ ( iConfig.getParameter<
edm::InputTag>(
"eleCandidates") )
294 , eleCandidatesToken_ ( consumes<
std::vector<
reco::RecoChargedCandidate> >(eleCandidates_) )
326 if (!triggerResults.
isValid())
return;
330 if (!triggerEvent.
isValid())
return;
352 if (
plot.pathIDX <= 0 )
continue;
357 if(not plottedPathIndices[
index]) {
358 plottedPathIndices[
index] =
true;
360 std::cout <<
plot.pathNAME <<
" --> bin: " << ibin << std::endl;
366 std::cout <<
"objects: " << objects.size() << std::endl;
368 bool moduleFOUND =
false;
370 for (
const auto &
module : moduleNames ) {
371 if (
module ==
plot.moduleNAME) moduleFOUND =
true;
374 std::cout <<
plot.moduleNAME << (moduleFOUND ?
"" :
"NOT" ) <<
" found in the list of modules" << std::endl;
377 for (
const auto &
module : moduleNames ) {
380 if ( idx < triggerEvent->sizeFilters() )
387 unsigned int moduleIDX = triggerEvent->
filterIndex(moduleName);
389 std::cout <<
"moduleNAME: " <<
plot.moduleNAME <<
" --> " << moduleIDX << std::endl;
392 LogDebug (
"HLTObjectsMonitor") <<
plot.pathNAME <<
" " <<
plot.moduleNAME <<
" is not available ! please, fix update DQM/HLTEvF/python/HLTObjectsMonitor_cfi.py";
398 std::cout <<
"keys: " << keys.size() << std::endl;
400 plot.nME.first->Fill(keys.size());
404 for (
const auto &
key : keys ) {
406 double pt = objects[
key].pt();
407 double eta = objects[
key].eta();
408 double phi = objects[
key].phi();
409 double mass = objects[
key].mass();
410 double energy = objects[
key].energy();
411 int id = objects[
key].id();
413 std::cout <<
"object ID " <<
id <<
" mass: " << mass << std::endl;
416 plot.ptME.first->Fill(pt);
417 if (
plot.doPlotETA )
plot.etaME.first->Fill(eta);
418 plot.phiME.first->Fill(phi);
420 if (
plot.doPlotCSV ) {
423 if ( !caloJetBTags.
isValid() )
plot.csvME.first->Fill(-10.);
425 for (
auto it = caloJetBTags->
begin();
426 it != caloJetBTags->
end(); ++it ) {
427 double dR =
deltaR(eta,phi,it->first->eta(),it->first->phi());
429 std::cout <<
"[HLTObjectsMonitor::analyze] deltaR: " << dR <<
" matched ? " << ( dR <= 0.4 ?
"YEAP" :
"NOPE" ) << std::endl;
430 plot.csvME.first->Fill(it->second);
434 }
else if (
plot.doPF ) {
435 if ( !pfJetBTags.
isValid() )
plot.csvME.first->Fill(-10.);
437 for (
auto it = pfJetBTags->
begin();
438 it != pfJetBTags->
end(); ++it ) {
439 double dR =
deltaR(eta,phi,it->first->eta(),it->first->phi());
441 std::cout <<
"[HLTObjectsMonitor::analyze] deltaR: " << dR <<
" matched ? " << ( dR <= 0.4 ?
"YEAP" :
"NOPE" ) << std::endl;
442 plot.csvME.first->Fill(it->second);
447 if (
plot.doPlotMASS )
plot.massME.first->Fill(mass);
448 if (
plot.doPlotENERGY )
plot.energyME.first->Fill(energy);
449 if (
plot.doPlot2D )
plot.etaVSphiME.first->Fill(eta,phi);
450 if (
plot.doPlotHEP17 ) {
451 if (
isHEP17(eta,phi) )
plot.ptMEhep17.first->Fill(pt);
452 if (
isHEM17(eta,phi) )
plot.ptMEhem17.first->Fill(pt);
456 MR = objects[
key].px();
457 RSQ = objects[
key].py();
460 if (
plot.doPlotDXY ) {
463 dxy =
dxyFinder(eta,phi,muCandidates, beamspot, 0.1);
465 dxy =
dxyFinder(eta,phi,eleCandidates, beamspot, 0.1);
466 plot.dxyME.first->Fill(dxy);
469 if (
plot.doPlotRazor ) {
470 plot.mrME.first->Fill(MR);
471 plot.rsqME.first->Fill(RSQ);
474 if ( keys.size() < 2 ) {
475 if (
plot.doPlotDiMass ||
plot.doPlotDZ )
476 LogDebug (
"HLTObjectsMonitor") <<
plot.pathNAME <<
" " <<
plot.moduleNAME <<
" # objects is (" << keys.size() <<
") less than 2 ! you probably want to either change the moduleNAME or switch off di-object system plots (doPlotDZ: " <<
plot.doPlotDZ <<
" doPlotDiMass: " <<
plot.doPlotDiMass <<
") in DQM/HLTEvF/python/HLTObjectsMonitor_cfi.py)";
478 for (
const auto &
key : keys ) {
479 double pt = objects[
key].pt();
480 double eta = objects[
key].eta();
481 double phi = objects[
key].phi();
482 int id = objects[
key].id();
484 unsigned int kCnt0 = 0;
488 v1.SetPtEtaPhiM(pt,eta,phi,
MASS_MU);
490 v1.SetPtEtaPhiM(pt,eta,phi,0);
492 unsigned int kCnt1 = 0;
493 for (
const auto & key1: keys ) {
495 if (
key != key1 && kCnt1 > kCnt0) {
497 double pt2 = objects[key1].phi();
498 double eta2 = objects[key1].eta();
499 double phi2 = objects[key1].phi();
500 int id2 = objects[key1].id();
502 double dR =
deltaR( eta, phi, eta2, phi2);
503 plot.dRME.first->Fill(dR);
504 plot.dRetaVSphiME.first->Fill(eta,phi,dR);
506 int q1 = (
id==0 ? 0 :
id/
abs(
id) );
507 int q2 = ( id2==0 ? 0 : id2/
abs(id2) );
509 plot.q1q2ME.first->Fill(q1q2);
511 if (
abs(
id) !=
abs(id2) )
512 edm::LogInfo (
"HLTObjectsMonitor") <<
plot.pathNAME <<
" " <<
plot.moduleNAME <<
" objects have different ID !?!" <<
abs(
id) <<
" and " <<
abs(id2);
514 if( (
id+id2 ) == 0 ) {
517 if (
abs( id2 ) == 13 )
518 v2.SetPtEtaPhiM(pt2,eta2,phi2,
MASS_MU);
520 v2.SetPtEtaPhiM(pt2,eta2,phi2, 0);
522 if (
plot.doPlotDiMass ) {
523 TLorentzVector
v = v1+v2;
524 plot.dimassME.first->Fill(v.M());
527 if (
plot.doPlotDZ ) {
530 dz =
dzFinder(eta,phi,eta2,phi2,muCandidates, 0.1);
532 dz =
dzFinder(eta,phi,eta2,phi2,eleCandidates, 0.1);
533 plot.dzME.first->Fill(dz);
556 if (
debug_)
std::cout <<
"[HLTObjectsMonitor::dqmBeginRun] extracting HLTconfig" << std::endl;
563 std::cout <<
"[HLTObjectsMonitor::dqmBeginRun] triggerPaths: " << triggerPaths.size() <<
" <--> " <<
hltPlots_.size() << std::endl;
565 for (
const auto & pathName : triggerPaths) {
568 std::cout <<
"[HLTObjectsMonitor::dqmBeginRun] " << pathName << std::endl;
573 if (
plot.pathNAME == pathName_noVersion) {
576 if (
plot.pathIDX <= 0 ||
plot.pathIDX ==
int(triggerPaths.size()) )
584 std::cout <<
"plot: " <<
plot.pathNAME <<
" --> pathIDX: " <<
plot.pathIDX << std::endl;
585 std::cout <<
"[HLTObjectsMonitor::dqmBeginRun] DONE" << std::endl;
594 std::cout <<
"[HLTObjectsMonitor::bookHistograms]" << std::endl;
603 std::unordered_map<std::string,int> uniqueNames;
612 for (
auto const&
p : hltPlots_) {
618 std::cout <<
p.pathNAME <<
" --> bin: " << i << std::endl;
626 std::cout <<
"booking plots for " <<
plot.label << std::endl;
628 if (
plot.pathIDX <= 0 ) {
629 LogDebug (
"HLTObjectsMonitor") <<
plot.pathNAME <<
" is not available in the HLT menu ! no plots are going to be booked for it (update DQM/HLTEvF/python/HLTObjectsMonitor_cfi.py)";
633 std::cout <<
"booking histograms for " <<
plot.pathNAME << std::endl;
636 if (
plot.nME.second )
641 name =
plot.label+
"_nobjects";
642 title =
plot.pathNAME+
" # objects";
643 plot.nME.first = ibooker.
book1D(name,title,20,-0.5,19.5);
644 plot.nME.first->setAxisTitle(
plot.xTITLE+
" # objects");
647 if (
plot.ptME.second )
652 name =
plot.label+
"_pt";
653 title =
plot.pathNAME+
" p_T";
655 std::vector<float> fbinning((
plot.ptBINNING).begin(),(
plot.ptBINNING).
end());
656 float* arr = &fbinning[0];
657 plot.ptME.first = ibooker.
book1D(name,title,nbins,arr);
658 plot.ptME.first->setAxisTitle(
plot.xTITLE+
" p_{T} [GeV]");
662 if (
plot.phiME.second )
667 name =
plot.label+
"_phi";
668 title =
plot.pathNAME+
" #phi";
669 int nbins = (
plot.phiBINNING).
size()-1;
670 std::vector<float> fbinning((
plot.phiBINNING).begin(),(
plot.phiBINNING).
end());
671 float* arr = &fbinning[0];
672 plot.phiME.first = ibooker.
book1D(name,title,nbins,arr);
673 plot.phiME.first->setAxisTitle(
plot.xTITLE+
" #phi [rad]");
676 if (
plot.doPlotETA ) {
677 if (
plot.etaME.second )
682 name =
plot.label+
"_eta";
683 title =
plot.pathNAME+
" #eta";
684 int nbins = (
plot.etaBINNING).
size()-1;
685 std::vector<float> fbinning((
plot.etaBINNING).begin(),(
plot.etaBINNING).
end());
686 float* arr = &fbinning[0];
688 plot.etaME.first = ibooker.
book1D(name,title,nbins,arr);
689 plot.etaME.first->setAxisTitle(
plot.xTITLE+
" #eta");
692 if (
plot.doPlotMASS ) {
693 if (
plot.massME.second )
698 name =
plot.label+
"_mass";
699 title =
plot.pathNAME+
" mass";
700 int nbins = (
plot.massBINNING).
size()-1;
701 std::vector<float> fbinning((
plot.massBINNING).begin(),(
plot.massBINNING).
end());
702 float* arr = &fbinning[0];
704 plot.massME.first = ibooker.
book1D(name,title,nbins,arr);
705 plot.massME.first->setAxisTitle(
plot.xTITLE+
" mass [GeV]");
708 if (
plot.doPlotENERGY ) {
709 if (
plot.energyME.second )
714 name =
plot.label+
"_energy";
715 title =
plot.pathNAME+
" energy";
716 int nbins = (
plot.ptBINNING).
size()-1;
717 std::vector<float> fbinning((
plot.ptBINNING).begin(),(
plot.ptBINNING).
end());
718 float* arr = &fbinning[0];
720 plot.energyME.first = ibooker.
book1D(name,title,nbins,arr);
721 plot.energyME.first->setAxisTitle(
plot.xTITLE+
" energy [GeV]");
724 if (
plot.doPlotCSV ) {
725 if (
plot.csvME.second )
730 name =
plot.label+
"_csv";
731 title =
plot.pathNAME+
" CSV";
734 plot.csvME.first->setAxisTitle(
plot.xTITLE+
" CSV discriminator");
737 if (
plot.doPlot2D ) {
738 if (
plot.etaVSphiME.second )
743 name =
plot.label+
"_etaVSphi";
744 title =
plot.pathNAME+
" #eta vs #phi";
745 int nbinsX = (
plot.etaBINNING).
size()-1;
746 std::vector<float> fbinningX((
plot.etaBINNING).begin(),(
plot.etaBINNING).
end());
747 float* arrX = &fbinningX[0];
748 int nbinsY = (
plot.phiBINNING).
size()-1;;
749 std::vector<float> fbinningY((
plot.phiBINNING).begin(),(
plot.phiBINNING).
end());
750 float* arrY = &fbinningY[0];
751 plot.etaVSphiME.first = ibooker.
book2D(name,title,nbinsX,arrX,nbinsY,arrY);
752 plot.etaVSphiME.first->setAxisTitle(
plot.xTITLE+
" #eta",1);
753 plot.etaVSphiME.first->setAxisTitle(
plot.xTITLE+
" #phi",2);
756 if (
plot.doPlotHEP17 ) {
758 if (
plot.ptMEhep17.second )
763 int nbins = (
plot.ptBINNING).
size()-1;
764 std::vector<float> fbinning((
plot.ptBINNING).begin(),(
plot.ptBINNING).
end());
765 float* arr = &fbinning[0];
767 name =
plot.label+
"_pt_HEP17";
768 title =
plot.pathNAME+
" p_{T} HEP17";
769 plot.ptMEhep17.first = ibooker.
book1D(name,title,nbins,arr);
770 plot.ptMEhep17.first->setAxisTitle(
plot.xTITLE+
" p_{T} [GeV]",1);
772 if (
plot.ptMEhem17.second )
777 name =
plot.label+
"_pt_HEM17";
778 title =
plot.pathNAME+
" p_{T} HEM17";
779 plot.ptMEhem17.first = ibooker.
book1D(name,title,nbins,arr);
780 plot.ptMEhem17.first->setAxisTitle(
plot.xTITLE+
" p_{T} [GeV]",1);
783 if (
plot.doPlotRazor ) {
784 if (
plot.mrME.second )
789 name =
plot.label+
"_mr";
790 title =
plot.pathNAME+
" M_{R}";
791 plot.mrME.first = ibooker.
book1D(name,title,100,0.,100.);
792 plot.mrME.first->setAxisTitle(
plot.xTITLE+
" M_{R} [GeV]",1);
794 if (
plot.rsqME.second )
799 name =
plot.label+
"_rsq";
800 title =
plot.pathNAME+
" RSQ";
801 plot.rsqME.first = ibooker.
book1D(name,title,100,0.,100.);
802 plot.rsqME.first->setAxisTitle(
plot.xTITLE+
" RSQ [GeV]",1);
806 if (
plot.doPlotDXY ) {
808 if (
plot.dxyME.second )
813 name =
plot.label+
"_dxy";
814 title =
plot.pathNAME+
" d_{xy}";
815 int nbins = (
plot.dxyBINNING).
size()-1;
816 std::vector<float> fbinning((
plot.dxyBINNING).begin(),(
plot.dxyBINNING).
end());
817 float* arr = &fbinning[0];
818 plot.dxyME.first = ibooker.
book1D(name,title,nbins,arr);
819 plot.dxyME.first->setAxisTitle(
plot.xTITLE+
" d_{xy} [cm]");
823 if (
plot.doPlotDZ ) {
825 if (
plot.dzME.second )
830 name =
plot.label+
"_dz";
831 title =
plot.pathNAME+
" d_{z}";
832 int nbins = (
plot.dzBINNING).
size()-1;
833 std::vector<float> fbinning((
plot.dzBINNING).begin(),(
plot.dzBINNING).
end());
834 float* arr = &fbinning[0];
835 plot.dzME.first = ibooker.
book1D(name,title,nbins,arr);
836 plot.dzME.first->setAxisTitle(
plot.xTITLE+
" d_{z} [cm]");
840 if (
plot.dRME.second )
845 name =
plot.label+
"_dR";
846 title =
plot.pathNAME+
" di-object dR";
847 plot.dRME.first = ibooker.
book1D(name,title,50,0.,5.);
848 plot.dRME.first->setAxisTitle(
plot.xTITLE+
" dR_{obj,obj}");
850 if (
plot.dRetaVSphiME.second )
855 name =
plot.label+
"_dR_etaVSphi";
856 title =
plot.pathNAME+
" di-object dR in the #eta-#phi plane (of 1st obj)";
857 plot.dRetaVSphiME.first = ibooker.
bookProfile2D(name,title,60,-3.,3.,64,-3.2,3.2,0.,5.);
858 plot.dRetaVSphiME.first->setAxisTitle(
plot.xTITLE+
" #eta",1);
859 plot.dRetaVSphiME.first->setAxisTitle(
plot.xTITLE+
" #phi",2);
860 plot.dRetaVSphiME.first->setAxisTitle(
plot.xTITLE+
" dR_{obj,obj}",3);
862 if (
plot.q1q2ME.second )
867 name =
plot.label+
"_q1q2";
868 title =
plot.pathNAME+
" di-object q1xq2";
869 plot.q1q2ME.first = ibooker.
book1D(name,title,3,-1.,1.);
870 plot.q1q2ME.first->setAxisTitle(
plot.xTITLE+
" q_{obj1} x q_{obj2}");
872 if (
plot.doPlotDiMass ) {
874 if (
plot.dimassME.second )
879 name =
plot.label+
"_dimass";
880 title =
plot.pathNAME+
" di-object mass";
881 int nbins = (
plot.dimassBINNING).
size()-1;
882 std::vector<float> fbinning((
plot.dimassBINNING).begin(),(
plot.dimassBINNING).
end());
883 float* arr = &fbinning[0];
884 plot.dimassME.first = ibooker.
book1D(name,title,nbins,arr);
885 plot.dimassME.first->setAxisTitle(
plot.xTITLE+
" m_{obj,obj} [GeV]");
891 std::cout <<
"[HLTObjectsMonitor::bookHistograms] DONE" << std::endl;
901 <<
" by switching OFF doPlotDXY or updating the InputTag collection";
905 LogDebug (
"HLTObjectsMonitor") <<
beamSpot_ <<
" is not valid ! please, update DQM/HLTEvF/python/HLTObjectsMonitor_cfi.py" 906 <<
" by switching OFF doPlotDXY or updating the InputTag collection";
911 for (reco::RecoChargedCandidateCollection::const_iterator candidate = candidates->begin();
912 candidate != candidates->end(); ++candidate) {
914 if (
deltaR( eta,phi,candidate->eta(),candidate->phi() ) < dRcut ) {
916 dxy = (-(candidate->vx()-beamspot->
x0()) * candidate->py() + (candidate->vy()-beamspot->
y0()) * candidate->px())/candidate->pt();
921 edm::LogWarning (
"HLTObjectsMonitor") <<
"trigger object does not match ( dR > " << dRcut <<
") to any of the candidates in either " 933 <<
" by switching OFF doPlotDZ or updating the InputTag collection";
939 bool matched1 =
false;
940 bool matched2 =
false;
941 for (reco::RecoChargedCandidateCollection::const_iterator candidate = candidates->begin();
942 candidate != candidates->end(); ++candidate) {
944 if (
deltaR( eta1,phi1,candidate->eta(),candidate->phi() ) < dRcut ) {
948 std::cout <<
"cand1: " << cand1->
pt() <<
" " << cand1->
eta() <<
" " << cand1->
phi() << std::endl;
953 LogDebug (
"HLTObjectsMonitor") <<
"trigger object1 does not match ( dR > " << dRcut <<
") to any of the candidates in either " 958 for (reco::RecoChargedCandidateCollection::const_iterator candidate = candidates->begin();
959 candidate != candidates->end(); ++candidate) {
961 std::cout <<
"candidate: " << candidate->pt() <<
" cand1: " << cand1->
pt() << std::endl;
962 std::cout <<
"candidate: " << candidate->eta() <<
" cand1: " << cand1->
eta() << std::endl;
963 std::cout <<
"candidate: " << candidate->phi() <<
" cand1: " << cand1->
phi() << std::endl;
965 if (&*candidate == cand1)
continue;
967 if (
deltaR( eta2,phi2,candidate->eta(),candidate->phi() ) < dRcut ) {
971 std::cout <<
"cand2: " << cand2->
pt() <<
" " << cand2->
eta() <<
" " << cand2->
phi() << std::endl;
976 LogDebug (
"HLTObjectsMonitor") <<
"trigger object2 does not match ( dR > " << dRcut <<
") to any of the candidates in either " 981 dz = cand1->
vz() - cand2->
vz();
edm::EDGetTokenT< reco::JetTagCollection > pfJetBTagsToken_
T getParameter(std::string const &) const
T getUntrackedParameter(std::string const &, T const &) const
std::vector< double > phiBINNING
bool saveTags(const std::string &module) const
Is module an L3 filter (ie, tracked saveTags=true)
std::pair< MonitorElement *, bool > dzME
std::vector< hltPlot > hltPlots_
std::pair< MonitorElement *, bool > dimassME
std::pair< MonitorElement *, bool > csvME
std::string backupFolder_
double eta() const final
momentum pseudorapidity
edm::EDGetTokenT< edm::TriggerResults > triggerResultsToken_
std::unordered_map< std::string, int > plotNamesToBins_
trigger::size_type sizeFilters() const
const MEbinning csv_binning_
std::pair< MonitorElement *, bool > massME
edm::InputTag muCandidates_
edm::EDGetTokenT< reco::JetTagCollection > caloJetBTagsToken_
std::pair< MonitorElement *, bool > energyME
std::vector< double > etaBINNING
bool getByToken(EDGetToken token, Handle< PROD > &result) const
std::vector< double > dimassBINNING
static hltPlot getPlotPSet(edm::ParameterSet pset)
std::pair< MonitorElement *, bool > etaVSphiME
std::pair< MonitorElement *, bool > dRetaVSphiME
bool accept() const
Has at least one path accepted the event?
const std::vector< std::string > & triggerNames() const
names of trigger paths
const Keys & filterKeys(trigger::size_type index) const
trigger::size_type filterIndex(const edm::InputTag &filterTag) const
find index of filter in data-member vector from filter tag
edm::EDGetTokenT< reco::BeamSpot > beamSpotToken_
void dqmBeginRun(edm::Run const &, edm::EventSetup const &) override
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)
const_iterator end() const
double pt() const final
transverse momentum
std::pair< MonitorElement *, bool > ptMEhem17
JetFloatAssociation::Container JetTagCollection
std::pair< MonitorElement *, bool > q1q2ME
example_stream void analyze(const edm::Event &, const edm::EventSetup &) override
static const std::string removeVersion(const std::string &trigger)
unsigned int triggerIndex(const std::string &triggerName) const
slot position of trigger path in trigger table (0 to size-1)
void bookHistograms(DQMStore::IBooker &i, edm::Run const &, edm::EventSetup const &) override
edm::EDGetTokenT< std::vector< reco::RecoChargedCandidate > > eleCandidatesToken_
bool isHEP17(double eta, double phi)
std::pair< MonitorElement *, bool > etaME
std::pair< MonitorElement *, bool > phiME
std::string moduleName(Provenance const &provenance)
#define DEFINE_FWK_MODULE(type)
std::pair< MonitorElement *, bool > dxyME
void setCurrentFolder(std::string const &fullpath)
HLTObjectsMonitor(const edm::ParameterSet &)
edm::InputTag eleCandidates_
const TriggerObjectCollection & getObjects() const
MonitorElement * bookProfile2D(Args &&...args)
double dxyFinder(double, double, edm::Handle< reco::RecoChargedCandidateCollection >, edm::Handle< reco::BeamSpot >, double)
std::pair< MonitorElement *, bool > mrME
MonitorElement * book1D(Args &&...args)
Abs< T >::type abs(const T &t)
static std::string const triggerResults
std::vector< double > massBINNING
std::pair< MonitorElement *, bool > rsqME
double vz() const override
z coordinate of vertex position
std::pair< MonitorElement *, bool > ptME
std::vector< double > dzBINNING
const std::vector< std::string > & moduleLabels(unsigned int trigger) const
label(s) of module(s) on a trigger path
std::vector< TriggerObject > TriggerObjectCollection
collection of trigger physics objects (e.g., all isolated muons)
std::pair< MonitorElement *, bool > nME
std::pair< MonitorElement *, bool > dRME
MonitorElement * book2D(Args &&...args)
std::vector< size_type > Keys
bool init(const edm::Run &iRun, const edm::EventSetup &iSetup, const std::string &processName, bool &changed)
d'tor
HLTConfigProvider hltConfig_
example_stream void bookHistograms(DQMStore::IBooker &,@example_stream edm::Run const &,@example_stream edm::EventSetup const &) override
std::pair< MonitorElement *, bool > ptMEhep17
edm::EDGetTokenT< std::vector< reco::RecoChargedCandidate > > muCandidatesToken_
bool isHEM17(double eta, double phi)
std::vector< double > phi_variable_binning_
MonitorElement * eventsPlot_
std::vector< edm::ParameterSet > plotPSETS_
void analyze(const edm::Event &, const edm::EventSetup &) override
double y0() const
y coordinate
double dzFinder(double, double, double, double, edm::Handle< reco::RecoChargedCandidateCollection >, double)
static std::string const triggerPaths
double phi() const final
momentum azimuthal angle
void setAxisTitle(const std::string &title, int axis=1)
set x-, y- or z-axis title (axis=1, 2, 3 respectively)
const_iterator begin() const
std::vector< double > dxyBINNING
edm::EDGetTokenT< trigger::TriggerEvent > triggerEventToken_
std::vector< double > ptBINNING
double x0() const
x coordinate