588 std::cout <<
"[HLTObjectsMonitor::bookHistograms]" << std::endl;
595 eventsPlot_ = ibooker.book1D(name,title,nbins,-0.5,
double(nbins)-0.5);
597 for (
int i=0; i<
nbins; i++ ) {
606 std::cout <<
"booking plots for " <<
plot.label << std::endl;
608 if (
plot.pathIDX <= 0 ) {
609 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)";
613 std::cout <<
"booking histograms for " <<
plot.pathNAME << std::endl;
616 if (
plot.nME.second )
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]");
642 if (
plot.phiME.second )
647 name =
plot.label+
"_phi";
648 title =
plot.pathNAME+
" #phi";
649 int nbins = (
plot.phiBINNING).
size()-1;
650 std::vector<float> fbinning((
plot.phiBINNING).begin(),(
plot.phiBINNING).
end());
651 float* arr = &fbinning[0];
652 plot.phiME.first = ibooker.book1D(name,title,nbins,arr);
653 plot.phiME.first->setAxisTitle(
plot.xTITLE+
" #phi [rad]");
656 if (
plot.doPlotETA ) {
657 if (
plot.etaME.second )
662 name =
plot.label+
"_eta";
663 title =
plot.pathNAME+
" #eta";
664 int nbins = (
plot.etaBINNING).
size()-1;
665 std::vector<float> fbinning((
plot.etaBINNING).begin(),(
plot.etaBINNING).
end());
666 float* arr = &fbinning[0];
668 plot.etaME.first = ibooker.book1D(name,title,nbins,arr);
669 plot.etaME.first->setAxisTitle(
plot.xTITLE+
" #eta");
672 if (
plot.doPlotMASS ) {
673 if (
plot.massME.second )
678 name =
plot.label+
"_mass";
679 title =
plot.pathNAME+
" mass";
680 int nbins = (
plot.massBINNING).
size()-1;
681 std::vector<float> fbinning((
plot.massBINNING).begin(),(
plot.massBINNING).
end());
682 float* arr = &fbinning[0];
684 plot.massME.first = ibooker.book1D(name,title,nbins,arr);
685 plot.massME.first->setAxisTitle(
plot.xTITLE+
" mass [GeV]");
688 if (
plot.doPlotENERGY ) {
689 if (
plot.energyME.second )
694 name =
plot.label+
"_energy";
695 title =
plot.pathNAME+
" energy";
696 int nbins = (
plot.ptBINNING).
size()-1;
697 std::vector<float> fbinning((
plot.ptBINNING).begin(),(
plot.ptBINNING).
end());
698 float* arr = &fbinning[0];
700 plot.energyME.first = ibooker.book1D(name,title,nbins,arr);
701 plot.energyME.first->setAxisTitle(
plot.xTITLE+
" energy [GeV]");
704 if (
plot.doPlotCSV ) {
705 if (
plot.csvME.second )
710 name =
plot.label+
"_csv";
711 title =
plot.pathNAME+
" CSV";
714 plot.csvME.first->setAxisTitle(
plot.xTITLE+
" CSV discriminator");
717 if (
plot.doPlot2D ) {
718 if (
plot.etaVSphiME.second )
723 name =
plot.label+
"_etaVSphi";
724 title =
plot.pathNAME+
" #eta vs #phi";
725 int nbinsX = (
plot.etaBINNING).
size()-1;
726 std::vector<float> fbinningX((
plot.etaBINNING).begin(),(
plot.etaBINNING).
end());
727 float* arrX = &fbinningX[0];
728 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 ) {
738 if (
plot.ptMEhep17.second )
743 int nbins = (
plot.ptBINNING).
size()-1;
744 std::vector<float> fbinning((
plot.ptBINNING).begin(),(
plot.ptBINNING).
end());
745 float* arr = &fbinning[0];
747 name =
plot.label+
"_pt_HEP17";
748 title =
plot.pathNAME+
" p_{T} HEP17";
749 plot.ptMEhep17.first = ibooker.book1D(name,title,nbins,arr);
750 plot.ptMEhep17.first->setAxisTitle(
plot.xTITLE+
" p_{T} [GeV]",1);
752 if (
plot.ptMEhem17.second )
757 name =
plot.label+
"_pt_HEM17";
758 title =
plot.pathNAME+
" p_{T} HEM17";
759 plot.ptMEhem17.first = ibooker.book1D(name,title,nbins,arr);
760 plot.ptMEhem17.first->setAxisTitle(
plot.xTITLE+
" p_{T} [GeV]",1);
763 if (
plot.doPlotRazor ) {
764 if (
plot.mrME.second )
769 name =
plot.label+
"_mr";
770 title =
plot.pathNAME+
" M_{R}";
771 plot.mrME.first = ibooker.book1D(name,title,100,0.,100.);
772 plot.mrME.first->setAxisTitle(
plot.xTITLE+
" M_{R} [GeV]",1);
774 if (
plot.rsqME.second )
779 name =
plot.label+
"_rsq";
780 title =
plot.pathNAME+
" RSQ";
781 plot.rsqME.first = ibooker.book1D(name,title,100,0.,100.);
782 plot.rsqME.first->setAxisTitle(
plot.xTITLE+
" RSQ [GeV]",1);
786 if (
plot.doPlotDXY ) {
788 if (
plot.dxyME.second )
793 name =
plot.label+
"_dxy";
794 title =
plot.pathNAME+
" d_{xy}";
795 int nbins = (
plot.dxyBINNING).
size()-1;
796 std::vector<float> fbinning((
plot.dxyBINNING).begin(),(
plot.dxyBINNING).
end());
797 float* arr = &fbinning[0];
798 plot.dxyME.first = ibooker.book1D(name,title,nbins,arr);
799 plot.dxyME.first->setAxisTitle(
plot.xTITLE+
" d_{xy} [cm]");
803 if (
plot.doPlotDZ ) {
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]");
820 if (
plot.dRME.second )
825 name =
plot.label+
"_dR";
826 title =
plot.pathNAME+
" di-object dR";
827 plot.dRME.first = ibooker.book1D(name,title,50,0.,5.);
828 plot.dRME.first->setAxisTitle(
plot.xTITLE+
" dR_{obj,obj}");
830 if (
plot.dRetaVSphiME.second )
835 name =
plot.label+
"_dR_etaVSphi";
836 title =
plot.pathNAME+
" di-object dR in the #eta-#phi plane (of 1st obj)";
837 plot.dRetaVSphiME.first = ibooker.bookProfile2D(name,title,60,-3.,3.,64,-3.2,3.2,0.,5.);
838 plot.dRetaVSphiME.first->setAxisTitle(
plot.xTITLE+
" #eta",1);
839 plot.dRetaVSphiME.first->setAxisTitle(
plot.xTITLE+
" #phi",2);
840 plot.dRetaVSphiME.first->setAxisTitle(
plot.xTITLE+
" dR_{obj,obj}",3);
842 if (
plot.q1q2ME.second )
847 name =
plot.label+
"_q1q2";
848 title =
plot.pathNAME+
" di-object q1xq2";
849 plot.q1q2ME.first = ibooker.book1D(name,title,3,-1.,1.);
850 plot.q1q2ME.first->setAxisTitle(
plot.xTITLE+
" q_{obj1} x q_{obj2}");
852 if (
plot.doPlotDiMass ) {
854 if (
plot.dimassME.second )
859 name =
plot.label+
"_dimass";
860 title =
plot.pathNAME+
" di-object mass";
861 int nbins = (
plot.dimassBINNING).
size()-1;
862 std::vector<float> fbinning((
plot.dimassBINNING).begin(),(
plot.dimassBINNING).
end());
863 float* arr = &fbinning[0];
864 plot.dimassME.first = ibooker.book1D(name,title,nbins,arr);
865 plot.dimassME.first->setAxisTitle(
plot.xTITLE+
" m_{obj,obj} [GeV]");
871 std::cout <<
"[HLTObjectsMonitor::bookHistograms] DONE" << std::endl;
std::vector< hltPlot > hltPlots_
std::string backupFolder_
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)