25 dqmLabel =
"OfflinePV/"+moduleLabel.label();
26 dqmStore_->setCurrentFolder(dqmLabel);
30 nbvtx = dqmStore_->book1D(
"vtxNbr",
"Reconstructed Vertices in Event",50,-0.5,49.5);
32 nbtksinvtx[0] = dqmStore_->book1D(
"otherVtxTrksNbr",
"Reconstructed Tracks in Vertex (other Vtx)",40,-0.5,99.5);
33 trksWeight[0] = dqmStore_->book1D(
"otherVtxTrksWeight",
"Total weight of Tracks in Vertex (other Vtx)",40,0,100.);
34 vtxchi2[0] = dqmStore_->book1D(
"otherVtxChi2",
"#chi^{2} (other Vtx)",100,0.,200.);
35 vtxndf[0] = dqmStore_->book1D(
"otherVtxNdf",
"ndof (other Vtx)",100,0.,200.);
36 vtxprob[0] = dqmStore_->book1D(
"otherVtxProb",
"#chi^{2} probability (other Vtx)",100,0.,1.);
37 nans[0] = dqmStore_->book1D(
"otherVtxNans",
"Illegal values for x,y,z,xx,xy,xz,yy,yz,zz (other Vtx)",9,0.5,9.5);
39 nbtksinvtx[1] = dqmStore_->book1D(
"tagVtxTrksNbr",
"Reconstructed Tracks in Vertex (tagged Vtx)",100,-0.5,99.5);
40 trksWeight[1] = dqmStore_->book1D(
"tagVtxTrksWeight",
"Total weight of Tracks in Vertex (tagged Vtx)",100,0,100.);
41 vtxchi2[1] = dqmStore_->book1D(
"tagVtxChi2",
"#chi^{2} (tagged Vtx)",100,0.,200.);
42 vtxndf[1] = dqmStore_->book1D(
"tagVtxNdf",
"ndof (tagged Vtx)",100,0.,200.);
43 vtxprob[1] = dqmStore_->book1D(
"tagVtxProb",
"#chi^{2} probability (tagged Vtx)",100,0.,1.);
44 nans[1] = dqmStore_->book1D(
"tagVtxNans",
"Illegal values for x,y,z,xx,xy,xz,yy,yz,zz (tagged Vtx)",9,0.5,9.5);
46 xrec[0] = dqmStore_->book1D(
"otherPosX",
"Position x Coordinate (other Vtx)",100,-0.1,0.1);
47 yrec[0] = dqmStore_->book1D(
"otherPosY",
"Position y Coordinate (other Vtx)",100,-0.1,0.1);
48 zrec[0] = dqmStore_->book1D(
"otherPosZ",
"Position z Coordinate (other Vtx)",100,-20.,20.);
49 xDiff[0] = dqmStore_->book1D(
"otherDiffX",
"X distance from BeamSpot (other Vtx)",100,-500,500);
50 yDiff[0] = dqmStore_->book1D(
"otherDiffY",
"Y distance from BeamSpot (other Vtx)",100,-500,500);
51 xerr[0] = dqmStore_->book1D(
"otherErrX",
"Uncertainty x Coordinate (other Vtx)",100,-0.1,0.1);
52 yerr[0] = dqmStore_->book1D(
"otherErrY",
"Uncertainty y Coordinate (other Vtx)",100,-0.1,0.1);
53 zerr[0] = dqmStore_->book1D(
"otherErrZ",
"Uncertainty z Coordinate (other Vtx)",100,-20.,20.);
54 xerrVsTrks[0] = dqmStore_->book2D(
"otherErrVsWeightX",
"Uncertainty x Coordinate vs. track weight (other Vtx)",100,0,100.,100,-0.1,0.1);
55 yerrVsTrks[0] = dqmStore_->book2D(
"otherErrVsWeightY",
"Uncertainty y Coordinate vs. track weight (other Vtx)",100,0,100.,100,-0.1,0.1);
56 zerrVsTrks[0] = dqmStore_->book2D(
"otherErrVsWeightZ",
"Uncertainty z Coordinate vs. track weight (other Vtx)",100,0,100.,100,-0.1,0.1);
59 xrec[1] = dqmStore_->book1D(
"tagPosX",
"Position x Coordinate (tagged Vtx)",100,-0.1,0.1);
60 yrec[1] = dqmStore_->book1D(
"tagPosY",
"Position y Coordinate (tagged Vtx)",100,-0.1,0.1);
61 zrec[1] = dqmStore_->book1D(
"tagPosZ",
"Position z Coordinate (tagged Vtx)",100,-20.,20.);
62 xDiff[1] = dqmStore_->book1D(
"tagDiffX",
"X distance from BeamSpot (tagged Vtx)",100,-500, 500);
63 yDiff[1] = dqmStore_->book1D(
"tagDiffY",
"Y distance from BeamSpot (tagged Vtx)",100,-500, 500);
64 xerr[1] = dqmStore_->book1D(
"tagErrX",
"Uncertainty x Coordinate (tagged Vtx)",100,0.,100);
65 yerr[1] = dqmStore_->book1D(
"tagErrY",
"Uncertainty y Coordinate (tagged Vtx)",100,0.,100);
66 zerr[1] = dqmStore_->book1D(
"tagErrZ",
"Uncertainty z Coordinate (tagged Vtx)",100,0.,100);
67 xerrVsTrks[1] = dqmStore_->book2D(
"tagErrVsWeightX",
"Uncertainty x Coordinate vs. track weight (tagged Vtx)",100,0,100.,100,0.,100);
68 yerrVsTrks[1] = dqmStore_->book2D(
"tagErrVsWeightY",
"Uncertainty y Coordinate vs. track weight (tagged Vtx)",100,0,100.,100,0.,100);
69 zerrVsTrks[1] = dqmStore_->book2D(
"tagErrVsWeightZ",
"Uncertainty z Coordinate vs. track weight (tagged Vtx)",100,0,100.,100,0.,100);
71 type[0] = dqmStore_->book1D(
"otherType",
"Vertex type (other Vtx)",3,-0.5,2.5);
72 type[1] = dqmStore_->book1D(
"tagType",
"Vertex type (tagged Vtx)",3,-0.5,2.5);
73 for (
int i=0;
i<2;++
i){
74 type[
i]->getTH1F()->GetXaxis()->SetBinLabel(1,
"Valid, real");
75 type[
i]->getTH1F()->GetXaxis()->SetBinLabel(2,
"Valid, fake");
76 type[
i]->getTH1F()->GetXaxis()->SetBinLabel(3,
"Invalid");
79 bsX = dqmStore_->book1D(
"bsX",
"BeamSpot x0", 100,-0.1,0.1);
80 bsY = dqmStore_->book1D(
"bsY",
"BeamSpot y0", 100,-0.1,0.1);
81 bsZ = dqmStore_->book1D(
"bsZ",
"BeamSpot z0", 100,-2.,2.);
82 bsSigmaZ = dqmStore_->book1D(
"bsSigmaZ",
"BeamSpot sigmaZ", 100, 0., 10. );
83 bsDxdz = dqmStore_->book1D(
"bsDxdz",
"BeamSpot dxdz", 100, -0.0003, 0.0003);
84 bsDydz = dqmStore_->book1D(
"bsDydz",
"BeamSpot dydz", 100, -0.0003, 0.0003);
85 bsBeamWidthX = dqmStore_->book1D(
"bsBeamWidthX",
"BeamSpot BeamWidthX", 100, 0., 100.);
86 bsBeamWidthY = dqmStore_->book1D(
"bsBeamWidthY",
"BeamSpot BeamWidthY", 100, 0., 100.);
87 bsType = dqmStore_->book1D(
"bsType",
"BeamSpot type", 4, -1.5, 2.5);
88 bsType->getTH1F()->GetXaxis()->SetBinLabel(1,
"Unknown");
89 bsType->getTH1F()->GetXaxis()->SetBinLabel(2,
"Fake");
90 bsType->getTH1F()->GetXaxis()->SetBinLabel(3,
"LHC");
91 bsType->getTH1F()->GetXaxis()->SetBinLabel(4,
"Tracker");
104 iEvent.
getByLabel(beamSpotLabel,beamSpotHandle);
109 if (recVtxs.
isValid() ==
false || beamSpotHandle.
isValid()==
false){
111 <<
" Some products not available in the event: VertexCollection "
113 <<recVtxs.
isValid() <<
" BeamSpot "
115 <<beamSpotHandle.
isValid()<<
". Skipping plots for this event";
121 nbvtx->Fill(recVtxs->size()*1.);
123 vertexPlots(recVtxs->front(),
beamSpot, 1);
125 for(reco::VertexCollection::const_iterator
v=recVtxs->begin()+1;
126 v!=recVtxs->end(); ++
v){
127 vertexPlots(*
v, beamSpot, 0);
130 bsX->Fill(beamSpot.
x0());
131 bsY->Fill(beamSpot.
y0());
132 bsZ->Fill(beamSpot.
z0());
133 bsSigmaZ->Fill(beamSpot.
sigmaZ());
134 bsDxdz->Fill(beamSpot.
dxdz());
135 bsDydz->Fill(beamSpot.
dydz());
136 bsBeamWidthX->Fill(beamSpot.
BeamWidthX()*10000);
137 bsBeamWidthY->Fill(beamSpot.
BeamWidthY()*10000);
145 if (i < 0 || i > 1)
return;
148 else type[
i]->Fill(0.);
154 trksWeight[
i]->Fill(weight);
157 vtxchi2[
i]->Fill(v.
chi2());
158 vtxndf[
i]->Fill(v.
ndof());
165 float xb = beamSpot.
x0() + beamSpot.
dxdz() * (v.
position().z() - beamSpot.
z0());
166 float yb = beamSpot.
y0() + beamSpot.
dydz() * (v.
position().z() - beamSpot.
z0());
167 xDiff[
i]->Fill((v.
position().x() - xb)*10000);
168 yDiff[
i]->Fill((v.
position().y() - yb)*10000);
170 xerr[
i]->Fill(v.
xError()*10000);
171 yerr[
i]->Fill(v.
yError()*10000);
173 xerrVsTrks[
i]->Fill(weight, v.
xError()*10000);
174 yerrVsTrks[
i]->Fill(weight, v.
yError()*10000);
175 zerrVsTrks[
i]->Fill(weight, v.
zError()*10000);
182 for (
int k = 0;
k != 3;
k++) {
183 for (
int j =
k;
j != 3;
j++) {
188 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
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
DEFINE_FWK_MODULE(CosmicTrackingParticleSelector)
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