20 primaryVertexInputTag_(primaryVertexInputTag),
21 selectedPrimaryVertexInputTag_(selectedPrimaryVertexInputTag),
23 NumberOfPVtx(nullptr),
24 NumberOfPVtxVsBXlumi(nullptr),
25 NumberOfPVtxVsGoodPVtx(nullptr),
26 NumberOfGoodPVtx(nullptr),
27 NumberOfGoodPVtxVsBXlumi(nullptr),
28 FractionOfGoodPVtx(nullptr),
29 FractionOfGoodPVtxVsBXlumi(nullptr),
30 FractionOfGoodPVtxVsGoodPVtx(nullptr),
31 FractionOfGoodPVtxVsPVtx(nullptr),
32 NumberOfBADndofPVtx(nullptr),
33 NumberOfBADndofPVtxVsBXlumi(nullptr),
34 NumberOfBADndofPVtxVsGoodPVtx(nullptr),
35 GoodPVtxSumPt(nullptr),
36 GoodPVtxSumPtVsBXlumi(nullptr),
37 GoodPVtxSumPtVsGoodPVtx(nullptr),
38 GoodPVtxNumberOfTracks(nullptr),
39 GoodPVtxNumberOfTracksVsBXlumi(nullptr),
40 GoodPVtxNumberOfTracksVsGoodPVtx(nullptr),
41 GoodPVtxNumberOfTracksVsGoodPVtxNdof(nullptr),
42 GoodPVtxChi2oNDFVsGoodPVtx(nullptr),
43 GoodPVtxChi2oNDFVsBXlumi(nullptr),
44 GoodPVtxChi2ProbVsGoodPVtx(nullptr),
45 GoodPVtxChi2ProbVsBXlumi(nullptr),
46 doAllPlots_(conf_.getParameter<
bool>(
"doAllPlots")),
47 doPlotsVsBXlumi_(conf_.getParameter<
bool>(
"doPlotsVsBXlumi")),
48 doPlotsVsGoodPVtx_(conf_.getParameter<
bool>(
"doPlotsVsGoodPVtx"))
61 :
VertexMonitor(iConfig, primaryVertexInputTag, selectedPrimaryVertexInputTag, pvLabel) {
84 size_t totalNumPV = 0;
85 size_t totalNumBADndofPV = 0;
88 totalNumPV = pvHandle->size();
90 for (reco::VertexCollection::const_iterator
pv = pvHandle->begin();
pv != pvHandle->end(); ++
pv) {
104 size_t totalNumGoodPV = 0;
107 totalNumGoodPV = selpvHandle->size();
116 double fracGoodPV = double(totalNumGoodPV) / double(totalNumPV);
130 if (!selpvHandle->empty()) {
134 double chi2prob = 0.;
136 if (!selpvHandle->at(0).isFake()) {
140 chi2ndf =
pv.normalizedChi2();
141 chi2prob = TMath::Prob(
pv.chi2(), (
int)
pv.ndof());
144 double pt = (**itrk).pt();
173 int GoodPVtxBin = ParametersGoodPVtx.getParameter<
int>(
"GoodPVtxBin");
174 double GoodPVtxMin = ParametersGoodPVtx.getParameter<
double>(
"GoodPVtxMin");
175 double GoodPVtxMax = ParametersGoodPVtx.getParameter<
double>(
"GoodPVtxMax");
178 int NTrkPVtxBin = ParametersNTrkPVtx.getParameter<
int>(
"NTrkPVtxBin");
179 double NTrkPVtxMin = ParametersNTrkPVtx.getParameter<
double>(
"NTrkPVtxMin");
180 double NTrkPVtxMax = ParametersNTrkPVtx.getParameter<
double>(
"NTrkPVtxMax");
183 int SumPtPVtxBin = ParametersSumPtPVtx.getParameter<
int>(
"SumPtPVtxBin");
184 double SumPtPVtxMin = ParametersSumPtPVtx.getParameter<
double>(
"SumPtPVtxMin");
185 double SumPtPVtxMax = ParametersSumPtPVtx.getParameter<
double>(
"SumPtPVtxMax");
EDGetTokenT< ProductType > consumes(edm::InputTag const &tag)
edm::EDGetTokenT< reco::VertexCollection > pvToken_
T getParameter(std::string const &) const
MonitorElement * GoodPVtxNumberOfTracks
virtual void setCurrentFolder(std::string const &fullpath)
MonitorElement * GoodPVtxChi2oNDFVsBXlumi
MonitorElement * GoodPVtxSumPtVsBXlumi
MonitorElement * GoodPVtxNumberOfTracksVsBXlumi
std::vector< Vertex > VertexCollection
collection of Vertex objects
virtual void initHisto(DQMStore::IBooker &ibooker)
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
MonitorElement * NumberOfBADndofPVtxVsGoodPVtx
MonitorElement * GoodPVtxNumberOfTracksVsGoodPVtx
MonitorElement * GoodPVtxChi2oNDFVsGoodPVtx
MonitorElement * FractionOfGoodPVtxVsPVtx
double getValue(const edm::Event &)
void addDefault(ParameterSetDescription const &psetDescription)
MonitorElement * bookProfile(TString const &name, TString const &title, int nchX, double lowX, double highX, int, double lowY, double highY, char const *option="s", FUNC onbooking=NOOP())
edm::InputTag primaryVertexInputTag_
MonitorElement * Chi2oNDFVsBXlumi
MonitorElement * FractionOfGoodPVtx
MonitorElement * FractionOfGoodPVtxVsBXlumi
MonitorElement * GoodPVtxSumPtVsGoodPVtx
MonitorElement * NumberOfPVtxVsBXlumi
MonitorElement * NumberOfPVtxVsGoodPVtx
edm::EDGetTokenT< reco::VertexCollection > selpvToken_
MonitorElement * FractionOfGoodPVtxVsGoodPVtx
MonitorElement * NumberOfBADndofPVtx
VertexMonitor(const edm::ParameterSet &, const edm::InputTag &, const edm::InputTag &, std::string pvLabel)
MonitorElement * GoodPVtxSumPt
MonitorElement * Chi2ProbVsBXlumi
MonitorElement * GoodPVtxChi2ProbVsGoodPVtx
virtual TH1 * getTH1() const
edm::InputTag selectedPrimaryVertexInputTag_
MonitorElement * NumberOfGoodPVtxVsBXlumi
MonitorElement * GoodPVtxChi2ProbVsBXlumi
MonitorElement * NumberOfBADndofPVtxVsBXlumi
MonitorElement * book1D(TString const &name, TString const &title, int const nchX, double const lowX, double const highX, FUNC onbooking=NOOP())
MonitorElement * NumberOfPVtx
virtual void analyze(const edm::Event &, const edm::EventSetup &)
std::vector< TrackBaseRef >::const_iterator trackRef_iterator
The iteratator for the vector<TrackRef>
MonitorElement * NumberOfGoodPVtx
virtual void setAxisTitle(const std::string &title, int axis=1)
set x-, y- or z-axis title (axis=1, 2, 3 respectively)