23 primaryVertexInputTag_(primaryVertexInputTag),
24 selectedPrimaryVertexInputTag_(selectedPrimaryVertexInputTag),
28 NumberOfPVtxVsGoodPVtx(
nullptr),
30 NumberOfGoodPVtxVsBXlumi(
nullptr),
32 FractionOfGoodPVtxVsBXlumi(
nullptr),
33 FractionOfGoodPVtxVsGoodPVtx(
nullptr),
34 FractionOfGoodPVtxVsPVtx(
nullptr),
36 NumberOfBADndofPVtxVsBXlumi(
nullptr),
37 NumberOfBADndofPVtxVsGoodPVtx(
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()) {
153 double pt = (**itrk).pt();
274 ibooker.
bookProfile(histname, histname, BXlumiBin, BXlumiMin, BXlumiMax, Chi2NDFMin, Chi2NDFMax,
"");
279 histname =
"Chi2ProbVsBXlumi_" +
label_;
281 ibooker.
bookProfile(histname, histname, BXlumiBin, BXlumiMin, BXlumiMax, Chi2ProbMin, Chi2ProbMax,
"");
286 histname =
"GoodPVtxChi2oNDFVsBXlumi_" +
label_;
288 ibooker.
bookProfile(histname, histname, BXlumiBin, BXlumiMin, BXlumiMax, Chi2NDFMin, Chi2NDFMax,
"");
293 histname =
"GoodPVtxChi2ProbVsBXlumi_" +
label_;
295 ibooker.
bookProfile(histname, histname, BXlumiBin, BXlumiMin, BXlumiMax, Chi2ProbMin, Chi2ProbMax,
"");
355 ibooker.
bookProfile(histname, histname, GoodPVtxBin, GoodPVtxMin, GoodPVtxMax, Chi2NDFMin, Chi2NDFMax,
"");
360 histname =
"GoodPVtxChi2ProbVsGoodPVtx_" +
label_;
362 ibooker.
bookProfile(histname, histname, GoodPVtxBin, GoodPVtxMin, GoodPVtxMax, Chi2ProbMin, Chi2ProbMax,
"");
EDGetTokenT< ProductType > consumes(edm::InputTag const &tag)
MonitorElement * book1D(TString const &name, TString const &title, int const nchX, double const lowX, double const highX)
T getParameter(std::string const &) const
edm::EDGetTokenT< reco::VertexCollection > pvToken_
MonitorElement * GoodPVtxNumberOfTracks
trackRef_iterator tracks_end() const
last iterator over tracks
bool getByToken(EDGetToken token, Handle< PROD > &result) const
MonitorElement * GoodPVtxChi2oNDFVsBXlumi
void setCurrentFolder(std::string const &fullpath)
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)
edm::InputTag primaryVertexInputTag_
MonitorElement * bookProfile(TString const &name, TString const &title, int nchX, double lowX, double highX, int nchY, double lowY, double highY, char const *option="s")
MonitorElement * Chi2oNDFVsBXlumi
double chi2() const
chi-squares
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
edm::InputTag selectedPrimaryVertexInputTag_
MonitorElement * NumberOfGoodPVtxVsBXlumi
MonitorElement * GoodPVtxChi2ProbVsBXlumi
double normalizedChi2() const
chi-squared divided by n.d.o.f.
MonitorElement * NumberOfBADndofPVtxVsBXlumi
trackRef_iterator tracks_begin() const
first iterator over tracks
MonitorElement * NumberOfPVtx
virtual TH1 * getTH1() const
virtual void analyze(const edm::Event &, const edm::EventSetup &)
std::vector< TrackBaseRef >::const_iterator trackRef_iterator
The iteratator for the vector<TrackRef>
size_t tracksSize() const
number of tracks
MonitorElement * NumberOfGoodPVtx
virtual void setAxisTitle(const std::string &title, int axis=1)
set x-, y- or z-axis title (axis=1, 2, 3 respectively)