594 std::cout <<
"[HLTObjectsMonitor::bookHistograms]" << std::endl;
603 std::unordered_map<std::string,int> uniqueNames;
608 eventsPlot_ = ibooker.book1D(name,title,nbins,-0.5,
double(nbins)-0.5);
612 for (
auto const&
p : hltPlots_) {
618 std::cout <<
p.pathNAME <<
" --> bin: " << i << std::endl;
623 for (
auto &
plot : hltPlots_) {
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";
654 int nbins = (
plot.ptBINNING).
size()-1;
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;
std::vector< hltPlot > hltPlots_
std::string backupFolder_
std::unordered_map< std::string, int > plotNamesToBins_
const MEbinning csv_binning_
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_
void setAxisTitle(const std::string &title, int axis=1)
set x-, y- or z-axis title (axis=1, 2, 3 respectively)