23 primaryVertexInputTag_(primaryVertexInputTag),
24 selectedPrimaryVertexInputTag_(selectedPrimaryVertexInputTag),
26 NumberOfPVtx(nullptr),
27 NumberOfPVtxVsBXlumi(nullptr),
28 NumberOfPVtxVsGoodPVtx(nullptr),
29 NumberOfGoodPVtx(nullptr),
30 NumberOfGoodPVtxVsBXlumi(nullptr),
31 FractionOfGoodPVtx(nullptr),
32 FractionOfGoodPVtxVsBXlumi(nullptr),
33 FractionOfGoodPVtxVsGoodPVtx(nullptr),
34 FractionOfGoodPVtxVsPVtx(nullptr),
35 NumberOfBADndofPVtx(nullptr),
36 NumberOfBADndofPVtxVsBXlumi(nullptr),
37 NumberOfBADndofPVtxVsGoodPVtx(nullptr),
38 GoodPVtxSumPt(nullptr),
39 GoodPVtxSumPtVsBXlumi(nullptr),
40 GoodPVtxSumPtVsGoodPVtx(nullptr),
41 GoodPVtxNumberOfTracks(nullptr),
42 GoodPVtxNumberOfTracksVsBXlumi(nullptr),
43 GoodPVtxNumberOfTracksVsGoodPVtx(nullptr),
44 GoodPVtxNumberOfTracksVsGoodPVtxNdof(nullptr),
45 GoodPVtxChi2oNDFVsGoodPVtx(nullptr),
46 GoodPVtxChi2oNDFVsBXlumi(nullptr),
47 GoodPVtxChi2ProbVsGoodPVtx(nullptr),
48 GoodPVtxChi2ProbVsBXlumi(nullptr),
49 doAllPlots_(conf_.getParameter<
bool>(
"doAllPlots")),
50 doPlotsVsBXlumi_(conf_.getParameter<
bool>(
"doPlotsVsBXlumi")),
51 doPlotsVsGoodPVtx_(conf_.getParameter<
bool>(
"doPlotsVsGoodPVtx"))
64 :
VertexMonitor(iConfig, primaryVertexInputTag, selectedPrimaryVertexInputTag, pvLabel) {
91 size_t totalNumPV = 0;
92 size_t totalNumBADndofPV = 0;
95 totalNumPV = pvHandle->size();
97 for (reco::VertexCollection::const_iterator
pv = pvHandle->begin();
pv != pvHandle->end(); ++
pv) {
111 size_t totalNumGoodPV = 0;
114 totalNumGoodPV = selpvHandle->size();
123 double fracGoodPV = double(totalNumGoodPV) / double(totalNumPV);
137 if (!selpvHandle->empty()) {
141 double chi2prob = 0.;
143 if (!selpvHandle->at(0).isFake()) {
147 chi2ndf =
pv.normalizedChi2();
148 chi2prob = TMath::Prob(
pv.chi2(), (
int)
pv.ndof());
151 double pt = (**itrk).pt();
180 int GoodPVtxBin = ParametersGoodPVtx.getParameter<
int>(
"GoodPVtxBin");
181 double GoodPVtxMin = ParametersGoodPVtx.getParameter<
double>(
"GoodPVtxMin");
182 double GoodPVtxMax = ParametersGoodPVtx.getParameter<
double>(
"GoodPVtxMax");
185 int NTrkPVtxBin = ParametersNTrkPVtx.getParameter<
int>(
"NTrkPVtxBin");
186 double NTrkPVtxMin = ParametersNTrkPVtx.getParameter<
double>(
"NTrkPVtxMin");
187 double NTrkPVtxMax = ParametersNTrkPVtx.getParameter<
double>(
"NTrkPVtxMax");
190 int SumPtPVtxBin = ParametersSumPtPVtx.getParameter<
int>(
"SumPtPVtxBin");
191 double SumPtPVtxMin = ParametersSumPtPVtx.getParameter<
double>(
"SumPtPVtxMin");
192 double SumPtPVtxMax = ParametersSumPtPVtx.getParameter<
double>(
"SumPtPVtxMax");