CMS 3D CMS Logo

PrimaryVertexValidation.cc
Go to the documentation of this file.
1 // -*- C++ -*-
2 //
3 // Package: Alignment/OfflineValidation
4 // Class: PrimaryVertexValidation
5 //
13 //
14 // Original Author: Marco Musich
15 // Created: Tue Mar 02 10:39:34 CDT 2010
16 //
17 
18 // system include files
19 #include <memory>
20 #include <vector>
21 #include <regex>
22 #include <cassert>
23 #include <chrono>
24 #include <iomanip>
25 #include <boost/range/adaptor/indexed.hpp>
26 
27 // user include files
29 
30 // ROOT includes
31 #include "TH1F.h"
32 #include "TH2F.h"
33 #include "TF1.h"
34 #include "TVector3.h"
35 #include "TFile.h"
36 #include "TMath.h"
37 #include "TROOT.h"
38 #include "TChain.h"
39 #include "TNtuple.h"
40 #include "TMatrixD.h"
41 #include "TVectorD.h"
42 
43 // CMSSW includes
62 
64 
65 // Constructor
67  : magFieldToken_(esConsumes<MagneticField, IdealMagneticFieldRecord>()),
68  trackingGeomToken_(esConsumes<GlobalTrackingGeometry, GlobalTrackingGeometryRecord>()),
69  geomToken_(esConsumes<TrackerGeometry, TrackerDigiGeometryRecord>()),
70  ttkToken_(esConsumes<TransientTrackBuilder, TransientTrackRecord>(edm::ESInputTag("", "TransientTrackBuilder"))),
71  topoToken_(esConsumes<TrackerTopology, TrackerTopologyRcd>()),
72  runInfoToken_(esConsumes<RunInfo, RunInfoRcd>()),
73  compressionSettings_(iConfig.getUntrackedParameter<int>("compressionSettings", -1)),
74  storeNtuple_(iConfig.getParameter<bool>("storeNtuple")),
75  lightNtupleSwitch_(iConfig.getParameter<bool>("isLightNtuple")),
76  useTracksFromRecoVtx_(iConfig.getParameter<bool>("useTracksFromRecoVtx")),
77  vertexZMax_(iConfig.getUntrackedParameter<double>("vertexZMax", 99.)),
78  intLumi_(iConfig.getUntrackedParameter<double>("intLumi", 0.)),
79  askFirstLayerHit_(iConfig.getParameter<bool>("askFirstLayerHit")),
80  doBPix_(iConfig.getUntrackedParameter<bool>("doBPix", true)),
81  doFPix_(iConfig.getUntrackedParameter<bool>("doFPix", true)),
82  ptOfProbe_(iConfig.getUntrackedParameter<double>("probePt", 0.)),
83  pOfProbe_(iConfig.getUntrackedParameter<double>("probeP", 0.)),
84  etaOfProbe_(iConfig.getUntrackedParameter<double>("probeEta", 2.4)),
85  nHitsOfProbe_(iConfig.getUntrackedParameter<double>("probeNHits", 0.)),
86  nBins_(iConfig.getUntrackedParameter<int>("numberOfBins", 24)),
87  minPt_(iConfig.getUntrackedParameter<double>("minPt", 1.)),
88  maxPt_(iConfig.getUntrackedParameter<double>("maxPt", 20.)),
89  debug_(iConfig.getParameter<bool>("Debug")),
90  runControl_(iConfig.getUntrackedParameter<bool>("runControl", false)),
91  forceBeamSpotContraint_(iConfig.getUntrackedParameter<bool>("forceBeamSpot", false)) {
92  // now do what ever initialization is needed
93  // initialize phase space boundaries
94 
95  usesResource(TFileService::kSharedResource);
96 
97  std::vector<unsigned int> defaultRuns;
98  defaultRuns.push_back(0);
99  runControlNumbers_ = iConfig.getUntrackedParameter<std::vector<unsigned int>>("runControlNumber", defaultRuns);
100 
101  edm::InputTag TrackCollectionTag_ = iConfig.getParameter<edm::InputTag>("TrackCollectionTag");
102  theTrackCollectionToken = consumes<reco::TrackCollection>(TrackCollectionTag_);
103 
104  edm::InputTag VertexCollectionTag_ = iConfig.getParameter<edm::InputTag>("VertexCollectionTag");
105  theVertexCollectionToken = consumes<reco::VertexCollection>(VertexCollectionTag_);
106 
107  edm::InputTag BeamspotTag_ = iConfig.getParameter<edm::InputTag>("BeamSpotTag");
108  theBeamspotToken = consumes<reco::BeamSpot>(BeamspotTag_);
109 
110  // select and configure the track filter
112  std::make_unique<TrackFilterForPVFinding>(iConfig.getParameter<edm::ParameterSet>("TkFilterParameters"));
113  // select and configure the track clusterizer
114  std::string clusteringAlgorithm =
115  iConfig.getParameter<edm::ParameterSet>("TkClusParameters").getParameter<std::string>("algorithm");
116  if (clusteringAlgorithm == "gap") {
118  std::make_unique<GapClusterizerInZ>(iConfig.getParameter<edm::ParameterSet>("TkClusParameters")
119  .getParameter<edm::ParameterSet>("TkGapClusParameters"));
120  } else if (clusteringAlgorithm == "DA") {
122  std::make_unique<DAClusterizerInZ>(iConfig.getParameter<edm::ParameterSet>("TkClusParameters")
123  .getParameter<edm::ParameterSet>("TkDAClusParameters"));
124  // provide the vectorized version of the clusterizer, if supported by the build
125  } else if (clusteringAlgorithm == "DA_vect") {
127  std::make_unique<DAClusterizerInZ_vect>(iConfig.getParameter<edm::ParameterSet>("TkClusParameters")
128  .getParameter<edm::ParameterSet>("TkDAClusParameters"));
129  } else {
130  throw VertexException("PrimaryVertexProducerAlgorithm: unknown clustering algorithm: " + clusteringAlgorithm);
131  }
132 
133  theDetails_.histobins = 500;
140 
141  for (int i = PVValHelper::phi; i < PVValHelper::END_OF_PLOTS; i++) {
142  for (int j = PVValHelper::dx; j < PVValHelper::END_OF_TYPES; j++) {
143  auto plot_index = static_cast<PVValHelper::plotVariable>(i);
144  auto res_index = static_cast<PVValHelper::residualType>(j);
145 
146  if (debug_) {
147  edm::LogInfo("PrimaryVertexValidation")
148  << "==> " << std::get<0>(PVValHelper::getTypeString(res_index)) << " " << std::setw(10)
149  << std::get<0>(PVValHelper::getVarString(plot_index)) << std::endl;
150  }
151  if (res_index != PVValHelper::d3D && res_index != PVValHelper::norm_d3D)
152  theDetails_.setMap(res_index,
153  plot_index,
154  theDetails_.getLow(PVValHelper::dxy, plot_index),
155  theDetails_.getHigh(PVValHelper::dxy, plot_index));
156  else
157  theDetails_.setMap(res_index, plot_index, 0., theDetails_.getHigh(PVValHelper::dxy, plot_index));
158  }
159  }
160 
161  edm::LogVerbatim("PrimaryVertexValidation") << "######################################";
162  for (const auto& it : theDetails_.range) {
163  edm::LogVerbatim("PrimaryVertexValidation")
164  << "|" << std::setw(10) << std::get<0>(PVValHelper::getTypeString(it.first.first)) << "|" << std::setw(10)
165  << std::get<0>(PVValHelper::getVarString(it.first.second)) << "| (" << std::setw(5) << it.second.first << ";"
166  << std::setw(5) << it.second.second << ") |" << std::endl;
167  }
168 
171 
172  if (debug_) {
173  edm::LogVerbatim("PrimaryVertexValidation") << "etaBins: ";
175  edm::LogVerbatim("PrimaryVertexValidation") << ieta << " ";
176  }
177  edm::LogVerbatim("PrimaryVertexValidation") << "\n";
178 
179  edm::LogVerbatim("PrimaryVertexValidation") << "phiBins: ";
181  edm::LogVerbatim("PrimaryVertexValidation") << iphi << " ";
182  }
183  edm::LogVerbatim("PrimaryVertexValidation") << "\n";
184  }
185 
186  // create the bins of the pT-binned distributions
187 
188  mypT_bins_ = PVValHelper::makeLogBins<float, nPtBins_>(minPt_, maxPt_);
189 
190  std::string toOutput = "";
191  for (auto ptbin : mypT_bins_) {
192  toOutput += " ";
193  toOutput += std::to_string(ptbin);
194  toOutput += ",";
195  }
196 
197  edm::LogVerbatim("PrimaryVertexValidation") << "######################################\n";
198  edm::LogVerbatim("PrimaryVertexValidation") << "The pT binning is: [" << toOutput << "] \n";
199 }
200 
201 // Destructor
203  // do anything here that needs to be done at desctruction time
204  // (e.g. close files, deallocate resources etc.)
205 }
206 
207 //
208 // member functions
209 //
210 
211 // ------------ method called to for each event ------------
213  using namespace std;
214  using namespace reco;
215  using namespace IPTools;
216 
217  if (!isBFieldConsistentWithMode(iSetup)) {
218  edm::LogWarning("PrimaryVertexValidation")
219  << "*********************************************************************************\n"
220  << "* The configuration (ptOfProbe > " << ptOfProbe_
221  << "GeV) is not correctly set for current value of magnetic field \n"
222  << "* Switching it to 0. !!! \n"
223  << "*********************************************************************************" << std::endl;
224  ptOfProbe_ = 0.;
225  }
226 
227  if (nBins_ != 24 && debug_) {
228  edm::LogInfo("PrimaryVertexValidation") << "Using: " << nBins_ << " bins plots";
229  }
230 
231  bool passesRunControl = false;
232 
233  if (runControl_) {
234  for (const auto& runControlNumber : runControlNumbers_) {
235  if (iEvent.eventAuxiliary().run() == runControlNumber) {
236  if (debug_) {
237  edm::LogInfo("PrimaryVertexValidation")
238  << " run number: " << iEvent.eventAuxiliary().run() << " keeping run:" << runControlNumber;
239  }
240  passesRunControl = true;
241  break;
242  }
243  }
244  if (!passesRunControl)
245  return;
246  }
247 
248  Nevt_++;
249 
250  //=======================================================
251  // Initialize Root-tuple variables
252  //=======================================================
253 
254  SetVarToZero();
255 
256  //=======================================================
257  // Retrieve the Magnetic Field information
258  //=======================================================
259 
261 
262  //=======================================================
263  // Retrieve the Tracking Geometry information
264  //=======================================================
265 
267 
268  //=======================================================
269  // Retrieve geometry information
270  //=======================================================
271 
272  edm::LogInfo("read tracker geometry...");
274  edm::LogInfo("tracker geometry read") << "There are: " << pDD->dets().size() << " detectors";
275 
276  // switch on the phase1
278  isPhase1_ = true;
279  nLadders_ = 12;
280 
281  if (h_dxy_ladderOverlap_.size() != nLadders_) {
288 
289  if (debug_) {
290  edm::LogInfo("PrimaryVertexValidation") << "checking size:" << h_dxy_ladder_.size() << std::endl;
291  }
292  }
293 
294  if (debug_) {
295  edm::LogInfo("PrimaryVertexValidation") << " pixel phase1 setup, nLadders: " << nLadders_;
296  }
297 
298  } else {
299  isPhase1_ = false;
300  nLadders_ = 20;
301  if (debug_) {
302  edm::LogInfo("PrimaryVertexValidation") << " pixel phase0 setup, nLadders: " << nLadders_;
303  }
304  }
305 
306  if (isPhase1_) {
308  } else {
310  }
311 
312  if (h_etaMax->GetEntries() == 0.) {
313  h_etaMax->SetBinContent(1., etaOfProbe_);
314  h_nbins->SetBinContent(1., nBins_);
315  h_nLadders->SetBinContent(1., nLadders_);
316  h_pTinfo->SetBinContent(1., mypT_bins_.size());
317  h_pTinfo->SetBinContent(2., minPt_);
318  h_pTinfo->SetBinContent(3., maxPt_);
319  }
320 
321  //=======================================================
322  // Retrieve the Transient Track Builder information
323  //=======================================================
324 
326  double fBfield_ = ((*theB_).field()->inTesla(GlobalPoint(0., 0., 0.))).z();
327 
328  //=======================================================
329  // Retrieve the Track information
330  //=======================================================
331 
332  edm::Handle<TrackCollection> trackCollectionHandle;
333  iEvent.getByToken(theTrackCollectionToken, trackCollectionHandle);
334  if (!trackCollectionHandle.isValid())
335  return;
336  auto const& tracks = *trackCollectionHandle;
337 
338  //=======================================================
339  // Retrieve tracker topology from geometry
340  //=======================================================
341 
343  const TrackerTopology* const tTopo = tTopoHandle.product();
344 
345  //=======================================================
346  // Retrieve offline vartex information (only for reco)
347  //=======================================================
348 
349  //edm::Handle<VertexCollection> vertices;
351 
352  try {
354  } catch (cms::Exception& er) {
355  LogTrace("PrimaryVertexValidation") << "caught std::exception " << er.what() << std::endl;
356  }
357 
358  std::vector<Vertex> vsorted = *(vertices);
359  // sort the vertices by number of tracks in descending order
360  // use chi2 as tiebreaker
361  std::sort(vsorted.begin(), vsorted.end(), PrimaryVertexValidation::vtxSort);
362 
363  // skip events with no PV, this should not happen
364 
365  if (vsorted.empty())
366  return;
367 
368  // skip events failing vertex cut
369  if (std::abs(vsorted[0].z()) > vertexZMax_)
370  return;
371 
372  if (vsorted[0].isValid()) {
373  xOfflineVertex_ = (vsorted)[0].x();
374  yOfflineVertex_ = (vsorted)[0].y();
375  zOfflineVertex_ = (vsorted)[0].z();
376 
377  xErrOfflineVertex_ = (vsorted)[0].xError();
378  yErrOfflineVertex_ = (vsorted)[0].yError();
379  zErrOfflineVertex_ = (vsorted)[0].zError();
380  }
381 
388 
389  unsigned int vertexCollectionSize = vsorted.size();
390  int nvvertex = 0;
391 
392  for (unsigned int i = 0; i < vertexCollectionSize; i++) {
393  const Vertex& vertex = vsorted.at(i);
394  if (vertex.isValid())
395  nvvertex++;
396  }
397 
398  nOfflineVertices_ = nvvertex;
399  h_nOfflineVertices->Fill(nvvertex);
400 
401  if (!vsorted.empty() && useTracksFromRecoVtx_) {
402  double sumpt = 0;
403  size_t ntracks = 0;
404  double chi2ndf = 0.;
405  double chi2prob = 0.;
406 
407  if (!vsorted.at(0).isFake()) {
408  Vertex pv = vsorted.at(0);
409 
410  ntracks = pv.tracksSize();
411  chi2ndf = pv.normalizedChi2();
412  chi2prob = TMath::Prob(pv.chi2(), (int)pv.ndof());
413 
414  h_recoVtxNtracks_->Fill(ntracks);
415  h_recoVtxChi2ndf_->Fill(chi2ndf);
416  h_recoVtxChi2Prob_->Fill(chi2prob);
417 
418  for (Vertex::trackRef_iterator itrk = pv.tracks_begin(); itrk != pv.tracks_end(); ++itrk) {
419  double pt = (**itrk).pt();
420  sumpt += pt * pt;
421 
422  const math::XYZPoint myVertex(pv.position().x(), pv.position().y(), pv.position().z());
423 
424  double dxyRes = (**itrk).dxy(myVertex);
425  double dzRes = (**itrk).dz(myVertex);
426 
427  double dxy_err = (**itrk).dxyError();
428  double dz_err = (**itrk).dzError();
429 
430  float trackphi = ((**itrk).phi()) * (180 / M_PI);
431  float tracketa = (**itrk).eta();
432 
433  for (int i = 0; i < nBins_; i++) {
434  float phiF = theDetails_.trendbins[PVValHelper::phi][i];
435  float phiL = theDetails_.trendbins[PVValHelper::phi][i + 1];
436 
437  float etaF = theDetails_.trendbins[PVValHelper::eta][i];
438  float etaL = theDetails_.trendbins[PVValHelper::eta][i + 1];
439 
440  if (tracketa >= etaF && tracketa < etaL) {
443  PVValHelper::fillByIndex(n_dxyEtaBiasResiduals, i, (dxyRes) / dxy_err);
444  PVValHelper::fillByIndex(n_dzEtaBiasResiduals, i, (dzRes) / dz_err);
445  }
446 
447  if (trackphi >= phiF && trackphi < phiL) {
450  PVValHelper::fillByIndex(n_dxyPhiBiasResiduals, i, (dxyRes) / dxy_err);
451  PVValHelper::fillByIndex(n_dzPhiBiasResiduals, i, (dzRes) / dz_err);
452 
453  for (int j = 0; j < nBins_; j++) {
454  float etaJ = theDetails_.trendbins[PVValHelper::eta][j];
455  float etaK = theDetails_.trendbins[PVValHelper::eta][j + 1];
456 
457  if (tracketa >= etaJ && tracketa < etaK) {
458  a_dxyBiasResidualsMap[i][j]->Fill(dxyRes * cmToum);
459  a_dzBiasResidualsMap[i][j]->Fill(dzRes * cmToum);
460 
461  n_dxyBiasResidualsMap[i][j]->Fill((dxyRes) / dxy_err);
462  n_dzBiasResidualsMap[i][j]->Fill((dzRes) / dz_err);
463  }
464  }
465  }
466  }
467  }
468 
469  h_recoVtxSumPt_->Fill(sumpt);
470  }
471  }
472 
473  //=======================================================
474  // Retrieve Beamspot information
475  //=======================================================
476 
478  edm::Handle<BeamSpot> beamSpotHandle;
479  iEvent.getByToken(theBeamspotToken, beamSpotHandle);
480 
481  if (beamSpotHandle.isValid()) {
482  beamSpot = *beamSpotHandle;
483  BSx0_ = beamSpot.x0();
484  BSy0_ = beamSpot.y0();
485  BSz0_ = beamSpot.z0();
486  Beamsigmaz_ = beamSpot.sigmaZ();
487  Beamdxdz_ = beamSpot.dxdz();
488  BeamWidthX_ = beamSpot.BeamWidthX();
489  BeamWidthY_ = beamSpot.BeamWidthY();
490 
491  wxy2_ = TMath::Power(BeamWidthX_, 2) + TMath::Power(BeamWidthY_, 2);
492 
493  } else {
494  edm::LogWarning("PrimaryVertexValidation") << "No BeamSpot found!";
495  }
496 
497  h_BSx0->Fill(BSx0_);
498  h_BSy0->Fill(BSy0_);
499  h_BSz0->Fill(BSz0_);
500  h_Beamsigmaz->Fill(Beamsigmaz_);
501  h_BeamWidthX->Fill(BeamWidthX_);
502  h_BeamWidthY->Fill(BeamWidthY_);
503 
504  if (debug_)
505  edm::LogInfo("PrimaryVertexValidation") << "Beamspot x:" << BSx0_ << " y:" << BSy0_ << " z:" << BSz0_;
506 
507  //=======================================================
508  // Starts here ananlysis
509  //=======================================================
510 
511  RunNumber_ = iEvent.eventAuxiliary().run();
512  h_runNumber->Fill(RunNumber_);
513 
514  if (!runNumbersTimesLog_.count(RunNumber_)) {
515  auto times = getRunTime(iSetup);
516 
517  if (debug_) {
518  const time_t start_time = times.first / 1000000;
519  edm::LogInfo("PrimaryVertexValidation")
520  << RunNumber_ << " has start time: " << times.first << " - " << times.second << std::endl;
521  edm::LogInfo("PrimaryVertexValidation")
522  << "human readable time: " << std::asctime(std::gmtime(&start_time)) << std::endl;
523  }
524 
526  }
527 
528  if (h_runFromEvent->GetEntries() == 0) {
529  h_runFromEvent->SetBinContent(1, RunNumber_);
530  }
531 
532  LuminosityBlockNumber_ = iEvent.eventAuxiliary().luminosityBlock();
533  EventNumber_ = iEvent.eventAuxiliary().id().event();
534 
535  if (debug_)
536  edm::LogInfo("PrimaryVertexValidation") << " looping over " << trackCollectionHandle->size() << "tracks";
537 
538  h_nTracks->Fill(trackCollectionHandle->size());
539 
540  //======================================================
541  // Interface RECO tracks to vertex reconstruction
542  //======================================================
543 
544  std::vector<TransientTrack> t_tks;
545  for (const auto& track : tracks) {
546  TransientTrack tt = theB_->build(&(track));
547  tt.setBeamSpot(beamSpot);
548  t_tks.push_back(tt);
549  }
550 
551  if (debug_) {
552  edm::LogInfo("PrimaryVertexValidation") << "Found: " << t_tks.size() << " reconstructed tracks";
553  }
554 
555  //======================================================
556  // select the tracks
557  //======================================================
558 
559  std::vector<TransientTrack> seltks = theTrackFilter_->select(t_tks);
560 
561  //======================================================
562  // clusterize tracks in Z
563  //======================================================
564 
565  vector<vector<TransientTrack>> clusters = theTrackClusterizer_->clusterize(seltks);
566 
567  if (debug_) {
568  edm::LogInfo("PrimaryVertexValidation")
569  << " looping over: " << clusters.size() << " clusters from " << t_tks.size() << " selected tracks";
570  }
571 
572  nClus_ = clusters.size();
573  h_nClus->Fill(nClus_);
574 
575  //======================================================
576  // Starts loop on clusters
577  //======================================================
578  for (const auto& iclus : clusters) {
579  nTracksPerClus_ = 0;
580 
581  unsigned int i = 0;
582  for (const auto& theTTrack : iclus) {
583  i++;
584 
585  if (nTracks_ >= nMaxtracks_) {
586  edm::LogError("PrimaryVertexValidation")
587  << " Warning - Number of tracks: " << nTracks_ << " , greater than " << nMaxtracks_;
588  continue;
589  }
590 
591  const Track& theTrack = theTTrack.track();
592 
593  pt_[nTracks_] = theTrack.pt();
594  p_[nTracks_] = theTrack.p();
595  nhits_[nTracks_] = theTrack.numberOfValidHits();
596  eta_[nTracks_] = theTrack.eta();
597  theta_[nTracks_] = theTrack.theta();
598  phi_[nTracks_] = theTrack.phi();
599  chi2_[nTracks_] = theTrack.chi2();
600  chi2ndof_[nTracks_] = theTrack.normalizedChi2();
601  charge_[nTracks_] = theTrack.charge();
602  qoverp_[nTracks_] = theTrack.qoverp();
603  dz_[nTracks_] = theTrack.dz();
604  dxy_[nTracks_] = theTrack.dxy();
605 
606  TrackBase::TrackQuality _trackQuality = TrackBase::qualityByName("highPurity");
607  isHighPurity_[nTracks_] = theTrack.quality(_trackQuality);
608 
610  dxyBs_[nTracks_] = theTrack.dxy(point);
611  dzBs_[nTracks_] = theTrack.dz(point);
612 
613  xPCA_[nTracks_] = theTrack.vertex().x();
614  yPCA_[nTracks_] = theTrack.vertex().y();
615  zPCA_[nTracks_] = theTrack.vertex().z();
616 
617  //=======================================================
618  // Retrieve rechit information
619  //=======================================================
620 
621  const reco::HitPattern& hits = theTrack.hitPattern();
622 
623  int nRecHit1D = 0;
624  int nRecHit2D = 0;
625  int nhitinTIB = hits.numberOfValidStripTIBHits();
626  int nhitinTOB = hits.numberOfValidStripTOBHits();
627  int nhitinTID = hits.numberOfValidStripTIDHits();
628  int nhitinTEC = hits.numberOfValidStripTECHits();
629  int nhitinBPIX = hits.numberOfValidPixelBarrelHits();
630  int nhitinFPIX = hits.numberOfValidPixelEndcapHits();
631  for (trackingRecHit_iterator iHit = theTTrack.recHitsBegin(); iHit != theTTrack.recHitsEnd(); ++iHit) {
632  if ((*iHit)->isValid()) {
633  if (this->isHit2D(**iHit)) {
634  ++nRecHit2D;
635  } else {
636  ++nRecHit1D;
637  }
638  }
639  }
640 
641  nhits1D_[nTracks_] = nRecHit1D;
642  nhits2D_[nTracks_] = nRecHit2D;
643  nhitsBPIX_[nTracks_] = nhitinBPIX;
644  nhitsFPIX_[nTracks_] = nhitinFPIX;
645  nhitsTIB_[nTracks_] = nhitinTIB;
646  nhitsTID_[nTracks_] = nhitinTID;
647  nhitsTOB_[nTracks_] = nhitinTOB;
648  nhitsTEC_[nTracks_] = nhitinTEC;
649 
650  //=======================================================
651  // Good tracks for vertexing selection
652  //=======================================================
653 
654  bool pass = true;
655  if (askFirstLayerHit_)
656  pass = this->hasFirstLayerPixelHits(theTTrack);
657  if (pass && (theTrack.pt() >= ptOfProbe_) && std::abs(theTrack.eta()) <= etaOfProbe_ &&
658  (theTrack.numberOfValidHits()) >= nHitsOfProbe_ && (theTrack.p()) >= pOfProbe_) {
659  isGoodTrack_[nTracks_] = 1;
660  }
661 
662  //=======================================================
663  // Fit unbiased vertex
664  //=======================================================
665 
666  vector<TransientTrack> theFinalTracks;
667  theFinalTracks.clear();
668 
669  for (const auto& tk : iclus) {
670  pass = this->hasFirstLayerPixelHits(tk);
671  if (pass) {
672  if (tk == theTTrack)
673  continue;
674  else {
675  theFinalTracks.push_back(tk);
676  }
677  }
678  }
679 
680  if (theFinalTracks.size() > 1) {
681  if (debug_)
682  edm::LogInfo("PrimaryVertexValidation") << "Transient Track Collection size: " << theFinalTracks.size();
683  try {
684  //AdaptiveVertexFitter* theFitter = new AdaptiveVertexFitter;
685  auto theFitter = std::unique_ptr<VertexFitter<5>>(new AdaptiveVertexFitter());
686  TransientVertex theFittedVertex;
687 
689  theFittedVertex = theFitter->vertex(theFinalTracks, beamSpot); // if you want the beam constraint
690  } else {
691  theFittedVertex = theFitter->vertex(theFinalTracks);
692  }
693 
694  double totalTrackWeights = 0;
695  if (theFittedVertex.isValid()) {
696  if (theFittedVertex.hasTrackWeight()) {
697  for (const auto& theFinalTrack : theFinalTracks) {
698  sumOfWeightsUnbiasedVertex_[nTracks_] += theFittedVertex.trackWeight(theFinalTrack);
699  totalTrackWeights += theFittedVertex.trackWeight(theFinalTrack);
700  h_fitVtxTrackWeights_->Fill(theFittedVertex.trackWeight(theFinalTrack));
701  }
702  }
703 
704  h_fitVtxTrackAverageWeight_->Fill(totalTrackWeights / theFinalTracks.size());
705 
707  const math::XYZPoint myVertex(
708  theFittedVertex.position().x(), theFittedVertex.position().y(), theFittedVertex.position().z());
709 
710  const Vertex vertex = theFittedVertex;
711  fillTrackHistos(hDA, "all", &theTTrack, vertex, beamSpot, fBfield_);
712 
713  hasRecVertex_[nTracks_] = 1;
714  xUnbiasedVertex_[nTracks_] = theFittedVertex.position().x();
715  yUnbiasedVertex_[nTracks_] = theFittedVertex.position().y();
716  zUnbiasedVertex_[nTracks_] = theFittedVertex.position().z();
717 
718  chi2normUnbiasedVertex_[nTracks_] = theFittedVertex.normalisedChiSquared();
719  chi2UnbiasedVertex_[nTracks_] = theFittedVertex.totalChiSquared();
720  DOFUnbiasedVertex_[nTracks_] = theFittedVertex.degreesOfFreedom();
722  TMath::Prob(theFittedVertex.totalChiSquared(), (int)theFittedVertex.degreesOfFreedom());
723  tracksUsedForVertexing_[nTracks_] = theFinalTracks.size();
724 
725  h_fitVtxNtracks_->Fill(theFinalTracks.size());
726  h_fitVtxChi2_->Fill(theFittedVertex.totalChiSquared());
727  h_fitVtxNdof_->Fill(theFittedVertex.degreesOfFreedom());
728  h_fitVtxChi2ndf_->Fill(theFittedVertex.normalisedChiSquared());
729  h_fitVtxChi2Prob_->Fill(
730  TMath::Prob(theFittedVertex.totalChiSquared(), (int)theFittedVertex.degreesOfFreedom()));
731 
732  // from my Vertex
733  double dxyFromMyVertex = theTrack.dxy(myVertex);
734  double dzFromMyVertex = theTrack.dz(myVertex);
735 
736  GlobalPoint vert(
737  theFittedVertex.position().x(), theFittedVertex.position().y(), theFittedVertex.position().z());
738 
739  //FreeTrajectoryState theTrackNearVertex = theTTrack.trajectoryStateClosestToPoint(vert).theState();
740  //double dz_err = sqrt(theFittedVertex.positionError().czz() + theTrackNearVertex.cartesianError().position().czz());
741  //double dz_err = hypot(theTrack.dzError(),theFittedVertex.positionError().czz());
742 
743  double dz_err = sqrt(std::pow(theTrack.dzError(), 2) + theFittedVertex.positionError().czz());
744 
745  // PV2D
746  std::pair<bool, Measurement1D> s_ip2dpv = signedTransverseImpactParameter(
747  theTTrack, GlobalVector(theTrack.px(), theTrack.py(), theTrack.pz()), theFittedVertex);
748 
749  double s_ip2dpv_corr = s_ip2dpv.second.value();
750  double s_ip2dpv_err = s_ip2dpv.second.error();
751 
752  // PV3D
753  std::pair<bool, Measurement1D> s_ip3dpv = signedImpactParameter3D(
754  theTTrack, GlobalVector(theTrack.px(), theTrack.py(), theTrack.pz()), theFittedVertex);
755 
756  double s_ip3dpv_corr = s_ip3dpv.second.value();
757  double s_ip3dpv_err = s_ip3dpv.second.error();
758 
759  // PV3D absolute
760  std::pair<bool, Measurement1D> ip3dpv = absoluteImpactParameter3D(theTTrack, theFittedVertex);
761  double ip3d_corr = ip3dpv.second.value();
762  double ip3d_err = ip3dpv.second.error();
763 
764  // with respect to any specified vertex, such as primary vertex
766 
767  GlobalPoint refPoint = traj.position();
768  GlobalPoint cPToVtx = traj.theState().position();
769 
770  float my_dx = refPoint.x() - myVertex.x();
771  float my_dy = refPoint.y() - myVertex.y();
772 
773  float my_dx2 = cPToVtx.x() - myVertex.x();
774  float my_dy2 = cPToVtx.y() - myVertex.y();
775 
776  float my_dxy = std::sqrt(my_dx * my_dx + my_dy * my_dy);
777 
779  //double d0_error = traj.perigeeError().transverseImpactParameterError();
781  double z0_error = traj.perigeeError().longitudinalImpactParameterError();
782 
783  if (debug_) {
784  edm::LogInfo("PrimaryVertexValidation")
785  << "my_dx:" << my_dx << " my_dy:" << my_dy << " my_dxy:" << my_dxy << " my_dx2:" << my_dx2
786  << " my_dy2:" << my_dy2 << " d0: " << d0 << " dxyFromVtx:" << dxyFromMyVertex << "\n"
787  << " ============================== "
788  << "\n"
789  << "diff1:" << std::abs(d0) - std::abs(my_dxy) << "\n"
790  << "diff2:" << std::abs(d0) - std::abs(dxyFromMyVertex) << "\n"
791  << "diff3:" << (my_dx - my_dx2) << " " << (my_dy - my_dy2) << "\n"
792  << std::endl;
793  }
794 
795  // define IPs
796 
797  dxyFromMyVertex_[nTracks_] = dxyFromMyVertex;
798  dxyErrorFromMyVertex_[nTracks_] = s_ip2dpv_err;
799  IPTsigFromMyVertex_[nTracks_] = dxyFromMyVertex / s_ip2dpv_err;
800 
801  dzFromMyVertex_[nTracks_] = dzFromMyVertex;
802  dzErrorFromMyVertex_[nTracks_] = dz_err;
803  IPLsigFromMyVertex_[nTracks_] = dzFromMyVertex / dz_err;
804 
805  d3DFromMyVertex_[nTracks_] = ip3d_corr;
806  d3DErrorFromMyVertex_[nTracks_] = ip3d_err;
807  IP3DsigFromMyVertex_[nTracks_] = (ip3d_corr / ip3d_err);
808 
809  // fill directly the histograms of residuals
810 
811  float trackphi = (theTrack.phi()) * (180. / M_PI);
812  float tracketa = theTrack.eta();
813  float trackpt = theTrack.pt();
814  float trackp = theTrack.p();
815  float tracknhits = theTrack.numberOfValidHits();
816 
817  // determine the module number and ladder
818 
819  int ladder_num = -1.;
820  int module_num = -1.;
821  int L1BPixHitCount = 0;
822 
823  for (auto const& hit : theTrack.recHits()) {
824  const DetId& detId = hit->geographicalId();
825  unsigned int subid = detId.subdetId();
826 
827  if (hit->isValid() && (subid == PixelSubdetector::PixelBarrel)) {
828  int layer = tTopo->pxbLayer(detId);
829  if (layer == 1) {
830  const SiPixelRecHit* prechit = dynamic_cast<const SiPixelRecHit*>(
831  hit); //to be used to get the associated cluster and the cluster probability
832  double clusterProbability = prechit->clusterProbability(0);
833  if (clusterProbability > 0) {
834  h_probeL1ClusterProb_->Fill(log10(clusterProbability));
835  }
836 
837  L1BPixHitCount += 1;
838  ladder_num = tTopo->pxbLadder(detId);
839  module_num = tTopo->pxbModule(detId);
840  }
841  }
842  }
843 
844  h_probeL1Ladder_->Fill(ladder_num);
845  h_probeL1Module_->Fill(module_num);
846  h2_probeLayer1Map_->Fill(module_num, ladder_num);
847  h_probeHasBPixL1Overlap_->Fill(L1BPixHitCount);
848 
849  // residuals vs ladder and module number for map
850  if (module_num > 0 && ladder_num > 0) { // only if we are on BPix Layer 1
851  a_dxyL1ResidualsMap[ladder_num - 1][module_num - 1]->Fill(dxyFromMyVertex * cmToum);
852  a_dzL1ResidualsMap[ladder_num - 1][module_num - 1]->Fill(dzFromMyVertex * cmToum);
853  n_dxyL1ResidualsMap[ladder_num - 1][module_num - 1]->Fill(dxyFromMyVertex / s_ip2dpv_err);
854  n_dzL1ResidualsMap[ladder_num - 1][module_num - 1]->Fill(dzFromMyVertex / dz_err);
855  }
856 
857  // filling the pT-binned distributions
858 
859  for (int ipTBin = 0; ipTBin < nPtBins_; ipTBin++) {
860  float pTF = mypT_bins_[ipTBin];
861  float pTL = mypT_bins_[ipTBin + 1];
862 
863  if (debug_)
864  edm::LogInfo("PrimaryVertexValidation") << "ipTBin:" << ipTBin << " " << mypT_bins_[ipTBin]
865  << " < pT < " << mypT_bins_[ipTBin + 1] << std::endl;
866 
867  if (std::abs(tracketa) < 1.5 && (trackpt >= pTF && trackpt < pTL)) {
868  if (debug_)
869  edm::LogInfo("PrimaryVertexValidation") << "passes this cut: " << mypT_bins_[ipTBin] << std::endl;
870  PVValHelper::fillByIndex(h_dxy_pT_, ipTBin, dxyFromMyVertex * cmToum);
871  PVValHelper::fillByIndex(h_dz_pT_, ipTBin, dzFromMyVertex * cmToum);
872  PVValHelper::fillByIndex(h_norm_dxy_pT_, ipTBin, dxyFromMyVertex / s_ip2dpv_err);
873  PVValHelper::fillByIndex(h_norm_dz_pT_, ipTBin, dzFromMyVertex / dz_err);
874 
875  if (std::abs(tracketa) < 1.) {
876  if (debug_)
877  edm::LogInfo("PrimaryVertexValidation")
878  << "passes tight eta cut: " << mypT_bins_[ipTBin] << std::endl;
879  PVValHelper::fillByIndex(h_dxy_Central_pT_, ipTBin, dxyFromMyVertex * cmToum);
880  PVValHelper::fillByIndex(h_dz_Central_pT_, ipTBin, dzFromMyVertex * cmToum);
881  PVValHelper::fillByIndex(h_norm_dxy_Central_pT_, ipTBin, dxyFromMyVertex / s_ip2dpv_err);
882  PVValHelper::fillByIndex(h_norm_dz_Central_pT_, ipTBin, dzFromMyVertex / dz_err);
883  }
884  }
885  }
886 
887  // checks on the probe track quality
888  if (trackpt >= ptOfProbe_ && std::abs(tracketa) <= etaOfProbe_ && tracknhits >= nHitsOfProbe_ &&
889  trackp >= pOfProbe_) {
890  std::pair<bool, bool> pixelOcc = pixelHitsCheck((theTTrack));
891 
892  if (debug_) {
893  if (pixelOcc.first == true)
894  edm::LogInfo("PrimaryVertexValidation") << "has BPIx hits" << std::endl;
895  if (pixelOcc.second == true)
896  edm::LogInfo("PrimaryVertexValidation") << "has FPix hits" << std::endl;
897  }
898 
899  if (!doBPix_ && (pixelOcc.first == true))
900  continue;
901  if (!doFPix_ && (pixelOcc.second == true))
902  continue;
903 
904  fillTrackHistos(hDA, "sel", &(theTTrack), vertex, beamSpot, fBfield_);
905 
906  // probe checks
907  h_probePt_->Fill(theTrack.pt());
908  h_probePtRebin_->Fill(theTrack.pt());
909  h_probeP_->Fill(theTrack.p());
910  h_probeEta_->Fill(theTrack.eta());
911  h_probePhi_->Fill(theTrack.phi());
912  h2_probeEtaPhi_->Fill(theTrack.eta(), theTrack.phi());
913  h2_probeEtaPt_->Fill(theTrack.eta(), theTrack.pt());
914 
915  h_probeChi2_->Fill(theTrack.chi2());
916  h_probeNormChi2_->Fill(theTrack.normalizedChi2());
917  h_probeCharge_->Fill(theTrack.charge());
918  h_probeQoverP_->Fill(theTrack.qoverp());
919  h_probeHits_->Fill(theTrack.numberOfValidHits());
920  h_probeHits1D_->Fill(nRecHit1D);
921  h_probeHits2D_->Fill(nRecHit2D);
922  h_probeHitsInTIB_->Fill(nhitinBPIX);
923  h_probeHitsInTOB_->Fill(nhitinFPIX);
924  h_probeHitsInTID_->Fill(nhitinTIB);
925  h_probeHitsInTEC_->Fill(nhitinTID);
926  h_probeHitsInBPIX_->Fill(nhitinTOB);
927  h_probeHitsInFPIX_->Fill(nhitinTEC);
928 
929  float dxyRecoV = theTrack.dz(theRecoVertex);
930  float dzRecoV = theTrack.dxy(theRecoVertex);
931  float dxysigmaRecoV =
932  TMath::Sqrt(theTrack.d0Error() * theTrack.d0Error() + xErrOfflineVertex_ * yErrOfflineVertex_);
933  float dzsigmaRecoV =
934  TMath::Sqrt(theTrack.dzError() * theTrack.dzError() + zErrOfflineVertex_ * zErrOfflineVertex_);
935 
936  double zTrack = (theTTrack.stateAtBeamLine().trackStateAtPCA()).position().z();
937  double zVertex = theFittedVertex.position().z();
938  double tantheta = tan((theTTrack.stateAtBeamLine().trackStateAtPCA()).momentum().theta());
939 
940  double dz2 = pow(theTrack.dzError(), 2) + wxy2_ / pow(tantheta, 2);
941  double restrkz = zTrack - zVertex;
942  double pulltrkz = (zTrack - zVertex) / TMath::Sqrt(dz2);
943 
944  h_probedxyRecoV_->Fill(dxyRecoV);
945  h_probedzRecoV_->Fill(dzRecoV);
946 
947  h_probedzRefitV_->Fill(dxyFromMyVertex);
948  h_probedxyRefitV_->Fill(dzFromMyVertex);
949 
950  h_probed0RefitV_->Fill(d0);
951  h_probez0RefitV_->Fill(z0);
952 
953  h_probesignIP2DRefitV_->Fill(s_ip2dpv_corr);
954  h_probed3DRefitV_->Fill(ip3d_corr);
955  h_probereszRefitV_->Fill(restrkz);
956 
957  h_probeRecoVSigZ_->Fill(dzRecoV / dzsigmaRecoV);
958  h_probeRecoVSigXY_->Fill(dxyRecoV / dxysigmaRecoV);
959  h_probeRefitVSigZ_->Fill(dzFromMyVertex / dz_err);
960  h_probeRefitVSigXY_->Fill(dxyFromMyVertex / s_ip2dpv_err);
961  h_probeRefitVSig3D_->Fill(ip3d_corr / ip3d_err);
962  h_probeRefitVLogSig3D_->Fill(log10(ip3d_corr / ip3d_err));
963  h_probeRefitVSigResZ_->Fill(pulltrkz);
964 
965  a_dxyVsPhi->Fill(trackphi, dxyFromMyVertex * cmToum);
966  a_dzVsPhi->Fill(trackphi, z0 * cmToum);
967  n_dxyVsPhi->Fill(trackphi, dxyFromMyVertex / s_ip2dpv_err);
968  n_dzVsPhi->Fill(trackphi, z0 / z0_error);
969 
970  a_dxyVsEta->Fill(tracketa, dxyFromMyVertex * cmToum);
971  a_dzVsEta->Fill(tracketa, z0 * cmToum);
972  n_dxyVsEta->Fill(tracketa, dxyFromMyVertex / s_ip2dpv_err);
973  n_dzVsEta->Fill(tracketa, z0 / z0_error);
974 
975  if (ladder_num > 0 && module_num > 0) {
976  LogDebug("PrimaryVertexValidation")
977  << " ladder_num" << ladder_num << " module_num" << module_num << std::endl;
978 
979  PVValHelper::fillByIndex(h_dxy_modZ_, module_num - 1, dxyFromMyVertex * cmToum);
980  PVValHelper::fillByIndex(h_dz_modZ_, module_num - 1, dzFromMyVertex * cmToum);
981  PVValHelper::fillByIndex(h_norm_dxy_modZ_, module_num - 1, dxyFromMyVertex / s_ip2dpv_err);
982  PVValHelper::fillByIndex(h_norm_dz_modZ_, module_num - 1, dzFromMyVertex / dz_err);
983 
984  PVValHelper::fillByIndex(h_dxy_ladder_, ladder_num - 1, dxyFromMyVertex * cmToum);
985 
986  LogDebug("PrimaryVertexValidation") << "h_dxy_ladder size:" << h_dxy_ladder_.size() << std::endl;
987 
988  if (L1BPixHitCount == 1) {
989  PVValHelper::fillByIndex(h_dxy_ladderNoOverlap_, ladder_num - 1, dxyFromMyVertex * cmToum);
990  } else {
991  PVValHelper::fillByIndex(h_dxy_ladderOverlap_, ladder_num - 1, dxyFromMyVertex * cmToum);
992  }
993 
994  PVValHelper::fillByIndex(h_dz_ladder_, ladder_num - 1, dzFromMyVertex * cmToum);
995  PVValHelper::fillByIndex(h_norm_dxy_ladder_, ladder_num - 1, dxyFromMyVertex / s_ip2dpv_err);
996  PVValHelper::fillByIndex(h_norm_dz_ladder_, ladder_num - 1, dzFromMyVertex / dz_err);
997 
998  h2_probePassingLayer1Map_->Fill(module_num, ladder_num);
999  }
1000 
1001  // filling the binned distributions
1002  for (int i = 0; i < nBins_; i++) {
1003  float phiF = theDetails_.trendbins[PVValHelper::phi][i];
1004  float phiL = theDetails_.trendbins[PVValHelper::phi][i + 1];
1005 
1006  float etaF = theDetails_.trendbins[PVValHelper::eta][i];
1007  float etaL = theDetails_.trendbins[PVValHelper::eta][i + 1];
1008 
1009  if (tracketa >= etaF && tracketa < etaL) {
1010  PVValHelper::fillByIndex(a_dxyEtaResiduals, i, dxyFromMyVertex * cmToum, "1");
1013  PVValHelper::fillByIndex(a_dzEtaResiduals, i, dzFromMyVertex * cmToum, "4");
1014  PVValHelper::fillByIndex(n_dxyEtaResiduals, i, dxyFromMyVertex / s_ip2dpv_err, "5");
1015  PVValHelper::fillByIndex(n_dzEtaResiduals, i, dzFromMyVertex / dz_err, "6");
1016  PVValHelper::fillByIndex(a_IP2DEtaResiduals, i, s_ip2dpv_corr * cmToum, "7");
1017  PVValHelper::fillByIndex(n_IP2DEtaResiduals, i, s_ip2dpv_corr / s_ip2dpv_err, "8");
1019  PVValHelper::fillByIndex(n_reszEtaResiduals, i, pulltrkz, "10");
1020  PVValHelper::fillByIndex(a_d3DEtaResiduals, i, ip3d_corr * cmToum, "11");
1021  PVValHelper::fillByIndex(n_d3DEtaResiduals, i, ip3d_corr / ip3d_err, "12");
1022  PVValHelper::fillByIndex(a_IP3DEtaResiduals, i, s_ip3dpv_corr * cmToum, "13");
1023  PVValHelper::fillByIndex(n_IP3DEtaResiduals, i, s_ip3dpv_corr / s_ip3dpv_err, "14");
1024  }
1025 
1026  if (trackphi >= phiF && trackphi < phiL) {
1027  PVValHelper::fillByIndex(a_dxyPhiResiduals, i, dxyFromMyVertex * cmToum, "15");
1030  PVValHelper::fillByIndex(a_dzPhiResiduals, i, dzFromMyVertex * cmToum, "18");
1031  PVValHelper::fillByIndex(n_dxyPhiResiduals, i, dxyFromMyVertex / s_ip2dpv_err, "19");
1032  PVValHelper::fillByIndex(n_dzPhiResiduals, i, dzFromMyVertex / dz_err, "20");
1033  PVValHelper::fillByIndex(a_IP2DPhiResiduals, i, s_ip2dpv_corr * cmToum, "21");
1034  PVValHelper::fillByIndex(n_IP2DPhiResiduals, i, s_ip2dpv_corr / s_ip2dpv_err, "22");
1036  PVValHelper::fillByIndex(n_reszPhiResiduals, i, pulltrkz, "24");
1037  PVValHelper::fillByIndex(a_d3DPhiResiduals, i, ip3d_corr * cmToum, "25");
1038  PVValHelper::fillByIndex(n_d3DPhiResiduals, i, ip3d_corr / ip3d_err, "26");
1039  PVValHelper::fillByIndex(a_IP3DPhiResiduals, i, s_ip3dpv_corr * cmToum, "27");
1040  PVValHelper::fillByIndex(n_IP3DPhiResiduals, i, s_ip3dpv_corr / s_ip3dpv_err, "28");
1041 
1042  for (int j = 0; j < nBins_; j++) {
1043  float etaJ = theDetails_.trendbins[PVValHelper::eta][j];
1044  float etaK = theDetails_.trendbins[PVValHelper::eta][j + 1];
1045 
1046  if (tracketa >= etaJ && tracketa < etaK) {
1047  a_dxyResidualsMap[i][j]->Fill(dxyFromMyVertex * cmToum);
1048  a_dzResidualsMap[i][j]->Fill(dzFromMyVertex * cmToum);
1049  n_dxyResidualsMap[i][j]->Fill(dxyFromMyVertex / s_ip2dpv_err);
1050  n_dzResidualsMap[i][j]->Fill(dzFromMyVertex / dz_err);
1051  a_d3DResidualsMap[i][j]->Fill(ip3d_corr * cmToum);
1052  n_d3DResidualsMap[i][j]->Fill(ip3d_corr / ip3d_err);
1053  }
1054  }
1055  }
1056  }
1057  }
1058 
1059  if (debug_) {
1060  edm::LogInfo("PrimaryVertexValidation")
1061  << " myVertex.x()= " << myVertex.x() << "\n"
1062  << " myVertex.y()= " << myVertex.y() << " \n"
1063  << " myVertex.z()= " << myVertex.z() << " \n"
1064  << " theTrack.dz(myVertex)= " << theTrack.dz(myVertex) << " \n"
1065  << " zPCA -myVertex.z() = " << (theTrack.vertex().z() - myVertex.z());
1066 
1067  } // ends if debug_
1068  } // ends if the fitted vertex is Valid
1069 
1070  //delete theFitter;
1071 
1072  } catch (cms::Exception& er) {
1073  LogTrace("PrimaryVertexValidation") << "caught std::exception " << er.what() << std::endl;
1074  }
1075 
1076  } //ends if theFinalTracks.size() > 2
1077 
1078  else {
1079  if (debug_)
1080  edm::LogInfo("PrimaryVertexValidation") << "Not enough tracks to make a vertex. Returns no vertex info";
1081  }
1082 
1083  ++nTracks_;
1084  ++nTracksPerClus_;
1085 
1086  if (debug_)
1087  edm::LogInfo("PrimaryVertexValidation") << "Track " << i << " : pT = " << theTrack.pt();
1088 
1089  } // for loop on tracks
1090  } // for loop on track clusters
1091 
1092  // Fill the TTree if needed
1093 
1094  if (storeNtuple_) {
1095  rootTree_->Fill();
1096  }
1097 }
1098 
1099 // ------------ method called to discriminate 1D from 2D hits ------------
1101  if (hit.dimension() < 2) {
1102  return false; // some (muon...) stuff really has RecHit1D
1103  } else {
1104  const DetId detId(hit.geographicalId());
1105  if (detId.det() == DetId::Tracker) {
1106  if (detId.subdetId() == PixelSubdetector::PixelBarrel || detId.subdetId() == PixelSubdetector::PixelEndcap) {
1107  return true; // pixel is always 2D
1108  } else { // should be SiStrip now
1109  if (dynamic_cast<const SiStripRecHit2D*>(&hit))
1110  return false; // normal hit
1111  else if (dynamic_cast<const SiStripMatchedRecHit2D*>(&hit))
1112  return true; // matched is 2D
1113  else if (dynamic_cast<const ProjectedSiStripRecHit2D*>(&hit))
1114  return false; // crazy hit...
1115  else {
1116  edm::LogError("UnkownType") << "@SUB=AlignmentTrackSelector::isHit2D"
1117  << "Tracker hit not in pixel and neither SiStripRecHit2D nor "
1118  << "SiStripMatchedRecHit2D nor ProjectedSiStripRecHit2D.";
1119  return false;
1120  }
1121  }
1122  } else { // not tracker??
1123  edm::LogWarning("DetectorMismatch") << "@SUB=AlignmentTrackSelector::isHit2D"
1124  << "Hit not in tracker with 'official' dimension >=2.";
1125  return true; // dimension() >= 2 so accept that...
1126  }
1127  }
1128  // never reached...
1129 }
1130 
1131 // ------------ method to check the presence of pixel hits ------------
1133  bool hasBPixHits = false;
1134  bool hasFPixHits = false;
1135 
1136  const reco::HitPattern& p = track.hitPattern();
1137  if (p.numberOfValidPixelEndcapHits() != 0) {
1138  hasFPixHits = true;
1139  }
1140  if (p.numberOfValidPixelBarrelHits() != 0) {
1141  hasBPixHits = true;
1142  }
1143 
1144  return std::make_pair(hasBPixHits, hasFPixHits);
1145 }
1146 
1147 // ------------ method to check the presence of pixel hits ------------
1149  using namespace reco;
1150  const HitPattern& p = track.hitPattern();
1151  for (int i = 0; i < p.numberOfAllHits(HitPattern::TRACK_HITS); i++) {
1152  uint32_t pattern = p.getHitPattern(HitPattern::TRACK_HITS, i);
1153  if (p.pixelBarrelHitFilter(pattern) || p.pixelEndcapHitFilter(pattern)) {
1154  if (p.getLayer(pattern) == 1) {
1155  if (p.validHitFilter(pattern)) {
1156  return true;
1157  }
1158  }
1159  }
1160  }
1161  return false;
1162 }
1163 
1164 // ------------ method called once each job before begining the event loop ------------
1166  edm::LogInfo("PrimaryVertexValidation") << "######################################\n"
1167  << "Begin Job \n"
1168  << "######################################";
1169 
1170  // Define TTree for output
1171  Nevt_ = 0;
1172  if (compressionSettings_ > 0) {
1173  fs->file().SetCompressionSettings(compressionSettings_);
1174  }
1175 
1176  // rootFile_ = new TFile(filename_.c_str(),"recreate");
1177  rootTree_ = fs->make<TTree>("tree", "PV Validation tree");
1178 
1179  // Track Paramters
1180 
1181  if (lightNtupleSwitch_) {
1182  rootTree_->Branch("EventNumber", &EventNumber_, "EventNumber/i");
1183  rootTree_->Branch("RunNumber", &RunNumber_, "RunNumber/i");
1184  rootTree_->Branch("LuminosityBlockNumber", &LuminosityBlockNumber_, "LuminosityBlockNumber/i");
1185  rootTree_->Branch("nOfflineVertices", &nOfflineVertices_, "nOfflineVertices/I");
1186  rootTree_->Branch("nTracks", &nTracks_, "nTracks/I");
1187  rootTree_->Branch("phi", &phi_, "phi[nTracks]/D");
1188  rootTree_->Branch("eta", &eta_, "eta[nTracks]/D");
1189  rootTree_->Branch("pt", &pt_, "pt[nTracks]/D");
1190  rootTree_->Branch("dxyFromMyVertex", &dxyFromMyVertex_, "dxyFromMyVertex[nTracks]/D");
1191  rootTree_->Branch("dzFromMyVertex", &dzFromMyVertex_, "dzFromMyVertex[nTracks]/D");
1192  rootTree_->Branch("d3DFromMyVertex", &d3DFromMyVertex_, "d3DFromMyVertex[nTracks]/D");
1193  rootTree_->Branch("IPTsigFromMyVertex", &IPTsigFromMyVertex_, "IPTsigFromMyVertex_[nTracks]/D");
1194  rootTree_->Branch("IPLsigFromMyVertex", &IPLsigFromMyVertex_, "IPLsigFromMyVertex_[nTracks]/D");
1195  rootTree_->Branch("IP3DsigFromMyVertex", &IP3DsigFromMyVertex_, "IP3DsigFromMyVertex_[nTracks]/D");
1196  rootTree_->Branch("hasRecVertex", &hasRecVertex_, "hasRecVertex[nTracks]/I");
1197  rootTree_->Branch("isGoodTrack", &isGoodTrack_, "isGoodTrack[nTracks]/I");
1198  rootTree_->Branch("isHighPurity", &isHighPurity_, "isHighPurity_[nTracks]/I");
1199 
1200  } else {
1201  rootTree_->Branch("nTracks", &nTracks_, "nTracks/I");
1202  rootTree_->Branch("nTracksPerClus", &nTracksPerClus_, "nTracksPerClus/I");
1203  rootTree_->Branch("nClus", &nClus_, "nClus/I");
1204  rootTree_->Branch("xOfflineVertex", &xOfflineVertex_, "xOfflineVertex/D");
1205  rootTree_->Branch("yOfflineVertex", &yOfflineVertex_, "yOfflineVertex/D");
1206  rootTree_->Branch("zOfflineVertex", &zOfflineVertex_, "zOfflineVertex/D");
1207  rootTree_->Branch("BSx0", &BSx0_, "BSx0/D");
1208  rootTree_->Branch("BSy0", &BSy0_, "BSy0/D");
1209  rootTree_->Branch("BSz0", &BSz0_, "BSz0/D");
1210  rootTree_->Branch("Beamsigmaz", &Beamsigmaz_, "Beamsigmaz/D");
1211  rootTree_->Branch("Beamdxdz", &Beamdxdz_, "Beamdxdz/D");
1212  rootTree_->Branch("BeamWidthX", &BeamWidthX_, "BeamWidthX/D");
1213  rootTree_->Branch("BeamWidthY", &BeamWidthY_, "BeamWidthY/D");
1214  rootTree_->Branch("pt", &pt_, "pt[nTracks]/D");
1215  rootTree_->Branch("p", &p_, "p[nTracks]/D");
1216  rootTree_->Branch("nhits", &nhits_, "nhits[nTracks]/I");
1217  rootTree_->Branch("nhits1D", &nhits1D_, "nhits1D[nTracks]/I");
1218  rootTree_->Branch("nhits2D", &nhits2D_, "nhits2D[nTracks]/I");
1219  rootTree_->Branch("nhitsBPIX", &nhitsBPIX_, "nhitsBPIX[nTracks]/I");
1220  rootTree_->Branch("nhitsFPIX", &nhitsFPIX_, "nhitsFPIX[nTracks]/I");
1221  rootTree_->Branch("nhitsTIB", &nhitsTIB_, "nhitsTIB[nTracks]/I");
1222  rootTree_->Branch("nhitsTID", &nhitsTID_, "nhitsTID[nTracks]/I");
1223  rootTree_->Branch("nhitsTOB", &nhitsTOB_, "nhitsTOB[nTracks]/I");
1224  rootTree_->Branch("nhitsTEC", &nhitsTEC_, "nhitsTEC[nTracks]/I");
1225  rootTree_->Branch("eta", &eta_, "eta[nTracks]/D");
1226  rootTree_->Branch("theta", &theta_, "theta[nTracks]/D");
1227  rootTree_->Branch("phi", &phi_, "phi[nTracks]/D");
1228  rootTree_->Branch("chi2", &chi2_, "chi2[nTracks]/D");
1229  rootTree_->Branch("chi2ndof", &chi2ndof_, "chi2ndof[nTracks]/D");
1230  rootTree_->Branch("charge", &charge_, "charge[nTracks]/I");
1231  rootTree_->Branch("qoverp", &qoverp_, "qoverp[nTracks]/D");
1232  rootTree_->Branch("dz", &dz_, "dz[nTracks]/D");
1233  rootTree_->Branch("dxy", &dxy_, "dxy[nTracks]/D");
1234  rootTree_->Branch("dzBs", &dzBs_, "dzBs[nTracks]/D");
1235  rootTree_->Branch("dxyBs", &dxyBs_, "dxyBs[nTracks]/D");
1236  rootTree_->Branch("xPCA", &xPCA_, "xPCA[nTracks]/D");
1237  rootTree_->Branch("yPCA", &yPCA_, "yPCA[nTracks]/D");
1238  rootTree_->Branch("zPCA", &zPCA_, "zPCA[nTracks]/D");
1239  rootTree_->Branch("xUnbiasedVertex", &xUnbiasedVertex_, "xUnbiasedVertex[nTracks]/D");
1240  rootTree_->Branch("yUnbiasedVertex", &yUnbiasedVertex_, "yUnbiasedVertex[nTracks]/D");
1241  rootTree_->Branch("zUnbiasedVertex", &zUnbiasedVertex_, "zUnbiasedVertex[nTracks]/D");
1242  rootTree_->Branch("chi2normUnbiasedVertex", &chi2normUnbiasedVertex_, "chi2normUnbiasedVertex[nTracks]/F");
1243  rootTree_->Branch("chi2UnbiasedVertex", &chi2UnbiasedVertex_, "chi2UnbiasedVertex[nTracks]/F");
1244  rootTree_->Branch("DOFUnbiasedVertex", &DOFUnbiasedVertex_, " DOFUnbiasedVertex[nTracks]/F");
1245  rootTree_->Branch("chi2ProbUnbiasedVertex", &chi2ProbUnbiasedVertex_, "chi2ProbUnbiasedVertex[nTracks]/F");
1246  rootTree_->Branch(
1247  "sumOfWeightsUnbiasedVertex", &sumOfWeightsUnbiasedVertex_, "sumOfWeightsUnbiasedVertex[nTracks]/F");
1248  rootTree_->Branch("tracksUsedForVertexing", &tracksUsedForVertexing_, "tracksUsedForVertexing[nTracks]/I");
1249  rootTree_->Branch("dxyFromMyVertex", &dxyFromMyVertex_, "dxyFromMyVertex[nTracks]/D");
1250  rootTree_->Branch("dzFromMyVertex", &dzFromMyVertex_, "dzFromMyVertex[nTracks]/D");
1251  rootTree_->Branch("dxyErrorFromMyVertex", &dxyErrorFromMyVertex_, "dxyErrorFromMyVertex_[nTracks]/D");
1252  rootTree_->Branch("dzErrorFromMyVertex", &dzErrorFromMyVertex_, "dzErrorFromMyVertex_[nTracks]/D");
1253  rootTree_->Branch("IPTsigFromMyVertex", &IPTsigFromMyVertex_, "IPTsigFromMyVertex_[nTracks]/D");
1254  rootTree_->Branch("IPLsigFromMyVertex", &IPLsigFromMyVertex_, "IPLsigFromMyVertex_[nTracks]/D");
1255  rootTree_->Branch("hasRecVertex", &hasRecVertex_, "hasRecVertex[nTracks]/I");
1256  rootTree_->Branch("isGoodTrack", &isGoodTrack_, "isGoodTrack[nTracks]/I");
1257  }
1258 
1259  // event histograms
1260  TFileDirectory EventFeatures = fs->mkdir("EventFeatures");
1261 
1262  TH1F::SetDefaultSumw2(kTRUE);
1263 
1265  EventFeatures.make<TH1F>("h_lumiFromConfig", "luminosity from config;;luminosity of present run", 1, -0.5, 0.5);
1266  h_lumiFromConfig->SetBinContent(1, intLumi_);
1267 
1268  h_runFromConfig = EventFeatures.make<TH1I>("h_runFromConfig",
1269  "run number from config;;run number (from configuration)",
1270  runControlNumbers_.size(),
1271  0.,
1272  runControlNumbers_.size());
1273 
1274  for (const auto& run : runControlNumbers_ | boost::adaptors::indexed(1)) {
1275  h_runFromConfig->SetBinContent(run.index(), run.value());
1276  }
1277 
1278  h_runFromEvent =
1279  EventFeatures.make<TH1I>("h_runFromEvent", "run number from config;;run number (from event)", 1, -0.5, 0.5);
1280  h_nTracks =
1281  EventFeatures.make<TH1F>("h_nTracks", "number of tracks per event;n_{tracks}/event;n_{events}", 300, -0.5, 299.5);
1282  h_nClus =
1283  EventFeatures.make<TH1F>("h_nClus", "number of track clusters;n_{clusters}/event;n_{events}", 50, -0.5, 49.5);
1284  h_nOfflineVertices = EventFeatures.make<TH1F>(
1285  "h_nOfflineVertices", "number of offline reconstructed vertices;n_{vertices}/event;n_{events}", 50, -0.5, 49.5);
1286  h_runNumber = EventFeatures.make<TH1F>("h_runNumber", "run number;run number;n_{events}", 100000, 250000., 350000.);
1287  h_xOfflineVertex = EventFeatures.make<TH1F>(
1288  "h_xOfflineVertex", "x-coordinate of offline vertex;x_{vertex};n_{events}", 100, -0.1, 0.1);
1289  h_yOfflineVertex = EventFeatures.make<TH1F>(
1290  "h_yOfflineVertex", "y-coordinate of offline vertex;y_{vertex};n_{events}", 100, -0.1, 0.1);
1291  h_zOfflineVertex = EventFeatures.make<TH1F>(
1292  "h_zOfflineVertex", "z-coordinate of offline vertex;z_{vertex};n_{events}", 100, -30., 30.);
1293  h_xErrOfflineVertex = EventFeatures.make<TH1F>(
1294  "h_xErrOfflineVertex", "x-coordinate error of offline vertex;err_{x}^{vtx};n_{events}", 100, 0., 0.01);
1295  h_yErrOfflineVertex = EventFeatures.make<TH1F>(
1296  "h_yErrOfflineVertex", "y-coordinate error of offline vertex;err_{y}^{vtx};n_{events}", 100, 0., 0.01);
1297  h_zErrOfflineVertex = EventFeatures.make<TH1F>(
1298  "h_zErrOfflineVertex", "z-coordinate error of offline vertex;err_{z}^{vtx};n_{events}", 100, 0., 10.);
1299  h_BSx0 = EventFeatures.make<TH1F>("h_BSx0", "x-coordinate of reco beamspot;x^{BS}_{0};n_{events}", 100, -0.1, 0.1);
1300  h_BSy0 = EventFeatures.make<TH1F>("h_BSy0", "y-coordinate of reco beamspot;y^{BS}_{0};n_{events}", 100, -0.1, 0.1);
1301  h_BSz0 = EventFeatures.make<TH1F>("h_BSz0", "z-coordinate of reco beamspot;z^{BS}_{0};n_{events}", 100, -1., 1.);
1302  h_Beamsigmaz =
1303  EventFeatures.make<TH1F>("h_Beamsigmaz", "z-coordinate beam width;#sigma_{Z}^{beam};n_{events}", 100, 0., 1.);
1304  h_BeamWidthX =
1305  EventFeatures.make<TH1F>("h_BeamWidthX", "x-coordinate beam width;#sigma_{X}^{beam};n_{events}", 100, 0., 0.01);
1306  h_BeamWidthY =
1307  EventFeatures.make<TH1F>("h_BeamWidthY", "y-coordinate beam width;#sigma_{Y}^{beam};n_{events}", 100, 0., 0.01);
1308 
1309  h_etaMax = EventFeatures.make<TH1F>("etaMax", "etaMax", 1, -0.5, 0.5);
1310  h_pTinfo = EventFeatures.make<TH1F>("pTinfo", "pTinfo", 3, -1.5, 1.5);
1311  h_pTinfo->GetXaxis()->SetBinLabel(1, "n. bins");
1312  h_pTinfo->GetXaxis()->SetBinLabel(2, "pT min");
1313  h_pTinfo->GetXaxis()->SetBinLabel(3, "pT max");
1314 
1315  h_nbins = EventFeatures.make<TH1F>("nbins", "nbins", 1, -0.5, 0.5);
1316  h_nLadders = EventFeatures.make<TH1F>("nladders", "n. ladders", 1, -0.5, 0.5);
1317 
1318  // probe track histograms
1319  TFileDirectory ProbeFeatures = fs->mkdir("ProbeTrackFeatures");
1320 
1321  h_probePt_ = ProbeFeatures.make<TH1F>("h_probePt", "p_{T} of probe track;track p_{T} (GeV); tracks", 100, 0., 50.);
1322  h_probePtRebin_ = ProbeFeatures.make<TH1F>(
1323  "h_probePtRebin", "p_{T} of probe track;track p_{T} (GeV); tracks", mypT_bins_.size() - 1, mypT_bins_.data());
1324  h_probeP_ = ProbeFeatures.make<TH1F>("h_probeP", "momentum of probe track;track p (GeV); tracks", 100, 0., 100.);
1325  h_probeEta_ = ProbeFeatures.make<TH1F>("h_probeEta", "#eta of the probe track;track #eta;tracks", 54, -2.8, 2.8);
1326  h_probePhi_ = ProbeFeatures.make<TH1F>("h_probePhi", "#phi of probe track;track #phi (rad);tracks", 100, -3.15, 3.15);
1327 
1328  h2_probeEtaPhi_ =
1329  ProbeFeatures.make<TH2F>("h2_probeEtaPhi",
1330  "probe track #phi vs #eta;#eta of probe track;track #phi of probe track (rad); tracks",
1331  54,
1332  -2.8,
1333  2.8,
1334  100,
1335  -3.15,
1336  3.15);
1337  h2_probeEtaPt_ = ProbeFeatures.make<TH2F>("h2_probeEtaPt",
1338  "probe track p_{T} vs #eta;#eta of probe track;track p_{T} (GeV); tracks",
1339  54,
1340  -2.8,
1341  2.8,
1342  100,
1343  0.,
1344  50.);
1345 
1346  h_probeChi2_ =
1347  ProbeFeatures.make<TH1F>("h_probeChi2", "#chi^{2} of probe track;track #chi^{2}; tracks", 100, 0., 100.);
1348  h_probeNormChi2_ = ProbeFeatures.make<TH1F>(
1349  "h_probeNormChi2", " normalized #chi^{2} of probe track;track #chi^{2}/ndof; tracks", 100, 0., 10.);
1350  h_probeCharge_ =
1351  ProbeFeatures.make<TH1F>("h_probeCharge", "charge of probe track;track charge Q;tracks", 3, -1.5, 1.5);
1352  h_probeQoverP_ =
1353  ProbeFeatures.make<TH1F>("h_probeQoverP", "q/p of probe track; track Q/p (GeV^{-1});tracks", 200, -1., 1.);
1354  h_probedzRecoV_ = ProbeFeatures.make<TH1F>(
1355  "h_probedzRecoV", "d_{z}(V_{offline}) of probe track;track d_{z}(V_{off}) (cm);tracks", 200, -1., 1.);
1356  h_probedxyRecoV_ = ProbeFeatures.make<TH1F>(
1357  "h_probedxyRecoV", "d_{xy}(V_{offline}) of probe track;track d_{xy}(V_{off}) (cm);tracks", 200, -1., 1.);
1358  h_probedzRefitV_ = ProbeFeatures.make<TH1F>(
1359  "h_probedzRefitV", "d_{z}(V_{refit}) of probe track;track d_{z}(V_{fit}) (cm);tracks", 200, -0.5, 0.5);
1360  h_probesignIP2DRefitV_ = ProbeFeatures.make<TH1F>(
1361  "h_probesignIPRefitV", "ip_{2D}(V_{refit}) of probe track;track ip_{2D}(V_{fit}) (cm);tracks", 200, -1., 1.);
1362  h_probedxyRefitV_ = ProbeFeatures.make<TH1F>(
1363  "h_probedxyRefitV", "d_{xy}(V_{refit}) of probe track;track d_{xy}(V_{fit}) (cm);tracks", 200, -0.5, 0.5);
1364 
1365  h_probez0RefitV_ = ProbeFeatures.make<TH1F>(
1366  "h_probez0RefitV", "z_{0}(V_{refit}) of probe track;track z_{0}(V_{fit}) (cm);tracks", 200, -1., 1.);
1367  h_probed0RefitV_ = ProbeFeatures.make<TH1F>(
1368  "h_probed0RefitV", "d_{0}(V_{refit}) of probe track;track d_{0}(V_{fit}) (cm);tracks", 200, -1., 1.);
1369 
1370  h_probed3DRefitV_ = ProbeFeatures.make<TH1F>(
1371  "h_probed3DRefitV", "d_{3D}(V_{refit}) of probe track;track d_{3D}(V_{fit}) (cm);tracks", 200, 0., 1.);
1372  h_probereszRefitV_ = ProbeFeatures.make<TH1F>(
1373  "h_probeReszRefitV", "z_{track} -z_{V_{refit}};track res_{z}(V_{refit}) (cm);tracks", 200, -1., 1.);
1374 
1375  h_probeRecoVSigZ_ = ProbeFeatures.make<TH1F>(
1376  "h_probeRecoVSigZ", "Longitudinal DCA Significance (reco);d_{z}(V_{off})/#sigma_{dz};tracks", 100, -8, 8);
1377  h_probeRecoVSigXY_ = ProbeFeatures.make<TH1F>(
1378  "h_probeRecoVSigXY", "Transverse DCA Significance (reco);d_{xy}(V_{off})/#sigma_{dxy};tracks", 100, -8, 8);
1379  h_probeRefitVSigZ_ = ProbeFeatures.make<TH1F>(
1380  "h_probeRefitVSigZ", "Longitudinal DCA Significance (refit);d_{z}(V_{fit})/#sigma_{dz};tracks", 100, -8, 8);
1381  h_probeRefitVSigXY_ = ProbeFeatures.make<TH1F>(
1382  "h_probeRefitVSigXY", "Transverse DCA Significance (refit);d_{xy}(V_{fit})/#sigma_{dxy};tracks", 100, -8, 8);
1383  h_probeRefitVSig3D_ = ProbeFeatures.make<TH1F>(
1384  "h_probeRefitVSig3D", "3D DCA Significance (refit);d_{3D}/#sigma_{3D};tracks", 100, 0., 20.);
1386  ProbeFeatures.make<TH1F>("h_probeRefitVLogSig3D",
1387  "log_{10}(3D DCA-Significance) (refit);log_{10}(d_{3D}/#sigma_{3D});tracks",
1388  100,
1389  -5.,
1390  4.);
1391  h_probeRefitVSigResZ_ = ProbeFeatures.make<TH1F>(
1392  "h_probeRefitVSigResZ",
1393  "Longitudinal residual significance (refit);(z_{track} -z_{V_{fit}})/#sigma_{res_{z}};tracks",
1394  100,
1395  -8,
1396  8);
1397 
1398  h_probeHits_ = ProbeFeatures.make<TH1F>("h_probeNRechits", "N_{hits} ;N_{hits} ;tracks", 40, -0.5, 39.5);
1399  h_probeHits1D_ = ProbeFeatures.make<TH1F>("h_probeNRechits1D", "N_{hits} 1D ;N_{hits} 1D ;tracks", 40, -0.5, 39.5);
1400  h_probeHits2D_ = ProbeFeatures.make<TH1F>("h_probeNRechits2D", "N_{hits} 2D ;N_{hits} 2D ;tracks", 40, -0.5, 39.5);
1402  ProbeFeatures.make<TH1F>("h_probeNRechitsTIB", "N_{hits} TIB ;N_{hits} TIB;tracks", 40, -0.5, 39.5);
1404  ProbeFeatures.make<TH1F>("h_probeNRechitsTOB", "N_{hits} TOB ;N_{hits} TOB;tracks", 40, -0.5, 39.5);
1406  ProbeFeatures.make<TH1F>("h_probeNRechitsTID", "N_{hits} TID ;N_{hits} TID;tracks", 40, -0.5, 39.5);
1408  ProbeFeatures.make<TH1F>("h_probeNRechitsTEC", "N_{hits} TEC ;N_{hits} TEC;tracks", 40, -0.5, 39.5);
1410  ProbeFeatures.make<TH1F>("h_probeNRechitsBPIX", "N_{hits} BPIX;N_{hits} BPIX;tracks", 40, -0.5, 39.5);
1412  ProbeFeatures.make<TH1F>("h_probeNRechitsFPIX", "N_{hits} FPIX;N_{hits} FPIX;tracks", 40, -0.5, 39.5);
1413 
1415  ProbeFeatures.make<TH1F>("h_probeL1Ladder", "Ladder number (L1 hit); ladder number", 22, -1.5, 20.5);
1417  ProbeFeatures.make<TH1F>("h_probeL1Module", "Module number (L1 hit); module number", 10, -1.5, 8.5);
1418 
1419  h2_probeLayer1Map_ = ProbeFeatures.make<TH2F>(
1420  "h2_probeLayer1Map", "Position in Layer 1 of first hit;module number;ladder number", 8, 0.5, 8.5, 12, 0.5, 12.5);
1421  h2_probePassingLayer1Map_ = ProbeFeatures.make<TH2F>("h2_probePassingLayer1Map",
1422  "Position in Layer 1 of first hit;module number;ladder number",
1423  8,
1424  0.5,
1425  8.5,
1426  12,
1427  0.5,
1428  12.5);
1430  ProbeFeatures.make<TH1I>("h_probeHasBPixL1Overlap", "n. hits in L1;n. L1-BPix hits;tracks", 5, -0.5, 4.5);
1431  h_probeL1ClusterProb_ = ProbeFeatures.make<TH1F>(
1432  "h_probeL1ClusterProb",
1433  "log_{10}(Cluster Probability) for Layer1 hits;log_{10}(cluster probability); n. Layer1 hits",
1434  100,
1435  -10.,
1436  0.);
1437 
1438  // refit vertex features
1439  TFileDirectory RefitVertexFeatures = fs->mkdir("RefitVertexFeatures");
1440  h_fitVtxNtracks_ = RefitVertexFeatures.make<TH1F>(
1441  "h_fitVtxNtracks", "N_{trks} used in vertex fit;N^{fit}_{tracks};vertices", 100, -0.5, 99.5);
1442  h_fitVtxNdof_ = RefitVertexFeatures.make<TH1F>(
1443  "h_fitVtxNdof", "N_{DOF} of vertex fit;N_{DOF} of refit vertex;vertices", 100, -0.5, 99.5);
1444  h_fitVtxChi2_ = RefitVertexFeatures.make<TH1F>(
1445  "h_fitVtxChi2", "#chi^{2} of vertex fit;vertex #chi^{2};vertices", 100, -0.5, 99.5);
1446  h_fitVtxChi2ndf_ = RefitVertexFeatures.make<TH1F>(
1447  "h_fitVtxChi2ndf", "#chi^{2}/ndf of vertex fit;vertex #chi^{2}/ndf;vertices", 100, -0.5, 9.5);
1448  h_fitVtxChi2Prob_ = RefitVertexFeatures.make<TH1F>(
1449  "h_fitVtxChi2Prob", "Prob(#chi^{2},ndf) of vertex fit;Prob(#chi^{2},ndf);vertices", 40, 0., 1.);
1450  h_fitVtxTrackWeights_ = RefitVertexFeatures.make<TH1F>(
1451  "h_fitVtxTrackWeights", "track weights associated to track;track weights;tracks", 40, 0., 1.);
1452  h_fitVtxTrackAverageWeight_ = RefitVertexFeatures.make<TH1F>(
1453  "h_fitVtxTrackAverageWeight_", "average track weight per vertex;#LT track weight #GT;vertices", 40, 0., 1.);
1454 
1455  if (useTracksFromRecoVtx_) {
1456  TFileDirectory RecoVertexFeatures = fs->mkdir("RecoVertexFeatures");
1458  RecoVertexFeatures.make<TH1F>("h_recoVtxNtracks", "N^{vtx}_{trks};N^{vtx}_{trks};vertices", 100, -0.5, 99.5);
1460  RecoVertexFeatures.make<TH1F>("h_recoVtxChi2ndf", "#chi^{2}/ndf vtx;#chi^{2}/ndf vtx;vertices", 10, -0.5, 9.5);
1461  h_recoVtxChi2Prob_ = RecoVertexFeatures.make<TH1F>(
1462  "h_recoVtxChi2Prob", "Prob(#chi^{2},ndf);Prob(#chi^{2},ndf);vertices", 40, 0., 1.);
1463  h_recoVtxSumPt_ =
1464  RecoVertexFeatures.make<TH1F>("h_recoVtxSumPt", "Sum(p^{trks}_{T});Sum(p^{trks}_{T});vertices", 100, 0., 200.);
1465  }
1466 
1467  TFileDirectory DA = fs->mkdir("DA");
1468  //DA.cd();
1469  hDA = bookVertexHistograms(DA);
1470  //for(std::map<std::string,TH1*>::const_iterator hist=hDA.begin(); hist!=hDA.end(); hist++){
1471  //hist->second->SetDirectory(DA);
1472  // DA.make<TH1F>(hist->second);
1473  // }
1474 
1475  // initialize the residuals histograms
1476 
1477  const float dxymax_phi = theDetails_.getHigh(PVValHelper::dxy, PVValHelper::phi);
1478  const float dzmax_phi = theDetails_.getHigh(PVValHelper::dz, PVValHelper::eta);
1479  const float dxymax_eta = theDetails_.getHigh(PVValHelper::dxy, PVValHelper::phi);
1480  const float dzmax_eta = theDetails_.getHigh(PVValHelper::dz, PVValHelper::eta);
1481  //const float d3Dmax_phi = theDetails_.getHigh(PVValHelper::d3D,PVValHelper::phi);
1482  const float d3Dmax_eta = theDetails_.getHigh(PVValHelper::d3D, PVValHelper::eta);
1483 
1485  //
1486  // Unbiased track-to-vertex residuals
1487  // The vertex is refit without the probe track
1488  //
1490 
1491  // _ _ _ _ ___ _ _ _
1492  // /_\ | |__ ___ ___| |_ _| |_ ___ | _ \___ __(_)__| |_ _ __ _| |___
1493  // / _ \| '_ (_-</ _ \ | || | _/ -_) | / -_|_-< / _` | || / _` | (_-<
1494  // /_/ \_\_.__/__/\___/_|\_,_|\__\___| |_|_\___/__/_\__,_|\_,_\__,_|_/__/
1495  //
1496 
1497  TFileDirectory AbsTransPhiRes = fs->mkdir("Abs_Transv_Phi_Residuals");
1502 
1503  TFileDirectory AbsTransEtaRes = fs->mkdir("Abs_Transv_Eta_Residuals");
1508 
1509  TFileDirectory AbsLongPhiRes = fs->mkdir("Abs_Long_Phi_Residuals");
1512 
1513  TFileDirectory AbsLongEtaRes = fs->mkdir("Abs_Long_Eta_Residuals");
1516 
1517  TFileDirectory Abs3DPhiRes = fs->mkdir("Abs_3D_Phi_Residuals");
1520 
1521  TFileDirectory Abs3DEtaRes = fs->mkdir("Abs_3D_Eta_Residuals");
1524 
1525  TFileDirectory NormTransPhiRes = fs->mkdir("Norm_Transv_Phi_Residuals");
1528 
1529  TFileDirectory NormTransEtaRes = fs->mkdir("Norm_Transv_Eta_Residuals");
1532 
1533  TFileDirectory NormLongPhiRes = fs->mkdir("Norm_Long_Phi_Residuals");
1536 
1537  TFileDirectory NormLongEtaRes = fs->mkdir("Norm_Long_Eta_Residuals");
1540 
1541  TFileDirectory Norm3DPhiRes = fs->mkdir("Norm_3D_Phi_Residuals");
1544 
1545  TFileDirectory Norm3DEtaRes = fs->mkdir("Norm_3D_Eta_Residuals");
1548 
1549  TFileDirectory AbsDoubleDiffRes = fs->mkdir("Abs_DoubleDiffResiduals");
1550  TFileDirectory NormDoubleDiffRes = fs->mkdir("Norm_DoubleDiffResiduals");
1551 
1552  TFileDirectory AbsL1Map = fs->mkdir("Abs_L1Residuals");
1553  TFileDirectory NormL1Map = fs->mkdir("Norm_L1Residuals");
1554 
1555  // book residuals vs pT histograms
1556 
1557  TFileDirectory AbsTranspTRes = fs->mkdir("Abs_Transv_pT_Residuals");
1559 
1560  TFileDirectory AbsLongpTRes = fs->mkdir("Abs_Long_pT_Residuals");
1562 
1563  TFileDirectory NormTranspTRes = fs->mkdir("Norm_Transv_pT_Residuals");
1565 
1566  TFileDirectory NormLongpTRes = fs->mkdir("Norm_Long_pT_Residuals");
1568 
1569  // book residuals vs pT histograms in central region (|eta|<1.0)
1570 
1571  TFileDirectory AbsTranspTCentralRes = fs->mkdir("Abs_Transv_pTCentral_Residuals");
1573 
1574  TFileDirectory AbsLongpTCentralRes = fs->mkdir("Abs_Long_pTCentral_Residuals");
1576 
1577  TFileDirectory NormTranspTCentralRes = fs->mkdir("Norm_Transv_pTCentral_Residuals");
1580 
1581  TFileDirectory NormLongpTCentralRes = fs->mkdir("Norm_Long_pTCentral_Residuals");
1584 
1585  // book residuals vs module number
1586 
1587  TFileDirectory AbsTransModZRes = fs->mkdir("Abs_Transv_modZ_Residuals");
1589 
1590  TFileDirectory AbsLongModZRes = fs->mkdir("Abs_Long_modZ_Residuals");
1592 
1593  // _ _ _ _ _ ___ _ _ _
1594  // | \| |___ _ _ _ __ __ _| (_)______ __| | | _ \___ __(_)__| |_ _ __ _| |___
1595  // | .` / _ \ '_| ' \/ _` | | |_ / -_) _` | | / -_|_-< / _` | || / _` | (_-<
1596  // |_|\_\___/_| |_|_|_\__,_|_|_/__\___\__,_| |_|_\___/__/_\__,_|\_,_\__,_|_/__/
1597  //
1598 
1599  TFileDirectory NormTransModZRes = fs->mkdir("Norm_Transv_modZ_Residuals");
1601 
1602  TFileDirectory NormLongModZRes = fs->mkdir("Norm_Long_modZ_Residuals");
1604 
1605  TFileDirectory AbsTransLadderRes = fs->mkdir("Abs_Transv_ladder_Residuals");
1607 
1608  TFileDirectory AbsTransLadderResOverlap = fs->mkdir("Abs_Transv_ladderOverlap_Residuals");
1611 
1612  TFileDirectory AbsTransLadderResNoOverlap = fs->mkdir("Abs_Transv_ladderNoOverlap_Residuals");
1615 
1616  TFileDirectory AbsLongLadderRes = fs->mkdir("Abs_Long_ladder_Residuals");
1618 
1619  TFileDirectory NormTransLadderRes = fs->mkdir("Norm_Transv_ladder_Residuals");
1622 
1623  TFileDirectory NormLongLadderRes = fs->mkdir("Norm_Long_ladder_Residuals");
1626 
1627  // book residuals as function of nLadders and nModules
1628 
1629  for (unsigned int iLadder = 0; iLadder < nLadders_; iLadder++) {
1630  for (unsigned int iModule = 0; iModule < 8; iModule++) {
1631  a_dxyL1ResidualsMap[iLadder][iModule] =
1632  AbsL1Map.make<TH1F>(Form("histo_dxy_ladder%i_module%i", iLadder, iModule),
1633  Form("d_{xy} ladder=%i module=%i;d_{xy} [#mum];tracks", iLadder, iModule),
1635  -dzmax_eta,
1636  dzmax_eta);
1637 
1638  a_dzL1ResidualsMap[iLadder][iModule] =
1639  AbsL1Map.make<TH1F>(Form("histo_dz_ladder%i_module%i", iLadder, iModule),
1640  Form("d_{z} ladder=%i module=%i;d_{z} [#mum];tracks", iLadder, iModule),
1642  -dzmax_eta,
1643  dzmax_eta);
1644 
1645  n_dxyL1ResidualsMap[iLadder][iModule] =
1646  NormL1Map.make<TH1F>(Form("histo_norm_dxy_ladder%i_module%i", iLadder, iModule),
1647  Form("d_{xy} ladder=%i module=%i;d_{xy}/#sigma_{d_{xy}};tracks", iLadder, iModule),
1649  -dzmax_eta / 100,
1650  dzmax_eta / 100);
1651 
1652  n_dzL1ResidualsMap[iLadder][iModule] =
1653  NormL1Map.make<TH1F>(Form("histo_norm_dz_ladder%i_module%i", iLadder, iModule),
1654  Form("d_{z} ladder=%i module=%i;d_{z}/#sigma_{d_{z}};tracks", iLadder, iModule),
1656  -dzmax_eta / 100,
1657  dzmax_eta / 100);
1658  }
1659  }
1660 
1661  // book residuals as function of phi and eta
1662 
1663  for (int i = 0; i < nBins_; ++i) {
1664  float phiF = theDetails_.trendbins[PVValHelper::phi][i];
1665  float phiL = theDetails_.trendbins[PVValHelper::phi][i + 1];
1666 
1667  // ___ _ _ ___ _ __ __ ___ _ _ _
1668  // | \ ___ _ _| |__| |___| \(_)/ _|/ _| | _ \___ __(_)__| |_ _ __ _| |___
1669  // | |) / _ \ || | '_ \ / -_) |) | | _| _| | / -_|_-< / _` | || / _` | (_-<
1670  // |___/\___/\_,_|_.__/_\___|___/|_|_| |_| |_|_\___/__/_\__,_|\_,_\__,_|_/__/
1671 
1672  for (int j = 0; j < nBins_; ++j) {
1673  float etaF = theDetails_.trendbins[PVValHelper::eta][j];
1674  float etaL = theDetails_.trendbins[PVValHelper::eta][j + 1];
1675 
1676  a_dxyResidualsMap[i][j] = AbsDoubleDiffRes.make<TH1F>(
1677  Form("histo_dxy_eta_plot%i_phi_plot%i", i, j),
1678  Form("%.2f<#eta_{tk}<%.2f %.2f#circ<#varphi_{tk}<%.2f#circ;d_{xy};tracks", etaF, etaL, phiF, phiL),
1680  -dzmax_eta,
1681  dzmax_eta);
1682 
1683  a_dzResidualsMap[i][j] = AbsDoubleDiffRes.make<TH1F>(
1684  Form("histo_dz_eta_plot%i_phi_plot%i", i, j),
1685  Form("%.2f<#eta_{tk}<%.2f %.2f#circ<#varphi_{tk}<%.2f#circ;d_{z};tracks", etaF, etaL, phiF, phiL),
1687  -dzmax_eta,
1688  dzmax_eta);
1689 
1690  a_d3DResidualsMap[i][j] = AbsDoubleDiffRes.make<TH1F>(
1691  Form("histo_d3D_eta_plot%i_phi_plot%i", i, j),
1692  Form("%.2f<#eta_{tk}<%.2f %.2f#circ<#varphi_{tk}<%.2f#circ;d_{3D};tracks", etaF, etaL, phiF, phiL),
1694  0.,
1695  d3Dmax_eta);
1696 
1697  n_dxyResidualsMap[i][j] = NormDoubleDiffRes.make<TH1F>(
1698  Form("histo_norm_dxy_eta_plot%i_phi_plot%i", i, j),
1699  Form("%.2f<#eta_{tk}<%.2f %.2f#circ<#varphi_{tk}<%.2f#circ;d_{xy}/#sigma_{d_{xy}};tracks",
1700  etaF,
1701  etaL,
1702  phiF,
1703  phiL),
1705  -dzmax_eta / 100,
1706  dzmax_eta / 100);
1707 
1708  n_dzResidualsMap[i][j] = NormDoubleDiffRes.make<TH1F>(
1709  Form("histo_norm_dz_eta_plot%i_phi_plot%i", i, j),
1710  Form("%.2f<#eta_{tk}<%.2f %.2f#circ<#varphi_{tk}<%.2f#circ;d_{z}/#sigma_{d_{z}};tracks",
1711  etaF,
1712  etaL,
1713  phiF,
1714  phiL),
1716  -dzmax_eta / 100,
1717  dzmax_eta / 100);
1718 
1719  n_d3DResidualsMap[i][j] = NormDoubleDiffRes.make<TH1F>(
1720  Form("histo_norm_d3D_eta_plot%i_phi_plot%i", i, j),
1721  Form("%.2f<#eta_{tk}<%.2f %.2f#circ<#varphi_{tk}<%.2f#circ;d_{3D}/#sigma_{d_{3D}};tracks",
1722  etaF,
1723  etaL,
1724  phiF,
1725  phiL),
1727  0.,
1728  d3Dmax_eta);
1729  }
1730  }
1731 
1732  // declaration of the directories
1733 
1734  TFileDirectory BiasVsParameter = fs->mkdir("BiasVsParameter");
1735 
1736  a_dxyVsPhi = BiasVsParameter.make<TH2F>("h2_dxy_vs_phi",
1737  "d_{xy} vs track #phi;track #phi [rad];track d_{xy}(PV) [#mum]",
1738  nBins_,
1739  -M_PI,
1740  M_PI,
1742  -dxymax_phi,
1743  dxymax_phi);
1744 
1745  a_dzVsPhi = BiasVsParameter.make<TH2F>("h2_dz_vs_phi",
1746  "d_{z} vs track #phi;track #phi [rad];track d_{z}(PV) [#mum]",
1747  nBins_,
1748  -M_PI,
1749  M_PI,
1751  -dzmax_phi,
1752  dzmax_phi);
1753 
1754  n_dxyVsPhi = BiasVsParameter.make<TH2F>(
1755  "h2_n_dxy_vs_phi",
1756  "d_{xy}/#sigma_{d_{xy}} vs track #phi;track #phi [rad];track d_{xy}(PV)/#sigma_{d_{xy}}",
1757  nBins_,
1758  -M_PI,
1759  M_PI,
1761  -dxymax_phi / 100.,
1762  dxymax_phi / 100.);
1763 
1764  n_dzVsPhi =
1765  BiasVsParameter.make<TH2F>("h2_n_dz_vs_phi",
1766  "d_{z}/#sigma_{d_{z}} vs track #phi;track #phi [rad];track d_{z}(PV)/#sigma_{d_{z}}",
1767  nBins_,
1768  -M_PI,
1769  M_PI,
1771  -dzmax_phi / 100.,
1772  dzmax_phi / 100.);
1773 
1774  a_dxyVsEta = BiasVsParameter.make<TH2F>("h2_dxy_vs_eta",
1775  "d_{xy} vs track #eta;track #eta;track d_{xy}(PV) [#mum]",
1776  nBins_,
1777  -etaOfProbe_,
1778  etaOfProbe_,
1780  -dxymax_eta,
1781  dzmax_eta);
1782 
1783  a_dzVsEta = BiasVsParameter.make<TH2F>("h2_dz_vs_eta",
1784  "d_{z} vs track #eta;track #eta;track d_{z}(PV) [#mum]",
1785  nBins_,
1786  -etaOfProbe_,
1787  etaOfProbe_,
1789  -dzmax_eta,
1790  dzmax_eta);
1791 
1792  n_dxyVsEta =
1793  BiasVsParameter.make<TH2F>("h2_n_dxy_vs_eta",
1794  "d_{xy}/#sigma_{d_{xy}} vs track #eta;track #eta;track d_{xy}(PV)/#sigma_{d_{xy}}",
1795  nBins_,
1796  -etaOfProbe_,
1797  etaOfProbe_,
1799  -dxymax_eta / 100.,
1800  dxymax_eta / 100.);
1801 
1802  n_dzVsEta = BiasVsParameter.make<TH2F>("h2_n_dz_vs_eta",
1803  "d_{z}/#sigma_{d_{z}} vs track #eta;track #eta;track d_{z}(PV)/#sigma_{d_{z}}",
1804  nBins_,
1805  -etaOfProbe_,
1806  etaOfProbe_,
1808  -dzmax_eta / 100.,
1809  dzmax_eta / 100.);
1810 
1811  MeanTrendsDir = fs->mkdir("MeanTrends");
1812  WidthTrendsDir = fs->mkdir("WidthTrends");
1813  MedianTrendsDir = fs->mkdir("MedianTrends");
1814  MADTrendsDir = fs->mkdir("MADTrends");
1815 
1816  Mean2DMapsDir = fs->mkdir("MeanMaps");
1817  Width2DMapsDir = fs->mkdir("WidthMaps");
1818 
1819  double highedge = nBins_ - 0.5;
1820  double lowedge = -0.5;
1821 
1822  // means and widths from the fit
1823 
1825  MeanTrendsDir.make<TH1F>("means_dxy_phi",
1826  "#LT d_{xy} #GT vs #phi sector;#varphi (sector) [degrees];#LT d_{xy} #GT [#mum]",
1827  nBins_,
1828  lowedge,
1829  highedge);
1830 
1832  WidthTrendsDir.make<TH1F>("widths_dxy_phi",
1833  "#sigma_{d_{xy}} vs #phi sector;#varphi (sector) [degrees];#sigma_{d_{xy}} [#mum]",
1834  nBins_,
1835  lowedge,
1836  highedge);
1837 
1839  MeanTrendsDir.make<TH1F>("means_dz_phi",
1840  "#LT d_{z} #GT vs #phi sector;#varphi (sector) [degrees];#LT d_{z} #GT [#mum]",
1841  nBins_,
1842  lowedge,
1843  highedge);
1844 
1846  WidthTrendsDir.make<TH1F>("widths_dz_phi",
1847  "#sigma_{d_{z}} vs #phi sector;#varphi (sector) [degrees];#sigma_{d_{z}} [#mum]",
1848  nBins_,
1849  lowedge,
1850  highedge);
1851 
1853  "means_dxy_eta", "#LT d_{xy} #GT vs #eta sector;#eta (sector);#LT d_{xy} #GT [#mum]", nBins_, lowedge, highedge);
1854 
1855  a_dxyEtaWidthTrend = WidthTrendsDir.make<TH1F>("widths_dxy_eta",
1856  "#sigma_{d_{xy}} vs #eta sector;#eta (sector);#sigma_{d_{xy}} [#mum]",
1857  nBins_,
1858  lowedge,
1859  highedge);
1860 
1862  "means_dz_eta", "#LT d_{z} #GT vs #eta sector;#eta (sector);#LT d_{z} #GT [#mum]", nBins_, lowedge, highedge);
1863 
1865  "widths_dz_eta", "#sigma_{d_{xy}} vs #eta sector;#eta (sector);#sigma_{d_{z}} [#mum]", nBins_, lowedge, highedge);
1866 
1868  "norm_means_dxy_phi",
1869  "#LT d_{xy}/#sigma_{d_{xy}} #GT vs #phi sector;#varphi (sector) [degrees];#LT d_{xy}/#sigma_{d_{xy}} #GT",
1870  nBins_,
1871  lowedge,
1872  highedge);
1873 
1875  "norm_widths_dxy_phi",
1876  "width(d_{xy}/#sigma_{d_{xy}}) vs #phi sector;#varphi (sector) [degrees]; width(d_{xy}/#sigma_{d_{xy}})",
1877  nBins_,
1878  lowedge,
1879  highedge);
1880 
1882  "norm_means_dz_phi",
1883  "#LT d_{z}/#sigma_{d_{z}} #GT vs #phi sector;#varphi (sector) [degrees];#LT d_{z}/#sigma_{d_{z}} #GT",
1884  nBins_,
1885  lowedge,
1886  highedge);
1887 
1889  "norm_widths_dz_phi",
1890  "width(d_{z}/#sigma_{d_{z}}) vs #phi sector;#varphi (sector) [degrees];width(d_{z}/#sigma_{d_{z}})",
1891  nBins_,
1892  lowedge,
1893  highedge);
1894 
1896  "norm_means_dxy_eta",
1897  "#LT d_{xy}/#sigma_{d_{xy}} #GT vs #eta sector;#eta (sector);#LT d_{xy}/#sigma_{d_{z}} #GT",
1898  nBins_,
1899  lowedge,
1900  highedge);
1901 
1903  "norm_widths_dxy_eta",
1904  "width(d_{xy}/#sigma_{d_{xy}}) vs #eta sector;#eta (sector);width(d_{xy}/#sigma_{d_{z}})",
1905  nBins_,
1906  lowedge,
1907  highedge);
1908 
1910  MeanTrendsDir.make<TH1F>("norm_means_dz_eta",
1911  "#LT d_{z}/#sigma_{d_{z}} #GT vs #eta sector;#eta (sector);#LT d_{z}/#sigma_{d_{z}} #GT",
1912  nBins_,
1913  lowedge,
1914  highedge);
1915 
1917  WidthTrendsDir.make<TH1F>("norm_widths_dz_eta",
1918  "width(d_{z}/#sigma_{d_{z}}) vs #eta sector;#eta (sector);width(d_{z}/#sigma_{d_{z}})",
1919  nBins_,
1920  lowedge,
1921  highedge);
1922 
1923  // means and widhts vs pT and pTCentral
1924 
1925  a_dxypTMeanTrend = MeanTrendsDir.make<TH1F>("means_dxy_pT",
1926  "#LT d_{xy} #GT vs pT;p_{T} [GeV];#LT d_{xy} #GT [#mum]",
1927  mypT_bins_.size() - 1,
1928  mypT_bins_.data());
1929 
1930  a_dxypTWidthTrend = WidthTrendsDir.make<TH1F>("widths_dxy_pT",
1931  "#sigma_{d_{xy}} vs pT;p_{T} [GeV];#sigma_{d_{xy}} [#mum]",
1932  mypT_bins_.size() - 1,
1933  mypT_bins_.data());
1934 
1936  "means_dz_pT", "#LT d_{z} #GT vs pT;p_{T} [GeV];#LT d_{z} #GT [#mum]", mypT_bins_.size() - 1, mypT_bins_.data());
1937 
1938  a_dzpTWidthTrend = WidthTrendsDir.make<TH1F>("widths_dz_pT",
1939  "#sigma_{d_{z}} vs pT;p_{T} [GeV];#sigma_{d_{z}} [#mum]",
1940  mypT_bins_.size() - 1,
1941  mypT_bins_.data());
1942 
1944  MeanTrendsDir.make<TH1F>("norm_means_dxy_pT",
1945  "#LT d_{xy}/#sigma_{d_{xy}} #GT vs pT;p_{T} [GeV];#LT d_{xy}/#sigma_{d_{xy}} #GT",
1946  mypT_bins_.size() - 1,
1947  mypT_bins_.data());
1948 
1950  WidthTrendsDir.make<TH1F>("norm_widths_dxy_pT",
1951  "width(d_{xy}/#sigma_{d_{xy}}) vs pT;p_{T} [GeV]; width(d_{xy}/#sigma_{d_{xy}})",
1952  mypT_bins_.size() - 1,
1953  mypT_bins_.data());
1954 
1955  n_dzpTMeanTrend =
1956  MeanTrendsDir.make<TH1F>("norm_means_dz_pT",
1957  "#LT d_{z}/#sigma_{d_{z}} #GT vs pT;p_{T} [GeV];#LT d_{z}/#sigma_{d_{z}} #GT",
1958  mypT_bins_.size() - 1,
1959  mypT_bins_.data());
1960 
1962  WidthTrendsDir.make<TH1F>("norm_widths_dz_pT",
1963  "width(d_{z}/#sigma_{d_{z}}) vs pT;p_{T} [GeV];width(d_{z}/#sigma_{d_{z}})",
1964  mypT_bins_.size() - 1,
1965  mypT_bins_.data());
1966 
1968  MeanTrendsDir.make<TH1F>("means_dxy_pTCentral",
1969  "#LT d_{xy} #GT vs p_{T};p_{T}(|#eta|<1.) [GeV];#LT d_{xy} #GT [#mum]",
1970  mypT_bins_.size() - 1,
1971  mypT_bins_.data());
1972 
1974  WidthTrendsDir.make<TH1F>("widths_dxy_pTCentral",
1975  "#sigma_{d_{xy}} vs p_{T};p_{T}(|#eta|<1.) [GeV];#sigma_{d_{xy}} [#mum]",
1976  mypT_bins_.size() - 1,
1977  mypT_bins_.data());
1978 
1980  MeanTrendsDir.make<TH1F>("means_dz_pTCentral",
1981  "#LT d_{z} #GT vs p_{T};p_{T}(|#eta|<1.) [GeV];#LT d_{z} #GT [#mum]",
1982  mypT_bins_.size() - 1,
1983  mypT_bins_.data());
1984 
1986  WidthTrendsDir.make<TH1F>("widths_dz_pTCentral",
1987  "#sigma_{d_{z}} vs p_{T};p_{T}(|#eta|<1.) [GeV];#sigma_{d_{z}} [#mum]",
1988  mypT_bins_.size() - 1,
1989  mypT_bins_.data());
1990 
1992  "norm_means_dxy_pTCentral",
1993  "#LT d_{xy}/#sigma_{d_{xy}} #GT vs p_{T};p_{T}(|#eta|<1.) [GeV];#LT d_{xy}/#sigma_{d_{z}} #GT",
1994  mypT_bins_.size() - 1,
1995  mypT_bins_.data());
1996 
1998  "norm_widths_dxy_pTCentral",
1999  "width(d_{xy}/#sigma_{d_{xy}}) vs p_{T};p_{T}(|#eta|<1.) [GeV];width(d_{xy}/#sigma_{d_{z}})",
2000  mypT_bins_.size() - 1,
2001  mypT_bins_.data());
2002 
2004  "norm_means_dz_pTCentral",
2005  "#LT d_{z}/#sigma_{d_{z}} #GT vs p_{T};p_{T}(|#eta|<1.) [GeV];#LT d_{z}/#sigma_{d_{z}} #GT",
2006  mypT_bins_.size() - 1,
2007  mypT_bins_.data());
2008 
2010  "norm_widths_dz_pTCentral",
2011  "width(d_{z}/#sigma_{d_{z}}) vs p_{T};p_{T}(|#eta|<1.) [GeV];width(d_{z}/#sigma_{d_{z}})",
2012  mypT_bins_.size() - 1,
2013  mypT_bins_.data());
2014 
2015  // 2D maps
2016 
2017  a_dxyMeanMap = Mean2DMapsDir.make<TH2F>("means_dxy_map",
2018  "#LT d_{xy} #GT map;#eta (sector);#varphi (sector) [degrees]",
2019  nBins_,
2020  lowedge,
2021  highedge,
2022  nBins_,
2023  lowedge,
2024  highedge);
2025 
2026  a_dzMeanMap = Mean2DMapsDir.make<TH2F>("means_dz_map",
2027  "#LT d_{z} #GT map;#eta (sector);#varphi (sector) [degrees]",
2028  nBins_,
2029  lowedge,
2030  highedge,
2031  nBins_,
2032  lowedge,
2033  highedge);
2034 
2035  n_dxyMeanMap = Mean2DMapsDir.make<TH2F>("norm_means_dxy_map",
2036  "#LT d_{xy}/#sigma_{d_{xy}} #GT map;#eta (sector);#varphi (sector) [degrees]",
2037  nBins_,
2038  lowedge,
2039  highedge,
2040  nBins_,
2041  lowedge,
2042  highedge);
2043 
2044  n_dzMeanMap = Mean2DMapsDir.make<TH2F>("norm_means_dz_map",
2045  "#LT d_{z}/#sigma_{d_{z}} #GT map;#eta (sector);#varphi (sector) [degrees]",
2046  nBins_,
2047  lowedge,
2048  highedge,
2049  nBins_,
2050  lowedge,
2051  highedge);
2052 
2053  a_dxyWidthMap = Width2DMapsDir.make<TH2F>("widths_dxy_map",
2054  "#sigma_{d_{xy}} map;#eta (sector);#varphi (sector) [degrees]",
2055  nBins_,
2056  lowedge,
2057  highedge,
2058  nBins_,
2059  lowedge,
2060  highedge);
2061 
2062  a_dzWidthMap = Width2DMapsDir.make<TH2F>("widths_dz_map",
2063  "#sigma_{d_{z}} map;#eta (sector);#varphi (sector) [degrees]",
2064  nBins_,
2065  lowedge,
2066  highedge,
2067  nBins_,
2068  lowedge,
2069  highedge);
2070 
2071  n_dxyWidthMap =
2072  Width2DMapsDir.make<TH2F>("norm_widths_dxy_map",
2073  "width(d_{xy}/#sigma_{d_{xy}}) map;#eta (sector);#varphi (sector) [degrees]",
2074  nBins_,
2075  lowedge,
2076  highedge,
2077  nBins_,
2078  lowedge,
2079  highedge);
2080 
2081  n_dzWidthMap = Width2DMapsDir.make<TH2F>("norm_widths_dz_map",
2082  "width(d_{z}/#sigma_{d_{z}}) map;#eta (sector);#varphi (sector) [degrees]",
2083  nBins_,
2084  lowedge,
2085  highedge,
2086  nBins_,
2087  lowedge,
2088  highedge);
2089 
2090  // medians and MADs
2091 
2093  MedianTrendsDir.make<TH1F>("medians_dxy_phi",
2094  "Median of d_{xy} vs #phi sector;#varphi (sector) [degrees];#mu_{1/2}(d_{xy}) [#mum]",
2095  nBins_,
2096  lowedge,
2097  highedge);
2098 
2100  "MADs_dxy_phi",
2101  "Median absolute deviation of d_{xy} vs #phi sector;#varphi (sector) [degrees];MAD(d_{xy}) [#mum]",
2102  nBins_,
2103  lowedge,
2104  highedge);
2105 
2107  MedianTrendsDir.make<TH1F>("medians_dz_phi",
2108  "Median of d_{z} vs #phi sector;#varphi (sector) [degrees];#mu_{1/2}(d_{z}) [#mum]",
2109  nBins_,
2110  lowedge,
2111  highedge);
2112 
2114  "MADs_dz_phi",
2115  "Median absolute deviation of d_{z} vs #phi sector;#varphi (sector) [degrees];MAD(d_{z}) [#mum]",
2116  nBins_,
2117  lowedge,
2118  highedge);
2119 
2121  MedianTrendsDir.make<TH1F>("medians_dxy_eta",
2122  "Median of d_{xy} vs #eta sector;#eta (sector);#mu_{1/2}(d_{xy}) [#mum]",
2123  nBins_,
2124  lowedge,
2125  highedge);
2126 
2128  MADTrendsDir.make<TH1F>("MADs_dxy_eta",
2129  "Median absolute deviation of d_{xy} vs #eta sector;#eta (sector);MAD(d_{xy}) [#mum]",
2130  nBins_,
2131  lowedge,
2132  highedge);
2133 
2135  MedianTrendsDir.make<TH1F>("medians_dz_eta",
2136  "Median of d_{z} vs #eta sector;#eta (sector);#mu_{1/2}(d_{z}) [#mum]",
2137  nBins_,
2138  lowedge,
2139  highedge);
2140 
2141  a_dzEtaMADTrend =
2142  MADTrendsDir.make<TH1F>("MADs_dz_eta",
2143  "Median absolute deviation of d_{z} vs #eta sector;#eta (sector);MAD(d_{z}) [#mum]",
2144  nBins_,
2145  lowedge,
2146  highedge);
2147 
2149  "norm_medians_dxy_phi",
2150  "Median of d_{xy}/#sigma_{d_{xy}} vs #phi sector;#varphi (sector) [degrees];#mu_{1/2}(d_{xy}/#sigma_{d_{xy}})",
2151  nBins_,
2152  lowedge,
2153  highedge);
2154 
2155  n_dxyPhiMADTrend = MADTrendsDir.make<TH1F>("norm_MADs_dxy_phi",
2156  "Median absolute deviation of d_{xy}/#sigma_{d_{xy}} vs #phi "
2157  "sector;#varphi (sector) [degrees]; MAD(d_{xy}/#sigma_{d_{xy}})",
2158  nBins_,
2159  lowedge,
2160  highedge);
2161 
2163  "norm_medians_dz_phi",
2164  "Median of d_{z}/#sigma_{d_{z}} vs #phi sector;#varphi (sector) [degrees];#mu_{1/2}(d_{z}/#sigma_{d_{z}})",
2165  nBins_,
2166  lowedge,
2167  highedge);
2168 
2169  n_dzPhiMADTrend = MADTrendsDir.make<TH1F>("norm_MADs_dz_phi",
2170  "Median absolute deviation of d_{z}/#sigma_{d_{z}} vs #phi sector;#varphi "
2171  "(sector) [degrees];MAD(d_{z}/#sigma_{d_{z}})",
2172  nBins_,
2173  lowedge,
2174  highedge);
2175 
2177  "norm_medians_dxy_eta",
2178  "Median of d_{xy}/#sigma_{d_{xy}} vs #eta sector;#eta (sector);#mu_{1/2}(d_{xy}/#sigma_{d_{z}})",
2179  nBins_,
2180  lowedge,
2181  highedge);
2182 
2184  "norm_MADs_dxy_eta",
2185  "Median absolute deviation of d_{xy}/#sigma_{d_{xy}} vs #eta sector;#eta (sector);MAD(d_{xy}/#sigma_{d_{z}})",
2186  nBins_,
2187  lowedge,
2188  highedge);
2189 
2191  "norm_medians_dz_eta",
2192  "Median of d_{z}/#sigma_{d_{z}} vs #eta sector;#eta (sector);#mu_{1/2}(d_{z}/#sigma_{d_{z}})",
2193  nBins_,
2194  lowedge,
2195  highedge);
2196 
2198  "norm_MADs_dz_eta",
2199  "Median absolute deviation of d_{z}/#sigma_{d_{z}} vs #eta sector;#eta (sector);MAD(d_{z}/#sigma_{d_{z}})",
2200  nBins_,
2201  lowedge,
2202  highedge);
2203 
2205  //
2206  // plots of biased residuals
2207  // The vertex includes the probe track
2208  //
2210 
2211  if (useTracksFromRecoVtx_) {
2212  TFileDirectory AbsTransPhiBiasRes = fs->mkdir("Abs_Transv_Phi_BiasResiduals");
2214 
2215  TFileDirectory AbsTransEtaBiasRes = fs->mkdir("Abs_Transv_Eta_BiasResiduals");
2217 
2218  TFileDirectory AbsLongPhiBiasRes = fs->mkdir("Abs_Long_Phi_BiasResiduals");
2220 
2221  TFileDirectory AbsLongEtaBiasRes = fs->mkdir("Abs_Long_Eta_BiasResiduals");
2223 
2224  TFileDirectory NormTransPhiBiasRes = fs->mkdir("Norm_Transv_Phi_BiasResiduals");
2226 
2227  TFileDirectory NormTransEtaBiasRes = fs->mkdir("Norm_Transv_Eta_BiasResiduals");
2229 
2230  TFileDirectory NormLongPhiBiasRes = fs->mkdir("Norm_Long_Phi_BiasResiduals");
2232 
2233  TFileDirectory NormLongEtaBiasRes = fs->mkdir("Norm_Long_Eta_BiasResiduals");
2235 
2236  TFileDirectory AbsDoubleDiffBiasRes = fs->mkdir("Abs_DoubleDiffBiasResiduals");
2237  TFileDirectory NormDoubleDiffBiasRes = fs->mkdir("Norm_DoubleDiffBiasResiduals");
2238 
2239  for (int i = 0; i < nBins_; ++i) {
2240  float phiF = theDetails_.trendbins[PVValHelper::phi][i];
2241  float phiL = theDetails_.trendbins[PVValHelper::phi][i + 1];
2242 
2243  for (int j = 0; j < nBins_; ++j) {
2244  float etaF = theDetails_.trendbins[PVValHelper::eta][j];
2245  float etaL = theDetails_.trendbins[PVValHelper::eta][j + 1];
2246 
2247  a_dxyBiasResidualsMap[i][j] = AbsDoubleDiffBiasRes.make<TH1F>(
2248  Form("histo_dxy_eta_plot%i_phi_plot%i", i, j),
2249  Form("%.2f<#eta_{tk}<%.2f %.2f#circ<#varphi_{tk}<%.2f#circ;d_{xy} [#mum];tracks", etaF, etaL, phiF, phiL),
2251  -dzmax_eta,
2252  dzmax_eta);
2253 
2254  a_dzBiasResidualsMap[i][j] = AbsDoubleDiffBiasRes.make<TH1F>(
2255  Form("histo_dxy_eta_plot%i_phi_plot%i", i, j),
2256  Form("%.2f<#eta_{tk}<%.2f %.2f#circ<#varphi_{tk}<%.2f#circ;d_{z} [#mum];tracks", etaF, etaL, phiF, phiL),
2258  -dzmax_eta,
2259  dzmax_eta);
2260 
2261  n_dxyBiasResidualsMap[i][j] = NormDoubleDiffBiasRes.make<TH1F>(
2262  Form("histo_norm_dxy_eta_plot%i_phi_plot%i", i, j),
2263  Form("%.2f<#eta_{tk}<%.2f %.2f#circ<#varphi_{tk}<%.2f#circ;d_{xy}/#sigma_{d_{xy}};tracks",
2264  etaF,
2265  etaL,
2266  phiF,
2267  phiL),
2269  -dzmax_eta / 100,
2270  dzmax_eta / 100);
2271 
2272  n_dzBiasResidualsMap[i][j] = NormDoubleDiffBiasRes.make<TH1F>(
2273  Form("histo_norm_dxy_eta_plot%i_phi_plot%i", i, j),
2274  Form("%.2f<#eta_{tk}<%.2f %.2f#circ<#varphi_{tk}<%.2f#circ;d_{z}/#sigma_{d_{z}};tracks",
2275  etaF,
2276  etaL,
2277  phiF,
2278  phiL),
2280  -dzmax_eta / 100,
2281  dzmax_eta / 100);
2282  }
2283  }
2284 
2285  // declaration of the directories
2286 
2287  TFileDirectory MeanBiasTrendsDir = fs->mkdir("MeanBiasTrends");
2288  TFileDirectory WidthBiasTrendsDir = fs->mkdir("WidthBiasTrends");
2289  TFileDirectory MedianBiasTrendsDir = fs->mkdir("MedianBiasTrends");
2290  TFileDirectory MADBiasTrendsDir = fs->mkdir("MADBiasTrends");
2291 
2292  TFileDirectory Mean2DBiasMapsDir = fs->mkdir("MeanBiasMaps");
2293  TFileDirectory Width2DBiasMapsDir = fs->mkdir("WidthBiasMaps");
2294 
2295  // means and widths from the fit
2296 
2298  MeanBiasTrendsDir.make<TH1F>("means_dxy_phi",
2299  "#LT d_{xy} #GT vs #phi sector;#varphi (sector) [degrees];#LT d_{xy} #GT [#mum]",
2300  nBins_,
2301  lowedge,
2302  highedge);
2303 
2304  a_dxyPhiWidthBiasTrend = WidthBiasTrendsDir.make<TH1F>(
2305  "widths_dxy_phi",
2306  "#sigma_{d_{xy}} vs #phi sector;#varphi (sector) [degrees];#sigma_{d_{xy}} [#mum]",
2307  nBins_,
2308  lowedge,
2309  highedge);
2310 
2312  MeanBiasTrendsDir.make<TH1F>("means_dz_phi",
2313  "#LT d_{z} #GT vs #phi sector;#varphi (sector) [degrees];#LT d_{z} #GT [#mum]",
2314  nBins_,
2315  lowedge,
2316  highedge);
2317 
2319  WidthBiasTrendsDir.make<TH1F>("widths_dz_phi",
2320  "#sigma_{d_{z}} vs #phi sector;#varphi (sector) [degrees];#sigma_{d_{z}} [#mum]",
2321  nBins_,
2322  lowedge,
2323  highedge);
2324 
2325  a_dxyEtaMeanBiasTrend = MeanBiasTrendsDir.make<TH1F>(
2326  "means_dxy_eta", "#LT d_{xy} #GT vs #eta sector;#eta (sector);#LT d_{xy} #GT [#mum]", nBins_, lowedge, highedge);
2327 
2329  WidthBiasTrendsDir.make<TH1F>("widths_dxy_eta",
2330  "#sigma_{d_{xy}} vs #eta sector;#eta (sector);#sigma_{d_{xy}} [#mum]",
2331  nBins_,
2332  lowedge,
2333  highedge);
2334 
2335  a_dzEtaMeanBiasTrend = MeanBiasTrendsDir.make<TH1F>(
2336  "means_dz_eta", "#LT d_{z} #GT vs #eta sector;#eta (sector);#LT d_{z} #GT [#mum]", nBins_, lowedge, highedge);
2337 
2339  WidthBiasTrendsDir.make<TH1F>("widths_dz_eta",
2340  "#sigma_{d_{xy}} vs #eta sector;#eta (sector);#sigma_{d_{z}} [#mum]",
2341  nBins_,
2342  lowedge,
2343  highedge);
2344 
2345  n_dxyPhiMeanBiasTrend = MeanBiasTrendsDir.make<TH1F>(
2346  "norm_means_dxy_phi",
2347  "#LT d_{xy}/#sigma_{d_{xy}} #GT vs #phi sector;#varphi (sector) [degrees];#LT d_{xy}/#sigma_{d_{xy}} #GT",
2348  nBins_,
2349  lowedge,
2350  highedge);
2351 
2352  n_dxyPhiWidthBiasTrend = WidthBiasTrendsDir.make<TH1F>(
2353  "norm_widths_dxy_phi",
2354  "width(d_{xy}/#sigma_{d_{xy}}) vs #phi sector;#varphi (sector) [degrees]; width(d_{xy}/#sigma_{d_{xy}})",
2355  nBins_,
2356  lowedge,
2357  highedge);
2358 
2359  n_dzPhiMeanBiasTrend = MeanBiasTrendsDir.make<TH1F>(
2360  "norm_means_dz_phi",
2361  "#LT d_{z}/#sigma_{d_{z}} #GT vs #phi sector;#varphi (sector) [degrees];#LT d_{z}/#sigma_{d_{z}} #GT",
2362  nBins_,
2363  lowedge,
2364  highedge);
2365 
2366  n_dzPhiWidthBiasTrend = WidthBiasTrendsDir.make<TH1F>(
2367  "norm_widths_dz_phi",
2368  "width(d_{z}/#sigma_{d_{z}}) vs #phi sector;#varphi (sector) [degrees];width(d_{z}/#sigma_{d_{z}})",
2369  nBins_,
2370  lowedge,
2371  highedge);
2372 
2373  n_dxyEtaMeanBiasTrend = MeanBiasTrendsDir.make<TH1F>(
2374  "norm_means_dxy_eta",
2375  "#LT d_{xy}/#sigma_{d_{xy}} #GT vs #eta sector;#eta (sector);#LT d_{xy}/#sigma_{d_{z}} #GT",
2376  nBins_,
2377  lowedge,
2378  highedge);
2379 
2380  n_dxyEtaWidthBiasTrend = WidthBiasTrendsDir.make<TH1F>(
2381  "norm_widths_dxy_eta",
2382  "width(d_{xy}/#sigma_{d_{xy}}) vs #eta sector;#eta (sector);width(d_{xy}/#sigma_{d_{z}})",
2383  nBins_,
2384  lowedge,
2385  highedge);
2386 
2387  n_dzEtaMeanBiasTrend = MeanBiasTrendsDir.make<TH1F>(
2388  "norm_means_dz_eta",
2389  "#LT d_{z}/#sigma_{d_{z}} #GT vs #eta sector;#eta (sector);#LT d_{z}/#sigma_{d_{z}} #GT",
2390  nBins_,
2391  lowedge,
2392  highedge);
2393 
2394  n_dzEtaWidthBiasTrend = WidthBiasTrendsDir.make<TH1F>(
2395  "norm_widths_dz_eta",
2396  "width(d_{z}/#sigma_{d_{z}}) vs #eta sector;#eta (sector);width(d_{z}/#sigma_{d_{z}})",
2397  nBins_,
2398  lowedge,
2399  highedge);
2400 
2401  // 2D maps
2402 
2403  a_dxyMeanBiasMap = Mean2DBiasMapsDir.make<TH2F>("means_dxy_map",
2404  "#LT d_{xy} #GT map;#eta (sector);#varphi (sector) [degrees]",
2405  nBins_,
2406  lowedge,
2407  highedge,
2408  nBins_,
2409  lowedge,
2410  highedge);
2411 
2412  a_dzMeanBiasMap = Mean2DBiasMapsDir.make<TH2F>("means_dz_map",
2413  "#LT d_{z} #GT map;#eta (sector);#varphi (sector) [degrees]",
2414  nBins_,
2415  lowedge,
2416  highedge,
2417  nBins_,
2418  lowedge,
2419  highedge);
2420 
2422  Mean2DBiasMapsDir.make<TH2F>("norm_means_dxy_map",
2423  "#LT d_{xy}/#sigma_{d_{xy}} #GT map;#eta (sector);#varphi (sector) [degrees]",
2424  nBins_,
2425  lowedge,
2426  highedge,
2427  nBins_,
2428  lowedge,
2429  highedge);
2430 
2431  n_dzMeanBiasMap =
2432  Mean2DBiasMapsDir.make<TH2F>("norm_means_dz_map",
2433  "#LT d_{z}/#sigma_{d_{z}} #GT map;#eta (sector);#varphi (sector) [degrees]",
2434  nBins_,
2435  lowedge,
2436  highedge,
2437  nBins_,
2438  lowedge,
2439  highedge);
2440 
2441  a_dxyWidthBiasMap = Width2DBiasMapsDir.make<TH2F>("widths_dxy_map",
2442  "#sigma_{d_{xy}} map;#eta (sector);#varphi (sector) [degrees]",
2443  nBins_,
2444  lowedge,
2445  highedge,
2446  nBins_,
2447  lowedge,
2448  highedge);
2449 
2450  a_dzWidthBiasMap = Width2DBiasMapsDir.make<TH2F>("widths_dz_map",
2451  "#sigma_{d_{z}} map;#eta (sector);#varphi (sector) [degrees]",
2452  nBins_,
2453  lowedge,
2454  highedge,
2455  nBins_,
2456  lowedge,
2457  highedge);
2458 
2460  Width2DBiasMapsDir.make<TH2F>("norm_widths_dxy_map",
2461  "width(d_{xy}/#sigma_{d_{xy}}) map;#eta (sector);#varphi (sector) [degrees]",
2462  nBins_,
2463  lowedge,
2464  highedge,
2465  nBins_,
2466  lowedge,
2467  highedge);
2468 
2470  Width2DBiasMapsDir.make<TH2F>("norm_widths_dz_map",
2471  "width(d_{z}/#sigma_{d_{z}}) map;#eta (sector);#varphi (sector) [degrees]",
2472  nBins_,
2473  lowedge,
2474  highedge,
2475  nBins_,
2476  lowedge,
2477  highedge);
2478 
2479  // medians and MADs
2480 
2481  a_dxyPhiMedianBiasTrend = MedianBiasTrendsDir.make<TH1F>(
2482  "medians_dxy_phi",
2483  "Median of d_{xy} vs #phi sector;#varphi (sector) [degrees];#mu_{1/2}(d_{xy}) [#mum]",
2484  nBins_,
2485  lowedge,
2486  highedge);
2487 
2488  a_dxyPhiMADBiasTrend = MADBiasTrendsDir.make<TH1F>(
2489  "MADs_dxy_phi",
2490  "Median absolute deviation of d_{xy} vs #phi sector;#varphi (sector) [degrees];MAD(d_{xy}) [#mum]",
2491  nBins_,
2492  lowedge,
2493  highedge);
2494 
2495  a_dzPhiMedianBiasTrend = MedianBiasTrendsDir.make<TH1F>(
2496  "medians_dz_phi",
2497  "Median of d_{z} vs #phi sector;#varphi (sector) [degrees];#mu_{1/2}(d_{z}) [#mum]",
2498  nBins_,
2499  lowedge,
2500  highedge);
2501 
2502  a_dzPhiMADBiasTrend = MADBiasTrendsDir.make<TH1F>(
2503  "MADs_dz_phi",
2504  "Median absolute deviation of d_{z} vs #phi sector;#varphi (sector) [degrees];MAD(d_{z}) [#mum]",
2505  nBins_,
2506  lowedge,
2507  highedge);
2508 
2510  MedianBiasTrendsDir.make<TH1F>("medians_dxy_eta",
2511  "Median of d_{xy} vs #eta sector;#eta (sector);#mu_{1/2}(d_{xy}) [#mum]",
2512  nBins_,
2513  lowedge,
2514  highedge);
2515 
2516  a_dxyEtaMADBiasTrend = MADBiasTrendsDir.make<TH1F>(
2517  "MADs_dxy_eta",
2518  "Median absolute deviation of d_{xy} vs #eta sector;#eta (sector);MAD(d_{xy}) [#mum]",
2519  nBins_,
2520  lowedge,
2521  highedge);
2522 
2524  MedianBiasTrendsDir.make<TH1F>("medians_dz_eta",
2525  "Median of d_{z} vs #eta sector;#eta (sector);#mu_{1/2}(d_{z}) [#mum]",
2526  nBins_,
2527  lowedge,
2528  highedge);
2529 
2531  MADBiasTrendsDir.make<TH1F>("MADs_dz_eta",
2532  "Median absolute deviation of d_{z} vs #eta sector;#eta (sector);MAD(d_{z}) [#mum]",
2533  nBins_,
2534  lowedge,
2535  highedge);
2536 
2537  n_dxyPhiMedianBiasTrend = MedianBiasTrendsDir.make<TH1F>(
2538  "norm_medians_dxy_phi",
2539  "Median of d_{xy}/#sigma_{d_{xy}} vs #phi sector;#varphi (sector) [degrees];#mu_{1/2}(d_{xy}/#sigma_{d_{xy}})",
2540  nBins_,
2541  lowedge,
2542  highedge);
2543 
2544  n_dxyPhiMADBiasTrend = MADBiasTrendsDir.make<TH1F>("norm_MADs_dxy_phi",
2545  "Median absolute deviation of d_{xy}/#sigma_{d_{xy}} vs #phi "
2546  "sector;#varphi (sector) [degrees]; MAD(d_{xy}/#sigma_{d_{xy}})",
2547  nBins_,
2548  lowedge,
2549  highedge);
2550 
2551  n_dzPhiMedianBiasTrend = MedianBiasTrendsDir.make<TH1F>(
2552  "norm_medians_dz_phi",
2553  "Median of d_{z}/#sigma_{d_{z}} vs #phi sector;#varphi (sector) [degrees];#mu_{1/2}(d_{z}/#sigma_{d_{z}})",
2554  nBins_,
2555  lowedge,
2556  highedge);
2557 
2558  n_dzPhiMADBiasTrend = MADBiasTrendsDir.make<TH1F>("norm_MADs_dz_phi",
2559  "Median absolute deviation of d_{z}/#sigma_{d_{z}} vs #phi "
2560  "sector;#varphi (sector) [degrees];MAD(d_{z}/#sigma_{d_{z}})",
2561  nBins_,
2562  lowedge,
2563  highedge);
2564 
2565  n_dxyEtaMedianBiasTrend = MedianBiasTrendsDir.make<TH1F>(
2566  "norm_medians_dxy_eta",
2567  "Median of d_{xy}/#sigma_{d_{xy}} vs #eta sector;#eta (sector);#mu_{1/2}(d_{xy}/#sigma_{d_{z}})",
2568  nBins_,
2569  lowedge,
2570  highedge);
2571 
2572  n_dxyEtaMADBiasTrend = MADBiasTrendsDir.make<TH1F>(
2573  "norm_MADs_dxy_eta",
2574  "Median absolute deviation of d_{xy}/#sigma_{d_{xy}} vs #eta sector;#eta (sector);MAD(d_{xy}/#sigma_{d_{z}})",
2575  nBins_,
2576  lowedge,
2577  highedge);
2578 
2579  n_dzEtaMedianBiasTrend = MedianBiasTrendsDir.make<TH1F>(
2580  "norm_medians_dz_eta",
2581  "Median of d_{z}/#sigma_{d_{z}} vs #eta sector;#eta (sector);#mu_{1/2}(d_{z}/#sigma_{d_{z}})",
2582  nBins_,
2583  lowedge,
2584  highedge);
2585 
2586  n_dzEtaMADBiasTrend = MADBiasTrendsDir.make<TH1F>(
2587  "norm_MADs_dz_eta",
2588  "Median absolute deviation of d_{z}/#sigma_{d_{z}} vs #eta sector;#eta (sector);MAD(d_{z}/#sigma_{d_{z}})",
2589  nBins_,
2590  lowedge,
2591  highedge);
2592  }
2593 }
2594 // ------------ method called once each job just after ending the event loop ------------
2596  TFileDirectory RunFeatures = fs->mkdir("RunFeatures");
2597  h_runStartTimes = RunFeatures.make<TH1I>(
2598  "runStartTimes", "run start times", runNumbersTimesLog_.size(), 0, runNumbersTimesLog_.size());
2599  h_runEndTimes =
2600  RunFeatures.make<TH1I>("runEndTimes", "run end times", runNumbersTimesLog_.size(), 0, runNumbersTimesLog_.size());
2601 
2602  unsigned int count = 1;
2603  for (const auto& run : runNumbersTimesLog_) {
2604  // strip down the microseconds
2605  h_runStartTimes->SetBinContent(count, run.second.first / 10e6);
2606  h_runStartTimes->GetXaxis()->SetBinLabel(count, (std::to_string(run.first)).c_str());
2607 
2608  h_runEndTimes->SetBinContent(count, run.second.second / 10e6);
2609  h_runEndTimes->GetXaxis()->SetBinLabel(count, (std::to_string(run.first)).c_str());
2610 
2611  count++;
2612  }
2613 
2614  edm::LogInfo("PrimaryVertexValidation") << "######################################\n"
2615  << "# PrimaryVertexValidation::endJob()\n"
2616  << "# Number of analyzed events: " << Nevt_ << "\n"
2617  << "######################################";
2618 
2619  // means and widhts vs ladder and module number
2620 
2622  "means_dxy_modZ", "#LT d_{xy} #GT vs modZ;module number (Z);#LT d_{xy} #GT [#mum]", nModZ_, 0., nModZ_);
2623 
2625  "widths_dxy_modZ", "#sigma_{d_{xy}} vs modZ;module number (Z);#sigma_{d_{xy}} [#mum]", nModZ_, 0., nModZ_);
2626 
2628  "means_dz_modZ", "#LT d_{z} #GT vs modZ;module number (Z);#LT d_{z} #GT [#mum]", nModZ_, 0., nModZ_);
2629 
2631  "widths_dz_modZ", "#sigma_{d_{z}} vs modZ;module number (Z);#sigma_{d_{z}} [#mum]", nModZ_, 0., nModZ_);
2632 
2633  a_dxyladderMeanTrend = MeanTrendsDir.make<TH1F>("means_dxy_ladder",
2634  "#LT d_{xy} #GT vs ladder;ladder number (#phi);#LT d_{xy} #GT [#mum]",
2635  nLadders_,
2636  0.,
2637  nLadders_);
2638 
2640  WidthTrendsDir.make<TH1F>("widths_dxy_ladder",
2641  "#sigma_{d_{xy}} vs ladder;ladder number (#phi);#sigma_{d_{xy}} [#mum]",
2642  nLadders_,
2643  0.,
2644  nLadders_);
2645 
2647  "means_dz_ladder", "#LT d_{z} #GT vs ladder;ladder number (#phi);#LT d_{z} #GT [#mum]", nLadders_, 0., nLadders_);
2648 
2650  WidthTrendsDir.make<TH1F>("widths_dz_ladder",
2651  "#sigma_{d_{z}} vs ladder;ladder number (#phi);#sigma_{d_{z}} [#mum]",
2652  nLadders_,
2653  0.,
2654  nLadders_);
2655 
2657  "norm_means_dxy_modZ",
2658  "#LT d_{xy}/#sigma_{d_{xy}} #GT vs modZ;module number (Z);#LT d_{xy}/#sigma_{d_{xy}} #GT",
2659  nModZ_,
2660  0.,
2661  nModZ_);
2662 
2664  "norm_widths_dxy_modZ",
2665  "width(d_{xy}/#sigma_{d_{xy}}) vs modZ;module number (Z); width(d_{xy}/#sigma_{d_{xy}})",
2666  nModZ_,
2667  0.,
2668  nModZ_);
2669 
2671  MeanTrendsDir.make<TH1F>("norm_means_dz_modZ",
2672  "#LT d_{z}/#sigma_{d_{z}} #GT vs modZ;module number (Z);#LT d_{z}/#sigma_{d_{z}} #GT",
2673  nModZ_,
2674  0.,
2675  nModZ_);
2676 
2678  WidthTrendsDir.make<TH1F>("norm_widths_dz_modZ",
2679  "width(d_{z}/#sigma_{d_{z}}) vs pT;module number (Z);width(d_{z}/#sigma_{d_{z}})",
2680  nModZ_,
2681  0.,
2682  nModZ_);
2683 
2685  "norm_means_dxy_ladder",
2686  "#LT d_{xy}/#sigma_{d_{xy}} #GT vs ladder;ladder number (#phi);#LT d_{xy}/#sigma_{d_{z}} #GT",
2687  nLadders_,
2688  0.,
2689  nLadders_);
2690 
2692  "norm_widths_dxy_ladder",
2693  "width(d_{xy}/#sigma_{d_{xy}}) vs ladder;ladder number (#phi);width(d_{xy}/#sigma_{d_{z}})",
2694  nLadders_,
2695  0.,
2696  nLadders_);
2697 
2699  "norm_means_dz_ladder",
2700  "#LT d_{z}/#sigma_{d_{z}} #GT vs ladder;ladder number (#phi);#LT d_{z}/#sigma_{d_{z}} #GT",
2701  nLadders_,
2702  0.,
2703  nLadders_);
2704 
2706  "norm_widths_dz_ladder",
2707  "width(d_{z}/#sigma_{d_{z}}) vs ladder;ladder number (#phi);width(d_{z}/#sigma_{d_{z}})",
2708  nLadders_,
2709  0.,
2710  nLadders_);
2711 
2712  // 2D maps of residuals in bins of L1 modules
2713 
2714  a_dxyL1MeanMap = Mean2DMapsDir.make<TH2F>("means_dxy_l1map",
2715  "#LT d_{xy} #GT map;module number [z];ladder number [#varphi]",
2716  8,
2717  0.,
2718  8.,
2719  nLadders_,
2720  0.,
2721  nLadders_);
2722 
2723  a_dzL1MeanMap = Mean2DMapsDir.make<TH2F>("means_dz_l1map",
2724  "#LT d_{z} #GT map;module number [z];ladder number [#varphi]",
2725  8,
2726  0.,
2727  8.,
2728  nLadders_,
2729  0.,
2730  nLadders_);
2731 
2732  n_dxyL1MeanMap =
2733  Mean2DMapsDir.make<TH2F>("norm_means_dxy_l1map",
2734  "#LT d_{xy}/#sigma_{d_{xy}} #GT map;module number [z];ladder number [#varphi]",
2735  8,
2736  0.,
2737  8.,
2738  nLadders_,
2739  0.,
2740  nLadders_);
2741 
2742  n_dzL1MeanMap = Mean2DMapsDir.make<TH2F>("norm_means_dz_l1map",
2743  "#LT d_{z}/#sigma_{d_{z}} #GT map;module number [z];ladder number [#varphi]",
2744  8,
2745  0.,
2746  8.,
2747  nLadders_,
2748  0.,
2749  nLadders_);
2750 
2751  a_dxyL1WidthMap = Width2DMapsDir.make<TH2F>("widths_dxy_l1map",
2752  "#sigma_{d_{xy}} map;module number [z];ladder number [#varphi]",
2753  8,
2754  0.,
2755  8.,
2756  nLadders_,
2757  0.,
2758  nLadders_);
2759 
2760  a_dzL1WidthMap = Width2DMapsDir.make<TH2F>("widths_dz_l1map",
2761  "#sigma_{d_{z}} map;module number [z];ladder number [#varphi]",
2762  8,
2763  0.,
2764  8.,
2765  nLadders_,
2766  0.,
2767  nLadders_);
2768 
2769  n_dxyL1WidthMap =
2770  Width2DMapsDir.make<TH2F>("norm_widths_dxy_l1map",
2771  "width(d_{xy}/#sigma_{d_{xy}}) map;module number [z];ladder number [#varphi]",
2772  8,
2773  0.,
2774  8.,
2775  nLadders_,
2776  0.,
2777  nLadders_);
2778 
2779  n_dzL1WidthMap =
2780  Width2DMapsDir.make<TH2F>("norm_widths_dz_l1map",
2781  "width(d_{z}/#sigma_{d_{z}}) map;module number [z];ladder number [#varphi]",
2782  8,
2783  0.,
2784  8.,
2785  nLadders_,
2786  0.,
2787  nLadders_);
2788 
2789  if (useTracksFromRecoVtx_) {
2794 
2799 
2804 
2809 
2810  // medians and MADs
2811 
2816 
2821 
2826 
2831 
2832  // 2d Maps
2833 
2838 
2843  }
2844 
2845  // do profiles
2846 
2851 
2856 
2861 
2866 
2867  // vs transverse momentum
2868 
2873 
2878 
2883 
2888 
2889  // vs ladder and module number
2890 
2895 
2900 
2905 
2910 
2911  // medians and MADs
2912 
2915 
2918 
2923 
2928 
2933 
2934  // 2D Maps
2935 
2940 
2945 
2946  // 2D Maps of residuals in bins of L1 modules
2947 
2952 
2957 }
2958 
2959 //*************************************************************
2960 std::pair<long long, long long> PrimaryVertexValidation::getRunTime(const edm::EventSetup& iSetup) const
2961 //*************************************************************
2962 {
2963  edm::ESHandle<RunInfo> runInfo = iSetup.getHandle(runInfoToken_);
2964  if (debug_) {
2965  edm::LogInfo("PrimaryVertexValidation")
2966  << runInfo.product()->m_start_time_str << " " << runInfo.product()->m_stop_time_str << std::endl;
2967  }
2968  return std::make_pair(runInfo.product()->m_start_time_ll, runInfo.product()->m_stop_time_ll);
2969 }
2970 
2971 //*************************************************************
2973 //*************************************************************
2974 {
2975  edm::ESHandle<RunInfo> runInfo = iSetup.getHandle(runInfoToken_);
2976  double average_current = runInfo.product()->m_avg_current;
2977  bool isOn = (average_current > 2000.);
2978  bool is0T = (ptOfProbe_ == 0.);
2979 
2980  return ((isOn && !is0T) || (!isOn && is0T));
2981 }
2982 
2983 //*************************************************************
2985 //*************************************************************
2986 {
2987  nTracks_ = 0;
2988  nClus_ = 0;
2989  nOfflineVertices_ = 0;
2990  RunNumber_ = 0;
2992  xOfflineVertex_ = -999.;
2993  yOfflineVertex_ = -999.;
2994  zOfflineVertex_ = -999.;
2995  xErrOfflineVertex_ = 0.;
2996  yErrOfflineVertex_ = 0.;
2997  zErrOfflineVertex_ = 0.;
2998  BSx0_ = -999.;
2999  BSy0_ = -999.;
3000  BSz0_ = -999.;
3001  Beamsigmaz_ = -999.;
3002  Beamdxdz_ = -999.;
3003  BeamWidthX_ = -999.;
3004  BeamWidthY_ = -999.;
3005  wxy2_ = -999.;
3006 
3007  for (int i = 0; i < nMaxtracks_; ++i) {
3008  pt_[i] = 0;
3009  p_[i] = 0;
3010  nhits_[i] = 0;
3011  nhits1D_[i] = 0;
3012  nhits2D_[i] = 0;
3013  nhitsBPIX_[i] = 0;
3014  nhitsFPIX_[i] = 0;
3015  nhitsTIB_[i] = 0;
3016  nhitsTID_[i] = 0;
3017  nhitsTOB_[i] = 0;
3018  nhitsTEC_[i] = 0;
3019  isHighPurity_[i] = 0;
3020  eta_[i] = 0;
3021  theta_[i] = 0;
3022  phi_[i] = 0;
3023  chi2_[i] = 0;
3024  chi2ndof_[i] = 0;
3025  charge_[i] = 0;
3026  qoverp_[i] = 0;
3027  dz_[i] = 0;
3028  dxy_[i] = 0;
3029  dzBs_[i] = 0;
3030  dxyBs_[i] = 0;
3031  xPCA_[i] = 0;
3032  yPCA_[i] = 0;
3033  zPCA_[i] = 0;
3034  xUnbiasedVertex_[i] = 0;
3035  yUnbiasedVertex_[i] = 0;
3036  zUnbiasedVertex_[i] = 0;
3038  chi2UnbiasedVertex_[i] = 0;
3040  DOFUnbiasedVertex_[i] = 0;
3043  dxyFromMyVertex_[i] = 0;
3044  dzFromMyVertex_[i] = 0;
3045  d3DFromMyVertex_[i] = 0;
3046  dxyErrorFromMyVertex_[i] = 0;
3047  dzErrorFromMyVertex_[i] = 0;
3048  d3DErrorFromMyVertex_[i] = 0;
3049  IPTsigFromMyVertex_[i] = 0;
3050  IPLsigFromMyVertex_[i] = 0;
3051  IP3DsigFromMyVertex_[i] = 0;
3052  hasRecVertex_[i] = 0;
3053  isGoodTrack_[i] = 0;
3054  }
3055 }
3056 
3057 //*************************************************************
3059  TH1F* residualsPlot[100],
3060  PVValHelper::estimator fitPar_,
3061  const std::string& var_)
3062 //*************************************************************
3063 {
3064  for (int i = 0; i < nBins_; ++i) {
3065  char phibincenter[129];
3066  auto phiBins = theDetails_.trendbins[PVValHelper::phi];
3067  sprintf(phibincenter, "%.f", (phiBins[i] + phiBins[i + 1]) / 2.);
3068 
3069  char etabincenter[129];
3071  sprintf(etabincenter, "%.1f", (etaBins[i] + etaBins[i + 1]) / 2.);
3072 
3073  switch (fitPar_) {
3074  case PVValHelper::MEAN: {
3075  float mean_ = PVValHelper::fitResiduals(residualsPlot[i]).first.value();
3076  float meanErr_ = PVValHelper::fitResiduals(residualsPlot[i]).first.error();
3077  trendPlot->SetBinContent(i + 1, mean_);
3078  trendPlot->SetBinError(i + 1, meanErr_);
3079  break;
3080  }
3081  case PVValHelper::WIDTH: {
3082  float width_ = PVValHelper::fitResiduals(residualsPlot[i]).second.value();
3083  float widthErr_ = PVValHelper::fitResiduals(residualsPlot[i]).second.error();
3084  trendPlot->SetBinContent(i + 1, width_);
3085  trendPlot->SetBinError(i + 1, widthErr_);
3086  break;
3087  }
3088  case PVValHelper::MEDIAN: {
3089  float median_ = PVValHelper::getMedian(residualsPlot[i]).value();
3090  float medianErr_ = PVValHelper::getMedian(residualsPlot[i]).error();
3091  trendPlot->SetBinContent(i + 1, median_);
3092  trendPlot->SetBinError(i + 1, medianErr_);
3093  break;
3094  }
3095  case PVValHelper::MAD: {
3096  float mad_ = PVValHelper::getMAD(residualsPlot[i]).value();
3097  float madErr_ = PVValHelper::getMAD(residualsPlot[i]).error();
3098  trendPlot->SetBinContent(i + 1, mad_);
3099  trendPlot->SetBinError(i + 1, madErr_);
3100  break;
3101  }
3102  default:
3103  edm::LogWarning("PrimaryVertexValidation")
3104  << "fillTrendPlot() " << fitPar_ << " unknown estimator!" << std::endl;
3105  break;
3106  }
3107 
3108  if (var_.find("eta") != std::string::npos) {
3109  trendPlot->GetXaxis()->SetBinLabel(i + 1, etabincenter);
3110  } else if (var_.find("phi") != std::string::npos) {
3111  trendPlot->GetXaxis()->SetBinLabel(i + 1, phibincenter);
3112  } else {
3113  edm::LogWarning("PrimaryVertexValidation")
3114  << "fillTrendPlot() " << var_ << " unknown track parameter!" << std::endl;
3115  }
3116  }
3117 }
3118 
3119 //*************************************************************
3121  std::vector<TH1F*>& h,
3122  PVValHelper::estimator fitPar_,
3123  PVValHelper::plotVariable plotVar)
3124 //*************************************************************
3125 {
3126  for (auto iterator = h.begin(); iterator != h.end(); iterator++) {
3127  unsigned int bin = std::distance(h.begin(), iterator) + 1;
3128  std::pair<Measurement1D, Measurement1D> myFit = PVValHelper::fitResiduals((*iterator));
3129 
3130  switch (fitPar_) {
3131  case PVValHelper::MEAN: {
3132  float mean_ = myFit.first.value();
3133  float meanErr_ = myFit.first.error();
3134  trendPlot->SetBinContent(bin, mean_);
3135  trendPlot->SetBinError(bin, meanErr_);
3136  break;
3137  }
3138  case PVValHelper::WIDTH: {
3139  float width_ = myFit.second.value();
3140  float widthErr_ = myFit.second.error();
3141  trendPlot->SetBinContent(bin, width_);
3142  trendPlot->SetBinError(bin, widthErr_);
3143  break;
3144  }
3145  case PVValHelper::MEDIAN: {
3146  float median_ = PVValHelper::getMedian(*iterator).value();
3147  float medianErr_ = PVValHelper::getMedian(*iterator).error();
3148  trendPlot->SetBinContent(bin, median_);
3149  trendPlot->SetBinError(bin, medianErr_);
3150  break;
3151  }
3152  case PVValHelper::MAD: {
3153  float mad_ = PVValHelper::getMAD(*iterator).value();
3154  float madErr_ = PVValHelper::getMAD(*iterator).error();
3155  trendPlot->SetBinContent(bin, mad_);
3156  trendPlot->SetBinError(bin, madErr_);
3157  break;
3158  }
3159  default:
3160  edm::LogWarning("PrimaryVertexValidation")
3161  << "fillTrendPlotByIndex() " << fitPar_ << " unknown estimator!" << std::endl;
3162  break;
3163  }
3164 
3165  char bincenter[129];
3166  if (plotVar == PVValHelper::eta) {
3168  sprintf(bincenter, "%.1f", (etaBins[bin - 1] + etaBins[bin]) / 2.);
3169  trendPlot->GetXaxis()->SetBinLabel(bin, bincenter);
3170  } else if (plotVar == PVValHelper::phi) {
3171  auto phiBins = theDetails_.trendbins[PVValHelper::phi];
3172  sprintf(bincenter, "%.f", (phiBins[bin - 1] + phiBins[bin]) / 2.);
3173  trendPlot->GetXaxis()->SetBinLabel(bin, bincenter);
3174  } else {
3176  //edm::LogWarning("PrimaryVertexValidation")<<"fillTrendPlotByIndex() "<< plotVar <<" unknown track parameter!"<<std::endl;
3177  }
3178  }
3179 }
3180 
3181 //*************************************************************
3183  TH1F* residualsMapPlot[100][100],
3184  PVValHelper::estimator fitPar_,
3185  const int nXBins_,
3186  const int nYBins_)
3187 //*************************************************************
3188 {
3189  for (int i = 0; i < nYBins_; ++i) {
3190  char phibincenter[129];
3191  auto phiBins = theDetails_.trendbins[PVValHelper::phi];
3192  sprintf(phibincenter, "%.f", (phiBins[i] + phiBins[i + 1]) / 2.);
3193 
3194  if (nXBins_ == nYBins_) {
3195  trendMap->GetYaxis()->SetBinLabel(i + 1, phibincenter);
3196  }
3197 
3198  for (int j = 0; j < nXBins_; ++j) {
3199  char etabincenter[129];
3201  sprintf(etabincenter, "%.1f", (etaBins[j] + etaBins[j + 1]) / 2.);
3202 
3203  if (i == 0) {
3204  if (nXBins_ == nYBins_) {
3205  trendMap->GetXaxis()->SetBinLabel(j + 1, etabincenter);
3206  }
3207  }
3208 
3209  switch (fitPar_) {
3210  case PVValHelper::MEAN: {
3211  float mean_ = PVValHelper::fitResiduals(residualsMapPlot[i][j]).first.value();
3212  float meanErr_ = PVValHelper::fitResiduals(residualsMapPlot[i][j]).first.error();
3213  trendMap->SetBinContent(j + 1, i + 1, mean_);
3214  trendMap->SetBinError(j + 1, i + 1, meanErr_);
3215  break;
3216  }
3217  case PVValHelper::WIDTH: {
3218  float width_ = PVValHelper::fitResiduals(residualsMapPlot[i][j]).second.value();
3219  float widthErr_ = PVValHelper::fitResiduals(residualsMapPlot[i][j]).second.error();
3220  trendMap->SetBinContent(j + 1, i + 1, width_);
3221  trendMap->SetBinError(j + 1, i + 1, widthErr_);
3222  break;
3223  }
3224  case PVValHelper::MEDIAN: {
3225  float median_ = PVValHelper::getMedian(residualsMapPlot[i][j]).value();
3226  float medianErr_ = PVValHelper::getMedian(residualsMapPlot[i][j]).error();
3227  trendMap->SetBinContent(j + 1, i + 1, median_);
3228  trendMap->SetBinError(j + 1, i + 1, medianErr_);
3229  break;
3230  }
3231  case PVValHelper::MAD: {
3232  float mad_ = PVValHelper::getMAD(residualsMapPlot[i][j]).value();
3233  float madErr_ = PVValHelper::getMAD(residualsMapPlot[i][j]).error();
3234  trendMap->SetBinContent(j + 1, i + 1, mad_);
3235  trendMap->SetBinError(j + 1, i + 1, madErr_);
3236  break;
3237  }
3238  default:
3239  edm::LogWarning("PrimaryVertexValidation:") << " fillMap() " << fitPar_ << " unknown estimator!" << std::endl;
3240  }
3241  } // closes loop on eta bins
3242  } // cloeses loop on phi bins
3243 }
3244 
3245 //*************************************************************
3247 //*************************************************************
3248 {
3249  if (a.tracksSize() != b.tracksSize())
3250  return a.tracksSize() > b.tracksSize() ? true : false;
3251  else
3252  return a.chi2() < b.chi2() ? true : false;
3253 }
3254 
3255 //*************************************************************
3257  const reco::Vertex& vertex,
3258  const std::string& qualityString_,
3259  double dxyErrMax_,
3260  double dzErrMax_,
3261  double ptErrMax_)
3262 //*************************************************************
3263 {
3264  math::XYZPoint vtxPoint(0.0, 0.0, 0.0);
3265  double vzErr = 0.0, vxErr = 0.0, vyErr = 0.0;
3266  vtxPoint = vertex.position();
3267  vzErr = vertex.zError();
3268  vxErr = vertex.xError();
3269  vyErr = vertex.yError();
3270 
3271  double dxy = 0.0, dz = 0.0, dxysigma = 0.0, dzsigma = 0.0;
3272  dxy = track.dxy(vtxPoint);
3273  dz = track.dz(vtxPoint);
3274  dxysigma = sqrt(track.d0Error() * track.d0Error() + vxErr * vyErr);
3275  dzsigma = sqrt(track.dzError() * track.dzError() + vzErr * vzErr);
3276 
3277  if (track.quality(reco::TrackBase::qualityByName(qualityString_)) != 1)
3278  return false;
3279  if (std::abs(dxy / dxysigma) > dxyErrMax_)
3280  return false;
3281  if (std::abs(dz / dzsigma) > dzErrMax_)
3282  return false;
3283  if (track.ptError() / track.pt() > ptErrMax_)
3284  return false;
3285 
3286  return true;
3287 }
3288 
3289 //*************************************************************
3291 //*************************************************************
3292 {
3293  TH1F::SetDefaultSumw2(kTRUE);
3294 
3295  std::map<std::string, TH1*> h;
3296 
3297  // histograms of track quality (Data and MC)
3298  std::string types[] = {"all", "sel"};
3299  for (const auto& type : types) {
3300  h["pseudorapidity_" + type] =
3301  dir.make<TH1F>(("rapidity_" + type).c_str(), "track pseudorapidity; track #eta; tracks", 100, -3., 3.);
3302  h["z0_" + type] = dir.make<TH1F>(("z0_" + type).c_str(), "track z_{0};track z_{0} (cm);tracks", 80, -40., 40.);
3303  h["phi_" + type] = dir.make<TH1F>(("phi_" + type).c_str(), "track #phi; track #phi;tracks", 80, -M_PI, M_PI);
3304  h["eta_" + type] = dir.make<TH1F>(("eta_" + type).c_str(), "track #eta; track #eta;tracks", 80, -4., 4.);
3305  h["pt_" + type] = dir.make<TH1F>(("pt_" + type).c_str(), "track p_{T}; track p_{T} [GeV];tracks", 100, 0., 20.);
3306  h["p_" + type] = dir.make<TH1F>(("p_" + type).c_str(), "track p; track p [GeV];tracks", 100, 0., 20.);
3307  h["found_" + type] =
3308  dir.make<TH1F>(("found_" + type).c_str(), "n. found hits;n^{found}_{hits};tracks", 30, 0., 30.);
3309  h["lost_" + type] = dir.make<TH1F>(("lost_" + type).c_str(), "n. lost hits;n^{lost}_{hits};tracks", 20, 0., 20.);
3310  h["nchi2_" + type] =
3311  dir.make<TH1F>(("nchi2_" + type).c_str(), "normalized track #chi^{2};track #chi^{2}/ndf;tracks", 100, 0., 20.);
3312  h["rstart_" + type] = dir.make<TH1F>(
3313  ("rstart_" + type).c_str(), "track start radius; track innermost radius r (cm);tracks", 100, 0., 20.);
3314  h["expectedInner_" + type] = dir.make<TH1F>(
3315  ("expectedInner_" + type).c_str(), "n. expected inner hits;n^{expected}_{inner};tracks", 10, 0., 10.);
3316  h["expectedOuter_" + type] = dir.make<TH1F>(
3317  ("expectedOuter_" + type).c_str(), "n. expected outer hits;n^{expected}_{outer};tracks ", 10, 0., 10.);
3318  h["logtresxy_" + type] =
3319  dir.make<TH1F>(("logtresxy_" + type).c_str(),
3320  "log10(track r-#phi resolution/#mum);log10(track r-#phi resolution/#mum);tracks",
3321  100,
3322  0.,
3323  5.);
3324  h["logtresz_" + type] = dir.make<TH1F>(("logtresz_" + type).c_str(),
3325  "log10(track z resolution/#mum);log10(track z resolution/#mum);tracks",
3326  100,
3327  0.,
3328  5.);
3329  h["tpullxy_" + type] =
3330  dir.make<TH1F>(("tpullxy_" + type).c_str(), "track r-#phi pull;pull_{r-#phi};tracks", 100, -10., 10.);
3331  h["tpullz_" + type] =
3332  dir.make<TH1F>(("tpullz_" + type).c_str(), "track r-z pull;pull_{r-z};tracks", 100, -50., 50.);
3333  h["tlogDCAxy_" + type] = dir.make<TH1F>(
3334  ("tlogDCAxy_" + type).c_str(), "track log_{10}(DCA_{r-#phi});track log_{10}(DCA_{r-#phi});tracks", 200, -5., 3.);
3335  h["tlogDCAz_" + type] = dir.make<TH1F>(
3336  ("tlogDCAz_" + type).c_str(), "track log_{10}(DCA_{r-z});track log_{10}(DCA_{r-z});tracks", 200, -5., 5.);
3337  h["lvseta_" + type] = dir.make<TH2F>(
3338  ("lvseta_" + type).c_str(), "cluster length vs #eta;track #eta;cluster length", 60, -3., 3., 20, 0., 20);
3339  h["lvstanlambda_" + type] = dir.make<TH2F>(("lvstanlambda_" + type).c_str(),
3340  "cluster length vs tan #lambda; tan#lambda;cluster length",
3341  60,
3342  -6.,
3343  6.,
3344  20,
3345  0.,
3346  20);
3347  h["restrkz_" + type] =
3348  dir.make<TH1F>(("restrkz_" + type).c_str(), "z-residuals (track vs vertex);res_{z} (cm);tracks", 200, -5., 5.);
3349  h["restrkzvsphi_" + type] = dir.make<TH2F>(("restrkzvsphi_" + type).c_str(),
3350  "z-residuals (track - vertex) vs track #phi;track #phi;res_{z} (cm)",
3351  12,
3352  -M_PI,
3353  M_PI,
3354  100,
3355  -0.5,
3356  0.5);
3357  h["restrkzvseta_" + type] = dir.make<TH2F>(("restrkzvseta_" + type).c_str(),
3358  "z-residuals (track - vertex) vs track #eta;track #eta;res_{z} (cm)",
3359  12,
3360  -3.,
3361  3.,
3362  200,
3363  -0.5,
3364  0.5);
3365  h["pulltrkzvsphi_" + type] =
3366  dir.make<TH2F>(("pulltrkzvsphi_" + type).c_str(),
3367  "normalized z-residuals (track - vertex) vs track #phi;track #phi;res_{z}/#sigma_{res_{z}}",
3368  12,
3369  -M_PI,
3370  M_PI,
3371  100,
3372  -5.,
3373  5.);
3374  h["pulltrkzvseta_" + type] =
3375  dir.make<TH2F>(("pulltrkzvseta_" + type).c_str(),
3376  "normalized z-residuals (track - vertex) vs track #eta;track #eta;res_{z}/#sigma_{res_{z}}",
3377  12,
3378  -3.,
3379  3.,
3380  100,
3381  -5.,
3382  5.);
3383  h["pulltrkz_" + type] = dir.make<TH1F>(("pulltrkz_" + type).c_str(),
3384  "normalized z-residuals (track vs vertex);res_{z}/#sigma_{res_{z}};tracks",
3385  100,
3386  -5.,
3387  5.);
3388  h["sigmatrkz0_" + type] = dir.make<TH1F>(
3389  ("sigmatrkz0_" + type).c_str(), "z-resolution (excluding beam);#sigma^{trk}_{z_{0}} (cm);tracks", 100, 0., 5.);
3390  h["sigmatrkz_" + type] = dir.make<TH1F>(
3391  ("sigmatrkz_" + type).c_str(), "z-resolution (including beam);#sigma^{trk}_{z} (cm);tracks", 100, 0., 5.);
3392  h["nbarrelhits_" + type] = dir.make<TH1F>(
3393  ("nbarrelhits_" + type).c_str(), "number of pixel barrel hits;n. hits Barrel Pixel;tracks", 10, 0., 10.);
3394  h["nbarrelLayers_" + type] = dir.make<TH1F>(
3395  ("nbarrelLayers_" + type).c_str(), "number of pixel barrel layers;n. layers Barrel Pixel;tracks", 10, 0., 10.);
3396  h["nPxLayers_" + type] = dir.make<TH1F>(
3397  ("nPxLayers_" + type).c_str(), "number of pixel layers (barrel+endcap);n. Pixel layers;tracks", 10, 0., 10.);
3398  h["nSiLayers_" + type] =
3399  dir.make<TH1F>(("nSiLayers_" + type).c_str(), "number of Tracker layers;n. Tracker layers;tracks", 20, 0., 20.);
3400  h["trackAlgo_" + type] =
3401  dir.make<TH1F>(("trackAlgo_" + type).c_str(), "track algorithm;track algo;tracks", 30, 0., 30.);
3402  h["trackQuality_" + type] =
3403  dir.make<TH1F>(("trackQuality_" + type).c_str(), "track quality;track quality;tracks", 7, -1., 6.);
3404  }
3405 
3406  return h;
3407 }
3408 
3409 //*************************************************************
3410 // Generic booker function
3411 //*************************************************************
3413  unsigned int theNOfBins,
3414  PVValHelper::residualType resType,
3416  bool isNormalized) {
3417  TH1F::SetDefaultSumw2(kTRUE);
3418 
3419  auto hash = std::make_pair(resType, varType);
3420 
3421  double down = theDetails_.range[hash].first;
3422  double up = theDetails_.range[hash].second;
3423 
3424  if (isNormalized) {
3425  up = up / 100.;
3426  down = down / 100.;
3427  }
3428 
3429  std::vector<TH1F*> h;
3430  h.reserve(theNOfBins);
3431 
3432  if (theNOfBins == 0) {
3433  edm::LogError("PrimaryVertexValidation")
3434  << "bookResidualsHistogram() The number of bins cannot be identically 0" << std::endl;
3435  assert(false);
3436  }
3437 
3438  std::string s_resType = std::get<0>(PVValHelper::getTypeString(resType));
3439  std::string s_varType = std::get<0>(PVValHelper::getVarString(varType));
3440 
3441  std::string t_resType = std::get<1>(PVValHelper::getTypeString(resType));
3442  std::string t_varType = std::get<1>(PVValHelper::getVarString(varType));
3443  std::string units = std::get<2>(PVValHelper::getTypeString(resType));
3444 
3445  for (unsigned int i = 0; i < theNOfBins; i++) {
3447  ? Form("%s vs %s - bin %i (%f < %s < %f);%s %s;tracks",
3448  t_resType.c_str(),
3449  t_varType.c_str(),
3450  i,
3452  t_varType.c_str(),
3454  t_resType.c_str(),
3455  units.c_str())
3456  : Form("%s vs %s - bin %i;%s %s;tracks",
3457  t_resType.c_str(),
3458  t_varType.c_str(),
3459  i,
3460  t_resType.c_str(),
3461  units.c_str());
3462 
3463  TH1F* htemp = dir.make<TH1F>(
3464  Form("histo_%s_%s_plot%i", s_resType.c_str(), s_varType.c_str(), i),
3465  //Form("%s vs %s - bin %i;%s %s;tracks",t_resType.c_str(),t_varType.c_str(),i,t_resType.c_str(),units.c_str()),
3466  title.Data(),
3468  down,
3469  up);
3470  h.push_back(htemp);
3471  }
3472 
3473  return h;
3474 }
3475 
3476 //*************************************************************
3477 void PrimaryVertexValidation::fillTrackHistos(std::map<std::string, TH1*>& h,
3478  const std::string& ttype,
3479  const reco::TransientTrack* tt,
3480  const reco::Vertex& v,
3481  const reco::BeamSpot& beamSpot,
3482  double fBfield_)
3483 //*************************************************************
3484 {
3485  using namespace reco;
3486 
3487  PVValHelper::fill(h, "pseudorapidity_" + ttype, tt->track().eta());
3488  PVValHelper::fill(h, "z0_" + ttype, tt->track().vz());
3489  PVValHelper::fill(h, "phi_" + ttype, tt->track().phi());
3490  PVValHelper::fill(h, "eta_" + ttype, tt->track().eta());
3491  PVValHelper::fill(h, "pt_" + ttype, tt->track().pt());
3492  PVValHelper::fill(h, "p_" + ttype, tt->track().p());
3493  PVValHelper::fill(h, "found_" + ttype, tt->track().found());
3494  PVValHelper::fill(h, "lost_" + ttype, tt->track().lost());
3495  PVValHelper::fill(h, "nchi2_" + ttype, tt->track().normalizedChi2());
3496  PVValHelper::fill(h, "rstart_" + ttype, (tt->track().innerPosition()).Rho());
3497 
3498  double d0Error = tt->track().d0Error();
3499  double d0 = tt->track().dxy(beamSpot.position());
3500  double dz = tt->track().dz(beamSpot.position());
3501  if (d0Error > 0) {
3502  PVValHelper::fill(h, "logtresxy_" + ttype, log(d0Error / 0.0001) / log(10.));
3503  PVValHelper::fill(h, "tpullxy_" + ttype, d0 / d0Error);
3504  PVValHelper::fill(h, "tlogDCAxy_" + ttype, log(std::abs(d0 / d0Error)));
3505  }
3506  //double z0=tt->track().vz();
3507  double dzError = tt->track().dzError();
3508  if (dzError > 0) {
3509  PVValHelper::fill(h, "logtresz_" + ttype, log(dzError / 0.0001) / log(10.));
3510  PVValHelper::fill(h, "tpullz_" + ttype, dz / dzError);
3511  PVValHelper::fill(h, "tlogDCAz_" + ttype, log(std::abs(dz / dzError)));
3512  }
3513 
3514  //
3515  double wxy2_ = pow(beamSpot.BeamWidthX(), 2) + pow(beamSpot.BeamWidthY(), 2);
3516 
3518  h, "sigmatrkz_" + ttype, sqrt(pow(tt->track().dzError(), 2) + wxy2_ / pow(tan(tt->track().theta()), 2)));
3519  PVValHelper::fill(h, "sigmatrkz0_" + ttype, tt->track().dzError());
3520 
3521  // track vs vertex
3522  if (v.isValid()) { // && (v.ndof()<10.)) {
3523  // emulate clusterizer input
3524  //const TransientTrack & tt = theB_->build(&t); wrong !!!!
3525  //reco::TransientTrack tt = theB_->build(&t);
3526  //ttt->track().setBeamSpot(beamSpot); // need the setBeamSpot !
3527  double z = (tt->stateAtBeamLine().trackStateAtPCA()).position().z();
3528  double tantheta = tan((tt->stateAtBeamLine().trackStateAtPCA()).momentum().theta());
3529  double dz2 = pow(tt->track().dzError(), 2) + wxy2_ / pow(tantheta, 2);
3530 
3531  PVValHelper::fill(h, "restrkz_" + ttype, z - v.position().z());
3532  PVValHelper::fill(h, "restrkzvsphi_" + ttype, tt->track().phi(), z - v.position().z());
3533  PVValHelper::fill(h, "restrkzvseta_" + ttype, tt->track().eta(), z - v.position().z());
3534  PVValHelper::fill(h, "pulltrkzvsphi_" + ttype, tt->track().phi(), (z - v.position().z()) / sqrt(dz2));
3535  PVValHelper::fill(h, "pulltrkzvseta_" + ttype, tt->track().eta(), (z - v.position().z()) / sqrt(dz2));
3536 
3537  PVValHelper::fill(h, "pulltrkz_" + ttype, (z - v.position().z()) / sqrt(dz2));
3538 
3539  double x1 = tt->track().vx() - beamSpot.x0();
3540  double y1 = tt->track().vy() - beamSpot.y0();
3541 
3542  double kappa = -0.002998 * fBfield_ * tt->track().qoverp() / cos(tt->track().theta());
3543  double D0 = x1 * sin(tt->track().phi()) - y1 * cos(tt->track().phi()) - 0.5 * kappa * (x1 * x1 + y1 * y1);
3544  double q = sqrt(1. - 2. * kappa * D0);
3545  double s0 = (x1 * cos(tt->track().phi()) + y1 * sin(tt->track().phi())) / q;
3546  // double s1;
3547  if (std::abs(kappa * s0) > 0.001) {
3548  //s1=asin(kappa*s0)/kappa;
3549  } else {
3550  //double ks02=(kappa*s0)*(kappa*s0);
3551  //s1=s0*(1.+ks02/6.+3./40.*ks02*ks02+5./112.*pow(ks02,3));
3552  }
3553  // sp.ddcap=-2.*D0/(1.+q);
3554  //double zdcap=tt->track().vz()-s1/tan(tt->track().theta());
3555  }
3556  //
3557 
3558  // collect some info on hits and clusters
3559  PVValHelper::fill(h, "nbarrelLayers_" + ttype, tt->track().hitPattern().pixelBarrelLayersWithMeasurement());
3560  PVValHelper::fill(h, "nPxLayers_" + ttype, tt->track().hitPattern().pixelLayersWithMeasurement());
3561  PVValHelper::fill(h, "nSiLayers_" + ttype, tt->track().hitPattern().trackerLayersWithMeasurement());
3563  h, "expectedInner_" + ttype, tt->track().hitPattern().numberOfLostHits(HitPattern::MISSING_INNER_HITS));
3565  h, "expectedOuter_" + ttype, tt->track().hitPattern().numberOfLostHits(HitPattern::MISSING_OUTER_HITS));
3566  PVValHelper::fill(h, "trackAlgo_" + ttype, tt->track().algo());
3567  PVValHelper::fill(h, "trackQuality_" + ttype, tt->track().qualityMask());
3568 
3569  //
3570  int longesthit = 0, nbarrel = 0;
3571  for (auto const& hit : tt->track().recHits()) {
3572  if (hit->isValid() && hit->geographicalId().det() == DetId::Tracker) {
3573  bool barrel = DetId(hit->geographicalId()).subdetId() == static_cast<int>(PixelSubdetector::PixelBarrel);
3574  //bool endcap = DetId::DetId(hit->geographicalId()).subdetId() == static_cast<int>(PixelSubdetector::PixelEndcap);
3575  if (barrel) {
3576  const SiPixelRecHit* pixhit = dynamic_cast<const SiPixelRecHit*>(&(*hit));
3577  edm::Ref<edmNew::DetSetVector<SiPixelCluster>, SiPixelCluster> const& clust = (*pixhit).cluster();
3578  if (clust.isNonnull()) {
3579  nbarrel++;
3580  if (clust->sizeY() - longesthit > 0)
3581  longesthit = clust->sizeY();
3582  if (clust->sizeY() > 20.) {
3583  PVValHelper::fill(h, "lvseta_" + ttype, tt->track().eta(), 19.9);
3584  PVValHelper::fill(h, "lvstanlambda_" + ttype, tan(tt->track().lambda()), 19.9);
3585  } else {
3586  PVValHelper::fill(h, "lvseta_" + ttype, tt->track().eta(), float(clust->sizeY()));
3587  PVValHelper::fill(h, "lvstanlambda_" + ttype, tan(tt->track().lambda()), float(clust->sizeY()));
3588  }
3589  }
3590  }
3591  }
3592  }
3593  PVValHelper::fill(h, "nbarrelhits_" + ttype, float(nbarrel));
3594  //-------------------------------------------------------------------
3595 }
3596 
3599  desc.setComment("Validates alignment payloads by evaluating unbiased track paramter resisuals to vertices");
3600 
3601  // PV Validation specific
3602 
3603  desc.addUntracked<int>("compressionSettings", -1);
3604  desc.add<bool>("storeNtuple", false);
3605  desc.add<bool>("isLightNtuple", true);
3606  desc.add<bool>("useTracksFromRecoVtx", false);
3607  desc.addUntracked<double>("vertexZMax", 99);
3608  desc.addUntracked<double>("intLumi", 0.);
3609  desc.add<bool>("askFirstLayerHit", false);
3610  desc.addUntracked<bool>("doBPix", true);
3611  desc.addUntracked<bool>("doFPix", true);
3612  desc.addUntracked<double>("probePt", 0.);
3613  desc.addUntracked<double>("probeP", 0.);
3614  desc.addUntracked<double>("probeEta", 2.4);
3615  desc.addUntracked<double>("probeNHits", 0.);
3616  desc.addUntracked<int>("numberOfBins", 24);
3617  desc.addUntracked<double>("minPt", 1.);
3618  desc.addUntracked<double>("maxPt", 20.);
3619  desc.add<bool>("Debug", false);
3620  desc.addUntracked<bool>("runControl", false);
3621  desc.addUntracked<bool>("forceBeamSpot", false);
3622 
3623  std::vector<unsigned int> defaultRuns;
3624  defaultRuns.push_back(0);
3625  desc.addUntracked<std::vector<unsigned int>>("runControlNumber", defaultRuns);
3626 
3627  // event sources
3628 
3629  desc.add<edm::InputTag>("TrackCollectionTag", edm::InputTag("ALCARECOTkAlMinBias"));
3630  desc.add<edm::InputTag>("VertexCollectionTag", edm::InputTag("offlinePrimaryVertices"));
3631  desc.add<edm::InputTag>("BeamSpotTag", edm::InputTag("offlineBeamSpot"));
3632 
3633  // track filtering
3634 
3636  psd0.add<double>("maxNormalizedChi2", 5.0);
3637  psd0.add<double>("minPt", 0.0);
3638  psd0.add<std::string>("algorithm", "filter");
3639  psd0.add<double>("maxEta", 5.0);
3640  psd0.add<double>("maxD0Significance", 5.0);
3641  psd0.add<double>("maxD0Error", 1.0);
3642  psd0.add<double>("maxDzError", 1.0);
3643  psd0.add<std::string>("trackQuality", "any");
3644  psd0.add<int>("minPixelLayersWithHits", 2);
3645  psd0.add<int>("minSiliconLayersWithHits", 5);
3646  psd0.add<int>("numTracksThreshold", 0); // HI only
3647  desc.add<edm::ParameterSetDescription>("TkFilterParameters", psd0);
3648 
3649  // PV Clusterization
3650  {
3652  {
3654  psd1.addUntracked<bool>("verbose", false);
3655  psd1.addUntracked<double>("zdumpcenter", 0.);
3656  psd1.addUntracked<double>("zdumpwidth", 20.);
3657  psd1.addUntracked<bool>("use_vdt", false); // obsolete, appears in HLT configs
3658  psd1.add<double>("d0CutOff", 3.0);
3659  psd1.add<double>("Tmin", 2.0);
3660  psd1.add<double>("delta_lowT", 0.001);
3661  psd1.add<double>("zmerge", 0.01);
3662  psd1.add<double>("dzCutOff", 3.0);
3663  psd1.add<double>("Tpurge", 2.0);
3664  psd1.add<int>("convergence_mode", 0);
3665  psd1.add<double>("delta_highT", 0.01);
3666  psd1.add<double>("Tstop", 0.5);
3667  psd1.add<double>("coolingFactor", 0.6);
3668  psd1.add<double>("vertexSize", 0.006);
3669  psd1.add<double>("uniquetrkweight", 0.8);
3670  psd1.add<double>("zrange", 4.0);
3671  psd1.add<double>("tmerge", 0.01); // 4D only
3672  psd1.add<double>("dtCutOff", 4.); // 4D only
3673  psd1.add<double>("t0Max", 1.0); // 4D only
3674  psd1.add<double>("vertexSizeTime", 0.008); // 4D only
3675  psd0.add<edm::ParameterSetDescription>("TkDAClusParameters", psd1);
3677  psd2.add<double>("zSeparation", 1.0);
3678  psd0.add<edm::ParameterSetDescription>("TkGapClusParameters", psd2);
3679  }
3680  psd0.add<std::string>("algorithm", "DA_vect");
3681  desc.add<edm::ParameterSetDescription>("TkClusParameters", psd0);
3682  }
3683 
3684  descriptions.add("primaryVertexValidation", desc);
3685 }
3686 
3687 //define this as a plug-in
AdaptiveVertexFitter
Definition: AdaptiveVertexFitter.h:29
PrimaryVertexValidation::a_dxyEtaWidthBiasTrend
TH1F * a_dxyEtaWidthBiasTrend
Definition: PrimaryVertexValidation.h:548
PrimaryVertexValidation::chi2UnbiasedVertex_
float chi2UnbiasedVertex_[nMaxtracks_]
Definition: PrimaryVertexValidation.h:276
PVValHelper::getVarString
plotLabels getVarString(plotVariable var)
Definition: PVValidationHelpers.cc:130
edm::ESHandle::product
T const * product() const
Definition: ESHandle.h:86
PrimaryVertexValidation::h_norm_dz_modZ_
std::vector< TH1F * > h_norm_dz_modZ_
Definition: PrimaryVertexValidation.h:707
PrimaryVertexValidation::MADTrendsDir
TFileDirectory MADTrendsDir
Definition: PrimaryVertexValidation.h:302
reco::Vertex::trackRef_iterator
std::vector< TrackBaseRef >::const_iterator trackRef_iterator
The iteratator for the vector<TrackRef>
Definition: Vertex.h:38
PrimaryVertexValidation::n_dzPhiResiduals
std::vector< TH1F * > n_dzPhiResiduals
Definition: PrimaryVertexValidation.h:350
PrimaryVertexValidation::n_dxyEtaMedianTrend
TH1F * n_dxyEtaMedianTrend
Definition: PrimaryVertexValidation.h:465
PVValHelper::resz
Definition: PVValidationHelpers.h:52
PerigeeTrajectoryParameters::longitudinalImpactParameter
double longitudinalImpactParameter() const
Definition: PerigeeTrajectoryParameters.h:74
PrimaryVertexValidation::a_dxyL1MeanMap
TH2F * a_dxyL1MeanMap
Definition: PrimaryVertexValidation.h:500
PrimaryVertexValidation::PrimaryVertexValidation
PrimaryVertexValidation(const edm::ParameterSet &)
Definition: PrimaryVertexValidation.cc:66
PrimaryVertexValidation::a_dzpTWidthTrend
TH1F * a_dzpTWidthTrend
Definition: PrimaryVertexValidation.h:409
DDAxes::y
PrimaryVertexValidation::h_probeChi2_
TH1F * h_probeChi2_
Definition: PrimaryVertexValidation.h:629
PrimaryVertexValidation::chi2_
double chi2_[nMaxtracks_]
Definition: PrimaryVertexValidation.h:261
PrimaryVertexValidation::n_dxyPhiBiasResiduals
std::vector< TH1F * > n_dxyPhiBiasResiduals
Definition: PrimaryVertexValidation.h:526
PrimaryVertexValidation::h_runNumber
TH1F * h_runNumber
Definition: PrimaryVertexValidation.h:602
PrimaryVertexValidation::a_dzEtaMADBiasTrend
TH1F * a_dzEtaMADBiasTrend
Definition: PrimaryVertexValidation.h:572
PrimaryVertexValidation::h_probeL1ClusterProb_
TH1F * h_probeL1ClusterProb_
Definition: PrimaryVertexValidation.h:669
PrimaryVertexValidation::n_dzPhiBiasResiduals
std::vector< TH1F * > n_dzPhiBiasResiduals
Definition: PrimaryVertexValidation.h:529
PDWG_EXOHSCP_cff.tracks
tracks
Definition: PDWG_EXOHSCP_cff.py:28
PrimaryVertexValidation::n_d3DEtaResiduals
std::vector< TH1F * > n_d3DEtaResiduals
Definition: PrimaryVertexValidation.h:363
PrimaryVertexValidation::h_probeHits_
TH1F * h_probeHits_
Definition: PrimaryVertexValidation.h:655
runGCPTkAlMap.title
string title
Definition: runGCPTkAlMap.py:94
MonitorHOAlCaRecoStream_cfi.highedge
highedge
Definition: MonitorHOAlCaRecoStream_cfi.py:12
PrimaryVertexValidation::IP3DsigFromMyVertex_
double IP3DsigFromMyVertex_[nMaxtracks_]
Definition: PrimaryVertexValidation.h:292
electrons_cff.bool
bool
Definition: electrons_cff.py:393
mps_fire.i
i
Definition: mps_fire.py:428
PrimaryVertexValidation::n_dxyWidthMap
TH2F * n_dxyWidthMap
Definition: PrimaryVertexValidation.h:495
PrimaryVertexValidation::trackingGeomToken_
const edm::ESGetToken< GlobalTrackingGeometry, GlobalTrackingGeometryRecord > trackingGeomToken_
Definition: PrimaryVertexValidation.h:151
edm::ParameterSetDescription::add
ParameterDescriptionBase * add(U const &iLabel, T const &value)
Definition: ParameterSetDescription.h:95
PrimaryVertexValidation::h2_probeLayer1Map_
TH2F * h2_probeLayer1Map_
Definition: PrimaryVertexValidation.h:670
PrimaryVertexValidation::h_norm_dz_Central_pT_
std::vector< TH1F * > h_norm_dz_Central_pT_
Definition: PrimaryVertexValidation.h:700
PrimaryVertexValidation::n_dxyPhiMedianTrend
TH1F * n_dxyPhiMedianTrend
Definition: PrimaryVertexValidation.h:460
PrimaryVertexValidation::h_norm_dxy_modZ_
std::vector< TH1F * > h_norm_dxy_modZ_
Definition: PrimaryVertexValidation.h:706
PVValHelper::max_eta_phase1
const double max_eta_phase1
Definition: PVValidationHelpers.h:24
pwdgSkimBPark_cfi.beamSpot
beamSpot
Definition: pwdgSkimBPark_cfi.py:5
HLT_FULL_cff.track
track
Definition: HLT_FULL_cff.py:11779
PrimaryVertexValidation::h_nClus
TH1F * h_nClus
Definition: PrimaryVertexValidation.h:600
PrimaryVertexValidation::n_dzEtaMeanTrend
TH1F * n_dzEtaMeanTrend
Definition: PrimaryVertexValidation.h:401
PrimaryVertexValidation::h_nbins
TH1F * h_nbins
Definition: PrimaryVertexValidation.h:309
Reference_intrackfit_cff.barrel
list barrel
Definition: Reference_intrackfit_cff.py:37
PrimaryVertexValidation::a_dxyEtaMADBiasTrend
TH1F * a_dxyEtaMADBiasTrend
Definition: PrimaryVertexValidation.h:570
PrimaryVertexValidation::WidthTrendsDir
TFileDirectory WidthTrendsDir
Definition: PrimaryVertexValidation.h:300
PrimaryVertexValidation::BSz0_
double BSz0_
Definition: PrimaryVertexValidation.h:238
MessageLogger.h
PrimaryVertexValidation::n_dzEtaMedianTrend
TH1F * n_dzEtaMedianTrend
Definition: PrimaryVertexValidation.h:467
dqmMemoryStats.float
float
Definition: dqmMemoryStats.py:127
PrimaryVertexValidation::h_probePhi_
TH1F * h_probePhi_
Definition: PrimaryVertexValidation.h:628
PrimaryVertexValidation::a_dzBiasResidualsMap
TH1F * a_dzBiasResidualsMap[nMaxBins_][nMaxBins_]
Definition: PrimaryVertexValidation.h:535
funct::false
false
Definition: Factorize.h:29
PixelSubdetector::PixelEndcap
Definition: PixelSubdetector.h:11
PrimaryVertexValidation::n_dzWidthMap
TH2F * n_dzWidthMap
Definition: PrimaryVertexValidation.h:496
TrackerGeometry.h
DAClusterizerInZ_vect.h
PrimaryVertexValidation::n_dxyEtaMADBiasTrend
TH1F * n_dxyEtaMADBiasTrend
Definition: PrimaryVertexValidation.h:580
PrimaryVertexValidation::h_probePt_
TH1F * h_probePt_
Definition: PrimaryVertexValidation.h:625
PrimaryVertexValidation::n_dzladderMeanTrend
TH1F * n_dzladderMeanTrend
Definition: PrimaryVertexValidation.h:445
PrimaryVertexValidation::nhits1D_
int nhits1D_[nMaxtracks_]
Definition: PrimaryVertexValidation.h:249
PixelSubdetector::PixelBarrel
Definition: PixelSubdetector.h:11
PrimaryVertexValidation::h_probedzRecoV_
TH1F * h_probedzRecoV_
Definition: PrimaryVertexValidation.h:634
PrimaryVertexValidation::n_dzResidualsMap
TH1F * n_dzResidualsMap[nMaxBins_][nMaxBins_]
Definition: PrimaryVertexValidation.h:372
PrimaryVertexValidation::a_dxyEtaMedianTrend
TH1F * a_dxyEtaMedianTrend
Definition: PrimaryVertexValidation.h:455
hfClusterShapes_cfi.hits
hits
Definition: hfClusterShapes_cfi.py:5
PVValHelper::norm_IP2D
Definition: PVValidationHelpers.h:60
PrimaryVertexValidation::a_d3DEtaResiduals
std::vector< TH1F * > a_d3DEtaResiduals
Definition: PrimaryVertexValidation.h:343
PrimaryVertexValidation::nBins_
int nBins_
Definition: PrimaryVertexValidation.h:182
PrimaryVertexValidation::a_dxyResidualsMap
TH1F * a_dxyResidualsMap[nMaxBins_][nMaxBins_]
Definition: PrimaryVertexValidation.h:367
groupFilesInBlocks.tt
int tt
Definition: groupFilesInBlocks.py:144
PrimaryVertexValidation::a_dxyladderMeanTrend
TH1F * a_dxyladderMeanTrend
Definition: PrimaryVertexValidation.h:433
PrimaryVertexValidation::h_fitVtxNtracks_
TH1F * h_fitVtxNtracks_
Definition: PrimaryVertexValidation.h:677
PrimaryVertexValidation::a_dzResidualsMap
TH1F * a_dzResidualsMap[nMaxBins_][nMaxBins_]
Definition: PrimaryVertexValidation.h:368
ESInputTag
VertexException
Common base class.
Definition: VertexException.h:12
PrimaryVertexValidation::xErrOfflineVertex_
double xErrOfflineVertex_
Definition: PrimaryVertexValidation.h:232
PrimaryVertexValidation::h_probedxyRecoV_
TH1F * h_probedxyRecoV_
Definition: PrimaryVertexValidation.h:635
PrimaryVertexValidation::h_probeEta_
TH1F * h_probeEta_
Definition: PrimaryVertexValidation.h:627
funct::D0
Divides< arg, void > D0
Definition: Factorize.h:135
PrimaryVertexValidation::a_dzEtaMeanBiasTrend
TH1F * a_dzEtaMeanBiasTrend
Definition: PrimaryVertexValidation.h:549
PrimaryVertexValidation::n_dxyL1MeanMap
TH2F * n_dxyL1MeanMap
Definition: PrimaryVertexValidation.h:503
PrimaryVertexValidation::runControlNumbers_
std::vector< unsigned int > runControlNumbers_
Definition: PrimaryVertexValidation.h:188
PrimaryVertexValidation::a_dxyPhiWidthBiasTrend
TH1F * a_dxyPhiWidthBiasTrend
Definition: PrimaryVertexValidation.h:543
PV3DBase::x
T x() const
Definition: PV3DBase.h:59
PVValHelper::WIDTH
Definition: PVValidationHelpers.h:44
PrimaryVertexValidation::a_dzpTMeanTrend
TH1F * a_dzpTMeanTrend
Definition: PrimaryVertexValidation.h:408
DiDispStaMuonMonitor_cfi.pt
pt
Definition: DiDispStaMuonMonitor_cfi.py:39
reco::TrackBase::p
double p() const
momentum vector magnitude
Definition: TrackBase.h:631
PrimaryVertexValidation::h_norm_dxy_Central_pT_
std::vector< TH1F * > h_norm_dxy_Central_pT_
Definition: PrimaryVertexValidation.h:699
PrimaryVertexValidation::n_dzmodZWidthTrend
TH1F * n_dzmodZWidthTrend
Definition: PrimaryVertexValidation.h:441
min
T min(T a, T b)
Definition: MathUtil.h:58
cond::hash
Definition: Time.h:19
TrajectoryStateClosestToPoint.h
PrimaryVertexValidation::a_dzEtaBiasResiduals
std::vector< TH1F * > a_dzEtaBiasResiduals
Definition: PrimaryVertexValidation.h:522
PrimaryVertexValidation::endJob
void endJob() override
Definition: PrimaryVertexValidation.cc:2595
PrimaryVertexValidation
Definition: PrimaryVertexValidation.h:74
PrimaryVertexValidation::h_probeRefitVSig3D_
TH1F * h_probeRefitVSig3D_
Definition: PrimaryVertexValidation.h:651
PrimaryVertexValidation::a_IP3DPhiResiduals
std::vector< TH1F * > a_IP3DPhiResiduals
Definition: PrimaryVertexValidation.h:336
TFileDirectory::make
T * make(const Args &... args) const
make new ROOT object
Definition: TFileDirectory.h:53
PrimaryVertexValidation::a_dzWidthMap
TH2F * a_dzWidthMap
Definition: PrimaryVertexValidation.h:493
PrimaryVertexValidation::a_dzL1MeanMap
TH2F * a_dzL1MeanMap
Definition: PrimaryVertexValidation.h:501
edm
HLT enums.
Definition: AlignableModifier.h:19
Measurement1D::value
double value() const
Definition: Measurement1D.h:25
PrimaryVertexValidation::n_dxyladderWidthTrend
TH1F * n_dxyladderWidthTrend
Definition: PrimaryVertexValidation.h:444
PrimaryVertexValidation::a_dxyL1WidthMap
TH2F * a_dxyL1WidthMap
Definition: PrimaryVertexValidation.h:506
PrimaryVertexValidation::h_nTracks
TH1F * h_nTracks
Definition: PrimaryVertexValidation.h:599
TrackerTopology
Definition: TrackerTopology.h:16
IPTools::absoluteImpactParameter3D
std::pair< bool, Measurement1D > absoluteImpactParameter3D(const reco::TransientTrack &transientTrack, const reco::Vertex &vertex)
Definition: IPTools.cc:38
PrimaryVertexValidation::h_BSy0
TH1F * h_BSy0
Definition: PrimaryVertexValidation.h:613
PrimaryVertexValidation::a_dzPhiMeanTrend
TH1F * a_dzPhiMeanTrend
Definition: PrimaryVertexValidation.h:386
PrimaryVertexValidation::h_probez0RefitV_
TH1F * h_probez0RefitV_
Definition: PrimaryVertexValidation.h:641
AlCaHLTBitMon_ParallelJobs.p
p
Definition: AlCaHLTBitMon_ParallelJobs.py:153
h
FWCore Framework interface EventSetupRecordImplementation h
Helper function to determine trigger accepts.
Definition: L1TUtmAlgorithmRcd.h:4
TFileService::file
TFile & file() const
return opened TFile
Definition: TFileService.h:37
PrimaryVertexValidation::nMaxtracks_
static const int nMaxtracks_
Definition: PrimaryVertexValidation.h:206
TrackerTopology::pxbLadder
unsigned int pxbLadder(const DetId &id) const
Definition: TrackerTopology.h:155
PrimaryVertexValidation::h_runFromEvent
TH1I * h_runFromEvent
Definition: PrimaryVertexValidation.h:605
PrimaryVertexValidation::RunNumber_
unsigned int RunNumber_
Definition: PrimaryVertexValidation.h:225
PrimaryVertexValidation::h_probereszRefitV_
TH1F * h_probereszRefitV_
Definition: PrimaryVertexValidation.h:645
PVValHelper::fill
void fill(std::map< std::string, TH1 * > &h, const std::string &s, double x)
Definition: PVValidationHelpers.cc:20
PrimaryVertexValidation::h_probesignIP2DRefitV_
TH1F * h_probesignIP2DRefitV_
Definition: PrimaryVertexValidation.h:643
HLT_FULL_cff.InputTag
InputTag
Definition: HLT_FULL_cff.py:89353
PrimaryVertexValidation::isHit2D
bool isHit2D(const TrackingRecHit &hit) const
Definition: PrimaryVertexValidation.cc:1100
PrimaryVertexValidation::a_dxypTWidthTrend
TH1F * a_dxypTWidthTrend
Definition: PrimaryVertexValidation.h:407
PVValHelper::getTypeString
plotLabels getTypeString(residualType type)
Definition: PVValidationHelpers.cc:63
PrimaryVertexValidation::nTracks_
int nTracks_
Definition: PrimaryVertexValidation.h:221
edm::ParameterSetDescription
Definition: ParameterSetDescription.h:52
PrimaryVertexValidation::Nevt_
int Nevt_
Definition: PrimaryVertexValidation.h:139
PrimaryVertexValidation::DOFUnbiasedVertex_
float DOFUnbiasedVertex_[nMaxtracks_]
Definition: PrimaryVertexValidation.h:278
PrimaryVertexValidation::n_dxyPhiMADBiasTrend
TH1F * n_dxyPhiMADBiasTrend
Definition: PrimaryVertexValidation.h:575
Measurement1D.h
PrimaryVertexValidation::n_dxyEtaResiduals
std::vector< TH1F * > n_dxyEtaResiduals
Definition: PrimaryVertexValidation.h:348
PrimaryVertexValidation::h_probeRefitVSigResZ_
TH1F * h_probeRefitVSigResZ_
Definition: PrimaryVertexValidation.h:653
PVValHelper::fillByIndex
void fillByIndex(std::vector< TH1F * > &h, unsigned int index, double x, std::string tag="")
Definition: PVValidationHelpers.cc:42
HLT_FULL_cff.etaBins
etaBins
Definition: HLT_FULL_cff.py:15329
PrimaryVertexValidation::d3DFromMyVertex_
double d3DFromMyVertex_[nMaxtracks_]
Definition: PrimaryVertexValidation.h:284
PrimaryVertexValidation::qoverp_
double qoverp_[nMaxtracks_]
Definition: PrimaryVertexValidation.h:264
PrimaryVertexValidation::h_probeL1Module_
TH1F * h_probeL1Module_
Definition: PrimaryVertexValidation.h:666
PrimaryVertexValidation::debug_
bool debug_
Definition: PrimaryVertexValidation.h:190
cms::cuda::assert
assert(be >=bs)
PrimaryVertexValidation::a_reszPhiResiduals
std::vector< TH1F * > a_reszPhiResiduals
Definition: PrimaryVertexValidation.h:339
PrimaryVertexValidation::BSy0_
double BSy0_
Definition: PrimaryVertexValidation.h:237
reco::TrackBase::TrackQuality
TrackQuality
track quality
Definition: TrackBase.h:150
PrimaryVertexValidation::hDA
std::map< std::string, TH1 * > hDA
Definition: PrimaryVertexValidation.h:688
PrimaryVertexValidation::n_dxyMeanBiasMap
TH2F * n_dxyMeanBiasMap
Definition: PrimaryVertexValidation.h:589
PrimaryVertexValidation::h_probeHitsInTID_
TH1F * h_probeHitsInTID_
Definition: PrimaryVertexValidation.h:660
GlobalTrackingGeometryRecord
Definition: GlobalTrackingGeometryRecord.h:17
PrimaryVertexValidation::a_dxyWidthMap
TH2F * a_dxyWidthMap
Definition: PrimaryVertexValidation.h:492
PrimaryVertexValidation::h_pTinfo
TH1F * h_pTinfo
Definition: PrimaryVertexValidation.h:311
PrimaryVertexValidation::h_probedzRefitV_
TH1F * h_probedzRefitV_
Definition: PrimaryVertexValidation.h:637
PrimaryVertexValidation::dxyBs_
double dxyBs_[nMaxtracks_]
Definition: PrimaryVertexValidation.h:267
PVValHelper::histodetails::histobins
int histobins
Definition: PVValidationHelpers.h:78
PrimaryVertexValidation::n_reszPhiResiduals
std::vector< TH1F * > n_reszPhiResiduals
Definition: PrimaryVertexValidation.h:359
reco::TrackBase::px
double px() const
x coordinate of momentum vector
Definition: TrackBase.h:640
PrimaryVertexValidation::nOfflineVertices_
int nOfflineVertices_
Definition: PrimaryVertexValidation.h:224
PrimaryVertexValidation::a_dxyPhiMedianTrend
TH1F * a_dxyPhiMedianTrend
Definition: PrimaryVertexValidation.h:450
PrimaryVertexValidation::BeamWidthY_
double BeamWidthY_
Definition: PrimaryVertexValidation.h:242
PrimaryVertexValidation::pOfProbe_
double pOfProbe_
Definition: PrimaryVertexValidation.h:176
edm::ParameterSet::getUntrackedParameter
T getUntrackedParameter(std::string const &, T const &) const
PrimaryVertexValidation::a_dzPhiWidthBiasTrend
TH1F * a_dzPhiWidthBiasTrend
Definition: PrimaryVertexValidation.h:545
PrimaryVertexValidation::h_probePtRebin_
TH1F * h_probePtRebin_
Definition: PrimaryVertexValidation.h:626
PrimaryVertexValidation::dxyFromMyVertex_
double dxyFromMyVertex_[nMaxtracks_]
Definition: PrimaryVertexValidation.h:282
PrimaryVertexValidation::a_dzladderWidthTrend
TH1F * a_dzladderWidthTrend
Definition: PrimaryVertexValidation.h:436
PrimaryVertexValidation::n_d3DPhiResiduals
std::vector< TH1F * > n_d3DPhiResiduals
Definition: PrimaryVertexValidation.h:362
PrimaryVertexValidation::a_dzEtaWidthBiasTrend
TH1F * a_dzEtaWidthBiasTrend
Definition: PrimaryVertexValidation.h:550
DDAxes::x
TFileDirectory
Definition: TFileDirectory.h:24
SiPixelCluster
Pixel cluster – collection of neighboring pixels above threshold.
Definition: SiPixelCluster.h:27
PrimaryVertexValidation::n_dzL1WidthMap
TH2F * n_dzL1WidthMap
Definition: PrimaryVertexValidation.h:510
PrimaryVertexValidation::h_probeRefitVSigXY_
TH1F * h_probeRefitVSigXY_
Definition: PrimaryVertexValidation.h:650
PrimaryVertexValidation::n_dxyBiasResidualsMap
TH1F * n_dxyBiasResidualsMap[nMaxBins_][nMaxBins_]
Definition: PrimaryVertexValidation.h:537
PrimaryVertexValidation::MeanTrendsDir
TFileDirectory MeanTrendsDir
Definition: PrimaryVertexValidation.h:299
reco
fixed size matrix
Definition: AlignmentAlgorithmBase.h:45
PrimaryVertexValidation::h_fitVtxNdof_
TH1F * h_fitVtxNdof_
Definition: PrimaryVertexValidation.h:675
FreeTrajectoryState::position
GlobalPoint position() const
Definition: FreeTrajectoryState.h:67
edm::LogInfo
Log< level::Info, false > LogInfo
Definition: MessageLogger.h:125
vertices_cff.ntracks
ntracks
Definition: vertices_cff.py:34
GlobalVector
Global3DVector GlobalVector
Definition: GlobalVector.h:10
cms::Exception::what
char const * what() const noexcept override
Definition: Exception.cc:103
TransientTrack.h
PVValHelper::plotVariable
plotVariable
Definition: PVValidationHelpers.h:67
findQualityFiles.v
v
Definition: findQualityFiles.py:179
PrimaryVertexValidation::fillDescriptions
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
Definition: PrimaryVertexValidation.cc:3597
IPTools::signedTransverseImpactParameter
std::pair< bool, Measurement1D > signedTransverseImpactParameter(const reco::TransientTrack &track, const GlobalVector &direction, const reco::Vertex &vertex)
Definition: IPTools.cc:57
PrimaryVertexValidation::h_etaMax
TH1F * h_etaMax
Definition: PrimaryVertexValidation.h:308
PrimaryVertexValidation::h_probeRefitVSigZ_
TH1F * h_probeRefitVSigZ_
Definition: PrimaryVertexValidation.h:649
PrimaryVertexValidation::h_dz_modZ_
std::vector< TH1F * > h_dz_modZ_
Definition: PrimaryVertexValidation.h:705
PrimaryVertexValidation::h_dxy_modZ_
std::vector< TH1F * > h_dxy_modZ_
Definition: PrimaryVertexValidation.h:704
PrimaryVertexValidation::isGoodTrack_
int isGoodTrack_[nMaxtracks_]
Definition: PrimaryVertexValidation.h:295
PrimaryVertexValidation::pixelHitsCheck
std::pair< bool, bool > pixelHitsCheck(const reco::TransientTrack &track)
Definition: PrimaryVertexValidation.cc:1132
edm::Handle
Definition: AssociativeIterator.h:50
PrimaryVertexValidation::LuminosityBlockNumber_
unsigned int LuminosityBlockNumber_
Definition: PrimaryVertexValidation.h:227
reco::TrackBase::numberOfValidHits
unsigned short numberOfValidHits() const
number of valid hits found
Definition: TrackBase.h:798
PrimaryVertexValidation::a_dzpTCentralWidthTrend
TH1F * a_dzpTCentralWidthTrend
Definition: PrimaryVertexValidation.h:414
edm::LogWarning
Log< level::Warning, false > LogWarning
Definition: MessageLogger.h:122
PrimaryVertexValidation::n_dxyEtaBiasResiduals
std::vector< TH1F * > n_dxyEtaBiasResiduals
Definition: PrimaryVertexValidation.h:527
PrimaryVertexValidation::h_norm_dxy_ladder_
std::vector< TH1F * > h_norm_dxy_ladder_
Definition: PrimaryVertexValidation.h:714
PrimaryVertexValidation::nhits_
int nhits_[nMaxtracks_]
Definition: PrimaryVertexValidation.h:248
PrimaryVertexValidation::Beamsigmaz_
double Beamsigmaz_
Definition: PrimaryVertexValidation.h:239
PrimaryVertexValidation::nhitsTIB_
int nhitsTIB_[nMaxtracks_]
Definition: PrimaryVertexValidation.h:253
PrimaryVertexValidation::fillTrendPlot
void fillTrendPlot(TH1F *trendPlot, TH1F *residualsPlot[100], PVValHelper::estimator fitPar_, const std::string &var_)
Definition: PrimaryVertexValidation.cc:3058
PrimaryVertexValidation::a_dxyVsEta
TH2F * a_dxyVsEta
Definition: PrimaryVertexValidation.h:478
PrimaryVertexValidation::n_dzPhiWidthBiasTrend
TH1F * n_dzPhiWidthBiasTrend
Definition: PrimaryVertexValidation.h:555
PrimaryVertexValidation::runInfoToken_
const edm::ESGetToken< RunInfo, RunInfoRcd > runInfoToken_
Definition: PrimaryVertexValidation.h:155
SiPixelRecHit
Our base class.
Definition: SiPixelRecHit.h:23
PrimaryVertexValidation::h_dxy_pT_
std::vector< TH1F * > h_dxy_pT_
Definition: PrimaryVertexValidation.h:692
PrimaryVertexValidation::IPTsigFromMyVertex_
double IPTsigFromMyVertex_[nMaxtracks_]
Definition: PrimaryVertexValidation.h:290
edm::Ref
Definition: AssociativeIterator.h:58
HLT_FULL_cff.zVertex
zVertex
Definition: HLT_FULL_cff.py:113839
PrimaryVertexValidation::a_dzPhiWidthTrend
TH1F * a_dzPhiWidthTrend
Definition: PrimaryVertexValidation.h:387
PrimaryVertexValidation::a_IP3DEtaResiduals
std::vector< TH1F * > a_IP3DEtaResiduals
Definition: PrimaryVertexValidation.h:337
TrackerTopology::pxbLayer
unsigned int pxbLayer(const DetId &id) const
Definition: TrackerTopology.h:144
funct::sin
Sin< T >::type sin(const T &t)
Definition: Sin.h:22
units
TString units(TString variable, Char_t axis)
PrimaryVertexValidation::zPCA_
double zPCA_[nMaxtracks_]
Definition: PrimaryVertexValidation.h:271
PrimaryVertexValidation::SetVarToZero
void SetVarToZero()
Definition: PrimaryVertexValidation.cc:2984
PrimaryVertexValidation::a_dzEtaMeanTrend
TH1F * a_dzEtaMeanTrend
Definition: PrimaryVertexValidation.h:391
PVValHelper::END_OF_TYPES
Definition: PVValidationHelpers.h:64
PrimaryVertexValidation::chi2ProbUnbiasedVertex_
float chi2ProbUnbiasedVertex_[nMaxtracks_]
Definition: PrimaryVertexValidation.h:277
LEDCalibrationChannels.iphi
iphi
Definition: LEDCalibrationChannels.py:64
PrimaryVertexValidation::h_fitVtxTrackWeights_
TH1F * h_fitVtxTrackWeights_
Definition: PrimaryVertexValidation.h:680
PrimaryVertexValidation::h_norm_dxy_pT_
std::vector< TH1F * > h_norm_dxy_pT_
Definition: PrimaryVertexValidation.h:694
reco::TrackBase::pt
double pt() const
track transverse momentum
Definition: TrackBase.h:637
PrimaryVertexValidation::a_d3DPhiResiduals
std::vector< TH1F * > a_d3DPhiResiduals
Definition: PrimaryVertexValidation.h:342
IdealMagneticFieldRecord
Definition: IdealMagneticFieldRecord.h:11
PrimaryVertexValidation::n_reszEtaResiduals
std::vector< TH1F * > n_reszEtaResiduals
Definition: PrimaryVertexValidation.h:360
DetId
Definition: DetId.h:17
PrimaryVertexValidation::h_fitVtxChi2ndf_
TH1F * h_fitVtxChi2ndf_
Definition: PrimaryVertexValidation.h:678
PrimaryVertexValidation::wxy2_
double wxy2_
Definition: PrimaryVertexValidation.h:243
PVValHelper::norm_resz
Definition: PVValidationHelpers.h:61
TrackerTopology.h
testProducerWithPsetDescEmpty_cfi.x1
x1
Definition: testProducerWithPsetDescEmpty_cfi.py:33
PVValHelper::histodetails::trendbins
std::map< plotVariable, std::vector< float > > trendbins
Definition: PVValidationHelpers.h:80
reco::HitPattern
Definition: HitPattern.h:147
down
Definition: BitonicSort.h:7
PVValHelper::norm_d3D
Definition: PVValidationHelpers.h:63
testProducerWithPsetDescEmpty_cfi.y1
y1
Definition: testProducerWithPsetDescEmpty_cfi.py:29
RunInfo
Definition: RunInfo.h:18
PrimaryVertexValidation::h_lumiFromConfig
TH1F * h_lumiFromConfig
Definition: PrimaryVertexValidation.h:603
PrimaryVertexValidation::h_fitVtxChi2Prob_
TH1F * h_fitVtxChi2Prob_
Definition: PrimaryVertexValidation.h:679
PrimaryVertexValidation::a_dzL1ResidualsMap
TH1F * a_dzL1ResidualsMap[nMaxBins_][nMaxBins_]
Definition: PrimaryVertexValidation.h:378
PrimaryVertexValidation::a_dzVsEta
TH2F * a_dzVsEta
Definition: PrimaryVertexValidation.h:479
funct::cos
Cos< T >::type cos(const T &t)
Definition: Cos.h:22
PrimaryVertexValidation::h_probeQoverP_
TH1F * h_probeQoverP_
Definition: PrimaryVertexValidation.h:632
h
PrimaryVertexValidation::a_dzmodZMeanTrend
TH1F * a_dzmodZMeanTrend
Definition: PrimaryVertexValidation.h:430
TrackerTopologyRcd.h
Track.h
PVValHelper::estimator
estimator
Definition: PVValidationHelpers.h:44
TrackFwd.h
PrimaryVertexValidation::ptOfProbe_
double ptOfProbe_
Definition: PrimaryVertexValidation.h:175
PrimaryVertexValidation::a_dxyPhiMADBiasTrend
TH1F * a_dxyPhiMADBiasTrend
Definition: PrimaryVertexValidation.h:565
DEFINE_FWK_MODULE
#define DEFINE_FWK_MODULE(type)
Definition: MakerMacros.h:16
PrimaryVertexValidation::a_dxyPhiWidthTrend
TH1F * a_dxyPhiWidthTrend
Definition: PrimaryVertexValidation.h:385
BeamSpot.h
PrimaryVertexValidation::zErrOfflineVertex_
double zErrOfflineVertex_
Definition: PrimaryVertexValidation.h:234
PrimaryVertexValidation::zOfflineVertex_
double zOfflineVertex_
Definition: PrimaryVertexValidation.h:230
edm::ConfigurationDescriptions::add
void add(std::string const &label, ParameterSetDescription const &psetDescription)
Definition: ConfigurationDescriptions.cc:57
PerigeeConversions::trajectoryStateClosestToPoint
TrajectoryStateClosestToPoint trajectoryStateClosestToPoint(const AlgebraicVector3 &momentum, const GlobalPoint &referencePoint, const TrackCharge &charge, const AlgebraicSymMatrix66 &theCovarianceMatrix, const MagneticField *field)
Definition: PerigeeConversions.cc:97
GlobalTrackingGeometry
Definition: GlobalTrackingGeometry.h:20
reco::TrackBase::py
double py() const
y coordinate of momentum vector
Definition: TrackBase.h:643
PrimaryVertexValidation::h_xErrOfflineVertex
TH1F * h_xErrOfflineVertex
Definition: PrimaryVertexValidation.h:609
PrimaryVertexValidation::h_dxy_ladder_
std::vector< TH1F * > h_dxy_ladder_
Definition: PrimaryVertexValidation.h:712
PerigeeTrajectoryError::longitudinalImpactParameterError
double longitudinalImpactParameterError() const
Definition: PerigeeTrajectoryError.h:68
PrimaryVertexValidation::fillTrackHistos
void fillTrackHistos(std::map< std::string, TH1 * > &h, const std::string &ttype, const reco::TransientTrack *tt, const reco::Vertex &v, const reco::BeamSpot &beamSpot, double fBfield)
Definition: PrimaryVertexValidation.cc:3477
PVValHelper::max_eta_phase0
const double max_eta_phase0
Definition: PVValidationHelpers.h:23
PrimaryVertexValidation::chi2normUnbiasedVertex_
float chi2normUnbiasedVertex_[nMaxtracks_]
Definition: PrimaryVertexValidation.h:275
GeomDetEnumerators::P1PXEC
Definition: GeomDetEnumerators.h:26
IPTools::signedImpactParameter3D
std::pair< bool, Measurement1D > signedImpactParameter3D(const reco::TransientTrack &track, const GlobalVector &direction, const reco::Vertex &vertex)
Definition: IPTools.cc:81
PrimaryVertexValidation::a_dxyEtaMeanTrend
TH1F * a_dxyEtaMeanTrend
Definition: PrimaryVertexValidation.h:389
PrimaryVertexValidation::h_BSz0
TH1F * h_BSz0
Definition: PrimaryVertexValidation.h:614
TrajectoryStateClosestToPoint::position
GlobalPoint position() const
Definition: TrajectoryStateClosestToPoint.h:90
PVValHelper::eta
Definition: PVValidationHelpers.h:69
PrimaryVertexValidation::yUnbiasedVertex_
double yUnbiasedVertex_[nMaxtracks_]
Definition: PrimaryVertexValidation.h:273
PrimaryVertexValidation::pt_
double pt_[nMaxtracks_]
Definition: PrimaryVertexValidation.h:246
PVValHelper::pT
Definition: PVValidationHelpers.h:70
DAClusterizerInZ.h
PVValHelper::pTCentral
Definition: PVValidationHelpers.h:71
PrimaryVertexValidation::fillTrendPlotByIndex
void fillTrendPlotByIndex(TH1F *trendPlot, std::vector< TH1F * > &h, PVValHelper::estimator fitPar_, PVValHelper::plotVariable plotVar=PVValHelper::END_OF_PLOTS)
Definition: PrimaryVertexValidation.cc:3120
PrimaryVertexValidation::theTrackClusterizer_
std::unique_ptr< TrackClusterizerInZ > theTrackClusterizer_
Definition: PrimaryVertexValidation.h:142
TrackerDigiGeometryRecord
Definition: TrackerDigiGeometryRecord.h:15
mathSSE::sqrt
T sqrt(T t)
Definition: SSEVec.h:19
PrimaryVertexValidation::theVertexCollectionToken
edm::EDGetTokenT< reco::VertexCollection > theVertexCollectionToken
Definition: PrimaryVertexValidation.h:197
PrimaryVertexValidation::h_BSx0
TH1F * h_BSx0
Definition: PrimaryVertexValidation.h:612
PrimaryVertexValidation::n_dzEtaWidthBiasTrend
TH1F * n_dzEtaWidthBiasTrend
Definition: PrimaryVertexValidation.h:560
PrimaryVertexValidation::n_dxyL1WidthMap
TH2F * n_dxyL1WidthMap
Definition: PrimaryVertexValidation.h:509
PrimaryVertexValidation::n_dzEtaMADBiasTrend
TH1F * n_dzEtaMADBiasTrend
Definition: PrimaryVertexValidation.h:582
PrimaryVertexValidation::a_dzPhiBiasResiduals
std::vector< TH1F * > a_dzPhiBiasResiduals
Definition: PrimaryVertexValidation.h:521
reco::BeamSpot
Definition: BeamSpot.h:21
DDAxes::z
TransientTrackRecord
Definition: TransientTrackRecord.h:11
PrimaryVertexValidation::a_IP2DPhiResiduals
std::vector< TH1F * > a_IP2DPhiResiduals
Definition: PrimaryVertexValidation.h:333
PrimaryVertexValidation::a_dxyMeanMap
TH2F * a_dxyMeanMap
Definition: PrimaryVertexValidation.h:486
reco::Track
Definition: Track.h:27
edm::ESHandle< MagneticField >
PrimaryVertexValidation::a_dzVsPhi
TH2F * a_dzVsPhi
Definition: PrimaryVertexValidation.h:473
PrimaryVertexValidation::h2_probePassingLayer1Map_
TH2F * h2_probePassingLayer1Map_
Definition: PrimaryVertexValidation.h:671
PVValHelper::histodetails::getHigh
float getHigh(residualType type, plotVariable plot)
Definition: PVValidationHelpers.h:105
PrimaryVertexValidation::a_dzEtaResiduals
std::vector< TH1F * > a_dzEtaResiduals
Definition: PrimaryVertexValidation.h:331
PrimaryVertexValidation::h_zOfflineVertex
TH1F * h_zOfflineVertex
Definition: PrimaryVertexValidation.h:608
PVValHelper::modZ
Definition: PVValidationHelpers.h:73
submitPVResolutionJobs.count
count
Definition: submitPVResolutionJobs.py:352
PrimaryVertexValidation::a_dzPhiMeanBiasTrend
TH1F * a_dzPhiMeanBiasTrend
Definition: PrimaryVertexValidation.h:544
reco::Track::recHits
auto recHits() const
Access to reconstructed hits on the track.
Definition: Track.h:85
PVValHelper::norm_dxy
Definition: PVValidationHelpers.h:56
PrimaryVertexValidation::vertexZMax_
double vertexZMax_
Definition: PrimaryVertexValidation.h:166
reco::TrackBase::charge
int charge() const
track electric charge
Definition: TrackBase.h:596
PrimaryVertexValidation::n_dxymodZWidthTrend
TH1F * n_dxymodZWidthTrend
Definition: PrimaryVertexValidation.h:439
PrimaryVertexValidation::EventNumber_
unsigned int EventNumber_
Definition: PrimaryVertexValidation.h:226
TrajectoryStateClosestToPoint::perigeeError
const PerigeeTrajectoryError & perigeeError() const
Definition: TrajectoryStateClosestToPoint.h:84
PrimaryVertexValidation::bookVertexHistograms
std::map< std::string, TH1 * > bookVertexHistograms(const TFileDirectory &dir)
Definition: PrimaryVertexValidation.cc:3290
reco::TrackBase::dz
double dz() const
dz parameter (= dsz/cos(lambda)). This is the track z0 w.r.t (0,0,0) only if the refPoint is close to...
Definition: TrackBase.h:622
PrimaryVertexValidation::theTrackFilter_
std::unique_ptr< TrackFilterForPVFindingBase > theTrackFilter_
Definition: PrimaryVertexValidation.h:141
HLTMuonOfflineAnalyzer_cfi.z0
z0
Definition: HLTMuonOfflineAnalyzer_cfi.py:98
GlobalPoint
Global3DPoint GlobalPoint
Definition: GlobalPoint.h:10
PrimaryVertexValidation::a_dxEtaResiduals
std::vector< TH1F * > a_dxEtaResiduals
Definition: PrimaryVertexValidation.h:325
PrimaryVertexValidation::n_dzPhiMeanBiasTrend
TH1F * n_dzPhiMeanBiasTrend
Definition: PrimaryVertexValidation.h:554
Point3DBase< float, GlobalTag >
PrimaryVertexValidation::nhitsTID_
int nhitsTID_[nMaxtracks_]
Definition: PrimaryVertexValidation.h:254
TrajectoryStateClosestToPoint::perigeeParameters
const PerigeeTrajectoryParameters & perigeeParameters() const
Definition: TrajectoryStateClosestToPoint.h:73
PrimaryVertexValidation::beginJob
void beginJob() override
Definition: PrimaryVertexValidation.cc:1165
b
double b
Definition: hdecay.h:118
TrackerGeometry::isThere
bool isThere(GeomDetEnumerators::SubDetector subdet) const
Definition: TrackerGeometry.cc:219
PrimaryVertexValidation::h_probeHits2D_
TH1F * h_probeHits2D_
Definition: PrimaryVertexValidation.h:657
PrimaryVertexValidation::dzErrorFromMyVertex_
double dzErrorFromMyVertex_[nMaxtracks_]
Definition: PrimaryVertexValidation.h:287
reco::TrackBase::phi
double phi() const
azimuthal angle of momentum vector
Definition: TrackBase.h:649
dumpRecoGeometry_cfg.varType
varType
Definition: dumpRecoGeometry_cfg.py:8
PrimaryVertexValidation::h_yErrOfflineVertex
TH1F * h_yErrOfflineVertex
Definition: PrimaryVertexValidation.h:610
PrimaryVertexValidation::compressionSettings_
const int compressionSettings_
Definition: PrimaryVertexValidation.h:157
PrimaryVertexValidation::nhitsFPIX_
int nhitsFPIX_[nMaxtracks_]
Definition: PrimaryVertexValidation.h:252
PrimaryVertexValidation::nHitsOfProbe_
double nHitsOfProbe_
Definition: PrimaryVertexValidation.h:178
PrimaryVertexValidation::isHighPurity_
int isHighPurity_[nMaxtracks_]
Definition: PrimaryVertexValidation.h:257
PVValHelper::END_OF_PLOTS
Definition: PVValidationHelpers.h:74
PrimaryVertexValidation::dz_
double dz_[nMaxtracks_]
Definition: PrimaryVertexValidation.h:265
PrimaryVertexValidation::doFPix_
bool doFPix_
Definition: PrimaryVertexValidation.h:174
edm::OwnVector::const_iterator
Definition: OwnVector.h:41
DetId::subdetId
constexpr int subdetId() const
get the contents of the subdetector field (not cast into any detector's numbering enum)
Definition: DetId.h:48
Measurement1D::error
double error() const
Definition: Measurement1D.h:27
PrimaryVertexValidation::useTracksFromRecoVtx_
bool useTracksFromRecoVtx_
Definition: PrimaryVertexValidation.h:160
RunInfoRcd
Definition: RunSummaryRcd.h:26
PrimaryVertexValidation::n_dxyPhiMADTrend
TH1F * n_dxyPhiMADTrend
Definition: PrimaryVertexValidation.h:461
edm::ConfigurationDescriptions
Definition: ConfigurationDescriptions.h:28
PrimaryVertexValidation::n_dzPhiMADBiasTrend
TH1F * n_dzPhiMADBiasTrend
Definition: PrimaryVertexValidation.h:577
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
PrimaryVertexValidation::n_dzPhiMedianBiasTrend
TH1F * n_dzPhiMedianBiasTrend
Definition: PrimaryVertexValidation.h:576
PrimaryVertexValidation::isBFieldConsistentWithMode
bool isBFieldConsistentWithMode(const edm::EventSetup &iSetup) const
Definition: PrimaryVertexValidation.cc:2972
PrimaryVertexValidation::n_dzMeanBiasMap
TH2F * n_dzMeanBiasMap
Definition: PrimaryVertexValidation.h:590
PrimaryVertexValidation::geomToken_
const edm::ESGetToken< TrackerGeometry, TrackerDigiGeometryRecord > geomToken_
Definition: PrimaryVertexValidation.h:152
PrimaryVertexValidation::n_dzpTWidthTrend
TH1F * n_dzpTWidthTrend
Definition: PrimaryVertexValidation.h:419
bsc_activity_cfg.clusters
clusters
Definition: bsc_activity_cfg.py:36
PrimaryVertexValidation::a_dzPhiMADTrend
TH1F * a_dzPhiMADTrend
Definition: PrimaryVertexValidation.h:453
PrimaryVertexValidation::nTracksPerClus_
int nTracksPerClus_
Definition: PrimaryVertexValidation.h:222
PrimaryVertexValidation::analyze
void analyze(const edm::Event &, const edm::EventSetup &) override
Definition: PrimaryVertexValidation.cc:212
PrimaryVertexValidation::n_dxyVsPhi
TH2F * n_dxyVsPhi
Definition: PrimaryVertexValidation.h:475
PrimaryVertexValidation::h_dz_pT_
std::vector< TH1F * > h_dz_pT_
Definition: PrimaryVertexValidation.h:693
PrimaryVertexValidation::h_probeRecoVSigXY_
TH1F * h_probeRecoVSigXY_
Definition: PrimaryVertexValidation.h:648
TFileService::mkdir
TFileDirectory mkdir(const std::string &dir, const std::string &descr="")
create a new subdirectory
Definition: TFileService.h:69
PrimaryVertexValidation::a_dzEtaMedianTrend
TH1F * a_dzEtaMedianTrend
Definition: PrimaryVertexValidation.h:457
PrimaryVertexValidation::h_probed3DRefitV_
TH1F * h_probed3DRefitV_
Definition: PrimaryVertexValidation.h:644
funct::true
true
Definition: Factorize.h:173
GeomDetEnumerators::P1PXB
Definition: GeomDetEnumerators.h:25
PrimaryVertexValidation::a_dxymodZWidthTrend
TH1F * a_dxymodZWidthTrend
Definition: PrimaryVertexValidation.h:429
PrimaryVertexValidation::theta_
double theta_[nMaxtracks_]
Definition: PrimaryVertexValidation.h:259
PrimaryVertexValidation::fs
edm::Service< TFileService > fs
Definition: PrimaryVertexValidation.h:297
PrimaryVertexValidation::h_dz_Central_pT_
std::vector< TH1F * > h_dz_Central_pT_
Definition: PrimaryVertexValidation.h:698
edm::ParameterSetDescription::addUntracked
ParameterDescriptionBase * addUntracked(U const &iLabel, T const &value)
Definition: ParameterSetDescription.h:100
TrackerDigiGeometryRecord.h
SiPixelRecHitCollection.h
PrimaryVertexValidation::a_dxypTCentralWidthTrend
TH1F * a_dxypTCentralWidthTrend
Definition: PrimaryVertexValidation.h:412
PrimaryVertexValidation::h_fitVtxChi2_
TH1F * h_fitVtxChi2_
Definition: PrimaryVertexValidation.h:676
LEDCalibrationChannels.ieta
ieta
Definition: LEDCalibrationChannels.py:63
PrimaryVertexValidation::a_dxyPhiMADTrend
TH1F * a_dxyPhiMADTrend
Definition: PrimaryVertexValidation.h:451
bphysicsOniaDQM_cfi.vertex
vertex
Definition: bphysicsOniaDQM_cfi.py:7
PrimaryVertexValidation::nhitsTOB_
int nhitsTOB_[nMaxtracks_]
Definition: PrimaryVertexValidation.h:255
PrimaryVertexValidation::h_runFromConfig
TH1I * h_runFromConfig
Definition: PrimaryVertexValidation.h:604
PrimaryVertexValidation::h_probeP_
TH1F * h_probeP_
Definition: PrimaryVertexValidation.h:624
LogDebug
#define LogDebug(id)
Definition: MessageLogger.h:223
PVValHelper::getMedian
Measurement1D getMedian(TH1F *histo)
Definition: PVValidationHelpers.cc:178
edm::ParameterSet
Definition: ParameterSet.h:47
math::XYZPoint
XYZPointD XYZPoint
point in space with cartesian internal representation
Definition: Point3D.h:12
PrimaryVertexValidation::a_IP2DEtaResiduals
std::vector< TH1F * > a_IP2DEtaResiduals
Definition: PrimaryVertexValidation.h:334
PrimaryVertexValidation::nPtBins_
static const int nPtBins_
Definition: PrimaryVertexValidation.h:208
PrimaryVertexValidation::a_dxyMeanBiasMap
TH2F * a_dxyMeanBiasMap
Definition: PrimaryVertexValidation.h:586
PrimaryVertexValidation::dzBs_
double dzBs_[nMaxtracks_]
Definition: PrimaryVertexValidation.h:268
PrimaryVertexValidation::yPCA_
double yPCA_[nMaxtracks_]
Definition: PrimaryVertexValidation.h:270
PrimaryVertexValidation::fillMap
void fillMap(TH2F *trendMap, TH1F *residualsMapPlot[100][100], PVValHelper::estimator fitPar_, const int nXBins_, const int nYBins_)
Definition: PrimaryVertexValidation.cc:3182
a
double a
Definition: hdecay.h:119
DetId::Tracker
Definition: DetId.h:25
PrimaryVertexValidation::n_dzEtaResiduals
std::vector< TH1F * > n_dzEtaResiduals
Definition: PrimaryVertexValidation.h:351
PrimaryVertexValidation::topoToken_
const edm::ESGetToken< TrackerTopology, TrackerTopologyRcd > topoToken_
Definition: PrimaryVertexValidation.h:154
PrimaryVertexValidation::a_dxyEtaWidthTrend
TH1F * a_dxyEtaWidthTrend
Definition: PrimaryVertexValidation.h:390
PVValHelper::IP3D
Definition: PVValidationHelpers.h:53
PrimaryVertexValidation::a_dxypTMeanTrend
TH1F * a_dxypTMeanTrend
Definition: PrimaryVertexValidation.h:406
PrimaryVertexValidation::n_dxyWidthBiasMap
TH2F * n_dxyWidthBiasMap
Definition: PrimaryVertexValidation.h:595
PrimaryVertexValidation::tracksUsedForVertexing_
int tracksUsedForVertexing_[nMaxtracks_]
Definition: PrimaryVertexValidation.h:280
PrimaryVertexValidation::Beamdxdz_
double Beamdxdz_
Definition: PrimaryVertexValidation.h:240
PrimaryVertexValidation::h_fitVtxTrackAverageWeight_
TH1F * h_fitVtxTrackAverageWeight_
Definition: PrimaryVertexValidation.h:681
PVValHelper::phi
Definition: PVValidationHelpers.h:68
PrimaryVertexValidation::Width2DMapsDir
TFileDirectory Width2DMapsDir
Definition: PrimaryVertexValidation.h:305
PrimaryVertexValidation::nhitsTEC_
int nhitsTEC_[nMaxtracks_]
Definition: PrimaryVertexValidation.h:256
PrimaryVertexValidation::n_IP3DEtaResiduals
std::vector< TH1F * > n_IP3DEtaResiduals
Definition: PrimaryVertexValidation.h:357
PrimaryVertexValidation::eta_
double eta_[nMaxtracks_]
Definition: PrimaryVertexValidation.h:258
PrimaryVertexValidation::n_dxyMeanMap
TH2F * n_dxyMeanMap
Definition: PrimaryVertexValidation.h:489
PrimaryVertexValidation::a_dxyEtaBiasResiduals
std::vector< TH1F * > a_dxyEtaBiasResiduals
Definition: PrimaryVertexValidation.h:519
PrimaryVertexValidation::zUnbiasedVertex_
double zUnbiasedVertex_[nMaxtracks_]
Definition: PrimaryVertexValidation.h:274
type
type
Definition: SiPixelVCal_PayloadInspector.cc:37
PrimaryVertexValidation::n_dxyVsEta
TH2F * n_dxyVsEta
Definition: PrimaryVertexValidation.h:481
PrimaryVertexValidation::n_dxypTCentralWidthTrend
TH1F * n_dxypTCentralWidthTrend
Definition: PrimaryVertexValidation.h:422
edm::Ref::isNonnull
bool isNonnull() const
Checks for non-null.
Definition: Ref.h:238
gainCalibHelper::gainCalibPI::type
type
Definition: SiPixelGainCalibHelper.h:39
PrimaryVertexValidation::a_dzPhiMedianTrend
TH1F * a_dzPhiMedianTrend
Definition: PrimaryVertexValidation.h:452
PrimaryVertexValidation::a_dzPhiResiduals
std::vector< TH1F * > a_dzPhiResiduals
Definition: PrimaryVertexValidation.h:330
reco::TrackBase::eta
double eta() const
pseudorapidity of momentum vector
Definition: TrackBase.h:652
PrimaryVertexValidation::h_norm_dz_pT_
std::vector< TH1F * > h_norm_dz_pT_
Definition: PrimaryVertexValidation.h:695
PrimaryVertexValidation::nLadders_
unsigned int nLadders_
Definition: PrimaryVertexValidation.h:210
position
static int position[264][3]
Definition: ReadPGInfo.cc:289
PrimaryVertexValidation::h2_probeEtaPt_
TH2F * h2_probeEtaPt_
Definition: PrimaryVertexValidation.h:622
reco::TrackBase::dzError
double dzError() const
error on dz
Definition: TrackBase.h:778
PrimaryVertexValidation::n_dxypTMeanTrend
TH1F * n_dxypTMeanTrend
Definition: PrimaryVertexValidation.h:416
PV3DBase::y
T y() const
Definition: PV3DBase.h:60
funct::tan
Tan< T >::type tan(const T &t)
Definition: Tan.h:22
PrimaryVertexValidation::h_BeamWidthY
TH1F * h_BeamWidthY
Definition: PrimaryVertexValidation.h:617
IPTools
Definition: IPTools.h:16
PrimaryVertexValidation::h_probeHasBPixL1Overlap_
TH1I * h_probeHasBPixL1Overlap_
Definition: PrimaryVertexValidation.h:667
PrimaryVertexValidation::n_dzL1ResidualsMap
TH1F * n_dzL1ResidualsMap[nMaxBins_][nMaxBins_]
Definition: PrimaryVertexValidation.h:380
PrimaryVertexValidation::xOfflineVertex_
double xOfflineVertex_
Definition: PrimaryVertexValidation.h:228
PVValHelper::MAD
Definition: PVValidationHelpers.h:44
createfilelist.int
int
Definition: createfilelist.py:10
PrimaryVertexValidation::BSx0_
double BSx0_
Definition: PrimaryVertexValidation.h:236
MetAnalyzer.pv
def pv(vc)
Definition: MetAnalyzer.py:7
iEvent
int iEvent
Definition: GenABIO.cc:224
PrimaryVertexValidation::a_dzladderMeanTrend
TH1F * a_dzladderMeanTrend
Definition: PrimaryVertexValidation.h:435
PrimaryVertexValidation::forceBeamSpotContraint_
bool forceBeamSpotContraint_
Definition: PrimaryVertexValidation.h:194
PrimaryVertexValidation::h_dxy_ladderNoOverlap_
std::vector< TH1F * > h_dxy_ladderNoOverlap_
Definition: PrimaryVertexValidation.h:710
PrimaryVertexValidation::n_dzL1MeanMap
TH2F * n_dzL1MeanMap
Definition: PrimaryVertexValidation.h:504
PrimaryVertexValidation::h_probeRefitVLogSig3D_
TH1F * h_probeRefitVLogSig3D_
Definition: PrimaryVertexValidation.h:652
PVValHelper::norm_IP3D
Definition: PVValidationHelpers.h:62
PrimaryVertexValidation::n_dzEtaBiasResiduals
std::vector< TH1F * > n_dzEtaBiasResiduals
Definition: PrimaryVertexValidation.h:530
PrimaryVertexValidation::n_dzPhiMADTrend
TH1F * n_dzPhiMADTrend
Definition: PrimaryVertexValidation.h:463
PrimaryVertexValidation::a_dzMeanBiasMap
TH2F * a_dzMeanBiasMap
Definition: PrimaryVertexValidation.h:587
PrimaryVertexValidation::h_xOfflineVertex
TH1F * h_xOfflineVertex
Definition: PrimaryVertexValidation.h:606
PVValHelper::residualType
residualType
Definition: PVValidationHelpers.h:46
M_PI
#define M_PI
Definition: BXVectorInputProducer.cc:49
topSingleLeptonDQM_PU_cfi.pattern
pattern
Definition: topSingleLeptonDQM_PU_cfi.py:39
edm::EventSetup::getHandle
ESHandle< T > getHandle(const ESGetToken< T, R > &iToken) const
Definition: EventSetup.h:148
PrimaryVertexValidation::storeNtuple_
bool storeNtuple_
Definition: PrimaryVertexValidation.h:158
PrimaryVertexValidation::n_dxyPhiResiduals
std::vector< TH1F * > n_dxyPhiResiduals
Definition: PrimaryVertexValidation.h:347
PrimaryVertexValidation::dzFromMyVertex_
double dzFromMyVertex_[nMaxtracks_]
Definition: PrimaryVertexValidation.h:283
PrimaryVertexValidation::chi2ndof_
double chi2ndof_[nMaxtracks_]
Definition: PrimaryVertexValidation.h:262
PrimaryVertexValidation::n_dxyL1ResidualsMap
TH1F * n_dxyL1ResidualsMap[nMaxBins_][nMaxBins_]
Definition: PrimaryVertexValidation.h:379
TransientTrackBuilder
Definition: TransientTrackBuilder.h:16
PrimaryVertexValidation::n_dzPhiWidthTrend
TH1F * n_dzPhiWidthTrend
Definition: PrimaryVertexValidation.h:397
PVValHelper::dy
Definition: PVValidationHelpers.h:49
submitPVResolutionJobs.q
q
Definition: submitPVResolutionJobs.py:84
MonitorHOAlCaRecoStream_cfi.lowedge
lowedge
Definition: MonitorHOAlCaRecoStream_cfi.py:11
TransientVertex
Definition: TransientVertex.h:18
edm::EventSetup
Definition: EventSetup.h:57
TrackerGeometry::dets
const DetContainer & dets() const override
Returm a vector of all GeomDet (including all GeomDetUnits)
Definition: TrackerGeometry.h:62
PrimaryVertexValidation::h_probeHitsInBPIX_
TH1F * h_probeHitsInBPIX_
Definition: PrimaryVertexValidation.h:662
PVValHelper::histodetails::getLow
float getLow(residualType type, plotVariable plot)
Definition: PVValidationHelpers.h:96
TrajectoryStateClosestToPoint
Definition: TrajectoryStateClosestToPoint.h:18
reco::TrackBase::chi2
double chi2() const
chi-squared of the fit
Definition: TrackBase.h:587
reco::TrackBase::normalizedChi2
double normalizedChi2() const
chi-squared divided by n.d.o.f. (or chi-squared * 1e6 if n.d.o.f. is zero)
Definition: TrackBase.h:593
PVValHelper::generateBins
std::vector< float > generateBins(int n, float start, float range)
Definition: PVValidationHelpers.cc:161
edm::LogError
Log< level::Error, false > LogError
Definition: MessageLogger.h:123
PrimaryVertexValidation::n_dxypTWidthTrend
TH1F * n_dxypTWidthTrend
Definition: PrimaryVertexValidation.h:417
PrimaryVertexValidation::h_probeHitsInTIB_
TH1F * h_probeHitsInTIB_
Definition: PrimaryVertexValidation.h:658
PrimaryVertexValidation::nhits2D_
int nhits2D_[nMaxtracks_]
Definition: PrimaryVertexValidation.h:250
PrimaryVertexValidation::a_dxyEtaMedianBiasTrend
TH1F * a_dxyEtaMedianBiasTrend
Definition: PrimaryVertexValidation.h:569
PrimaryVertexValidation::n_dzVsEta
TH2F * n_dzVsEta
Definition: PrimaryVertexValidation.h:482
PVValHelper::MEAN
Definition: PVValidationHelpers.h:44
PrimaryVertexValidation::n_dxyPhiWidthTrend
TH1F * n_dxyPhiWidthTrend
Definition: PrimaryVertexValidation.h:395
PrimaryVertexValidation::intLumi_
double intLumi_
Definition: PrimaryVertexValidation.h:169
PrimaryVertexValidation::h_runEndTimes
TH1I * h_runEndTimes
Definition: PrimaryVertexValidation.h:315
PrimaryVertexValidation::etaOfProbe_
double etaOfProbe_
Definition: PrimaryVertexValidation.h:177
PrimaryVertexValidation::n_dzVsPhi
TH2F * n_dzVsPhi
Definition: PrimaryVertexValidation.h:476
PrimaryVertexValidation::a_dzpTCentralMeanTrend
TH1F * a_dzpTCentralMeanTrend
Definition: PrimaryVertexValidation.h:413
PVValHelper::d3D
Definition: PVValidationHelpers.h:54
reco::TrackBase::vertex
const Point & vertex() const
reference point on the track. This method is DEPRECATED, please use referencePoint() instead
Definition: TrackBase.h:676
PrimaryVertexValidation::h_recoVtxChi2ndf_
TH1F * h_recoVtxChi2ndf_
Definition: PrimaryVertexValidation.h:684
PrimaryVertexValidation::n_d3DResidualsMap
TH1F * n_d3DResidualsMap[nMaxBins_][nMaxBins_]
Definition: PrimaryVertexValidation.h:373
PrimaryVertexValidation::a_dxypTCentralMeanTrend
TH1F * a_dxypTCentralMeanTrend
Definition: PrimaryVertexValidation.h:411
PrimaryVertexValidation::MedianTrendsDir
TFileDirectory MedianTrendsDir
Definition: PrimaryVertexValidation.h:301
TrackingRecHit
Definition: TrackingRecHit.h:21
PrimaryVertexValidation::a_dxyPhiResiduals
std::vector< TH1F * > a_dxyPhiResiduals
Definition: PrimaryVertexValidation.h:321
newFWLiteAna.bin
bin
Definition: newFWLiteAna.py:161
PrimaryVertexValidation::a_dxyL1ResidualsMap
TH1F * a_dxyL1ResidualsMap[nMaxBins_][nMaxBins_]
Definition: PrimaryVertexValidation.h:377
PrimaryVertexValidation::phi_
double phi_[nMaxtracks_]
Definition: PrimaryVertexValidation.h:260
PrimaryVertexValidation::n_dzPhiMeanTrend
TH1F * n_dzPhiMeanTrend
Definition: PrimaryVertexValidation.h:396
PrimaryVertexValidation::a_dxyPhiBiasResiduals
std::vector< TH1F * > a_dxyPhiBiasResiduals
Definition: PrimaryVertexValidation.h:518
PrimaryVertexValidation::h_nLadders
TH1F * h_nLadders
Definition: PrimaryVertexValidation.h:310
types
types
Definition: AlignPCLThresholds_PayloadInspector.cc:30
reco::TrackBase::qualityByName
static TrackQuality qualityByName(const std::string &name)
Definition: TrackBase.cc:126
PrimaryVertexValidation::dxyErrorFromMyVertex_
double dxyErrorFromMyVertex_[nMaxtracks_]
Definition: PrimaryVertexValidation.h:286
PrimaryVertexValidation::a_dxyEtaMeanBiasTrend
TH1F * a_dxyEtaMeanBiasTrend
Definition: PrimaryVertexValidation.h:547
PrimaryVertexValidation::a_d3DResidualsMap
TH1F * a_d3DResidualsMap[nMaxBins_][nMaxBins_]
Definition: PrimaryVertexValidation.h:369
PrimaryVertexValidation::n_dxypTCentralMeanTrend
TH1F * n_dxypTCentralMeanTrend
Definition: PrimaryVertexValidation.h:421
PrimaryVertexValidation::a_dyEtaResiduals
std::vector< TH1F * > a_dyEtaResiduals
Definition: PrimaryVertexValidation.h:328
reco::TrackBase::hitPattern
const HitPattern & hitPattern() const
Access the hit pattern, indicating in which Tracker layers the track has hits.
Definition: TrackBase.h:504
PrimaryVertexValidation::runNumbersTimesLog_
std::map< unsigned int, std::pair< long long, long long > > runNumbersTimesLog_
Definition: PrimaryVertexValidation.h:313
PrimaryVertexValidation::a_dzEtaMedianBiasTrend
TH1F * a_dzEtaMedianBiasTrend
Definition: PrimaryVertexValidation.h:571
PrimaryVertexValidation::h_norm_dz_ladder_
std::vector< TH1F * > h_norm_dz_ladder_
Definition: PrimaryVertexValidation.h:715
GeomDet.h
PrimaryVertexValidation::h_recoVtxNtracks_
TH1F * h_recoVtxNtracks_
Definition: PrimaryVertexValidation.h:683
TransientVertex.h
PrimaryVertexValidation::h_probeL1Ladder_
TH1F * h_probeL1Ladder_
Definition: PrimaryVertexValidation.h:665
submitPVResolutionJobs.desc
string desc
Definition: submitPVResolutionJobs.py:251
PrimaryVertexValidation::IPLsigFromMyVertex_
double IPLsigFromMyVertex_[nMaxtracks_]
Definition: PrimaryVertexValidation.h:291
PrimaryVertexValidation::sumOfWeightsUnbiasedVertex_
float sumOfWeightsUnbiasedVertex_[nMaxtracks_]
Definition: PrimaryVertexValidation.h:279
std
Definition: JetResolutionObject.h:76
writedatasetfile.run
run
Definition: writedatasetfile.py:27
PrimaryVertexValidation::d3DErrorFromMyVertex_
double d3DErrorFromMyVertex_[nMaxtracks_]
Definition: PrimaryVertexValidation.h:288
reco::TrackBase::d0Error
double d0Error() const
error on d0
Definition: TrackBase.h:772
PrimaryVertexValidation::hasFirstLayerPixelHits
bool hasFirstLayerPixelHits(const reco::TransientTrack &track)
Definition: PrimaryVertexValidation.cc:1148
PrimaryVertexValidation::n_dxymodZMeanTrend
TH1F * n_dxymodZMeanTrend
Definition: PrimaryVertexValidation.h:438
PrimaryVertexValidation::h_dxy_ladderOverlap_
std::vector< TH1F * > h_dxy_ladderOverlap_
Definition: PrimaryVertexValidation.h:709
reco::TransientTrack
Definition: TransientTrack.h:19
PrimaryVertexValidation::a_dzEtaWidthTrend
TH1F * a_dzEtaWidthTrend
Definition: PrimaryVertexValidation.h:392
PVValHelper::dxy
Definition: PVValidationHelpers.h:47
PrimaryVertexValidation::bookResidualsHistogram
std::vector< TH1F * > bookResidualsHistogram(const TFileDirectory &dir, unsigned int theNOfBins, PVValHelper::residualType resType, PVValHelper::plotVariable varType, bool isNormalized=false)
Definition: PrimaryVertexValidation.cc:3412
TrackerTopology::pxbModule
unsigned int pxbModule(const DetId &id) const
Definition: TrackerTopology.h:160
PrimaryVertexValidation::p_
double p_[nMaxtracks_]
Definition: PrimaryVertexValidation.h:247
PrimaryVertexValidation::yErrOfflineVertex_
double yErrOfflineVertex_
Definition: PrimaryVertexValidation.h:233
PrimaryVertexValidation::h2_probeEtaPhi_
TH2F * h2_probeEtaPhi_
Definition: PrimaryVertexValidation.h:621
PrimaryVertexValidation::n_IP2DPhiResiduals
std::vector< TH1F * > n_IP2DPhiResiduals
Definition: PrimaryVertexValidation.h:353
PrimaryVertexValidation::theDetails_
PVValHelper::histodetails theDetails_
Definition: PrimaryVertexValidation.h:163
PVValHelper::dz
Definition: PVValidationHelpers.h:50
PrimaryVertexValidation::h_nOfflineVertices
TH1F * h_nOfflineVertices
Definition: PrimaryVertexValidation.h:601
edm::LogVerbatim
Log< level::Info, true > LogVerbatim
Definition: MessageLogger.h:128
PrimaryVertexValidation::h_dxy_Central_pT_
std::vector< TH1F * > h_dxy_Central_pT_
Definition: PrimaryVertexValidation.h:697
PrimaryVertexValidation::xUnbiasedVertex_
double xUnbiasedVertex_[nMaxtracks_]
Definition: PrimaryVertexValidation.h:272
PrimaryVertexValidation::n_dzEtaWidthTrend
TH1F * n_dzEtaWidthTrend
Definition: PrimaryVertexValidation.h:402
PrimaryVertexValidation::mypT_bins_
std::array< float, nPtBins_+1 > mypT_bins_
Definition: PrimaryVertexValidation.h:218
PVValHelper::MEDIAN
Definition: PVValidationHelpers.h:44
PrimaryVertexValidation::h_zErrOfflineVertex
TH1F * h_zErrOfflineVertex
Definition: PrimaryVertexValidation.h:611
PrimaryVertexValidation::a_dzMeanMap
TH2F * a_dzMeanMap
Definition: PrimaryVertexValidation.h:487
PrimaryVertexValidation::h_probeHits1D_
TH1F * h_probeHits1D_
Definition: PrimaryVertexValidation.h:656
TFileService::kSharedResource
static const std::string kSharedResource
Definition: TFileService.h:76
PVValHelper::getMAD
Measurement1D getMAD(TH1F *histo)
Definition: PVValidationHelpers.cc:194
PrimaryVertexValidation::getRunTime
std::pair< long long, long long > getRunTime(const edm::EventSetup &iSetup) const
Definition: PrimaryVertexValidation.cc:2960
PrimaryVertexValidation::passesTrackCuts
bool passesTrackCuts(const reco::Track &track, const reco::Vertex &vertex, const std::string &qualityString_, double dxyErrMax_, double dzErrMax_, double ptErrMax_)
Definition: PrimaryVertexValidation.cc:3256
PVValHelper::ladder
Definition: PVValidationHelpers.h:72
PrimaryVertexValidation::n_dxyEtaMeanTrend
TH1F * n_dxyEtaMeanTrend
Definition: PrimaryVertexValidation.h:399
PrimaryVertexValidation::n_dzPhiMedianTrend
TH1F * n_dzPhiMedianTrend
Definition: PrimaryVertexValidation.h:462
PrimaryVertexValidation::a_dzL1WidthMap
TH2F * a_dzL1WidthMap
Definition: PrimaryVertexValidation.h:507
PrimaryVertexValidation::n_dxyPhiMeanBiasTrend
TH1F * n_dxyPhiMeanBiasTrend
Definition: PrimaryVertexValidation.h:552
PrimaryVertexValidation::ttkToken_
const edm::ESGetToken< TransientTrackBuilder, TransientTrackRecord > ttkToken_
Definition: PrimaryVertexValidation.h:153
PrimaryVertexValidation::askFirstLayerHit_
bool askFirstLayerHit_
Definition: PrimaryVertexValidation.h:172
submitPVValidationJobs.runInfo
dictionary runInfo
Definition: submitPVValidationJobs.py:1013
PrimaryVertexValidation::n_dxyPhiWidthBiasTrend
TH1F * n_dxyPhiWidthBiasTrend
Definition: PrimaryVertexValidation.h:553
PrimaryVertexValidation::charge_
int charge_[nMaxtracks_]
Definition: PrimaryVertexValidation.h:263
edm::ParameterSet::getParameter
T getParameter(std::string const &) const
Definition: ParameterSet.h:303
PrimaryVertexValidation::nhitsBPIX_
int nhitsBPIX_[nMaxtracks_]
Definition: PrimaryVertexValidation.h:251
PrimaryVertexValidation::n_dzEtaMeanBiasTrend
TH1F * n_dzEtaMeanBiasTrend
Definition: PrimaryVertexValidation.h:559
PrimaryVertexValidation::n_dzladderWidthTrend
TH1F * n_dzladderWidthTrend
Definition: PrimaryVertexValidation.h:446
PrimaryVertexValidation::isPhase1_
bool isPhase1_
Definition: PrimaryVertexValidation.h:179
PrimaryVertexValidation::runControl_
bool runControl_
Definition: PrimaryVertexValidation.h:191
dqm-mbProfile.log
log
Definition: dqm-mbProfile.py:17
PrimaryVertexValidation::a_dxymodZMeanTrend
TH1F * a_dxymodZMeanTrend
Definition: PrimaryVertexValidation.h:428
PrimaryVertexValidation::a_dxyPhiMeanTrend
TH1F * a_dxyPhiMeanTrend
Definition: PrimaryVertexValidation.h:384
PrimaryVertexValidation::doBPix_
bool doBPix_
Definition: PrimaryVertexValidation.h:173
PrimaryVertexValidation::h_dz_ladder_
std::vector< TH1F * > h_dz_ladder_
Definition: PrimaryVertexValidation.h:713
PrimaryVertexValidation::n_dzEtaMADTrend
TH1F * n_dzEtaMADTrend
Definition: PrimaryVertexValidation.h:468
PrimaryVertexValidation::n_dzmodZMeanTrend
TH1F * n_dzmodZMeanTrend
Definition: PrimaryVertexValidation.h:440
PrimaryVertexValidation::n_dzEtaMedianBiasTrend
TH1F * n_dzEtaMedianBiasTrend
Definition: PrimaryVertexValidation.h:581
PrimaryVertexValidation::h_probed0RefitV_
TH1F * h_probed0RefitV_
Definition: PrimaryVertexValidation.h:640
PrimaryVertexValidation::a_dxyWidthBiasMap
TH2F * a_dxyWidthBiasMap
Definition: PrimaryVertexValidation.h:592
TransientTrackBuilder::build
reco::TransientTrack build(const reco::Track *p) const
Definition: TransientTrackBuilder.cc:20
PrimaryVertexValidation::Mean2DMapsDir
TFileDirectory Mean2DMapsDir
Definition: PrimaryVertexValidation.h:304
funct::pow
Power< A, B >::type pow(const A &a, const B &b)
Definition: Power.h:29
PrimaryVertexValidation::a_dzWidthBiasMap
TH2F * a_dzWidthBiasMap
Definition: PrimaryVertexValidation.h:593
PVValHelper::histodetails::setMap
void setMap(residualType type, plotVariable plot, float low, float high)
Definition: PVValidationHelpers.h:82
PrimaryVertexValidation::h_probeHitsInFPIX_
TH1F * h_probeHitsInFPIX_
Definition: PrimaryVertexValidation.h:663
reco::TrackBase::pz
double pz() const
z coordinate of momentum vector
Definition: TrackBase.h:646
PrimaryVertexValidation::BeamWidthX_
double BeamWidthX_
Definition: PrimaryVertexValidation.h:241
PrimaryVertexValidation::a_dxyPhiMedianBiasTrend
TH1F * a_dxyPhiMedianBiasTrend
Definition: PrimaryVertexValidation.h:564
cms::Exception
Definition: Exception.h:70
PrimaryVertexValidation::a_dxyVsPhi
TH2F * a_dxyVsPhi
Definition: PrimaryVertexValidation.h:472
funct::abs
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
PrimaryVertexValidation::a_dxyladderWidthTrend
TH1F * a_dxyladderWidthTrend
Definition: PrimaryVertexValidation.h:434
PrimaryVertexValidation::nModZ_
unsigned int nModZ_
Definition: PrimaryVertexValidation.h:211
PrimaryVertexValidation::nClus_
int nClus_
Definition: PrimaryVertexValidation.h:223
LogTrace
#define LogTrace(id)
Definition: MessageLogger.h:224
kappa
static const G4double kappa
Definition: UrbanMscModel93.cc:35
PrimaryVertexValidation::xPCA_
double xPCA_[nMaxtracks_]
Definition: PrimaryVertexValidation.h:269
PrimaryVertexValidation::h_probeCharge_
TH1F * h_probeCharge_
Definition: PrimaryVertexValidation.h:631
PrimaryVertexValidation::n_dzMeanMap
TH2F * n_dzMeanMap
Definition: PrimaryVertexValidation.h:490
TrackerTopologyRcd
Definition: TrackerTopologyRcd.h:10
PVValHelper::histodetails::range
std::map< std::pair< residualType, plotVariable >, std::pair< float, float > > range
Definition: PVValidationHelpers.h:79
ParameterSet.h
PrimaryVertexValidation::dxy_
double dxy_[nMaxtracks_]
Definition: PrimaryVertexValidation.h:266
GapClusterizerInZ.h
PrimaryVertexValidation::n_dzpTMeanTrend
TH1F * n_dzpTMeanTrend
Definition: PrimaryVertexValidation.h:418
PrimaryVertexValidation::a_dxPhiResiduals
std::vector< TH1F * > a_dxPhiResiduals
Definition: PrimaryVertexValidation.h:324
PerigeeTrajectoryParameters::transverseImpactParameter
double transverseImpactParameter() const
Definition: PerigeeTrajectoryParameters.h:68
dqmiolumiharvest.j
j
Definition: dqmiolumiharvest.py:66
PrimaryVertexValidation::n_dzpTCentralWidthTrend
TH1F * n_dzpTCentralWidthTrend
Definition: PrimaryVertexValidation.h:424
TrajectoryStateClosestToPoint::theState
const FreeTrajectoryState & theState() const
Definition: TrajectoryStateClosestToPoint.h:96
PrimaryVertexValidation::n_dxyEtaMADTrend
TH1F * n_dxyEtaMADTrend
Definition: PrimaryVertexValidation.h:466
PrimaryVertexValidation::lightNtupleSwitch_
bool lightNtupleSwitch_
Definition: PrimaryVertexValidation.h:159
PrimaryVertexValidation::h_recoVtxSumPt_
TH1F * h_recoVtxSumPt_
Definition: PrimaryVertexValidation.h:686
PrimaryVertexValidation::maxPt_
const double maxPt_
Definition: PrimaryVertexValidation.h:186
PrimaryVertexValidation::n_dxyResidualsMap
TH1F * n_dxyResidualsMap[nMaxBins_][nMaxBins_]
Definition: PrimaryVertexValidation.h:371
point
*vegas h *****************************************************used in the default bin number in original ***version of VEGAS is ***a higher bin number might help to derive a more precise ***grade subtle point
Definition: invegas.h:5
edm::HandleBase::isValid
bool isValid() const
Definition: HandleBase.h:70
PrimaryVertexValidation::n_dzpTCentralMeanTrend
TH1F * n_dzpTCentralMeanTrend
Definition: PrimaryVertexValidation.h:423
PrimaryVertexValidation::minPt_
const double minPt_
Definition: PrimaryVertexValidation.h:185
edm::Event
Definition: Event.h:73
PrimaryVertexValidation::n_dxyPhiMedianBiasTrend
TH1F * n_dxyPhiMedianBiasTrend
Definition: PrimaryVertexValidation.h:574
PrimaryVertexValidation::n_dxyEtaMeanBiasTrend
TH1F * n_dxyEtaMeanBiasTrend
Definition: PrimaryVertexValidation.h:557
HLT_FULL_cff.distance
distance
Definition: HLT_FULL_cff.py:7799
MagneticField
Definition: MagneticField.h:19
PrimaryVertexValidation::h_probeHitsInTOB_
TH1F * h_probeHitsInTOB_
Definition: PrimaryVertexValidation.h:659
d0
static constexpr float d0
Definition: L1EGammaCrystalsEmulatorProducer.cc:84
PrimaryVertexValidation::theTrackCollectionToken
edm::EDGetTokenT< reco::TrackCollection > theTrackCollectionToken
Definition: PrimaryVertexValidation.h:196
reco::TrackBase::theta
double theta() const
polar angle
Definition: TrackBase.h:602
PrimaryVertexValidation::a_dxyEtaMADTrend
TH1F * a_dxyEtaMADTrend
Definition: PrimaryVertexValidation.h:456
PrimaryVertexValidation::theBeamspotToken
edm::EDGetTokenT< reco::BeamSpot > theBeamspotToken
Definition: PrimaryVertexValidation.h:198
PrimaryVertexValidation.h
PrimaryVertexValidation::a_dzPhiMADBiasTrend
TH1F * a_dzPhiMADBiasTrend
Definition: PrimaryVertexValidation.h:567
PrimaryVertexValidation::h_yOfflineVertex
TH1F * h_yOfflineVertex
Definition: PrimaryVertexValidation.h:607
reco::TrackBase::dxy
double dxy() const
dxy parameter. (This is the transverse impact parameter w.r.t. to (0,0,0) ONLY if refPoint is close t...
Definition: TrackBase.h:608
PrimaryVertexValidation::~PrimaryVertexValidation
~PrimaryVertexValidation() override
Definition: PrimaryVertexValidation.cc:202
PrimaryVertexValidation::n_IP2DEtaResiduals
std::vector< TH1F * > n_IP2DEtaResiduals
Definition: PrimaryVertexValidation.h:354
PrimaryVertexValidation::cmToum
static const int cmToum
Definition: PrimaryVertexValidation.h:207
PrimaryVertexValidation::a_dzEtaMADTrend
TH1F * a_dzEtaMADTrend
Definition: PrimaryVertexValidation.h:458
SiPixelRecHit::clusterProbability
float clusterProbability(unsigned int flags=0) const
Definition: SiPixelRecHit.cc:9
reco::TrackBase::quality
bool quality(const TrackQuality) const
Track quality.
Definition: TrackBase.h:552
edm::InputTag
Definition: InputTag.h:15
PVValHelper::dx
Definition: PVValidationHelpers.h:48
PrimaryVertexValidation::vtxSort
static bool vtxSort(const reco::Vertex &a, const reco::Vertex &b)
Definition: PrimaryVertexValidation.cc:3246
PrimaryVertexValidation::h_probeHitsInTEC_
TH1F * h_probeHitsInTEC_
Definition: PrimaryVertexValidation.h:661
PrimaryVertexValidation::n_dxyEtaWidthTrend
TH1F * n_dxyEtaWidthTrend
Definition: PrimaryVertexValidation.h:400
PrimaryVertexValidation::n_dzBiasResidualsMap
TH1F * n_dzBiasResidualsMap[nMaxBins_][nMaxBins_]
Definition: PrimaryVertexValidation.h:538
PrimaryVertexValidation::a_dyPhiResiduals
std::vector< TH1F * > a_dyPhiResiduals
Definition: PrimaryVertexValidation.h:327
PrimaryVertexValidation::n_dxyEtaMedianBiasTrend
TH1F * n_dxyEtaMedianBiasTrend
Definition: PrimaryVertexValidation.h:579
PrimaryVertexValidation::n_dxyPhiMeanTrend
TH1F * n_dxyPhiMeanTrend
Definition: PrimaryVertexValidation.h:394
up
Definition: BitonicSort.h:7
PrimaryVertexValidation::a_dxyPhiMeanBiasTrend
TH1F * a_dxyPhiMeanBiasTrend
Definition: PrimaryVertexValidation.h:542
PrimaryVertexValidation::h_BeamWidthX
TH1F * h_BeamWidthX
Definition: PrimaryVertexValidation.h:616
PrimaryVertexValidation::h_probedxyRefitV_
TH1F * h_probedxyRefitV_
Definition: PrimaryVertexValidation.h:638
PrimaryVertexValidation::yOfflineVertex_
double yOfflineVertex_
Definition: PrimaryVertexValidation.h:229
reco::Vertex
Definition: Vertex.h:35
PrimaryVertexValidation::magFieldToken_
const edm::ESGetToken< MagneticField, IdealMagneticFieldRecord > magFieldToken_
Definition: PrimaryVertexValidation.h:150
PrimaryVertexValidation::h_probeRecoVSigZ_
TH1F * h_probeRecoVSigZ_
Definition: PrimaryVertexValidation.h:647
hit
Definition: SiStripHitEffFromCalibTree.cc:88
PrimaryVertexValidation::n_dxyEtaWidthBiasTrend
TH1F * n_dxyEtaWidthBiasTrend
Definition: PrimaryVertexValidation.h:558
PrimaryVertexValidation::rootTree_
TTree * rootTree_
Definition: PrimaryVertexValidation.h:200
TFileService::make
T * make(const Args &... args) const
make new ROOT object
Definition: TFileService.h:64
PrimaryVertexValidation::h_recoVtxChi2Prob_
TH1F * h_recoVtxChi2Prob_
Definition: PrimaryVertexValidation.h:685
PrimaryVertexValidation::h_probeNormChi2_
TH1F * h_probeNormChi2_
Definition: PrimaryVertexValidation.h:630
PrimaryVertexValidation::a_reszEtaResiduals
std::vector< TH1F * > a_reszEtaResiduals
Definition: PrimaryVertexValidation.h:340
reco::TrackBase::qoverp
double qoverp() const
q / p
Definition: TrackBase.h:599
PVValHelper::IP2D
Definition: PVValidationHelpers.h:51
PrimaryVertexValidation::n_dzWidthBiasMap
TH2F * n_dzWidthBiasMap
Definition: PrimaryVertexValidation.h:596
PrimaryVertexValidation::n_IP3DPhiResiduals
std::vector< TH1F * > n_IP3DPhiResiduals
Definition: PrimaryVertexValidation.h:356
PrimaryVertexValidation::a_dxyEtaResiduals
std::vector< TH1F * > a_dxyEtaResiduals
Definition: PrimaryVertexValidation.h:322
DeadROC_duringRun.dir
dir
Definition: DeadROC_duringRun.py:23
pwdgSkimBPark_cfi.vertices
vertices
Definition: pwdgSkimBPark_cfi.py:7
PVValHelper::shrinkHistVectorToFit
void shrinkHistVectorToFit(std::vector< TH1F * > &h, unsigned int desired_size)
Definition: PVValidationHelpers.cc:56
PrimaryVertexValidation::a_dzmodZWidthTrend
TH1F * a_dzmodZWidthTrend
Definition: PrimaryVertexValidation.h:431
PrimaryVertexValidation::a_dzPhiMedianBiasTrend
TH1F * a_dzPhiMedianBiasTrend
Definition: PrimaryVertexValidation.h:566
PrimaryVertexValidation::h_Beamsigmaz
TH1F * h_Beamsigmaz
Definition: PrimaryVertexValidation.h:615
TrackerGeometry
Definition: TrackerGeometry.h:14
PVValHelper::norm_dz
Definition: PVValidationHelpers.h:59
PrimaryVertexValidation::h_runStartTimes
TH1I * h_runStartTimes
Definition: PrimaryVertexValidation.h:314
PrimaryVertexValidation::hasRecVertex_
int hasRecVertex_[nMaxtracks_]
Definition: PrimaryVertexValidation.h:294
PrimaryVertexValidation::a_dxyBiasResidualsMap
TH1F * a_dxyBiasResidualsMap[nMaxBins_][nMaxBins_]
Definition: PrimaryVertexValidation.h:534
PVValHelper::fitResiduals
std::pair< Measurement1D, Measurement1D > fitResiduals(TH1 *hist)
Definition: PVValidationHelpers.cc:223
PrimaryVertexValidation::n_dxyladderMeanTrend
TH1F * n_dxyladderMeanTrend
Definition: PrimaryVertexValidation.h:443