578 std::cout <<
"[HLTObjectsMonitor::bookHistograms]" << std::endl;
587 std::unordered_map<std::string, int> uniqueNames;
592 eventsPlot_ = ibooker.book1D(name, title, nbins, -0.5,
double(nbins) - 0.5);
596 for (
auto const&
p : hltPlots_) {
602 std::cout <<
p.pathNAME <<
" --> bin: " << i << std::endl;
607 for (
auto&
plot : hltPlots_) {
609 std::cout <<
"booking plots for " <<
plot.label << std::endl;
611 if (
plot.pathIDX <= 0) {
613 <<
" is not available in the HLT menu ! no plots are going to be booked for it " 614 "(update DQM/HLTEvF/python/HLTObjectsMonitor_cfi.py)";
618 std::cout <<
"booking histograms for " <<
plot.pathNAME << std::endl;
626 name =
plot.label +
"_nobjects";
627 title =
plot.pathNAME +
" # objects";
628 plot.nME.first = ibooker.book1D(name, title, 20, -0.5, 19.5);
629 plot.nME.first->setAxisTitle(
plot.xTITLE +
" # objects");
632 if (
plot.ptME.second)
637 name =
plot.label +
"_pt";
638 title =
plot.pathNAME +
" p_T";
639 int nbins = (
plot.ptBINNING).
size() - 1;
640 std::vector<float> fbinning((
plot.ptBINNING).begin(), (
plot.ptBINNING).
end());
641 float* arr = &fbinning[0];
642 plot.ptME.first = ibooker.book1D(name, title, nbins, arr);
643 plot.ptME.first->setAxisTitle(
plot.xTITLE +
" p_{T} [GeV]");
646 if (
plot.phiME.second)
651 name =
plot.label +
"_phi";
652 title =
plot.pathNAME +
" #phi";
653 int nbins = (
plot.phiBINNING).
size() - 1;
654 std::vector<float> fbinning((
plot.phiBINNING).begin(), (
plot.phiBINNING).
end());
655 float* arr = &fbinning[0];
656 plot.phiME.first = ibooker.book1D(name, title, nbins, arr);
657 plot.phiME.first->setAxisTitle(
plot.xTITLE +
" #phi [rad]");
660 if (
plot.doPlotETA) {
661 if (
plot.etaME.second)
666 name =
plot.label +
"_eta";
667 title =
plot.pathNAME +
" #eta";
668 int nbins = (
plot.etaBINNING).
size() - 1;
669 std::vector<float> fbinning((
plot.etaBINNING).begin(), (
plot.etaBINNING).
end());
670 float* arr = &fbinning[0];
672 plot.etaME.first = ibooker.book1D(name, title, nbins, arr);
673 plot.etaME.first->setAxisTitle(
plot.xTITLE +
" #eta");
676 if (
plot.doPlotMASS) {
677 if (
plot.massME.second)
682 name =
plot.label +
"_mass";
683 title =
plot.pathNAME +
" mass";
684 int nbins = (
plot.massBINNING).
size() - 1;
685 std::vector<float> fbinning((
plot.massBINNING).begin(), (
plot.massBINNING).
end());
686 float* arr = &fbinning[0];
688 plot.massME.first = ibooker.book1D(name, title, nbins, arr);
689 plot.massME.first->setAxisTitle(
plot.xTITLE +
" mass [GeV]");
692 if (
plot.doPlotENERGY) {
693 if (
plot.energyME.second)
698 name =
plot.label +
"_energy";
699 title =
plot.pathNAME +
" energy";
700 int nbins = (
plot.ptBINNING).
size() - 1;
701 std::vector<float> fbinning((
plot.ptBINNING).begin(), (
plot.ptBINNING).
end());
702 float* arr = &fbinning[0];
704 plot.energyME.first = ibooker.book1D(name, title, nbins, arr);
705 plot.energyME.first->setAxisTitle(
plot.xTITLE +
" energy [GeV]");
708 if (
plot.doPlotCSV) {
709 if (
plot.csvME.second)
714 name =
plot.label +
"_csv";
715 title =
plot.pathNAME +
" CSV";
718 plot.csvME.first->setAxisTitle(
plot.xTITLE +
" CSV discriminator");
722 if (
plot.etaVSphiME.second)
727 name =
plot.label +
"_etaVSphi";
728 title =
plot.pathNAME +
" #eta vs #phi";
730 std::vector<float> fbinningX((
plot.etaBINNING).begin(), (
plot.etaBINNING).
end());
731 float* arrX = &fbinningX[0];
734 std::vector<float> fbinningY((
plot.phiBINNING).begin(), (
plot.phiBINNING).
end());
735 float* arrY = &fbinningY[0];
736 plot.etaVSphiME.first = ibooker.book2D(name, title, nbinsX, arrX, nbinsY, arrY);
737 plot.etaVSphiME.first->setAxisTitle(
plot.xTITLE +
" #eta", 1);
738 plot.etaVSphiME.first->setAxisTitle(
plot.xTITLE +
" #phi", 2);
741 if (
plot.doPlotHEP17) {
742 if (
plot.ptMEhep17.second)
747 int nbins = (
plot.ptBINNING).
size() - 1;
748 std::vector<float> fbinning((
plot.ptBINNING).begin(), (
plot.ptBINNING).
end());
749 float* arr = &fbinning[0];
751 name =
plot.label +
"_pt_HEP17";
752 title =
plot.pathNAME +
" p_{T} HEP17";
753 plot.ptMEhep17.first = ibooker.book1D(name, title, nbins, arr);
754 plot.ptMEhep17.first->setAxisTitle(
plot.xTITLE +
" p_{T} [GeV]", 1);
756 if (
plot.ptMEhem17.second)
761 name =
plot.label +
"_pt_HEM17";
762 title =
plot.pathNAME +
" p_{T} HEM17";
763 plot.ptMEhem17.first = ibooker.book1D(name, title, nbins, arr);
764 plot.ptMEhem17.first->setAxisTitle(
plot.xTITLE +
" p_{T} [GeV]", 1);
767 if (
plot.doPlotRazor) {
768 if (
plot.mrME.second)
773 name =
plot.label +
"_mr";
774 title =
plot.pathNAME +
" M_{R}";
775 plot.mrME.first = ibooker.book1D(name, title, 100, 0., 100.);
776 plot.mrME.first->setAxisTitle(
plot.xTITLE +
" M_{R} [GeV]", 1);
778 if (
plot.rsqME.second)
783 name =
plot.label +
"_rsq";
784 title =
plot.pathNAME +
" RSQ";
785 plot.rsqME.first = ibooker.book1D(name, title, 100, 0., 100.);
786 plot.rsqME.first->setAxisTitle(
plot.xTITLE +
" RSQ [GeV]", 1);
789 if (
plot.doPlotDXY) {
790 if (
plot.dxyME.second)
795 name =
plot.label +
"_dxy";
796 title =
plot.pathNAME +
" d_{xy}";
797 int nbins = (
plot.dxyBINNING).
size() - 1;
798 std::vector<float> fbinning((
plot.dxyBINNING).begin(), (
plot.dxyBINNING).
end());
799 float* arr = &fbinning[0];
800 plot.dxyME.first = ibooker.book1D(name, title, nbins, arr);
801 plot.dxyME.first->setAxisTitle(
plot.xTITLE +
" d_{xy} [cm]");
805 if (
plot.dzME.second)
810 name =
plot.label +
"_dz";
811 title =
plot.pathNAME +
" d_{z}";
812 int nbins = (
plot.dzBINNING).
size() - 1;
813 std::vector<float> fbinning((
plot.dzBINNING).begin(), (
plot.dzBINNING).
end());
814 float* arr = &fbinning[0];
815 plot.dzME.first = ibooker.book1D(name, title, nbins, arr);
816 plot.dzME.first->setAxisTitle(
plot.xTITLE +
" d_{z} [cm]");
819 if (
plot.dRME.second)
824 name =
plot.label +
"_dR";
825 title =
plot.pathNAME +
" di-object dR";
826 plot.dRME.first = ibooker.book1D(name, title, 50, 0., 5.);
827 plot.dRME.first->setAxisTitle(
plot.xTITLE +
" dR_{obj,obj}");
829 if (
plot.dRetaVSphiME.second)
834 name =
plot.label +
"_dR_etaVSphi";
835 title =
plot.pathNAME +
" di-object dR in the #eta-#phi plane (of 1st obj)";
836 plot.dRetaVSphiME.first = ibooker.bookProfile2D(name, title, 60, -3., 3., 64, -3.2, 3.2, 0., 5.);
837 plot.dRetaVSphiME.first->setAxisTitle(
plot.xTITLE +
" #eta", 1);
838 plot.dRetaVSphiME.first->setAxisTitle(
plot.xTITLE +
" #phi", 2);
839 plot.dRetaVSphiME.first->setAxisTitle(
plot.xTITLE +
" dR_{obj,obj}", 3);
841 if (
plot.q1q2ME.second)
846 name =
plot.label +
"_q1q2";
847 title =
plot.pathNAME +
" di-object q1xq2";
848 plot.q1q2ME.first = ibooker.book1D(name, title, 3, -1., 1.);
849 plot.q1q2ME.first->setAxisTitle(
plot.xTITLE +
" q_{obj1} x q_{obj2}");
851 if (
plot.doPlotDiMass) {
852 if (
plot.dimassME.second)
857 name =
plot.label +
"_dimass";
858 title =
plot.pathNAME +
" di-object mass";
859 int nbins = (
plot.dimassBINNING).
size() - 1;
860 std::vector<float> fbinning((
plot.dimassBINNING).begin(), (
plot.dimassBINNING).
end());
861 float* arr = &fbinning[0];
862 plot.dimassME.first = ibooker.book1D(name, title, nbins, arr);
863 plot.dimassME.first->setAxisTitle(
plot.xTITLE +
" m_{obj,obj} [GeV]");
868 std::cout <<
"[HLTObjectsMonitor::bookHistograms] DONE" << std::endl;
std::vector< hltPlot > hltPlots_
std::string backupFolder_
std::unordered_map< std::string, int > plotNamesToBins_
const MEbinning csv_binning_
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 * eventsPlot_
virtual void setAxisTitle(const std::string &title, int axis=1)
set x-, y- or z-axis title (axis=1, 2, 3 respectively)