Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2022-01-24 01:11:31

0001 
0002 /*
0003  *  See header file for a description of this class.
0004  *
0005  *  \author:  Mia Tosi,40 3-B32,+41227671609 
0006  */
0007 
0008 #include "FWCore/MessageLogger/interface/MessageLogger.h"
0009 #include "FWCore/Utilities/interface/InputTag.h"
0010 #include "DQMServices/Core/interface/DQMStore.h"
0011 #include "DQM/TrackingMonitor/interface/VertexMonitor.h"
0012 #include "DQM/TrackingMonitor/interface/GetLumi.h"
0013 #include "TMath.h"
0014 
0015 VertexMonitor::VertexMonitor(const edm::ParameterSet& iConfig,
0016                              const edm::InputTag& primaryVertexInputTag,
0017                              const edm::InputTag& selectedPrimaryVertexInputTag,
0018                              std::string pvLabel)
0019     : conf_(iConfig),
0020       primaryVertexInputTag_(primaryVertexInputTag),
0021       selectedPrimaryVertexInputTag_(selectedPrimaryVertexInputTag),
0022       label_(pvLabel),
0023       NumberOfPVtx(nullptr),
0024       NumberOfPVtxVsBXlumi(nullptr),
0025       NumberOfPVtxVsGoodPVtx(nullptr),
0026       NumberOfGoodPVtx(nullptr),
0027       NumberOfGoodPVtxVsBXlumi(nullptr),
0028       FractionOfGoodPVtx(nullptr),
0029       FractionOfGoodPVtxVsBXlumi(nullptr),
0030       FractionOfGoodPVtxVsGoodPVtx(nullptr),
0031       FractionOfGoodPVtxVsPVtx(nullptr),
0032       NumberOfBADndofPVtx(nullptr),
0033       NumberOfBADndofPVtxVsBXlumi(nullptr),
0034       NumberOfBADndofPVtxVsGoodPVtx(nullptr),
0035       GoodPVtxSumPt(nullptr),
0036       GoodPVtxSumPtVsBXlumi(nullptr),
0037       GoodPVtxSumPtVsGoodPVtx(nullptr),
0038       GoodPVtxNumberOfTracks(nullptr),
0039       GoodPVtxNumberOfTracksVsBXlumi(nullptr),
0040       GoodPVtxNumberOfTracksVsGoodPVtx(nullptr),
0041       GoodPVtxNumberOfTracksVsGoodPVtxNdof(nullptr),
0042       GoodPVtxChi2oNDFVsGoodPVtx(nullptr),
0043       GoodPVtxChi2oNDFVsBXlumi(nullptr),
0044       GoodPVtxChi2ProbVsGoodPVtx(nullptr),
0045       GoodPVtxChi2ProbVsBXlumi(nullptr),
0046       doAllPlots_(conf_.getParameter<bool>("doAllPlots")),
0047       doPlotsVsBXlumi_(conf_.getParameter<bool>("doPlotsVsBXlumi")),
0048       doPlotsVsGoodPVtx_(conf_.getParameter<bool>("doPlotsVsGoodPVtx"))
0049 
0050 {
0051   //now do what ever initialization is needed
0052   if (doPlotsVsBXlumi_)
0053     lumiDetails_ = new GetLumi(iConfig.getParameter<edm::ParameterSet>("BXlumiSetup"));
0054 }
0055 
0056 VertexMonitor::VertexMonitor(const edm::ParameterSet& iConfig,
0057                              const edm::InputTag& primaryVertexInputTag,
0058                              const edm::InputTag& selectedPrimaryVertexInputTag,
0059                              std::string pvLabel,
0060                              edm::ConsumesCollector& iC)
0061     : VertexMonitor(iConfig, primaryVertexInputTag, selectedPrimaryVertexInputTag, pvLabel) {
0062   if (doPlotsVsBXlumi_)
0063     lumiDetails_ = new GetLumi(iConfig.getParameter<edm::ParameterSet>("BXlumiSetup"), iC);
0064 
0065   pvToken_ = iC.consumes<reco::VertexCollection>(primaryVertexInputTag_);
0066   selpvToken_ = iC.consumes<reco::VertexCollection>(selectedPrimaryVertexInputTag_);
0067 }
0068 
0069 VertexMonitor::~VertexMonitor() = default;
0070 
0071 //
0072 // member functions
0073 //
0074 
0075 // -- Analyse
0076 // ------------ method called for each event  ------------
0077 // ------------------------------------------------------- //
0078 void VertexMonitor::analyze(const edm::Event& iEvent, const edm::EventSetup& iSetup) {
0079   double bxlumi = 0.;
0080   if (doPlotsVsBXlumi_)
0081     bxlumi = lumiDetails_->getValue(iEvent);
0082   //  std::cout << "bxlumi : " << bxlumi << std::endl;
0083 
0084   size_t totalNumPV = 0;
0085   size_t totalNumBADndofPV = 0;
0086   edm::Handle<reco::VertexCollection> pvHandle = iEvent.getHandle(pvToken_);
0087   if (pvHandle.isValid()) {
0088     totalNumPV = pvHandle->size();
0089     //      std::cout << "totalNumPV : " << totalNumPV << std::endl;
0090     for (reco::VertexCollection::const_iterator pv = pvHandle->begin(); pv != pvHandle->end(); ++pv) {
0091       //--- count pv w/ ndof < 4
0092       if (pv->ndof() < 4.)
0093         totalNumBADndofPV++;
0094     }
0095   } else
0096     return;
0097   NumberOfPVtx->Fill(totalNumPV);
0098   NumberOfBADndofPVtx->Fill(totalNumBADndofPV);
0099   if (doPlotsVsBXlumi_) {
0100     NumberOfPVtxVsBXlumi->Fill(bxlumi, totalNumPV);
0101     NumberOfBADndofPVtxVsBXlumi->Fill(bxlumi, totalNumBADndofPV);
0102   }
0103 
0104   size_t totalNumGoodPV = 0;
0105   edm::Handle<reco::VertexCollection> selpvHandle = iEvent.getHandle(selpvToken_);
0106   if (selpvHandle.isValid())
0107     totalNumGoodPV = selpvHandle->size();
0108   else
0109     return;
0110   //  std::cout << "totalNumGoodPV: " << totalNumGoodPV << std::endl;
0111   if (doPlotsVsGoodPVtx_) {
0112     NumberOfPVtxVsGoodPVtx->Fill(totalNumGoodPV, totalNumPV);
0113     NumberOfBADndofPVtxVsGoodPVtx->Fill(totalNumGoodPV, totalNumBADndofPV);
0114   }
0115 
0116   double fracGoodPV = double(totalNumGoodPV) / double(totalNumPV);
0117   //  std::cout << "fracGoodPV: " << fracGoodPV << std::endl;
0118 
0119   NumberOfGoodPVtx->Fill(totalNumGoodPV);
0120   FractionOfGoodPVtx->Fill(fracGoodPV);
0121   if (doPlotsVsBXlumi_) {
0122     NumberOfGoodPVtxVsBXlumi->Fill(bxlumi, totalNumGoodPV);
0123     FractionOfGoodPVtxVsBXlumi->Fill(bxlumi, fracGoodPV);
0124   }
0125   if (doPlotsVsGoodPVtx_) {
0126     FractionOfGoodPVtxVsGoodPVtx->Fill(totalNumGoodPV, fracGoodPV);
0127     FractionOfGoodPVtxVsPVtx->Fill(totalNumPV, fracGoodPV);
0128   }
0129 
0130   if (!selpvHandle->empty()) {
0131     double sumpt = 0;
0132     size_t ntracks = 0;
0133     double chi2ndf = 0.;
0134     double chi2prob = 0.;
0135 
0136     if (!selpvHandle->at(0).isFake()) {
0137       reco::Vertex pv = selpvHandle->at(0);
0138 
0139       ntracks = pv.tracksSize();
0140       chi2ndf = pv.normalizedChi2();
0141       chi2prob = TMath::Prob(pv.chi2(), (int)pv.ndof());
0142 
0143       for (reco::Vertex::trackRef_iterator itrk = pv.tracks_begin(); itrk != pv.tracks_end(); ++itrk) {
0144         double pt = (**itrk).pt();
0145         sumpt += pt * pt;
0146       }
0147       GoodPVtxSumPt->Fill(sumpt);
0148       GoodPVtxNumberOfTracks->Fill(ntracks);
0149 
0150       if (doPlotsVsBXlumi_) {
0151         GoodPVtxSumPtVsBXlumi->Fill(bxlumi, sumpt);
0152         GoodPVtxNumberOfTracksVsBXlumi->Fill(bxlumi, ntracks);
0153         GoodPVtxChi2oNDFVsBXlumi->Fill(bxlumi, chi2ndf);
0154         GoodPVtxChi2ProbVsBXlumi->Fill(bxlumi, chi2prob);
0155       }
0156       if (doPlotsVsGoodPVtx_) {
0157         GoodPVtxSumPtVsGoodPVtx->Fill(totalNumGoodPV, sumpt);
0158         GoodPVtxNumberOfTracksVsGoodPVtx->Fill(totalNumGoodPV, ntracks);
0159         GoodPVtxChi2oNDFVsGoodPVtx->Fill(totalNumGoodPV, chi2ndf);
0160         GoodPVtxChi2ProbVsGoodPVtx->Fill(totalNumGoodPV, chi2prob);
0161       }
0162     }
0163   }
0164 }
0165 
0166 // ------------ method called once each job just before starting event loop  ------------
0167 void VertexMonitor::initHisto(DQMStore::IBooker& ibooker) {
0168   // parameters from the configuration
0169   std::string MEFolderName = conf_.getParameter<std::string>("PVFolderName");
0170 
0171   // get binning from the configuration
0172   edm::ParameterSet ParametersGoodPVtx = conf_.getParameter<edm::ParameterSet>("GoodPVtx");
0173   int GoodPVtxBin = ParametersGoodPVtx.getParameter<int>("GoodPVtxBin");
0174   double GoodPVtxMin = ParametersGoodPVtx.getParameter<double>("GoodPVtxMin");
0175   double GoodPVtxMax = ParametersGoodPVtx.getParameter<double>("GoodPVtxMax");
0176 
0177   edm::ParameterSet ParametersNTrkPVtx = conf_.getParameter<edm::ParameterSet>("NTrkPVtx");
0178   int NTrkPVtxBin = ParametersNTrkPVtx.getParameter<int>("NTrkPVtxBin");
0179   double NTrkPVtxMin = ParametersNTrkPVtx.getParameter<double>("NTrkPVtxMin");
0180   double NTrkPVtxMax = ParametersNTrkPVtx.getParameter<double>("NTrkPVtxMax");
0181 
0182   edm::ParameterSet ParametersSumPtPVtx = conf_.getParameter<edm::ParameterSet>("SumPtPVtx");
0183   int SumPtPVtxBin = ParametersSumPtPVtx.getParameter<int>("SumPtPVtxBin");
0184   double SumPtPVtxMin = ParametersSumPtPVtx.getParameter<double>("SumPtPVtxMin");
0185   double SumPtPVtxMax = ParametersSumPtPVtx.getParameter<double>("SumPtPVtxMax");
0186 
0187   // book histo
0188   // ----------------------//
0189   ibooker.setCurrentFolder(MEFolderName + "/" + label_);
0190 
0191   histname = "NumberOfPVtx_" + label_;
0192   NumberOfPVtx = ibooker.book1D(histname, histname, GoodPVtxBin, GoodPVtxMin, GoodPVtxMax);
0193   NumberOfPVtx->setAxisTitle("Number of PV", 1);
0194   NumberOfPVtx->setAxisTitle("Number of Events", 2);
0195 
0196   histname = "NumberOfGoodPVtx_" + label_;
0197   NumberOfGoodPVtx = ibooker.book1D(histname, histname, GoodPVtxBin, GoodPVtxMin, GoodPVtxMax);
0198   NumberOfGoodPVtx->setAxisTitle("Number of Good PV", 1);
0199   NumberOfGoodPVtx->setAxisTitle("Number of Events", 2);
0200 
0201   histname = "FractionOfGoodPVtx_" + label_;
0202   FractionOfGoodPVtx = ibooker.book1D(histname, histname, 100, 0., 1.);
0203   FractionOfGoodPVtx->setAxisTitle("fraction of Good PV", 1);
0204   FractionOfGoodPVtx->setAxisTitle("Number of Events", 2);
0205 
0206   histname = "NumberOfBADndofPVtx_" + label_;
0207   NumberOfBADndofPVtx = ibooker.book1D(histname, histname, GoodPVtxBin, GoodPVtxMin, GoodPVtxMax);
0208   NumberOfBADndofPVtx->setAxisTitle("Number of BADndof #PV", 1);
0209   NumberOfBADndofPVtx->setAxisTitle("Number of Events", 2);
0210 
0211   histname = "GoodPVtxSumPt_" + label_;
0212   GoodPVtxSumPt = ibooker.book1D(histname, histname, SumPtPVtxBin, SumPtPVtxMin, SumPtPVtxMax);
0213   GoodPVtxSumPt->setAxisTitle("primary vertex #Sum p_{T}^{2} [GeV^{2}/c^{2}]", 1);
0214   GoodPVtxSumPt->setAxisTitle("Number of events", 2);
0215 
0216   histname = "GoodPVtxNumberOfTracks_" + label_;
0217   GoodPVtxNumberOfTracks = ibooker.book1D(histname, histname, NTrkPVtxBin, NTrkPVtxMin, NTrkPVtxMax);
0218   GoodPVtxNumberOfTracks->setAxisTitle("primary vertex number of tracks", 1);
0219   GoodPVtxNumberOfTracks->setAxisTitle("Number of events", 2);
0220 
0221   if (doPlotsVsBXlumi_) {
0222     // get binning from the configuration
0223     edm::ParameterSet BXlumiParameters = conf_.getParameter<edm::ParameterSet>("BXlumiSetup");
0224     int BXlumiBin = BXlumiParameters.getParameter<int>("BXlumiBin");
0225     double BXlumiMin = BXlumiParameters.getParameter<double>("BXlumiMin");
0226     double BXlumiMax = BXlumiParameters.getParameter<double>("BXlumiMax");
0227 
0228     ibooker.setCurrentFolder(MEFolderName + "/" + label_ + "/PUmonitoring/");
0229 
0230     histname = "NumberOfPVtxVsBXlumi_" + label_;
0231     NumberOfPVtxVsBXlumi =
0232         ibooker.bookProfile(histname, histname, BXlumiBin, BXlumiMin, BXlumiMax, GoodPVtxMin, GoodPVtxMax * 3, "");
0233     NumberOfPVtxVsBXlumi->getTH1()->SetCanExtend(TH1::kAllAxes);
0234     NumberOfPVtxVsBXlumi->setAxisTitle("lumi BX [10^{30}Hzcm^{-2}]", 1);
0235     NumberOfPVtxVsBXlumi->setAxisTitle("Mean number of PV", 2);
0236 
0237     histname = "NumberOfGoodPVtxVsBXlumi_" + label_;
0238     NumberOfGoodPVtxVsBXlumi =
0239         ibooker.bookProfile(histname, histname, BXlumiBin, BXlumiMin, BXlumiMax, GoodPVtxMin, GoodPVtxMax * 3, "");
0240     NumberOfGoodPVtxVsBXlumi->getTH1()->SetCanExtend(TH1::kAllAxes);
0241     NumberOfGoodPVtxVsBXlumi->setAxisTitle("lumi BX [10^{30}Hzcm^{-2}]", 1);
0242     NumberOfGoodPVtxVsBXlumi->setAxisTitle("Mean number of PV", 2);
0243 
0244     histname = "FractionOfGoodPVtxVsBXlumi_" + label_;
0245     FractionOfGoodPVtxVsBXlumi = ibooker.bookProfile(histname, histname, BXlumiBin, BXlumiMin, BXlumiMax, 0., 1.5, "");
0246     FractionOfGoodPVtxVsBXlumi->getTH1()->SetCanExtend(TH1::kAllAxes);
0247     FractionOfGoodPVtxVsBXlumi->setAxisTitle("lumi BX [10^{30}Hzcm^{-2}]", 1);
0248     FractionOfGoodPVtxVsBXlumi->setAxisTitle("Mean number of PV", 2);
0249 
0250     histname = "NumberOfBADndofPVtxVsBXlumi_" + label_;
0251     NumberOfBADndofPVtxVsBXlumi =
0252         ibooker.bookProfile(histname, histname, BXlumiBin, BXlumiMin, BXlumiMax, GoodPVtxMin, GoodPVtxMax * 3, "");
0253     NumberOfBADndofPVtxVsBXlumi->getTH1()->SetCanExtend(TH1::kAllAxes);
0254     NumberOfBADndofPVtxVsBXlumi->setAxisTitle("BADndof #PV", 1);
0255     NumberOfBADndofPVtxVsBXlumi->setAxisTitle("Number of Events", 2);
0256 
0257     histname = "GoodPVtxSumPtVsBXlumi_" + label_;
0258     GoodPVtxSumPtVsBXlumi =
0259         ibooker.bookProfile(histname, histname, BXlumiBin, BXlumiMin, BXlumiMax, SumPtPVtxMin, SumPtPVtxMax * 3, "");
0260     GoodPVtxSumPtVsBXlumi->getTH1()->SetCanExtend(TH1::kAllAxes);
0261     GoodPVtxSumPtVsBXlumi->setAxisTitle("lumi BX [10^{30}Hzcm^{-2}]", 1);
0262     GoodPVtxSumPtVsBXlumi->setAxisTitle("Mean pv #Sum p_{T}^{2} [GeV^{2}/c]^{2}", 2);
0263 
0264     histname = "GoodPVtxNumberOfTracksVsBXlumi_" + label_;
0265     GoodPVtxNumberOfTracksVsBXlumi =
0266         ibooker.bookProfile(histname, histname, BXlumiBin, BXlumiMin, BXlumiMax, NTrkPVtxMin, NTrkPVtxMax * 3, "");
0267     GoodPVtxNumberOfTracksVsBXlumi->getTH1()->SetCanExtend(TH1::kAllAxes);
0268     GoodPVtxNumberOfTracksVsBXlumi->setAxisTitle("lumi BX [10^{30}Hzcm^{-2}]", 1);
0269     GoodPVtxNumberOfTracksVsBXlumi->setAxisTitle("Mean pv number of tracks", 2);
0270 
0271     // get binning from the configuration
0272     double Chi2NDFMin = conf_.getParameter<double>("Chi2NDFMin");
0273     double Chi2NDFMax = conf_.getParameter<double>("Chi2NDFMax");
0274 
0275     double Chi2ProbMin = conf_.getParameter<double>("Chi2ProbMin");
0276     double Chi2ProbMax = conf_.getParameter<double>("Chi2ProbMax");
0277 
0278     histname = "Chi2oNDFVsBXlumi_" + label_;
0279     Chi2oNDFVsBXlumi =
0280         ibooker.bookProfile(histname, histname, BXlumiBin, BXlumiMin, BXlumiMax, Chi2NDFMin, Chi2NDFMax * 3, "");
0281     Chi2oNDFVsBXlumi->getTH1()->SetCanExtend(TH1::kAllAxes);
0282     Chi2oNDFVsBXlumi->setAxisTitle("lumi BX [10^{30}Hzcm^{-2}]", 1);
0283     Chi2oNDFVsBXlumi->setAxisTitle("Mean #chi^{2}/ndof", 2);
0284 
0285     histname = "Chi2ProbVsBXlumi_" + label_;
0286     Chi2ProbVsBXlumi =
0287         ibooker.bookProfile(histname, histname, BXlumiBin, BXlumiMin, BXlumiMax, Chi2ProbMin, Chi2ProbMax * 3, "");
0288     Chi2ProbVsBXlumi->getTH1()->SetCanExtend(TH1::kAllAxes);
0289     Chi2ProbVsBXlumi->setAxisTitle("lumi BX [10^{30}Hzcm^{-2}]", 1);
0290     Chi2ProbVsBXlumi->setAxisTitle("Mean #chi^{2}/prob", 2);
0291 
0292     histname = "GoodPVtxChi2oNDFVsBXlumi_" + label_;
0293     GoodPVtxChi2oNDFVsBXlumi =
0294         ibooker.bookProfile(histname, histname, BXlumiBin, BXlumiMin, BXlumiMax, Chi2NDFMin, Chi2NDFMax, "");
0295     GoodPVtxChi2oNDFVsBXlumi->getTH1()->SetCanExtend(TH1::kAllAxes);
0296     GoodPVtxChi2oNDFVsBXlumi->setAxisTitle("lumi BX [10^{30}Hzcm^{-2}]", 1);
0297     GoodPVtxChi2oNDFVsBXlumi->setAxisTitle("Mean PV #chi^{2}/ndof", 2);
0298 
0299     histname = "GoodPVtxChi2ProbVsBXlumi_" + label_;
0300     GoodPVtxChi2ProbVsBXlumi =
0301         ibooker.bookProfile(histname, histname, BXlumiBin, BXlumiMin, BXlumiMax, Chi2ProbMin, Chi2ProbMax * 3, "");
0302     GoodPVtxChi2ProbVsBXlumi->getTH1()->SetCanExtend(TH1::kAllAxes);
0303     GoodPVtxChi2ProbVsBXlumi->setAxisTitle("lumi BX [10^{30}Hzcm^{-2}]", 1);
0304     GoodPVtxChi2ProbVsBXlumi->setAxisTitle("Mean PV #chi^{2}/prob", 2);
0305   }
0306 
0307   if (doPlotsVsGoodPVtx_) {
0308     ibooker.setCurrentFolder(MEFolderName + "/" + label_ + "/PUmonitoring/VsGoodPVtx");
0309 
0310     histname = "NumberOfPVtxVsGoodPVtx_" + label_;
0311     NumberOfPVtxVsGoodPVtx = ibooker.bookProfile(
0312         histname, histname, GoodPVtxBin, GoodPVtxMin, GoodPVtxMax, GoodPVtxMin, GoodPVtxMax * 3, "");
0313     NumberOfPVtxVsGoodPVtx->getTH1()->SetCanExtend(TH1::kAllAxes);
0314     NumberOfPVtxVsGoodPVtx->setAxisTitle("Number of Good PV", 1);
0315     NumberOfPVtxVsGoodPVtx->setAxisTitle("Mean number of PV", 2);
0316 
0317     histname = "FractionOfGoodPVtxVsGoodPVtx_" + label_;
0318     FractionOfGoodPVtxVsGoodPVtx = ibooker.bookProfile(
0319         histname, histname, GoodPVtxBin, GoodPVtxMin, GoodPVtxMax, GoodPVtxMin, GoodPVtxMax * 3, "");
0320     FractionOfGoodPVtxVsGoodPVtx->getTH1()->SetCanExtend(TH1::kAllAxes);
0321     FractionOfGoodPVtxVsGoodPVtx->setAxisTitle("Number of Good PV", 1);
0322     FractionOfGoodPVtxVsGoodPVtx->setAxisTitle("Mean fraction of Good PV", 2);
0323 
0324     histname = "FractionOfGoodPVtxVsPVtx_" + label_;
0325     FractionOfGoodPVtxVsPVtx = ibooker.bookProfile(
0326         histname, histname, GoodPVtxBin, GoodPVtxMin, GoodPVtxMax, GoodPVtxMin, GoodPVtxMax * 3, "");
0327     FractionOfGoodPVtxVsPVtx->getTH1()->SetCanExtend(TH1::kAllAxes);
0328     FractionOfGoodPVtxVsPVtx->setAxisTitle("Number of Good PV", 1);
0329     FractionOfGoodPVtxVsPVtx->setAxisTitle("Mean number of Good PV", 2);
0330 
0331     histname = "NumberOfBADndofPVtxVsGoodPVtx_" + label_;
0332     NumberOfBADndofPVtxVsGoodPVtx = ibooker.bookProfile(
0333         histname, histname, GoodPVtxBin, GoodPVtxMin, GoodPVtxMax, GoodPVtxMin, GoodPVtxMax * 3, "");
0334     NumberOfBADndofPVtxVsGoodPVtx->getTH1()->SetCanExtend(TH1::kAllAxes);
0335     NumberOfBADndofPVtxVsGoodPVtx->setAxisTitle("Number of Good PV", 1);
0336     NumberOfBADndofPVtxVsGoodPVtx->setAxisTitle("Mean Number of BAD PV", 2);
0337 
0338     histname = "GoodPVtxSumPtVsGoodPVtx_" + label_;
0339     GoodPVtxSumPtVsGoodPVtx = ibooker.bookProfile(
0340         histname, histname, GoodPVtxBin, GoodPVtxMin, GoodPVtxMax, SumPtPVtxMin, SumPtPVtxMax * 3, "");
0341     GoodPVtxSumPtVsGoodPVtx->getTH1()->SetCanExtend(TH1::kAllAxes);
0342     GoodPVtxSumPtVsGoodPVtx->setAxisTitle("Number of Good PV", 1);
0343     GoodPVtxSumPtVsGoodPVtx->setAxisTitle("Mean pv #Sum p_{T}^{2} [GeV^{2}/c]^{2}", 2);
0344 
0345     histname = "GoodPVtxNumberOfTracksVsGoodPVtx_" + label_;
0346     GoodPVtxNumberOfTracksVsGoodPVtx = ibooker.bookProfile(
0347         histname, histname, GoodPVtxBin, GoodPVtxMin, GoodPVtxMax, NTrkPVtxMin, NTrkPVtxMax * 3, "");
0348     GoodPVtxNumberOfTracksVsGoodPVtx->getTH1()->SetCanExtend(TH1::kAllAxes);
0349     GoodPVtxNumberOfTracksVsGoodPVtx->setAxisTitle("Number of Good PV", 1);
0350     GoodPVtxNumberOfTracksVsGoodPVtx->setAxisTitle("Mean pv number of tracks", 2);
0351 
0352     // get binning from the configuration
0353     double Chi2NDFMin = conf_.getParameter<double>("Chi2NDFMin");
0354     double Chi2NDFMax = conf_.getParameter<double>("Chi2NDFMax");
0355 
0356     double Chi2ProbMin = conf_.getParameter<double>("Chi2ProbMin");
0357     double Chi2ProbMax = conf_.getParameter<double>("Chi2ProbMax");
0358 
0359     histname = "GoodPVtxChi2oNDFVsGoodPVtx_" + label_;
0360     GoodPVtxChi2oNDFVsGoodPVtx =
0361         ibooker.bookProfile(histname, histname, GoodPVtxBin, GoodPVtxMin, GoodPVtxMax, Chi2NDFMin, Chi2NDFMax * 3, "");
0362     GoodPVtxChi2oNDFVsGoodPVtx->getTH1()->SetCanExtend(TH1::kAllAxes);
0363     GoodPVtxChi2oNDFVsGoodPVtx->setAxisTitle("Number of Good PV", 1);
0364     GoodPVtxChi2oNDFVsGoodPVtx->setAxisTitle("Mean PV #chi^{2}/ndof", 2);
0365 
0366     histname = "GoodPVtxChi2ProbVsGoodPVtx_" + label_;
0367     GoodPVtxChi2ProbVsGoodPVtx = ibooker.bookProfile(
0368         histname, histname, GoodPVtxBin, GoodPVtxMin, GoodPVtxMax, Chi2ProbMin, Chi2ProbMax * 3, "");
0369     GoodPVtxChi2ProbVsGoodPVtx->getTH1()->SetCanExtend(TH1::kAllAxes);
0370     GoodPVtxChi2ProbVsGoodPVtx->setAxisTitle("Number of Good PV", 1);
0371     GoodPVtxChi2ProbVsGoodPVtx->setAxisTitle("Mean PV #chi^{2}/prob", 2);
0372   }
0373 }
0374 
0375 // ------------ method fills 'descriptions' with the allowed parameters for the module  ------------
0376 void VertexMonitor::fillDescriptions(edm::ConfigurationDescriptions& descriptions) {
0377   //The following says we do not know what parameters are allowed so do no validation
0378   // Please change this to state exactly what you do use, even if it is no parameters
0379   edm::ParameterSetDescription desc;
0380   desc.setUnknown();
0381   descriptions.addDefault(desc);
0382 }