573 std::cout <<
"[HLTObjectsMonitor::bookHistograms]" << std::endl;
582 std::unordered_map<std::string, int> uniqueNames;
587 eventsPlot_ = ibooker.book1D(name, title, nbins, -0.5,
double(nbins) - 0.5);
591 for (
auto const&
p : hltPlots_) {
597 std::cout <<
p.pathNAME <<
" --> bin: " << i << std::endl;
602 for (
auto&
plot : hltPlots_) {
604 std::cout <<
"booking plots for " <<
plot.label << std::endl;
606 if (
plot.pathIDX <= 0) {
608 <<
" is not available in the HLT menu ! no plots are going to be booked for it "
609 "(update DQM/HLTEvF/python/HLTObjectsMonitor_cfi.py)";
613 std::cout <<
"booking histograms for " <<
plot.pathNAME << std::endl;
621 name =
plot.label +
"_nobjects";
622 title =
plot.pathNAME +
" # objects";
623 plot.nME.first = ibooker.book1D(name, title, 20, -0.5, 19.5);
624 plot.nME.first->setAxisTitle(
plot.xTITLE +
" # objects");
627 if (
plot.ptME.second)
632 name =
plot.label +
"_pt";
633 title =
plot.pathNAME +
" p_T";
634 int nbins = (
plot.ptBINNING).
size() - 1;
635 std::vector<float> fbinning((
plot.ptBINNING).begin(), (
plot.ptBINNING).
end());
636 float* arr = &fbinning[0];
637 plot.ptME.first = ibooker.book1D(name, title, nbins, arr);
638 plot.ptME.first->setAxisTitle(
plot.xTITLE +
" p_{T} [GeV]");
641 if (
plot.phiME.second)
646 name =
plot.label +
"_phi";
647 title =
plot.pathNAME +
" #phi";
648 int nbins = (
plot.phiBINNING).
size() - 1;
649 std::vector<float> fbinning((
plot.phiBINNING).begin(), (
plot.phiBINNING).
end());
650 float* arr = &fbinning[0];
651 plot.phiME.first = ibooker.book1D(name, title, nbins, arr);
652 plot.phiME.first->setAxisTitle(
plot.xTITLE +
" #phi [rad]");
655 if (
plot.doPlotETA) {
656 if (
plot.etaME.second)
661 name =
plot.label +
"_eta";
662 title =
plot.pathNAME +
" #eta";
663 int nbins = (
plot.etaBINNING).
size() - 1;
664 std::vector<float> fbinning((
plot.etaBINNING).begin(), (
plot.etaBINNING).
end());
665 float* arr = &fbinning[0];
667 plot.etaME.first = ibooker.book1D(name, title, nbins, arr);
668 plot.etaME.first->setAxisTitle(
plot.xTITLE +
" #eta");
671 if (
plot.doPlotMASS) {
672 if (
plot.massME.second)
677 name =
plot.label +
"_mass";
678 title =
plot.pathNAME +
" mass";
679 int nbins = (
plot.massBINNING).
size() - 1;
680 std::vector<float> fbinning((
plot.massBINNING).begin(), (
plot.massBINNING).
end());
681 float* arr = &fbinning[0];
683 plot.massME.first = ibooker.book1D(name, title, nbins, arr);
684 plot.massME.first->setAxisTitle(
plot.xTITLE +
" mass [GeV]");
687 if (
plot.doPlotENERGY) {
688 if (
plot.energyME.second)
693 name =
plot.label +
"_energy";
694 title =
plot.pathNAME +
" energy";
695 int nbins = (
plot.ptBINNING).
size() - 1;
696 std::vector<float> fbinning((
plot.ptBINNING).begin(), (
plot.ptBINNING).
end());
697 float* arr = &fbinning[0];
699 plot.energyME.first = ibooker.book1D(name, title, nbins, arr);
700 plot.energyME.first->setAxisTitle(
plot.xTITLE +
" energy [GeV]");
703 if (
plot.doPlotCSV) {
704 if (
plot.csvME.second)
709 name =
plot.label +
"_csv";
710 title =
plot.pathNAME +
" CSV";
713 plot.csvME.first->setAxisTitle(
plot.xTITLE +
" CSV discriminator");
717 if (
plot.etaVSphiME.second)
722 name =
plot.label +
"_etaVSphi";
723 title =
plot.pathNAME +
" #eta vs #phi";
724 int nbinsX = (
plot.etaBINNING).
size() - 1;
725 std::vector<float> fbinningX((
plot.etaBINNING).begin(), (
plot.etaBINNING).
end());
726 float* arrX = &fbinningX[0];
727 int nbinsY = (
plot.phiBINNING).
size() - 1;
729 std::vector<float> fbinningY((
plot.phiBINNING).begin(), (
plot.phiBINNING).
end());
730 float* arrY = &fbinningY[0];
731 plot.etaVSphiME.first = ibooker.book2D(name, title, nbinsX, arrX, nbinsY, arrY);
732 plot.etaVSphiME.first->setAxisTitle(
plot.xTITLE +
" #eta", 1);
733 plot.etaVSphiME.first->setAxisTitle(
plot.xTITLE +
" #phi", 2);
736 if (
plot.doPlotHEP17) {
737 if (
plot.ptMEhep17.second)
742 int nbins = (
plot.ptBINNING).
size() - 1;
743 std::vector<float> fbinning((
plot.ptBINNING).begin(), (
plot.ptBINNING).
end());
744 float* arr = &fbinning[0];
746 name =
plot.label +
"_pt_HEP17";
747 title =
plot.pathNAME +
" p_{T} HEP17";
748 plot.ptMEhep17.first = ibooker.book1D(name, title, nbins, arr);
749 plot.ptMEhep17.first->setAxisTitle(
plot.xTITLE +
" p_{T} [GeV]", 1);
751 if (
plot.ptMEhem17.second)
756 name =
plot.label +
"_pt_HEM17";
757 title =
plot.pathNAME +
" p_{T} HEM17";
758 plot.ptMEhem17.first = ibooker.book1D(name, title, nbins, arr);
759 plot.ptMEhem17.first->setAxisTitle(
plot.xTITLE +
" p_{T} [GeV]", 1);
762 if (
plot.doPlotRazor) {
763 if (
plot.mrME.second)
768 name =
plot.label +
"_mr";
769 title =
plot.pathNAME +
" M_{R}";
770 plot.mrME.first = ibooker.book1D(name, title, 100, 0., 100.);
771 plot.mrME.first->setAxisTitle(
plot.xTITLE +
" M_{R} [GeV]", 1);
773 if (
plot.rsqME.second)
778 name =
plot.label +
"_rsq";
779 title =
plot.pathNAME +
" RSQ";
780 plot.rsqME.first = ibooker.book1D(name, title, 100, 0., 100.);
781 plot.rsqME.first->setAxisTitle(
plot.xTITLE +
" RSQ [GeV]", 1);
784 if (
plot.doPlotDXY) {
785 if (
plot.dxyME.second)
790 name =
plot.label +
"_dxy";
791 title =
plot.pathNAME +
" d_{xy}";
792 int nbins = (
plot.dxyBINNING).
size() - 1;
793 std::vector<float> fbinning((
plot.dxyBINNING).begin(), (
plot.dxyBINNING).
end());
794 float* arr = &fbinning[0];
795 plot.dxyME.first = ibooker.book1D(name, title, nbins, arr);
796 plot.dxyME.first->setAxisTitle(
plot.xTITLE +
" d_{xy} [cm]");
800 if (
plot.dzME.second)
805 name =
plot.label +
"_dz";
806 title =
plot.pathNAME +
" d_{z}";
807 int nbins = (
plot.dzBINNING).
size() - 1;
808 std::vector<float> fbinning((
plot.dzBINNING).begin(), (
plot.dzBINNING).
end());
809 float* arr = &fbinning[0];
810 plot.dzME.first = ibooker.book1D(name, title, nbins, arr);
811 plot.dzME.first->setAxisTitle(
plot.xTITLE +
" d_{z} [cm]");
814 if (
plot.dRME.second)
819 name =
plot.label +
"_dR";
820 title =
plot.pathNAME +
" di-object dR";
821 plot.dRME.first = ibooker.book1D(name, title, 50, 0., 5.);
822 plot.dRME.first->setAxisTitle(
plot.xTITLE +
" dR_{obj,obj}");
824 if (
plot.dRetaVSphiME.second)
829 name =
plot.label +
"_dR_etaVSphi";
830 title =
plot.pathNAME +
" di-object dR in the #eta-#phi plane (of 1st obj)";
831 plot.dRetaVSphiME.first = ibooker.bookProfile2D(name, title, 60, -3., 3., 64, -3.2, 3.2, 0., 5.);
832 plot.dRetaVSphiME.first->setAxisTitle(
plot.xTITLE +
" #eta", 1);
833 plot.dRetaVSphiME.first->setAxisTitle(
plot.xTITLE +
" #phi", 2);
834 plot.dRetaVSphiME.first->setAxisTitle(
plot.xTITLE +
" dR_{obj,obj}", 3);
836 if (
plot.q1q2ME.second)
841 name =
plot.label +
"_q1q2";
842 title =
plot.pathNAME +
" di-object q1xq2";
843 plot.q1q2ME.first = ibooker.book1D(name, title, 3, -1., 1.);
844 plot.q1q2ME.first->setAxisTitle(
plot.xTITLE +
" q_{obj1} x q_{obj2}");
846 if (
plot.doPlotDiMass) {
847 if (
plot.dimassME.second)
852 name =
plot.label +
"_dimass";
853 title =
plot.pathNAME +
" di-object mass";
854 int nbins = (
plot.dimassBINNING).
size() - 1;
855 std::vector<float> fbinning((
plot.dimassBINNING).begin(), (
plot.dimassBINNING).
end());
856 float* arr = &fbinning[0];
857 plot.dimassME.first = ibooker.book1D(name, title, nbins, arr);
858 plot.dimassME.first->setAxisTitle(
plot.xTITLE +
" m_{obj,obj} [GeV]");
863 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_
tuple size
Write out results.
virtual void setAxisTitle(const std::string &title, int axis=1)
set x-, y- or z-axis title (axis=1, 2, 3 respectively)