CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
PrimaryVertexMonitor.cc
Go to the documentation of this file.
5 
6 
8 
10 
11 #include "TMath.h"
12 
13 using namespace reco;
14 using namespace edm;
15 
17  : conf_ ( pSet )
18  , TopFolderName_ ( pSet.getParameter<std::string>("TopFolderName") )
19  , AlignmentLabel_( pSet.getParameter<std::string>("AlignmentLabel"))
20  , nbvtx(NULL)
21  , bsX(NULL)
22  , bsY(NULL)
23  , bsZ(NULL)
24  , bsSigmaZ(NULL)
25  , bsDxdz(NULL)
26  , bsDydz(NULL)
27  , bsBeamWidthX(NULL)
28  , bsBeamWidthY(NULL)
29  , bsType(NULL)
30  , sumpt(NULL)
31  , ntracks(NULL)
32  , weight(NULL)
33  , chi2ndf(NULL)
34  , chi2prob(NULL)
35  , dxy(NULL)
36  , dxy2(NULL)
37  , dz(NULL)
38  , dxyErr(NULL)
39  , dzErr(NULL)
40  , dxyVsPhi_pt1(NULL)
41  , dzVsPhi_pt1(NULL)
42  , dxyVsEta_pt1(NULL)
43  , dzVsEta_pt1(NULL)
44  , dxyVsPhi_pt10(NULL)
45  , dzVsPhi_pt10(NULL)
46  , dxyVsEta_pt10(NULL)
47  , dzVsEta_pt10(NULL)
48 {
49  // dqmStore_ = edm::Service<DQMStore>().operator->();
50 
51 
52  vertexInputTag_ = pSet.getParameter<InputTag>("vertexLabel");
53  beamSpotInputTag_ = pSet.getParameter<InputTag>("beamSpotLabel");
54  vertexToken_ = consumes<reco::VertexCollection>(vertexInputTag_);
55  beamspotToken_ = consumes<reco::BeamSpot> (beamSpotInputTag_);
56 
57 }
58 
59 // -- BeginRun
60 //---------------------------------------------------------------------------------//
61 void
63  edm::Run const &, edm::EventSetup const &) {
64 
65  std::string dqmLabel = "";
66 
67  //
68  // Book all histograms.
69  //
70 
71  // get the store
72  dqmLabel = TopFolderName_+"/"+vertexInputTag_.label();
73  iBooker.setCurrentFolder(dqmLabel);
74 
75 // xPos = iBooker.book1D ("xPos","x Coordinate" ,100, -0.1, 0.1);
76 
77  nbvtx = iBooker.book1D("vtxNbr","Reconstructed Vertices in Event",50,-0.5,49.5);
78  nbgvtx = iBooker.book1D("goodvtxNbr","Reconstructed Good Vertices in Event",50,-0.5,49.5);
79 
80  // to be configured each year...
81  auto vposx = conf_.getParameter<double>("Xpos");
82  auto vposy = conf_.getParameter<double>("Ypos");
83 
84  nbtksinvtx[0] = iBooker.book1D("otherVtxTrksNbr","Reconstructed Tracks in Vertex (other Vtx)",40,-0.5,99.5);
85  ntracksVsZ[0] = iBooker.bookProfile("otherVtxTrksVsZ","Reconstructed Tracks in Vertex (other Vtx) vs Z",80,-20.,20.,50,0,100,"");
86  ntracksVsZ[0]->setAxisTitle("z-bs",1);
87  ntracksVsZ[0]->setAxisTitle("#tracks",2);
88 
89  trksWeight[0] = iBooker.book1D("otherVtxTrksWeight","Total weight of Tracks in Vertex (other Vtx)",40,0,100.);
90  vtxchi2[0] = iBooker.book1D("otherVtxChi2","#chi^{2} (other Vtx)",100,0.,200.);
91  vtxndf[0] = iBooker.book1D("otherVtxNdf","ndof (other Vtx)",100,0.,200.);
92  vtxprob[0] = iBooker.book1D("otherVtxProb","#chi^{2} probability (other Vtx)",100,0.,1.);
93  nans[0] = iBooker.book1D("otherVtxNans","Illegal values for x,y,z,xx,xy,xz,yy,yz,zz (other Vtx)",9,0.5,9.5);
94 
95  nbtksinvtx[1] = iBooker.book1D("tagVtxTrksNbr","Reconstructed Tracks in Vertex (tagged Vtx)",100,-0.5,99.5);
96  ntracksVsZ[1] = iBooker.bookProfile("tagVtxTrksVsZ","Reconstructed Tracks in Vertex (tagged Vtx) vs Z",80,-20.,20.,50,0,100,"");
97  ntracksVsZ[1]->setAxisTitle("z-bs",1);
98  ntracksVsZ[1]->setAxisTitle("#tracks",2);
99 
100  trksWeight[1] = iBooker.book1D("tagVtxTrksWeight","Total weight of Tracks in Vertex (tagged Vtx)",100,0,100.);
101  vtxchi2[1] = iBooker.book1D("tagVtxChi2","#chi^{2} (tagged Vtx)",100,0.,200.);
102  vtxndf[1] = iBooker.book1D("tagVtxNdf","ndof (tagged Vtx)",100,0.,200.);
103  vtxprob[1] = iBooker.book1D("tagVtxProb","#chi^{2} probability (tagged Vtx)",100,0.,1.);
104  nans[1] = iBooker.book1D("tagVtxNans","Illegal values for x,y,z,xx,xy,xz,yy,yz,zz (tagged Vtx)",9,0.5,9.5);
105 
106  xrec[0] = iBooker.book1D("otherPosX","Position x Coordinate (other Vtx)",100,vposx-0.1,vposx+0.1);
107  yrec[0] = iBooker.book1D("otherPosY","Position y Coordinate (other Vtx)",100,vposy-0.1,vposy+0.1);
108  zrec[0] = iBooker.book1D("otherPosZ","Position z Coordinate (other Vtx)",100,-20.,20.);
109  xDiff[0] = iBooker.book1D("otherDiffX","X distance from BeamSpot (other Vtx)",100,-500,500);
110  yDiff[0] = iBooker.book1D("otherDiffY","Y distance from BeamSpot (other Vtx)",100,-500,500);
111  xerr[0] = iBooker.book1D("otherErrX","Uncertainty x Coordinate (other Vtx)",100,0.,100);
112  yerr[0] = iBooker.book1D("otherErrY","Uncertainty y Coordinate (other Vtx)",100,0.,100);
113  zerr[0] = iBooker.book1D("otherErrZ","Uncertainty z Coordinate (other Vtx)",100,0.,100);
114  xerrVsTrks[0] = iBooker.book2D("otherErrVsWeightX","Uncertainty x Coordinate vs. track weight (other Vtx)",100,0,100.,100,0.,100);
115  yerrVsTrks[0] = iBooker.book2D("otherErrVsWeightY","Uncertainty y Coordinate vs. track weight (other Vtx)",100,0,100.,100,0.,100);
116  zerrVsTrks[0] = iBooker.book2D("otherErrVsWeightZ","Uncertainty z Coordinate vs. track weight (other Vtx)",100,0,100.,100,0.,100);
117 
118 
119  xrec[1] = iBooker.book1D("tagPosX","Position x Coordinate (tagged Vtx)",100,vposx-0.1,vposx+0.1);
120  yrec[1] = iBooker.book1D("tagPosY","Position y Coordinate (tagged Vtx)",100,vposx-0.1,vposy+0.1);
121  zrec[1] = iBooker.book1D("tagPosZ","Position z Coordinate (tagged Vtx)",100,-20.,20.);
122  xDiff[1] = iBooker.book1D("tagDiffX","X distance from BeamSpot (tagged Vtx)",100,-500, 500);
123  yDiff[1] = iBooker.book1D("tagDiffY","Y distance from BeamSpot (tagged Vtx)",100,-500, 500);
124  xerr[1] = iBooker.book1D("tagErrX","Uncertainty x Coordinate (tagged Vtx)",100,0.,100);
125  yerr[1] = iBooker.book1D("tagErrY","Uncertainty y Coordinate (tagged Vtx)",100,0.,100);
126  zerr[1] = iBooker.book1D("tagErrZ","Uncertainty z Coordinate (tagged Vtx)",100,0.,100);
127  xerrVsTrks[1] = iBooker.book2D("tagErrVsWeightX","Uncertainty x Coordinate vs. track weight (tagged Vtx)",100,0,100.,100,0.,100);
128  yerrVsTrks[1] = iBooker.book2D("tagErrVsWeightY","Uncertainty y Coordinate vs. track weight (tagged Vtx)",100,0,100.,100,0.,100);
129  zerrVsTrks[1] = iBooker.book2D("tagErrVsWeightZ","Uncertainty z Coordinate vs. track weight (tagged Vtx)",100,0,100.,100,0.,100);
130 
131  type[0] = iBooker.book1D("otherType","Vertex type (other Vtx)",3,-0.5,2.5);
132  type[1] = iBooker.book1D("tagType","Vertex type (tagged Vtx)",3,-0.5,2.5);
133  for (int i=0;i<2;++i){
134  type[i]->getTH1F()->GetXaxis()->SetBinLabel(1,"Valid, real");
135  type[i]->getTH1F()->GetXaxis()->SetBinLabel(2,"Valid, fake");
136  type[i]->getTH1F()->GetXaxis()->SetBinLabel(3,"Invalid");
137  }
138 
139 
140  // get the store
141  dqmLabel = TopFolderName_+"/"+beamSpotInputTag_.label();
142  iBooker.setCurrentFolder(dqmLabel);
143 
144  bsX = iBooker.book1D("bsX", "BeamSpot x0", 100,-0.1,0.1);
145  bsY = iBooker.book1D("bsY", "BeamSpot y0", 100,-0.1,0.1);
146  bsZ = iBooker.book1D("bsZ", "BeamSpot z0", 100,-2.,2.);
147  bsSigmaZ = iBooker.book1D("bsSigmaZ", "BeamSpot sigmaZ", 100, 0., 10. );
148  bsDxdz = iBooker.book1D("bsDxdz", "BeamSpot dxdz", 100, -0.0003, 0.0003);
149  bsDydz = iBooker.book1D("bsDydz", "BeamSpot dydz", 100, -0.0003, 0.0003);
150  bsBeamWidthX = iBooker.book1D("bsBeamWidthX", "BeamSpot BeamWidthX", 100, 0., 100.);
151  bsBeamWidthY = iBooker.book1D("bsBeamWidthY", "BeamSpot BeamWidthY", 100, 0., 100.);
152  bsType = iBooker.book1D("bsType", "BeamSpot type", 4, -1.5, 2.5);
153  bsType->getTH1F()->GetXaxis()->SetBinLabel(1,"Unknown");
154  bsType->getTH1F()->GetXaxis()->SetBinLabel(2,"Fake");
155  bsType->getTH1F()->GetXaxis()->SetBinLabel(3,"LHC");
156  bsType->getTH1F()->GetXaxis()->SetBinLabel(4,"Tracker");
157 
158 
159  // get the store
160  dqmLabel = TopFolderName_+"/"+AlignmentLabel_;
161  iBooker.setCurrentFolder(dqmLabel);
162 
163  int TKNoBin = conf_.getParameter<int>( "TkSizeBin");
164  double TKNoMin = conf_.getParameter<double>("TkSizeMin");
165  double TKNoMax = conf_.getParameter<double>("TkSizeMax");
166 
167  int DxyBin = conf_.getParameter<int>( "DxyBin");
168  double DxyMin = conf_.getParameter<double>("DxyMin");
169  double DxyMax = conf_.getParameter<double>("DxyMax");
170 
171  int DzBin = conf_.getParameter<int>( "DzBin");
172  double DzMin = conf_.getParameter<double>("DzMin");
173  double DzMax = conf_.getParameter<double>("DzMax");
174 
175  int PhiBin = conf_.getParameter<int>( "PhiBin");
176  double PhiMin = conf_.getParameter<double>("PhiMin");
177  double PhiMax = conf_.getParameter<double>("PhiMax");
178 
179  int EtaBin = conf_.getParameter<int>( "EtaBin");
180  double EtaMin = conf_.getParameter<double>("EtaMin");
181  double EtaMax = conf_.getParameter<double>("EtaMax");
182 
183 
184  ntracks = iBooker.book1D("ntracks","number of PV tracks (p_{T} > 1 GeV)", TKNoBin, TKNoMin, TKNoMax);
185  ntracks->setAxisTitle("Number of PV Tracks (p_{T} > 1 GeV) per Event", 1);
186  ntracks->setAxisTitle("Number of Event", 2);
187 
188  weight = iBooker.book1D("weight","weight of PV tracks (p_{T} > 1 GeV)", 100, 0., 1.);
189  weight->setAxisTitle("weight of PV Tracks (p_{T} > 1 GeV) per Event", 1);
190  weight->setAxisTitle("Number of Event", 2);
191 
192  sumpt = iBooker.book1D("sumpt", "#Sum p_{T} of PV tracks (p_{T} > 1 GeV)", 100,-0.5,249.5);
193  chi2ndf = iBooker.book1D("chi2ndf", "PV tracks (p_{T} > 1 GeV) #chi^{2}/ndof", 100, 0., 20. );
194  chi2prob = iBooker.book1D("chi2prob","PV tracks (p_{T} > 1 GeV) #chi^{2} probability",100, 0., 1. );
195  dxy = iBooker.book1D("dxy", "PV tracks (p_{T} > 1 GeV) d_{xy} (cm)", DxyBin, DxyMin, DxyMax);
196  dxy2 = iBooker.book1D("dxyzoom", "PV tracks (p_{T} > 1 GeV) d_{xy} (cm)", DxyBin, DxyMin/5., DxyMax/5.);
197  dz = iBooker.book1D("dz", "PV tracks (p_{T} > 1 GeV) d_{z} (cm)", DzBin, DzMin, DzMax );
198  dxyErr = iBooker.book1D("dxyErr", "PV tracks (p_{T} > 1 GeV) d_{xy} error (cm)", 100, 0., 0.2 );
199  dzErr = iBooker.book1D("dzErr", "PV tracks (p_{T} > 1 GeV) d_{z} error(cm)", 100, 0., 1. );
200 
201  dxyVsPhi_pt1 = iBooker.bookProfile("dxyVsPhi_pt1", "PV tracks (p_{T} > 1 GeV) d_{xy} (cm) VS track #phi",PhiBin, PhiMin, PhiMax, DxyBin, DxyMin, DxyMax,"");
202  dxyVsPhi_pt1->setAxisTitle("PV track (p_{T} > 1 GeV) #phi", 1);
203  dxyVsPhi_pt1->setAxisTitle("PV track (p_{T} > 1 GeV) d_{xy}",2);
204  dzVsPhi_pt1 = iBooker.bookProfile("dzVsPhi_pt1", "PV tracks (p_{T} > 1 GeV) d_{z} (cm) VS track #phi", PhiBin, PhiMin, PhiMax, DzBin, DzMin, DzMax, "");
205  dzVsPhi_pt1->setAxisTitle("PV track (p_{T} > 1 GeV) #phi", 1);
206  dzVsPhi_pt1->setAxisTitle("PV track (p_{T} > 1 GeV) d_{z}",2);
207 
208  dxyVsEta_pt1 = iBooker.bookProfile("dxyVsEta_pt1", "PV tracks (p_{T} > 1 GeV) d_{xy} (cm) VS track #eta",EtaBin, EtaMin, EtaMax, DxyBin, DxyMin, DxyMax,"");
209  dxyVsEta_pt1->setAxisTitle("PV track (p_{T} > 1 GeV) #eta", 1);
210  dxyVsEta_pt1->setAxisTitle("PV track (p_{T} > 1 GeV) d_{xy}",2);
211  dzVsEta_pt1 = iBooker.bookProfile("dzVsEta_pt1", "PV tracks (p_{T} > 1 GeV) d_{z} (cm) VS track #eta", EtaBin, EtaMin, EtaMax, DzBin, DzMin, DzMax, "");
212  dzVsEta_pt1->setAxisTitle("PV track (p_{T} > 1 GeV) #eta", 1);
213  dzVsEta_pt1->setAxisTitle("PV track (p_{T} > 1 GeV) d_{z}",2);
214 
215  dxyVsPhi_pt10 = iBooker.bookProfile("dxyVsPhi_pt10", "PV tracks (p_{T} > 1 GeV) d_{xy} (cm) VS track #phi",PhiBin, PhiMin, PhiMax, DxyBin, DxyMin, DxyMax,"");
216  dxyVsPhi_pt10->setAxisTitle("PV track (p_{T} > 10 GeV) #phi", 1);
217  dxyVsPhi_pt10->setAxisTitle("PV track (p_{T} > 10 GeV) d_{xy}",2);
218  dzVsPhi_pt10 = iBooker.bookProfile("dzVsPhi_pt10", "PV tracks (p_{T} > 10 GeV) d_{z} (cm) VS track #phi", PhiBin, PhiMin, PhiMax, DzBin, DzMin, DzMax, "");
219  dzVsPhi_pt10->setAxisTitle("PV track (p_{T} > 10 GeV) #phi", 1);
220  dzVsPhi_pt10->setAxisTitle("PV track (p_{T} > 10 GeV) d_{z}",2);
221 
222  dxyVsEta_pt10 = iBooker.bookProfile("dxyVsEta_pt10", "PV tracks (p_{T} > 10 GeV) d_{xy} (cm) VS track #eta",EtaBin, EtaMin, EtaMax, DxyBin, DxyMin, DxyMax,"");
223  dxyVsEta_pt10->setAxisTitle("PV track (p_{T} > 10 GeV) #eta", 1);
224  dxyVsEta_pt10->setAxisTitle("PV track (p_{T} > 10 GeV) d_{xy}",2);
225  dzVsEta_pt10 = iBooker.bookProfile("dzVsEta_pt10", "PV tracks (p_{T} > 10 GeV) d_{z} (cm) VS track #eta", EtaBin, EtaMin, EtaMax, DzBin, DzMin, DzMax, "");
226  dzVsEta_pt10->setAxisTitle("PV track (p_{T} > 10 GeV) #eta", 1);
227  dzVsEta_pt10->setAxisTitle("PV track (p_{T} > 10 GeV) d_{z}",2);
228 
229 }
230 
231 
233 {}
234 
236 {
238  iEvent.getByToken(vertexToken_, recVtxs);
239 
240  edm::Handle<reco::BeamSpot> beamSpotHandle;
241  iEvent.getByToken(beamspotToken_,beamSpotHandle);
242 
243  //
244  // check for absent products and simply "return" in that case
245  //
246  if (recVtxs.isValid() == false || beamSpotHandle.isValid()== false){
247  edm::LogWarning("PrimaryVertexMonitor")
248  <<" Some products not available in the event: VertexCollection "
249  <<vertexInputTag_<<" "
250  <<recVtxs.isValid() <<" BeamSpot "
251  <<beamSpotInputTag_<<" "
252  <<beamSpotHandle.isValid()<<". Skipping plots for this event";
253  return;
254  }
255 
256  BeamSpot beamSpot = *beamSpotHandle;
257 
258  nbvtx->Fill(recVtxs->size()*1.);
259  int ng=0;
260  for (auto const & vx : (*recVtxs) )
261  if (vx.isValid() && !vx.isFake() && vx.ndof()>=4.) ++ng;
262  nbgvtx->Fill(ng*1.);
263 
264  vertexPlots(recVtxs->front(), beamSpot, 1);
265 
266  // fill PV tracks MEs (as now, for alignment)
267  pvTracksPlots(recVtxs->front());
268 
269  for(reco::VertexCollection::const_iterator v=recVtxs->begin()+1;
270  v!=recVtxs->end(); ++v){
271  vertexPlots(*v, beamSpot, 0);
272  }
273  // Beamline plots:
274  bsX->Fill(beamSpot.x0());
275  bsY->Fill(beamSpot.y0());
276  bsZ->Fill(beamSpot.z0());
277  bsSigmaZ->Fill(beamSpot.sigmaZ());
278  bsDxdz->Fill(beamSpot.dxdz());
279  bsDydz->Fill(beamSpot.dydz());
280  bsBeamWidthX->Fill(beamSpot.BeamWidthX()*10000);
281  bsBeamWidthY->Fill(beamSpot.BeamWidthY()*10000);
282  // bsType->Fill(beamSpot.type());
283 
284 }
285 
286 void
288 {
289 
290  const math::XYZPoint myVertex(v.position().x(),v.position().y(),v.position().z());
291 
292  if ( !v.isValid() ) return;
293  if ( v.isFake() ) return;
294 
295  if ( v.tracksSize() == 0 ) {
296  ntracks -> Fill ( 0 );
297  return;
298  }
299 
300  size_t nTracks = 0;
301  float sumPT = 0.;
303 
304  bool isHighPurity = (**t).quality(reco::TrackBase::highPurity);
305  if ( !isHighPurity ) continue;
306 
307  float pt = (**t).pt();
308  if ( pt < 1. ) continue;
309 
310  nTracks++;
311 
312  float eta = (**t).eta();
313  float phi = (**t).phi();
314 
315  float w = v.trackWeight(*t);
316  float chi2NDF = (**t).normalizedChi2();
317  float chi2Prob = TMath::Prob((**t).chi2(),(int)(**t).ndof());
318  float Dxy = (**t).dxy(myVertex);
319  float Dz = (**t).dz(myVertex);
320  float DxyErr = (**t).dxyError();
321  float DzErr = (**t).dzError();
322 
323  sumPT += pt*pt;
324 
325 
326  // fill MEs
327  weight -> Fill (w);
328  chi2ndf -> Fill (chi2NDF);
329  chi2prob -> Fill (chi2Prob);
330  dxy -> Fill (Dxy);
331  dxy2 -> Fill (Dxy);
332  dz -> Fill (Dz);
333  dxyErr -> Fill (DxyErr);
334  dzErr -> Fill (DzErr);
335 
336  dxyVsPhi_pt1 -> Fill (phi,Dxy);
337  dzVsPhi_pt1 -> Fill (phi,Dz);
338  dxyVsEta_pt1 -> Fill (eta,Dxy);
339  dzVsEta_pt1 -> Fill (eta,Dz);
340 
341  if ( pt < 10. ) continue;
342  dxyVsPhi_pt10 -> Fill (phi,Dxy);
343  dzVsPhi_pt10 -> Fill (phi,Dz);
344  dxyVsEta_pt10 -> Fill (eta,Dxy);
345  dzVsEta_pt10 -> Fill (eta,Dz);
346  }
347  ntracks -> Fill (float(nTracks));
348  sumpt -> Fill (sumPT);
349 
350 }
351 
353 {
354 
355  if (i < 0 || i > 1) return;
356  if (!v.isValid()) type[i]->Fill(2.);
357  else if (v.isFake()) type[i]->Fill(1.);
358  else type[i]->Fill(0.);
359 
360  if (v.isValid() && !v.isFake()) {
361  float weight = 0;
363  t!=v.tracks_end(); t++) weight+= v.trackWeight(*t);
364  trksWeight[i]->Fill(weight);
365  nbtksinvtx[i]->Fill(v.tracksSize());
366  ntracksVsZ[i]->Fill(v.position().z()- beamSpot.z0(),v.tracksSize());
367 
368  vtxchi2[i]->Fill(v.chi2());
369  vtxndf[i]->Fill(v.ndof());
371 
372  xrec[i]->Fill(v.position().x());
373  yrec[i]->Fill(v.position().y());
374  zrec[i]->Fill(v.position().z());
375 
376  float xb = beamSpot.x0() + beamSpot.dxdz() * (v.position().z() - beamSpot.z0());
377  float yb = beamSpot.y0() + beamSpot.dydz() * (v.position().z() - beamSpot.z0());
378  xDiff[i]->Fill((v.position().x() - xb)*10000);
379  yDiff[i]->Fill((v.position().y() - yb)*10000);
380 
381  xerr[i]->Fill(v.xError()*10000);
382  yerr[i]->Fill(v.yError()*10000);
383  zerr[i]->Fill(v.zError()*10000);
384  xerrVsTrks[i]->Fill(weight, v.xError()*10000);
385  yerrVsTrks[i]->Fill(weight, v.yError()*10000);
386  zerrVsTrks[i]->Fill(weight, v.zError()*10000);
387 
388  nans[i]->Fill(1.,edm::isNotFinite(v.position().x())*1.);
389  nans[i]->Fill(2.,edm::isNotFinite(v.position().y())*1.);
390  nans[i]->Fill(3.,edm::isNotFinite(v.position().z())*1.);
391 
392  int index = 3;
393  for (int k = 0; k != 3; k++) {
394  for (int j = k; j != 3; j++) {
395  index++;
396  nans[i]->Fill(index*1., edm::isNotFinite(v.covariance(k, j))*1.);
397  // in addition, diagonal element must be positive
398  if (j == k && v.covariance(k, j) < 0) {
399  nans[i]->Fill(index*1., 1.);
400  }
401  }
402  }
403  }
404 }
405 
406 //define this as a plug-in
type
Definition: HCALResponse.h:21
MonitorElement * xerrVsTrks[2]
T getParameter(std::string const &) const
double z0() const
z coordinate
Definition: BeamSpot.h:68
MonitorElement * xerr[2]
tuple t
Definition: tree.py:139
int i
Definition: DBlmapReader.cc:9
MonitorElement * vtxndf[2]
MonitorElement * dxyVsEta_pt1
MonitorElement * dzVsPhi_pt10
MonitorElement * dzVsPhi_pt1
const double w
Definition: UKUtility.cc:23
void pvTracksPlots(const reco::Vertex &v)
trackRef_iterator tracks_end() const
last iterator over tracks
Definition: Vertex.cc:44
MonitorElement * bookProfile(Args &&...args)
Definition: DQMStore.h:157
void vertexPlots(const reco::Vertex &v, const reco::BeamSpot &beamSpot, int i)
bool getByToken(EDGetToken token, Handle< PROD > &result) const
Definition: Event.h:464
double zError() const
error on z
Definition: Vertex.h:118
#define DEFINE_FWK_MODULE(type)
Definition: MakerMacros.h:17
MonitorElement * bsSigmaZ
edm::InputTag beamSpotInputTag_
bool isValid() const
Tells whether the vertex is valid.
Definition: Vertex.h:60
#define NULL
Definition: scimark2.h:8
MonitorElement * chi2ndf
double covariance(int i, int j) const
(i, j)-th element of error matrix, i, j = 0, ... 2
Definition: Vertex.h:123
MonitorElement * dxyVsPhi_pt10
MonitorElement * xDiff[2]
const Point & position() const
position
Definition: Vertex.h:106
MonitorElement * dzVsEta_pt1
MonitorElement * ntracksVsZ[2]
edm::ParameterSet conf_
void Fill(long long x)
MonitorElement * zerrVsTrks[2]
MonitorElement * nans[2]
double dydz() const
dydz slope
Definition: BeamSpot.h:84
int iEvent
Definition: GenABIO.cc:230
bool isNotFinite(T x)
Definition: isFinite.h:10
MonitorElement * yerrVsTrks[2]
virtual void bookHistograms(DQMStore::IBooker &, edm::Run const &, edm::EventSetup const &) override
MonitorElement * dxyVsEta_pt10
void Fill(HcalDetId &id, double val, std::vector< TH2F > &depth)
MonitorElement * zerr[2]
float trackWeight(const TrackBaseRef &r) const
returns the weight with which a Track has contributed to the vertex-fit.
MonitorElement * yrec[2]
MonitorElement * book1D(Args &&...args)
Definition: DQMStore.h:115
double chi2() const
chi-squares
Definition: Vertex.h:95
int j
Definition: DBlmapReader.cc:9
float ChiSquaredProbability(double chiSquared, double nrDOF)
double BeamWidthX() const
beam width X
Definition: BeamSpot.h:86
MonitorElement * zrec[2]
const double EtaMin[kNumberCalorimeter]
MonitorElement * vtxchi2[2]
edm::EDGetTokenT< reco::BeamSpot > beamspotToken_
edm::EDGetTokenT< reco::VertexCollection > vertexToken_
bool isValid() const
Definition: HandleBase.h:75
double dxdz() const
dxdz slope
Definition: BeamSpot.h:82
double ndof() const
Definition: Vertex.h:102
MonitorElement * dzVsEta_pt10
double xError() const
error on x
Definition: Vertex.h:114
void setCurrentFolder(const std::string &fullpath)
Definition: DQMStore.cc:274
bool isFake() const
Definition: Vertex.h:64
MonitorElement * chi2prob
MonitorElement * book2D(Args &&...args)
Definition: DQMStore.h:133
XYZPointD XYZPoint
point in space with cartesian internal representation
Definition: Point3D.h:12
MonitorElement * nbtksinvtx[2]
double sigmaZ() const
sigma z
Definition: BeamSpot.h:80
TH1F * getTH1F(void) const
double BeamWidthY() const
beam width Y
Definition: BeamSpot.h:88
std::string const & label() const
Definition: InputTag.h:43
MonitorElement * yerr[2]
virtual void analyze(const edm::Event &, const edm::EventSetup &) override
std::vector< TrackBaseRef >::const_iterator trackRef_iterator
The iteratator for the vector&lt;TrackRef&gt;
Definition: Vertex.h:37
double y0() const
y coordinate
Definition: BeamSpot.h:66
MonitorElement * xrec[2]
MonitorElement * vtxprob[2]
MonitorElement * ntracks
trackRef_iterator tracks_begin() const
first iterator over tracks
Definition: Vertex.cc:39
MonitorElement * bsBeamWidthY
int weight
Definition: histoStyle.py:50
void setAxisTitle(const std::string &title, int axis=1)
set x-, y- or z-axis title (axis=1, 2, 3 respectively)
MonitorElement * yDiff[2]
double yError() const
error on y
Definition: Vertex.h:116
MonitorElement * trksWeight[2]
size_t tracksSize() const
number of tracks
Definition: Vertex.cc:34
PrimaryVertexMonitor(const edm::ParameterSet &pSet)
Definition: Run.h:43
MonitorElement * bsBeamWidthX
MonitorElement * dxyVsPhi_pt1
double x0() const
x coordinate
Definition: BeamSpot.h:64