21 , primaryVertexInputTag_ ( primaryVertexInputTag )
22 , selectedPrimaryVertexInputTag_ ( selectedPrimaryVertexInputTag )
25 , NumberOfPVtxVsBXlumi(
NULL)
26 , NumberOfPVtxVsGoodPVtx(
NULL)
27 , NumberOfGoodPVtx(
NULL)
28 , NumberOfGoodPVtxVsBXlumi(
NULL)
29 , FractionOfGoodPVtx(
NULL)
30 , FractionOfGoodPVtxVsBXlumi(
NULL)
31 , FractionOfGoodPVtxVsGoodPVtx(
NULL)
32 , FractionOfGoodPVtxVsPVtx(
NULL)
33 , NumberOfBADndofPVtx(
NULL)
34 , NumberOfBADndofPVtxVsBXlumi(
NULL)
35 , NumberOfBADndofPVtxVsGoodPVtx(
NULL)
37 , GoodPVtxSumPtVsBXlumi(
NULL)
38 , GoodPVtxSumPtVsGoodPVtx(
NULL)
39 , GoodPVtxNumberOfTracks(
NULL)
40 , GoodPVtxNumberOfTracksVsBXlumi(
NULL)
41 , GoodPVtxNumberOfTracksVsGoodPVtx(
NULL)
42 , GoodPVtxNumberOfTracksVsGoodPVtxNdof(
NULL)
43 , GoodPVtxChi2oNDFVsGoodPVtx(
NULL)
44 , GoodPVtxChi2oNDFVsBXlumi(
NULL)
45 , GoodPVtxChi2ProbVsGoodPVtx(
NULL)
46 , GoodPVtxChi2ProbVsBXlumi(
NULL)
47 , doAllPlots_ ( conf_.getParameter<bool>(
"doAllPlots") )
48 , doPlotsVsBXlumi_ ( conf_.getParameter<bool>(
"doPlotsVsBXlumi") )
49 , doPlotsVsGoodPVtx_( conf_.getParameter<bool>(
"doPlotsVsGoodPVtx") )
91 std::cout <<
"bxlumi : " << bxlumi << std::endl;
93 size_t totalNumPV = 0;
94 size_t totalNumBADndofPV = 0;
100 totalNumPV = pvHandle->size();
101 std::cout <<
"totalNumPV : " << totalNumPV << std::endl;
102 for (reco::VertexCollection::const_iterator pv = pvHandle->begin();
103 pv != pvHandle->end(); ++pv) {
105 if (pv->ndof() < 4.) totalNumBADndofPV++;
115 size_t totalNumGoodPV = 0;
120 totalNumGoodPV = selpvHandle->size();
122 std::cout <<
"totalNumGoodPV: " << totalNumGoodPV << std::endl;
128 double fracGoodPV = double(totalNumGoodPV)/double(totalNumPV);
129 std::cout <<
"fracGoodPV: " << fracGoodPV << std::endl;
142 if ( selpvHandle->size() ) {
146 double chi2prob = 0.;
148 if (!selpvHandle->at(0).isFake()) {
154 chi2prob = TMath::Prob(pv.
chi2(),(int)pv.
ndof());
158 double pt = (**itrk).pt();
230 int BXlumiBin = BXlumiParameters.
getParameter<
int>(
"BXlumiBin");
231 double BXlumiMin = BXlumiParameters.
getParameter<
double>(
"BXlumiMin");
232 double BXlumiMax = BXlumiParameters.
getParameter<
double>(
"BXlumiMax");
285 histname =
"Chi2ProbVsBXlumi_" +
label_;
291 histname =
"GoodPVtxChi2oNDFVsBXlumi_" +
label_;
297 histname =
"GoodPVtxChi2ProbVsBXlumi_" +
label_;
357 histname =
"GoodPVtxChi2ProbVsGoodPVtx_" +
label_;
EDGetTokenT< ProductType > consumes(edm::InputTag const &tag)
T getParameter(std::string const &) const
edm::EDGetTokenT< reco::VertexCollection > pvToken_
MonitorElement * GoodPVtxNumberOfTracks
MonitorElement * book1D(const char *name, const char *title, int nchX, double lowX, double highX)
Book 1D histogram.
trackRef_iterator tracks_end() const
last iterator over tracks
virtual void beginJob(DQMStore *dqmStore_)
bool getByToken(EDGetToken token, Handle< PROD > &result) const
MonitorElement * GoodPVtxChi2oNDFVsBXlumi
MonitorElement * GoodPVtxSumPtVsBXlumi
MonitorElement * GoodPVtxNumberOfTracksVsBXlumi
std::vector< Vertex > VertexCollection
collection of Vertex objects
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
MonitorElement * NumberOfBADndofPVtxVsGoodPVtx
MonitorElement * GoodPVtxNumberOfTracksVsGoodPVtx
MonitorElement * GoodPVtxChi2oNDFVsGoodPVtx
MonitorElement * FractionOfGoodPVtxVsPVtx
double getValue(const edm::Event &)
void addDefault(ParameterSetDescription const &psetDescription)
void Fill(HcalDetId &id, double val, std::vector< TH2F > &depth)
edm::InputTag primaryVertexInputTag_
MonitorElement * Chi2oNDFVsBXlumi
double chi2() const
chi-squares
MonitorElement * FractionOfGoodPVtx
MonitorElement * FractionOfGoodPVtxVsBXlumi
MonitorElement * GoodPVtxSumPtVsGoodPVtx
MonitorElement * NumberOfPVtxVsBXlumi
MonitorElement * bookProfile(const char *name, const char *title, int nchX, double lowX, double highX, int nchY, double lowY, double highY, const char *option="s")
virtual void endLuminosityBlock(edm::LuminosityBlock const &, edm::EventSetup const &)
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
std::vector< TrackBaseRef >::const_iterator trackRef_iterator
The iteratator for the vector<TrackRef>
double normalizedChi2() const
chi-squared divided by n.d.o.f.
virtual void beginLuminosityBlock(edm::LuminosityBlock const &, edm::EventSetup const &)
MonitorElement * NumberOfBADndofPVtxVsBXlumi
trackRef_iterator tracks_begin() const
first iterator over tracks
void setAxisTitle(const std::string &title, int axis=1)
set x-, y- or z-axis title (axis=1, 2, 3 respectively)
MonitorElement * NumberOfPVtx
virtual void analyze(const edm::Event &, const edm::EventSetup &)
void setCurrentFolder(const std::string &fullpath)
size_t tracksSize() const
number of tracks
MonitorElement * NumberOfGoodPVtx