24 dqmLabel =
"OfflinePV/"+moduleLabel.label();
25 dqmStore_->setCurrentFolder(dqmLabel);
29 nbvtx = dqmStore_->book1D(
"vtxNbr",
"Reconstructed Vertices in Event",50,-0.5,49.5);
31 nbtksinvtx[0] = dqmStore_->book1D(
"otherVtxTrksNbr",
"Reconstructed Tracks in Vertex (other Vtx)",40,-0.5,99.5);
32 trksWeight[0] = dqmStore_->book1D(
"otherVtxTrksWeight",
"Total weight of Tracks in Vertex (other Vtx)",40,0,100.);
33 vtxchi2[0] = dqmStore_->book1D(
"otherVtxChi2",
"#chi^{2} (other Vtx)",100,0.,200.);
34 vtxndf[0] = dqmStore_->book1D(
"otherVtxNdf",
"ndof (other Vtx)",100,0.,200.);
35 vtxprob[0] = dqmStore_->book1D(
"otherVtxProb",
"#chi^{2} probability (other Vtx)",100,0.,1.);
36 nans[0] = dqmStore_->book1D(
"otherVtxNans",
"Illegal values for x,y,z,xx,xy,xz,yy,yz,zz (other Vtx)",9,0.5,9.5);
38 nbtksinvtx[1] = dqmStore_->book1D(
"tagVtxTrksNbr",
"Reconstructed Tracks in Vertex (tagged Vtx)",100,-0.5,99.5);
39 trksWeight[1] = dqmStore_->book1D(
"tagVtxTrksWeight",
"Total weight of Tracks in Vertex (tagged Vtx)",100,0,100.);
40 vtxchi2[1] = dqmStore_->book1D(
"tagVtxChi2",
"#chi^{2} (tagged Vtx)",100,0.,200.);
41 vtxndf[1] = dqmStore_->book1D(
"tagVtxNdf",
"ndof (tagged Vtx)",100,0.,200.);
42 vtxprob[1] = dqmStore_->book1D(
"tagVtxProb",
"#chi^{2} probability (tagged Vtx)",100,0.,1.);
43 nans[1] = dqmStore_->book1D(
"tagVtxNans",
"Illegal values for x,y,z,xx,xy,xz,yy,yz,zz (tagged Vtx)",9,0.5,9.5);
45 xrec[0] = dqmStore_->book1D(
"otherPosX",
"Position x Coordinate (other Vtx)",100,-0.1,0.1);
46 yrec[0] = dqmStore_->book1D(
"otherPosY",
"Position y Coordinate (other Vtx)",100,-0.1,0.1);
47 zrec[0] = dqmStore_->book1D(
"otherPosZ",
"Position z Coordinate (other Vtx)",100,-20.,20.);
48 xDiff[0] = dqmStore_->book1D(
"otherDiffX",
"X distance from BeamSpot (other Vtx)",100,-500,500);
49 yDiff[0] = dqmStore_->book1D(
"otherDiffY",
"Y distance from BeamSpot (other Vtx)",100,-500,500);
50 xerr[0] = dqmStore_->book1D(
"otherErrX",
"Uncertainty x Coordinate (other Vtx)",100,-0.1,0.1);
51 yerr[0] = dqmStore_->book1D(
"otherErrY",
"Uncertainty y Coordinate (other Vtx)",100,-0.1,0.1);
52 zerr[0] = dqmStore_->book1D(
"otherErrZ",
"Uncertainty z Coordinate (other Vtx)",100,-20.,20.);
53 xerrVsTrks[0] = dqmStore_->book2D(
"otherErrVsWeightX",
"Uncertainty x Coordinate vs. track weight (other Vtx)",100,0,100.,100,-0.1,0.1);
54 yerrVsTrks[0] = dqmStore_->book2D(
"otherErrVsWeightY",
"Uncertainty y Coordinate vs. track weight (other Vtx)",100,0,100.,100,-0.1,0.1);
55 zerrVsTrks[0] = dqmStore_->book2D(
"otherErrVsWeightZ",
"Uncertainty z Coordinate vs. track weight (other Vtx)",100,0,100.,100,-0.1,0.1);
58 xrec[1] = dqmStore_->book1D(
"tagPosX",
"Position x Coordinate (tagged Vtx)",100,-0.1,0.1);
59 yrec[1] = dqmStore_->book1D(
"tagPosY",
"Position y Coordinate (tagged Vtx)",100,-0.1,0.1);
60 zrec[1] = dqmStore_->book1D(
"tagPosZ",
"Position z Coordinate (tagged Vtx)",100,-20.,20.);
61 xDiff[1] = dqmStore_->book1D(
"tagDiffX",
"X distance from BeamSpot (tagged Vtx)",100,-500, 500);
62 yDiff[1] = dqmStore_->book1D(
"tagDiffY",
"Y distance from BeamSpot (tagged Vtx)",100,-500, 500);
63 xerr[1] = dqmStore_->book1D(
"tagErrX",
"Uncertainty x Coordinate (tagged Vtx)",100,0.,100);
64 yerr[1] = dqmStore_->book1D(
"tagErrY",
"Uncertainty y Coordinate (tagged Vtx)",100,0.,100);
65 zerr[1] = dqmStore_->book1D(
"tagErrZ",
"Uncertainty z Coordinate (tagged Vtx)",100,0.,100);
66 xerrVsTrks[1] = dqmStore_->book2D(
"tagErrVsWeightX",
"Uncertainty x Coordinate vs. track weight (tagged Vtx)",100,0,100.,100,0.,100);
67 yerrVsTrks[1] = dqmStore_->book2D(
"tagErrVsWeightY",
"Uncertainty y Coordinate vs. track weight (tagged Vtx)",100,0,100.,100,0.,100);
68 zerrVsTrks[1] = dqmStore_->book2D(
"tagErrVsWeightZ",
"Uncertainty z Coordinate vs. track weight (tagged Vtx)",100,0,100.,100,0.,100);
70 type[0] = dqmStore_->book1D(
"otherType",
"Vertex type (other Vtx)",3,-0.5,2.5);
71 type[1] = dqmStore_->book1D(
"tagType",
"Vertex type (tagged Vtx)",3,-0.5,2.5);
72 for (
int i=0;
i<2;++
i){
73 type[
i]->getTH1F()->GetXaxis()->SetBinLabel(1,
"Valid, real");
74 type[
i]->getTH1F()->GetXaxis()->SetBinLabel(2,
"Valid, fake");
75 type[
i]->getTH1F()->GetXaxis()->SetBinLabel(3,
"Invalid");
78 bsX = dqmStore_->book1D(
"bsX",
"BeamSpot x0", 100,-0.1,0.1);
79 bsY = dqmStore_->book1D(
"bsY",
"BeamSpot y0", 100,-0.1,0.1);
80 bsZ = dqmStore_->book1D(
"bsZ",
"BeamSpot z0", 100,-2.,2.);
81 bsSigmaZ = dqmStore_->book1D(
"bsSigmaZ",
"BeamSpot sigmaZ", 100, 0., 10. );
82 bsDxdz = dqmStore_->book1D(
"bsDxdz",
"BeamSpot dxdz", 100, -0.0003, 0.0003);
83 bsDydz = dqmStore_->book1D(
"bsDydz",
"BeamSpot dydz", 100, -0.0003, 0.0003);
84 bsBeamWidthX = dqmStore_->book1D(
"bsBeamWidthX",
"BeamSpot BeamWidthX", 100, 0., 100.);
85 bsBeamWidthY = dqmStore_->book1D(
"bsBeamWidthY",
"BeamSpot BeamWidthY", 100, 0., 100.);
86 bsType = dqmStore_->book1D(
"bsType",
"BeamSpot type", 4, -1.5, 2.5);
87 bsType->getTH1F()->GetXaxis()->SetBinLabel(1,
"Unknown");
88 bsType->getTH1F()->GetXaxis()->SetBinLabel(2,
"Fake");
89 bsType->getTH1F()->GetXaxis()->SetBinLabel(3,
"LHC");
90 bsType->getTH1F()->GetXaxis()->SetBinLabel(4,
"Tracker");
103 iEvent.
getByLabel(beamSpotLabel,beamSpotHandle);
108 if (recVtxs.
isValid() ==
false || beamSpotHandle.
isValid()==
false){
110 <<
" Some products not available in the event: VertexCollection "
112 <<recVtxs.
isValid() <<
" BeamSpot "
114 <<beamSpotHandle.
isValid()<<
". Skipping plots for this event";
120 nbvtx->Fill(recVtxs->size()*1.);
122 vertexPlots(recVtxs->front(),
beamSpot, 1);
124 for(reco::VertexCollection::const_iterator
v=recVtxs->begin()+1;
125 v!=recVtxs->end(); ++
v){
126 vertexPlots(*
v, beamSpot, 0);
129 bsX->Fill(beamSpot.
x0());
130 bsY->Fill(beamSpot.
y0());
131 bsZ->Fill(beamSpot.
z0());
132 bsSigmaZ->Fill(beamSpot.
sigmaZ());
133 bsDxdz->Fill(beamSpot.
dxdz());
134 bsDydz->Fill(beamSpot.
dydz());
135 bsBeamWidthX->Fill(beamSpot.
BeamWidthX()*10000);
136 bsBeamWidthY->Fill(beamSpot.
BeamWidthY()*10000);
146 else type[
i]->Fill(0.);
152 trksWeight[
i]->Fill(weight);
155 vtxchi2[
i]->Fill(v.
chi2());
156 vtxndf[
i]->Fill(v.
ndof());
163 float xb = beamSpot.
x0() + beamSpot.
dxdz() * (v.
position().z() - beamSpot.
z0());
164 float yb = beamSpot.
y0() + beamSpot.
dydz() * (v.
position().z() - beamSpot.
z0());
165 xDiff[
i]->Fill((v.
position().x() - xb)*10000);
166 yDiff[
i]->Fill((v.
position().y() - yb)*10000);
168 xerr[
i]->Fill(v.
xError()*10000);
169 yerr[
i]->Fill(v.
yError()*10000);
171 xerrVsTrks[
i]->Fill(weight, v.
xError()*10000);
172 yerrVsTrks[
i]->Fill(weight, v.
yError()*10000);
173 zerrVsTrks[
i]->Fill(weight, v.
zError()*10000);
180 for (
int i = 0; i != 3; i++) {
181 for (
int j = i;
j != 3;
j++) {
186 nans[
i]->Fill(index*1., 1.);
T getParameter(std::string const &) const
double z0() const
z coordinate
trackRef_iterator tracks_end() const
last iterator over tracks
void vertexPlots(const reco::Vertex &v, const reco::BeamSpot &beamSpot, int i)
double zError() const
error on z
#define DEFINE_FWK_MODULE(type)
bool isValid() const
Tells whether the vertex is valid.
double covariance(int i, int j) const
(i, j)-th element of error matrix, i, j = 0, ... 2
const Point & position() const
position
double dydz() const
dydz slope
void Fill(HcalDetId &id, double val, std::vector< TH2F > &depth)
float trackWeight(const TrackBaseRef &r) const
returns the weight with which a Track has contributed to the vertex-fit.
double chi2() const
chi-squares
float ChiSquaredProbability(double chiSquared, double nrDOF)
double BeamWidthX() const
beam width X
bool getByLabel(InputTag const &tag, Handle< PROD > &result) const
double dxdz() const
dxdz slope
double xError() const
error on x
double sigmaZ() const
sigma z
double BeamWidthY() const
beam width Y
std::vector< TrackBaseRef >::const_iterator trackRef_iterator
The iteratator for the vector<TrackRef>
double y0() const
y coordinate
trackRef_iterator tracks_begin() const
first iterator over tracks
double yError() const
error on y
virtual void analyze(const edm::Event &iEvent, const edm::EventSetup &iSetup)
size_t tracksSize() const
number of tracks
PrimaryVertexMonitor(const edm::ParameterSet &pSet)
double x0() const
x coordinate