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;
96 totalNumPV = pvHandle->size();
98 for (reco::VertexCollection::const_iterator
pv = pvHandle->begin();
pv != pvHandle->end(); ++
pv) {
112 size_t totalNumGoodPV = 0;
116 totalNumGoodPV = selpvHandle->size();
125 double fracGoodPV = double(totalNumGoodPV) / double(totalNumPV);
139 if (!selpvHandle->empty()) {
143 double chi2prob = 0.;
145 if (!selpvHandle->at(0).isFake()) {
149 chi2ndf =
pv.normalizedChi2();
150 chi2prob = TMath::Prob(
pv.chi2(), (
int)
pv.ndof());
153 double pt = (**itrk).pt();
182 int GoodPVtxBin = ParametersGoodPVtx.getParameter<
int>(
"GoodPVtxBin");
183 double GoodPVtxMin = ParametersGoodPVtx.getParameter<
double>(
"GoodPVtxMin");
184 double GoodPVtxMax = ParametersGoodPVtx.getParameter<
double>(
"GoodPVtxMax");
187 int NTrkPVtxBin = ParametersNTrkPVtx.getParameter<
int>(
"NTrkPVtxBin");
188 double NTrkPVtxMin = ParametersNTrkPVtx.getParameter<
double>(
"NTrkPVtxMin");
189 double NTrkPVtxMax = ParametersNTrkPVtx.getParameter<
double>(
"NTrkPVtxMax");
192 int SumPtPVtxBin = ParametersSumPtPVtx.getParameter<
int>(
"SumPtPVtxBin");
193 double SumPtPVtxMin = ParametersSumPtPVtx.getParameter<
double>(
"SumPtPVtxMin");
194 double SumPtPVtxMax = ParametersSumPtPVtx.getParameter<
double>(
"SumPtPVtxMax");